@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.
Files changed (73) hide show
  1. package/dist/formio.form.js +22 -44
  2. package/dist/formio.form.min.js +1 -1
  3. package/dist/formio.full.js +24 -46
  4. package/dist/formio.full.min.js +1 -1
  5. package/dist/formio.js +7 -7
  6. package/dist/formio.min.js +1 -1
  7. package/dist/formio.utils.js +7 -7
  8. package/dist/formio.utils.min.js +1 -1
  9. package/lib/cjs/Element.d.ts +2 -1
  10. package/lib/cjs/Element.js +6 -4
  11. package/lib/cjs/PDFBuilder.d.ts +1 -0
  12. package/lib/cjs/PDFBuilder.js +8 -8
  13. package/lib/cjs/Webform.d.ts +2 -2
  14. package/lib/cjs/Webform.js +4 -3
  15. package/lib/cjs/WebformBuilder.d.ts +1 -1
  16. package/lib/cjs/WebformBuilder.js +20 -8
  17. package/lib/cjs/components/Components.js +7 -1
  18. package/lib/cjs/components/_classes/component/Component.js +15 -5
  19. package/lib/cjs/components/_classes/input/Input.d.ts +1 -1
  20. package/lib/cjs/components/_classes/input/Input.js +2 -2
  21. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +1 -0
  22. package/lib/cjs/components/_classes/nested/NestedComponent.js +13 -3
  23. package/lib/cjs/components/address/Address.js +1 -1
  24. package/lib/cjs/components/datamap/DataMap.js +7 -2
  25. package/lib/cjs/components/editgrid/EditGrid.d.ts +0 -1
  26. package/lib/cjs/components/editgrid/EditGrid.js +0 -8
  27. package/lib/cjs/components/radio/Radio.d.ts +1 -0
  28. package/lib/cjs/components/radio/Radio.js +4 -4
  29. package/lib/cjs/components/select/Select.js +1 -1
  30. package/lib/cjs/components/textarea/TextArea.js +6 -1
  31. package/lib/cjs/components/textfield/TextField.js +6 -1
  32. package/lib/cjs/formio.form.js +2 -2
  33. package/lib/cjs/translations/en.d.ts +1 -233
  34. package/lib/cjs/translations/en.js +4 -2
  35. package/lib/cjs/utils/formUtils.d.ts +2 -2
  36. package/lib/cjs/utils/index.d.ts +2 -2
  37. package/lib/mjs/Element.d.ts +2 -1
  38. package/lib/mjs/Element.js +6 -4
  39. package/lib/mjs/PDFBuilder.d.ts +1 -0
  40. package/lib/mjs/PDFBuilder.js +8 -8
  41. package/lib/mjs/Webform.d.ts +2 -2
  42. package/lib/mjs/Webform.js +4 -3
  43. package/lib/mjs/WebformBuilder.d.ts +1 -1
  44. package/lib/mjs/WebformBuilder.js +19 -8
  45. package/lib/mjs/components/Components.js +7 -1
  46. package/lib/mjs/components/_classes/component/Component.js +15 -5
  47. package/lib/mjs/components/_classes/input/Input.d.ts +1 -1
  48. package/lib/mjs/components/_classes/input/Input.js +2 -2
  49. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +1 -0
  50. package/lib/mjs/components/_classes/nested/NestedComponent.js +13 -3
  51. package/lib/mjs/components/address/Address.js +1 -1
  52. package/lib/mjs/components/datamap/DataMap.js +7 -2
  53. package/lib/mjs/components/editgrid/EditGrid.d.ts +0 -1
  54. package/lib/mjs/components/editgrid/EditGrid.js +0 -8
  55. package/lib/mjs/components/radio/Radio.d.ts +1 -0
  56. package/lib/mjs/components/radio/Radio.js +4 -4
  57. package/lib/mjs/components/select/Select.js +1 -1
  58. package/lib/mjs/components/textarea/TextArea.js +6 -1
  59. package/lib/mjs/components/textfield/TextField.js +6 -1
  60. package/lib/mjs/formio.form.js +1 -1
  61. package/lib/mjs/translations/en.d.ts +1 -233
  62. package/lib/mjs/translations/en.js +7 -47
  63. package/lib/mjs/utils/formUtils.d.ts +2 -2
  64. package/lib/mjs/utils/index.d.ts +2 -2
  65. package/package.json +2 -2
  66. package/lib/cjs/i18n.d.ts +0 -13
  67. package/lib/cjs/i18n.js +0 -19
  68. package/lib/cjs/utils/i18n.d.ts +0 -19
  69. package/lib/cjs/utils/i18n.js +0 -120
  70. package/lib/mjs/i18n.d.ts +0 -13
  71. package/lib/mjs/i18n.js +0 -14
  72. package/lib/mjs/utils/i18n.d.ts +0 -19
  73. package/lib/mjs/utils/i18n.js +0 -112
@@ -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;
@@ -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
- exports.default = 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) || {})), { 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.', 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.', required: '{{field}} is required', unique: '{{field}} must be unique', array: '{{field}} must be an array', array_nonempty: '{{field}} must be a non-empty array', nonarray: '{{field}} must not be an array', select: '{{field}} contains an invalid selection', pattern: '{{field}} does not match the pattern {{pattern}}', minLength: '{{field}} must have at least {{length}} characters.', maxLength: '{{field}} must have no more than {{length}} characters.', minWords: '{{field}} must have at least {{length}} words.', maxWords: '{{field}} must have no more than {{length}} words.', min: '{{field}} cannot be less than {{min}}.', max: '{{field}} cannot be greater than {{max}}.', maxDate: '{{field}} should not contain date after {{maxDate}}', minDate: '{{field}} should not contain date before {{minDate}}', maxYear: '{{field}} should not contain year greater than {{maxYear}}', minYear: '{{field}} should not contain year less than {{minYear}}', minSelectedCount: 'You must select at least {{minCount}} items', maxSelectedCount: 'You may only select up to {{maxCount}} items', invalid_email: '{{field}} must be a valid email.', invalid_url: '{{field}} must be a valid url.', invalid_regex: '{{field}} does not match the pattern {{regex}}.', invalid_date: '{{field}} is not a valid date.', invalid_day: '{{field}} is not a valid day.', invalidValueProperty: 'Invalid Value Property', mask: '{{field}} does not match the mask.', valueIsNotAvailable: '{{ field }} is an invalid value.', stripe: '{{stripe}}', month: 'Month', day: 'Day', year: 'Year', january: 'January', february: 'February', march: 'March', april: 'April', may: 'May', june: 'June', july: 'July', august: 'August', september: 'September', october: 'October', november: 'November', december: 'December', 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}}', apiKeyNotValid: 'API Key is not valid: {{key}}', typeRemaining: '{{ remaining }} {{ type }} remaining.', typeCount: '{{ count }} {{ type }}', requiredDayField: '{{ field }} is required', requiredDayEmpty: '{{ field }} is required', requiredMonthField: '{{ field }} is required', requiredYearField: '{{ 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.
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}}', apiKeyNotValid: 'API Key is not valid: {{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', yes: 'Yes', no: 'No', 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', surveyQuestion: 'Question', surveyQuestionValue: 'Value', success: 'Success', noResultsFound: 'No results found', noChoices: 'No choices to choose from', typeToSearch: 'Type to search', loading: 'Loading' });
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: 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;
@@ -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;
@@ -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.
@@ -3,8 +3,9 @@ import moment from 'moment';
3
3
  import maskInput from '@formio/vanilla-text-mask';
4
4
  import EventEmitter from './EventEmitter';
5
5
  import { Formio } from './Formio';
6
- import { I18n } from './utils/i18n';
7
6
  import FormioUtils from './utils';
7
+ import { I18n } from '@formio/core';
8
+ import enTranslation from './translations/en';
8
9
  /**
9
10
  * The root component for all elements within the Form.io renderer.
10
11
  */
@@ -38,7 +39,7 @@ export default class Element {
38
39
  if (this.options?.language) {
39
40
  this.options.i18n.language = this.options.language;
40
41
  }
41
- this.options.i18next = this.i18next = this.options.i18next || I18n.init(this.options.i18n);
42
+ this.options.i18next = this.i18next = this.options.i18next || I18n.init({ en: enTranslation, ...this.options.i18n });
42
43
  /**
43
44
  * An instance of the EventEmitter class to handle the emitting and registration of events.
44
45
  * @type {EventEmitter}
@@ -385,11 +386,12 @@ export default class Element {
385
386
  /**
386
387
  * Translate a text using the i18n system.
387
388
  * @param {string|Array<string>} text - The i18n identifier.
389
+ * @param {any} data - contextual data object containing data, component, row, etc.
388
390
  * @param {...any} args - The arguments to pass to the i18n translation.
389
391
  * @returns {string} - The translated text.
390
392
  */
391
- t(text, ...args) {
392
- return this.i18next ? this.i18next.t(text, ...args) : text;
393
+ t(text, data, ...args) {
394
+ return this.i18next ? this.i18next.t(text, data, ...args) : text;
393
395
  }
394
396
  /**
395
397
  * Alias to create a text node.
@@ -51,5 +51,6 @@ export default class PDFBuilder extends WebformBuilder {
51
51
  onDropzoneDrop(e: any): boolean;
52
52
  dropEvent: any;
53
53
  onDragEnd(e: any): void;
54
+ repeatablePathsComps: any[] | undefined;
54
55
  }
55
56
  import WebformBuilder from './WebformBuilder';
@@ -444,21 +444,21 @@ export default class PDFBuilder extends WebformBuilder {
444
444
  e.target.style.cursor = 'default';
445
445
  }
446
446
  highlightInvalidComponents() {
447
- const repeatablePaths = this.findRepeatablePaths();
447
+ const repeatablePathsComps = this.findComponentsWithRepeatablePaths();
448
448
  // update elements which path was duplicated if any pathes have been changed
449
- if (!_.isEqual(this.repeatablePaths, repeatablePaths)) {
450
- eachComponent(this.webform.getComponents(), (comp, path) => {
451
- if (this.repeatablePaths.includes(path)) {
449
+ if (!_.isEqual(this.repeatablePathsComps, repeatablePathsComps)) {
450
+ eachComponent(this.webform.getComponents(), (comp) => {
451
+ if (this.repeatablePathsComps.includes(comp.component)) {
452
452
  this.webform.postMessage({ name: 'updateElement', data: comp.component });
453
453
  }
454
454
  });
455
- this.repeatablePaths = repeatablePaths;
455
+ this.repeatablePathsComps = repeatablePathsComps;
456
456
  }
457
- if (!repeatablePaths.length) {
457
+ if (!repeatablePathsComps.length) {
458
458
  return;
459
459
  }
460
- eachComponent(this.webform.getComponents(), (comp, path) => {
461
- if (this.repeatablePaths.includes(path)) {
460
+ eachComponent(this.webform.getComponents(), (comp) => {
461
+ if (this.repeatablePathsComps.includes(comp)) {
462
462
  this.webform.postMessage({
463
463
  name: 'showBuilderErrors',
464
464
  data: {
@@ -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}} [i18n] - The translation file for this rendering.
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
- i18n?: {
589
+ enTranslation?: {
590
590
  [key: string]: string;
591
591
  } | undefined;
592
592
  /**
@@ -1,7 +1,7 @@
1
1
  import _ from 'lodash';
2
2
  import { compareVersions } from 'compare-versions';
3
3
  import EventEmitter from './EventEmitter';
4
- import i18nDefaults from './i18n';
4
+ import enTranslation from './translations/en';
5
5
  import { Formio } from './Formio';
6
6
  import Components from './components/Components';
7
7
  import NestedDataComponent from './components/_classes/nesteddata/NestedDataComponent';
@@ -94,7 +94,7 @@ function getOptions(options) {
94
94
  * @property {number} [saveDraftThrottle] - The throttle for the save draft feature.
95
95
  * @property {boolean} [readOnly] - Set this form to readOnly.
96
96
  * @property {boolean} [noAlerts] - Disable the alerts dialog.
97
- * @property {{[key: string]: string}} [i18n] - The translation file for this rendering.
97
+ * @property {{[key: string]: string}} [enTranslation] - The translation file for this rendering.
98
98
  * @property {string} [template] - Custom logic for creation of elements.
99
99
  * @property {boolean} [noDefaults] - Exclude default values from the settings.
100
100
  * @property {any} [fileService] - The file service for this form.
@@ -341,7 +341,7 @@ export default class Webform extends NestedDataComponent {
341
341
  */
342
342
  addLanguage(code, lang, active = false) {
343
343
  if (this.i18next) {
344
- var translations = _.assign(fastCloneDeep(i18nDefaults.resources.en.translation), lang);
344
+ var translations = _.assign(fastCloneDeep(enTranslation), lang);
345
345
  this.i18next.addResourceBundle(code, 'translation', translations, true, true);
346
346
  if (active) {
347
347
  this.language = code;
@@ -1323,6 +1323,7 @@ export default class Webform extends NestedDataComponent {
1323
1323
  userAgent: navigator.userAgent,
1324
1324
  pathName: window.location.pathname,
1325
1325
  onLine: navigator.onLine,
1326
+ language: this.language,
1326
1327
  });
1327
1328
  }
1328
1329
  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
- findRepeatablePaths(): any[];
81
+ findComponentsWithRepeatablePaths(): any[];
82
82
  highlightInvalidComponents(): void;
83
83
  /**
84
84
  * Called when a new component is saved.
@@ -1108,31 +1108,42 @@ export default class WebformBuilder extends Component {
1108
1108
  // Called when we update a component.
1109
1109
  this.emit('updateComponent', component);
1110
1110
  }
1111
- findRepeatablePaths() {
1112
- const repeatablePaths = [];
1111
+ findComponentsWithRepeatablePaths() {
1112
+ const repeatablePaths = {};
1113
1113
  const keys = new Map();
1114
1114
  eachComponent(this.form.components, (comp, path, components, parent, paths) => {
1115
+ const isRadioCheckbox = comp.type === 'checkbox' && comp.inputType === 'radio';
1115
1116
  const isLayout = componentInfo(comp).layout;
1116
1117
  if (!isLayout) {
1117
1118
  if (keys.has(paths.dataPath)) {
1118
- repeatablePaths.push(paths.dataPath);
1119
+ const onlyRadioCheckboxes = repeatablePaths[paths.dataPath]?.onlyRadioCheckboxes === false ? false : isRadioCheckbox;
1120
+ repeatablePaths[paths.dataPath] = {
1121
+ comps: [...(repeatablePaths[paths.dataPath]?.comps || []), keys.get(paths.dataPath), comp],
1122
+ onlyRadioCheckboxes,
1123
+ };
1119
1124
  }
1120
1125
  else {
1121
- keys.set(paths.dataPath, true);
1126
+ keys.set(paths.dataPath, comp);
1122
1127
  }
1123
1128
  }
1124
1129
  }, true);
1125
- return repeatablePaths;
1130
+ const componentsWithRepeatablePaths = [];
1131
+ Object.keys(repeatablePaths).forEach((path) => {
1132
+ const { comps, onlyRadioCheckboxes } = repeatablePaths[path];
1133
+ if (!onlyRadioCheckboxes) {
1134
+ componentsWithRepeatablePaths.push(...comps);
1135
+ }
1136
+ });
1137
+ return componentsWithRepeatablePaths;
1126
1138
  }
1127
1139
  highlightInvalidComponents() {
1128
- const repeatablePaths = this.findRepeatablePaths();
1140
+ const repeatablePathsComps = this.findComponentsWithRepeatablePaths();
1129
1141
  let hasInvalidComponents = false;
1130
1142
  // Matches anything expect letters and '_' at the beginning of the key and anything except of letters, numbers,
1131
1143
  // '-', '.' and '_' in the rest of the key
1132
1144
  const badCharacters = /^[^A-Za-z_]+|[^A-Za-z0-9\-._]+/g;
1133
1145
  this.webform.everyComponent((comp) => {
1134
- const path = comp.path;
1135
- if (repeatablePaths.includes(path)) {
1146
+ if (repeatablePathsComps.includes(comp.component)) {
1136
1147
  comp.setCustomValidity(this.t('apiKey', { key: comp.key }));
1137
1148
  hasInvalidComponents = true;
1138
1149
  }
@@ -54,7 +54,7 @@ export default class Components {
54
54
  // eslint-disable-next-line new-cap
55
55
  comp = new Components.components['datagrid'](component, options, data);
56
56
  }
57
- else if (component.tree) {
57
+ else if (component.tree || (component.input && Array.isArray(component.components))) {
58
58
  // eslint-disable-next-line new-cap
59
59
  comp = new Components.components['nesteddata'](component, options, data);
60
60
  }
@@ -72,6 +72,12 @@ export default class Components {
72
72
  if (comp.path) {
73
73
  comp.componentsMap[comp.path] = comp;
74
74
  }
75
+ // Reset the componentMatches on the root element if any new component is created.
76
+ let parent = comp.parent;
77
+ while (parent) {
78
+ parent.componentMatches = {};
79
+ parent = parent.parent;
80
+ }
75
81
  return comp;
76
82
  }
77
83
  }
@@ -2364,12 +2364,14 @@ export default class Component extends Element {
2364
2364
  ckeditor: {
2365
2365
  image: {
2366
2366
  toolbar: [
2367
+ 'toggleImageCaption',
2367
2368
  'imageTextAlternative',
2368
2369
  '|',
2369
- 'imageStyle:full',
2370
- 'imageStyle:alignLeft',
2371
- 'imageStyle:alignCenter',
2372
- 'imageStyle:alignRight'
2370
+ 'imageStyle:inline',
2371
+ 'imageStyle:wrapText',
2372
+ 'imageStyle:breakText',
2373
+ '|',
2374
+ 'resizeImage'
2373
2375
  ],
2374
2376
  styles: [
2375
2377
  'full',
@@ -2391,7 +2393,10 @@ export default class Component extends Element {
2391
2393
  if (this.component.isUploadEnabled) {
2392
2394
  settings.extraPlugins.push(getFormioUploadAdapterPlugin(this.fileService, this));
2393
2395
  }
2394
- return Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', _.get(this.options, 'editors.ckeditor.src', `${Formio.cdn.ckeditor}/ckeditor.js`), true)
2396
+ Formio.requireLibrary(`ckeditor-css`, isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', [
2397
+ { type: 'styles', src: `${Formio.cdn.ckeditor}/ckeditor.css` }
2398
+ ], true);
2399
+ return Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', _.get(this.options, 'editors.ckeditor.src', `${Formio.cdn.ckeditor}/ckeditor.umd.js`), true)
2395
2400
  .then(() => {
2396
2401
  if (!element.parentNode) {
2397
2402
  return Promise.reject();
@@ -2702,6 +2707,11 @@ export default class Component extends Element {
2702
2707
  this.setValueAt(i, isArray && !this.isSingleInputValue() ? value[i] : value, flags);
2703
2708
  }
2704
2709
  }
2710
+ // Also reset value of the modal component, otherwise it will keep the old value locally and the preview
2711
+ // element won't refresh
2712
+ if (this.componentModal && flags && flags.resetValue) {
2713
+ this.componentModal.setValue(value);
2714
+ }
2705
2715
  return changed;
2706
2716
  }
2707
2717
  /**
@@ -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: any): void;
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;
@@ -113,7 +113,7 @@ export default class Input extends Multivalue {
113
113
  }
114
114
  const info = this.inputInfo;
115
115
  info.attr = info.attr || {};
116
- info.attr.value = this.getValueAsString(this.formatValue(this.parseValue(value)))
116
+ info.attr.value = this.getValueAsString(this.formatValue(this.parseValue(this.isMultipleMasksField ? value.value : value)))
117
117
  .replace(/"/g, '&quot;');
118
118
  const valueMask = this.component.inputMask;
119
119
  const displayMask = this.component.displayMask;
@@ -158,7 +158,7 @@ export default class Input extends Multivalue {
158
158
  }));
159
159
  }
160
160
  }
161
- updateValueAt(value, flags, index) {
161
+ updateValueAt(value, flags, index = 0) {
162
162
  flags = flags || {};
163
163
  if (_.get(this.component, 'showWordCount', false)) {
164
164
  if (this.refs.wordcount && this.refs.wordcount[index]) {
@@ -108,6 +108,7 @@ export default class NestedComponent extends Field {
108
108
  * @returns {any} - The component that is located.
109
109
  */
110
110
  getComponent(path: string): any;
111
+ componentMatches: {} | undefined;
111
112
  /**
112
113
  * Return a component provided the Id of the component.
113
114
  * @param {string} id - The Id of the component.