@formio/js 5.1.0-dev.6156.9cd5779 → 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.
Files changed (75) hide show
  1. package/dist/formio.builder.css +1 -0
  2. package/dist/formio.builder.min.css +1 -1
  3. package/dist/formio.form.css +1 -0
  4. package/dist/formio.form.js +21 -43
  5. package/dist/formio.form.min.css +1 -1
  6. package/dist/formio.form.min.js +1 -1
  7. package/dist/formio.full.css +1 -0
  8. package/dist/formio.full.js +23 -45
  9. package/dist/formio.full.min.css +1 -1
  10. package/dist/formio.full.min.js +1 -1
  11. package/dist/formio.js +8 -8
  12. package/dist/formio.min.js +1 -1
  13. package/dist/formio.utils.js +9 -9
  14. package/dist/formio.utils.min.js +1 -1
  15. package/lib/cjs/Element.d.ts +2 -1
  16. package/lib/cjs/Element.js +6 -4
  17. package/lib/cjs/PDFBuilder.d.ts +1 -0
  18. package/lib/cjs/PDFBuilder.js +8 -8
  19. package/lib/cjs/Webform.d.ts +2 -2
  20. package/lib/cjs/Webform.js +4 -3
  21. package/lib/cjs/WebformBuilder.d.ts +1 -1
  22. package/lib/cjs/WebformBuilder.js +36 -11
  23. package/lib/cjs/components/Components.js +1 -1
  24. package/lib/cjs/components/_classes/component/Component.js +10 -5
  25. package/lib/cjs/components/_classes/input/Input.d.ts +1 -1
  26. package/lib/cjs/components/_classes/input/Input.js +2 -2
  27. package/lib/cjs/components/_classes/nested/NestedComponent.js +2 -2
  28. package/lib/cjs/components/radio/Radio.d.ts +8 -0
  29. package/lib/cjs/components/radio/Radio.js +15 -5
  30. package/lib/cjs/components/select/Select.d.ts +1 -0
  31. package/lib/cjs/components/select/Select.js +19 -3
  32. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +6 -0
  33. package/lib/cjs/components/textarea/TextArea.js +6 -1
  34. package/lib/cjs/components/textfield/TextField.js +6 -1
  35. package/lib/cjs/formio.form.js +2 -2
  36. package/lib/cjs/translations/en.d.ts +1 -232
  37. package/lib/cjs/translations/en.js +4 -2
  38. package/lib/cjs/utils/formUtils.d.ts +2 -2
  39. package/lib/cjs/utils/index.d.ts +2 -2
  40. package/lib/cjs/utils/utils.js +10 -3
  41. package/lib/mjs/Element.d.ts +2 -1
  42. package/lib/mjs/Element.js +6 -4
  43. package/lib/mjs/PDFBuilder.d.ts +1 -0
  44. package/lib/mjs/PDFBuilder.js +8 -8
  45. package/lib/mjs/Webform.d.ts +2 -2
  46. package/lib/mjs/Webform.js +4 -3
  47. package/lib/mjs/WebformBuilder.d.ts +1 -1
  48. package/lib/mjs/WebformBuilder.js +36 -12
  49. package/lib/mjs/components/Components.js +1 -1
  50. package/lib/mjs/components/_classes/component/Component.js +10 -5
  51. package/lib/mjs/components/_classes/input/Input.d.ts +1 -1
  52. package/lib/mjs/components/_classes/input/Input.js +2 -2
  53. package/lib/mjs/components/_classes/nested/NestedComponent.js +2 -2
  54. package/lib/mjs/components/radio/Radio.d.ts +8 -0
  55. package/lib/mjs/components/radio/Radio.js +15 -5
  56. package/lib/mjs/components/select/Select.d.ts +1 -0
  57. package/lib/mjs/components/select/Select.js +19 -3
  58. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +6 -0
  59. package/lib/mjs/components/textarea/TextArea.js +6 -1
  60. package/lib/mjs/components/textfield/TextField.js +6 -1
  61. package/lib/mjs/formio.form.js +1 -1
  62. package/lib/mjs/translations/en.d.ts +1 -232
  63. package/lib/mjs/translations/en.js +8 -47
  64. package/lib/mjs/utils/formUtils.d.ts +2 -2
  65. package/lib/mjs/utils/index.d.ts +2 -2
  66. package/lib/mjs/utils/utils.js +10 -2
  67. package/package.json +2 -2
  68. package/lib/cjs/i18n.d.ts +0 -13
  69. package/lib/cjs/i18n.js +0 -19
  70. package/lib/cjs/utils/i18n.d.ts +0 -19
  71. package/lib/cjs/utils/i18n.js +0 -120
  72. package/lib/mjs/i18n.d.ts +0 -13
  73. package/lib/mjs/i18n.js +0 -14
  74. package/lib/mjs/utils/i18n.d.ts +0 -19
  75. package/lib/mjs/utils/i18n.js +0 -112
@@ -1,233 +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
- typeRemaining: string;
74
- typeCount: string;
75
- requiredDayField: string;
76
- requiredDayEmpty: string;
77
- requiredMonthField: string;
78
- requiredYearField: string;
79
- formNotReady: string;
80
- noFormElement: string;
81
- notUniqueKey: string;
82
- newFormSchema: string;
83
- missingUrl: string;
84
- urlNotAttachedToBtn: string;
85
- loadingProjectSettingsError: string;
86
- sessionStorageSupportError: string;
87
- builderUniqueError: string;
88
- pageNotFound: string;
89
- noDragInfoError: string;
90
- addonSupportTypeError: string;
91
- setPathError: string;
92
- calculatedPathDeprecation: string;
93
- unknownTemplate: string;
94
- unknownComponent: string;
95
- renderTemplateFunctionDeprecation: string;
96
- whenReadyDeprecation: string;
97
- loadResourcesError: string;
98
- noSelectDataConfiguration: string;
99
- indexedDBSupportError: string;
100
- caretPositionSavingError: string;
101
- iteratableRowsError: string;
102
- checkRowDeprecation: string;
103
- noOAuthBtn: string;
104
- noOAuthConfiguration: string;
105
- oAuthErrorsTitle: string;
106
- noOAuthFormUrl: string;
107
- oAuthStateError: string;
108
- componentInvalidRowValidation: string;
109
- videoPlayerNotFound: string;
110
- synchronizationFailed: string;
111
- fileWithDuplicatedNameInProgress: string;
112
- fileWithDuplicatedNameLoaded: string;
113
- nestedForm: string;
114
- noDataProvided: string;
115
- subformSubmissionLoadingError: string;
116
- noDelimiterSet: string;
117
- noSiteKey: string;
118
- failedToNormalize: string;
119
- failedToCompareItems: string;
120
- editorFocusError: string;
121
- quillImageUploadFailed: string;
122
- noFilesSelected: string;
123
- needConfigurationForQuill: string;
124
- waitPdfConverting: string;
125
- uploading: string;
126
- pasteBelow: string;
127
- copy: string;
128
- move: string;
129
- edit: string;
130
- editJson: string;
131
- remove: string;
132
- clickToSetValue: string;
133
- words: string;
134
- characters: string;
135
- addAnother: string;
136
- yes: string;
137
- no: string;
138
- wantToClearData: string;
139
- yesDelete: string;
140
- waitFileProcessing: string;
141
- wrongFileType: string;
142
- fileTooSmall: string;
143
- fileTooBig: string;
144
- noFileService: string;
145
- fileProcessingFailed: string;
146
- readyForUpload: string;
147
- readyForRemovingFromStorage: string;
148
- preparingFileToRemove: string;
149
- succefullyRemoved: string;
150
- succefullyUploaded: string;
151
- maxSelectItems: string;
152
- minSelectItems: string;
153
- clickToSign: string;
154
- surveyQuestion: string;
155
- surveyQuestionValue: string;
156
- success: string;
157
- noResultsFound: string;
158
- noChoices: string;
159
- typeToSearch: string;
160
- loading: string;
161
- help: string;
162
- component: string;
163
- save: string;
164
- preview: string;
165
- dragAndDropComponent: string;
166
- searchFields: string;
167
- noMatchesFound: string;
168
- fileName: string;
169
- size: string;
170
- type: string;
171
- gallery: string;
172
- camera: string;
173
- dropFilesToAttach: string;
174
- useCamera: string;
175
- browse: string;
176
- takePicture: string;
177
- switchToFileUpload: string;
178
- completeStatus: string;
179
- noStorageSet: string;
180
- noFileApiSupport: string;
181
- noFormDataSupport: string;
182
- noProgressSupport: string;
183
- close: string;
184
- addResource: string;
185
- autocomplete: string;
186
- showPreview: string;
187
- hidePreview: string;
188
- createPage: string;
189
- page: string;
190
- closeBtnDescription: string;
191
- cancelBtnDescription: string;
192
- saveBtnDescription: string;
193
- addOrRemove: string;
194
- anyFileTypesAllowed: string;
195
- allowedFileTypes: string;
196
- syncing: string;
197
- syncNow: string;
198
- pressToOpen: string;
199
- browseToAttachFileFor: string;
200
- or: string;
201
- numericOnly: string;
202
- uploadPdfFile: string;
203
- dropToStart: string;
204
- expand: string;
205
- collapse: string;
206
- add: string;
207
- delete: string;
208
- revert: string;
209
- removeBtnPressToRemove: string;
210
- file: string;
211
- captureVideo: string;
212
- captureAudio: string;
213
- captureImage: string;
214
- browseFiles: string;
215
- noComponentsSetInGrid: string;
216
- sortAscending: string;
217
- sortDescending: string;
218
- filter: string;
219
- clear: string;
220
- showItemsWithValue: string;
221
- gridItemsPerPage: string;
222
- gridAllItems: string;
223
- recordsSelectedOnPage: string;
224
- recordsSelectedInTable: string;
225
- gridSelectAll: string;
226
- itemsInTable: string;
227
- clearSelection: string;
228
- editGridRow: string;
229
- deleteGridRow: string;
230
- selected: string;
231
- actions: string;
232
- };
1
+ declare const _default: any;
233
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}}', 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;
@@ -209,13 +209,20 @@ function checkSimpleConditional(component, condition, row, data, instance) {
209
209
  return true;
210
210
  }
211
211
  const conditionsResult = lodash_1.default.map(conditions, (cond) => {
212
- var _a, _b;
213
212
  const { value: comparedValue, operator, component: conditionComponentPath } = cond;
214
213
  if (!conditionComponentPath) {
215
214
  return true;
216
215
  }
217
216
  const splittedConditionPath = conditionComponentPath.split('.');
218
- const conditionalPaths = ((_a = instance === null || instance === void 0 ? void 0 : instance.parent) === null || _a === void 0 ? void 0 : _a.type) === 'datagrid' || ((_b = instance === null || instance === void 0 ? void 0 : instance.parent) === null || _b === void 0 ? void 0 : _b.type) === 'editgrid' ? [] : getConditionalPathsRecursive(splittedConditionPath, data);
217
+ const checkParentTypeInTree = (instance, componentType) => {
218
+ if (!(instance === null || instance === void 0 ? void 0 : instance.parent)) {
219
+ return false;
220
+ }
221
+ return (instance === null || instance === void 0 ? void 0 : instance.parent.type) === componentType || checkParentTypeInTree(instance.parent, componentType);
222
+ };
223
+ const conditionalPaths = checkParentTypeInTree(instance, 'datagrid') || checkParentTypeInTree(instance, 'editgrid')
224
+ ? []
225
+ : getConditionalPathsRecursive(splittedConditionPath, data);
219
226
  if (conditionalPaths.length > 0) {
220
227
  return conditionalPaths.map((path) => {
221
228
  const value = getComponentActualValue(path, data, row);
@@ -334,7 +341,7 @@ function getRow(component, row, instance, conditional) {
334
341
  }
335
342
  const dataParent = getDataParentComponent(instance);
336
343
  if (dataParent) {
337
- const parentPath = (_a = dataParent.paths) === null || _a === void 0 ? void 0 : _a.localDataPath;
344
+ const parentPath = (_a = dataParent.paths) === null || _a === void 0 ? void 0 : _a.localPath;
338
345
  const isTriggerCondtionComponentPath = condition.when || !condition.conditions
339
346
  ? (_b = condition.when) === null || _b === void 0 ? void 0 : _b.startsWith((_c = dataParent.paths) === null || _c === void 0 ? void 0 : _c.localPath)
340
347
  : lodash_1.default.some(condition.conditions, cond => { var _a; return cond.component.startsWith((_a = dataParent.paths) === null || _a === void 0 ? void 0 : _a.localPath); });
@@ -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.
@@ -3,7 +3,7 @@ import Component from './components/_classes/component/Component';
3
3
  import tippy from 'tippy.js';
4
4
  import Components from './components/Components';
5
5
  import { Formio } from './Formio';
6
- import { fastCloneDeep, bootstrapVersion, getArrayFromComponentPath, getStringFromComponentPath, eachComponent, getComponent, } from './utils';
6
+ import { fastCloneDeep, bootstrapVersion, getArrayFromComponentPath, getStringFromComponentPath, eachComponent, getComponent, componentInfo } from './utils';
7
7
  import BuilderUtils from './utils/builder';
8
8
  import _ from 'lodash';
9
9
  import autoScroll from 'dom-autoscroller';
@@ -1108,28 +1108,52 @@ 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
- if (keys.has(paths.dataPath)) {
1116
- repeatablePaths.push(paths.dataPath);
1117
- }
1118
- else {
1119
- keys.set(paths.dataPath, true);
1115
+ const isRadioCheckbox = comp.type === 'checkbox' && comp.inputType === 'radio';
1116
+ const isLayout = componentInfo(comp).layout;
1117
+ if (!isLayout) {
1118
+ if (keys.has(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
+ };
1124
+ }
1125
+ else {
1126
+ keys.set(paths.dataPath, comp);
1127
+ }
1120
1128
  }
1121
1129
  }, true);
1122
- 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;
1123
1138
  }
1124
1139
  highlightInvalidComponents() {
1125
- const repeatablePaths = this.findRepeatablePaths();
1140
+ const repeatablePathsComps = this.findComponentsWithRepeatablePaths();
1126
1141
  let hasInvalidComponents = false;
1142
+ // Matches anything expect letters and '_' at the beginning of the key and anything except of letters, numbers,
1143
+ // '-', '.' and '_' in the rest of the key
1144
+ const badCharacters = /^[^A-Za-z_]+|[^A-Za-z0-9\-._]+/g;
1127
1145
  this.webform.everyComponent((comp) => {
1128
- const path = comp.path;
1129
- if (repeatablePaths.includes(path)) {
1146
+ if (repeatablePathsComps.includes(comp.component)) {
1130
1147
  comp.setCustomValidity(this.t('apiKey', { key: comp.key }));
1131
1148
  hasInvalidComponents = true;
1132
1149
  }
1150
+ else if (comp.key.replace(badCharacters, '') === '') {
1151
+ comp.setCustomValidity(this.t('apiKeyNotValid', { key: comp.key }));
1152
+ hasInvalidComponents = true;
1153
+ }
1154
+ else {
1155
+ comp.setCustomValidity();
1156
+ }
1133
1157
  });
1134
1158
  this.emit('builderFormValidityChange', hasInvalidComponents);
1135
1159
  }
@@ -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
  }
@@ -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();
@@ -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]) {