@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
|
@@ -71,10 +71,7 @@ exports.default = [
|
|
|
71
71
|
tooltip: 'The name of the indexeddb database.',
|
|
72
72
|
conditional: {
|
|
73
73
|
json: {
|
|
74
|
-
'===': [
|
|
75
|
-
{ var: 'data.dataSrc' },
|
|
76
|
-
'indexeddb',
|
|
77
|
-
],
|
|
74
|
+
'===': [{ var: 'data.dataSrc' }, 'indexeddb'],
|
|
78
75
|
},
|
|
79
76
|
},
|
|
80
77
|
},
|
|
@@ -87,10 +84,7 @@ exports.default = [
|
|
|
87
84
|
tooltip: 'The name of table in the indexeddb database.',
|
|
88
85
|
conditional: {
|
|
89
86
|
json: {
|
|
90
|
-
'===': [
|
|
91
|
-
{ var: 'data.dataSrc' },
|
|
92
|
-
'indexeddb',
|
|
93
|
-
],
|
|
87
|
+
'===': [{ var: 'data.dataSrc' }, 'indexeddb'],
|
|
94
88
|
},
|
|
95
89
|
},
|
|
96
90
|
},
|
|
@@ -106,10 +100,7 @@ exports.default = [
|
|
|
106
100
|
defaultValue: {},
|
|
107
101
|
conditional: {
|
|
108
102
|
json: {
|
|
109
|
-
'===': [
|
|
110
|
-
{ var: 'data.dataSrc' },
|
|
111
|
-
'indexeddb',
|
|
112
|
-
],
|
|
103
|
+
'===': [{ var: 'data.dataSrc' }, 'indexeddb'],
|
|
113
104
|
},
|
|
114
105
|
},
|
|
115
106
|
},
|
|
@@ -125,10 +116,7 @@ exports.default = [
|
|
|
125
116
|
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>',
|
|
126
117
|
conditional: {
|
|
127
118
|
json: {
|
|
128
|
-
'===': [
|
|
129
|
-
{ var: 'data.dataSrc' },
|
|
130
|
-
'json',
|
|
131
|
-
],
|
|
119
|
+
'===': [{ var: 'data.dataSrc' }, 'json'],
|
|
132
120
|
},
|
|
133
121
|
},
|
|
134
122
|
},
|
|
@@ -144,19 +132,10 @@ exports.default = [
|
|
|
144
132
|
json: {
|
|
145
133
|
and: [
|
|
146
134
|
{
|
|
147
|
-
in: [
|
|
148
|
-
{ var: 'data.dataSrc' },
|
|
149
|
-
[
|
|
150
|
-
'resource',
|
|
151
|
-
'url',
|
|
152
|
-
],
|
|
153
|
-
],
|
|
135
|
+
in: [{ var: 'data.dataSrc' }, ['resource', 'url']],
|
|
154
136
|
},
|
|
155
137
|
{
|
|
156
|
-
'!==': [
|
|
157
|
-
{ var: 'data.widget' },
|
|
158
|
-
'html5',
|
|
159
|
-
],
|
|
138
|
+
'!==': [{ var: 'data.widget' }, 'html5'],
|
|
160
139
|
},
|
|
161
140
|
],
|
|
162
141
|
},
|
|
@@ -170,9 +149,7 @@ exports.default = [
|
|
|
170
149
|
tooltip: 'Values to use as the data source. Labels are shown in the select field. Values are the corresponding values saved with the submission.',
|
|
171
150
|
weight: 10,
|
|
172
151
|
reorder: true,
|
|
173
|
-
defaultValue: [
|
|
174
|
-
{ label: '', value: '' },
|
|
175
|
-
],
|
|
152
|
+
defaultValue: [{ label: '', value: '' }],
|
|
176
153
|
components: [
|
|
177
154
|
{
|
|
178
155
|
label: 'Label',
|
|
@@ -191,10 +168,7 @@ exports.default = [
|
|
|
191
168
|
],
|
|
192
169
|
conditional: {
|
|
193
170
|
json: {
|
|
194
|
-
'===': [
|
|
195
|
-
{ var: 'data.dataSrc' },
|
|
196
|
-
'values',
|
|
197
|
-
],
|
|
171
|
+
'===': [{ var: 'data.dataSrc' }, 'values'],
|
|
198
172
|
},
|
|
199
173
|
},
|
|
200
174
|
},
|
|
@@ -216,10 +190,7 @@ exports.default = [
|
|
|
216
190
|
tooltip: 'The resource to be used with this field.',
|
|
217
191
|
conditional: {
|
|
218
192
|
json: {
|
|
219
|
-
'===': [
|
|
220
|
-
{ var: 'data.dataSrc' },
|
|
221
|
-
'resource',
|
|
222
|
-
],
|
|
193
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
223
194
|
},
|
|
224
195
|
},
|
|
225
196
|
},
|
|
@@ -233,10 +204,7 @@ exports.default = [
|
|
|
233
204
|
tooltip: 'The property within the source data, where iterable items reside. For example: results.items or results[0].items',
|
|
234
205
|
conditional: {
|
|
235
206
|
json: {
|
|
236
|
-
'===': [
|
|
237
|
-
{ var: 'data.dataSrc' },
|
|
238
|
-
'url',
|
|
239
|
-
],
|
|
207
|
+
'===': [{ var: 'data.dataSrc' }, 'url'],
|
|
240
208
|
},
|
|
241
209
|
},
|
|
242
210
|
},
|
|
@@ -291,16 +259,10 @@ exports.default = [
|
|
|
291
259
|
json: {
|
|
292
260
|
and: [
|
|
293
261
|
{
|
|
294
|
-
'===': [
|
|
295
|
-
{ var: 'data.dataSrc' },
|
|
296
|
-
'resource',
|
|
297
|
-
],
|
|
262
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
298
263
|
},
|
|
299
264
|
{
|
|
300
|
-
'!==': [
|
|
301
|
-
{ var: 'data.reference' },
|
|
302
|
-
true,
|
|
303
|
-
],
|
|
265
|
+
'!==': [{ var: 'data.reference' }, true],
|
|
304
266
|
},
|
|
305
267
|
{ var: 'data.data.resource' },
|
|
306
268
|
],
|
|
@@ -348,16 +310,10 @@ exports.default = [
|
|
|
348
310
|
json: {
|
|
349
311
|
and: [
|
|
350
312
|
{
|
|
351
|
-
'===': [
|
|
352
|
-
{ var: 'data.dataSrc' },
|
|
353
|
-
'resource',
|
|
354
|
-
],
|
|
313
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
355
314
|
},
|
|
356
315
|
{
|
|
357
|
-
'===': [
|
|
358
|
-
{ var: 'data.valueProperty' },
|
|
359
|
-
'',
|
|
360
|
-
],
|
|
316
|
+
'===': [{ var: 'data.valueProperty' }, ''],
|
|
361
317
|
},
|
|
362
318
|
],
|
|
363
319
|
},
|
|
@@ -372,10 +328,7 @@ exports.default = [
|
|
|
372
328
|
weight: 15,
|
|
373
329
|
conditional: {
|
|
374
330
|
json: {
|
|
375
|
-
'===': [
|
|
376
|
-
{ var: 'data.dataSrc' },
|
|
377
|
-
'url',
|
|
378
|
-
],
|
|
331
|
+
'===': [{ var: 'data.dataSrc' }, 'url'],
|
|
379
332
|
},
|
|
380
333
|
},
|
|
381
334
|
},
|
|
@@ -389,13 +342,7 @@ exports.default = [
|
|
|
389
342
|
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.',
|
|
390
343
|
conditional: {
|
|
391
344
|
json: {
|
|
392
|
-
in: [
|
|
393
|
-
{ var: 'data.dataSrc' },
|
|
394
|
-
[
|
|
395
|
-
'url',
|
|
396
|
-
'resource',
|
|
397
|
-
],
|
|
398
|
-
],
|
|
345
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
399
346
|
},
|
|
400
347
|
},
|
|
401
348
|
},
|
|
@@ -419,13 +366,7 @@ exports.default = [
|
|
|
419
366
|
defaultValue: 0.3,
|
|
420
367
|
conditional: {
|
|
421
368
|
json: {
|
|
422
|
-
in: [
|
|
423
|
-
{ var: 'data.dataSrc' },
|
|
424
|
-
[
|
|
425
|
-
'url',
|
|
426
|
-
'resource',
|
|
427
|
-
],
|
|
428
|
-
],
|
|
369
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
429
370
|
},
|
|
430
371
|
},
|
|
431
372
|
},
|
|
@@ -441,16 +382,10 @@ exports.default = [
|
|
|
441
382
|
json: {
|
|
442
383
|
and: [
|
|
443
384
|
{
|
|
444
|
-
'===': [
|
|
445
|
-
{ var: 'data.dataSrc' },
|
|
446
|
-
'url',
|
|
447
|
-
],
|
|
385
|
+
'===': [{ var: 'data.dataSrc' }, 'url'],
|
|
448
386
|
},
|
|
449
387
|
{
|
|
450
|
-
'!=': [
|
|
451
|
-
{ var: 'data.searchField' },
|
|
452
|
-
'',
|
|
453
|
-
],
|
|
388
|
+
'!=': [{ var: 'data.searchField' }, ''],
|
|
454
389
|
},
|
|
455
390
|
],
|
|
456
391
|
},
|
|
@@ -466,13 +401,7 @@ exports.default = [
|
|
|
466
401
|
tooltip: 'Use this to provide additional filtering using query parameters.',
|
|
467
402
|
conditional: {
|
|
468
403
|
json: {
|
|
469
|
-
in: [
|
|
470
|
-
{ var: 'data.dataSrc' },
|
|
471
|
-
[
|
|
472
|
-
'url',
|
|
473
|
-
'resource',
|
|
474
|
-
],
|
|
475
|
-
],
|
|
404
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
476
405
|
},
|
|
477
406
|
},
|
|
478
407
|
},
|
|
@@ -486,13 +415,7 @@ exports.default = [
|
|
|
486
415
|
tooltip: 'Use this to provide additional sorting using query parameters',
|
|
487
416
|
conditional: {
|
|
488
417
|
json: {
|
|
489
|
-
in: [
|
|
490
|
-
{ var: 'data.dataSrc' },
|
|
491
|
-
[
|
|
492
|
-
'url',
|
|
493
|
-
'resource',
|
|
494
|
-
],
|
|
495
|
-
],
|
|
418
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
496
419
|
},
|
|
497
420
|
},
|
|
498
421
|
},
|
|
@@ -509,19 +432,10 @@ exports.default = [
|
|
|
509
432
|
json: {
|
|
510
433
|
and: [
|
|
511
434
|
{
|
|
512
|
-
in: [
|
|
513
|
-
{ var: 'data.dataSrc' },
|
|
514
|
-
[
|
|
515
|
-
'url',
|
|
516
|
-
'resource',
|
|
517
|
-
],
|
|
518
|
-
],
|
|
435
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
519
436
|
},
|
|
520
437
|
{
|
|
521
|
-
'!==': [
|
|
522
|
-
{ var: 'data.disableLimit' },
|
|
523
|
-
true,
|
|
524
|
-
],
|
|
438
|
+
'!==': [{ var: 'data.disableLimit' }, true],
|
|
525
439
|
},
|
|
526
440
|
],
|
|
527
441
|
},
|
|
@@ -539,10 +453,7 @@ exports.default = [
|
|
|
539
453
|
tooltip: 'Write custom code to return the value options or a promise with value options. The form data object is available.',
|
|
540
454
|
conditional: {
|
|
541
455
|
json: {
|
|
542
|
-
'===': [
|
|
543
|
-
{ var: 'data.dataSrc' },
|
|
544
|
-
'custom',
|
|
545
|
-
],
|
|
456
|
+
'===': [{ var: 'data.dataSrc' }, 'custom'],
|
|
546
457
|
},
|
|
547
458
|
},
|
|
548
459
|
},
|
|
@@ -572,15 +483,7 @@ exports.default = [
|
|
|
572
483
|
},
|
|
573
484
|
conditional: {
|
|
574
485
|
json: {
|
|
575
|
-
in: [
|
|
576
|
-
{ var: 'data.dataSrc' },
|
|
577
|
-
[
|
|
578
|
-
'url',
|
|
579
|
-
'resource',
|
|
580
|
-
'values',
|
|
581
|
-
'custom',
|
|
582
|
-
],
|
|
583
|
-
],
|
|
486
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource', 'values', 'custom']],
|
|
584
487
|
},
|
|
585
488
|
},
|
|
586
489
|
},
|
|
@@ -610,14 +513,7 @@ exports.default = [
|
|
|
610
513
|
},
|
|
611
514
|
conditional: {
|
|
612
515
|
json: {
|
|
613
|
-
in: [
|
|
614
|
-
{ var: 'data.dataSrc' },
|
|
615
|
-
[
|
|
616
|
-
'url',
|
|
617
|
-
'resource',
|
|
618
|
-
'values',
|
|
619
|
-
],
|
|
620
|
-
],
|
|
516
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource', 'values']],
|
|
621
517
|
},
|
|
622
518
|
},
|
|
623
519
|
},
|
|
@@ -631,15 +527,7 @@ exports.default = [
|
|
|
631
527
|
tooltip: 'When the Refresh On field is changed, clear this components value.',
|
|
632
528
|
conditional: {
|
|
633
529
|
json: {
|
|
634
|
-
in: [
|
|
635
|
-
{ var: 'data.dataSrc' },
|
|
636
|
-
[
|
|
637
|
-
'url',
|
|
638
|
-
'resource',
|
|
639
|
-
'values',
|
|
640
|
-
'custom',
|
|
641
|
-
],
|
|
642
|
-
],
|
|
530
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource', 'values', 'custom']],
|
|
643
531
|
},
|
|
644
532
|
},
|
|
645
533
|
},
|
|
@@ -664,19 +552,10 @@ exports.default = [
|
|
|
664
552
|
json: {
|
|
665
553
|
and: [
|
|
666
554
|
{
|
|
667
|
-
in: [
|
|
668
|
-
{ var: 'data.dataSrc' },
|
|
669
|
-
[
|
|
670
|
-
'url',
|
|
671
|
-
'resource',
|
|
672
|
-
],
|
|
673
|
-
],
|
|
555
|
+
in: [{ var: 'data.dataSrc' }, ['url', 'resource']],
|
|
674
556
|
},
|
|
675
557
|
{
|
|
676
|
-
'===': [
|
|
677
|
-
{ var: 'data.searchEnabled' },
|
|
678
|
-
true,
|
|
679
|
-
],
|
|
558
|
+
'===': [{ var: 'data.searchEnabled' }, true],
|
|
680
559
|
},
|
|
681
560
|
],
|
|
682
561
|
},
|
|
@@ -712,10 +591,7 @@ exports.default = [
|
|
|
712
591
|
tooltip: 'Allows to create a new resource while entering a submission.',
|
|
713
592
|
conditional: {
|
|
714
593
|
json: {
|
|
715
|
-
'===': [
|
|
716
|
-
{ var: 'data.dataSrc' },
|
|
717
|
-
'resource',
|
|
718
|
-
],
|
|
594
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
719
595
|
},
|
|
720
596
|
},
|
|
721
597
|
},
|
|
@@ -731,10 +607,7 @@ exports.default = [
|
|
|
731
607
|
json: {
|
|
732
608
|
and: [
|
|
733
609
|
{
|
|
734
|
-
'===': [
|
|
735
|
-
{ var: 'data.dataSrc' },
|
|
736
|
-
'resource',
|
|
737
|
-
],
|
|
610
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
738
611
|
},
|
|
739
612
|
{ '!!': { var: 'data.addResource' } },
|
|
740
613
|
],
|
|
@@ -750,10 +623,7 @@ exports.default = [
|
|
|
750
623
|
tooltip: 'Using this option will save this field as a reference and link its value to the value of the origin record.',
|
|
751
624
|
conditional: {
|
|
752
625
|
json: {
|
|
753
|
-
'===': [
|
|
754
|
-
{ var: 'data.dataSrc' },
|
|
755
|
-
'resource',
|
|
756
|
-
],
|
|
626
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
757
627
|
},
|
|
758
628
|
},
|
|
759
629
|
},
|
|
@@ -802,39 +672,24 @@ exports.default = [
|
|
|
802
672
|
and: [
|
|
803
673
|
{ var: 'data.valueProperty' },
|
|
804
674
|
{
|
|
805
|
-
'===': [
|
|
806
|
-
{ var: 'data.lazyLoad' },
|
|
807
|
-
true,
|
|
808
|
-
],
|
|
675
|
+
'===': [{ var: 'data.lazyLoad' }, true],
|
|
809
676
|
},
|
|
810
677
|
{
|
|
811
|
-
'!==': [
|
|
812
|
-
{ var: 'data.widget' },
|
|
813
|
-
'html5',
|
|
814
|
-
],
|
|
678
|
+
'!==': [{ var: 'data.widget' }, 'html5'],
|
|
815
679
|
},
|
|
816
680
|
{
|
|
817
681
|
or: [
|
|
818
682
|
{
|
|
819
|
-
'===': [
|
|
820
|
-
{ var: 'data.dataSrc' },
|
|
821
|
-
'url',
|
|
822
|
-
],
|
|
683
|
+
'===': [{ var: 'data.dataSrc' }, 'url'],
|
|
823
684
|
},
|
|
824
685
|
{
|
|
825
686
|
and: [
|
|
826
687
|
{
|
|
827
|
-
'===': [
|
|
828
|
-
{ var: 'data.dataSrc' },
|
|
829
|
-
'resource',
|
|
830
|
-
],
|
|
688
|
+
'===': [{ var: 'data.dataSrc' }, 'resource'],
|
|
831
689
|
},
|
|
832
690
|
// 'data' means entire object from resource will be used
|
|
833
691
|
{
|
|
834
|
-
'!==': [
|
|
835
|
-
{ var: 'data.valueProperty' },
|
|
836
|
-
'data',
|
|
837
|
-
],
|
|
692
|
+
'!==': [{ var: 'data.valueProperty' }, 'data'],
|
|
838
693
|
},
|
|
839
694
|
],
|
|
840
695
|
},
|
|
@@ -21,15 +21,7 @@ exports.default = [
|
|
|
21
21
|
input: true,
|
|
22
22
|
conditional: {
|
|
23
23
|
json: {
|
|
24
|
-
in: [
|
|
25
|
-
{ var: 'data.dataSrc' },
|
|
26
|
-
[
|
|
27
|
-
'values',
|
|
28
|
-
'json',
|
|
29
|
-
'custom',
|
|
30
|
-
'url',
|
|
31
|
-
],
|
|
32
|
-
],
|
|
24
|
+
in: [{ var: 'data.dataSrc' }, ['values', 'json', 'custom', 'url']],
|
|
33
25
|
},
|
|
34
26
|
},
|
|
35
27
|
},
|
|
@@ -45,9 +45,7 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
|
45
45
|
} });
|
|
46
46
|
}
|
|
47
47
|
static savedValueTypes(schema) {
|
|
48
|
-
return (
|
|
49
|
-
utils_1.componentValueTypes.object,
|
|
50
|
-
]);
|
|
48
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.object];
|
|
51
49
|
}
|
|
52
50
|
constructor(...args) {
|
|
53
51
|
super(...args);
|
|
@@ -267,15 +265,14 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
|
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
|
}
|
|
@@ -29,7 +29,7 @@ class SignatureComponent extends Input_1.default {
|
|
|
29
29
|
group: 'advanced',
|
|
30
30
|
icon: 'pencil',
|
|
31
31
|
weight: 120,
|
|
32
|
-
documentation: '/
|
|
32
|
+
documentation: '/userguide/forms/form-building/form-components/advanced-components#signature',
|
|
33
33
|
schema: SignatureComponent.schema(),
|
|
34
34
|
};
|
|
35
35
|
}
|
|
@@ -37,16 +37,11 @@ class SignatureComponent extends Input_1.default {
|
|
|
37
37
|
return SignatureComponent.conditionOperatorsSettings;
|
|
38
38
|
}
|
|
39
39
|
static get conditionOperatorsSettings() {
|
|
40
|
-
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: [
|
|
41
|
-
'isEmpty',
|
|
42
|
-
'isNotEmpty',
|
|
43
|
-
] });
|
|
40
|
+
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: ['isEmpty', 'isNotEmpty'] });
|
|
44
41
|
}
|
|
45
42
|
static savedValueTypes(schema) {
|
|
46
43
|
schema = schema || {};
|
|
47
|
-
return (
|
|
48
|
-
utils_1.componentValueTypes.string,
|
|
49
|
-
]);
|
|
44
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.string];
|
|
50
45
|
}
|
|
51
46
|
init() {
|
|
52
47
|
var _a, _b, _c, _d;
|
|
@@ -184,7 +179,7 @@ class SignatureComponent extends Input_1.default {
|
|
|
184
179
|
return this.renderModalPreview({
|
|
185
180
|
previewText: this.dataValue
|
|
186
181
|
? `<img src=${this.dataValue} ${this._referenceAttributeName}='openModal' style="width: 100%;height: 100%;" />`
|
|
187
|
-
: this.t('
|
|
182
|
+
: this.t('clickToSign'),
|
|
188
183
|
});
|
|
189
184
|
}
|
|
190
185
|
attach(element) {
|
|
@@ -256,7 +251,7 @@ class SignatureComponent extends Input_1.default {
|
|
|
256
251
|
if (lodash_1.default.isUndefined(value) && this.inDataTable) {
|
|
257
252
|
return '';
|
|
258
253
|
}
|
|
259
|
-
return value ? '
|
|
254
|
+
return this.t(value ? 'yes' : 'no');
|
|
260
255
|
}
|
|
261
256
|
focus() {
|
|
262
257
|
this.refs.padBody.focus();
|
|
@@ -19,9 +19,7 @@ exports.default = [
|
|
|
19
19
|
placeholder: 'Width',
|
|
20
20
|
conditional: {
|
|
21
21
|
json: {
|
|
22
|
-
'!': [
|
|
23
|
-
{ var: 'data.keepOverlayRatio' },
|
|
24
|
-
],
|
|
22
|
+
'!': [{ var: 'data.keepOverlayRatio' }],
|
|
25
23
|
},
|
|
26
24
|
},
|
|
27
25
|
weight: 50,
|
|
@@ -35,9 +33,7 @@ exports.default = [
|
|
|
35
33
|
placeholder: 'Height',
|
|
36
34
|
conditional: {
|
|
37
35
|
json: {
|
|
38
|
-
'!': [
|
|
39
|
-
{ var: 'data.keepOverlayRatio' },
|
|
40
|
-
],
|
|
36
|
+
'!': [{ var: 'data.keepOverlayRatio' }],
|
|
41
37
|
},
|
|
42
38
|
},
|
|
43
39
|
weight: 51,
|
|
@@ -30,15 +30,10 @@ class SurveyComponent extends Field_1.default {
|
|
|
30
30
|
return SurveyComponent.conditionOperatorsSettings;
|
|
31
31
|
}
|
|
32
32
|
static get conditionOperatorsSettings() {
|
|
33
|
-
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: [
|
|
34
|
-
'isEmpty',
|
|
35
|
-
'isNotEmpty',
|
|
36
|
-
] });
|
|
33
|
+
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: ['isEmpty', 'isNotEmpty'] });
|
|
37
34
|
}
|
|
38
35
|
static savedValueTypes(schema) {
|
|
39
|
-
return (
|
|
40
|
-
utils_1.componentValueTypes.object,
|
|
41
|
-
]);
|
|
36
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.object];
|
|
42
37
|
}
|
|
43
38
|
get defaultSchema() {
|
|
44
39
|
return SurveyComponent.schema();
|
|
@@ -135,21 +130,15 @@ class SurveyComponent extends Field_1.default {
|
|
|
135
130
|
<table border="1" style="width:100%">
|
|
136
131
|
<thead>
|
|
137
132
|
<tr>
|
|
138
|
-
<th
|
|
139
|
-
<th
|
|
133
|
+
<th>${this.t('surveyQuestion')}</th>
|
|
134
|
+
<th>${this.t('surveyQuestionValue')}</th>
|
|
140
135
|
</tr>
|
|
141
136
|
</thead>
|
|
142
137
|
<tbody>
|
|
143
138
|
`;
|
|
144
139
|
lodash_1.default.forIn(value, (value, key) => {
|
|
145
|
-
const question = lodash_1.default.find(this.component.questions, [
|
|
146
|
-
|
|
147
|
-
key,
|
|
148
|
-
]);
|
|
149
|
-
const answer = lodash_1.default.find(this.component.values, [
|
|
150
|
-
'value',
|
|
151
|
-
value,
|
|
152
|
-
]);
|
|
140
|
+
const question = lodash_1.default.find(this.component.questions, ['value', key]);
|
|
141
|
+
const answer = lodash_1.default.find(this.component.values, ['value', value]);
|
|
153
142
|
if (!question || !answer) {
|
|
154
143
|
return;
|
|
155
144
|
}
|
|
@@ -13,9 +13,7 @@ exports.default = [
|
|
|
13
13
|
tooltip: 'The questions you would like to ask in this survey question.',
|
|
14
14
|
weight: 0,
|
|
15
15
|
reorder: true,
|
|
16
|
-
defaultValue: [
|
|
17
|
-
{ label: '', value: '' },
|
|
18
|
-
],
|
|
16
|
+
defaultValue: [{ label: '', value: '' }],
|
|
19
17
|
components: [
|
|
20
18
|
{
|
|
21
19
|
label: 'Label',
|
|
@@ -30,9 +28,7 @@ exports.default = [
|
|
|
30
28
|
type: 'textfield',
|
|
31
29
|
allowCalculateOverride: true,
|
|
32
30
|
calculateValue: {
|
|
33
|
-
_camelCase: [
|
|
34
|
-
{ var: 'row.label' },
|
|
35
|
-
],
|
|
31
|
+
_camelCase: [{ var: 'row.label' }],
|
|
36
32
|
},
|
|
37
33
|
},
|
|
38
34
|
{
|
|
@@ -51,9 +47,7 @@ exports.default = [
|
|
|
51
47
|
tooltip: "The values that can be selected per question. Example: 'Satisfied', 'Very Satisfied', etc.",
|
|
52
48
|
weight: 1,
|
|
53
49
|
reorder: true,
|
|
54
|
-
defaultValue: [
|
|
55
|
-
{ label: '', value: '' },
|
|
56
|
-
],
|
|
50
|
+
defaultValue: [{ label: '', value: '' }],
|
|
57
51
|
components: [
|
|
58
52
|
{
|
|
59
53
|
label: 'Label',
|
|
@@ -68,9 +62,7 @@ exports.default = [
|
|
|
68
62
|
type: 'textfield',
|
|
69
63
|
allowCalculateOverride: true,
|
|
70
64
|
calculateValue: {
|
|
71
|
-
_camelCase: [
|
|
72
|
-
{ var: 'row.label' },
|
|
73
|
-
],
|
|
65
|
+
_camelCase: [{ var: 'row.label' }],
|
|
74
66
|
},
|
|
75
67
|
},
|
|
76
68
|
{
|
|
@@ -70,10 +70,10 @@ exports.default = [
|
|
|
70
70
|
tooltip: 'Enter the number or columns that should be displayed by this table.',
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
|
-
label:
|
|
73
|
+
label: 'Column Headers',
|
|
74
74
|
multiple: true,
|
|
75
|
-
key:
|
|
76
|
-
type:
|
|
75
|
+
key: 'header',
|
|
76
|
+
type: 'textfield',
|
|
77
77
|
input: true,
|
|
78
78
|
tooltip: 'Enter header names for the columns',
|
|
79
79
|
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} ",
|