ember-ebau-gwr 4.0.1 → 4.0.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## [4.0.4](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v4.0.3...v4.0.4) (2022-03-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **import:** fix query-params-only transition on import all ([8b360a8](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/8b360a85530465af634499b88d25fa71b6821437))
7
+
8
+ ## [4.0.3](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v4.0.2...v4.0.3) (2022-02-16)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **date:** pikaday use monday as first day of week ([d5617b2](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/d5617b2c01b24905cbc3e2b62cd1269347339c75))
14
+
15
+ ## [4.0.2](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v4.0.1...v4.0.2) (2022-02-09)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **deps:** update ember-pikaday and remove moment and dayjs ([1acbffc](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/1acbffca9eff26f32fdad9df1856d8bf936edf7b))
21
+
1
22
  ## [4.0.1](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v4.0.0...v4.0.1) (2022-01-25)
2
23
 
3
24
 
@@ -2,20 +2,34 @@
2
2
  <div class="{{if @horizontal "uk-margin-left uk-flex-last"}}">
3
3
  {{component @labelComponent}}
4
4
  </div>
5
- <PikadayInput
6
- @format="DD.MM.YYYY"
7
- @placeholder={{t "ember-gwr.components.modelForm.datePlaceholder"}}
8
- @onSelection={{@update}}
9
- @value={{this.value}}
10
- @disabled={{@disabled}}
11
- @yearRange={{"2000,currentYear"}}
12
- class="uk-width-1 uk-input
13
- {{if @isInvalid "uk-form-danger"}}
14
- {{if @isValid "uk-form-success"}}"
15
- name={{@name}}
16
- required={{@required}}
17
- ...attributes
18
- />
5
+ {{#if @disabled}}
6
+ <input
7
+ type="text"
8
+ class="uk-input uk-width-1 {{if @isInvalid "uk-form-danger"}} {{if @isValid "uk-form-success"}}"
9
+ name={{@name}}
10
+ value={{format-date @value day="2-digit" month="2-digit" year="numeric"}}
11
+ placeholder={{t "ember-gwr.components.modelForm.datePlaceholder"}}
12
+ disabled
13
+ ...attributes
14
+ >
15
+ {{else}}
16
+ <input
17
+ type="text"
18
+ class="uk-input uk-width-1 {{if @isInvalid "uk-form-danger"}} {{if @isValid "uk-form-success"}}"
19
+ name={{@name}}
20
+ required={{@required}}
21
+ placeholder={{t "ember-gwr.components.modelForm.datePlaceholder"}}
22
+ ...attributes
23
+ {{pikaday
24
+ value=@value
25
+ yearRange=this.yearRange
26
+ onSelect=@update
27
+ toString=this.formatDate
28
+ firstDay=1
29
+ i18n=this.pikadayTranslations
30
+ }}
31
+ />
32
+ {{/if}}
19
33
  </div>
20
34
  {{component @hintComponent}}
21
35
  {{component @errorComponent}}
@@ -1,13 +1,36 @@
1
+ import { action } from "@ember/object";
2
+ import { inject as service } from "@ember/service";
1
3
  import Component from "@glimmer/component";
4
+ import { Info } from "luxon";
5
+
6
+ // put the last element to the front of the array
7
+ const shift = (array) => [...array.slice(-1), ...array.slice(0, -1)];
2
8
 
3
- // TODO: remove file once two-way binding issue of value is resolved in ember-pikaday
4
- // https://github.com/adopted-ember-addons/ember-pikaday/issues/212
5
9
  export default class ModelFormDateComponent extends Component {
6
- get value() {
7
- return this.args.value;
10
+ @service intl;
11
+
12
+ get pikadayTranslations() {
13
+ const locale = this.intl.primaryLocale;
14
+
15
+ return {
16
+ previousMonth: this.intl.t("ember-gwr.previousMonth"),
17
+ nextMonth: this.intl.t("ember-gwr.nextMonth"),
18
+ months: Info.months("long", { locale }),
19
+ weekdays: shift(Info.weekdays("long", { locale })),
20
+ weekdaysShort: shift(Info.weekdays("short", { locale })),
21
+ };
8
22
  }
9
23
 
10
- // prevent pikaday two-way binding from
11
- // updating "value" field on input
12
- set value(value) {}
24
+ get yearRange() {
25
+ return [2000, new Date().getFullYear()];
26
+ }
27
+
28
+ @action
29
+ formatDate(value) {
30
+ return this.intl.formatDate(value, {
31
+ day: "2-digit",
32
+ month: "2-digit",
33
+ year: "numeric",
34
+ });
35
+ }
13
36
  }
@@ -5,8 +5,8 @@
5
5
  uk-close
6
6
  {{on "click" @closeStatus}}
7
7
  ></button>
8
- <div class="uk-flex uk-flex-between uk-flex-middle">
9
- <div>
8
+ <div class="uk-flex uk-flex-between uk-flex-middle uk-child-width-1-2">
9
+ <div class="uk-margin-right">
10
10
  <div class="uk-text-bold">
11
11
  {{t "ember-gwr.components.header.statusSelector.statusLabel"}}
12
12
  </div>
@@ -38,8 +38,8 @@
38
38
  {{/if}}
39
39
  </small>
40
40
  </div>
41
- <div class="uk-flex-inline uk-flex-middle">
42
- <div class="uk-margin-small-right" uk-icon="icon: question"></div>
41
+ <div class="uk-flex-inline uk-flex-middle uk-flex-right">
42
+ <div class="uk-margin-small-right uk-flex-none" uk-icon="icon: question"></div>
43
43
  <div
44
44
  class="uk-width-large"
45
45
  uk-dropdown="mode: hover; pos: bottom-left; delay-show: 500; offset: 20"
@@ -28,7 +28,7 @@ export default class ModelFormComponent extends Component {
28
28
  this.notification.success(
29
29
  this.intl.t("ember-gwr.components.modelForm.diff.resolved")
30
30
  );
31
- this.router.transitionTo({
31
+ this.router.externalRouter.transitionTo({
32
32
  queryParams: { import: false, index: undefined },
33
33
  });
34
34
  }
@@ -0,0 +1,2 @@
1
+ import "ember-pikaday/pikaday.css";
2
+ export { default } from "ember-pikaday/modifiers/pikaday";
@@ -1,11 +1,11 @@
1
1
  import { get } from "@ember/object";
2
- import dayjs from "dayjs";
2
+ import { DateTime } from "luxon";
3
3
 
4
4
  // All functions in this file will be registered to handlebars as helpers.
5
5
 
6
6
  export function echDate(date) {
7
- return typeof date === "object" && date !== null
8
- ? dayjs(date).format("YYYY-MM-DD")
7
+ return date instanceof Date && date !== null
8
+ ? DateTime.fromJSDate(date).toISODate()
9
9
  : date;
10
10
  }
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-ebau-gwr",
3
- "version": "4.0.1",
3
+ "version": "4.0.4",
4
4
  "description": "Ember engine to integrate ebau-gwr into an ember app.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -31,44 +31,44 @@
31
31
  "ember-engines": ">= 8"
32
32
  },
33
33
  "dependencies": {
34
- "@ember/render-modifiers": "^2.0.3",
34
+ "@ember/render-modifiers": "^2.0.4",
35
35
  "@glimmer/component": "^1.0.4",
36
36
  "@glimmer/tracking": "^1.0.4",
37
- "dayjs": "^1.10.7",
38
37
  "ember-auto-import": "^2.4.0",
39
- "ember-changeset": "^4.0.0-beta.2",
40
- "ember-changeset-validations": "^4.0.0-beta.2",
38
+ "ember-changeset": "^4.0.0",
39
+ "ember-changeset-validations": "^4.0.0",
41
40
  "ember-cli-babel": "^7.26.11",
42
41
  "ember-cli-htmlbars": "^6.0.1",
43
42
  "ember-composable-helpers": "^5.0.0",
44
- "ember-concurrency": "^2.2.0",
43
+ "ember-concurrency": "^2.2.1",
45
44
  "ember-engines-router-service": "^0.3.0",
46
45
  "ember-intl": "^5.7.2",
47
- "ember-pikaday": "^3.0.0",
48
- "ember-power-select": "^5.0.3",
46
+ "ember-pikaday": "^4.0.0",
47
+ "ember-power-select": "^5.0.4",
49
48
  "ember-truth-helpers": "^3.0.0",
50
- "ember-uikit": "^5.0.0-beta.7",
51
- "ember-validated-form": "^5.1.1",
52
- "handlebars": "^4.7.7"
49
+ "ember-uikit": "^5.1.0",
50
+ "ember-validated-form": "^5.3.0",
51
+ "handlebars": "^4.7.7",
52
+ "luxon": "^2.3.1"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@adfinis-sygroup/eslint-config": "1.5.0",
56
56
  "@adfinis-sygroup/semantic-release-config": "3.4.0",
57
57
  "@ember/optional-features": "2.0.0",
58
58
  "@ember/test-helpers": "2.6.0",
59
- "@embroider/test-setup": "1.0.0",
59
+ "@embroider/test-setup": "1.5.0",
60
60
  "babel-eslint": "10.1.0",
61
61
  "broccoli-asset-rev": "3.0.0",
62
62
  "ember-cli": "3.28.5",
63
63
  "ember-cli-dependency-checker": "3.2.0",
64
64
  "ember-cli-inject-live-reload": "2.1.0",
65
- "ember-cli-mirage": "2.4.0",
65
+ "ember-cli-mirage": "3.0.0-alpha.2",
66
66
  "ember-cli-sass": "10.0.1",
67
67
  "ember-cli-sri": "2.1.1",
68
68
  "ember-cli-terser": "4.0.2",
69
- "ember-data": "3.28.7",
69
+ "ember-data": "3.28.8",
70
70
  "ember-disable-prototype-extensions": "1.1.3",
71
- "ember-engines": "https://gitpkg.now.sh/anehx/ember-engines/packages/ember-engines?c08f7650ffc4b723e8ba1143d7498e58bc1e4b78",
71
+ "ember-engines": "https://gitpkg.now.sh/ember-engines/ember-engines/packages/ember-engines?4d8a7607ed690053f6e8ab4f35f9dfa543a3697f",
72
72
  "ember-export-application-global": "2.0.1",
73
73
  "ember-load-initializers": "2.1.2",
74
74
  "ember-maybe-import-regenerator": "^1.0.0",
@@ -76,13 +76,13 @@
76
76
  "ember-resolver": "8.0.3",
77
77
  "ember-source": "3.28.8",
78
78
  "ember-source-channel-url": "3.0.0",
79
- "ember-template-lint": "4.0.0",
79
+ "ember-template-lint": "4.3.0",
80
80
  "ember-template-lint-plugin-prettier": "4.0.0",
81
81
  "ember-test-selectors": "6.0.0",
82
82
  "ember-try": "2.0.0",
83
83
  "eslint": "7.32.0",
84
- "eslint-config-prettier": "8.3.0",
85
- "eslint-plugin-ember": "10.5.8",
84
+ "eslint-config-prettier": "8.5.0",
85
+ "eslint-plugin-ember": "10.5.9",
86
86
  "eslint-plugin-import": "2.25.4",
87
87
  "eslint-plugin-node": "11.1.0",
88
88
  "eslint-plugin-prettier": "4.0.0",
@@ -91,21 +91,15 @@
91
91
  "local-cors-proxy": "1.1.0",
92
92
  "miragejs": "0.1.43",
93
93
  "npm-run-all": "4.1.5",
94
- "prettier": "2.5.1",
95
- "qunit": "2.17.2",
94
+ "prettier": "2.6.0",
95
+ "qunit": "2.18.0",
96
96
  "qunit-dom": "2.0.0",
97
- "sass": "1.49.0",
98
- "webpack": "5.67.0"
97
+ "sass": "1.49.9",
98
+ "webpack": "5.70.0"
99
99
  },
100
100
  "//": [
101
- "TODO: remove @embroider/* resolutions when https://github.com/embroider-build/embroider/issues/1077 is resolved",
102
101
  "TODO: remove ember-engines exotic dependency when https://github.com/ember-engines/ember-engines/pull/794 is released"
103
102
  ],
104
- "resolutions": {
105
- "@embroider/macros": "1.0.0",
106
- "@embroider/core": "1.0.0",
107
- "@embroider/util": "1.0.0"
108
- },
109
103
  "engines": {
110
104
  "node": "12.* || 14.* || >= 16"
111
105
  },
@@ -1,5 +1,7 @@
1
1
  ember-gwr:
2
2
  close: "Schliessen"
3
+ previousMonth: "Vorheriger Monat"
4
+ nextMonth: "Nächster Monat"
3
5
 
4
6
  models:
5
7
  building: |-
@@ -1,5 +1,7 @@
1
1
  ember-gwr:
2
2
  close: "Fermer"
3
+ previousMonth: "Mois précédent"
4
+ nextMonth: "Mois suivant"
3
5
 
4
6
  models:
5
7
  building: |-