@formio/js 5.4.1 → 5.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.
- package/README.md +11 -5
- package/dist/formio.builder.css +1 -0
- 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 +1 -0
- package/dist/formio.form.js +137 -115
- 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 +1 -0
- package/dist/formio.full.js +161 -139
- 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 +27 -27
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +2 -2
- package/dist/formio.utils.js +19 -19
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +2 -2
- package/lib/cjs/Element.js +1 -1
- 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 +2 -0
- package/lib/cjs/Wizard.js +59 -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 +5 -5
- package/lib/cjs/components/_classes/component/Component.js +60 -132
- 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.js +10 -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 +31 -63
- 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 +52 -75
- package/lib/cjs/components/file/editForm/File.edit.display.js +1 -5
- package/lib/cjs/components/file/editForm/File.edit.file.d.ts +9 -3
- package/lib/cjs/components/file/editForm/File.edit.file.js +27 -52
- package/lib/cjs/components/form/Form.js +5 -7
- package/lib/cjs/components/html/HTML.d.ts +1 -1
- package/lib/cjs/components/html/HTML.js +8 -10
- package/lib/cjs/components/number/Number.js +7 -5
- 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 +17 -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 +48 -92
- 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 +21 -24
- package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +4 -10
- package/lib/cjs/components/signature/editForm/Signature.edit.display.js +8 -12
- 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 +1 -3
- 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 +17 -18
- package/lib/cjs/providers/storage/s3.js +3 -14
- package/lib/cjs/providers/storage/url.js +13 -2
- package/lib/cjs/providers/storage/xhr.js +19 -28
- package/lib/cjs/templates/Templates.js +1 -0
- package/lib/cjs/templates/index.d.ts +1 -0
- package/lib/cjs/translations/en.d.ts +237 -82
- package/lib/cjs/translations/en.js +9 -82
- 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 +37 -47
- package/lib/cjs/widgets/CalendarWidget.js +2 -6
- package/lib/mjs/Element.js +1 -1
- 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 +2 -0
- package/lib/mjs/Wizard.js +54 -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 +5 -5
- package/lib/mjs/components/_classes/component/Component.js +59 -132
- 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.js +9 -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 +30 -63
- 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 +52 -75
- package/lib/mjs/components/file/editForm/File.edit.display.js +1 -5
- package/lib/mjs/components/file/editForm/File.edit.file.d.ts +9 -3
- package/lib/mjs/components/file/editForm/File.edit.file.js +27 -52
- package/lib/mjs/components/form/Form.js +5 -7
- package/lib/mjs/components/html/HTML.d.ts +1 -1
- package/lib/mjs/components/html/HTML.js +8 -10
- package/lib/mjs/components/number/Number.js +7 -5
- 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 +17 -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 +51 -95
- 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 +20 -23
- package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +4 -10
- package/lib/mjs/components/signature/editForm/Signature.edit.display.js +6 -12
- 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 +1 -3
- 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 +17 -18
- package/lib/mjs/providers/storage/s3.js +3 -14
- package/lib/mjs/providers/storage/url.js +13 -2
- package/lib/mjs/providers/storage/xhr.js +19 -32
- package/lib/mjs/templates/Templates.js +1 -0
- package/lib/mjs/templates/index.d.ts +1 -0
- package/lib/mjs/translations/en.d.ts +237 -82
- package/lib/mjs/translations/en.js +88 -0
- 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 +37 -47
- package/lib/mjs/widgets/CalendarWidget.js +2 -6
- package/package.json +6 -4
|
@@ -64,8 +64,19 @@ function url(formio) {
|
|
|
64
64
|
reject(xhr.response || 'Unable to upload file');
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
xhr.onerror = () =>
|
|
68
|
-
|
|
67
|
+
xhr.onerror = () => {
|
|
68
|
+
xhr.message =
|
|
69
|
+
xhr.status >= 400
|
|
70
|
+
? `${xhr.status} ${xhr.statusText || ''}`.trim()
|
|
71
|
+
: xhr.statusText && xhr.statusText.trim()
|
|
72
|
+
? xhr.statusText.trim()
|
|
73
|
+
: 'Unable to upload file';
|
|
74
|
+
return reject(xhr);
|
|
75
|
+
};
|
|
76
|
+
xhr.onabort = () => {
|
|
77
|
+
xhr.type = 'abort';
|
|
78
|
+
return reject(xhr);
|
|
79
|
+
};
|
|
69
80
|
let requestUrl = url + (url.indexOf('?') > -1 ? '&' : '?');
|
|
70
81
|
for (const key in query) {
|
|
71
82
|
requestUrl += `${key}=${query[key]}&`;
|
|
@@ -24,45 +24,32 @@ const XHR = {
|
|
|
24
24
|
.join('/');
|
|
25
25
|
},
|
|
26
26
|
async upload(formio, type, xhrCallback, file, fileName, dir, progressCallback, groupPermissions, groupId, abortCallback, multipartOptions) {
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
let response;
|
|
27
|
+
// Use makeRequest so portal plugins (e.g. x-remote-token) are applied. GOTCHA(G-FJS05)
|
|
28
|
+
let serverResponse;
|
|
30
29
|
try {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
body: JSON.stringify({
|
|
39
|
-
name: XHR.path([
|
|
40
|
-
dir,
|
|
41
|
-
fileName,
|
|
42
|
-
]),
|
|
43
|
-
size: file.size,
|
|
44
|
-
type: file.type,
|
|
45
|
-
groupPermissions,
|
|
46
|
-
groupId,
|
|
47
|
-
multipart: multipartOptions,
|
|
48
|
-
}),
|
|
30
|
+
serverResponse = await formio.makeRequest('file', `${formio.formUrl}/storage/${type}`, 'POST', {
|
|
31
|
+
name: XHR.path([dir, fileName]),
|
|
32
|
+
size: file.size,
|
|
33
|
+
type: file.type,
|
|
34
|
+
groupPermissions,
|
|
35
|
+
groupId,
|
|
36
|
+
multipart: multipartOptions,
|
|
49
37
|
});
|
|
50
38
|
}
|
|
51
39
|
catch (err) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
if (err?.networkError) {
|
|
41
|
+
throw err;
|
|
42
|
+
}
|
|
43
|
+
if (err instanceof Error) {
|
|
44
|
+
throw err;
|
|
45
|
+
}
|
|
46
|
+
const message = typeof err === 'string' ? err : err?.message || err?.error;
|
|
47
|
+
const error = new Error(message || 'Unable to sign file.');
|
|
48
|
+
if (err?.status === 504) {
|
|
59
49
|
error.networkError = true;
|
|
60
|
-
throw error;
|
|
61
50
|
}
|
|
62
|
-
|
|
63
|
-
throw new Error(message || 'Unable to sign file.');
|
|
51
|
+
throw error;
|
|
64
52
|
}
|
|
65
|
-
const serverResponse = await response.json();
|
|
66
53
|
return await XHR.makeXhrRequest(formio, xhrCallback, serverResponse, progressCallback, abortCallback);
|
|
67
54
|
},
|
|
68
55
|
makeXhrRequest(formio, xhrCallback, serverResponse, progressCallback, abortCallback) {
|
|
@@ -43,6 +43,7 @@ declare namespace _default {
|
|
|
43
43
|
iconClass: (iconset: "fa" | "bi", name: string, spinning: boolean) => string;
|
|
44
44
|
cssClasses: {
|
|
45
45
|
'border-default': string;
|
|
46
|
+
'sr-only': string;
|
|
46
47
|
'formio-tab-panel-active': string;
|
|
47
48
|
'formio-tab-link-active': string;
|
|
48
49
|
'formio-tab-link-container-active': string;
|
|
@@ -1,83 +1,238 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
declare const _default: {
|
|
2
|
+
unsavedRowsError: string;
|
|
3
|
+
invalidRowsError: string;
|
|
4
|
+
invalidRowError: string;
|
|
5
|
+
invalidOption: string;
|
|
6
|
+
invalidDay: string;
|
|
7
|
+
complete: string;
|
|
8
|
+
error: string;
|
|
9
|
+
errorListHotkey: string;
|
|
10
|
+
errorsListNavigationMessage: string;
|
|
11
|
+
submitError: string;
|
|
12
|
+
required: string;
|
|
13
|
+
unique: string;
|
|
14
|
+
array: string;
|
|
15
|
+
array_nonempty: string;
|
|
16
|
+
nonarray: string;
|
|
17
|
+
select: string;
|
|
18
|
+
pattern: string;
|
|
19
|
+
minLength: string;
|
|
20
|
+
maxLength: string;
|
|
21
|
+
minWords: string;
|
|
22
|
+
maxWords: string;
|
|
23
|
+
min: string;
|
|
24
|
+
max: string;
|
|
25
|
+
maxDate: string;
|
|
26
|
+
minDate: string;
|
|
27
|
+
maxYear: string;
|
|
28
|
+
minYear: string;
|
|
29
|
+
minSelectedCount: string;
|
|
30
|
+
maxSelectedCount: string;
|
|
31
|
+
invalid_email: string;
|
|
32
|
+
invalid_url: string;
|
|
33
|
+
invalid_regex: string;
|
|
34
|
+
invalid_date: string;
|
|
35
|
+
invalid_day: string;
|
|
36
|
+
invalidValueProperty: string;
|
|
37
|
+
mask: string;
|
|
38
|
+
valueIsNotAvailable: string;
|
|
39
|
+
stripe: string;
|
|
40
|
+
month: string;
|
|
41
|
+
day: string;
|
|
42
|
+
year: string;
|
|
43
|
+
january: string;
|
|
44
|
+
february: string;
|
|
45
|
+
march: string;
|
|
46
|
+
april: string;
|
|
47
|
+
may: string;
|
|
48
|
+
june: string;
|
|
49
|
+
july: string;
|
|
50
|
+
august: string;
|
|
51
|
+
september: string;
|
|
52
|
+
october: string;
|
|
53
|
+
november: string;
|
|
54
|
+
december: string;
|
|
55
|
+
next: string;
|
|
56
|
+
previous: string;
|
|
57
|
+
cancel: string;
|
|
58
|
+
submit: string;
|
|
59
|
+
confirmCancel: string;
|
|
60
|
+
saveDraftInstanceError: string;
|
|
61
|
+
saveDraftAuthError: string;
|
|
62
|
+
restoreDraftInstanceError: string;
|
|
63
|
+
saveDraftError: string;
|
|
64
|
+
restoreDraftError: string;
|
|
65
|
+
time: string;
|
|
66
|
+
cancelButtonAriaLabel: string;
|
|
67
|
+
previousButtonAriaLabel: string;
|
|
68
|
+
nextButtonAriaLabel: string;
|
|
69
|
+
submitButtonAriaLabel: string;
|
|
70
|
+
reCaptchaTokenValidationError: string;
|
|
71
|
+
reCaptchaTokenNotSpecifiedError: string;
|
|
72
|
+
apiKey: string;
|
|
73
|
+
typeRemaining: string;
|
|
74
|
+
typeCount: string;
|
|
75
|
+
requiredDayField: string;
|
|
76
|
+
requiredDayEmpty: string;
|
|
77
|
+
requiredMonthField: string;
|
|
78
|
+
requiredYearField: string;
|
|
79
|
+
fileTooSmall: string;
|
|
80
|
+
fileTooBig: string;
|
|
81
|
+
formNotReady: string;
|
|
82
|
+
noFormElement: string;
|
|
83
|
+
notUniqueKey: string;
|
|
84
|
+
newFormSchema: string;
|
|
85
|
+
missingUrl: string;
|
|
86
|
+
urlNotAttachedToBtn: string;
|
|
87
|
+
loadingProjectSettingsError: string;
|
|
88
|
+
sessionStorageSupportError: string;
|
|
89
|
+
builderUniqueError: string;
|
|
90
|
+
pageNotFound: string;
|
|
91
|
+
noDragInfoError: string;
|
|
92
|
+
addonSupportTypeError: string;
|
|
93
|
+
setPathError: string;
|
|
94
|
+
calculatedPathDeprecation: string;
|
|
95
|
+
unknownTemplate: string;
|
|
96
|
+
unknownComponent: string;
|
|
97
|
+
renderTemplateFunctionDeprecation: string;
|
|
98
|
+
whenReadyDeprecation: string;
|
|
99
|
+
loadResourcesError: string;
|
|
100
|
+
noSelectDataConfiguration: string;
|
|
101
|
+
indexedDBSupportError: string;
|
|
102
|
+
caretPositionSavingError: string;
|
|
103
|
+
iteratableRowsError: string;
|
|
104
|
+
checkRowDeprecation: string;
|
|
105
|
+
noOAuthBtn: string;
|
|
106
|
+
noOAuthConfiguration: string;
|
|
107
|
+
oAuthErrorsTitle: string;
|
|
108
|
+
noOAuthFormUrl: string;
|
|
109
|
+
oAuthStateError: string;
|
|
110
|
+
componentInvalidRowValidation: string;
|
|
111
|
+
videoPlayerNotFound: string;
|
|
112
|
+
synchronizationFailed: string;
|
|
113
|
+
fileWithDuplicatedNameInProgress: string;
|
|
114
|
+
fileWithDuplicatedNameLoaded: string;
|
|
115
|
+
nestedForm: string;
|
|
116
|
+
noDataProvided: string;
|
|
117
|
+
subformSubmissionLoadingError: string;
|
|
118
|
+
noDelimiterSet: string;
|
|
119
|
+
noSiteKey: string;
|
|
120
|
+
failedToNormalize: string;
|
|
121
|
+
failedToCompareItems: string;
|
|
122
|
+
editorFocusError: string;
|
|
123
|
+
quillImageUploadFailed: string;
|
|
124
|
+
noFilesSelected: string;
|
|
125
|
+
needConfigurationForQuill: string;
|
|
126
|
+
waitPdfConverting: string;
|
|
127
|
+
uploading: string;
|
|
128
|
+
pasteBelow: string;
|
|
129
|
+
copy: string;
|
|
130
|
+
move: string;
|
|
131
|
+
edit: string;
|
|
132
|
+
editJson: string;
|
|
133
|
+
remove: string;
|
|
134
|
+
clickToSetValue: string;
|
|
135
|
+
words: string;
|
|
136
|
+
characters: string;
|
|
137
|
+
addAnother: string;
|
|
138
|
+
yes: string;
|
|
139
|
+
no: string;
|
|
140
|
+
wantToClearData: string;
|
|
141
|
+
yesDelete: string;
|
|
142
|
+
waitFileProcessing: string;
|
|
143
|
+
wrongFileType: string;
|
|
144
|
+
noFileService: string;
|
|
145
|
+
fileProcessingFailed: string;
|
|
146
|
+
readyForUpload: string;
|
|
147
|
+
readyForRemovingFromStorage: string;
|
|
148
|
+
preparingFileToRemove: string;
|
|
149
|
+
succefullyRemoved: string;
|
|
150
|
+
succefullyUploaded: string;
|
|
151
|
+
maxSelectItems: string;
|
|
152
|
+
minSelectItems: string;
|
|
153
|
+
clickToSign: string;
|
|
154
|
+
surveyQuestion: string;
|
|
155
|
+
surveyQuestionValue: string;
|
|
156
|
+
success: string;
|
|
157
|
+
noResultsFound: string;
|
|
158
|
+
noChoices: string;
|
|
159
|
+
typeToSearch: string;
|
|
160
|
+
loading: string;
|
|
161
|
+
confirmComponentRemoveWithChildren: string;
|
|
162
|
+
confirmComponentRemove: string;
|
|
163
|
+
requestAborted: string;
|
|
164
|
+
checkEnteredParameters: string;
|
|
165
|
+
oauthSessionExpired: string;
|
|
166
|
+
help: string;
|
|
167
|
+
component: string;
|
|
168
|
+
save: string;
|
|
169
|
+
preview: string;
|
|
170
|
+
dragAndDropComponent: string;
|
|
171
|
+
searchFields: string;
|
|
172
|
+
noMatchesFound: string;
|
|
173
|
+
fileName: string;
|
|
174
|
+
size: string;
|
|
175
|
+
type: string;
|
|
176
|
+
gallery: string;
|
|
177
|
+
camera: string;
|
|
178
|
+
dropFilesToAttach: string;
|
|
179
|
+
useCamera: string;
|
|
180
|
+
browse: string;
|
|
181
|
+
takePicture: string;
|
|
182
|
+
switchToFileUpload: string;
|
|
183
|
+
completeStatus: string;
|
|
184
|
+
noStorageSet: string;
|
|
185
|
+
noFileApiSupport: string;
|
|
186
|
+
noFormDataSupport: string;
|
|
187
|
+
noProgressSupport: string;
|
|
188
|
+
close: string;
|
|
189
|
+
addResource: string;
|
|
190
|
+
autocomplete: string;
|
|
191
|
+
showPreview: string;
|
|
192
|
+
hidePreview: string;
|
|
193
|
+
createPage: string;
|
|
194
|
+
page: string;
|
|
195
|
+
closeBtnDescription: string;
|
|
196
|
+
cancelBtnDescription: string;
|
|
197
|
+
saveBtnDescription: string;
|
|
198
|
+
addOrRemove: string;
|
|
199
|
+
anyFileTypesAllowed: string;
|
|
200
|
+
allowedFileTypes: string;
|
|
201
|
+
syncing: string;
|
|
202
|
+
syncNow: string;
|
|
203
|
+
pressToOpen: string;
|
|
204
|
+
browseToAttachFileFor: string;
|
|
205
|
+
or: string;
|
|
206
|
+
numericOnly: string;
|
|
207
|
+
uploadPdfFile: string;
|
|
208
|
+
dropToStart: string;
|
|
209
|
+
expand: string;
|
|
210
|
+
collapse: string;
|
|
211
|
+
add: string;
|
|
212
|
+
delete: string;
|
|
213
|
+
revert: string;
|
|
214
|
+
removeBtnPressToRemove: string;
|
|
215
|
+
file: string;
|
|
216
|
+
captureVideo: string;
|
|
217
|
+
captureAudio: string;
|
|
218
|
+
captureImage: string;
|
|
219
|
+
browseFiles: string;
|
|
220
|
+
noComponentsSetInGrid: string;
|
|
221
|
+
sortAscending: string;
|
|
222
|
+
sortDescending: string;
|
|
223
|
+
filter: string;
|
|
224
|
+
clear: string;
|
|
225
|
+
showItemsWithValue: string;
|
|
226
|
+
gridItemsPerPage: string;
|
|
227
|
+
gridAllItems: string;
|
|
228
|
+
recordsSelectedOnPage: string;
|
|
229
|
+
recordsSelectedInTable: string;
|
|
230
|
+
gridSelectAll: string;
|
|
231
|
+
itemsInTable: string;
|
|
232
|
+
clearSelection: string;
|
|
233
|
+
editGridRow: string;
|
|
234
|
+
deleteGridRow: string;
|
|
235
|
+
selected: string;
|
|
236
|
+
actions: string;
|
|
237
|
+
};
|
|
83
238
|
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import bootstrap from '@formio/bootstrap';
|
|
1
2
|
export default {
|
|
3
|
+
...(bootstrap?.translations?.en || {}),
|
|
2
4
|
unsavedRowsError: 'Please save all rows before proceeding.',
|
|
3
5
|
invalidRowsError: 'Please correct invalid rows before proceeding.',
|
|
4
6
|
invalidRowError: 'Invalid row. Please correct it or delete.',
|
|
@@ -78,6 +80,92 @@ export default {
|
|
|
78
80
|
requiredYearField: '{{ field }} is required',
|
|
79
81
|
fileTooSmall: 'File is too small; it must be at least {{ size }}',
|
|
80
82
|
fileTooBig: 'File is too big; it must be at most {{ size }}',
|
|
83
|
+
formNotReady: 'Form not ready. Use form.ready promise',
|
|
84
|
+
noFormElement: 'No DOM element for form.',
|
|
85
|
+
notUniqueKey: 'API Key is not unique',
|
|
86
|
+
newFormSchema: 'Form schema is for a newer version, please upgrade your renderer. Some functionality may not work.',
|
|
87
|
+
missingUrl: 'Missing URL argument',
|
|
88
|
+
urlNotAttachedToBtn: 'You should add a URL to this button.',
|
|
89
|
+
loadingProjectSettingsError: 'Could not load project settings',
|
|
90
|
+
sessionStorageSupportError: 'Session storage is not supported in this browser.',
|
|
91
|
+
builderUniqueError: `You cannot add more than one {{componentKeyOrTitle}} component to one page.`,
|
|
92
|
+
pageNotFound: 'Page not found',
|
|
93
|
+
noDragInfoError: 'There is no Drag Info available for either dragged or sibling element',
|
|
94
|
+
addonSupportTypeError: 'Addon {{label}} does not support component of type {{type}}',
|
|
95
|
+
setPathError: 'Should not be setting the path of a component.',
|
|
96
|
+
calculatedPathDeprecation: 'component.calculatedPath was deprecated, use component.path instead.',
|
|
97
|
+
unknownTemplate: 'Unknown template: {{name}}',
|
|
98
|
+
unknownComponent: 'Unknown component: {{type}}',
|
|
99
|
+
renderTemplateFunctionDeprecation: `Form.io 'render' template function is deprecated.
|
|
100
|
+
If you need to render template (template A) inside of another template (template B),
|
|
101
|
+
pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B`,
|
|
102
|
+
whenReadyDeprecation: 'The whenReady() method has been deprecated. Please use the dataReady property instead.',
|
|
103
|
+
loadResourcesError: 'Unable to load resources for {{componentKey}}',
|
|
104
|
+
noSelectDataConfiguration: 'Select component {{componentKey}} does not have data configuration.',
|
|
105
|
+
indexedDBSupportError: "Your browser doesn't support current version of indexedDB",
|
|
106
|
+
caretPositionSavingError: 'An error occurred while trying to save caret position',
|
|
107
|
+
iteratableRowsError: 'Getter #iteratableRows() is not implemented',
|
|
108
|
+
checkRowDeprecation: 'Deprecation Warning: checkRow method has been replaced with processRow',
|
|
109
|
+
noOAuthBtn: 'You must add the OAuth button to a form for it to function properly',
|
|
110
|
+
noOAuthConfiguration: 'OAuth not configured. You must configure oauth for your project before it will work.',
|
|
111
|
+
oAuthErrorsTitle: 'The Following Error Has Occured',
|
|
112
|
+
noOAuthFormUrl: 'You must attach a Form API url to your form in order to use OAuth buttons.',
|
|
113
|
+
oAuthStateError: 'OAuth state does not match. Please try logging in again.',
|
|
114
|
+
componentInvalidRowValidation: 'Invalid row validation for {{componentKey}}',
|
|
115
|
+
videoPlayerNotFound: 'Video player not found in template.',
|
|
116
|
+
synchronizationFailed: 'Synchronization is failed',
|
|
117
|
+
fileWithDuplicatedNameInProgress: 'File with the same name is already being uploaded',
|
|
118
|
+
fileWithDuplicatedNameLoaded: 'File with the same name is already uploaded',
|
|
119
|
+
nestedForm: 'Nested form',
|
|
120
|
+
noDataProvided: 'No data provided',
|
|
121
|
+
subformSubmissionLoadingError: 'Unable to load subform submission {{submissionId}}:',
|
|
122
|
+
noDelimiterSet: 'In order for thousands separator to work properly, you must set the delimiter to true in the component json',
|
|
123
|
+
noSiteKey: 'There is no Site Key specified in settings in form JSON',
|
|
124
|
+
failedToNormalize: 'Failed to normalize value',
|
|
125
|
+
failedToCompareItems: 'Error while comparing items',
|
|
126
|
+
editorFocusError: 'An editor did not initialize properly when trying to focus:',
|
|
127
|
+
quillImageUploadFailed: 'Quill image upload failed',
|
|
128
|
+
noFilesSelected: 'No files selected',
|
|
129
|
+
needConfigurationForQuill: 'The WYSIWYG settings are configured for CKEditor. For this renderer, you will need to use configurations for the Quill Editor. See https://quilljs.com/docs/configuration for more information.',
|
|
130
|
+
waitPdfConverting: 'Converting PDF. Please wait.',
|
|
131
|
+
uploading: 'Uploading',
|
|
132
|
+
pasteBelow: 'Paste below',
|
|
133
|
+
copy: 'Copy',
|
|
134
|
+
move: 'Move',
|
|
135
|
+
edit: 'Edit',
|
|
136
|
+
editJson: 'Edit JSON',
|
|
137
|
+
remove: 'Remove',
|
|
138
|
+
clickToSetValue: 'Click to set value',
|
|
139
|
+
words: 'words',
|
|
140
|
+
characters: 'characters',
|
|
141
|
+
addAnother: 'Add Another',
|
|
142
|
+
yes: 'Yes',
|
|
143
|
+
no: 'No',
|
|
144
|
+
wantToClearData: 'Do you want to clear data?',
|
|
145
|
+
yesDelete: 'Yes, delete it',
|
|
146
|
+
waitFileProcessing: 'Processing file. Please wait...',
|
|
147
|
+
wrongFileType: 'File is the wrong type; it must be {{ pattern }}',
|
|
148
|
+
noFileService: 'File Service not provided.',
|
|
149
|
+
fileProcessingFailed: 'File processing has been failed.',
|
|
150
|
+
readyForUpload: 'Ready to be uploaded into storage',
|
|
151
|
+
readyForRemovingFromStorage: 'Ready to be removed from storage',
|
|
152
|
+
preparingFileToRemove: 'Preparing file to remove',
|
|
153
|
+
succefullyRemoved: 'Succefully removed',
|
|
154
|
+
succefullyUploaded: 'Succefully uploaded',
|
|
155
|
+
maxSelectItems: 'You may only select up to {{maxCount}} items',
|
|
156
|
+
minSelectItems: 'You must select at least {{minCount}} items',
|
|
157
|
+
clickToSign: 'Click to Sign',
|
|
158
|
+
surveyQuestion: 'Question',
|
|
159
|
+
surveyQuestionValue: 'Value',
|
|
160
|
+
success: 'Success',
|
|
161
|
+
noResultsFound: 'No results found',
|
|
162
|
+
noChoices: 'No choices to choose from',
|
|
163
|
+
typeToSearch: 'Type to search',
|
|
164
|
+
loading: 'Loading',
|
|
165
|
+
confirmComponentRemoveWithChildren: 'Removing this component will also remove all of its children. Are you sure you want to do this?',
|
|
166
|
+
confirmComponentRemove: 'Are you sure you want to remove this component?',
|
|
167
|
+
requestAborted: 'Request was aborted',
|
|
168
|
+
checkEnteredParameters: 'Please, check the entered parameters',
|
|
81
169
|
// when temp document storing oauth state and code verifier is cleared by ttl before the user completes login
|
|
82
170
|
oauthSessionExpired: 'Login attempt expired; please try again. Refreshing...',
|
|
83
171
|
};
|
|
@@ -30,7 +30,7 @@ class ChoicesWrapper extends Choices {
|
|
|
30
30
|
this._wasTap = true;
|
|
31
31
|
}
|
|
32
32
|
_onEnterKey(...args) {
|
|
33
|
-
const [event
|
|
33
|
+
const [event] = args;
|
|
34
34
|
// Prevent dropdown form opening when removeItemButton was pressed using 'Enter' on keyboard
|
|
35
35
|
if (event.target.className === 'choices__button') {
|
|
36
36
|
this.shouldOpenDropDown = false;
|
package/lib/mjs/utils/builder.js
CHANGED
|
@@ -12,23 +12,14 @@ export default {
|
|
|
12
12
|
const formKeys = {};
|
|
13
13
|
eachComponent(container, (comp) => {
|
|
14
14
|
formKeys[comp.key] = true;
|
|
15
|
-
if ([
|
|
16
|
-
'address',
|
|
17
|
-
'container',
|
|
18
|
-
'datagrid',
|
|
19
|
-
'editgrid',
|
|
20
|
-
'dynamicWizard',
|
|
21
|
-
'tree',
|
|
22
|
-
].includes(comp.type) ||
|
|
15
|
+
if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(comp.type) ||
|
|
23
16
|
comp.tree ||
|
|
24
17
|
comp.arrayTree) {
|
|
25
18
|
return true;
|
|
26
19
|
}
|
|
27
20
|
}, true);
|
|
28
21
|
// Recurse into all child components.
|
|
29
|
-
eachComponent([
|
|
30
|
-
component,
|
|
31
|
-
], (component) => {
|
|
22
|
+
eachComponent([component], (component) => {
|
|
32
23
|
// Skip key uniquification if this component doesn't have a key.
|
|
33
24
|
if (!component.key) {
|
|
34
25
|
return;
|
|
@@ -39,14 +30,7 @@ export default {
|
|
|
39
30
|
changed = true;
|
|
40
31
|
}
|
|
41
32
|
formKeys[newKey] = true;
|
|
42
|
-
if ([
|
|
43
|
-
'address',
|
|
44
|
-
'container',
|
|
45
|
-
'datagrid',
|
|
46
|
-
'editgrid',
|
|
47
|
-
'dynamicWizard',
|
|
48
|
-
'tree',
|
|
49
|
-
].includes(component.type) ||
|
|
33
|
+
if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(component.type) ||
|
|
50
34
|
component.tree ||
|
|
51
35
|
component.arrayTree) {
|
|
52
36
|
return true;
|
|
@@ -58,10 +42,7 @@ export default {
|
|
|
58
42
|
* Additional shortcuts for the builder.
|
|
59
43
|
*/
|
|
60
44
|
additionalShortcuts: {
|
|
61
|
-
button: [
|
|
62
|
-
'Enter',
|
|
63
|
-
'Esc',
|
|
64
|
-
],
|
|
45
|
+
button: ['Enter', 'Esc'],
|
|
65
46
|
},
|
|
66
47
|
/**
|
|
67
48
|
* Returns the alpha character shortcuts.
|
|
@@ -96,9 +77,7 @@ export default {
|
|
|
96
77
|
if (!component) {
|
|
97
78
|
return [];
|
|
98
79
|
}
|
|
99
|
-
return [
|
|
100
|
-
'',
|
|
101
|
-
]
|
|
80
|
+
return ['']
|
|
102
81
|
.concat(_.difference(this.getAlphaShortcuts().concat(this.getAdditionalShortcuts(component.type)), this.getBindedShortcuts(form.components, component)))
|
|
103
82
|
.map((shortcut) => ({
|
|
104
83
|
label: shortcut,
|
package/lib/mjs/utils/i18n.d.ts
CHANGED
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
* This file is used to mimic the i18n library interface.
|
|
3
3
|
*/
|
|
4
4
|
export class I18n {
|
|
5
|
+
static languages: {};
|
|
6
|
+
static setDefaultTranslations(languages: any): void;
|
|
5
7
|
static init(languages?: {}): I18n;
|
|
6
8
|
static createInstance(): I18n;
|
|
7
9
|
constructor(languages?: {});
|
|
8
|
-
languages:
|
|
10
|
+
languages: any;
|
|
11
|
+
defaultKeys: any;
|
|
9
12
|
language: string;
|
|
10
13
|
originalLanguage: string;
|
|
11
14
|
currentLanguage: any;
|
|
12
|
-
setLanguages(languages: any): void;
|
|
15
|
+
setLanguages(languages: any, noDefaultOverride: any): void;
|
|
13
16
|
dir(lang?: string): "rtl" | "ltr";
|
|
14
17
|
changeLanguage(language: any, ready?: null): void;
|
|
15
18
|
addResourceBundle(language: any, type: any, strings: any): void;
|