@formio/js 5.1.0-dev.6040.debc859 → 5.1.0-dev.6042.6e62a7a
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/Changelog.md +140 -6
- package/dist/formio.form.js +591 -580
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +613 -602
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +47 -14
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +48 -15
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Element.d.ts +2 -1
- package/lib/cjs/Element.js +6 -4
- package/lib/cjs/Webform.d.ts +2 -2
- package/lib/cjs/Webform.js +9 -9
- package/lib/cjs/WebformBuilder.js +5 -1
- package/lib/cjs/Wizard.d.ts +1 -0
- package/lib/cjs/Wizard.js +23 -3
- package/lib/cjs/components/_classes/component/Component.d.ts +50 -15
- package/lib/cjs/components/_classes/component/Component.js +153 -69
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +19 -0
- package/lib/cjs/components/_classes/component/editForm/utils.js +1 -1
- package/lib/cjs/components/_classes/list/ListComponent.js +2 -2
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +0 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.form.js +13 -0
- package/lib/cjs/components/_classes/nested/NestedComponent.js +10 -18
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -2
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +0 -11
- package/lib/cjs/components/address/Address.d.ts +9 -0
- package/lib/cjs/components/address/Address.js +31 -8
- package/lib/cjs/components/address/editForm/Address.edit.display.d.ts +4 -0
- package/lib/cjs/components/address/editForm/Address.edit.display.js +1 -0
- package/lib/cjs/components/address/editForm/Address.edit.provider.js +8 -8
- package/lib/cjs/components/content/editForm/Content.edit.display.js +8 -0
- package/lib/cjs/components/currency/editForm/Currency.edit.display.js +12 -0
- package/lib/cjs/components/datagrid/DataGrid.js +0 -3
- package/lib/cjs/components/datamap/DataMap.js +2 -6
- package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.d.ts +66 -15
- package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.js +68 -47
- package/lib/cjs/components/day/editForm/Day.edit.display.js +8 -0
- package/lib/cjs/components/editgrid/EditGrid.js +3 -13
- package/lib/cjs/components/email/editForm/Email.edit.display.js +12 -0
- package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
- package/lib/cjs/components/file/File.js +7 -2
- package/lib/cjs/components/file/editForm/File.edit.file.d.ts +13 -0
- package/lib/cjs/components/file/editForm/File.edit.file.js +1 -0
- package/lib/cjs/components/form/Form.d.ts +0 -1
- package/lib/cjs/components/form/Form.js +18 -22
- package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
- package/lib/cjs/components/html/HTML.js +1 -2
- package/lib/cjs/components/html/editForm/HTML.edit.display.js +8 -0
- package/lib/cjs/components/number/editForm/Number.edit.display.js +12 -0
- package/lib/cjs/components/password/editForm/Password.edit.display.js +13 -1
- package/lib/cjs/components/phonenumber/PhoneNumber.form.js +9 -1
- package/lib/cjs/components/radio/Radio.js +1 -1
- package/lib/cjs/components/select/Select.js +1 -1
- package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +68 -110
- package/lib/cjs/components/select/editForm/Select.edit.data.js +2 -37
- package/lib/cjs/components/selectboxes/SelectBoxes.js +3 -0
- package/lib/cjs/components/survey/Survey.js +1 -1
- package/lib/cjs/components/tabs/Tabs.js +1 -0
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
- package/lib/cjs/components/textarea/TextArea.js +9 -1
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
- package/lib/cjs/components/textfield/TextField.js +2 -2
- package/lib/cjs/components/unknown/Unknown.form.d.ts +2 -1
- package/lib/cjs/components/unknown/Unknown.form.js +13 -9
- package/lib/cjs/components/url/editForm/Url.edit.display.js +12 -0
- package/lib/cjs/components/well/editForm/Well.edit.display.js +8 -0
- package/lib/cjs/formio.form.js +2 -2
- package/lib/cjs/providers/storage/uploadAdapter.js +5 -3
- package/lib/cjs/translations/en.d.ts +1 -234
- package/lib/cjs/translations/en.js +4 -2
- package/lib/cjs/utils/formUtils.d.ts +2 -2
- package/lib/cjs/utils/utils.d.ts +9 -8
- package/lib/cjs/utils/utils.js +18 -23
- package/lib/cjs/widgets/CalendarWidget.js +6 -1
- package/lib/mjs/Element.d.ts +2 -1
- package/lib/mjs/Element.js +6 -4
- package/lib/mjs/Webform.d.ts +2 -2
- package/lib/mjs/Webform.js +9 -9
- package/lib/mjs/WebformBuilder.js +5 -1
- package/lib/mjs/Wizard.d.ts +1 -0
- package/lib/mjs/Wizard.js +22 -2
- package/lib/mjs/components/_classes/component/Component.d.ts +50 -15
- package/lib/mjs/components/_classes/component/Component.js +154 -70
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +19 -0
- package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
- package/lib/mjs/components/_classes/list/ListComponent.js +2 -2
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +0 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.form.js +13 -0
- package/lib/mjs/components/_classes/nested/NestedComponent.js +10 -18
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -2
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +0 -11
- package/lib/mjs/components/address/Address.d.ts +9 -0
- package/lib/mjs/components/address/Address.js +31 -8
- package/lib/mjs/components/address/editForm/Address.edit.display.d.ts +4 -0
- package/lib/mjs/components/address/editForm/Address.edit.display.js +1 -0
- package/lib/mjs/components/address/editForm/Address.edit.provider.js +8 -8
- package/lib/mjs/components/content/editForm/Content.edit.display.js +8 -0
- package/lib/mjs/components/currency/editForm/Currency.edit.display.js +12 -0
- package/lib/mjs/components/datagrid/DataGrid.js +0 -3
- package/lib/mjs/components/datamap/DataMap.js +2 -6
- package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.d.ts +66 -15
- package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.js +68 -47
- package/lib/mjs/components/day/editForm/Day.edit.display.js +8 -0
- package/lib/mjs/components/editgrid/EditGrid.js +3 -12
- package/lib/mjs/components/email/editForm/Email.edit.display.js +12 -0
- package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
- package/lib/mjs/components/file/File.js +7 -2
- package/lib/mjs/components/file/editForm/File.edit.file.d.ts +13 -0
- package/lib/mjs/components/file/editForm/File.edit.file.js +1 -0
- package/lib/mjs/components/form/Form.d.ts +0 -1
- package/lib/mjs/components/form/Form.js +18 -22
- package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
- package/lib/mjs/components/html/HTML.js +1 -2
- package/lib/mjs/components/html/editForm/HTML.edit.display.js +8 -0
- package/lib/mjs/components/number/editForm/Number.edit.display.js +12 -0
- package/lib/mjs/components/password/editForm/Password.edit.display.js +13 -1
- package/lib/mjs/components/phonenumber/PhoneNumber.form.js +9 -1
- package/lib/mjs/components/radio/Radio.js +1 -1
- package/lib/mjs/components/select/Select.js +1 -1
- package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +68 -110
- package/lib/mjs/components/select/editForm/Select.edit.data.js +2 -37
- package/lib/mjs/components/selectboxes/SelectBoxes.js +3 -0
- package/lib/mjs/components/survey/Survey.js +1 -1
- package/lib/mjs/components/tabs/Tabs.js +1 -0
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
- package/lib/mjs/components/textarea/TextArea.js +9 -1
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
- package/lib/mjs/components/textfield/TextField.js +2 -2
- package/lib/mjs/components/unknown/Unknown.form.d.ts +2 -1
- package/lib/mjs/components/unknown/Unknown.form.js +13 -9
- package/lib/mjs/components/url/editForm/Url.edit.display.js +12 -0
- package/lib/mjs/components/well/editForm/Well.edit.display.js +8 -0
- package/lib/mjs/formio.form.js +1 -1
- package/lib/mjs/providers/storage/uploadAdapter.js +5 -3
- package/lib/mjs/translations/en.d.ts +1 -234
- package/lib/mjs/translations/en.js +5 -47
- package/lib/mjs/utils/formUtils.d.ts +2 -2
- package/lib/mjs/utils/utils.d.ts +9 -8
- package/lib/mjs/utils/utils.js +16 -21
- package/lib/mjs/widgets/CalendarWidget.js +7 -2
- package/package.json +2 -2
- package/lib/cjs/i18n.d.ts +0 -13
- package/lib/cjs/i18n.js +0 -19
- package/lib/cjs/utils/i18n.d.ts +0 -19
- package/lib/cjs/utils/i18n.js +0 -120
- package/lib/mjs/i18n.d.ts +0 -13
- package/lib/mjs/i18n.js +0 -14
- package/lib/mjs/utils/i18n.d.ts +0 -19
- package/lib/mjs/utils/i18n.js +0 -112
@@ -62,42 +62,6 @@ exports.default = [
|
|
62
62
|
],
|
63
63
|
},
|
64
64
|
},
|
65
|
-
{
|
66
|
-
type: 'textfield',
|
67
|
-
weight: 10,
|
68
|
-
input: true,
|
69
|
-
key: 'indexeddb.database',
|
70
|
-
label: 'Database name',
|
71
|
-
tooltip: 'The name of the indexeddb database.',
|
72
|
-
conditional: {
|
73
|
-
json: { '===': [{ var: 'data.dataSrc' }, 'indexeddb'] },
|
74
|
-
},
|
75
|
-
},
|
76
|
-
{
|
77
|
-
type: 'textfield',
|
78
|
-
input: true,
|
79
|
-
key: 'indexeddb.table',
|
80
|
-
label: 'Table name',
|
81
|
-
weight: 16,
|
82
|
-
tooltip: 'The name of table in the indexeddb database.',
|
83
|
-
conditional: {
|
84
|
-
json: { '===': [{ var: 'data.dataSrc' }, 'indexeddb'] },
|
85
|
-
}
|
86
|
-
},
|
87
|
-
{
|
88
|
-
type: 'textarea',
|
89
|
-
as: 'json',
|
90
|
-
editor: 'ace',
|
91
|
-
weight: 18,
|
92
|
-
input: true,
|
93
|
-
key: 'indexeddb.filter',
|
94
|
-
label: 'Row Filter',
|
95
|
-
tooltip: 'Filter table items that match the object.',
|
96
|
-
defaultValue: {},
|
97
|
-
conditional: {
|
98
|
-
json: { '===': [{ var: 'data.dataSrc' }, 'indexeddb'] },
|
99
|
-
},
|
100
|
-
},
|
101
65
|
{
|
102
66
|
type: 'textarea',
|
103
67
|
as: 'json',
|
@@ -119,6 +83,7 @@ exports.default = [
|
|
119
83
|
key: 'lazyLoad',
|
120
84
|
tooltip: 'When set, this will not fire off the request to the URL until this control is within focus. This can improve performance if you have many Select dropdowns on your form where the API\'s will only fire when the control is activated.',
|
121
85
|
weight: 11,
|
86
|
+
defaultValue: true,
|
122
87
|
conditional: {
|
123
88
|
json: {
|
124
89
|
and: [
|
@@ -208,7 +173,7 @@ exports.default = [
|
|
208
173
|
label: 'Value Property',
|
209
174
|
key: 'valueProperty',
|
210
175
|
skipMerge: true,
|
211
|
-
clearOnHide:
|
176
|
+
clearOnHide: false,
|
212
177
|
tooltip: 'The field to use as the value.',
|
213
178
|
weight: 11,
|
214
179
|
refreshOn: 'data.resource',
|
@@ -64,6 +64,9 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
64
64
|
info.attr.class = 'form-check-input';
|
65
65
|
return info;
|
66
66
|
}
|
67
|
+
get hasDefaultValue() {
|
68
|
+
return true;
|
69
|
+
}
|
67
70
|
get emptyValue() {
|
68
71
|
return this.component.values.reduce((prev, value) => {
|
69
72
|
if (value.value) {
|
@@ -120,7 +120,7 @@ class SurveyComponent extends Field_1.default {
|
|
120
120
|
return this.component.questions.reduce((result, question) => result && Boolean(value[question.value]), true);
|
121
121
|
}
|
122
122
|
getInputName(question) {
|
123
|
-
return `${this.options.name}[${question.value}]`;
|
123
|
+
return `${this.options.name}[${question.value}][${this.id}]`;
|
124
124
|
}
|
125
125
|
getValueAsString(value, options) {
|
126
126
|
if (options === null || options === void 0 ? void 0 : options.email) {
|
@@ -143,6 +143,7 @@ class TabsComponent extends NestedComponent_1.default {
|
|
143
143
|
this.addClass(this.refs[this.tabLinkKey][index], 'active');
|
144
144
|
this.addClass(this.refs[this.tabLinkKey][index], 'formio-tab-link-active');
|
145
145
|
}
|
146
|
+
this.setValue(this.data);
|
146
147
|
this.triggerChange();
|
147
148
|
}
|
148
149
|
beforeFocus(component) {
|
@@ -62,7 +62,15 @@ class TextAreaComponent extends TextField_1.default {
|
|
62
62
|
info.content = value;
|
63
63
|
if ((this.options.readOnly || this.disabled) && !this.isHtmlRenderMode()) {
|
64
64
|
const elementStyle = this.info.attr.style || '';
|
65
|
-
const children =
|
65
|
+
const children = `
|
66
|
+
<div ${this._referenceAttributeName}="input"
|
67
|
+
class="formio-editor-read-only-content"
|
68
|
+
${elementStyle ? `style='${elementStyle}'` : ''}
|
69
|
+
role="textbox"
|
70
|
+
aria-multiline="true"
|
71
|
+
aria-readonly="true"
|
72
|
+
>
|
73
|
+
</div>`;
|
66
74
|
return this.renderTemplate('well', {
|
67
75
|
children,
|
68
76
|
nestedKey: this.key,
|
@@ -14,10 +14,22 @@ exports.default = [
|
|
14
14
|
key: 'allowMultipleMasks',
|
15
15
|
ignore: true
|
16
16
|
},
|
17
|
+
{
|
18
|
+
key: 'inputMasks',
|
19
|
+
ignore: true
|
20
|
+
},
|
17
21
|
{
|
18
22
|
key: 'mask',
|
19
23
|
ignore: true
|
20
24
|
},
|
25
|
+
{
|
26
|
+
key: 'widget.type',
|
27
|
+
ignore: true
|
28
|
+
},
|
29
|
+
{
|
30
|
+
key: 'widget',
|
31
|
+
ignore: true
|
32
|
+
},
|
21
33
|
{
|
22
34
|
type: 'number',
|
23
35
|
input: true,
|
@@ -102,8 +102,8 @@ class TextFieldComponent extends Input_1.default {
|
|
102
102
|
if (((_c = this.component.widget) === null || _c === void 0 ? void 0 : _c.type) === 'calendar') {
|
103
103
|
this.component.widget = Object.assign(Object.assign({}, this.component.widget), { readOnly: this.options.readOnly, timezone,
|
104
104
|
displayInTimezone, locale: this.component.widget.locale || this.options.language, saveAs: 'text' });
|
105
|
-
// update originalComponent to include widget settings after component initialization
|
106
|
-
// originalComponent is used to restore the component (and widget) after evaluating field logic
|
105
|
+
// update originalComponent to include widget settings after component initialization
|
106
|
+
// originalComponent is used to restore the component (and widget) after evaluating field logic
|
107
107
|
this.originalComponent = FormioUtils.fastCloneDeep(this.component);
|
108
108
|
}
|
109
109
|
}
|
@@ -3,25 +3,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const lodash_1 = require("lodash");
|
6
7
|
const Unknown_edit_display_1 = __importDefault(require("./editForm/Unknown.edit.display"));
|
8
|
+
const utils_1 = __importDefault(require("../../components/_classes/component/editForm/utils"));
|
7
9
|
/**
|
8
10
|
* Unknown Component schema.
|
11
|
+
* @param {...any} extend
|
9
12
|
* @returns {object} - The Unknown Component edit form.
|
10
13
|
*/
|
11
|
-
function default_1() {
|
14
|
+
function default_1(...extend) {
|
15
|
+
const components = [
|
16
|
+
{
|
17
|
+
label: 'Custom',
|
18
|
+
key: 'display',
|
19
|
+
weight: 0,
|
20
|
+
components: Unknown_edit_display_1.default
|
21
|
+
}
|
22
|
+
].concat(...extend);
|
12
23
|
return {
|
13
24
|
components: [
|
14
25
|
{
|
15
26
|
type: 'tabs',
|
16
27
|
key: 'tabs',
|
17
|
-
components:
|
18
|
-
{
|
19
|
-
label: 'Custom',
|
20
|
-
key: 'display',
|
21
|
-
weight: 0,
|
22
|
-
components: Unknown_edit_display_1.default
|
23
|
-
}
|
24
|
-
]
|
28
|
+
components: (0, lodash_1.unionWith)(components, utils_1.default.unifyComponents)
|
25
29
|
}
|
26
30
|
]
|
27
31
|
};
|
@@ -9,6 +9,18 @@ exports.default = [
|
|
9
9
|
key: 'allowMultipleMasks',
|
10
10
|
ignore: true
|
11
11
|
},
|
12
|
+
{
|
13
|
+
key: 'inputMasks',
|
14
|
+
ignore: true
|
15
|
+
},
|
16
|
+
{
|
17
|
+
key: 'widget.type',
|
18
|
+
ignore: true
|
19
|
+
},
|
20
|
+
{
|
21
|
+
key: 'widget',
|
22
|
+
ignore: true
|
23
|
+
},
|
12
24
|
{
|
13
25
|
key: 'showWordCount',
|
14
26
|
ignore: true,
|
package/lib/cjs/formio.form.js
CHANGED
@@ -29,7 +29,7 @@ const EventEmitter_1 = __importDefault(require("./EventEmitter"));
|
|
29
29
|
exports.EventEmitter = EventEmitter_1.default;
|
30
30
|
const Webform_1 = __importDefault(require("./Webform"));
|
31
31
|
exports.Webform = Webform_1.default;
|
32
|
-
const
|
32
|
+
const core_1 = require("@formio/core");
|
33
33
|
Formio_1.Formio.loadModules = (path = `${Formio_1.Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {
|
34
34
|
Formio_1.Formio.requireLibrary(name, name, path, true)
|
35
35
|
.then((modules) => {
|
@@ -103,7 +103,7 @@ function registerModule(mod, defaultFn = null, options = {}) {
|
|
103
103
|
Formio_1.Formio.Evaluator.registerEvaluator(mod.evaluator);
|
104
104
|
break;
|
105
105
|
case 'translations':
|
106
|
-
|
106
|
+
core_1.I18n.setDefaultTranslations(mod.translations);
|
107
107
|
break;
|
108
108
|
case 'library':
|
109
109
|
options.license
|
@@ -49,9 +49,11 @@ class FormioUploadAdapter {
|
|
49
49
|
}
|
50
50
|
}
|
51
51
|
}
|
52
|
-
const getFormioUploadAdapterPlugin = (fileService, component) =>
|
53
|
-
|
54
|
-
|
52
|
+
const getFormioUploadAdapterPlugin = (fileService, component) => {
|
53
|
+
return function (editor) {
|
54
|
+
editor.plugins.get('FileRepository').createUploadAdapter = (loader) => {
|
55
|
+
return new FormioUploadAdapter(loader, fileService, component);
|
56
|
+
};
|
55
57
|
};
|
56
58
|
};
|
57
59
|
exports.getFormioUploadAdapterPlugin = getFormioUploadAdapterPlugin;
|
@@ -1,235 +1,2 @@
|
|
1
|
-
declare const _default:
|
2
|
-
unsavedRowsError: string;
|
3
|
-
invalidRowsError: string;
|
4
|
-
invalidRowError: string;
|
5
|
-
invalidOption: string;
|
6
|
-
invalidDay: string;
|
7
|
-
alertMessageWithLabel: string;
|
8
|
-
alertMessage: string;
|
9
|
-
complete: string;
|
10
|
-
error: string;
|
11
|
-
errorListHotkey: string;
|
12
|
-
errorsListNavigationMessage: string;
|
13
|
-
submitError: string;
|
14
|
-
required: string;
|
15
|
-
unique: string;
|
16
|
-
array: string;
|
17
|
-
array_nonempty: string;
|
18
|
-
nonarray: string;
|
19
|
-
select: string;
|
20
|
-
pattern: string;
|
21
|
-
minLength: string;
|
22
|
-
maxLength: string;
|
23
|
-
minWords: string;
|
24
|
-
maxWords: string;
|
25
|
-
min: string;
|
26
|
-
max: string;
|
27
|
-
maxDate: string;
|
28
|
-
minDate: string;
|
29
|
-
maxYear: string;
|
30
|
-
minYear: string;
|
31
|
-
minSelectedCount: string;
|
32
|
-
maxSelectedCount: string;
|
33
|
-
invalid_email: string;
|
34
|
-
invalid_url: string;
|
35
|
-
invalid_regex: string;
|
36
|
-
invalid_date: string;
|
37
|
-
invalid_day: string;
|
38
|
-
invalidValueProperty: string;
|
39
|
-
mask: string;
|
40
|
-
valueIsNotAvailable: string;
|
41
|
-
stripe: string;
|
42
|
-
month: string;
|
43
|
-
day: string;
|
44
|
-
year: string;
|
45
|
-
january: string;
|
46
|
-
february: string;
|
47
|
-
march: string;
|
48
|
-
april: string;
|
49
|
-
may: string;
|
50
|
-
june: string;
|
51
|
-
july: string;
|
52
|
-
august: string;
|
53
|
-
september: string;
|
54
|
-
october: string;
|
55
|
-
november: string;
|
56
|
-
december: string;
|
57
|
-
next: string;
|
58
|
-
previous: string;
|
59
|
-
cancel: string;
|
60
|
-
submit: string;
|
61
|
-
confirmCancel: string;
|
62
|
-
saveDraftInstanceError: string;
|
63
|
-
saveDraftAuthError: string;
|
64
|
-
restoreDraftInstanceError: string;
|
65
|
-
saveDraftError: string;
|
66
|
-
restoreDraftError: string;
|
67
|
-
time: string;
|
68
|
-
cancelButtonAriaLabel: string;
|
69
|
-
previousButtonAriaLabel: string;
|
70
|
-
nextButtonAriaLabel: string;
|
71
|
-
submitButtonAriaLabel: string;
|
72
|
-
reCaptchaTokenValidationError: string;
|
73
|
-
reCaptchaTokenNotSpecifiedError: string;
|
74
|
-
apiKey: string;
|
75
|
-
typeRemaining: string;
|
76
|
-
typeCount: string;
|
77
|
-
requiredDayField: string;
|
78
|
-
requiredDayEmpty: string;
|
79
|
-
requiredMonthField: string;
|
80
|
-
requiredYearField: 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
|
-
fileTooSmall: string;
|
145
|
-
fileTooBig: string;
|
146
|
-
noFileService: string;
|
147
|
-
fileProcessingFailed: string;
|
148
|
-
readyForUpload: string;
|
149
|
-
readyForRemovingFromStorage: string;
|
150
|
-
preparingFileToRemove: string;
|
151
|
-
succefullyRemoved: string;
|
152
|
-
succefullyUploaded: string;
|
153
|
-
maxSelectItems: string;
|
154
|
-
minSelectItems: string;
|
155
|
-
clickToSign: string;
|
156
|
-
surveyQuestion: string;
|
157
|
-
surveyQuestionValue: string;
|
158
|
-
success: string;
|
159
|
-
noResultsFound: string;
|
160
|
-
noChoices: string;
|
161
|
-
typeToSearch: string;
|
162
|
-
loading: string;
|
163
|
-
help: string;
|
164
|
-
component: string;
|
165
|
-
save: string;
|
166
|
-
preview: string;
|
167
|
-
dragAndDropComponent: string;
|
168
|
-
searchFields: string;
|
169
|
-
noMatchesFound: string;
|
170
|
-
fileName: string;
|
171
|
-
size: string;
|
172
|
-
type: string;
|
173
|
-
gallery: string;
|
174
|
-
camera: string;
|
175
|
-
dropFilesToAttach: string;
|
176
|
-
useCamera: string;
|
177
|
-
browse: string;
|
178
|
-
takePicture: string;
|
179
|
-
switchToFileUpload: string;
|
180
|
-
completeStatus: string;
|
181
|
-
noStorageSet: string;
|
182
|
-
noFileApiSupport: string;
|
183
|
-
noFormDataSupport: string;
|
184
|
-
noProgressSupport: string;
|
185
|
-
close: string;
|
186
|
-
addResource: string;
|
187
|
-
autocomplete: string;
|
188
|
-
showPreview: string;
|
189
|
-
hidePreview: string;
|
190
|
-
createPage: string;
|
191
|
-
page: string;
|
192
|
-
closeBtnDescription: string;
|
193
|
-
cancelBtnDescription: string;
|
194
|
-
saveBtnDescription: string;
|
195
|
-
addOrRemove: string;
|
196
|
-
anyFileTypesAllowed: string;
|
197
|
-
allowedFileTypes: string;
|
198
|
-
syncing: string;
|
199
|
-
syncNow: string;
|
200
|
-
pressToOpen: string;
|
201
|
-
browseToAttachFileFor: string;
|
202
|
-
or: string;
|
203
|
-
numericOnly: string;
|
204
|
-
uploadPdfFile: string;
|
205
|
-
dropToStart: string;
|
206
|
-
expand: string;
|
207
|
-
collapse: string;
|
208
|
-
add: string;
|
209
|
-
delete: string;
|
210
|
-
revert: string;
|
211
|
-
removeBtnPressToRemove: string;
|
212
|
-
file: string;
|
213
|
-
captureVideo: string;
|
214
|
-
captureAudio: string;
|
215
|
-
captureImage: string;
|
216
|
-
browseFiles: string;
|
217
|
-
noComponentsSetInGrid: string;
|
218
|
-
sortAscending: string;
|
219
|
-
sortDescending: string;
|
220
|
-
filter: string;
|
221
|
-
clear: string;
|
222
|
-
showItemsWithValue: string;
|
223
|
-
gridItemsPerPage: string;
|
224
|
-
gridAllItems: string;
|
225
|
-
recordsSelectedOnPage: string;
|
226
|
-
recordsSelectedInTable: string;
|
227
|
-
gridSelectAll: string;
|
228
|
-
itemsInTable: string;
|
229
|
-
clearSelection: string;
|
230
|
-
editGridRow: string;
|
231
|
-
deleteGridRow: string;
|
232
|
-
selected: string;
|
233
|
-
actions: string;
|
234
|
-
};
|
1
|
+
declare const _default: any;
|
235
2
|
export default _default;
|
@@ -5,6 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
var _a;
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7
7
|
const bootstrap_1 = __importDefault(require("@formio/bootstrap"));
|
8
|
-
|
8
|
+
const core_1 = require("@formio/core");
|
9
|
+
const lodash_1 = __importDefault(require("lodash"));
|
10
|
+
exports.default = Object.assign(Object.assign(Object.assign({}, (((_a = bootstrap_1.default === null || bootstrap_1.default === void 0 ? void 0 : bootstrap_1.default.translations) === null || _a === void 0 ? void 0 : _a.en) || {})), lodash_1.default.omit(core_1.coreEnTranslation, ['maxDate', 'minDate'])), { unsavedRowsError: 'Please save all rows before proceeding.', invalidRowsError: 'Please correct invalid rows before proceeding.', invalidRowError: 'Invalid row. Please correct it or delete.', invalidOption: '{{field}} is an invalid value.', invalidDay: '{{field}} is not a valid day.', alertMessageWithLabel: '{{label}}: {{message}}', alertMessage: '{{message}}', complete: 'Submission Complete', error: 'Please fix the following errors before submitting.', errorListHotkey: 'Press Ctrl + Alt + X to go back to the error list.', errorsListNavigationMessage: 'Click to navigate to the field with following error.', submitError: 'Please check the form and correct all errors before submitting.', maxDate: '{{field}} should not contain date after {{maxDate}}', minDate: '{{field}} should not contain date before {{minDate}}', stripe: '{{stripe}}', next: 'Next', previous: 'Previous', cancel: 'Cancel', submit: 'Submit Form', confirmCancel: 'Are you sure you want to cancel?', saveDraftInstanceError: 'Cannot save draft because there is no formio instance.', saveDraftAuthError: 'Cannot save draft unless a user is authenticated.', restoreDraftInstanceError: 'Cannot restore draft because there is no formio instance.', saveDraftError: 'Unable to save draft.', restoreDraftError: 'Unable to restore draft.', time: 'Invalid time', cancelButtonAriaLabel: 'Cancel button. Click to reset the form', previousButtonAriaLabel: 'Previous button. Click to go back to the previous tab', nextButtonAriaLabel: 'Next button. Click to go to the next tab', submitButtonAriaLabel: 'Submit Form button. Click to submit the form', reCaptchaTokenValidationError: 'ReCAPTCHA: Token validation error', reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission', apiKey: 'API Key is not unique: {{key}}', typeRemaining: '{{ remaining }} {{ type }} remaining.', typeCount: '{{ count }} {{ type }}', requiredDayEmpty: '{{ field }} is required', formNotReady: 'Form not ready. Use form.ready promise', noFormElement: 'No DOM element for form.', notUniqueKey: 'API Key is not unique', newFormSchema: 'Form schema is for a newer version, please upgrade your renderer. Some functionality may not work.', missingUrl: 'Missing URL argument', urlNotAttachedToBtn: 'You should add a URL to this button.', loadingProjectSettingsError: 'Could not load project settings', sessionStorageSupportError: 'Session storage is not supported in this browser.', builderUniqueError: `You cannot add more than one {{componentKeyOrTitle}} component to one page.`, pageNotFound: 'Page not found', noDragInfoError: 'There is no Drag Info available for either dragged or sibling element', addonSupportTypeError: 'Addon {{label}} does not support component of type {{type}}', setPathError: 'Should not be setting the path of a component.', calculatedPathDeprecation: 'component.calculatedPath was deprecated, use component.path instead.', unknownTemplate: 'Unknown template: {{name}}', unknownComponent: 'Unknown component: {{type}}', renderTemplateFunctionDeprecation: `Form.io 'render' template function is deprecated.
|
9
11
|
If you need to render template (template A) inside of another template (template B),
|
10
|
-
pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B`, whenReadyDeprecation: 'The whenReady() method has been deprecated. Please use the dataReady property instead.', loadResourcesError: 'Unable to load resources for {{componentKey}}', noSelectDataConfiguration: 'Select component {{componentKey}} does not have data configuration.', indexedDBSupportError: "Your browser doesn't support current version of indexedDB", caretPositionSavingError: 'An error occurred while trying to save caret position', iteratableRowsError: 'Getter #iteratableRows() is not implemented', checkRowDeprecation: 'Deprecation Warning: checkRow method has been replaced with processRow', noOAuthBtn: 'You must add the OAuth button to a form for it to function properly', noOAuthConfiguration: 'OAuth not configured. You must configure oauth for your project before it will work.', oAuthErrorsTitle: 'The Following Error Has Occured', noOAuthFormUrl: 'You must attach a Form API url to your form in order to use OAuth buttons.', oAuthStateError: 'OAuth state does not match. Please try logging in again.', componentInvalidRowValidation: 'Invalid row validation for {{componentKey}}', videoPlayerNotFound: 'Video player not found in template.', synchronizationFailed: 'Synchronization is failed', fileWithDuplicatedNameInProgress: 'File with the same name is already being uploaded', fileWithDuplicatedNameLoaded: 'File with the same name is already uploaded', nestedForm: 'Nested form', noDataProvided: 'No data provided', subformSubmissionLoadingError: 'Unable to load subform submission {{submissionId}}:', noDelimiterSet: 'In order for thousands separator to work properly, you must set the delimiter to true in the component json', noSiteKey: 'There is no Site Key specified in settings in form JSON', failedToNormalize: 'Failed to normalize value', failedToCompareItems: 'Error while comparing items', editorFocusError: 'An editor did not initialize properly when trying to focus:', quillImageUploadFailed: 'Quill image upload failed', noFilesSelected: 'No files selected', 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.', waitPdfConverting: 'Converting PDF. Please wait.', uploading: 'Uploading', pasteBelow: 'Paste below', copy: 'Copy', move: 'Move', edit: 'Edit', editJson: 'Edit JSON', remove: 'Remove', clickToSetValue: 'Click to set value', words: 'words', characters: 'characters', addAnother: 'Add Another',
|
12
|
+
pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B`, whenReadyDeprecation: 'The whenReady() method has been deprecated. Please use the dataReady property instead.', loadResourcesError: 'Unable to load resources for {{componentKey}}', noSelectDataConfiguration: 'Select component {{componentKey}} does not have data configuration.', indexedDBSupportError: "Your browser doesn't support current version of indexedDB", caretPositionSavingError: 'An error occurred while trying to save caret position', iteratableRowsError: 'Getter #iteratableRows() is not implemented', checkRowDeprecation: 'Deprecation Warning: checkRow method has been replaced with processRow', noOAuthBtn: 'You must add the OAuth button to a form for it to function properly', noOAuthConfiguration: 'OAuth not configured. You must configure oauth for your project before it will work.', oAuthErrorsTitle: 'The Following Error Has Occured', noOAuthFormUrl: 'You must attach a Form API url to your form in order to use OAuth buttons.', oAuthStateError: 'OAuth state does not match. Please try logging in again.', componentInvalidRowValidation: 'Invalid row validation for {{componentKey}}', videoPlayerNotFound: 'Video player not found in template.', synchronizationFailed: 'Synchronization is failed', fileWithDuplicatedNameInProgress: 'File with the same name is already being uploaded', fileWithDuplicatedNameLoaded: 'File with the same name is already uploaded', nestedForm: 'Nested form', noDataProvided: 'No data provided', subformSubmissionLoadingError: 'Unable to load subform submission {{submissionId}}:', noDelimiterSet: 'In order for thousands separator to work properly, you must set the delimiter to true in the component json', noSiteKey: 'There is no Site Key specified in settings in form JSON', failedToNormalize: 'Failed to normalize value', failedToCompareItems: 'Error while comparing items', editorFocusError: 'An editor did not initialize properly when trying to focus:', quillImageUploadFailed: 'Quill image upload failed', noFilesSelected: 'No files selected', 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.', waitPdfConverting: 'Converting PDF. Please wait.', uploading: 'Uploading', pasteBelow: 'Paste below', copy: 'Copy', move: 'Move', edit: 'Edit', editJson: 'Edit JSON', remove: 'Remove', clickToSetValue: 'Click to set value', words: 'words', characters: 'characters', addAnother: 'Add Another', wantToClearData: 'Do you want to clear data?', yesDelete: 'Yes, delete it', waitFileProcessing: 'Processing file. Please wait...', wrongFileType: 'File is the wrong type; it must be {{ pattern }}', fileTooSmall: 'File is too small; it must be at least {{ size }}', fileTooBig: 'File is too big; it must be at most {{ size }}', noFileService: 'File Service not provided.', fileProcessingFailed: 'File processing has been failed.', readyForUpload: 'Ready to be uploaded into storage', readyForRemovingFromStorage: 'Ready to be removed from storage', preparingFileToRemove: 'Preparing file to remove', succefullyRemoved: 'Succefully removed', succefullyUploaded: 'Succefully uploaded', maxSelectItems: 'You may only select up to {{maxCount}} items', minSelectItems: 'You must select at least {{minCount}} items', clickToSign: 'Click to Sign', success: 'Success', noResultsFound: 'No results found', noChoices: 'No choices to choose from', typeToSearch: 'Type to search', loading: 'Loading' });
|
@@ -26,8 +26,8 @@ export const getBestMatch: typeof Utils.getBestMatch;
|
|
26
26
|
export const getComponentFromPath: typeof Utils.getComponentFromPath;
|
27
27
|
export const getComponentValue: typeof Utils.getComponentValue;
|
28
28
|
export const findComponents: typeof Utils.findComponents;
|
29
|
-
export const eachComponentDataAsync: (components: Component[], data: DataObject, fn: EachComponentDataAsyncCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?:
|
30
|
-
export const eachComponentData: (components: Component[], data: DataObject, fn: EachComponentDataCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?:
|
29
|
+
export const eachComponentDataAsync: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataAsyncCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined) => Promise<void>;
|
30
|
+
export const eachComponentData: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined) => void;
|
31
31
|
export const getComponentKey: typeof Utils.getComponentKey;
|
32
32
|
export const getContextualRowPath: typeof Utils.getContextualRowPath;
|
33
33
|
export const getContextualRowData: typeof Utils.getContextualRowData;
|
package/lib/cjs/utils/utils.d.ts
CHANGED
@@ -478,14 +478,6 @@ export function getDataParentComponent(componentInstance: Component): Component
|
|
478
478
|
* @returns {boolean} - TRUE if the value is a promise; FALSE otherwise
|
479
479
|
*/
|
480
480
|
export function isPromise(value: any): boolean;
|
481
|
-
/**
|
482
|
-
* Determines if the component has a scoping parent in tree (a component which scopes its children and manages its
|
483
|
-
* changes by itself, e.g. EditGrid)
|
484
|
-
* @param {Component} componentInstance - The component to check for the scoping parent.
|
485
|
-
* @param {boolean} firstPass - Whether it is the first pass of the function
|
486
|
-
* @returns {boolean|*} - TRUE if the component has a scoping parent; FALSE otherwise
|
487
|
-
*/
|
488
|
-
export function isInsideScopingComponent(componentInstance: Component, firstPass?: boolean): boolean | any;
|
489
481
|
/**
|
490
482
|
* Returns all the focusable elements within the provided dom element.
|
491
483
|
* @param {HTMLElement} element - The element to get the focusable elements from.
|
@@ -498,6 +490,15 @@ export function getFocusableElements(element: HTMLElement): NodeList<HTMLElement
|
|
498
490
|
* @returns {Array<string>|null} - The saved types for the component
|
499
491
|
*/
|
500
492
|
export function getComponentSavedTypes(fullSchema: import('@formio/core').Component): Array<string> | null;
|
493
|
+
/**
|
494
|
+
* Checks if a string has timezone information encoded in it
|
495
|
+
* Example: 2024-01-01T00:00:00Z -> true
|
496
|
+
* Example: 2024-01-01T00:00:00+03:00 -> true
|
497
|
+
* Example: 2011-05-03T00:00:00 -> false
|
498
|
+
* @param {string} value the string value to check
|
499
|
+
* @returns {boolean} if value has encoded timezone
|
500
|
+
*/
|
501
|
+
export function hasEncodedTimezone(value: string): boolean;
|
501
502
|
export * from "./formUtils";
|
502
503
|
/**
|
503
504
|
* Map values through unfold and return first non-nil value.
|