@projectcaluma/ember-form-builder 14.4.1 → 14.4.3
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.
|
@@ -72,6 +72,10 @@ const TYPES_ANSWER = {
|
|
|
72
72
|
TableAnswer: saveDefaultTableAnswerMutation,
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
+
function serializeFormatValidators(changeset) {
|
|
76
|
+
return changeset.get("formatValidators")?.edges.map((edge) => edge.node.slug);
|
|
77
|
+
}
|
|
78
|
+
|
|
75
79
|
export default class CfbFormEditorQuestion extends Component {
|
|
76
80
|
@service notification;
|
|
77
81
|
@service intl;
|
|
@@ -246,6 +250,7 @@ export default class CfbFormEditorQuestion extends Component {
|
|
|
246
250
|
minValue: parseInt(changeset.get("integerMinValue")),
|
|
247
251
|
maxValue: parseInt(changeset.get("integerMaxValue")),
|
|
248
252
|
placeholder: changeset.get("placeholder"),
|
|
253
|
+
formatValidators: serializeFormatValidators(changeset),
|
|
249
254
|
hintText: changeset.get("hintText"),
|
|
250
255
|
};
|
|
251
256
|
}
|
|
@@ -256,6 +261,7 @@ export default class CfbFormEditorQuestion extends Component {
|
|
|
256
261
|
maxValue: parseFloat(changeset.get("floatMaxValue")),
|
|
257
262
|
step: parseFloat(changeset.get("floatStep")),
|
|
258
263
|
placeholder: changeset.get("placeholder"),
|
|
264
|
+
formatValidators: serializeFormatValidators(changeset),
|
|
259
265
|
hintText: changeset.get("hintText"),
|
|
260
266
|
};
|
|
261
267
|
}
|
|
@@ -265,9 +271,7 @@ export default class CfbFormEditorQuestion extends Component {
|
|
|
265
271
|
minLength: parseInt(changeset.get("minLength")),
|
|
266
272
|
maxLength: parseInt(changeset.get("maxLength")),
|
|
267
273
|
placeholder: changeset.get("placeholder"),
|
|
268
|
-
formatValidators: changeset
|
|
269
|
-
.get("formatValidators")
|
|
270
|
-
?.edges.map((edge) => edge.node.slug),
|
|
274
|
+
formatValidators: serializeFormatValidators(changeset),
|
|
271
275
|
hintText: changeset.get("hintText"),
|
|
272
276
|
};
|
|
273
277
|
}
|
|
@@ -277,15 +281,14 @@ export default class CfbFormEditorQuestion extends Component {
|
|
|
277
281
|
minLength: parseInt(changeset.get("minLength")),
|
|
278
282
|
maxLength: parseInt(changeset.get("maxLength")),
|
|
279
283
|
placeholder: changeset.get("placeholder"),
|
|
280
|
-
formatValidators: changeset
|
|
281
|
-
.get("formatValidators")
|
|
282
|
-
?.edges.map((edge) => edge.node.slug),
|
|
284
|
+
formatValidators: serializeFormatValidators(changeset),
|
|
283
285
|
hintText: changeset.get("hintText"),
|
|
284
286
|
};
|
|
285
287
|
}
|
|
286
288
|
|
|
287
289
|
_getDateQuestionInput(changeset) {
|
|
288
290
|
return {
|
|
291
|
+
formatValidators: serializeFormatValidators(changeset),
|
|
289
292
|
hintText: changeset.get("hintText"),
|
|
290
293
|
};
|
|
291
294
|
}
|
|
@@ -293,6 +296,7 @@ export default class CfbFormEditorQuestion extends Component {
|
|
|
293
296
|
_getMultipleChoiceQuestionInput(changeset) {
|
|
294
297
|
return {
|
|
295
298
|
options: changeset.get("options").map(({ slug }) => slug),
|
|
299
|
+
formatValidators: serializeFormatValidators(changeset),
|
|
296
300
|
hintText: changeset.get("hintText"),
|
|
297
301
|
};
|
|
298
302
|
}
|
|
@@ -300,6 +304,7 @@ export default class CfbFormEditorQuestion extends Component {
|
|
|
300
304
|
_getChoiceQuestionInput(changeset) {
|
|
301
305
|
return {
|
|
302
306
|
options: changeset.get("options").map(({ slug }) => slug),
|
|
307
|
+
formatValidators: serializeFormatValidators(changeset),
|
|
303
308
|
hintText: changeset.get("hintText"),
|
|
304
309
|
};
|
|
305
310
|
}
|
|
@@ -314,6 +319,7 @@ export default class CfbFormEditorQuestion extends Component {
|
|
|
314
319
|
_getDynamicChoiceQuestionInput(changeset) {
|
|
315
320
|
return {
|
|
316
321
|
dataSource: changeset.get("dataSource"),
|
|
322
|
+
formatValidators: serializeFormatValidators(changeset),
|
|
317
323
|
hintText: changeset.get("hintText"),
|
|
318
324
|
};
|
|
319
325
|
}
|
|
@@ -321,6 +327,7 @@ export default class CfbFormEditorQuestion extends Component {
|
|
|
321
327
|
_getTableQuestionInput(changeset) {
|
|
322
328
|
return {
|
|
323
329
|
rowForm: changeset.get("rowForm.slug"),
|
|
330
|
+
formatValidators: serializeFormatValidators(changeset),
|
|
324
331
|
hintText: changeset.get("hintText"),
|
|
325
332
|
};
|
|
326
333
|
}
|
|
@@ -346,6 +353,7 @@ export default class CfbFormEditorQuestion extends Component {
|
|
|
346
353
|
|
|
347
354
|
_getFilesQuestionInput(changeset) {
|
|
348
355
|
return {
|
|
356
|
+
formatValidators: serializeFormatValidators(changeset),
|
|
349
357
|
hintText: changeset.get("hintText"),
|
|
350
358
|
};
|
|
351
359
|
}
|
|
@@ -68,6 +68,13 @@ query FormEditorQuestion($slug: String!) {
|
|
|
68
68
|
id
|
|
69
69
|
dateValue: value
|
|
70
70
|
}
|
|
71
|
+
formatValidators {
|
|
72
|
+
edges {
|
|
73
|
+
node {
|
|
74
|
+
slug
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
71
78
|
}
|
|
72
79
|
... on MultipleChoiceQuestion {
|
|
73
80
|
options {
|
|
@@ -86,6 +93,13 @@ query FormEditorQuestion($slug: String!) {
|
|
|
86
93
|
id
|
|
87
94
|
listValue: value
|
|
88
95
|
}
|
|
96
|
+
formatValidators {
|
|
97
|
+
edges {
|
|
98
|
+
node {
|
|
99
|
+
slug
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
89
103
|
}
|
|
90
104
|
... on ChoiceQuestion {
|
|
91
105
|
options {
|
|
@@ -104,14 +118,35 @@ query FormEditorQuestion($slug: String!) {
|
|
|
104
118
|
id
|
|
105
119
|
stringValue: value
|
|
106
120
|
}
|
|
121
|
+
formatValidators {
|
|
122
|
+
edges {
|
|
123
|
+
node {
|
|
124
|
+
slug
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
107
128
|
}
|
|
108
129
|
... on DynamicMultipleChoiceQuestion {
|
|
109
130
|
dataSource
|
|
110
131
|
hintText
|
|
132
|
+
formatValidators {
|
|
133
|
+
edges {
|
|
134
|
+
node {
|
|
135
|
+
slug
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
111
139
|
}
|
|
112
140
|
... on DynamicChoiceQuestion {
|
|
113
141
|
dataSource
|
|
114
142
|
hintText
|
|
143
|
+
formatValidators {
|
|
144
|
+
edges {
|
|
145
|
+
node {
|
|
146
|
+
slug
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
115
150
|
}
|
|
116
151
|
... on TableQuestion {
|
|
117
152
|
rowForm {
|
|
@@ -152,6 +187,13 @@ query FormEditorQuestion($slug: String!) {
|
|
|
152
187
|
}
|
|
153
188
|
}
|
|
154
189
|
}
|
|
190
|
+
formatValidators {
|
|
191
|
+
edges {
|
|
192
|
+
node {
|
|
193
|
+
slug
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
155
197
|
}
|
|
156
198
|
... on FormQuestion {
|
|
157
199
|
subForm {
|
|
@@ -168,6 +210,13 @@ query FormEditorQuestion($slug: String!) {
|
|
|
168
210
|
}
|
|
169
211
|
... on FilesQuestion {
|
|
170
212
|
hintText
|
|
213
|
+
formatValidators {
|
|
214
|
+
edges {
|
|
215
|
+
node {
|
|
216
|
+
slug
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
171
220
|
}
|
|
172
221
|
... on ActionButtonQuestion {
|
|
173
222
|
action
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projectcaluma/ember-form-builder",
|
|
3
|
-
"version": "14.4.
|
|
3
|
+
"version": "14.4.3",
|
|
4
4
|
"description": "Ember engine for building Caluma forms.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -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.4.
|
|
52
|
-
"@projectcaluma/ember-form": "^14.4.
|
|
51
|
+
"@projectcaluma/ember-core": "^14.4.3",
|
|
52
|
+
"@projectcaluma/ember-form": "^14.4.3"
|
|
53
53
|
},
|
|
54
54
|
"//": [
|
|
55
55
|
"TODO: remove obsolete dependency to `ember-data` which is only necessary",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"ember-cli-terser": "4.0.2",
|
|
75
75
|
"ember-data": "5.7.0",
|
|
76
76
|
"ember-engines": "0.12.0",
|
|
77
|
-
"ember-qunit": "9.0.
|
|
77
|
+
"ember-qunit": "9.0.4",
|
|
78
78
|
"ember-sinon-qunit": "7.5.0",
|
|
79
79
|
"ember-source": "6.1.0",
|
|
80
80
|
"ember-source-channel-url": "3.0.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"qunit-dom": "3.5.0",
|
|
86
86
|
"sinon": "21.0.0",
|
|
87
87
|
"webpack": "5.101.3",
|
|
88
|
-
"@projectcaluma/ember-testing": "14.4.
|
|
88
|
+
"@projectcaluma/ember-testing": "14.4.3"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"ember-engines": "^0.11.0",
|