@projectcaluma/ember-form-builder 14.3.2 → 14.4.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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { action } from "@ember/object";
|
|
2
|
+
import { underscore } from "@ember/string";
|
|
2
3
|
import Component from "@glimmer/component";
|
|
3
4
|
import { queryManager } from "ember-apollo-client";
|
|
4
5
|
import { dropTask } from "ember-concurrency";
|
|
@@ -9,8 +10,22 @@ import allFormatValidatorsQuery from "@projectcaluma/ember-form-builder/gql/quer
|
|
|
9
10
|
export default class CfbFormEditorQuestionValidation extends Component {
|
|
10
11
|
@queryManager apollo;
|
|
11
12
|
|
|
13
|
+
get simpleQuestionType() {
|
|
14
|
+
return underscore(this.args.questionType.replace(/Question$/, ""));
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
get validators() {
|
|
13
|
-
return
|
|
18
|
+
return (
|
|
19
|
+
this._validators.value
|
|
20
|
+
?.map((edge) => edge.node)
|
|
21
|
+
.filter((node) => {
|
|
22
|
+
const allowed = node.allowedQuestionTypes;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
allowed.length === 0 || allowed.includes(this.simpleQuestionType)
|
|
26
|
+
);
|
|
27
|
+
}) ?? []
|
|
28
|
+
);
|
|
14
29
|
}
|
|
15
30
|
|
|
16
31
|
get selected() {
|
|
@@ -161,13 +161,24 @@
|
|
|
161
161
|
@name="maxLength"
|
|
162
162
|
@label={{t "caluma.form-builder.question.max-length"}}
|
|
163
163
|
/>
|
|
164
|
+
{{/if}}
|
|
164
165
|
|
|
166
|
+
{{#if
|
|
167
|
+
(not
|
|
168
|
+
(has-question-type
|
|
169
|
+
f.model "action-button" "calculated-float" "static" "form"
|
|
170
|
+
)
|
|
171
|
+
)
|
|
172
|
+
}}
|
|
165
173
|
<f.input
|
|
166
174
|
@name="formatValidators"
|
|
167
175
|
@label={{t "caluma.form-builder.question.formatValidators"}}
|
|
168
176
|
@placeholder={{t "caluma.form-builder.question.no-selection"}}
|
|
169
177
|
@required={{false}}
|
|
170
|
-
@renderComponent={{component
|
|
178
|
+
@renderComponent={{component
|
|
179
|
+
"cfb-form-editor/question/validation"
|
|
180
|
+
questionType=f.model.__typename
|
|
181
|
+
}}
|
|
171
182
|
@on-update={{changeset-set f.model "formatValidators"}}
|
|
172
183
|
@value={{changeset-get f.model "formatValidators"}}
|
|
173
184
|
/>
|
|
@@ -307,6 +318,8 @@
|
|
|
307
318
|
"caluma.form-builder.question.search-empty"
|
|
308
319
|
}}
|
|
309
320
|
@renderInPlace={{true}}
|
|
321
|
+
@dropdownClass="select-row-form-dropdown"
|
|
322
|
+
data-test-select-row-form
|
|
310
323
|
as |form|
|
|
311
324
|
>
|
|
312
325
|
<span
|
|
@@ -359,6 +372,8 @@
|
|
|
359
372
|
}}
|
|
360
373
|
@noMatchesMessage={{t "caluma.form-builder.question.search-empty"}}
|
|
361
374
|
@renderInPlace={{true}}
|
|
375
|
+
@dropdownClass="select-sub-form-dropdown"
|
|
376
|
+
data-test-select-sub-form
|
|
362
377
|
as |form|
|
|
363
378
|
>
|
|
364
379
|
<span class="uk-width-auto uk-margin-small-right uk-text-truncate">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projectcaluma/ember-form-builder",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.4.0",
|
|
4
4
|
"description": "Ember engine for building Caluma forms.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@babel/core": "^7.26.0",
|
|
14
14
|
"@ember/legacy-built-in-components": "^0.5.0",
|
|
15
|
-
"@ember/render-modifiers": "^2.1.0",
|
|
15
|
+
"@ember/render-modifiers": "^2.1.0 || ^3.0.0",
|
|
16
16
|
"@ember/string": "^3.1.1 || ^4.0.0",
|
|
17
17
|
"@embroider/macros": "^1.16.10",
|
|
18
18
|
"@glimmer/component": "^1.1.2",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"ember-flatpickr": "^8.0.1",
|
|
33
33
|
"ember-intl": "^7.1.1",
|
|
34
34
|
"ember-load-initializers": "^2.1.2 || ^3.0.1",
|
|
35
|
-
"ember-math-helpers": "^4.2.1",
|
|
35
|
+
"ember-math-helpers": "^4.2.1 || ^5.0.0",
|
|
36
36
|
"ember-power-select": "^8.6.2",
|
|
37
37
|
"ember-resolver": "^12.0.1 || ^13.1.0",
|
|
38
38
|
"ember-template-imports": "^4.2.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"lodash.isequal": "^4.5.0",
|
|
49
49
|
"reactiveweb": "^1.3.0",
|
|
50
50
|
"uikit": "^3.22.0",
|
|
51
|
-
"@projectcaluma/ember-core": "^14.
|
|
52
|
-
"@projectcaluma/ember-form": "^14.
|
|
51
|
+
"@projectcaluma/ember-core": "^14.4.0",
|
|
52
|
+
"@projectcaluma/ember-form": "^14.4.0"
|
|
53
53
|
},
|
|
54
54
|
"//": [
|
|
55
55
|
"TODO: remove obsolete dependency to `ember-data` which is only necessary",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@ember/optional-features": "2.2.0",
|
|
62
62
|
"@ember/test-helpers": "4.0.4",
|
|
63
63
|
"@embroider/test-setup": "4.0.0",
|
|
64
|
-
"@faker-js/faker": "
|
|
64
|
+
"@faker-js/faker": "10.0.0",
|
|
65
65
|
"broccoli-asset-rev": "3.0.0",
|
|
66
|
-
"ember-autoresize-modifier": "0.
|
|
66
|
+
"ember-autoresize-modifier": "0.8.0",
|
|
67
67
|
"ember-cli": "6.1.0",
|
|
68
68
|
"ember-cli-clean-css": "3.0.0",
|
|
69
69
|
"ember-cli-code-coverage": "3.1.0",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"ember-cli-mirage": "3.0.4",
|
|
73
73
|
"ember-cli-sri": "2.1.1",
|
|
74
74
|
"ember-cli-terser": "4.0.2",
|
|
75
|
-
"ember-data": "5.
|
|
75
|
+
"ember-data": "5.7.0",
|
|
76
76
|
"ember-engines": "0.12.0",
|
|
77
|
-
"ember-qunit": "9.0.
|
|
77
|
+
"ember-qunit": "9.0.3",
|
|
78
78
|
"ember-sinon-qunit": "7.5.0",
|
|
79
79
|
"ember-source": "6.1.0",
|
|
80
80
|
"ember-source-channel-url": "3.0.0",
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
"loader.js": "4.7.0",
|
|
83
83
|
"miragejs": "0.1.48",
|
|
84
84
|
"qunit": "2.24.1",
|
|
85
|
-
"qunit-dom": "3.
|
|
86
|
-
"sinon": "
|
|
87
|
-
"webpack": "5.
|
|
88
|
-
"@projectcaluma/ember-testing": "14.
|
|
85
|
+
"qunit-dom": "3.5.0",
|
|
86
|
+
"sinon": "21.0.0",
|
|
87
|
+
"webpack": "5.101.3",
|
|
88
|
+
"@projectcaluma/ember-testing": "14.4.0"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"ember-engines": "^0.11.0",
|