ember-ebau-gwr 8.1.0 → 8.1.1

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [8.1.1](https://github.com/inosca/ember-ebau-gwr/compare/v8.1.0...v8.1.1) (2026-05-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **search-street:** fix invalid validation path on new buildings ([40cd7d3](https://github.com/inosca/ember-ebau-gwr/commit/40cd7d3b99c2b3a453fab1bcead1bd6b415e2c96))
7
+ * **search-street:** fix validation error on correct input ([4471c34](https://github.com/inosca/ember-ebau-gwr/commit/4471c34496cfe1de400264f500e8a589b02f38c6))
8
+
1
9
  # [8.1.0](https://github.com/inosca/ember-ebau-gwr/compare/v8.0.3...v8.1.0) (2026-01-12)
2
10
 
3
11
 
@@ -22,7 +22,7 @@
22
22
  (concat "ember-gwr.models." @modelName)
23
23
  count=1
24
24
  }}
25
- {{inc index}}</a>
25
+ {{this.getVisualIndex index}}</a>
26
26
  <div class="uk-accordion-content">
27
27
  {{component
28
28
  (concat "import-modal/" @modelName "-data")
@@ -3,4 +3,6 @@ import Component from "@glimmer/component";
3
3
 
4
4
  export default class ImportModalComponent extends Component {
5
5
  @service config;
6
+
7
+ getVisualIndex = (index) => index + 1;
6
8
  }
@@ -40,7 +40,7 @@
40
40
  @renderInPlace={{true}}
41
41
  @triggerClass="uk-select"
42
42
  @options={{this.sortedMunicipalities}}
43
- @selected={{find-by "id" this.municipality this.municipalities}}
43
+ @selected={{this.getMunicipality this.municipality}}
44
44
  @placeholder={{t "ember-gwr.components.loginModal.municipality"}}
45
45
  @searchEnabled={{true}}
46
46
  @searchField="name"
@@ -79,7 +79,7 @@
79
79
  "ember-gwr.components.loginModal.loginInfo"
80
80
  user=this.authFetch.username
81
81
  municipality=(get
82
- (find-by "id" this.authFetch.municipality this.municipalities)
82
+ (this.getMunicipality this.authFetch.municipality)
83
83
  "name"
84
84
  )
85
85
  htmlSafe=true
@@ -16,6 +16,13 @@ export default class LoginModalComponent extends Component {
16
16
  return municipalities[this.config.cantonAbbreviation];
17
17
  }
18
18
 
19
+ getMunicipality = (id) => {
20
+ const municipalityItem = this.municipalities.find(
21
+ (municipality) => municipality.id === parseInt(id),
22
+ );
23
+ return municipalityItem;
24
+ };
25
+
19
26
  @action
20
27
  async login() {
21
28
  const token = await this.authFetch.housingStatToken.perform(
@@ -1,5 +1,5 @@
1
1
  <ul class="uk-list uk-list-divider uk-margin-small-top">
2
- {{#each (repeat 3)}}
2
+ {{#each (array 1 2 3)}}
3
3
  <li>
4
4
  <div class="uk-flex uk-flex-left uk-flex-top">
5
5
  <div
@@ -1,7 +1,7 @@
1
1
  <UkSwitcher class="uk-margin-small-top uk-animation-fade" as |switcher|>
2
2
  <switcher.nav @type="subnav" as |nav|>
3
3
  <nav.component uk-switcher @divider={{true}} as |tab|>
4
- {{#each (repeat 3)}}
4
+ {{#each (array 1 2 3)}}
5
5
  <tab.item>
6
6
  <div
7
7
  class="ember-ebau-gwr-label-width ember-ebau-gwr-label-height uk-background-muted"
@@ -11,7 +11,7 @@
11
11
  </nav.component>
12
12
  </switcher.nav>
13
13
  <switcher.content as |content|>
14
- {{#each (repeat 3)}}
14
+ {{#each (array 1 2 3)}}
15
15
  <content.item>
16
16
  <ModelErrors::SkeletonErrors />
17
17
  </content.item>
@@ -32,11 +32,7 @@
32
32
  )
33
33
  )
34
34
  promptIsSelectable=true
35
- on-update=(if
36
- @on-update
37
- (queue this.updateModelField @on-update)
38
- this.updateModelField
39
- )
35
+ on-update=this.updateModelField
40
36
  renderComponent=(component
41
37
  this.fieldComponent
42
38
  horizontal=this.isHorizontal
@@ -118,5 +118,11 @@ export default class ModelFormFieldComponent extends Component {
118
118
  this.args.resolveDiff(this.args.attr);
119
119
  }
120
120
  }
121
+
122
+ const onUpdate = this.args["on-update"];
123
+
124
+ if (onUpdate) {
125
+ onUpdate(eventOrValue);
126
+ }
121
127
  }
122
128
  }
@@ -136,7 +136,7 @@
136
136
  )
137
137
  }}
138
138
  </div>
139
- {{#if (not-eq index (dec @nextValidStates.length))}}
139
+ {{#if (fn this.isIndexNotLast index)}}
140
140
  <div class="uk-margin-small-left uk-margin-small-right">
141
141
  |
142
142
  </div>
@@ -59,6 +59,8 @@ export default class ModelFormHeaderStatusSelectorComponent extends Component {
59
59
  }));
60
60
  }
61
61
 
62
+ isIndexNotLast = (index) => index !== this.args.nextValidStates.length - 1;
63
+
62
64
  get isValidStatusChange() {
63
65
  return (
64
66
  this.modelStatus && this.args.nextValidStates.includes(this.newStatus)
@@ -20,7 +20,7 @@
20
20
  class="uk-alert-danger uk-text-small uk-flex-1 uk-margin-remove-bottom"
21
21
  uk-alert
22
22
  >
23
- {{object-at 0 @errors}}
23
+ {{this.getErrorObject 0}}
24
24
  </div>
25
25
  {{else if (gt @errors.length 1)}}
26
26
  <button
@@ -31,14 +31,14 @@
31
31
  >
32
32
  <div class="uk-flex-inline uk-flex-middle">
33
33
  <div class="uk-text-small uk-margin-small-right">
34
- {{inc this.errorIndex}}
34
+ {{this.visualErrorIndex}}
35
35
  <span>
36
36
  /
37
37
  </span>
38
38
  {{@errors.length}}
39
39
  </div>
40
40
  <div>
41
- {{object-at this.errorIndex @errors}}
41
+ {{this.getErrorObject this.errorIndex}}
42
42
  </div>
43
43
  </div>
44
44
  </button>
@@ -5,6 +5,12 @@ import { tracked } from "@glimmer/tracking";
5
5
  export default class ModelFormSubmitErrorsComponent extends Component {
6
6
  @tracked errorIndex = 0;
7
7
 
8
+ getErrorObject = (index) => this.args.errors[index];
9
+
10
+ get visualErrorIndex() {
11
+ return this.errorIndex + 1;
12
+ }
13
+
8
14
  @action
9
15
  updateCurrentIndex() {
10
16
  if (this.args.errors.length) {
@@ -12,7 +12,7 @@
12
12
  @searchEnabled={{true}}
13
13
  @search={{perform this.search}}
14
14
  @selected={{@value}}
15
- @onChange={{queue (fn (mut this.dirty) true) @on-update}}
15
+ @onChange={{this.setDirtyAndUpdate}}
16
16
  @onFocus={{this.handleFocus}}
17
17
  @searchMessage={{t "ember-gwr.components.linkStreet.search"}}
18
18
  @noMatchesMessage={{t "ember-gwr.components.search.noResults"}}
@@ -22,11 +22,7 @@ export default class SearchStreetComponent extends ValidatedInput {
22
22
  `error.${this.args.options.validationPath}.validation`,
23
23
  );
24
24
 
25
- if (!Array.isArray(errors)) {
26
- return [errors];
27
- }
28
-
29
- return errors;
25
+ return errors ? [errors] : [];
30
26
  }
31
27
 
32
28
  get swissZipCode() {
@@ -70,6 +66,12 @@ export default class SearchStreetComponent extends ValidatedInput {
70
66
  }
71
67
  });
72
68
 
69
+ @action
70
+ setDirtyAndUpdate(value) {
71
+ this.dirty = true;
72
+ this.args["on-update"](value);
73
+ }
74
+
73
75
  @action
74
76
  handleFocus(select, e) {
75
77
  if (this.focusComesFromOutside(e)) {
@@ -33,6 +33,11 @@ export default class SearchProjectController extends Controller {
33
33
  }));
34
34
  }
35
35
 
36
+ @action
37
+ getEproidLinks(eproid) {
38
+ return this.links.filter((link) => link.eproid === eproid);
39
+ }
40
+
36
41
  @lastValue("fetchInstanceLinks") links;
37
42
  @dropTask
38
43
  *fetchInstanceLinks(projects) {
@@ -170,7 +170,7 @@
170
170
  locality=(changeset-get
171
171
  changeset "building.buildingEntrance.locality"
172
172
  )
173
- validationPath="street.description.descriptionLong"
173
+ validationPath="building.buildingEntrance.street.description.descriptionLong"
174
174
  }}
175
175
  @on-update={{fn this.syncLocalityWithStreet changeset}}
176
176
  @required={{true}}
@@ -296,7 +296,7 @@
296
296
  @attr="typeOfClient"
297
297
  @gwrEnumOptions={{this.choiceOptions.typeOfClientOptions}}
298
298
  />
299
- {{#if (compute this.isClientMismatch changeset)}}
299
+ {{#if (this.isClientMismatch changeset)}}
300
300
  <div class="uk-alert uk-alert-danger">
301
301
  {{t "ember-gwr.constructionProject.fields.typeOfClientAlert"}}
302
302
  </div>
@@ -165,7 +165,7 @@
165
165
  {{#if
166
166
  (and
167
167
  this.loadBuildingPreview.isRunning
168
- (call (fn this.isCurrentlySelectedBuilding data))
168
+ (this.isCurrentlySelectedBuilding data)
169
169
  )
170
170
  }}
171
171
  <UkSpinner />
@@ -98,7 +98,7 @@
98
98
  <TableRowColumn @attr="officialConstructionProjectFileNo" />
99
99
  <TableRowColumn @attr="constructionProjectDescription" />
100
100
  <TableRowColumn @attr="EPROID" as |value|>
101
- <InstanceLink @links={{filter-by "eproid" value this.links}} />
101
+ <InstanceLink @links={{this.getEproidLinks value}} />
102
102
  </TableRowColumn>
103
103
  <TableRowColumn @attr="projectStatus" as |value|>
104
104
  {{#if value}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-ebau-gwr",
3
- "version": "8.1.0",
3
+ "version": "8.1.1",
4
4
  "description": "Ember engine to integrate ebau-gwr into an ember app.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -37,7 +37,6 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@babel/core": "^7.26.7",
40
- "@ember/legacy-built-in-components": "^0.5.0",
41
40
  "@ember/render-modifiers": "^2.1.0",
42
41
  "@fortawesome/ember-fontawesome": "^2.0.0",
43
42
  "@fortawesome/free-regular-svg-icons": "^6.7.2",
@@ -50,7 +49,6 @@
50
49
  "ember-changeset-validations": "^4.1.1",
51
50
  "ember-cli-babel": "^8.2.0",
52
51
  "ember-cli-htmlbars": "^6.3.0",
53
- "ember-composable-helpers": "^5.0.0",
54
52
  "ember-concurrency": "^4.0.2",
55
53
  "ember-engines-router-service": "^0.6.0",
56
54
  "ember-flatpickr": "^8.0.1",
@@ -68,54 +66,56 @@
68
66
  "reactiveweb": "^1.3.0"
69
67
  },
70
68
  "devDependencies": {
71
- "@adfinis/eslint-config": "3.0.1",
72
- "@adfinis/semantic-release-config": "5.0.0",
69
+ "@adfinis/eslint-config": "3.0.2",
70
+ "@adfinis/semantic-release-config": "6.0.0",
73
71
  "@babel/eslint-parser": "7.26.5",
74
72
  "@babel/plugin-proposal-decorators": "7.25.9",
75
73
  "@ember-data/model": "5.3.9",
76
- "@ember/optional-features": "2.2.0",
77
- "@ember/test-helpers": "5.0.0",
74
+ "@ember/optional-features": "3.0.0",
75
+ "@ember/test-helpers": "5.4.2",
76
+ "@ember/test-waiters": "^3.1.0",
78
77
  "@embroider/test-setup": "4.0.0",
79
78
  "@fortawesome/fontawesome-svg-core": "6.7.2",
80
79
  "broccoli-asset-rev": "3.0.0",
81
80
  "concurrently": "9.1.2",
82
- "ember-cli": "6.1.0",
81
+ "ember-cli": "6.12.0",
83
82
  "ember-cli-clean-css": "3.0.0",
84
83
  "ember-cli-dependency-checker": "3.3.3",
85
84
  "ember-cli-inject-live-reload": "2.1.0",
86
- "ember-cli-mirage": "3.0.4",
87
85
  "ember-cli-sass": "11.0.1",
88
86
  "ember-cli-sri": "2.1.1",
89
87
  "ember-cli-terser": "4.0.2",
90
88
  "ember-data": "5.3.9",
91
89
  "ember-engines": "0.11.0",
90
+ "ember-inflector": "^6.0.0",
91
+ "ember-mirage": "^0.4.3",
92
92
  "ember-qunit": "9.0.1",
93
93
  "ember-source": "6.1.0",
94
94
  "ember-source-channel-url": "3.0.0",
95
- "ember-template-lint": "6.1.0",
95
+ "ember-template-lint": "7.9.3",
96
96
  "ember-template-lint-plugin-prettier": "5.0.0",
97
- "ember-test-selectors": "7.0.0",
97
+ "ember-test-selectors": "7.1.0",
98
98
  "ember-try": "3.0.0",
99
99
  "eslint": "9.19.0",
100
100
  "eslint-config-prettier": "10.0.1",
101
101
  "eslint-plugin-ember": "12.5.0",
102
- "eslint-plugin-import": "2.31.0",
102
+ "eslint-plugin-import": "2.32.0",
103
103
  "eslint-plugin-n": "17.15.1",
104
104
  "eslint-plugin-prettier": "5.2.3",
105
- "eslint-plugin-qunit": "8.1.2",
105
+ "eslint-plugin-qunit": "8.2.6",
106
106
  "loader.js": "4.7.0",
107
107
  "local-cors-proxy": "1.1.0",
108
108
  "miragejs": "0.1.48",
109
- "prettier": "3.4.2",
110
- "qunit": "2.24.1",
109
+ "prettier": "3.8.3",
110
+ "qunit": "2.25.0",
111
111
  "qunit-dom": "3.4.0",
112
112
  "sass": "1.83.4",
113
113
  "semantic-release": "24.2.1",
114
- "stylelint": "16.14.0",
114
+ "stylelint": "16.26.1",
115
115
  "stylelint-config-standard-scss": "14.0.0",
116
116
  "stylelint-prettier": "5.0.3",
117
117
  "stylelint-scss": "6.10.1",
118
- "uikit": "3.25.4",
118
+ "uikit": "3.25.16",
119
119
  "webpack": "5.98.0"
120
120
  },
121
121
  "engines": {