@projectcaluma/ember-form 12.7.0 → 12.9.0
Sign up to get free protection for your applications and to get access to all the features.
- package/addon/components/cf-field/input/checkbox.js +2 -2
- package/addon/components/cf-field/input/date.hbs +1 -1
- package/addon/components/cf-field/input/date.js +5 -0
- package/addon/components/cf-field/input/radio.hbs +7 -1
- package/addon/components/cf-field/input/radio.js +11 -0
- package/app/styles/_flatpickr.scss +2 -0
- package/blueprints/@projectcaluma/ember-form/index.js +1 -0
- package/index.js +0 -12
- package/package.json +13 -11
- package/translations/de.yaml +1 -0
- package/translations/en.yaml +1 -0
- package/translations/fr.yaml +1 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
import { action } from "@ember/object";
|
2
2
|
import Component from "@glimmer/component";
|
3
|
-
import {
|
3
|
+
import { localCopy } from "tracked-toolbox";
|
4
4
|
|
5
5
|
/**
|
6
6
|
* Input component for the checkbox question type
|
@@ -9,7 +9,7 @@ import { tracked } from "@glimmer/tracking";
|
|
9
9
|
* @argument {Field} field The field for this input type
|
10
10
|
*/
|
11
11
|
export default class CfFieldInputCheckboxComponent extends Component {
|
12
|
-
@
|
12
|
+
@localCopy("args.field.value") selected;
|
13
13
|
|
14
14
|
/**
|
15
15
|
* Update the value of the field with the slugs of the currently checked
|
@@ -15,7 +15,7 @@
|
|
15
15
|
class="uk-input {{if @disabled 'uk-disabled'}}"
|
16
16
|
readonly={{@disabled}}
|
17
17
|
@disabled={{@disabled}}
|
18
|
-
@locale={{this.
|
18
|
+
@locale={{this.localeObject}}
|
19
19
|
@date={{or @field.answer.value null}}
|
20
20
|
@altFormat={{this.dateFormat}}
|
21
21
|
@altInput={{true}}
|
@@ -3,6 +3,7 @@ import { action } from "@ember/object";
|
|
3
3
|
import { inject as service } from "@ember/service";
|
4
4
|
import Component from "@glimmer/component";
|
5
5
|
import { tracked } from "@glimmer/tracking";
|
6
|
+
import lang from "flatpickr/dist/l10n";
|
6
7
|
import { DateTime } from "luxon";
|
7
8
|
|
8
9
|
export default class CfFieldInputDateComponent extends Component {
|
@@ -14,6 +15,10 @@ export default class CfFieldInputDateComponent extends Component {
|
|
14
15
|
return this.intl.primaryLocale.split("-")[0];
|
15
16
|
}
|
16
17
|
|
18
|
+
get localeObject() {
|
19
|
+
return lang[this.locale];
|
20
|
+
}
|
21
|
+
|
17
22
|
get config() {
|
18
23
|
return getOwner(this).resolveRegistration("config:environment");
|
19
24
|
}
|
package/index.js
CHANGED
@@ -2,16 +2,4 @@
|
|
2
2
|
|
3
3
|
module.exports = {
|
4
4
|
name: require("./package").name,
|
5
|
-
|
6
|
-
included(...args) {
|
7
|
-
const app = this._findHost(this);
|
8
|
-
|
9
|
-
app.options.flatpickr = {
|
10
|
-
locales: ["de", "fr"],
|
11
|
-
theme: "airbnb",
|
12
|
-
...(app.options.flatpickr ?? {}),
|
13
|
-
};
|
14
|
-
|
15
|
-
this._super.included.apply(this, args);
|
16
|
-
},
|
17
5
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@projectcaluma/ember-form",
|
3
|
-
"version": "12.
|
3
|
+
"version": "12.9.0",
|
4
4
|
"description": "Ember addon for rendering Caluma forms.",
|
5
5
|
"keywords": [
|
6
6
|
"ember-addon"
|
@@ -9,35 +9,37 @@
|
|
9
9
|
"homepage": "https://docs.caluma.io/ember-caluma",
|
10
10
|
"repository": "github:projectcaluma/ember-caluma",
|
11
11
|
"dependencies": {
|
12
|
-
"@babel/core": "^7.23.
|
12
|
+
"@babel/core": "^7.23.7",
|
13
13
|
"@ember/string": "^3.1.1",
|
14
|
-
"@embroider/macros": "^1.13.
|
14
|
+
"@embroider/macros": "^1.13.4",
|
15
15
|
"@embroider/util": "^1.12.1",
|
16
16
|
"@glimmer/component": "^1.1.2",
|
17
17
|
"@glimmer/tracking": "^1.1.2",
|
18
18
|
"ember-apollo-client": "~4.0.2",
|
19
|
-
"ember-auto-import": "^2.7.
|
19
|
+
"ember-auto-import": "^2.7.2",
|
20
20
|
"ember-autoresize-modifier": "^0.7.0",
|
21
21
|
"ember-cli-babel": "^8.2.0",
|
22
22
|
"ember-cli-htmlbars": "^6.3.0",
|
23
|
-
"ember-cli-showdown": "^
|
23
|
+
"ember-cli-showdown": "^8.0.0",
|
24
24
|
"ember-composable-helpers": "^5.0.0",
|
25
25
|
"ember-concurrency": "^3.1.1",
|
26
26
|
"ember-fetch": "^8.1.2",
|
27
|
-
"ember-flatpickr": "^
|
27
|
+
"ember-flatpickr": "^6.0.0",
|
28
28
|
"ember-in-viewport": "^4.1.0",
|
29
29
|
"ember-intl": "^6.4.0",
|
30
30
|
"ember-math-helpers": "^4.0.0",
|
31
31
|
"ember-power-select": "^7.2.0",
|
32
32
|
"ember-resources": "^6.4.2",
|
33
|
+
"ember-truth-helpers": "^4.0.3",
|
33
34
|
"ember-uikit": "^9.0.0",
|
34
35
|
"ember-validators": "^4.1.2",
|
36
|
+
"flatpickr": "^4.6.13",
|
35
37
|
"graphql": "^15.8.0",
|
36
38
|
"jexl": "^2.3.0",
|
37
39
|
"lodash.isequal": "^4.5.0",
|
38
40
|
"luxon": "^3.4.4",
|
39
41
|
"tracked-toolbox": "^2.0.0",
|
40
|
-
"@projectcaluma/ember-core": "^12.
|
42
|
+
"@projectcaluma/ember-core": "^12.9.0"
|
41
43
|
},
|
42
44
|
"devDependencies": {
|
43
45
|
"@ember/optional-features": "2.0.0",
|
@@ -56,7 +58,7 @@
|
|
56
58
|
"ember-load-initializers": "2.1.2",
|
57
59
|
"ember-qunit": "8.0.2",
|
58
60
|
"ember-resolver": "11.0.1",
|
59
|
-
"ember-source": "5.
|
61
|
+
"ember-source": "5.6.0",
|
60
62
|
"ember-source-channel-url": "3.0.0",
|
61
63
|
"ember-try": "3.0.0",
|
62
64
|
"loader.js": "4.7.0",
|
@@ -66,12 +68,12 @@
|
|
66
68
|
"uikit": "3.17.11",
|
67
69
|
"uuid": "9.0.1",
|
68
70
|
"webpack": "5.89.0",
|
69
|
-
"@projectcaluma/ember-
|
70
|
-
"@projectcaluma/ember-
|
71
|
+
"@projectcaluma/ember-testing": "12.9.0",
|
72
|
+
"@projectcaluma/ember-workflow": "12.9.0"
|
71
73
|
},
|
72
74
|
"peerDependencies": {
|
73
75
|
"ember-source": "^4.0.0",
|
74
|
-
"@projectcaluma/ember-workflow": "^12.
|
76
|
+
"@projectcaluma/ember-workflow": "^12.9.0"
|
75
77
|
},
|
76
78
|
"dependenciesMeta": {
|
77
79
|
"@projectcaluma/ember-core": {
|
package/translations/de.yaml
CHANGED
package/translations/en.yaml
CHANGED
package/translations/fr.yaml
CHANGED