ember-ebau-gwr 4.0.1 → 4.0.2
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 +7 -0
- package/addon/components/model-form/date.hbs +27 -14
- package/addon/components/model-form/date.js +27 -7
- package/addon/modifiers/pikaday.js +2 -0
- package/addon/xml/helpers.js +3 -3
- package/package.json +14 -15
- package/translations/de.yaml +2 -0
- package/translations/fr.yaml +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [4.0.2](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v4.0.1...v4.0.2) (2022-02-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update ember-pikaday and remove moment and dayjs ([1acbffc](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/1acbffca9eff26f32fdad9df1856d8bf936edf7b))
|
|
7
|
+
|
|
1
8
|
## [4.0.1](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v4.0.0...v4.0.1) (2022-01-25)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -2,20 +2,33 @@
|
|
|
2
2
|
<div class="{{if @horizontal "uk-margin-left uk-flex-last"}}">
|
|
3
3
|
{{component @labelComponent}}
|
|
4
4
|
</div>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
+
i18n=this.pikadayTranslations
|
|
29
|
+
}}
|
|
30
|
+
/>
|
|
31
|
+
{{/if}}
|
|
19
32
|
</div>
|
|
20
33
|
{{component @hintComponent}}
|
|
21
34
|
{{component @errorComponent}}
|
|
@@ -1,13 +1,33 @@
|
|
|
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";
|
|
2
5
|
|
|
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
6
|
export default class ModelFormDateComponent extends Component {
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
@service intl;
|
|
8
|
+
|
|
9
|
+
get pikadayTranslations() {
|
|
10
|
+
const locale = this.intl.primaryLocale;
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
previousMonth: this.intl.t("ember-gwr.previousMonth"),
|
|
14
|
+
nextMonth: this.intl.t("ember-gwr.nextMonth"),
|
|
15
|
+
months: Info.months("long", { locale }),
|
|
16
|
+
weekdays: Info.weekdays("long", { locale }),
|
|
17
|
+
weekdaysShort: Info.weekdays("short", { locale }),
|
|
18
|
+
};
|
|
8
19
|
}
|
|
9
20
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
21
|
+
get yearRange() {
|
|
22
|
+
return [2000, new Date().getFullYear()];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@action
|
|
26
|
+
formatDate(value) {
|
|
27
|
+
return this.intl.formatDate(value, {
|
|
28
|
+
day: "2-digit",
|
|
29
|
+
month: "2-digit",
|
|
30
|
+
year: "numeric",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
13
33
|
}
|
package/addon/xml/helpers.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { get } from "@ember/object";
|
|
2
|
-
import
|
|
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
|
|
8
|
-
?
|
|
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.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Ember engine to integrate ebau-gwr into an ember app.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -31,32 +31,32 @@
|
|
|
31
31
|
"ember-engines": ">= 8"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ember/render-modifiers": "^2.0.
|
|
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
38
|
"ember-changeset": "^4.0.0-beta.2",
|
|
40
39
|
"ember-changeset-validations": "^4.0.0-beta.2",
|
|
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.
|
|
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": "^
|
|
46
|
+
"ember-pikaday": "^4.0.0",
|
|
48
47
|
"ember-power-select": "^5.0.3",
|
|
49
48
|
"ember-truth-helpers": "^3.0.0",
|
|
50
|
-
"ember-uikit": "^5.0.0
|
|
51
|
-
"ember-validated-form": "^5.
|
|
52
|
-
"handlebars": "^4.7.7"
|
|
49
|
+
"ember-uikit": "^5.0.0",
|
|
50
|
+
"ember-validated-form": "^5.2.0",
|
|
51
|
+
"handlebars": "^4.7.7",
|
|
52
|
+
"luxon": "^2.3.0"
|
|
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.
|
|
59
|
+
"@embroider/test-setup": "1.1.0",
|
|
60
60
|
"babel-eslint": "10.1.0",
|
|
61
61
|
"broccoli-asset-rev": "3.0.0",
|
|
62
62
|
"ember-cli": "3.28.5",
|
|
@@ -66,7 +66,7 @@
|
|
|
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.
|
|
69
|
+
"ember-data": "3.28.8",
|
|
70
70
|
"ember-disable-prototype-extensions": "1.1.3",
|
|
71
71
|
"ember-engines": "https://gitpkg.now.sh/anehx/ember-engines/packages/ember-engines?c08f7650ffc4b723e8ba1143d7498e58bc1e4b78",
|
|
72
72
|
"ember-export-application-global": "2.0.1",
|
|
@@ -94,17 +94,16 @@
|
|
|
94
94
|
"prettier": "2.5.1",
|
|
95
95
|
"qunit": "2.17.2",
|
|
96
96
|
"qunit-dom": "2.0.0",
|
|
97
|
-
"sass": "1.49.
|
|
98
|
-
"webpack": "5.
|
|
97
|
+
"sass": "1.49.7",
|
|
98
|
+
"webpack": "5.68.0"
|
|
99
99
|
},
|
|
100
100
|
"//": [
|
|
101
101
|
"TODO: remove @embroider/* resolutions when https://github.com/embroider-build/embroider/issues/1077 is resolved",
|
|
102
102
|
"TODO: remove ember-engines exotic dependency when https://github.com/ember-engines/ember-engines/pull/794 is released"
|
|
103
103
|
],
|
|
104
104
|
"resolutions": {
|
|
105
|
-
"@embroider/macros": "1.
|
|
106
|
-
"@embroider/
|
|
107
|
-
"@embroider/util": "1.0.0"
|
|
105
|
+
"@embroider/macros": "1.1.0",
|
|
106
|
+
"@embroider/util": "1.1.0"
|
|
108
107
|
},
|
|
109
108
|
"engines": {
|
|
110
109
|
"node": "12.* || 14.* || >= 16"
|
package/translations/de.yaml
CHANGED