diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index b68141ff3..000000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "root": true,
- "plugins": ["unused-imports"],
- "overrides": [
- {
- "files": ["*.ts"],
- "extends": [
- "plugin:@angular-eslint/recommended",
- "plugin:@angular-eslint/template/process-inline-templates"
- ],
- "rules": {
- "arrow-spacing": "error",
- "max-len": [
- "error",
- {
- "code": 140,
- "comments": 140,
- "ignoreTrailingComments": true,
- "ignoreUrls": true,
- "ignoreTemplateLiterals": true,
- "ignoreRegExpLiterals": true
- }
- ],
- "unused-imports/no-unused-imports": "error",
- "no-multi-spaces": "error",
- "eqeqeq": ["error", "always"],
- "semi": ["error", "always"],
- "no-trailing-spaces": "error",
- "no-multiple-empty-lines": "error",
- "eol-last": ["error", "always"],
- "@angular-eslint/no-output-native": "off",
- "@angular-eslint/component-selector": [
- "error",
- {
- "prefix": "app",
- "style": "kebab-case",
- "type": "element"
- }
- ],
- "@angular-eslint/directive-selector": [
- "error",
- {
- "prefix": "app",
- "style": "camelCase",
- "type": "attribute"
- }
- ]
- }
- },
- {
- "files": ["*.html"],
- "extends": ["plugin:@angular-eslint/template/recommended"],
- "rules": {}
- }
- ]
-}
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index c40d50cbf..587128fc3 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -39,7 +39,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@v2
+ uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -64,4 +64,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/gh-release.yml b/.github/workflows/gh-release.yml
index 31c3addad..dd1cf6413 100644
--- a/.github/workflows/gh-release.yml
+++ b/.github/workflows/gh-release.yml
@@ -9,22 +9,31 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: npm install conventional-changelog-cli@4.1.0
+ - uses: actions/checkout@v4
+ - name: Use Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: '20.x'
+
+ - name: Install conventional-changelog-cli
run: npm install conventional-changelog-cli@4.1.0
+
- name: Generate Changelog-current
run: npm run changelog-current | grep -v "^>" | sed '/^$/d' > ${{ github.workspace }}-CHANGELOG.txt
+
- name: Build production
run: npm run build.prod
+
- name: Install zip
uses: montudor/action-zip@v1
+
- name: Zip output
run: zip -qq -r igo2.zip *
- working-directory: dist/igo2
+ working-directory: dist/igo2/browser
+
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt
- files: dist/igo2/igo2.zip
+ files: dist/igo2/browser/igo2.zip
token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/onPush.js.yml b/.github/workflows/onPush.js.yml
index 3b1df66b4..1f03dd64b 100644
--- a/.github/workflows/onPush.js.yml
+++ b/.github/workflows/onPush.js.yml
@@ -17,11 +17,15 @@ jobs:
steps:
- name: The branch or tag ref that triggered the workflow run.
run: echo ${GITHUB_REF#refs/*/}
- - uses: actions/checkout@v3
- - name: Use Node.js ${{ matrix.node-version }}
+
+ - uses: actions/checkout@v4
+ - name: Use Node.js
uses: actions/setup-node@v3
with:
- node-version: ${{ matrix.node-version }}
- - run: npm install @angular/cli
- - run: npm run lint
- - run: npm run e2e
+ node-version: '20.x'
+
+ - name: Install Angular cli
+ run: npm install @angular/cli
+
+ - name: Check quality
+ run: npm run lint && npm run e2e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f419384e3..43dcd5461 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,24 @@
+# [17.0.0](https://github.com/infra-geo-ouverte/igo2/compare/v16.3.0...v17.0.0) (2024-08-22)
+
+
+### Bug Fixes
+
+* add google font symbols ([fb7af4a](https://github.com/infra-geo-ouverte/igo2/commit/fb7af4ac24d5b6c1d521f1e9aa840ee2b177fb74))
+* **core:** use provideConfig ([6a93da4](https://github.com/infra-geo-ouverte/igo2/commit/6a93da431052db3b9053d793994a3215b3298eae))
+* double head in index ([7626f6c](https://github.com/infra-geo-ouverte/igo2/commit/7626f6c07b55636a1fdd4dd641f6d9a907f9ff2a))
+* **environment:** add testgeoegl in trusted host ([e400086](https://github.com/infra-geo-ouverte/igo2/commit/e400086c0dfe4835f3b83856e9121c11bd1cdca0))
+* ol version to 9.1.0 ([9c66af3](https://github.com/infra-geo-ouverte/igo2/commit/9c66af336373e56df01da15d86b0ba1582868112))
+
+
+### Features
+
+* **auth:** configure auth with provider ([6b0098f](https://github.com/infra-geo-ouverte/igo2/commit/6b0098f06aa38c02b2b8964261cec0a90aa7051e))
+* **common:** refact in submodule ([#1155](https://github.com/infra-geo-ouverte/igo2/issues/1155)) ([76fb402](https://github.com/infra-geo-ouverte/igo2/commit/76fb402d28563696cba902cb52c412641a6ac9cc)), closes [#1156](https://github.com/infra-geo-ouverte/igo2/issues/1156)
+* **directions:** added possibility to toggle between two routing sources ([#1150](https://github.com/infra-geo-ouverte/igo2/issues/1150)) ([#1150](https://github.com/infra-geo-ouverte/igo2/issues/1150)) ([6157df4](https://github.com/infra-geo-ouverte/igo2/commit/6157df41fdc3b78dd56b80aff6babef4c5749e4c))
+* replace @mdi/angular-material with Google Font - Symbol BREAKIN… ([#1154](https://github.com/infra-geo-ouverte/igo2/issues/1154)) ([3c8cf48](https://github.com/infra-geo-ouverte/igo2/commit/3c8cf4812096adbb30f4bd3494c9e6274acf3d91))
+
+
+
# [16.3.0](https://github.com/infra-geo-ouverte/igo2/compare/v16.2.0...v16.3.0) (2024-01-25)
diff --git a/angular.json b/angular.json
index 6c0237af8..1e7da6c8a 100644
--- a/angular.json
+++ b/angular.json
@@ -16,14 +16,12 @@
},
"architect": {
"build": {
- "defaultConfiguration": "developpement",
- "builder": "@angular-devkit/build-angular:browser",
+ "builder": "@angular-devkit/build-angular:application",
"options": {
"aot": true,
"outputPath": "dist/igo2",
"index": "src/index.html",
- "main": "src/main.ts",
- "polyfills": "src/polyfills.ts",
+ "polyfills": ["src/polyfills.ts"],
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
@@ -34,28 +32,28 @@
"src/locale",
{
"glob": "**/*",
- "input": "./node_modules/@igo2/common/assets/",
- "output": "./assets/igo2/common/"
+ "input": "node_modules/@igo2/common/assets/",
+ "output": "assets/igo2/common/"
},
{
"glob": "**/*",
- "input": "./node_modules/@igo2/core/assets/",
- "output": "./assets/igo2/core/"
+ "input": "node_modules/@igo2/core/assets/",
+ "output": "assets/igo2/core/"
},
{
"glob": "**/*",
- "input": "./node_modules/@igo2/core/locale/",
- "output": "./locale/libs_locale",
+ "input": "node_modules/@igo2/core/locale/",
+ "output": "locale/libs_locale",
"ignore": ["**/*.core.json"]
},
{
"glob": "**/*",
- "input": "./node_modules/@igo2/core/theming/prebuilt-themes",
+ "input": "node_modules/@igo2/core/theming/prebuilt-themes",
"output": "./assets/igo2/core/theming/prebuilt-themes"
},
{
"glob": "**/*",
- "input": "./node_modules/@igo2/geo/assets/",
+ "input": "node_modules/@igo2/geo/assets/",
"output": "./assets/igo2/geo/"
},
"src/manifest.webmanifest"
@@ -90,7 +88,8 @@
"striptags",
"ts-md5",
"typy"
- ]
+ ],
+ "browser": "src/main.ts"
},
"configurations": {
"production": {
@@ -112,8 +111,6 @@
"namedChunks": false,
"aot": true,
"extractLicenses": true,
- "vendorChunk": true,
- "buildOptimizer": false,
"serviceWorker": false
},
"production-link": {
@@ -135,8 +132,6 @@
"namedChunks": false,
"aot": true,
"extractLicenses": true,
- "vendorChunk": true,
- "buildOptimizer": false,
"serviceWorker": false,
"assets": [
"src/favicon.ico",
@@ -175,17 +170,13 @@
]
},
"developpement": {
- "buildOptimizer": false,
"optimization": false,
- "vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
},
"developpement-link": {
- "buildOptimizer": false,
"optimization": false,
- "vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true,
@@ -244,8 +235,6 @@
"namedChunks": false,
"aot": true,
"extractLicenses": true,
- "vendorChunk": true,
- "buildOptimizer": false,
"serviceWorker": false
},
"pwa": {
@@ -267,10 +256,7 @@
"namedChunks": false,
"aot": true,
"extractLicenses": true,
- "vendorChunk": true,
- "buildOptimizer": false,
- "serviceWorker": true,
- "ngswConfigPath": "ngsw-config.json"
+ "serviceWorker": "ngsw-config.json"
}
}
},
@@ -278,38 +264,38 @@
"defaultConfiguration": "developpement",
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
- "browserTarget": "igo2:build",
"host": "0.0.0.0",
"port": 4201,
"hmr": true,
- "proxyConfig": "proxy.conf.json"
+ "proxyConfig": "proxy.conf.json",
+ "buildTarget": "igo2:build"
},
"configurations": {
"developpement": {
- "browserTarget": "igo2:build:developpement"
+ "buildTarget": "igo2:build:developpement"
},
"developpement-link": {
- "browserTarget": "igo2:build:developpement-link"
+ "buildTarget": "igo2:build:developpement-link"
},
"production": {
- "browserTarget": "igo2:build:production"
+ "buildTarget": "igo2:build:production"
},
"github": {
- "browserTarget": "igo2:build:github"
+ "buildTarget": "igo2:build:github"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
- "browserTarget": "igo2:build"
+ "buildTarget": "igo2:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
- "polyfills": "src/polyfills.ts",
+ "polyfills": ["src/polyfills.ts", "zone.js/testing"],
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": ["src/styles.scss"],
@@ -331,7 +317,8 @@
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
- "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
+ "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"],
+ "eslintConfig": "eslint.config.js"
}
},
"e2e": {
@@ -380,14 +367,12 @@
}
},
"cli": {
+ "cache": {
+ "enabled": false
+ },
"schematicCollections": [
- "@angular-eslint/schematics",
"@schematics/angular"
],
- "cache": {
- "enabled": false,
- "environment": "all"
- },
"analytics": false
}
-}
\ No newline at end of file
+}
diff --git a/docs/_tables/fr/config/directions-profile-auth.csv b/docs/_tables/fr/config/directions-profile-auth.csv
new file mode 100644
index 000000000..bea6ca057
--- /dev/null
+++ b/docs/_tables/fr/config/directions-profile-auth.csv
@@ -0,0 +1,3 @@
+Propriétés,Type,Description,Valeurs possibles,Valeur par défaut
+url ,String ,URL permettant de vérifier l'accessibilité d'un profil à un utilisateur. | Utilisé pour un profil protégé.,,
+property ,String ,Propriété utilisée pour la vérification de l'accessibilité.,,
\ No newline at end of file
diff --git a/docs/_tables/fr/config/directions-profile.csv b/docs/_tables/fr/config/directions-profile.csv
new file mode 100644
index 000000000..d125504dd
--- /dev/null
+++ b/docs/_tables/fr/config/directions-profile.csv
@@ -0,0 +1,4 @@
+Propriétés,Type,Description,Valeurs possibles,Valeur par défaut
+enabled ,Boolean ,Permet d'activer un profil spécifique au lancement de l'application. | Un seul doit être activé dans les configurations. ,true | false ,Le premier profil est activé par défaut.
+name ,String ,Nom du profil. | Le nom est ajouté à baseURL afin de créer la route finale,,
+authorization ,BaseDirectionsSourceOptionsProfileAuthorization ,Objet permettant de gérer l'accessibilité à un profil protégé. ,,
\ No newline at end of file
diff --git a/docs/_tables/fr/config/directions.csv b/docs/_tables/fr/config/directions.csv
index d08a44452..ff4725659 100644
--- a/docs/_tables/fr/config/directions.csv
+++ b/docs/_tables/fr/config/directions.csv
@@ -1,3 +1,5 @@
Propriétés,Type,Description,Valeurs possibles,Valeur défaut
-enabled ,Boolean ,Permet d'activer/ désactiver la source. ,true | false ,true
-url ,String ,Url du serveur retournant l'itinéraire. ,,`https://geoegl.msp.gouv.qc.ca/services/itineraire/route/v1/driving/ `_
+name ,String ,Nom de la source,,
+baseUrl ,String ,URL du service retournant l'itinéraire. ,,`https://geoegl.msp.gouv.qc.ca/apis/itineraire/route/v1/driving/ `
+profiles , BaseDirectionsSourceOptionsProfile[] , Liste de profils à utiliser. ,
+authorizationUrl ,String ,URL permettant de vérifier l'accessibilité d'une source à un utilisateur. | Utilisé pour une source privée.,,
\ No newline at end of file
diff --git a/docs/_tables/fr/properties/linkedLayersOptions.csv b/docs/_tables/fr/properties/linkedLayersOptions.csv
index 2e42257ed..dabf6949e 100644
--- a/docs/_tables/fr/properties/linkedLayersOptions.csv
+++ b/docs/_tables/fr/properties/linkedLayersOptions.csv
@@ -1,7 +1,4 @@
Propriétés,Type,Description,Valeurs possibles,Valeur défaut
-**linkId** ,String,"| Identifiant de liaison de la présente couche.
-| Diffère du ID du la couche car cet id doit être
-| connu au pilotage, pas seulement lors l'éxécution du code. ",,
-links ,:ref:`LayersLinkProperties[] ` ,"| Définit la liste des couches ""enfant"" liées
-| ainsi que leurs propriété qui sont synchronisées.
-| Obligatoire pour les couches parents.",,
+**linkId**,String,"| Identifiant de liaison de la présente couche.| Diffère du ID de la couche car cet ID doit être| connu au pilotage, pas seulement lors l'éxécution du code.",,,
+showInMiniBaseMap,Boolean,"| Définit si la couche est visible dans l'aperçu| de la couche parent du Base Layer Switcher.",true | false,true,
+links,:ref:`LayersLinkProperties[] `,"| Définit la liste des couches ""enfants"" liées| ainsi que leurs propriétés qui sont synchronisées.| Obligatoire pour les couches parents.",,,
diff --git a/docs/config_json.rst b/docs/config_json.rst
index d07471f54..1e5564202 100644
--- a/docs/config_json.rst
+++ b/docs/config_json.rst
@@ -836,22 +836,36 @@ Exemples
.. _igoroutingsource:
***************
-RoutingSource
+DirectionsSources
***************
.. line-block::
- Permet de définir la source serveur utilisée pour la création d'itinéraires. Actuellement, le serveur utilisé est OSRM.
+ Permet de définir une ou plusieurs profils utilisés pour la création d'itinéraires. Le service utilisé par IGO2 est OSRM.
+
+ La configuration peut contenir, pour le moment, jusqu'à deux profils.
Exemples
.. code:: json
- "routingSources": {
+ "directionsSources": {
"osrm": {
- "enabled": true,
- "url": "https://geoegl.msp.gouv.qc.ca/services/itineraire/route/v1/driving/"
+ "name": "OSRM Québec",
+ "baseUrl": "/apis/itineraire/route/v1/",
+ "profiles": [
+ {
+ "name": "driving",
+ },
+ {
+ "name": "forestier",
+ "authorization": {
+ "url": "/apis/igo2/user/igo",
+ "property": "hasOsrmPrivateAccess"
+ }
+ }]
}
+ }
Propriétés
@@ -861,7 +875,25 @@ Propriétés
:file: _tables/fr/config/directions.csv
:header-rows: 1
:widths: 10 10 30 15 10
+
+ **BaseDirectionsSourceOptionsProfile**
+
+ .. tabularcolumns:: |p{1cm}|p{2cm}|p{7cm}|p{2cm}|p{2cm}|
+
+ .. csv-table::
+ :file: _tables/fr/config/directions-profile.csv
+ :header-rows: 1
+ :widths: 10 10 30 15 10
+
+ **BaseDirectionsSourceOptionsProfileAuthorization**
+
+ .. tabularcolumns:: |p{1cm}|p{2cm}|p{7cm}|p{2cm}|p{2cm}|
+ .. csv-table::
+ :file: _tables/fr/config/directions-profile-auth.csv
+ :header-rows: 1
+ :widths: 10 10 30 15 10
+
Important : Les propriétés en caractère gras suivies d'un * sont obligatoires.
Liens
diff --git a/e2e/cypress.config.ts b/e2e/cypress.config.ts
index cbde1ef32..69aee29f4 100644
--- a/e2e/cypress.config.ts
+++ b/e2e/cypress.config.ts
@@ -5,7 +5,7 @@ export default defineConfig({
baseUrl: 'http://localhost:4201',
specPattern: 'e2e/src/*.spec.ts',
supportFile: 'e2e/support/e2e.ts',
- videosFolder: "e2e/dist/videos",
- screenshotsFolder: "e2e/dist/screenshots",
+ videosFolder: 'e2e/dist/videos',
+ screenshotsFolder: 'e2e/dist/screenshots'
}
});
diff --git a/e2e/fixtures/example.json b/e2e/fixtures/example.json
index 20b22a17d..294cbed6c 100644
--- a/e2e/fixtures/example.json
+++ b/e2e/fixtures/example.json
@@ -1,5 +1,4 @@
{
- "name": "Using fixtures to represent data",
- "email": "hello@cypress.io"
+ "name": "Using fixtures to represent data",
+ "email": "hello@cypress.io"
}
-
\ No newline at end of file
diff --git a/e2e/src/app.spec.ts b/e2e/src/app.spec.ts
index 903487c2c..2aeefec39 100644
--- a/e2e/src/app.spec.ts
+++ b/e2e/src/app.spec.ts
@@ -2,12 +2,9 @@ describe('My First Test', () => {
const url = 'http://localhost:4201';
it('Check the config file', () => {
cy.visit('/');
- cy.request('GET', `${url}/config/config.json`).then(
- (response) => {
- expect(response.body).to.have.property('title', 'IGO'); // true
- expect(response.body).to.have.property('theme', 'blue-theme'); // true
- }
- );
+ cy.request('GET', `${url}/config/config.json`).then((response) => {
+ expect(response.body).to.have.property('title', 'IGO'); // true
+ expect(response.body).to.have.property('theme', 'blue-theme'); // true
+ });
});
-
});
diff --git a/e2e/support/component-index.html b/e2e/support/component-index.html
index ac6e79fd8..faf3b5f43 100644
--- a/e2e/support/component-index.html
+++ b/e2e/support/component-index.html
@@ -1,12 +1,12 @@
-
+
-
-
-
+
+
+
Components App
-
\ No newline at end of file
+