@formio/js 5.1.0-dev.6159.811e953 → 5.1.0-dev.6166.dce1c56
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 +22 -44
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +24 -46
- 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 +7 -1
- package/lib/cjs/components/_classes/component/Component.js +15 -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.d.ts +1 -0
- package/lib/cjs/components/_classes/nested/NestedComponent.js +13 -3
- package/lib/cjs/components/address/Address.js +1 -1
- package/lib/cjs/components/datamap/DataMap.js +7 -2
- package/lib/cjs/components/editgrid/EditGrid.d.ts +0 -1
- package/lib/cjs/components/editgrid/EditGrid.js +0 -8
- package/lib/cjs/components/radio/Radio.d.ts +1 -0
- package/lib/cjs/components/radio/Radio.js +4 -4
- 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 +7 -1
- package/lib/mjs/components/_classes/component/Component.js +15 -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.d.ts +1 -0
- package/lib/mjs/components/_classes/nested/NestedComponent.js +13 -3
- package/lib/mjs/components/address/Address.js +1 -1
- package/lib/mjs/components/datamap/DataMap.js +7 -2
- package/lib/mjs/components/editgrid/EditGrid.d.ts +0 -1
- package/lib/mjs/components/editgrid/EditGrid.js +0 -8
- package/lib/mjs/components/radio/Radio.d.ts +1 -0
- package/lib/mjs/components/radio/Radio.js +4 -4
- 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
@@ -308,6 +308,13 @@ export default class NestedComponent extends Field {
|
|
308
308
|
* @returns {any} - The component that is located.
|
309
309
|
*/
|
310
310
|
getComponent(path) {
|
311
|
+
// If the component is found
|
312
|
+
if (!this.componentMatches) {
|
313
|
+
this.componentMatches = {};
|
314
|
+
}
|
315
|
+
if (this.componentMatches && this.componentMatches[path]) {
|
316
|
+
return this.componentMatches[path];
|
317
|
+
}
|
311
318
|
path = FormioUtils.getStringFromComponentPath(path);
|
312
319
|
const matches = {
|
313
320
|
path: undefined,
|
@@ -332,7 +339,8 @@ export default class NestedComponent extends Field {
|
|
332
339
|
return match;
|
333
340
|
});
|
334
341
|
});
|
335
|
-
|
342
|
+
this.componentMatches[path] = FormioUtils.getBestMatch(matches)?.instance;
|
343
|
+
return this.componentMatches[path];
|
336
344
|
}
|
337
345
|
/**
|
338
346
|
* Return a component provided the Id of the component.
|
@@ -795,8 +803,10 @@ export default class NestedComponent extends Field {
|
|
795
803
|
return this.data;
|
796
804
|
}
|
797
805
|
resetValue() {
|
798
|
-
|
806
|
+
// Reset values of child components first, then reset the parent one, otherwise it will restore the default
|
807
|
+
// value of parent component and clear it one by one while resetting child components
|
799
808
|
this.getComponents().forEach((comp) => comp.resetValue());
|
809
|
+
super.resetValue();
|
800
810
|
this.setPristine(true);
|
801
811
|
}
|
802
812
|
get dataReady() {
|
@@ -808,7 +818,7 @@ export default class NestedComponent extends Field {
|
|
808
818
|
return false;
|
809
819
|
}
|
810
820
|
if (component.type === 'components') {
|
811
|
-
if (component.tree && component.hasValue(value)) {
|
821
|
+
if ((component.tree || component.hasInput) && component.hasValue(value)) {
|
812
822
|
return component.setValue(_.get(value, component.key), flags);
|
813
823
|
}
|
814
824
|
return component.setValue(value, flags);
|
@@ -245,7 +245,7 @@ export default class AddressComponent extends ContainerComponent {
|
|
245
245
|
if (this.manualMode) {
|
246
246
|
this.restoreComponentsContext();
|
247
247
|
}
|
248
|
-
if (changed || !_.isEmpty(value) && flags.fromSubmission) {
|
248
|
+
if (changed || !_.isEmpty(value) && flags.fromSubmission || flags.resetValue) {
|
249
249
|
this.redraw();
|
250
250
|
}
|
251
251
|
return changed;
|
@@ -223,6 +223,9 @@ export default class DataMapComponent extends DataGridComponent {
|
|
223
223
|
options.name += `[${rowIndex}]`;
|
224
224
|
options.row = `${rowIndex}`;
|
225
225
|
options.rowIndex = rowIndex;
|
226
|
+
options.onChange = (flags, changed, modified) => {
|
227
|
+
this.triggerChange({ modified });
|
228
|
+
};
|
226
229
|
const components = {};
|
227
230
|
components['__key'] = this.createComponent(this.keySchema, options, { __key: this.builderMode ? this.defaultRowKey : key });
|
228
231
|
components['__key'].on('componentChange', (event) => {
|
@@ -238,7 +241,9 @@ export default class DataMapComponent extends DataGridComponent {
|
|
238
241
|
valueComponent.key = key;
|
239
242
|
const componentOptions = this.options;
|
240
243
|
componentOptions.row = options.row;
|
241
|
-
|
244
|
+
const componentOptionsCloned = _.clone(componentOptions);
|
245
|
+
componentOptionsCloned.onChange = options.onChange;
|
246
|
+
components[this.valueKey] = this.createComponent(valueComponent, componentOptionsCloned, this.dataValue);
|
242
247
|
return components;
|
243
248
|
}
|
244
249
|
get canAddColumn() {
|
@@ -261,7 +266,7 @@ export default class DataMapComponent extends DataGridComponent {
|
|
261
266
|
const index = this.rows.length;
|
262
267
|
this.rows[index] = this.createRowComponents(this.dataValue, index);
|
263
268
|
this.redraw();
|
264
|
-
this.triggerChange();
|
269
|
+
this.triggerChange({ modified: true });
|
265
270
|
}
|
266
271
|
removeRow(index) {
|
267
272
|
const keys = Object.keys(this.dataValue);
|
@@ -101,7 +101,6 @@ export default class EditGridComponent extends NestedArrayComponent {
|
|
101
101
|
changeState(changed: any, flags: any): void;
|
102
102
|
openWhenEmpty(): void;
|
103
103
|
restoreRowContext(editRow: any, flags?: {}): void;
|
104
|
-
emptyRows(): void;
|
105
104
|
hasChanged: (newValue: any, oldValue: any) => boolean;
|
106
105
|
}
|
107
106
|
import NestedArrayComponent from '../_classes/nestedarray/NestedArrayComponent';
|
@@ -1192,13 +1192,5 @@ export default class EditGridComponent extends NestedArrayComponent {
|
|
1192
1192
|
this.setNestedValue(component, editRow.data, flags);
|
1193
1193
|
});
|
1194
1194
|
}
|
1195
|
-
emptyRows() {
|
1196
|
-
this.editRows.forEach((editRow, index) => this.destroyComponents(false, index));
|
1197
|
-
this.editRows = [];
|
1198
|
-
}
|
1199
|
-
resetValue() {
|
1200
|
-
super.resetValue();
|
1201
|
-
this.emptyRows();
|
1202
|
-
}
|
1203
1195
|
}
|
1204
1196
|
EditGridComponent.prototype.hasChanged = Component.prototype.hasChanged;
|
@@ -16,6 +16,7 @@ export default class RadioComponent extends ListComponent {
|
|
16
16
|
static savedValueTypes(schema: any): any[];
|
17
17
|
constructor(component: any, options: any, data: any);
|
18
18
|
previousValue: any;
|
19
|
+
uncheckValue(flags?: {}): void;
|
19
20
|
get inputInfo(): any;
|
20
21
|
get emptyValue(): string;
|
21
22
|
get isRadio(): boolean;
|
@@ -80,13 +80,15 @@ export default class RadioComponent extends ListComponent {
|
|
80
80
|
}
|
81
81
|
return defaultValue;
|
82
82
|
}
|
83
|
-
|
83
|
+
uncheckValue(flags = {}) {
|
84
84
|
this.unset();
|
85
85
|
this.setValue(this.emptyValue, {
|
86
86
|
noUpdateEvent: true,
|
87
87
|
noValidate: true,
|
88
88
|
resetValue: true
|
89
89
|
});
|
90
|
+
this.triggerChange(flags);
|
91
|
+
this.setSelectedClasses();
|
90
92
|
}
|
91
93
|
get inputInfo() {
|
92
94
|
const info = super.elementInfo();
|
@@ -400,9 +402,7 @@ export default class RadioComponent extends ListComponent {
|
|
400
402
|
this.currentValue = this.dataValue;
|
401
403
|
const shouldResetValue = flags && flags.modified && !flags.noUpdateEvent && this.previousValue === this.currentValue;
|
402
404
|
if (shouldResetValue) {
|
403
|
-
this.
|
404
|
-
this.triggerChange(flags);
|
405
|
-
this.setSelectedClasses();
|
405
|
+
this.uncheckValue(flags);
|
406
406
|
}
|
407
407
|
this.previousValue = this.dataValue;
|
408
408
|
return changed;
|
@@ -1261,7 +1261,7 @@ export default class SelectComponent extends ListComponent {
|
|
1261
1261
|
}
|
1262
1262
|
_.set(submission.metadata.selectData, this.path, templateData);
|
1263
1263
|
}
|
1264
|
-
if (flags.resetValue && this.root?.submission && !this.options.readOnly) {
|
1264
|
+
if (flags.resetValue && !flags.fromSubmission && this.root?.submission && !this.options.readOnly) {
|
1265
1265
|
const submission = this.root.submission;
|
1266
1266
|
if (!submission.metadata) {
|
1267
1267
|
submission.metadata = {};
|
@@ -188,7 +188,12 @@ export default class TextAreaComponent extends TextFieldComponent {
|
|
188
188
|
const editorHeight = (numRows * 31) + 14;
|
189
189
|
editor.ui.view.editable.editableElement.style.height = `${(editorHeight)}px`;
|
190
190
|
}
|
191
|
-
|
191
|
+
if (isReadOnly) {
|
192
|
+
editor.enableReadOnlyMode(this.id);
|
193
|
+
}
|
194
|
+
else {
|
195
|
+
editor.disableReadOnlyMode(this.id);
|
196
|
+
}
|
192
197
|
editor.data.set(value);
|
193
198
|
}
|
194
199
|
editorReady(editor);
|
@@ -114,7 +114,12 @@ export default class TextFieldComponent extends Input {
|
|
114
114
|
// If no value is provided, then set the defaultValue.
|
115
115
|
if (!value.value) {
|
116
116
|
const defaultValue = flags.noDefault ? this.emptyValue : this.defaultValue;
|
117
|
-
|
117
|
+
if (Array.isArray(defaultValue)) {
|
118
|
+
value.value = _.isObject(defaultValue[0]) ? defaultValue[0].value : defaultValue;
|
119
|
+
}
|
120
|
+
else {
|
121
|
+
value.value = _.isObject(defaultValue) ? defaultValue.value : defaultValue;
|
122
|
+
}
|
118
123
|
}
|
119
124
|
return value;
|
120
125
|
}
|
package/lib/mjs/formio.form.js
CHANGED
@@ -11,7 +11,7 @@ import Utils from './utils';
|
|
11
11
|
import Licenses from './licenses';
|
12
12
|
import EventEmitter from './EventEmitter';
|
13
13
|
import Webform from './Webform';
|
14
|
-
import { I18n } from '
|
14
|
+
import { I18n } from '@formio/core';
|
15
15
|
import { Evaluator, registerEvaluator } from './utils';
|
16
16
|
Formio.loadModules = (path = `${Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {
|
17
17
|
Formio.requireLibrary(name, name, path, true)
|
@@ -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;
|
@@ -1,59 +1,26 @@
|
|
1
1
|
import bootstrap from '@formio/bootstrap';
|
2
|
+
import { coreEnTranslation } from '@formio/core';
|
3
|
+
import _ from 'lodash';
|
2
4
|
export default {
|
3
5
|
...(bootstrap?.translations?.en || {}),
|
6
|
+
// these keys contain a '-' to strip whitespace in core
|
7
|
+
// which is not handled correctly in the renderer, so we redefine them
|
8
|
+
..._.omit(coreEnTranslation, ['maxDate', 'minDate']),
|
4
9
|
unsavedRowsError: 'Please save all rows before proceeding.',
|
5
10
|
invalidRowsError: 'Please correct invalid rows before proceeding.',
|
6
11
|
invalidRowError: 'Invalid row. Please correct it or delete.',
|
7
12
|
invalidOption: '{{field}} is an invalid value.',
|
8
13
|
invalidDay: '{{field}} is not a valid day.',
|
14
|
+
alertMessageWithLabel: '{{label}}: {{message}}',
|
15
|
+
alertMessage: '{{message}}',
|
9
16
|
complete: 'Submission Complete',
|
10
17
|
error: 'Please fix the following errors before submitting.',
|
11
18
|
errorListHotkey: 'Press Ctrl + Alt + X to go back to the error list.',
|
12
19
|
errorsListNavigationMessage: 'Click to navigate to the field with following error.',
|
13
20
|
submitError: 'Please check the form and correct all errors before submitting.',
|
14
|
-
required: '{{field}} is required',
|
15
|
-
unique: '{{field}} must be unique',
|
16
|
-
array: '{{field}} must be an array',
|
17
|
-
array_nonempty: '{{field}} must be a non-empty array', // eslint-disable-line camelcase
|
18
|
-
nonarray: '{{field}} must not be an array',
|
19
|
-
select: '{{field}} contains an invalid selection',
|
20
|
-
pattern: '{{field}} does not match the pattern {{pattern}}',
|
21
|
-
minLength: '{{field}} must have at least {{length}} characters.',
|
22
|
-
maxLength: '{{field}} must have no more than {{length}} characters.',
|
23
|
-
minWords: '{{field}} must have at least {{length}} words.',
|
24
|
-
maxWords: '{{field}} must have no more than {{length}} words.',
|
25
|
-
min: '{{field}} cannot be less than {{min}}.',
|
26
|
-
max: '{{field}} cannot be greater than {{max}}.',
|
27
21
|
maxDate: '{{field}} should not contain date after {{maxDate}}',
|
28
22
|
minDate: '{{field}} should not contain date before {{minDate}}',
|
29
|
-
maxYear: '{{field}} should not contain year greater than {{maxYear}}',
|
30
|
-
minYear: '{{field}} should not contain year less than {{minYear}}',
|
31
|
-
minSelectedCount: 'You must select at least {{minCount}} items',
|
32
|
-
maxSelectedCount: 'You may only select up to {{maxCount}} items',
|
33
|
-
invalid_email: '{{field}} must be a valid email.', // eslint-disable-line camelcase
|
34
|
-
invalid_url: '{{field}} must be a valid url.', // eslint-disable-line camelcase
|
35
|
-
invalid_regex: '{{field}} does not match the pattern {{regex}}.', // eslint-disable-line camelcase
|
36
|
-
invalid_date: '{{field}} is not a valid date.', // eslint-disable-line camelcase
|
37
|
-
invalid_day: '{{field}} is not a valid day.', // eslint-disable-line camelcase
|
38
|
-
invalidValueProperty: 'Invalid Value Property',
|
39
|
-
mask: '{{field}} does not match the mask.',
|
40
|
-
valueIsNotAvailable: '{{ field }} is an invalid value.',
|
41
23
|
stripe: '{{stripe}}',
|
42
|
-
month: 'Month',
|
43
|
-
day: 'Day',
|
44
|
-
year: 'Year',
|
45
|
-
january: 'January',
|
46
|
-
february: 'February',
|
47
|
-
march: 'March',
|
48
|
-
april: 'April',
|
49
|
-
may: 'May',
|
50
|
-
june: 'June',
|
51
|
-
july: 'July',
|
52
|
-
august: 'August',
|
53
|
-
september: 'September',
|
54
|
-
october: 'October',
|
55
|
-
november: 'November',
|
56
|
-
december: 'December',
|
57
24
|
next: 'Next',
|
58
25
|
previous: 'Previous',
|
59
26
|
cancel: 'Cancel',
|
@@ -75,10 +42,7 @@ export default {
|
|
75
42
|
apiKeyNotValid: 'API Key is not valid: {{key}}',
|
76
43
|
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
77
44
|
typeCount: '{{ count }} {{ type }}',
|
78
|
-
requiredDayField: '{{ field }} is required',
|
79
45
|
requiredDayEmpty: '{{ field }} is required',
|
80
|
-
requiredMonthField: '{{ field }} is required',
|
81
|
-
requiredYearField: '{{ field }} is required',
|
82
46
|
formNotReady: 'Form not ready. Use form.ready promise',
|
83
47
|
noFormElement: 'No DOM element for form.',
|
84
48
|
notUniqueKey: 'API Key is not unique',
|
@@ -138,8 +102,6 @@ export default {
|
|
138
102
|
words: 'words',
|
139
103
|
characters: 'characters',
|
140
104
|
addAnother: 'Add Another',
|
141
|
-
yes: 'Yes',
|
142
|
-
no: 'No',
|
143
105
|
wantToClearData: 'Do you want to clear data?',
|
144
106
|
yesDelete: 'Yes, delete it',
|
145
107
|
waitFileProcessing: 'Processing file. Please wait...',
|
@@ -156,8 +118,6 @@ export default {
|
|
156
118
|
maxSelectItems: 'You may only select up to {{maxCount}} items',
|
157
119
|
minSelectItems: 'You must select at least {{minCount}} items',
|
158
120
|
clickToSign: 'Click to Sign',
|
159
|
-
surveyQuestion: 'Question',
|
160
|
-
surveyQuestionValue: 'Value',
|
161
121
|
success: 'Success',
|
162
122
|
noResultsFound: 'No results found',
|
163
123
|
noChoices: 'No choices to choose from',
|
@@ -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: 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;
|
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, noScopeReset?: boolean | 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, noScopeReset?: boolean | 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/mjs/utils/index.d.ts
CHANGED
@@ -37,8 +37,8 @@ declare const FormioUtils: {
|
|
37
37
|
getComponentFromPath: typeof import("@formio/core/lib/utils/formUtil").getComponentFromPath;
|
38
38
|
getComponentValue: typeof import("@formio/core/lib/utils/formUtil").getComponentValue;
|
39
39
|
findComponents: typeof import("@formio/core/lib/utils/formUtil").findComponents;
|
40
|
-
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>;
|
41
|
-
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;
|
40
|
+
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, noScopeReset?: boolean | undefined) => Promise<void>;
|
41
|
+
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, noScopeReset?: boolean | undefined) => void;
|
42
42
|
getComponentKey: typeof import("@formio/core/lib/utils/formUtil").getComponentKey;
|
43
43
|
getContextualRowPath: typeof import("@formio/core/lib/utils/formUtil").getContextualRowPath;
|
44
44
|
getContextualRowData: typeof import("@formio/core/lib/utils/formUtil").getContextualRowData;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@formio/js",
|
3
|
-
"version": "5.1.0-dev.
|
3
|
+
"version": "5.1.0-dev.6166.dce1c56",
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
5
5
|
"main": "lib/cjs/index.js",
|
6
6
|
"exports": {
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"homepage": "https://github.com/formio/formio.js#readme",
|
82
82
|
"dependencies": {
|
83
83
|
"@formio/bootstrap": "v3.0.0-dev.121.085d187",
|
84
|
-
"@formio/core": "
|
84
|
+
"@formio/core": "2.4.0-dev.267.2866472",
|
85
85
|
"@formio/text-mask-addons": "3.8.0-formio.4",
|
86
86
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
87
87
|
"abortcontroller-polyfill": "^1.7.5",
|
package/lib/cjs/i18n.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
declare namespace _default {
|
2
|
-
let lng: string;
|
3
|
-
let nsSeparator: string;
|
4
|
-
let keySeparator: string;
|
5
|
-
let pluralSeparator: string;
|
6
|
-
let contextSeparator: string;
|
7
|
-
namespace resources {
|
8
|
-
namespace en {
|
9
|
-
let translation: any;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
}
|
13
|
-
export default _default;
|
package/lib/cjs/i18n.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const en_1 = __importDefault(require("./translations/en"));
|
7
|
-
const utils_1 = require("./utils");
|
8
|
-
exports.default = {
|
9
|
-
lng: 'en',
|
10
|
-
nsSeparator: '::',
|
11
|
-
keySeparator: '.|.',
|
12
|
-
pluralSeparator: '._.',
|
13
|
-
contextSeparator: '._.',
|
14
|
-
resources: {
|
15
|
-
en: {
|
16
|
-
translation: (0, utils_1.fastCloneDeep)(en_1.default)
|
17
|
-
}
|
18
|
-
}
|
19
|
-
};
|
package/lib/cjs/utils/i18n.d.ts
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file is used to mimic the i18n library interface.
|
3
|
-
*/
|
4
|
-
export class I18n {
|
5
|
-
static languages: {};
|
6
|
-
static setDefaultTranslations(languages: any): void;
|
7
|
-
static init(languages?: {}): I18n;
|
8
|
-
static createInstance(): I18n;
|
9
|
-
constructor(languages?: {});
|
10
|
-
languages: any;
|
11
|
-
defaultKeys: any;
|
12
|
-
language: string;
|
13
|
-
currentLanguage: any;
|
14
|
-
setLanguages(languages: any, noDefaultOverride: any): void;
|
15
|
-
dir(lang?: string): "rtl" | "ltr";
|
16
|
-
changeLanguage(language: any, ready?: null): void;
|
17
|
-
addResourceBundle(language: any, type: any, strings: any): void;
|
18
|
-
t(text: any, ...args: any[]): any;
|
19
|
-
}
|