@formio/js 5.1.0-dev.6159.811e953 → 5.1.0-dev.6162.d0510e0
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/dist/formio.form.js +19 -41
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +21 -43
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +7 -7
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +7 -7
- 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/PDFBuilder.d.ts +1 -0
- package/lib/cjs/PDFBuilder.js +8 -8
- package/lib/cjs/Webform.d.ts +2 -2
- package/lib/cjs/Webform.js +4 -3
- package/lib/cjs/WebformBuilder.d.ts +1 -1
- package/lib/cjs/WebformBuilder.js +20 -8
- package/lib/cjs/components/Components.js +1 -1
- package/lib/cjs/components/_classes/component/Component.js +10 -5
- package/lib/cjs/components/_classes/input/Input.d.ts +1 -1
- package/lib/cjs/components/_classes/input/Input.js +2 -2
- package/lib/cjs/components/_classes/nested/NestedComponent.js +1 -1
- package/lib/cjs/components/datamap/DataMap.js +7 -2
- package/lib/cjs/components/select/Select.js +1 -1
- package/lib/cjs/components/textarea/TextArea.js +6 -1
- package/lib/cjs/components/textfield/TextField.js +6 -1
- package/lib/cjs/formio.form.js +2 -2
- package/lib/cjs/translations/en.d.ts +1 -233
- package/lib/cjs/translations/en.js +4 -2
- package/lib/cjs/utils/formUtils.d.ts +2 -2
- package/lib/cjs/utils/index.d.ts +2 -2
- package/lib/mjs/Element.d.ts +2 -1
- package/lib/mjs/Element.js +6 -4
- package/lib/mjs/PDFBuilder.d.ts +1 -0
- package/lib/mjs/PDFBuilder.js +8 -8
- package/lib/mjs/Webform.d.ts +2 -2
- package/lib/mjs/Webform.js +4 -3
- package/lib/mjs/WebformBuilder.d.ts +1 -1
- package/lib/mjs/WebformBuilder.js +19 -8
- package/lib/mjs/components/Components.js +1 -1
- package/lib/mjs/components/_classes/component/Component.js +10 -5
- package/lib/mjs/components/_classes/input/Input.d.ts +1 -1
- package/lib/mjs/components/_classes/input/Input.js +2 -2
- package/lib/mjs/components/_classes/nested/NestedComponent.js +1 -1
- package/lib/mjs/components/datamap/DataMap.js +7 -2
- package/lib/mjs/components/select/Select.js +1 -1
- package/lib/mjs/components/textarea/TextArea.js +6 -1
- package/lib/mjs/components/textfield/TextField.js +6 -1
- package/lib/mjs/formio.form.js +1 -1
- package/lib/mjs/translations/en.d.ts +1 -233
- package/lib/mjs/translations/en.js +7 -47
- package/lib/mjs/utils/formUtils.d.ts +2 -2
- package/lib/mjs/utils/index.d.ts +2 -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
package/lib/cjs/Element.d.ts
CHANGED
@@ -170,10 +170,11 @@ export default class Element {
|
|
170
170
|
/**
|
171
171
|
* Translate a text using the i18n system.
|
172
172
|
* @param {string|Array<string>} text - The i18n identifier.
|
173
|
+
* @param {any} data - contextual data object containing data, component, row, etc.
|
173
174
|
* @param {...any} args - The arguments to pass to the i18n translation.
|
174
175
|
* @returns {string} - The translated text.
|
175
176
|
*/
|
176
|
-
t(text: string | Array<string>, ...args: any[]): string;
|
177
|
+
t(text: string | Array<string>, data: any, ...args: any[]): string;
|
177
178
|
/**
|
178
179
|
* Alias to create a text node.
|
179
180
|
* @param {string} text - The text to create.
|
package/lib/cjs/Element.js
CHANGED
@@ -8,8 +8,9 @@ const moment_1 = __importDefault(require("moment"));
|
|
8
8
|
const vanilla_text_mask_1 = __importDefault(require("@formio/vanilla-text-mask"));
|
9
9
|
const EventEmitter_1 = __importDefault(require("./EventEmitter"));
|
10
10
|
const Formio_1 = require("./Formio");
|
11
|
-
const i18n_1 = require("./utils/i18n");
|
12
11
|
const utils_1 = __importDefault(require("./utils"));
|
12
|
+
const core_1 = require("@formio/core");
|
13
|
+
const en_1 = __importDefault(require("./translations/en"));
|
13
14
|
/**
|
14
15
|
* The root component for all elements within the Form.io renderer.
|
15
16
|
*/
|
@@ -44,7 +45,7 @@ class Element {
|
|
44
45
|
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.language) {
|
45
46
|
this.options.i18n.language = this.options.language;
|
46
47
|
}
|
47
|
-
this.options.i18next = this.i18next = this.options.i18next ||
|
48
|
+
this.options.i18next = this.i18next = this.options.i18next || core_1.I18n.init(Object.assign({ en: en_1.default }, this.options.i18n));
|
48
49
|
/**
|
49
50
|
* An instance of the EventEmitter class to handle the emitting and registration of events.
|
50
51
|
* @type {EventEmitter}
|
@@ -392,11 +393,12 @@ class Element {
|
|
392
393
|
/**
|
393
394
|
* Translate a text using the i18n system.
|
394
395
|
* @param {string|Array<string>} text - The i18n identifier.
|
396
|
+
* @param {any} data - contextual data object containing data, component, row, etc.
|
395
397
|
* @param {...any} args - The arguments to pass to the i18n translation.
|
396
398
|
* @returns {string} - The translated text.
|
397
399
|
*/
|
398
|
-
t(text, ...args) {
|
399
|
-
return this.i18next ? this.i18next.t(text, ...args) : text;
|
400
|
+
t(text, data, ...args) {
|
401
|
+
return this.i18next ? this.i18next.t(text, data, ...args) : text;
|
400
402
|
}
|
401
403
|
/**
|
402
404
|
* Alias to create a text node.
|
package/lib/cjs/PDFBuilder.d.ts
CHANGED
package/lib/cjs/PDFBuilder.js
CHANGED
@@ -451,21 +451,21 @@ class PDFBuilder extends WebformBuilder_1.default {
|
|
451
451
|
e.target.style.cursor = 'default';
|
452
452
|
}
|
453
453
|
highlightInvalidComponents() {
|
454
|
-
const
|
454
|
+
const repeatablePathsComps = this.findComponentsWithRepeatablePaths();
|
455
455
|
// update elements which path was duplicated if any pathes have been changed
|
456
|
-
if (!lodash_1.default.isEqual(this.
|
457
|
-
(0, utils_1.eachComponent)(this.webform.getComponents(), (comp
|
458
|
-
if (this.
|
456
|
+
if (!lodash_1.default.isEqual(this.repeatablePathsComps, repeatablePathsComps)) {
|
457
|
+
(0, utils_1.eachComponent)(this.webform.getComponents(), (comp) => {
|
458
|
+
if (this.repeatablePathsComps.includes(comp.component)) {
|
459
459
|
this.webform.postMessage({ name: 'updateElement', data: comp.component });
|
460
460
|
}
|
461
461
|
});
|
462
|
-
this.
|
462
|
+
this.repeatablePathsComps = repeatablePathsComps;
|
463
463
|
}
|
464
|
-
if (!
|
464
|
+
if (!repeatablePathsComps.length) {
|
465
465
|
return;
|
466
466
|
}
|
467
|
-
(0, utils_1.eachComponent)(this.webform.getComponents(), (comp
|
468
|
-
if (this.
|
467
|
+
(0, utils_1.eachComponent)(this.webform.getComponents(), (comp) => {
|
468
|
+
if (this.repeatablePathsComps.includes(comp)) {
|
469
469
|
this.webform.postMessage({
|
470
470
|
name: 'showBuilderErrors',
|
471
471
|
data: {
|
package/lib/cjs/Webform.d.ts
CHANGED
@@ -45,7 +45,7 @@
|
|
45
45
|
* @property {number} [saveDraftThrottle] - The throttle for the save draft feature.
|
46
46
|
* @property {boolean} [readOnly] - Set this form to readOnly.
|
47
47
|
* @property {boolean} [noAlerts] - Disable the alerts dialog.
|
48
|
-
* @property {{[key: string]: string}} [
|
48
|
+
* @property {{[key: string]: string}} [enTranslation] - The translation file for this rendering.
|
49
49
|
* @property {string} [template] - Custom logic for creation of elements.
|
50
50
|
* @property {boolean} [noDefaults] - Exclude default values from the settings.
|
51
51
|
* @property {any} [fileService] - The file service for this form.
|
@@ -586,7 +586,7 @@ export type FormOptions = {
|
|
586
586
|
/**
|
587
587
|
* - The translation file for this rendering.
|
588
588
|
*/
|
589
|
-
|
589
|
+
enTranslation?: {
|
590
590
|
[key: string]: string;
|
591
591
|
} | undefined;
|
592
592
|
/**
|
package/lib/cjs/Webform.js
CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const lodash_1 = __importDefault(require("lodash"));
|
7
7
|
const compare_versions_1 = require("compare-versions");
|
8
8
|
const EventEmitter_1 = __importDefault(require("./EventEmitter"));
|
9
|
-
const
|
9
|
+
const en_1 = __importDefault(require("./translations/en"));
|
10
10
|
const Formio_1 = require("./Formio");
|
11
11
|
const Components_1 = __importDefault(require("./components/Components"));
|
12
12
|
const NestedDataComponent_1 = __importDefault(require("./components/_classes/nesteddata/NestedDataComponent"));
|
@@ -99,7 +99,7 @@ function getOptions(options) {
|
|
99
99
|
* @property {number} [saveDraftThrottle] - The throttle for the save draft feature.
|
100
100
|
* @property {boolean} [readOnly] - Set this form to readOnly.
|
101
101
|
* @property {boolean} [noAlerts] - Disable the alerts dialog.
|
102
|
-
* @property {{[key: string]: string}} [
|
102
|
+
* @property {{[key: string]: string}} [enTranslation] - The translation file for this rendering.
|
103
103
|
* @property {string} [template] - Custom logic for creation of elements.
|
104
104
|
* @property {boolean} [noDefaults] - Exclude default values from the settings.
|
105
105
|
* @property {any} [fileService] - The file service for this form.
|
@@ -369,7 +369,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
369
369
|
*/
|
370
370
|
addLanguage(code, lang, active = false) {
|
371
371
|
if (this.i18next) {
|
372
|
-
var translations = lodash_1.default.assign((0, utils_1.fastCloneDeep)(
|
372
|
+
var translations = lodash_1.default.assign((0, utils_1.fastCloneDeep)(en_1.default), lang);
|
373
373
|
this.i18next.addResourceBundle(code, 'translation', translations, true, true);
|
374
374
|
if (active) {
|
375
375
|
this.language = code;
|
@@ -1320,6 +1320,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
1320
1320
|
userAgent: navigator.userAgent,
|
1321
1321
|
pathName: window.location.pathname,
|
1322
1322
|
onLine: navigator.onLine,
|
1323
|
+
language: this.language,
|
1323
1324
|
});
|
1324
1325
|
}
|
1325
1326
|
submitForm(options = {}, local = false) {
|
@@ -78,7 +78,7 @@ export default class WebformBuilder extends Component {
|
|
78
78
|
replaceDoubleQuotes(data: any, fieldsToRemoveDoubleQuotes?: any[]): any;
|
79
79
|
updateComponent(component: any, changed: any): void;
|
80
80
|
originalDefaultValue: any;
|
81
|
-
|
81
|
+
findComponentsWithRepeatablePaths(): any[];
|
82
82
|
highlightInvalidComponents(): void;
|
83
83
|
/**
|
84
84
|
* Called when a new component is saved.
|
@@ -1125,31 +1125,43 @@ class WebformBuilder extends Component_1.default {
|
|
1125
1125
|
// Called when we update a component.
|
1126
1126
|
this.emit('updateComponent', component);
|
1127
1127
|
}
|
1128
|
-
|
1129
|
-
const repeatablePaths =
|
1128
|
+
findComponentsWithRepeatablePaths() {
|
1129
|
+
const repeatablePaths = {};
|
1130
1130
|
const keys = new Map();
|
1131
1131
|
(0, utils_1.eachComponent)(this.form.components, (comp, path, components, parent, paths) => {
|
1132
|
+
var _a, _b;
|
1133
|
+
const isRadioCheckbox = comp.type === 'checkbox' && comp.inputType === 'radio';
|
1132
1134
|
const isLayout = (0, utils_1.componentInfo)(comp).layout;
|
1133
1135
|
if (!isLayout) {
|
1134
1136
|
if (keys.has(paths.dataPath)) {
|
1135
|
-
repeatablePaths
|
1137
|
+
const onlyRadioCheckboxes = ((_a = repeatablePaths[paths.dataPath]) === null || _a === void 0 ? void 0 : _a.onlyRadioCheckboxes) === false ? false : isRadioCheckbox;
|
1138
|
+
repeatablePaths[paths.dataPath] = {
|
1139
|
+
comps: [...(((_b = repeatablePaths[paths.dataPath]) === null || _b === void 0 ? void 0 : _b.comps) || []), keys.get(paths.dataPath), comp],
|
1140
|
+
onlyRadioCheckboxes,
|
1141
|
+
};
|
1136
1142
|
}
|
1137
1143
|
else {
|
1138
|
-
keys.set(paths.dataPath,
|
1144
|
+
keys.set(paths.dataPath, comp);
|
1139
1145
|
}
|
1140
1146
|
}
|
1141
1147
|
}, true);
|
1142
|
-
|
1148
|
+
const componentsWithRepeatablePaths = [];
|
1149
|
+
Object.keys(repeatablePaths).forEach((path) => {
|
1150
|
+
const { comps, onlyRadioCheckboxes } = repeatablePaths[path];
|
1151
|
+
if (!onlyRadioCheckboxes) {
|
1152
|
+
componentsWithRepeatablePaths.push(...comps);
|
1153
|
+
}
|
1154
|
+
});
|
1155
|
+
return componentsWithRepeatablePaths;
|
1143
1156
|
}
|
1144
1157
|
highlightInvalidComponents() {
|
1145
|
-
const
|
1158
|
+
const repeatablePathsComps = this.findComponentsWithRepeatablePaths();
|
1146
1159
|
let hasInvalidComponents = false;
|
1147
1160
|
// Matches anything expect letters and '_' at the beginning of the key and anything except of letters, numbers,
|
1148
1161
|
// '-', '.' and '_' in the rest of the key
|
1149
1162
|
const badCharacters = /^[^A-Za-z_]+|[^A-Za-z0-9\-._]+/g;
|
1150
1163
|
this.webform.everyComponent((comp) => {
|
1151
|
-
|
1152
|
-
if (repeatablePaths.includes(path)) {
|
1164
|
+
if (repeatablePathsComps.includes(comp.component)) {
|
1153
1165
|
comp.setCustomValidity(this.t('apiKey', { key: comp.key }));
|
1154
1166
|
hasInvalidComponents = true;
|
1155
1167
|
}
|
@@ -57,7 +57,7 @@ class Components {
|
|
57
57
|
// eslint-disable-next-line new-cap
|
58
58
|
comp = new Components.components['datagrid'](component, options, data);
|
59
59
|
}
|
60
|
-
else if (component.tree) {
|
60
|
+
else if (component.tree || (component.input && Array.isArray(component.components))) {
|
61
61
|
// eslint-disable-next-line new-cap
|
62
62
|
comp = new Components.components['nesteddata'](component, options, data);
|
63
63
|
}
|
@@ -2375,12 +2375,14 @@ class Component extends Element_1.default {
|
|
2375
2375
|
ckeditor: {
|
2376
2376
|
image: {
|
2377
2377
|
toolbar: [
|
2378
|
+
'toggleImageCaption',
|
2378
2379
|
'imageTextAlternative',
|
2379
2380
|
'|',
|
2380
|
-
'imageStyle:
|
2381
|
-
'imageStyle:
|
2382
|
-
'imageStyle:
|
2383
|
-
'
|
2381
|
+
'imageStyle:inline',
|
2382
|
+
'imageStyle:wrapText',
|
2383
|
+
'imageStyle:breakText',
|
2384
|
+
'|',
|
2385
|
+
'resizeImage'
|
2384
2386
|
],
|
2385
2387
|
styles: [
|
2386
2388
|
'full',
|
@@ -2402,7 +2404,10 @@ class Component extends Element_1.default {
|
|
2402
2404
|
if (this.component.isUploadEnabled) {
|
2403
2405
|
settings.extraPlugins.push((0, uploadAdapter_1.getFormioUploadAdapterPlugin)(this.fileService, this));
|
2404
2406
|
}
|
2405
|
-
|
2407
|
+
Formio_1.Formio.requireLibrary(`ckeditor-css`, isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', [
|
2408
|
+
{ type: 'styles', src: `${Formio_1.Formio.cdn.ckeditor}/ckeditor.css` }
|
2409
|
+
], true);
|
2410
|
+
return Formio_1.Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', lodash_1.default.get(this.options, 'editors.ckeditor.src', `${Formio_1.Formio.cdn.ckeditor}/ckeditor.umd.js`), true)
|
2406
2411
|
.then(() => {
|
2407
2412
|
if (!element.parentNode) {
|
2408
2413
|
return Promise.reject();
|
@@ -25,7 +25,7 @@ export default class Input extends Multivalue {
|
|
25
25
|
get suffix(): any;
|
26
26
|
renderElement(value: any, index: any): any;
|
27
27
|
setCounter(type: any, element: any, count: any, max: any): void;
|
28
|
-
updateValueAt(value: any, flags: any, index
|
28
|
+
updateValueAt(value: any, flags: any, index?: number): void;
|
29
29
|
getValueAt(index: any): any;
|
30
30
|
updateValue(value: any, flags: any, index: any): boolean;
|
31
31
|
parseValue(value: any): any;
|
@@ -118,7 +118,7 @@ class Input extends Multivalue_1.default {
|
|
118
118
|
}
|
119
119
|
const info = this.inputInfo;
|
120
120
|
info.attr = info.attr || {};
|
121
|
-
info.attr.value = this.getValueAsString(this.formatValue(this.parseValue(value)))
|
121
|
+
info.attr.value = this.getValueAsString(this.formatValue(this.parseValue(this.isMultipleMasksField ? value.value : value)))
|
122
122
|
.replace(/"/g, '"');
|
123
123
|
const valueMask = this.component.inputMask;
|
124
124
|
const displayMask = this.component.displayMask;
|
@@ -163,7 +163,7 @@ class Input extends Multivalue_1.default {
|
|
163
163
|
}));
|
164
164
|
}
|
165
165
|
}
|
166
|
-
updateValueAt(value, flags, index) {
|
166
|
+
updateValueAt(value, flags, index = 0) {
|
167
167
|
flags = flags || {};
|
168
168
|
if (lodash_1.default.get(this.component, 'showWordCount', false)) {
|
169
169
|
if (this.refs.wordcount && this.refs.wordcount[index]) {
|
@@ -813,7 +813,7 @@ class NestedComponent extends Field_1.default {
|
|
813
813
|
return false;
|
814
814
|
}
|
815
815
|
if (component.type === 'components') {
|
816
|
-
if (component.tree && component.hasValue(value)) {
|
816
|
+
if ((component.tree || component.hasInput) && component.hasValue(value)) {
|
817
817
|
return component.setValue(lodash_1.default.get(value, component.key), flags);
|
818
818
|
}
|
819
819
|
return component.setValue(value, flags);
|
@@ -228,6 +228,9 @@ class DataMapComponent extends DataGrid_1.default {
|
|
228
228
|
options.name += `[${rowIndex}]`;
|
229
229
|
options.row = `${rowIndex}`;
|
230
230
|
options.rowIndex = rowIndex;
|
231
|
+
options.onChange = (flags, changed, modified) => {
|
232
|
+
this.triggerChange({ modified });
|
233
|
+
};
|
231
234
|
const components = {};
|
232
235
|
components['__key'] = this.createComponent(this.keySchema, options, { __key: this.builderMode ? this.defaultRowKey : key });
|
233
236
|
components['__key'].on('componentChange', (event) => {
|
@@ -243,7 +246,9 @@ class DataMapComponent extends DataGrid_1.default {
|
|
243
246
|
valueComponent.key = key;
|
244
247
|
const componentOptions = this.options;
|
245
248
|
componentOptions.row = options.row;
|
246
|
-
|
249
|
+
const componentOptionsCloned = lodash_1.default.clone(componentOptions);
|
250
|
+
componentOptionsCloned.onChange = options.onChange;
|
251
|
+
components[this.valueKey] = this.createComponent(valueComponent, componentOptionsCloned, this.dataValue);
|
247
252
|
return components;
|
248
253
|
}
|
249
254
|
get canAddColumn() {
|
@@ -266,7 +271,7 @@ class DataMapComponent extends DataGrid_1.default {
|
|
266
271
|
const index = this.rows.length;
|
267
272
|
this.rows[index] = this.createRowComponents(this.dataValue, index);
|
268
273
|
this.redraw();
|
269
|
-
this.triggerChange();
|
274
|
+
this.triggerChange({ modified: true });
|
270
275
|
}
|
271
276
|
removeRow(index) {
|
272
277
|
const keys = Object.keys(this.dataValue);
|
@@ -1232,7 +1232,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
1232
1232
|
}
|
1233
1233
|
lodash_1.default.set(submission.metadata.selectData, this.path, templateData);
|
1234
1234
|
}
|
1235
|
-
if (flags.resetValue && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submission) && !this.options.readOnly) {
|
1235
|
+
if (flags.resetValue && !flags.fromSubmission && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submission) && !this.options.readOnly) {
|
1236
1236
|
const submission = this.root.submission;
|
1237
1237
|
if (!submission.metadata) {
|
1238
1238
|
submission.metadata = {};
|
@@ -193,7 +193,12 @@ class TextAreaComponent extends TextField_1.default {
|
|
193
193
|
const editorHeight = (numRows * 31) + 14;
|
194
194
|
editor.ui.view.editable.editableElement.style.height = `${(editorHeight)}px`;
|
195
195
|
}
|
196
|
-
|
196
|
+
if (isReadOnly) {
|
197
|
+
editor.enableReadOnlyMode(this.id);
|
198
|
+
}
|
199
|
+
else {
|
200
|
+
editor.disableReadOnlyMode(this.id);
|
201
|
+
}
|
197
202
|
editor.data.set(value);
|
198
203
|
}
|
199
204
|
editorReady(editor);
|
@@ -107,7 +107,12 @@ class TextFieldComponent extends Input_1.default {
|
|
107
107
|
// If no value is provided, then set the defaultValue.
|
108
108
|
if (!value.value) {
|
109
109
|
const defaultValue = flags.noDefault ? this.emptyValue : this.defaultValue;
|
110
|
-
|
110
|
+
if (Array.isArray(defaultValue)) {
|
111
|
+
value.value = lodash_1.default.isObject(defaultValue[0]) ? defaultValue[0].value : defaultValue;
|
112
|
+
}
|
113
|
+
else {
|
114
|
+
value.value = lodash_1.default.isObject(defaultValue) ? defaultValue.value : defaultValue;
|
115
|
+
}
|
111
116
|
}
|
112
117
|
return value;
|
113
118
|
}
|
package/lib/cjs/formio.form.js
CHANGED
@@ -28,7 +28,7 @@ const EventEmitter_1 = __importDefault(require("./EventEmitter"));
|
|
28
28
|
exports.EventEmitter = EventEmitter_1.default;
|
29
29
|
const Webform_1 = __importDefault(require("./Webform"));
|
30
30
|
exports.Webform = Webform_1.default;
|
31
|
-
const
|
31
|
+
const core_1 = require("@formio/core");
|
32
32
|
const utils_2 = require("./utils");
|
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)
|
@@ -103,7 +103,7 @@ function registerModule(mod, defaultFn = null, options = {}) {
|
|
103
103
|
(0, utils_2.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
|
@@ -1,234 +1,2 @@
|
|
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
|
-
apiKeyNotValid: string;
|
74
|
-
typeRemaining: string;
|
75
|
-
typeCount: string;
|
76
|
-
requiredDayField: string;
|
77
|
-
requiredDayEmpty: string;
|
78
|
-
requiredMonthField: string;
|
79
|
-
requiredYearField: string;
|
80
|
-
formNotReady: string;
|
81
|
-
noFormElement: string;
|
82
|
-
notUniqueKey: string;
|
83
|
-
newFormSchema: string;
|
84
|
-
missingUrl: string;
|
85
|
-
urlNotAttachedToBtn: string;
|
86
|
-
loadingProjectSettingsError: string;
|
87
|
-
sessionStorageSupportError: string;
|
88
|
-
builderUniqueError: string;
|
89
|
-
pageNotFound: string;
|
90
|
-
noDragInfoError: string;
|
91
|
-
addonSupportTypeError: string;
|
92
|
-
setPathError: string;
|
93
|
-
calculatedPathDeprecation: string;
|
94
|
-
unknownTemplate: string;
|
95
|
-
unknownComponent: string;
|
96
|
-
renderTemplateFunctionDeprecation: string;
|
97
|
-
whenReadyDeprecation: string;
|
98
|
-
loadResourcesError: string;
|
99
|
-
noSelectDataConfiguration: string;
|
100
|
-
indexedDBSupportError: string;
|
101
|
-
caretPositionSavingError: string;
|
102
|
-
iteratableRowsError: string;
|
103
|
-
checkRowDeprecation: string;
|
104
|
-
noOAuthBtn: string;
|
105
|
-
noOAuthConfiguration: string;
|
106
|
-
oAuthErrorsTitle: string;
|
107
|
-
noOAuthFormUrl: string;
|
108
|
-
oAuthStateError: string;
|
109
|
-
componentInvalidRowValidation: string;
|
110
|
-
videoPlayerNotFound: string;
|
111
|
-
synchronizationFailed: string;
|
112
|
-
fileWithDuplicatedNameInProgress: string;
|
113
|
-
fileWithDuplicatedNameLoaded: string;
|
114
|
-
nestedForm: string;
|
115
|
-
noDataProvided: string;
|
116
|
-
subformSubmissionLoadingError: string;
|
117
|
-
noDelimiterSet: string;
|
118
|
-
noSiteKey: string;
|
119
|
-
failedToNormalize: string;
|
120
|
-
failedToCompareItems: string;
|
121
|
-
editorFocusError: string;
|
122
|
-
quillImageUploadFailed: string;
|
123
|
-
noFilesSelected: string;
|
124
|
-
needConfigurationForQuill: string;
|
125
|
-
waitPdfConverting: string;
|
126
|
-
uploading: string;
|
127
|
-
pasteBelow: string;
|
128
|
-
copy: string;
|
129
|
-
move: string;
|
130
|
-
edit: string;
|
131
|
-
editJson: string;
|
132
|
-
remove: string;
|
133
|
-
clickToSetValue: string;
|
134
|
-
words: string;
|
135
|
-
characters: string;
|
136
|
-
addAnother: string;
|
137
|
-
yes: string;
|
138
|
-
no: string;
|
139
|
-
wantToClearData: string;
|
140
|
-
yesDelete: string;
|
141
|
-
waitFileProcessing: string;
|
142
|
-
wrongFileType: string;
|
143
|
-
fileTooSmall: string;
|
144
|
-
fileTooBig: string;
|
145
|
-
noFileService: string;
|
146
|
-
fileProcessingFailed: string;
|
147
|
-
readyForUpload: string;
|
148
|
-
readyForRemovingFromStorage: string;
|
149
|
-
preparingFileToRemove: string;
|
150
|
-
succefullyRemoved: string;
|
151
|
-
succefullyUploaded: string;
|
152
|
-
maxSelectItems: string;
|
153
|
-
minSelectItems: string;
|
154
|
-
clickToSign: string;
|
155
|
-
surveyQuestion: string;
|
156
|
-
surveyQuestionValue: string;
|
157
|
-
success: string;
|
158
|
-
noResultsFound: string;
|
159
|
-
noChoices: string;
|
160
|
-
typeToSearch: string;
|
161
|
-
loading: string;
|
162
|
-
help: string;
|
163
|
-
component: string;
|
164
|
-
save: string;
|
165
|
-
preview: string;
|
166
|
-
dragAndDropComponent: string;
|
167
|
-
searchFields: string;
|
168
|
-
noMatchesFound: string;
|
169
|
-
fileName: string;
|
170
|
-
size: string;
|
171
|
-
type: string;
|
172
|
-
gallery: string;
|
173
|
-
camera: string;
|
174
|
-
dropFilesToAttach: string;
|
175
|
-
useCamera: string;
|
176
|
-
browse: string;
|
177
|
-
takePicture: string;
|
178
|
-
switchToFileUpload: string;
|
179
|
-
completeStatus: string;
|
180
|
-
noStorageSet: string;
|
181
|
-
noFileApiSupport: string;
|
182
|
-
noFormDataSupport: string;
|
183
|
-
noProgressSupport: string;
|
184
|
-
close: string;
|
185
|
-
addResource: string;
|
186
|
-
autocomplete: string;
|
187
|
-
showPreview: string;
|
188
|
-
hidePreview: string;
|
189
|
-
createPage: string;
|
190
|
-
page: string;
|
191
|
-
closeBtnDescription: string;
|
192
|
-
cancelBtnDescription: string;
|
193
|
-
saveBtnDescription: string;
|
194
|
-
addOrRemove: string;
|
195
|
-
anyFileTypesAllowed: string;
|
196
|
-
allowedFileTypes: string;
|
197
|
-
syncing: string;
|
198
|
-
syncNow: string;
|
199
|
-
pressToOpen: string;
|
200
|
-
browseToAttachFileFor: string;
|
201
|
-
or: string;
|
202
|
-
numericOnly: string;
|
203
|
-
uploadPdfFile: string;
|
204
|
-
dropToStart: string;
|
205
|
-
expand: string;
|
206
|
-
collapse: string;
|
207
|
-
add: string;
|
208
|
-
delete: string;
|
209
|
-
revert: string;
|
210
|
-
removeBtnPressToRemove: string;
|
211
|
-
file: string;
|
212
|
-
captureVideo: string;
|
213
|
-
captureAudio: string;
|
214
|
-
captureImage: string;
|
215
|
-
browseFiles: string;
|
216
|
-
noComponentsSetInGrid: string;
|
217
|
-
sortAscending: string;
|
218
|
-
sortDescending: string;
|
219
|
-
filter: string;
|
220
|
-
clear: string;
|
221
|
-
showItemsWithValue: string;
|
222
|
-
gridItemsPerPage: string;
|
223
|
-
gridAllItems: string;
|
224
|
-
recordsSelectedOnPage: string;
|
225
|
-
recordsSelectedInTable: string;
|
226
|
-
gridSelectAll: string;
|
227
|
-
itemsInTable: string;
|
228
|
-
clearSelection: string;
|
229
|
-
editGridRow: string;
|
230
|
-
deleteGridRow: string;
|
231
|
-
selected: string;
|
232
|
-
actions: string;
|
233
|
-
};
|
1
|
+
declare const _default: any;
|
234
2
|
export default _default;
|