@formio/js 5.4.0 → 5.4.2
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.
- package/README.md +11 -5
- package/dist/formio.builder.css +12 -5
- package/dist/formio.builder.min.css +1 -1
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.css +12 -5
- package/dist/formio.form.js +2883 -2867
- package/dist/formio.form.min.css +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +2 -2
- package/dist/formio.full.css +12 -5
- package/dist/formio.full.js +3507 -3491
- package/dist/formio.full.min.css +1 -1
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +2 -2
- package/dist/formio.js +1139 -1145
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +2 -2
- package/dist/formio.utils.js +1066 -1072
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +2 -2
- package/lib/cjs/Embed.js +8 -16
- package/lib/cjs/Form.js +4 -4
- package/lib/cjs/Formio.js +2 -9
- package/lib/cjs/InlineEmbed.js +1 -4
- package/lib/cjs/PDF.js +28 -8
- package/lib/cjs/PDFBuilder.js +6 -10
- package/lib/cjs/Webform.d.ts +1 -0
- package/lib/cjs/Webform.js +19 -34
- package/lib/cjs/WebformBuilder.js +27 -68
- package/lib/cjs/Wizard.d.ts +1 -0
- package/lib/cjs/Wizard.js +44 -31
- package/lib/cjs/WizardBuilder.js +5 -15
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +2 -6
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +3 -9
- package/lib/cjs/addons/index.js +1 -3
- package/lib/cjs/components/_classes/component/Component.d.ts +10 -5
- package/lib/cjs/components/_classes/component/Component.js +76 -134
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +2 -4
- package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +4 -16
- package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +1 -4
- package/lib/cjs/components/_classes/field/Field.js +1 -4
- package/lib/cjs/components/_classes/input/Input.js +2 -2
- package/lib/cjs/components/_classes/list/ListComponent.js +4 -4
- package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.js +6 -28
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +8 -26
- package/lib/cjs/components/_classes/nested/NestedComponent.js +1 -4
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +5 -9
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +1 -3
- package/lib/cjs/components/address/Address.js +10 -30
- package/lib/cjs/components/address/editForm/Address.edit.provider.js +8 -32
- package/lib/cjs/components/alert/Alert.js +3 -6
- package/lib/cjs/components/button/Button.d.ts +1 -0
- package/lib/cjs/components/button/Button.js +31 -17
- package/lib/cjs/components/button/editForm/Button.edit.display.js +8 -32
- package/lib/cjs/components/checkbox/Checkbox.js +4 -10
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.js +2 -8
- package/lib/cjs/components/columns/Columns.js +5 -17
- package/lib/cjs/components/container/Container.js +1 -3
- package/lib/cjs/components/currency/Currency.js +2 -7
- package/lib/cjs/components/datagrid/DataGrid.js +27 -68
- package/lib/cjs/components/datamap/DataMap.js +4 -16
- package/lib/cjs/components/datetime/DateTime.js +2 -6
- package/lib/cjs/components/datetime/editForm/DateTime.edit.display.js +1 -4
- package/lib/cjs/components/day/Day.js +12 -70
- package/lib/cjs/components/day/editForm/Day.edit.day.js +1 -3
- package/lib/cjs/components/day/editForm/Day.edit.month.js +1 -3
- package/lib/cjs/components/editgrid/EditGrid.d.ts +1 -0
- package/lib/cjs/components/editgrid/EditGrid.js +18 -44
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -4
- package/lib/cjs/components/file/File.js +40 -70
- package/lib/cjs/components/file/editForm/File.edit.display.js +1 -5
- package/lib/cjs/components/file/editForm/File.edit.file.js +8 -30
- package/lib/cjs/components/form/Form.js +5 -7
- package/lib/cjs/components/html/HTML.js +1 -5
- package/lib/cjs/components/number/Number.js +2 -4
- package/lib/cjs/components/panel/editForm/Panel.edit.display.js +3 -12
- package/lib/cjs/components/password/Password.js +1 -4
- package/lib/cjs/components/radio/Radio.js +7 -17
- package/lib/cjs/components/radio/editForm/Radio.edit.data.js +4 -14
- package/lib/cjs/components/recaptcha/ReCaptcha.js +3 -6
- package/lib/cjs/components/select/Select.js +49 -94
- package/lib/cjs/components/select/editForm/Select.edit.data.js +37 -182
- package/lib/cjs/components/select/editForm/Select.edit.validation.js +1 -9
- package/lib/cjs/components/selectboxes/SelectBoxes.js +3 -6
- package/lib/cjs/components/signature/Signature.d.ts +1 -1
- package/lib/cjs/components/signature/Signature.js +5 -10
- package/lib/cjs/components/signature/editForm/Signature.edit.display.js +2 -6
- package/lib/cjs/components/survey/Survey.js +6 -17
- package/lib/cjs/components/survey/editForm/Survey.edit.data.js +4 -12
- package/lib/cjs/components/table/editForm/Table.edit.display.js +3 -3
- package/lib/cjs/components/tabs/Tabs.js +4 -19
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +1 -3
- package/lib/cjs/components/tags/Tags.js +4 -14
- package/lib/cjs/components/textarea/TextArea.js +8 -15
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +14 -56
- package/lib/cjs/components/textfield/TextField.js +4 -4
- package/lib/cjs/components/textfield/editForm/TextField.edit.display.js +2 -8
- package/lib/cjs/components/time/Time.js +1 -4
- package/lib/cjs/components/time/editForm/Time.edit.display.js +1 -4
- package/lib/cjs/formio.form.js +5 -5
- package/lib/cjs/package.json +1 -1
- package/lib/cjs/providers/address/AddressProvider.js +1 -1
- package/lib/cjs/providers/address/GoogleAddressProvider.js +2 -4
- package/lib/cjs/providers/processor/fileProcessor.js +1 -3
- package/lib/cjs/providers/storage/azure.js +5 -6
- package/lib/cjs/providers/storage/indexeddb.js +5 -15
- package/lib/cjs/providers/storage/s3.js +3 -14
- package/lib/cjs/providers/storage/xhr.js +19 -28
- package/lib/cjs/templates/Templates.js +1 -0
- package/lib/cjs/translations/en.d.ts +237 -81
- package/lib/cjs/translations/en.js +10 -81
- package/lib/cjs/utils/ChoicesWrapper.js +1 -1
- package/lib/cjs/utils/builder.js +5 -26
- package/lib/cjs/utils/i18n.d.ts +5 -2
- package/lib/cjs/utils/i18n.js +33 -12
- package/lib/cjs/utils/utils.js +42 -52
- package/lib/cjs/widgets/CalendarWidget.js +2 -6
- package/lib/mjs/Embed.js +8 -16
- package/lib/mjs/Form.js +4 -4
- package/lib/mjs/Formio.js +2 -9
- package/lib/mjs/InlineEmbed.js +1 -4
- package/lib/mjs/PDF.js +27 -8
- package/lib/mjs/PDFBuilder.js +6 -10
- package/lib/mjs/Webform.d.ts +1 -0
- package/lib/mjs/Webform.js +19 -31
- package/lib/mjs/WebformBuilder.js +27 -68
- package/lib/mjs/Wizard.d.ts +1 -0
- package/lib/mjs/Wizard.js +39 -27
- package/lib/mjs/WizardBuilder.js +5 -15
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +2 -6
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +3 -9
- package/lib/mjs/addons/index.js +1 -3
- package/lib/mjs/components/_classes/component/Component.d.ts +10 -5
- package/lib/mjs/components/_classes/component/Component.js +75 -134
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +2 -4
- package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +4 -16
- package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -4
- package/lib/mjs/components/_classes/field/Field.js +1 -4
- package/lib/mjs/components/_classes/input/Input.js +2 -2
- package/lib/mjs/components/_classes/list/ListComponent.js +4 -4
- package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.js +6 -28
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +8 -26
- package/lib/mjs/components/_classes/nested/NestedComponent.js +1 -4
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +5 -9
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +1 -3
- package/lib/mjs/components/address/Address.js +10 -30
- package/lib/mjs/components/address/editForm/Address.edit.provider.js +8 -32
- package/lib/mjs/components/alert/Alert.js +3 -6
- package/lib/mjs/components/button/Button.d.ts +1 -0
- package/lib/mjs/components/button/Button.js +29 -16
- package/lib/mjs/components/button/editForm/Button.edit.display.js +8 -32
- package/lib/mjs/components/checkbox/Checkbox.js +4 -10
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.js +2 -8
- package/lib/mjs/components/columns/Columns.js +5 -17
- package/lib/mjs/components/container/Container.js +1 -3
- package/lib/mjs/components/currency/Currency.js +2 -7
- package/lib/mjs/components/datagrid/DataGrid.js +28 -69
- package/lib/mjs/components/datamap/DataMap.js +12 -18
- package/lib/mjs/components/datetime/DateTime.js +2 -6
- package/lib/mjs/components/datetime/editForm/DateTime.edit.display.js +1 -4
- package/lib/mjs/components/day/Day.js +12 -70
- package/lib/mjs/components/day/editForm/Day.edit.day.js +1 -3
- package/lib/mjs/components/day/editForm/Day.edit.month.js +1 -3
- package/lib/mjs/components/editgrid/EditGrid.d.ts +1 -0
- package/lib/mjs/components/editgrid/EditGrid.js +18 -44
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -4
- package/lib/mjs/components/file/File.js +40 -70
- package/lib/mjs/components/file/editForm/File.edit.display.js +1 -5
- package/lib/mjs/components/file/editForm/File.edit.file.js +8 -30
- package/lib/mjs/components/form/Form.js +5 -7
- package/lib/mjs/components/html/HTML.js +1 -5
- package/lib/mjs/components/number/Number.js +2 -4
- package/lib/mjs/components/panel/editForm/Panel.edit.display.js +3 -12
- package/lib/mjs/components/password/Password.js +1 -4
- package/lib/mjs/components/radio/Radio.js +7 -17
- package/lib/mjs/components/radio/editForm/Radio.edit.data.js +4 -14
- package/lib/mjs/components/recaptcha/ReCaptcha.js +3 -6
- package/lib/mjs/components/select/Select.js +52 -97
- package/lib/mjs/components/select/editForm/Select.edit.data.js +37 -182
- package/lib/mjs/components/select/editForm/Select.edit.validation.js +1 -9
- package/lib/mjs/components/selectboxes/SelectBoxes.js +3 -6
- package/lib/mjs/components/signature/Signature.d.ts +1 -1
- package/lib/mjs/components/signature/Signature.js +5 -10
- package/lib/mjs/components/signature/editForm/Signature.edit.display.js +2 -6
- package/lib/mjs/components/survey/Survey.js +6 -17
- package/lib/mjs/components/survey/editForm/Survey.edit.data.js +4 -12
- package/lib/mjs/components/table/editForm/Table.edit.display.js +3 -3
- package/lib/mjs/components/tabs/Tabs.js +4 -19
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +1 -3
- package/lib/mjs/components/tags/Tags.js +4 -14
- package/lib/mjs/components/textarea/TextArea.js +8 -15
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +14 -56
- package/lib/mjs/components/textfield/TextField.js +4 -4
- package/lib/mjs/components/textfield/editForm/TextField.edit.display.js +2 -8
- package/lib/mjs/components/time/Time.js +1 -4
- package/lib/mjs/components/time/editForm/Time.edit.display.js +1 -4
- package/lib/mjs/formio.form.js +6 -6
- package/lib/mjs/package.json +1 -1
- package/lib/mjs/providers/address/AddressProvider.js +1 -1
- package/lib/mjs/providers/address/GoogleAddressProvider.js +2 -4
- package/lib/mjs/providers/processor/fileProcessor.js +1 -3
- package/lib/mjs/providers/storage/azure.js +5 -6
- package/lib/mjs/providers/storage/indexeddb.js +5 -15
- package/lib/mjs/providers/storage/s3.js +3 -14
- package/lib/mjs/providers/storage/xhr.js +19 -32
- package/lib/mjs/templates/Templates.js +1 -0
- package/lib/mjs/translations/en.d.ts +237 -81
- package/lib/mjs/translations/en.js +91 -1
- package/lib/mjs/utils/ChoicesWrapper.js +1 -1
- package/lib/mjs/utils/builder.js +5 -26
- package/lib/mjs/utils/i18n.d.ts +5 -2
- package/lib/mjs/utils/i18n.js +33 -12
- package/lib/mjs/utils/utils.js +42 -52
- package/lib/mjs/widgets/CalendarWidget.js +2 -6
- package/package.json +8 -6
|
@@ -65,10 +65,7 @@ export default [
|
|
|
65
65
|
tooltip: 'The name of the indexeddb database.',
|
|
66
66
|
conditional: {
|
|
67
67
|
json: {
|
|
68
|
-
'===': [
|
|
69
|
-
{ var: 'data.dataSrc' },
|
|
70
|
-
'indexeddb',
|
|
71
|
-
],
|
|
68
|
+
'===': [{ var: 'data.dataSrc' }, 'indexeddb'],
|
|
72
69
|
},
|
|
73
70
|
},
|
|
74
71
|
},
|
|
@@ -81,10 +78,7 @@ export default [
|
|
|
81
78
|
tooltip: 'The name of table in the indexeddb database.',
|
|
82
79
|
conditional: {
|
|
83
80
|
json: {
|
|
84
|
-
'===': [
|
|
85
|
-
{ var: 'data.dataSrc' },
|
|
86
|
-
'indexeddb',
|
|
87
|
-
],
|
|
81
|
+
'===': [{ var: 'data.dataSrc' }, 'indexeddb'],
|
|
88
82
|
},
|
|
89
83
|
},
|
|
90
84
|
},
|
|
@@ -100,10 +94,7 @@ export default [
|
|
|
100
94
|
defaultValue: {},
|
|
101
95
|
conditional: {
|
|
102
96
|
json: {
|
|
103
|
-
'===': [
|
|
104
|
-
{ var: 'data.dataSrc' },
|
|
105
|
-
'indexeddb',
|
|
106
|
-
],
|
|
97
|
+
'===': [{ var: 'data.dataSrc' }, 'indexeddb'],
|
|
107
98
|
},
|
|
108
99
|
},
|
|
109
100
|
},
|
|
@@ -119,10 +110,7 @@ export default [
|
|
|
119
110
|
description: '<div>Example: <pre>["apple", "banana", "orange"].</pre></div> <div>Example 2: <pre>[{"name": "John", "email": "john.doe@test.com"}, {"name": "Jane", "email": "jane.doe@test.com"}].</pre></div>',
|
|
120
111
|
conditional: {
|
|
121
112
|
json: {
|
|
122
|
-
'===': [
|
|
123
|
-
{ var: 'data.dataSrc' },
|
|
124
|
-
'json',
|
|
125
|
-
],
|
|
113
|
+
'===': [{ var: 'data.dataSrc' }, 'json'],
|
|
126
114
|
},
|
|
127
115
|
},
|
|
128
116
|
},
|
|
@@ -138,19 +126,10 @@ export default [
|
|
|
138
126
|
json: {
|
|
139
127
|
and: [
|
|
140
128
|
{
|
|
141
|
-
in: [
|
|
142
|
-
{ var: 'data.dataSrc' },
|
|
143
|
-
[
|
|
144
|
-
'resource',
|
|
145
|
-
'url',
|
|
146
|
-
],
|
|
147
|
-
],
|
|
129
|
+
in: [{ var: 'data.dataSrc' }, ['resource', 'url']],
|
|
148
130
|
},
|
|
149
131
|
{
|
|
150
|
-
'!==': [
|
|
151
|
-
{ var: 'data.widget' },
|
|
152
|
-
'html5',
|
|
153
|
-
],
|
|
132
|
+
'!==': [{ var: 'data.widget' }, 'html5'],
|
|
154
133
|
},
|
|
155
134
|
],
|
|
156
135
|
},
|
|
@@ -164,9 +143,7 @@ export default [
|
|
|
164
143
|
tooltip: 'Values to use as the data source. Labels are shown in the select field. Values are the corresponding values saved with the submission.',
|
|
165
144
|
weight: 10,
|
|
166
145
|
reorder: true,
|
|
167
|
-
defaultValue: [
|
|
168
|
-
{ label: '', value: '' },
|
|
169
|
-
],
|
|
146
|
+
defaultValue: [{ label: '', value: '' }],
|
|
170
147
|
components: [
|
|
171
148
|
{
|
|
172
149
|
label: 'Label',
|
|
@@ -185,10 +162,7 @@ export default [
|
|
|
185
162
|
],
|
|
186
163
|
conditional: {
|
|
187
164
|
json: {
|
|
188
|
-
'===': [
|
|
189
|
-
{ var: 'data.dataSrc' },
|
|
190
|
-
'values',
|
|
191
|
-
],
|
|
165
|
+
'===': [{ var: 'data.dataSrc' }, 'values'],
|
|
192
166
|
},
|
|
193
167
|
},
|
|
194
168
|
},
|
|
@@ -210,10 +184,7 @@ export default [
|
|
|
210
184
|
tooltip: 'The resource to be used with this field.',
|
|
211
185
|
conditional: {
|
|
212
186
|
json: {
|
|
213
|
-
'===': [
|
|
214
|
-
{ var: 'data.dataSrc' },
|
|
215
|
-
'resource',
|
|
216
|
-
],
|
|
187
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
217
188
|
},
|
|
218
189
|
},
|
|
219
190
|
},
|
|
@@ -227,10 +198,7 @@ export default [
|
|
|
227
198
|
tooltip: 'The property within the source data, where iterable items reside. For example: results.items or results[0].items',
|
|
228
199
|
conditional: {
|
|
229
200
|
json: {
|
|
230
|
-
'===': [
|
|
231
|
-
{ var: 'data.dataSrc' },
|
|
232
|
-
'url',
|
|
233
|
-
],
|
|
201
|
+
'===': [{ var: 'data.dataSrc' }, 'url'],
|
|
234
202
|
},
|
|
235
203
|
},
|
|
236
204
|
},
|
|
@@ -285,16 +253,10 @@ export default [
|
|
|
285
253
|
json: {
|
|
286
254
|
and: [
|
|
287
255
|
{
|
|
288
|
-
'===': [
|
|
289
|
-
{ var: 'data.dataSrc' },
|
|
290
|
-
'resource',
|
|
291
|
-
],
|
|
256
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
292
257
|
},
|
|
293
258
|
{
|
|
294
|
-
'!==': [
|
|
295
|
-
{ var: 'data.reference' },
|
|
296
|
-
true,
|
|
297
|
-
],
|
|
259
|
+
'!==': [{ var: 'data.reference' }, true],
|
|
298
260
|
},
|
|
299
261
|
{ var: 'data.data.resource' },
|
|
300
262
|
],
|
|
@@ -342,16 +304,10 @@ export default [
|
|
|
342
304
|
json: {
|
|
343
305
|
and: [
|
|
344
306
|
{
|
|
345
|
-
'===': [
|
|
346
|
-
{ var: 'data.dataSrc' },
|
|
347
|
-
'resource',
|
|
348
|
-
],
|
|
307
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
349
308
|
},
|
|
350
309
|
{
|
|
351
|
-
'===': [
|
|
352
|
-
{ var: 'data.valueProperty' },
|
|
353
|
-
'',
|
|
354
|
-
],
|
|
310
|
+
'===': [{ var: 'data.valueProperty' }, ''],
|
|
355
311
|
},
|
|
356
312
|
],
|
|
357
313
|
},
|
|
@@ -366,10 +322,7 @@ export default [
|
|
|
366
322
|
weight: 15,
|
|
367
323
|
conditional: {
|
|
368
324
|
json: {
|
|
369
|
-
'===': [
|
|
370
|
-
{ var: 'data.dataSrc' },
|
|
371
|
-
'url',
|
|
372
|
-
],
|
|
325
|
+
'===': [{ var: 'data.dataSrc' }, 'url'],
|
|
373
326
|
},
|
|
374
327
|
},
|
|
375
328
|
},
|
|
@@ -383,13 +336,7 @@ export default [
|
|
|
383
336
|
tooltip: 'The name of the search querystring parameter used when sending a request to filter results with. The server at the URL must handle this query parameter.',
|
|
384
337
|
conditional: {
|
|
385
338
|
json: {
|
|
386
|
-
in: [
|
|
387
|
-
{ var: 'data.dataSrc' },
|
|
388
|
-
[
|
|
389
|
-
'url',
|
|
390
|
-
'resource',
|
|
391
|
-
],
|
|
392
|
-
],
|
|
339
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
393
340
|
},
|
|
394
341
|
},
|
|
395
342
|
},
|
|
@@ -413,13 +360,7 @@ export default [
|
|
|
413
360
|
defaultValue: 0.3,
|
|
414
361
|
conditional: {
|
|
415
362
|
json: {
|
|
416
|
-
in: [
|
|
417
|
-
{ var: 'data.dataSrc' },
|
|
418
|
-
[
|
|
419
|
-
'url',
|
|
420
|
-
'resource',
|
|
421
|
-
],
|
|
422
|
-
],
|
|
363
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
423
364
|
},
|
|
424
365
|
},
|
|
425
366
|
},
|
|
@@ -435,16 +376,10 @@ export default [
|
|
|
435
376
|
json: {
|
|
436
377
|
and: [
|
|
437
378
|
{
|
|
438
|
-
'===': [
|
|
439
|
-
{ var: 'data.dataSrc' },
|
|
440
|
-
'url',
|
|
441
|
-
],
|
|
379
|
+
'===': [{ var: 'data.dataSrc' }, 'url'],
|
|
442
380
|
},
|
|
443
381
|
{
|
|
444
|
-
'!=': [
|
|
445
|
-
{ var: 'data.searchField' },
|
|
446
|
-
'',
|
|
447
|
-
],
|
|
382
|
+
'!=': [{ var: 'data.searchField' }, ''],
|
|
448
383
|
},
|
|
449
384
|
],
|
|
450
385
|
},
|
|
@@ -460,13 +395,7 @@ export default [
|
|
|
460
395
|
tooltip: 'Use this to provide additional filtering using query parameters.',
|
|
461
396
|
conditional: {
|
|
462
397
|
json: {
|
|
463
|
-
in: [
|
|
464
|
-
{ var: 'data.dataSrc' },
|
|
465
|
-
[
|
|
466
|
-
'url',
|
|
467
|
-
'resource',
|
|
468
|
-
],
|
|
469
|
-
],
|
|
398
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
470
399
|
},
|
|
471
400
|
},
|
|
472
401
|
},
|
|
@@ -480,13 +409,7 @@ export default [
|
|
|
480
409
|
tooltip: 'Use this to provide additional sorting using query parameters',
|
|
481
410
|
conditional: {
|
|
482
411
|
json: {
|
|
483
|
-
in: [
|
|
484
|
-
{ var: 'data.dataSrc' },
|
|
485
|
-
[
|
|
486
|
-
'url',
|
|
487
|
-
'resource',
|
|
488
|
-
],
|
|
489
|
-
],
|
|
412
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
490
413
|
},
|
|
491
414
|
},
|
|
492
415
|
},
|
|
@@ -503,19 +426,10 @@ export default [
|
|
|
503
426
|
json: {
|
|
504
427
|
and: [
|
|
505
428
|
{
|
|
506
|
-
in: [
|
|
507
|
-
{ var: 'data.dataSrc' },
|
|
508
|
-
[
|
|
509
|
-
'url',
|
|
510
|
-
'resource',
|
|
511
|
-
],
|
|
512
|
-
],
|
|
429
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
513
430
|
},
|
|
514
431
|
{
|
|
515
|
-
'!==': [
|
|
516
|
-
{ var: 'data.disableLimit' },
|
|
517
|
-
true,
|
|
518
|
-
],
|
|
432
|
+
'!==': [{ var: 'data.disableLimit' }, true],
|
|
519
433
|
},
|
|
520
434
|
],
|
|
521
435
|
},
|
|
@@ -533,10 +447,7 @@ export default [
|
|
|
533
447
|
tooltip: 'Write custom code to return the value options or a promise with value options. The form data object is available.',
|
|
534
448
|
conditional: {
|
|
535
449
|
json: {
|
|
536
|
-
'===': [
|
|
537
|
-
{ var: 'data.dataSrc' },
|
|
538
|
-
'custom',
|
|
539
|
-
],
|
|
450
|
+
'===': [{ var: 'data.dataSrc' }, 'custom'],
|
|
540
451
|
},
|
|
541
452
|
},
|
|
542
453
|
},
|
|
@@ -566,15 +477,7 @@ export default [
|
|
|
566
477
|
},
|
|
567
478
|
conditional: {
|
|
568
479
|
json: {
|
|
569
|
-
in: [
|
|
570
|
-
{ var: 'data.dataSrc' },
|
|
571
|
-
[
|
|
572
|
-
'url',
|
|
573
|
-
'resource',
|
|
574
|
-
'values',
|
|
575
|
-
'custom',
|
|
576
|
-
],
|
|
577
|
-
],
|
|
480
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource', 'values', 'custom']],
|
|
578
481
|
},
|
|
579
482
|
},
|
|
580
483
|
},
|
|
@@ -604,14 +507,7 @@ export default [
|
|
|
604
507
|
},
|
|
605
508
|
conditional: {
|
|
606
509
|
json: {
|
|
607
|
-
in: [
|
|
608
|
-
{ var: 'data.dataSrc' },
|
|
609
|
-
[
|
|
610
|
-
'url',
|
|
611
|
-
'resource',
|
|
612
|
-
'values',
|
|
613
|
-
],
|
|
614
|
-
],
|
|
510
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource', 'values']],
|
|
615
511
|
},
|
|
616
512
|
},
|
|
617
513
|
},
|
|
@@ -625,15 +521,7 @@ export default [
|
|
|
625
521
|
tooltip: 'When the Refresh On field is changed, clear this components value.',
|
|
626
522
|
conditional: {
|
|
627
523
|
json: {
|
|
628
|
-
in: [
|
|
629
|
-
{ var: 'data.dataSrc' },
|
|
630
|
-
[
|
|
631
|
-
'url',
|
|
632
|
-
'resource',
|
|
633
|
-
'values',
|
|
634
|
-
'custom',
|
|
635
|
-
],
|
|
636
|
-
],
|
|
524
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource', 'values', 'custom']],
|
|
637
525
|
},
|
|
638
526
|
},
|
|
639
527
|
},
|
|
@@ -658,19 +546,10 @@ export default [
|
|
|
658
546
|
json: {
|
|
659
547
|
and: [
|
|
660
548
|
{
|
|
661
|
-
in: [
|
|
662
|
-
{ var: 'data.dataSrc' },
|
|
663
|
-
[
|
|
664
|
-
'url',
|
|
665
|
-
'resource',
|
|
666
|
-
],
|
|
667
|
-
],
|
|
549
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
668
550
|
},
|
|
669
551
|
{
|
|
670
|
-
'===': [
|
|
671
|
-
{ var: 'data.searchEnabled' },
|
|
672
|
-
true,
|
|
673
|
-
],
|
|
552
|
+
'===': [{ var: 'data.searchEnabled' }, true],
|
|
674
553
|
},
|
|
675
554
|
],
|
|
676
555
|
},
|
|
@@ -706,10 +585,7 @@ export default [
|
|
|
706
585
|
tooltip: 'Allows to create a new resource while entering a submission.',
|
|
707
586
|
conditional: {
|
|
708
587
|
json: {
|
|
709
|
-
'===': [
|
|
710
|
-
{ var: 'data.dataSrc' },
|
|
711
|
-
'resource',
|
|
712
|
-
],
|
|
588
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
713
589
|
},
|
|
714
590
|
},
|
|
715
591
|
},
|
|
@@ -725,10 +601,7 @@ export default [
|
|
|
725
601
|
json: {
|
|
726
602
|
and: [
|
|
727
603
|
{
|
|
728
|
-
'===': [
|
|
729
|
-
{ var: 'data.dataSrc' },
|
|
730
|
-
'resource',
|
|
731
|
-
],
|
|
604
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
732
605
|
},
|
|
733
606
|
{ '!!': { var: 'data.addResource' } },
|
|
734
607
|
],
|
|
@@ -744,10 +617,7 @@ export default [
|
|
|
744
617
|
tooltip: 'Using this option will save this field as a reference and link its value to the value of the origin record.',
|
|
745
618
|
conditional: {
|
|
746
619
|
json: {
|
|
747
|
-
'===': [
|
|
748
|
-
{ var: 'data.dataSrc' },
|
|
749
|
-
'resource',
|
|
750
|
-
],
|
|
620
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
751
621
|
},
|
|
752
622
|
},
|
|
753
623
|
},
|
|
@@ -796,39 +666,24 @@ export default [
|
|
|
796
666
|
and: [
|
|
797
667
|
{ var: 'data.valueProperty' },
|
|
798
668
|
{
|
|
799
|
-
'===': [
|
|
800
|
-
{ var: 'data.lazyLoad' },
|
|
801
|
-
true,
|
|
802
|
-
],
|
|
669
|
+
'===': [{ var: 'data.lazyLoad' }, true],
|
|
803
670
|
},
|
|
804
671
|
{
|
|
805
|
-
'!==': [
|
|
806
|
-
{ var: 'data.widget' },
|
|
807
|
-
'html5',
|
|
808
|
-
],
|
|
672
|
+
'!==': [{ var: 'data.widget' }, 'html5'],
|
|
809
673
|
},
|
|
810
674
|
{
|
|
811
675
|
or: [
|
|
812
676
|
{
|
|
813
|
-
'===': [
|
|
814
|
-
{ var: 'data.dataSrc' },
|
|
815
|
-
'url',
|
|
816
|
-
],
|
|
677
|
+
'===': [{ var: 'data.dataSrc' }, 'url'],
|
|
817
678
|
},
|
|
818
679
|
{
|
|
819
680
|
and: [
|
|
820
681
|
{
|
|
821
|
-
'===': [
|
|
822
|
-
{ var: 'data.dataSrc' },
|
|
823
|
-
'resource',
|
|
824
|
-
],
|
|
682
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
825
683
|
},
|
|
826
684
|
// 'data' means entire object from resource will be used
|
|
827
685
|
{
|
|
828
|
-
'!==': [
|
|
829
|
-
{ var: 'data.valueProperty' },
|
|
830
|
-
'data',
|
|
831
|
-
],
|
|
686
|
+
'!==': [{ var: 'data.valueProperty' }, 'data'],
|
|
832
687
|
},
|
|
833
688
|
],
|
|
834
689
|
},
|
|
@@ -19,15 +19,7 @@ export default [
|
|
|
19
19
|
input: true,
|
|
20
20
|
conditional: {
|
|
21
21
|
json: {
|
|
22
|
-
in: [
|
|
23
|
-
{ var: 'data.dataSrc' },
|
|
24
|
-
[
|
|
25
|
-
'values',
|
|
26
|
-
'json',
|
|
27
|
-
'custom',
|
|
28
|
-
'url',
|
|
29
|
-
],
|
|
30
|
-
],
|
|
22
|
+
in: [{ var: 'data.dataSrc' }, ['values', 'json', 'custom', 'url']],
|
|
31
23
|
},
|
|
32
24
|
},
|
|
33
25
|
},
|
|
@@ -47,9 +47,7 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
static savedValueTypes(schema) {
|
|
50
|
-
return
|
|
51
|
-
componentValueTypes.object,
|
|
52
|
-
]);
|
|
50
|
+
return getComponentSavedTypes(schema) || [componentValueTypes.object];
|
|
53
51
|
}
|
|
54
52
|
constructor(...args) {
|
|
55
53
|
super(...args);
|
|
@@ -267,15 +265,14 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
|
267
265
|
this.setInputsDisabled(false);
|
|
268
266
|
}
|
|
269
267
|
if (!isValid && maxCount && count > maxCount) {
|
|
270
|
-
const message = this.t(this.component.maxSelectedCountMessage ||
|
|
271
|
-
'You may only select up to {{maxCount}} items', { maxCount });
|
|
268
|
+
const message = this.t(this.component.maxSelectedCountMessage || 'maxSelectItems', { maxCount });
|
|
272
269
|
this.errors.push({ message });
|
|
273
270
|
this.setCustomValidity(message, dirty);
|
|
274
271
|
return false;
|
|
275
272
|
}
|
|
276
273
|
else if (!isValid && minCount && count < minCount) {
|
|
277
274
|
this.setInputsDisabled(false);
|
|
278
|
-
const message = this.t(this.component.minSelectedCountMessage || '
|
|
275
|
+
const message = this.t(this.component.minSelectedCountMessage || 'minSelectItems', { minCount });
|
|
279
276
|
this.errors.push({ message });
|
|
280
277
|
this.setCustomValidity(message, dirty);
|
|
281
278
|
return false;
|
|
@@ -24,7 +24,7 @@ export default class SignatureComponent extends Input {
|
|
|
24
24
|
checkSize(force: any, scale: any): void;
|
|
25
25
|
signaturePad: SignaturePad | null | undefined;
|
|
26
26
|
observer: any;
|
|
27
|
-
getValueAsString(value: any):
|
|
27
|
+
getValueAsString(value: any): string;
|
|
28
28
|
focus(): void;
|
|
29
29
|
setDataToSigaturePad(): void;
|
|
30
30
|
}
|
|
@@ -24,7 +24,7 @@ export default class SignatureComponent extends Input {
|
|
|
24
24
|
group: 'advanced',
|
|
25
25
|
icon: 'pencil',
|
|
26
26
|
weight: 120,
|
|
27
|
-
documentation: '/
|
|
27
|
+
documentation: '/userguide/forms/form-building/form-components/advanced-components#signature',
|
|
28
28
|
schema: SignatureComponent.schema(),
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -34,17 +34,12 @@ export default class SignatureComponent extends Input {
|
|
|
34
34
|
static get conditionOperatorsSettings() {
|
|
35
35
|
return {
|
|
36
36
|
...super.conditionOperatorsSettings,
|
|
37
|
-
operators: [
|
|
38
|
-
'isEmpty',
|
|
39
|
-
'isNotEmpty',
|
|
40
|
-
],
|
|
37
|
+
operators: ['isEmpty', 'isNotEmpty'],
|
|
41
38
|
};
|
|
42
39
|
}
|
|
43
40
|
static savedValueTypes(schema) {
|
|
44
41
|
schema = schema || {};
|
|
45
|
-
return
|
|
46
|
-
componentValueTypes.string,
|
|
47
|
-
]);
|
|
42
|
+
return getComponentSavedTypes(schema) || [componentValueTypes.string];
|
|
48
43
|
}
|
|
49
44
|
init() {
|
|
50
45
|
super.init();
|
|
@@ -180,7 +175,7 @@ export default class SignatureComponent extends Input {
|
|
|
180
175
|
return this.renderModalPreview({
|
|
181
176
|
previewText: this.dataValue
|
|
182
177
|
? `<img src=${this.dataValue} ${this._referenceAttributeName}='openModal' style="width: 100%;height: 100%;" />`
|
|
183
|
-
: this.t('
|
|
178
|
+
: this.t('clickToSign'),
|
|
184
179
|
});
|
|
185
180
|
}
|
|
186
181
|
attach(element) {
|
|
@@ -252,7 +247,7 @@ export default class SignatureComponent extends Input {
|
|
|
252
247
|
if (_.isUndefined(value) && this.inDataTable) {
|
|
253
248
|
return '';
|
|
254
249
|
}
|
|
255
|
-
return value ? '
|
|
250
|
+
return this.t(value ? 'yes' : 'no');
|
|
256
251
|
}
|
|
257
252
|
focus() {
|
|
258
253
|
this.refs.padBody.focus();
|
|
@@ -17,9 +17,7 @@ export default [
|
|
|
17
17
|
placeholder: 'Width',
|
|
18
18
|
conditional: {
|
|
19
19
|
json: {
|
|
20
|
-
'!': [
|
|
21
|
-
{ var: 'data.keepOverlayRatio' },
|
|
22
|
-
],
|
|
20
|
+
'!': [{ var: 'data.keepOverlayRatio' }],
|
|
23
21
|
},
|
|
24
22
|
},
|
|
25
23
|
weight: 50,
|
|
@@ -33,9 +31,7 @@ export default [
|
|
|
33
31
|
placeholder: 'Height',
|
|
34
32
|
conditional: {
|
|
35
33
|
json: {
|
|
36
|
-
'!': [
|
|
37
|
-
{ var: 'data.keepOverlayRatio' },
|
|
38
|
-
],
|
|
34
|
+
'!': [{ var: 'data.keepOverlayRatio' }],
|
|
39
35
|
},
|
|
40
36
|
},
|
|
41
37
|
weight: 51,
|
|
@@ -27,16 +27,11 @@ export default class SurveyComponent extends Field {
|
|
|
27
27
|
static get conditionOperatorsSettings() {
|
|
28
28
|
return {
|
|
29
29
|
...super.conditionOperatorsSettings,
|
|
30
|
-
operators: [
|
|
31
|
-
'isEmpty',
|
|
32
|
-
'isNotEmpty',
|
|
33
|
-
],
|
|
30
|
+
operators: ['isEmpty', 'isNotEmpty'],
|
|
34
31
|
};
|
|
35
32
|
}
|
|
36
33
|
static savedValueTypes(schema) {
|
|
37
|
-
return
|
|
38
|
-
componentValueTypes.object,
|
|
39
|
-
]);
|
|
34
|
+
return getComponentSavedTypes(schema) || [componentValueTypes.object];
|
|
40
35
|
}
|
|
41
36
|
get defaultSchema() {
|
|
42
37
|
return SurveyComponent.schema();
|
|
@@ -133,21 +128,15 @@ export default class SurveyComponent extends Field {
|
|
|
133
128
|
<table border="1" style="width:100%">
|
|
134
129
|
<thead>
|
|
135
130
|
<tr>
|
|
136
|
-
<th
|
|
137
|
-
<th
|
|
131
|
+
<th>${this.t('surveyQuestion')}</th>
|
|
132
|
+
<th>${this.t('surveyQuestionValue')}</th>
|
|
138
133
|
</tr>
|
|
139
134
|
</thead>
|
|
140
135
|
<tbody>
|
|
141
136
|
`;
|
|
142
137
|
_.forIn(value, (value, key) => {
|
|
143
|
-
const question = _.find(this.component.questions, [
|
|
144
|
-
|
|
145
|
-
key,
|
|
146
|
-
]);
|
|
147
|
-
const answer = _.find(this.component.values, [
|
|
148
|
-
'value',
|
|
149
|
-
value,
|
|
150
|
-
]);
|
|
138
|
+
const question = _.find(this.component.questions, ['value', key]);
|
|
139
|
+
const answer = _.find(this.component.values, ['value', value]);
|
|
151
140
|
if (!question || !answer) {
|
|
152
141
|
return;
|
|
153
142
|
}
|
|
@@ -11,9 +11,7 @@ export default [
|
|
|
11
11
|
tooltip: 'The questions you would like to ask in this survey question.',
|
|
12
12
|
weight: 0,
|
|
13
13
|
reorder: true,
|
|
14
|
-
defaultValue: [
|
|
15
|
-
{ label: '', value: '' },
|
|
16
|
-
],
|
|
14
|
+
defaultValue: [{ label: '', value: '' }],
|
|
17
15
|
components: [
|
|
18
16
|
{
|
|
19
17
|
label: 'Label',
|
|
@@ -28,9 +26,7 @@ export default [
|
|
|
28
26
|
type: 'textfield',
|
|
29
27
|
allowCalculateOverride: true,
|
|
30
28
|
calculateValue: {
|
|
31
|
-
_camelCase: [
|
|
32
|
-
{ var: 'row.label' },
|
|
33
|
-
],
|
|
29
|
+
_camelCase: [{ var: 'row.label' }],
|
|
34
30
|
},
|
|
35
31
|
},
|
|
36
32
|
{
|
|
@@ -49,9 +45,7 @@ export default [
|
|
|
49
45
|
tooltip: "The values that can be selected per question. Example: 'Satisfied', 'Very Satisfied', etc.",
|
|
50
46
|
weight: 1,
|
|
51
47
|
reorder: true,
|
|
52
|
-
defaultValue: [
|
|
53
|
-
{ label: '', value: '' },
|
|
54
|
-
],
|
|
48
|
+
defaultValue: [{ label: '', value: '' }],
|
|
55
49
|
components: [
|
|
56
50
|
{
|
|
57
51
|
label: 'Label',
|
|
@@ -66,9 +60,7 @@ export default [
|
|
|
66
60
|
type: 'textfield',
|
|
67
61
|
allowCalculateOverride: true,
|
|
68
62
|
calculateValue: {
|
|
69
|
-
_camelCase: [
|
|
70
|
-
{ var: 'row.label' },
|
|
71
|
-
],
|
|
63
|
+
_camelCase: [{ var: 'row.label' }],
|
|
72
64
|
},
|
|
73
65
|
},
|
|
74
66
|
{
|
|
@@ -68,10 +68,10 @@ export default [
|
|
|
68
68
|
tooltip: 'Enter the number or columns that should be displayed by this table.',
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
label:
|
|
71
|
+
label: 'Column Headers',
|
|
72
72
|
multiple: true,
|
|
73
|
-
key:
|
|
74
|
-
type:
|
|
73
|
+
key: 'header',
|
|
74
|
+
type: 'textfield',
|
|
75
75
|
input: true,
|
|
76
76
|
tooltip: 'Enter header names for the columns',
|
|
77
77
|
customConditional: "if(instance && instance.dataValue && Array.isArray(instance.dataValue)) {\r\n const isAllowToAddHeader = instance.dataValue.length < data.numCols;\r\n const addBtn = _.get(instance, 'refs.addButton[0]', null);\r\n if(addBtn) {\r\n isAllowToAddHeader? addBtn.removeAttribute('disabled'): addBtn.setAttribute('disabled', 'disabled');\r\n }\r\n} ",
|