ember-ebau-gwr 7.4.2 → 7.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +2 -2
  3. package/addon/components/login-modal.js +2 -2
  4. package/addon/components/model-form/field.js +1 -1
  5. package/addon/components/model-form/header/status-selector.js +7 -7
  6. package/addon/components/model-form.js +3 -3
  7. package/addon/components/project-nav.js +3 -3
  8. package/addon/components/quarterly-closure/close-survey-button.js +3 -3
  9. package/addon/components/quarterly-closure/error-list/project-errors.js +7 -3
  10. package/addon/components/quarterly-closure/error-list/survey-department-errors.js +2 -2
  11. package/addon/components/search.js +2 -2
  12. package/addon/components/validated-form-error.js +1 -1
  13. package/addon/controllers/building/edit/dwelling/edit.js +10 -10
  14. package/addon/controllers/building/edit/dwellings.js +4 -4
  15. package/addon/controllers/building/edit/entrance/edit/index.js +7 -7
  16. package/addon/controllers/building/edit/entrance/edit/link-street.js +6 -6
  17. package/addon/controllers/building/edit/entrances.js +4 -4
  18. package/addon/controllers/building/edit/form.js +12 -12
  19. package/addon/controllers/project/errors.js +9 -10
  20. package/addon/controllers/project/form.js +18 -18
  21. package/addon/controllers/project/linked-buildings.js +5 -5
  22. package/addon/controllers/search-building.js +8 -8
  23. package/addon/controllers/search-project.js +3 -3
  24. package/addon/helpers/current-quarter.js +1 -1
  25. package/addon/models/building.js +1 -1
  26. package/addon/models/buildings-list.js +1 -1
  27. package/addon/models/construction-project.js +14 -14
  28. package/addon/models/dwelling.js +8 -5
  29. package/addon/models/xml-model.js +2 -2
  30. package/addon/modifiers/in-viewport.js +2 -2
  31. package/addon/modifiers/inverse-background.js +1 -1
  32. package/addon/resources/import.js +4 -5
  33. package/addon/services/auth-fetch.js +2 -2
  34. package/addon/services/building-entrance.js +10 -10
  35. package/addon/services/building.js +38 -38
  36. package/addon/services/construction-project.js +49 -49
  37. package/addon/services/dwelling.js +16 -16
  38. package/addon/services/gwr.js +6 -6
  39. package/addon/services/quarterly-closure.js +9 -9
  40. package/addon/services/xml.js +1 -1
  41. package/addon/utils.js +2 -2
  42. package/addon/validators/range-state.js +1 -1
  43. package/package.json +54 -50
  44. package/translations/building/fr.yaml +1 -1
  45. package/translations/construction-project/fr.yaml +2 -2
  46. package/translations/dwelling/fr.yaml +2 -2
  47. package/translations/fr.yaml +3 -3
  48. package/tsconfig.declarations.json +10 -0
  49. package/app/mirage-models/gwr-link.js +0 -1
@@ -62,7 +62,7 @@ export default class GwrService extends Service {
62
62
  async search(
63
63
  query,
64
64
  id,
65
- { xmlMethod, urlPath, listModel, listKey, searchKey }
65
+ { xmlMethod, urlPath, listModel, listKey, searchKey },
66
66
  ) {
67
67
  let response;
68
68
  if (id) {
@@ -102,7 +102,7 @@ export default class GwrService extends Service {
102
102
  headers: {
103
103
  query: queryXML,
104
104
  },
105
- }
105
+ },
106
106
  );
107
107
  // The api returns a 404 if no results are found for the query
108
108
  if (!response.ok && response.status === 404) {
@@ -128,10 +128,10 @@ export default class GwrService extends Service {
128
128
  (error) =>
129
129
  errorsToMatch.find(({ errorKey }) => error === errorKey)
130
130
  ?.errorMessage ??
131
- this.intl.t("ember-gwr.generalErrors.genericFormError")
131
+ this.intl.t("ember-gwr.generalErrors.genericFormError"),
132
132
  ) ?? [];
133
133
  return customErrors.concat(
134
- model.errorList?.map((error) => error.messageOfError) ?? []
134
+ model.errorList?.map((error) => error.messageOfError) ?? [],
135
135
  );
136
136
  }
137
137
 
@@ -143,7 +143,7 @@ export default class GwrService extends Service {
143
143
  return `${states
144
144
  .map((state) => this.intl.t(`ember-gwr.lifeCycles.states.${state}`))
145
145
  .join(", ")} ${this.intl.t("ember-gwr.general.or")} ${this.intl.t(
146
- `ember-gwr.lifeCycles.states.${tail}`
146
+ `ember-gwr.lifeCycles.states.${tail}`,
147
147
  )}`;
148
148
  }
149
149
 
@@ -165,7 +165,7 @@ export default class GwrService extends Service {
165
165
  {
166
166
  dwellingId,
167
167
  buildingId,
168
- }
168
+ },
169
169
  ),
170
170
  linkToTextAfter: this.intl.t(`ember-gwr.lifeCycles.statusError`, {
171
171
  states: this.concatStates(states),
@@ -27,7 +27,7 @@ export default class QuarterlyClosureService extends Service {
27
27
  type: REQUEST_PENDING,
28
28
  label: this.intl.t(`ember-gwr.quarterlyClosure.status.processing`),
29
29
  shortLabel: this.intl.t(
30
- `ember-gwr.quarterlyClosure.status.short.processing`
30
+ `ember-gwr.quarterlyClosure.status.short.processing`,
31
31
  ),
32
32
  };
33
33
  }
@@ -62,17 +62,17 @@ export default class QuarterlyClosureService extends Service {
62
62
  this.pollProgressStatus,
63
63
  this.status.type === REQUEST_PENDING
64
64
  ? 5000 //5sec
65
- : 1800000 // 30min
65
+ : 1800000, // 30min
66
66
  );
67
67
  } catch (error) {
68
68
  console.error(error);
69
69
  this.notification.danger(
70
- this.intl.t("ember-gwr.quarterlyClosure.status.pollError")
70
+ this.intl.t("ember-gwr.quarterlyClosure.status.pollError"),
71
71
  );
72
72
  later(
73
73
  this,
74
74
  this.pollProgressStatus,
75
- 60000 // 1min
75
+ 60000, // 1min
76
76
  );
77
77
  }
78
78
  } else {
@@ -88,10 +88,10 @@ export default class QuarterlyClosureService extends Service {
88
88
 
89
89
  const response = await this.authFetch.fetch(
90
90
  `/constructionsurveydepts/${this.constructionSurveyDeptNumber}/getProgressStatusQuarterlyClosure`,
91
- { method: "get" }
91
+ { method: "get" },
92
92
  );
93
93
  const quarterlyClosureStatus = new QuarterlyClosureStatus(
94
- await response.text()
94
+ await response.text(),
95
95
  );
96
96
 
97
97
  if (quarterlyClosureStatus.error?.length) {
@@ -114,7 +114,7 @@ export default class QuarterlyClosureService extends Service {
114
114
 
115
115
  await this.authFetch.fetch(
116
116
  `/constructionsurveydepts/${this.constructionSurveyDeptNumber}/closeQuarterlySurvey`,
117
- { method: "put" }
117
+ { method: "put" },
118
118
  );
119
119
 
120
120
  await this.pollProgressStatus();
@@ -127,7 +127,7 @@ export default class QuarterlyClosureService extends Service {
127
127
 
128
128
  const response = await this.authFetch.fetch(
129
129
  `/constructionsurveydepts/${this.constructionSurveyDeptNumber}/check`,
130
- { method: "put" }
130
+ { method: "put" },
131
131
  );
132
132
  return new CheckSurveyDepartmentResponse(await response.text());
133
133
  }
@@ -135,7 +135,7 @@ export default class QuarterlyClosureService extends Service {
135
135
  async checkConstructionProject(id) {
136
136
  const response = await this.authFetch.fetch(
137
137
  `/constructionprojects/${id}/check`,
138
- { method: "put" }
138
+ { method: "put" },
139
139
  );
140
140
  return new CheckConstructionProjectResponse(await response.text());
141
141
  }
@@ -25,7 +25,7 @@ export default class XmlService extends Service {
25
25
 
26
26
  return this._compiledTemplates[type](
27
27
  { model, reason },
28
- { allowProtoPropertiesByDefault: true }
28
+ { allowProtoPropertiesByDefault: true },
29
29
  );
30
30
  }
31
31
 
package/addon/utils.js CHANGED
@@ -13,12 +13,12 @@ export const stripLeadingZero = (string) =>
13
13
 
14
14
  export const applyTransforms = (
15
15
  object,
16
- transforms // {key: (any) => any}
16
+ transforms, // {key: (any) => any}
17
17
  ) =>
18
18
  Object.keys(transforms).reduce((transformedData, transformKey) => {
19
19
  // No spread to improve performance
20
20
  transformedData[transformKey] = transforms[transformKey](
21
- object[transformKey]
21
+ object[transformKey],
22
22
  );
23
23
  return transformedData;
24
24
  }, object);
@@ -11,7 +11,7 @@ export default function validateRangeState({ range, on, states } = {}) {
11
11
  changes[on] ?? content[on],
12
12
  content[on],
13
13
  changes,
14
- content
14
+ content,
15
15
  );
16
16
  if (isIncluded !== true) {
17
17
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-ebau-gwr",
3
- "version": "7.4.2",
3
+ "version": "7.4.4",
4
4
  "description": "Ember engine to integrate ebau-gwr into an ember app.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -34,82 +34,86 @@
34
34
  "ember-source": "^4.0.0"
35
35
  },
36
36
  "dependencies": {
37
- "@ember/legacy-built-in-components": "^0.4.2",
37
+ "@babel/core": "^7.23.6",
38
+ "@ember/legacy-built-in-components": "^0.5.0",
38
39
  "@ember/render-modifiers": "^2.1.0",
39
- "@fortawesome/ember-fontawesome": "^1.0.1",
40
- "@fortawesome/free-regular-svg-icons": "^6.4.0",
41
- "@fortawesome/free-solid-svg-icons": "^6.4.0",
40
+ "@fortawesome/ember-fontawesome": "^2.0.0",
41
+ "@fortawesome/free-regular-svg-icons": "^6.5.1",
42
+ "@fortawesome/free-solid-svg-icons": "^6.5.1",
42
43
  "@glimmer/component": "^1.1.2",
43
44
  "@glimmer/tracking": "^1.1.2",
44
- "ember-auto-import": "^2.6.3",
45
+ "ember-auto-import": "^2.7.0",
45
46
  "ember-changeset": "^4.1.2",
46
47
  "ember-changeset-validations": "^4.1.1",
47
- "ember-cli-babel": "^7.26.11",
48
- "ember-cli-htmlbars": "^6.2.0",
48
+ "ember-cli-babel": "^8.2.0",
49
+ "ember-cli-htmlbars": "^6.3.0",
49
50
  "ember-composable-helpers": "^5.0.0",
50
51
  "ember-concurrency": "^3.0.0",
51
- "ember-data": "^3.28.13",
52
- "ember-engines-router-service": "0.3.0",
52
+ "ember-data": "^4.12.5",
53
+ "ember-engines-router-service": "0.5.0",
53
54
  "ember-flatpickr": "^4.0.0",
54
- "ember-intl": "^5.7.2",
55
- "ember-power-select": "^7.1.2",
56
- "ember-resources": "^6.4.0",
57
- "ember-truth-helpers": "^3.1.1",
58
- "ember-uikit": "^8.0.0",
59
- "ember-validated-form": "^6.2.0",
55
+ "ember-intl": "^6.4.0",
56
+ "ember-power-select": "^7.2.0",
57
+ "ember-resources": "^6.4.2",
58
+ "ember-truth-helpers": "^4.0.3",
59
+ "ember-uikit": "^9.0.0",
60
+ "ember-validated-form": "^7.0.0",
60
61
  "handlebars": "^4.7.8",
61
- "luxon": "^3.3.0"
62
+ "luxon": "^3.4.4"
62
63
  },
63
64
  "devDependencies": {
64
- "@adfinis/eslint-config": "2.0.0",
65
- "@adfinis/semantic-release-config": "4.0.0",
66
- "@babel/eslint-parser": "7.22.11",
67
- "@babel/plugin-proposal-decorators": "7.22.7",
65
+ "@adfinis/eslint-config": "2.1.0",
66
+ "@adfinis/semantic-release-config": "4.1.0",
67
+ "@babel/eslint-parser": "7.23.3",
68
+ "@babel/plugin-proposal-decorators": "7.23.6",
68
69
  "@ember/optional-features": "2.0.0",
69
- "@ember/string": "3.1.1",
70
- "@ember/test-helpers": "3.2.0",
71
- "@embroider/test-setup": "3.0.1",
70
+ "@ember/test-helpers": "3.2.1",
71
+ "@embroider/test-setup": "3.0.3",
72
+ "@fortawesome/fontawesome-svg-core": "6.5.1",
72
73
  "broccoli-asset-rev": "3.0.0",
73
- "concurrently": "8.2.0",
74
- "ember-cli": "4.12.1",
74
+ "concurrently": "8.2.2",
75
+ "ember-cli": "5.5.0",
76
+ "ember-cli-clean-css": "^3.0.0",
75
77
  "ember-cli-dependency-checker": "3.3.2",
76
78
  "ember-cli-inject-live-reload": "2.1.0",
77
- "ember-cli-mirage": "3.0.0-alpha.3",
79
+ "ember-cli-mirage": "3.0.2",
78
80
  "ember-cli-sass": "11.0.1",
79
81
  "ember-cli-sri": "2.1.1",
80
82
  "ember-cli-terser": "4.0.2",
81
83
  "ember-engines": "0.9.0",
82
84
  "ember-load-initializers": "2.1.2",
83
- "ember-qunit": "7.0.0",
85
+ "ember-qunit": "8.0.2",
84
86
  "ember-resolver": "11.0.1",
85
- "ember-source": "4.12.3",
87
+ "ember-source": "5.5.0",
86
88
  "ember-source-channel-url": "3.0.0",
87
- "ember-template-lint": "5.11.1",
88
- "ember-template-lint-plugin-prettier": "4.2.0",
89
+ "ember-template-lint": "5.13.0",
90
+ "ember-template-lint-plugin-prettier": "5.0.0",
89
91
  "ember-test-selectors": "6.0.0",
90
- "ember-try": "2.0.0",
91
- "eslint": "8.45.0",
92
- "eslint-config-prettier": "8.10.0",
93
- "eslint-plugin-ember": "11.10.0",
94
- "eslint-plugin-import": "2.28.1",
95
- "eslint-plugin-n": "16.0.1",
96
- "eslint-plugin-prettier": "4.2.1",
97
- "eslint-plugin-qunit": "7.3.4",
92
+ "ember-try": "3.0.0",
93
+ "eslint": "8.55.0",
94
+ "eslint-config-prettier": "9.1.0",
95
+ "eslint-plugin-ember": "11.11.1",
96
+ "eslint-plugin-import": "2.29.0",
97
+ "eslint-plugin-n": "16.4.0",
98
+ "eslint-plugin-prettier": "5.0.1",
99
+ "eslint-plugin-qunit": "8.0.1",
98
100
  "loader.js": "4.7.0",
99
101
  "local-cors-proxy": "1.1.0",
100
- "miragejs": "0.1.47",
101
- "prettier": "2.8.8",
102
- "qunit": "2.19.4",
103
- "qunit-dom": "2.0.0",
104
- "sass": "1.66.1",
105
- "stylelint": "15.10.2",
106
- "stylelint-config-standard-scss": "10.0.0",
107
- "stylelint-prettier": "3.0.0",
108
- "stylelint-scss": "5.0.1",
109
- "webpack": "5.88.2"
102
+ "miragejs": "0.1.48",
103
+ "prettier": "3.1.1",
104
+ "qunit": "2.20.0",
105
+ "qunit-dom": "3.0.0",
106
+ "sass": "1.69.5",
107
+ "semantic-release": "22.0.12",
108
+ "stylelint": "16.0.2",
109
+ "stylelint-config-standard-scss": "12.0.0",
110
+ "stylelint-prettier": "5.0.0",
111
+ "stylelint-scss": "6.0.0",
112
+ "uikit": "3.17.11",
113
+ "webpack": "5.89.0"
110
114
  },
111
115
  "engines": {
112
- "node": "14.* || 16.* || >= 18"
116
+ "node": ">= 18"
113
117
  },
114
118
  "ember": {
115
119
  "edition": "octane"
@@ -27,7 +27,7 @@ ember-gwr:
27
27
 
28
28
  saveError: Une erreur s'est produite lors de la sauvegarde du bâtiment.
29
29
  forbiddenBuildingClassError: |-
30
- La classe de bâtiment "Bâtiments d'exploitation agricole" ne doit plus être attribuée lors de la saisie des bâtiments (nouvelles constructions). Choisissez à la place parmi les classes de bâtiments suivantes: "Bâtiments pour l'élevage", "Bâtiments pour la production végétale" et "Autres bâtiments agricoles".
30
+ La classe de bâtiment "Bâtiments d'exploitation agricole" ne peut plus être attribuée lors de la saisie de bâtiments (nouvelle construction). Choisissez plutôt parmi les classes de bâtiments suivantes : "Bâtiments pour la garde d'animaux", "Bâtiments pour la culture végétale" et "Autres bâtiments d'exploitation agricole".
31
31
  saveSuccess: Bâtiment sauvegardé avec succès.
32
32
  entrances:
33
33
  error: Une erreur s'est produite lors du chargement des entrées.
@@ -3,7 +3,7 @@ ember-gwr:
3
3
  saveError: Une erreur s'est produite lors de la sauvegarde du projet.
4
4
  saveSuccess: Projet de construction sauvegardé avec succès.
5
5
  missingBuildingError: Veuillez d'abord associer un bâtiment.
6
- linkedWithBuilding: Lié à Bâtiment
6
+ linkedWithBuilding: Lié à bâtiment
7
7
 
8
8
  sections:
9
9
  freeTextFields: Champs libres
@@ -315,7 +315,7 @@ ember-gwr:
315
315
  typeOfConstructionProjectOptions:
316
316
  6010: Génie civil
317
317
  6011: Bâtiment
318
- 6012: Constructions particulières
318
+ 6012: Construction particulière
319
319
 
320
320
  typeOfConstruction: Type d’ouvrage
321
321
  typeOfConstructionPlaceholder: Sélectionnez un type d’ouvrage...
@@ -80,8 +80,8 @@ ember-gwr:
80
80
  remark: Commentaire sur l’affectation
81
81
  personWithMainResidence: Personne(s) avec domicile principal
82
82
  personWithSecondaryResidence: Personne(s) avec domicile secondaire
83
- mainAndSecondaryResidenceInfoHeading: Informations sur les "Personne(s) avec domicile principal" et les "Personne(s) avec domicile secondaire"
84
- mainAndSecondaryResidenceInfo: Pour les "Personne(s) avec domicile principal" et les "Personne(s) avec domicile secondaire", la mise à jour dans le RegBL fédéral est automatique et se base sur la mise en relation des données du RegBL fédéral avec les données des registres de personnes.
83
+ mainAndSecondaryResidenceInfoHeading: Information sur "Personne(s) avec domicile principal" et "Personne(s) avec domicile secondaire"
84
+ mainAndSecondaryResidenceInfo: Pour "Personne(s) avec domicile principal" et "Personne(s) avec domicile secondaire", la mise à jour dans le RegBL fédéral est automatique et se base sur le lien entre les données du RegBL fédéral et les données des registres de personnes.
85
85
  dateFirstOccupancy: Date de la première occupation
86
86
  dateLastOccupancy: Date de la dernière occupation
87
87
 
@@ -72,9 +72,9 @@ ember-gwr:
72
72
  Aucun bâtiment n'est autorisé pour les projets de génie civil.
73
73
  Le genre de construction est saisi directement sur le projet.
74
74
  superstructureInfo: |-
75
- Pour les projets de construction de bâtiments, le genre de construction est déclaré exclusivement par bâtiment.
75
+ Pour les projets de construction de bâtiments, le genre de travaux est déclaré en fonction du bâtiment.
76
76
  specialstructureInfo: |-
77
- Seuls les bâtiments de la catégorie "construction spéciale" sont autorisés pour les projets de construction spéciale.
77
+ Pour les projets de construction particulière, seuls les bâtiments de la catégorie de bâtiment "construction particulière" sont autorisés.
78
78
  buildingDisabledForNewProject: Pendant la création d'un projet, il n'est pas encore possible de saisir des bâtiments.
79
79
 
80
80
  search:
@@ -333,7 +333,7 @@ ember-gwr:
333
333
  linkSuccess: La rue est liée avec succès.
334
334
  linkError: Une erreur est survenue lors de la liaison de la rue.
335
335
  streetHint: Pour saisir une entrée, vous devez associer une rue.
336
- searchHint: Un astérisque (*) peut être utilisé comme caractère de remplacement dans la recherche pour rechercher des parties d'un nom de rue.
336
+ searchHint: Un astérisque (*) peut être utilisé comme espace réservé dans la recherche de parties d'un nom de rue.
337
337
  searchHintExamples: Exemples
338
338
  searchHintExamples1: 'Rue* : Rue de Lausanne, Rue des Sablons'
339
339
  searchHintExamples2: '*de la Gare : Avenue de la Gare'
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "declarationDir": "declarations",
5
+ "emitDeclarationOnly": true,
6
+ "noEmit": false,
7
+ "rootDir": "."
8
+ },
9
+ "include": ["addon", "addon-test-support"]
10
+ }
@@ -1 +0,0 @@
1
- export { default } from "ember-ebau-gwr/mirage-models/gwr-link";