@projectcaluma/ember-form 12.10.4 → 12.11.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.
@@ -21,14 +21,7 @@
|
|
21
21
|
@onClick={{fn this.download file.id}}
|
22
22
|
/>
|
23
23
|
{{/each}}
|
24
|
-
{{else if
|
25
|
-
(and
|
26
|
-
@field.answer.value
|
27
|
-
(eq
|
28
|
-
@field.question.raw.meta.widgetOverride "cf-field/input/number-separator"
|
29
|
-
)
|
30
|
-
)
|
31
|
-
}}
|
24
|
+
{{else if (and @field.answer.value @field.question.useNumberSeparatorWidget)}}
|
32
25
|
{{format-number @field.answer.value maximumFractionDigits=20}}
|
33
26
|
{{else}}
|
34
27
|
{{@field.answer.value}}
|
@@ -35,10 +35,16 @@ export default class GetWidgetHelper extends Helper {
|
|
35
35
|
|
36
36
|
compute(params, { default: defaultWidget = "cf-field/input" }) {
|
37
37
|
for (const obj of params) {
|
38
|
-
|
38
|
+
let widget = obj?.raw?.meta?.widgetOverride;
|
39
|
+
|
40
|
+
if (obj?.useNumberSeparatorWidget) {
|
41
|
+
widget = "cf-field/input/number-separator";
|
42
|
+
}
|
43
|
+
|
39
44
|
if (!widget) {
|
40
45
|
continue;
|
41
46
|
}
|
47
|
+
|
42
48
|
const override =
|
43
49
|
widget &&
|
44
50
|
this.calumaOptions
|
package/addon/lib/question.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { assert } from "@ember/debug";
|
2
|
+
import { inject as service } from "@ember/service";
|
2
3
|
import { camelize } from "@ember/string";
|
3
4
|
import { queryManager } from "ember-apollo-client";
|
4
5
|
import { trackedFunction } from "reactiveweb/function";
|
@@ -17,6 +18,8 @@ const getValue = (answer) => {
|
|
17
18
|
* @class Question
|
18
19
|
*/
|
19
20
|
export default class Question extends Base {
|
21
|
+
@service calumaOptions;
|
22
|
+
|
20
23
|
@queryManager apollo;
|
21
24
|
|
22
25
|
constructor({ raw, ...args }) {
|
@@ -174,4 +177,16 @@ export default class Question extends Base {
|
|
174
177
|
|
175
178
|
return value;
|
176
179
|
}
|
180
|
+
|
181
|
+
get useNumberSeparatorWidget() {
|
182
|
+
return (
|
183
|
+
this.raw.meta.widgetOverride === "cf-field/input/number-separator" ||
|
184
|
+
(this.calumaOptions.alwaysUseNumberSeparatorWidget &&
|
185
|
+
[
|
186
|
+
"IntegerQuestion",
|
187
|
+
"FloatQuestion",
|
188
|
+
"CalculatedFloatQuestion",
|
189
|
+
].includes(this.raw.__typename))
|
190
|
+
);
|
191
|
+
}
|
177
192
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@projectcaluma/ember-form",
|
3
|
-
"version": "12.
|
3
|
+
"version": "12.11.0",
|
4
4
|
"description": "Ember addon for rendering Caluma forms.",
|
5
5
|
"keywords": [
|
6
6
|
"ember-addon"
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"homepage": "https://docs.caluma.io/ember-caluma",
|
10
10
|
"repository": "github:projectcaluma/ember-caluma",
|
11
11
|
"dependencies": {
|
12
|
-
"@babel/core": "^7.24.
|
12
|
+
"@babel/core": "^7.24.3",
|
13
13
|
"@ember/string": "^3.1.1",
|
14
14
|
"@embroider/macros": "^1.15.0",
|
15
15
|
"@embroider/util": "^1.13.0",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"ember-cli-htmlbars": "^6.3.0",
|
23
23
|
"ember-cli-showdown": "^9.0.1",
|
24
24
|
"ember-composable-helpers": "^5.0.0",
|
25
|
-
"ember-concurrency": "^4.0.
|
25
|
+
"ember-concurrency": "^4.0.2",
|
26
26
|
"ember-fetch": "^8.1.2",
|
27
27
|
"ember-flatpickr": "^8.0.0",
|
28
28
|
"ember-in-viewport": "^4.1.0",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"ember-math-helpers": "^4.0.0",
|
31
31
|
"ember-power-select": "^7.2.0",
|
32
32
|
"ember-truth-helpers": "^4.0.3",
|
33
|
-
"ember-uikit": "^9.
|
33
|
+
"ember-uikit": "^9.1.1",
|
34
34
|
"ember-validators": "^4.1.2",
|
35
35
|
"flatpickr": "^4.6.13",
|
36
36
|
"graphql": "^15.8.0",
|
@@ -39,7 +39,7 @@
|
|
39
39
|
"luxon": "^3.4.4",
|
40
40
|
"reactiveweb": "^1.2.2",
|
41
41
|
"tracked-toolbox": "^2.0.0",
|
42
|
-
"@projectcaluma/ember-core": "^12.
|
42
|
+
"@projectcaluma/ember-core": "^12.11.0"
|
43
43
|
},
|
44
44
|
"devDependencies": {
|
45
45
|
"@ember/optional-features": "2.1.0",
|
@@ -67,13 +67,13 @@
|
|
67
67
|
"qunit-dom": "3.0.0",
|
68
68
|
"uikit": "3.19.2",
|
69
69
|
"uuid": "9.0.1",
|
70
|
-
"webpack": "5.
|
71
|
-
"@projectcaluma/ember-testing": "12.
|
72
|
-
"@projectcaluma/ember-workflow": "12.
|
70
|
+
"webpack": "5.91.0",
|
71
|
+
"@projectcaluma/ember-testing": "12.11.0",
|
72
|
+
"@projectcaluma/ember-workflow": "12.11.0"
|
73
73
|
},
|
74
74
|
"peerDependencies": {
|
75
75
|
"ember-source": "^4.0.0",
|
76
|
-
"@projectcaluma/ember-workflow": "^12.
|
76
|
+
"@projectcaluma/ember-workflow": "^12.11.0"
|
77
77
|
},
|
78
78
|
"dependenciesMeta": {
|
79
79
|
"@projectcaluma/ember-core": {
|