@projectcaluma/ember-form-builder 12.13.0 → 12.14.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.
|
@@ -501,6 +501,30 @@ export default class CfbFormEditorQuestion extends Component {
|
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
+
@action
|
|
505
|
+
updateType(value, changeset) {
|
|
506
|
+
changeset.set("__typename", value);
|
|
507
|
+
|
|
508
|
+
const defaultWidget = "cf-field/input/number-separator";
|
|
509
|
+
const currentWidget = changeset.get("meta.widgetOverride");
|
|
510
|
+
const isViableType = [
|
|
511
|
+
"IntegerQuestion",
|
|
512
|
+
"FloatQuestion",
|
|
513
|
+
"CalculatedFloatQuestion",
|
|
514
|
+
].includes(value);
|
|
515
|
+
|
|
516
|
+
if (this.calumaOptions.useNumberSeparatorWidgetAsDefault) {
|
|
517
|
+
if (isViableType && !currentWidget) {
|
|
518
|
+
// Set the default widget as override if the question type is viable for
|
|
519
|
+
// it and there is no widget selected yet
|
|
520
|
+
changeset.set("meta.widgetOverride", defaultWidget);
|
|
521
|
+
} else if (!isViableType && currentWidget === defaultWidget) {
|
|
522
|
+
// Remove default widget for non viable question types
|
|
523
|
+
changeset.set("meta.widgetOverride", undefined);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
504
528
|
@action
|
|
505
529
|
updateSubForm(value, changeset) {
|
|
506
530
|
changeset.set("subForm.slug", value.slug);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projectcaluma/ember-form-builder",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.14.0",
|
|
4
4
|
"description": "Ember engine for building Caluma forms.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"highlightjs-jexl": "^0.0.5",
|
|
43
43
|
"jexl": "^2.3.0",
|
|
44
44
|
"lodash.isequal": "^4.5.0",
|
|
45
|
-
"reactiveweb": "^1.2.
|
|
45
|
+
"reactiveweb": "^1.2.3",
|
|
46
46
|
"uikit": "^3.19.2",
|
|
47
|
-
"@projectcaluma/ember-core": "^12.
|
|
48
|
-
"@projectcaluma/ember-form": "^12.
|
|
47
|
+
"@projectcaluma/ember-core": "^12.14.0",
|
|
48
|
+
"@projectcaluma/ember-form": "^12.14.0"
|
|
49
49
|
},
|
|
50
50
|
"//": [
|
|
51
51
|
"TODO: remove obsolete dependency to `ember-data` which is only necessary",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@ember/optional-features": "2.1.0",
|
|
58
58
|
"@ember/test-helpers": "3.3.0",
|
|
59
|
-
"@embroider/test-setup": "
|
|
59
|
+
"@embroider/test-setup": "4.0.0",
|
|
60
60
|
"@faker-js/faker": "8.4.1",
|
|
61
61
|
"broccoli-asset-rev": "3.0.0",
|
|
62
62
|
"ember-autoresize-modifier": "0.7.0",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"loader.js": "4.7.0",
|
|
80
80
|
"miragejs": "0.1.48",
|
|
81
81
|
"qunit": "2.20.1",
|
|
82
|
-
"qunit-dom": "3.
|
|
82
|
+
"qunit-dom": "3.1.2",
|
|
83
83
|
"webpack": "5.91.0",
|
|
84
|
-
"@projectcaluma/ember-testing": "12.
|
|
84
|
+
"@projectcaluma/ember-testing": "12.14.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"ember-engines": "^0.9.0",
|