ember-ebau-gwr 6.0.4 → 6.1.0
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,10 @@
|
|
|
1
|
+
# [6.1.0](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v6.0.4...v6.1.0) (2022-10-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **date:** use flatpickr instead of deprecated pikaday ([705a879](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/705a8799cde6ab6062ebe05a8e25eed1c9e1f7a5))
|
|
7
|
+
|
|
1
8
|
## [6.0.4](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v6.0.3...v6.0.4) (2022-10-10)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -22,11 +22,10 @@
|
|
|
22
22
|
type="button"
|
|
23
23
|
class="uk-form-icon uk-form-icon-flip"
|
|
24
24
|
uk-icon="icon: close; ratio: 0.7"
|
|
25
|
-
{{on "click"
|
|
25
|
+
{{on "click" (fn @update null)}}
|
|
26
26
|
/>
|
|
27
27
|
{{/if}}
|
|
28
|
-
<
|
|
29
|
-
type="text"
|
|
28
|
+
<EmberFlatpickr
|
|
30
29
|
class="uk-input uk-width-1
|
|
31
30
|
{{if @isInvalid 'uk-form-danger'}}
|
|
32
31
|
{{if @isValid 'uk-form-success'}}"
|
|
@@ -34,14 +33,14 @@
|
|
|
34
33
|
required={{@required}}
|
|
35
34
|
placeholder={{t "ember-gwr.components.modelForm.datePlaceholder"}}
|
|
36
35
|
...attributes
|
|
37
|
-
{{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}}
|
|
36
|
+
@date={{or @value null}}
|
|
37
|
+
@minDate={{this.minDate}}
|
|
38
|
+
@maxDate={{this.maxDate}}
|
|
39
|
+
@allowInput={{true}}
|
|
40
|
+
@altInput={{true}}
|
|
41
|
+
@altFormat="d.m.Y"
|
|
42
|
+
@dateFormat="Y-m-d"
|
|
43
|
+
@onChange={{this.onChange}}
|
|
45
44
|
/>
|
|
46
45
|
</div>
|
|
47
46
|
{{/if}}
|
|
@@ -1,42 +1,33 @@
|
|
|
1
1
|
import { action } from "@ember/object";
|
|
2
2
|
import { inject as service } from "@ember/service";
|
|
3
3
|
import Component from "@glimmer/component";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
// put the last element to the front of the array
|
|
7
|
-
const shift = (array) => [...array.slice(-1), ...array.slice(0, -1)];
|
|
4
|
+
import { DateTime } from "luxon";
|
|
8
5
|
|
|
9
6
|
export default class ModelFormDateComponent extends Component {
|
|
10
7
|
@service intl;
|
|
11
8
|
|
|
12
|
-
get
|
|
13
|
-
|
|
9
|
+
get locale() {
|
|
10
|
+
return this.intl.primaryLocale.split("-")[0];
|
|
11
|
+
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
};
|
|
13
|
+
get minDate() {
|
|
14
|
+
return new Date(2000, 0, 1);
|
|
22
15
|
}
|
|
23
16
|
|
|
24
|
-
get
|
|
25
|
-
return
|
|
17
|
+
get maxDate() {
|
|
18
|
+
return DateTime.now().endOf("year").toJSDate();
|
|
26
19
|
}
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return this.intl.formatDate(value, {
|
|
31
|
-
day: "2-digit",
|
|
32
|
-
month: "2-digit",
|
|
33
|
-
year: "numeric",
|
|
34
|
-
});
|
|
21
|
+
get yearRange() {
|
|
22
|
+
return [2000, new Date().getFullYear()];
|
|
35
23
|
}
|
|
36
24
|
|
|
37
25
|
@action
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
onChange(dates) {
|
|
27
|
+
if (!dates.length) {
|
|
28
|
+
this.args.update(null);
|
|
29
|
+
} else {
|
|
30
|
+
this.args.update(DateTime.fromJSDate(dates[0]).toISODate());
|
|
31
|
+
}
|
|
41
32
|
}
|
|
42
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-ebau-gwr",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Ember engine to integrate ebau-gwr into an ember app.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"test:ember-compatibility": "ember try:each"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"ember-engines": ">= 8"
|
|
31
|
+
"ember-engines": ">= 0.8"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ember/render-modifiers": "^2.0.4",
|
|
@@ -37,23 +37,24 @@
|
|
|
37
37
|
"@fortawesome/free-solid-svg-icons": "^6.2.0",
|
|
38
38
|
"@glimmer/component": "^1.1.2",
|
|
39
39
|
"@glimmer/tracking": "^1.1.2",
|
|
40
|
-
"ember-auto-import": "^2.4.
|
|
41
|
-
"ember-changeset": "^4.1.
|
|
40
|
+
"ember-auto-import": "^2.4.3",
|
|
41
|
+
"ember-changeset": "^4.1.2",
|
|
42
42
|
"ember-changeset-validations": "^4.1.0",
|
|
43
43
|
"ember-cli-babel": "^7.26.11",
|
|
44
44
|
"ember-cli-htmlbars": "^6.1.1",
|
|
45
45
|
"ember-composable-helpers": "^5.0.0",
|
|
46
46
|
"ember-concurrency": "^2.3.7",
|
|
47
|
+
"ember-data": "^3.28.12",
|
|
47
48
|
"ember-engines-router-service": "0.3.0",
|
|
49
|
+
"ember-flatpickr": "^3.2.3",
|
|
48
50
|
"ember-intl": "^5.7.2",
|
|
49
|
-
"ember-pikaday": "^4.0.0",
|
|
50
51
|
"ember-power-select": "^6.0.1",
|
|
51
|
-
"ember-resources": "^5.
|
|
52
|
+
"ember-resources": "^5.5.0",
|
|
52
53
|
"ember-truth-helpers": "^3.1.1",
|
|
53
54
|
"ember-uikit": "^6.1.0",
|
|
54
|
-
"ember-validated-form": "^6.1.
|
|
55
|
+
"ember-validated-form": "^6.1.2",
|
|
55
56
|
"handlebars": "^4.7.7",
|
|
56
|
-
"luxon": "^3.0.
|
|
57
|
+
"luxon": "^3.0.4"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@adfinis-sygroup/eslint-config": "1.5.0",
|
|
@@ -63,30 +64,29 @@
|
|
|
63
64
|
"@embroider/test-setup": "1.8.3",
|
|
64
65
|
"babel-eslint": "10.1.0",
|
|
65
66
|
"broccoli-asset-rev": "3.0.0",
|
|
66
|
-
"ember-cli": "3.28.
|
|
67
|
+
"ember-cli": "3.28.6",
|
|
67
68
|
"ember-cli-dependency-checker": "3.3.1",
|
|
68
69
|
"ember-cli-inject-live-reload": "2.1.0",
|
|
69
70
|
"ember-cli-mirage": "3.0.0-alpha.3",
|
|
70
71
|
"ember-cli-sass": "11.0.1",
|
|
71
72
|
"ember-cli-sri": "2.1.1",
|
|
72
73
|
"ember-cli-terser": "4.0.2",
|
|
73
|
-
"ember-data": "3.28.12",
|
|
74
74
|
"ember-disable-prototype-extensions": "1.1.3",
|
|
75
|
-
"ember-engines": "
|
|
75
|
+
"ember-engines": "0.8.23",
|
|
76
76
|
"ember-export-application-global": "2.0.1",
|
|
77
77
|
"ember-load-initializers": "2.1.2",
|
|
78
78
|
"ember-maybe-import-regenerator": "^1.0.0",
|
|
79
|
-
"ember-qunit": "
|
|
79
|
+
"ember-qunit": "6.0.0",
|
|
80
80
|
"ember-resolver": "8.0.3",
|
|
81
81
|
"ember-source": "3.28.9",
|
|
82
82
|
"ember-source-channel-url": "3.0.0",
|
|
83
|
-
"ember-template-lint": "4.
|
|
83
|
+
"ember-template-lint": "4.16.1",
|
|
84
84
|
"ember-template-lint-plugin-prettier": "4.0.0",
|
|
85
85
|
"ember-test-selectors": "6.0.0",
|
|
86
86
|
"ember-try": "2.0.0",
|
|
87
87
|
"eslint": "7.32.0",
|
|
88
88
|
"eslint-config-prettier": "8.5.0",
|
|
89
|
-
"eslint-plugin-ember": "11.0
|
|
89
|
+
"eslint-plugin-ember": "11.2.0",
|
|
90
90
|
"eslint-plugin-import": "2.26.0",
|
|
91
91
|
"eslint-plugin-node": "11.1.0",
|
|
92
92
|
"eslint-plugin-prettier": "4.2.1",
|
|
@@ -96,14 +96,11 @@
|
|
|
96
96
|
"miragejs": "0.1.45",
|
|
97
97
|
"npm-run-all": "4.1.5",
|
|
98
98
|
"prettier": "2.7.1",
|
|
99
|
-
"qunit": "2.19.
|
|
99
|
+
"qunit": "2.19.3",
|
|
100
100
|
"qunit-dom": "2.0.0",
|
|
101
|
-
"sass": "1.
|
|
101
|
+
"sass": "1.55.0",
|
|
102
102
|
"webpack": "5.74.0"
|
|
103
103
|
},
|
|
104
|
-
"//": [
|
|
105
|
-
"TODO: remove ember-engines exotic dependency when https://github.com/ember-engines/ember-engines/pull/794 is released"
|
|
106
|
-
],
|
|
107
104
|
"engines": {
|
|
108
105
|
"node": "12.* || 14.* || >= 16"
|
|
109
106
|
},
|
|
@@ -114,10 +111,6 @@
|
|
|
114
111
|
"configPath": "tests/dummy/config"
|
|
115
112
|
},
|
|
116
113
|
"release": {
|
|
117
|
-
"extends": "@adfinis-sygroup/semantic-release-config"
|
|
118
|
-
"branches": [
|
|
119
|
-
"main",
|
|
120
|
-
"cherry-release"
|
|
121
|
-
]
|
|
114
|
+
"extends": "@adfinis-sygroup/semantic-release-config"
|
|
122
115
|
}
|
|
123
116
|
}
|