@formio/js 5.1.0-dev.5969.9a6e3f5 → 5.1.0-dev.5972.317ce89

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 (77) hide show
  1. package/dist/formio.form.js +74 -52
  2. package/dist/formio.form.min.js +1 -1
  3. package/dist/formio.full.js +77 -55
  4. package/dist/formio.full.min.js +1 -1
  5. package/dist/formio.js +3 -3
  6. package/dist/formio.min.js +1 -1
  7. package/dist/formio.utils.js +3 -3
  8. package/dist/formio.utils.min.js +1 -1
  9. package/lib/cjs/Form.js +4 -4
  10. package/lib/cjs/PDFBuilder.js +4 -4
  11. package/lib/cjs/Webform.d.ts +12 -12
  12. package/lib/cjs/Webform.js +132 -131
  13. package/lib/cjs/WebformBuilder.js +10 -10
  14. package/lib/cjs/Wizard.js +1 -1
  15. package/lib/cjs/WizardBuilder.js +1 -1
  16. package/lib/cjs/components/_classes/component/Component.js +12 -11
  17. package/lib/cjs/components/_classes/list/ListComponent.js +4 -4
  18. package/lib/cjs/components/_classes/multivalue/Multivalue.js +2 -2
  19. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +3 -3
  20. package/lib/cjs/components/address/Address.js +1 -1
  21. package/lib/cjs/components/button/Button.js +6 -6
  22. package/lib/cjs/components/checkbox/Checkbox.js +1 -1
  23. package/lib/cjs/components/datagrid/DataGrid.js +1 -1
  24. package/lib/cjs/components/datetime/DateTime.js +4 -0
  25. package/lib/cjs/components/day/Day.js +4 -20
  26. package/lib/cjs/components/editgrid/EditGrid.js +4 -4
  27. package/lib/cjs/components/file/File.js +15 -15
  28. package/lib/cjs/components/form/Form.js +4 -4
  29. package/lib/cjs/components/number/Number.js +1 -1
  30. package/lib/cjs/components/recaptcha/ReCaptcha.js +2 -2
  31. package/lib/cjs/components/select/Select.js +5 -5
  32. package/lib/cjs/components/selectboxes/SelectBoxes.js +2 -2
  33. package/lib/cjs/components/signature/Signature.d.ts +1 -1
  34. package/lib/cjs/components/signature/Signature.js +2 -2
  35. package/lib/cjs/components/survey/Survey.js +2 -2
  36. package/lib/cjs/components/textarea/TextArea.js +6 -6
  37. package/lib/cjs/components/textfield/TextField.js +3 -0
  38. package/lib/cjs/formio.form.js +4 -0
  39. package/lib/cjs/translations/en.d.ts +234 -81
  40. package/lib/cjs/translations/en.js +8 -81
  41. package/lib/cjs/utils/i18n.d.ts +5 -2
  42. package/lib/cjs/utils/i18n.js +32 -5
  43. package/lib/mjs/Form.js +4 -4
  44. package/lib/mjs/PDFBuilder.js +4 -4
  45. package/lib/mjs/Webform.d.ts +12 -12
  46. package/lib/mjs/Webform.js +142 -141
  47. package/lib/mjs/WebformBuilder.js +10 -10
  48. package/lib/mjs/Wizard.js +1 -1
  49. package/lib/mjs/WizardBuilder.js +1 -1
  50. package/lib/mjs/components/_classes/component/Component.js +12 -11
  51. package/lib/mjs/components/_classes/list/ListComponent.js +4 -4
  52. package/lib/mjs/components/_classes/multivalue/Multivalue.js +2 -2
  53. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +3 -3
  54. package/lib/mjs/components/address/Address.js +1 -1
  55. package/lib/mjs/components/button/Button.js +6 -6
  56. package/lib/mjs/components/checkbox/Checkbox.js +1 -1
  57. package/lib/mjs/components/datagrid/DataGrid.js +1 -1
  58. package/lib/mjs/components/datetime/DateTime.js +5 -1
  59. package/lib/mjs/components/day/Day.js +4 -20
  60. package/lib/mjs/components/editgrid/EditGrid.js +4 -4
  61. package/lib/mjs/components/file/File.js +15 -15
  62. package/lib/mjs/components/form/Form.js +4 -4
  63. package/lib/mjs/components/number/Number.js +1 -1
  64. package/lib/mjs/components/recaptcha/ReCaptcha.js +2 -2
  65. package/lib/mjs/components/select/Select.js +7 -7
  66. package/lib/mjs/components/selectboxes/SelectBoxes.js +2 -2
  67. package/lib/mjs/components/signature/Signature.d.ts +1 -1
  68. package/lib/mjs/components/signature/Signature.js +2 -2
  69. package/lib/mjs/components/survey/Survey.js +2 -2
  70. package/lib/mjs/components/textarea/TextArea.js +6 -6
  71. package/lib/mjs/components/textfield/TextField.js +3 -0
  72. package/lib/mjs/formio.form.js +4 -0
  73. package/lib/mjs/translations/en.d.ts +234 -81
  74. package/lib/mjs/translations/en.js +89 -3
  75. package/lib/mjs/utils/i18n.d.ts +5 -2
  76. package/lib/mjs/utils/i18n.js +32 -5
  77. package/package.json +3 -3
@@ -594,7 +594,7 @@ export default class SelectComponent extends ListComponent {
594
594
  component: this.component,
595
595
  message: err.toString(),
596
596
  });
597
- console.warn(`Unable to load resources for ${this.key}`);
597
+ console.warn(this.t('loadResourcesError', { componentKey: this.key }));
598
598
  }
599
599
  /**
600
600
  * Get the request headers for this select dropdown.
@@ -728,7 +728,7 @@ export default class SelectComponent extends ListComponent {
728
728
  }
729
729
  }
730
730
  else if (this.component.dataSrc === 'url' || this.component.dataSrc === 'resource') {
731
- this.addOption('', this.t('loading...'));
731
+ this.addOption('', `${this.t('loading')}...`);
732
732
  }
733
733
  }
734
734
  get active() {
@@ -779,9 +779,9 @@ export default class SelectComponent extends ListComponent {
779
779
  allowHTML: true,
780
780
  placeholder: !!this.component.placeholder,
781
781
  placeholderValue: placeholderValue,
782
- noResultsText: this.t('No results found'),
783
- noChoicesText: this.t('No choices to choose from'),
784
- searchPlaceholderValue: this.t('Type to search'),
782
+ noResultsText: this.t('noResultsFound'),
783
+ noChoicesText: this.t('noChoices'),
784
+ searchPlaceholderValue: this.t('typeToSearch'),
785
785
  shouldSort: false,
786
786
  position: (this.component.dropdown || 'auto'),
787
787
  searchEnabled: useSearch,
@@ -1218,7 +1218,7 @@ export default class SelectComponent extends ListComponent {
1218
1218
  return normalize[dataType]().value;
1219
1219
  }
1220
1220
  catch (err) {
1221
- console.warn('Failed to normalize value', err);
1221
+ console.warn(this.t('failedToNormalize'), err);
1222
1222
  return value;
1223
1223
  }
1224
1224
  }
@@ -1414,7 +1414,7 @@ export default class SelectComponent extends ListComponent {
1414
1414
  return (JSON.stringify(normalizedOptionValue) === JSON.stringify(value));
1415
1415
  }
1416
1416
  catch (err) {
1417
- console.warn.error('Error while comparing items', err);
1417
+ console.warn.error(this.t('failedToCompareItems'), err);
1418
1418
  return false;
1419
1419
  }
1420
1420
  };
@@ -250,14 +250,14 @@ export default class SelectBoxesComponent extends RadioComponent {
250
250
  this.setInputsDisabled(false);
251
251
  }
252
252
  if (!isValid && maxCount && count > maxCount) {
253
- const message = this.t(this.component.maxSelectedCountMessage || 'You may only select up to {{maxCount}} items', { maxCount });
253
+ const message = this.t(this.component.maxSelectedCountMessage || 'maxSelectItems', { maxCount });
254
254
  this.errors.push({ message });
255
255
  this.setCustomValidity(message, dirty);
256
256
  return false;
257
257
  }
258
258
  else if (!isValid && minCount && count < minCount) {
259
259
  this.setInputsDisabled(false);
260
- const message = this.t(this.component.minSelectedCountMessage || 'You must select at least {{minCount}} items', { minCount });
260
+ const message = this.t(this.component.minSelectedCountMessage || 'minSelectItems', { minCount });
261
261
  this.errors.push({ message });
262
262
  this.setCustomValidity(message, dirty);
263
263
  return false;
@@ -24,7 +24,7 @@ export default class SignatureComponent extends Input {
24
24
  checkSize(force: any, scale: any): void;
25
25
  signaturePad: SignaturePad | null | undefined;
26
26
  observer: any;
27
- getValueAsString(value: any): "" | "Yes" | "No";
27
+ getValueAsString(value: any): string;
28
28
  focus(): void;
29
29
  setDataToSigaturePad(): void;
30
30
  }
@@ -174,7 +174,7 @@ export default class SignatureComponent extends Input {
174
174
  return this.renderModalPreview({
175
175
  previewText: this.dataValue ?
176
176
  `<img src=${this.dataValue} ${this._referenceAttributeName}='openModal' style="width: 100%;height: 100%;" />` :
177
- this.t('Click to Sign')
177
+ this.t('clickToSign')
178
178
  });
179
179
  }
180
180
  attach(element) {
@@ -242,7 +242,7 @@ export default class SignatureComponent extends Input {
242
242
  if (_.isUndefined(value) && this.inDataTable) {
243
243
  return '';
244
244
  }
245
- return value ? 'Yes' : 'No';
245
+ return this.t(value ? 'yes' : 'no');
246
246
  }
247
247
  focus() {
248
248
  this.refs.padBody.focus();
@@ -126,8 +126,8 @@ export default class SurveyComponent extends Field {
126
126
  <table border="1" style="width:100%">
127
127
  <thead>
128
128
  <tr>
129
- <th>Question</th>
130
- <th>Value</th>
129
+ <th>${this.t('surveyQuestion')}</th>
130
+ <th>${this.t('surveyQuestionValue')}</th>
131
131
  </tr>
132
132
  </thead>
133
133
  <tbody>
@@ -131,7 +131,7 @@ export default class TextAreaComponent extends TextFieldComponent {
131
131
  case 'quill':
132
132
  // Normalize the configurations for quill.
133
133
  if (settings.hasOwnProperty('toolbarGroups') || settings.hasOwnProperty('toolbar')) {
134
- console.warn('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.');
134
+ console.warn(this.t('needConfigurationForQuill'));
135
135
  settings = this.wysiwygDefault.quill;
136
136
  }
137
137
  // Add the quill editor.
@@ -203,7 +203,7 @@ export default class TextAreaComponent extends TextFieldComponent {
203
203
  imageHandler(moduleInstance, range, files) {
204
204
  const quillInstance = moduleInstance.quill;
205
205
  if (!files || !files.length) {
206
- console.warn('No files selected');
206
+ console.warn(this.t('noFilesSelected'));
207
207
  return;
208
208
  }
209
209
  quillInstance.enable(false);
@@ -228,7 +228,7 @@ export default class TextAreaComponent extends TextFieldComponent {
228
228
  alt: JSON.stringify(requestData),
229
229
  }), Quill.sources.USER);
230
230
  }).catch(error => {
231
- console.warn('Quill image upload failed');
231
+ console.warn(this.t('quillImageUploadFailed'));
232
232
  console.warn(error);
233
233
  quillInstance.enable(true);
234
234
  });
@@ -523,7 +523,7 @@ export default class TextAreaComponent extends TextFieldComponent {
523
523
  }
524
524
  this.element.scrollIntoView();
525
525
  }).catch((err) => {
526
- console.warn('An editor did not initialize properly when trying to focus:', err);
526
+ console.warn(this.t('editorFocusError'), err);
527
527
  });
528
528
  break;
529
529
  }
@@ -532,7 +532,7 @@ export default class TextAreaComponent extends TextFieldComponent {
532
532
  this.editors[0].focus();
533
533
  this.element.scrollIntoView();
534
534
  }).catch((err) => {
535
- console.warn('An editor did not initialize properly when trying to focus:', err);
535
+ console.warn(this.t('editorFocusError'), err);
536
536
  });
537
537
  break;
538
538
  }
@@ -540,7 +540,7 @@ export default class TextAreaComponent extends TextFieldComponent {
540
540
  this.editorsReady[0]?.then(() => {
541
541
  this.editors[0].focus();
542
542
  }).catch((err) => {
543
- console.warn('An editor did not initialize properly when trying to focus:', err);
543
+ console.warn(this.t('editorFocusError'), err);
544
544
  });
545
545
  break;
546
546
  }
@@ -86,6 +86,9 @@ export default class TextFieldComponent extends Input {
86
86
  locale: this.component.widget.locale || this.options.language,
87
87
  saveAs: 'text'
88
88
  };
89
+ // update originalComponent to include widget settings after component initialization
90
+ // originalComponent is used to restore the component (and widget) after evaluating field logic
91
+ this.originalComponent = FormioUtils.fastCloneDeep(this.component);
89
92
  }
90
93
  }
91
94
  attach(element) {
@@ -12,6 +12,7 @@ import { Evaluator } from './utils/Evaluator';
12
12
  import Licenses from './licenses';
13
13
  import EventEmitter from './EventEmitter';
14
14
  import Webform from './Webform';
15
+ import { I18n } from './utils/i18n';
15
16
  Formio.loadModules = (path = `${Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {
16
17
  Formio.requireLibrary(name, name, path, true)
17
18
  .then((modules) => {
@@ -84,6 +85,9 @@ export function registerModule(mod, defaultFn = null, options = {}) {
84
85
  case 'evaluator':
85
86
  Formio.Evaluator.registerEvaluator(mod.evaluator);
86
87
  break;
88
+ case 'translations':
89
+ I18n.setDefaultTranslations(mod.translations);
90
+ break;
87
91
  case 'library':
88
92
  options.license
89
93
  ? Formio.Licenses.addLicense(mod.library, options.license)
@@ -1,82 +1,235 @@
1
- declare namespace _default {
2
- let unsavedRowsError: string;
3
- let invalidRowsError: string;
4
- let invalidRowError: string;
5
- let invalidOption: string;
6
- let invalidDay: string;
7
- let alertMessageWithLabel: string;
8
- let alertMessage: string;
9
- let complete: string;
10
- let error: string;
11
- let errorListHotkey: string;
12
- let errorsListNavigationMessage: string;
13
- let submitError: string;
14
- let required: string;
15
- let unique: string;
16
- let array: string;
17
- let array_nonempty: string;
18
- let nonarray: string;
19
- let select: string;
20
- let pattern: string;
21
- let minLength: string;
22
- let maxLength: string;
23
- let minWords: string;
24
- let maxWords: string;
25
- let min: string;
26
- let max: string;
27
- let maxDate: string;
28
- let minDate: string;
29
- let maxYear: string;
30
- let minYear: string;
31
- let minSelectedCount: string;
32
- let maxSelectedCount: string;
33
- let invalid_email: string;
34
- let invalid_url: string;
35
- let invalid_regex: string;
36
- let invalid_date: string;
37
- let invalid_day: string;
38
- let invalidValueProperty: string;
39
- let mask: string;
40
- let valueIsNotAvailable: string;
41
- let stripe: string;
42
- let month: string;
43
- let day: string;
44
- let year: string;
45
- let january: string;
46
- let february: string;
47
- let march: string;
48
- let april: string;
49
- let may: string;
50
- let june: string;
51
- let july: string;
52
- let august: string;
53
- let september: string;
54
- let october: string;
55
- let november: string;
56
- let december: string;
57
- let next: string;
58
- let previous: string;
59
- let cancel: string;
60
- let submit: string;
61
- let confirmCancel: string;
62
- let saveDraftInstanceError: string;
63
- let saveDraftAuthError: string;
64
- let restoreDraftInstanceError: string;
65
- let saveDraftError: string;
66
- let restoreDraftError: string;
67
- let time: string;
68
- let cancelButtonAriaLabel: string;
69
- let previousButtonAriaLabel: string;
70
- let nextButtonAriaLabel: string;
71
- let submitButtonAriaLabel: string;
72
- let reCaptchaTokenValidationError: string;
73
- let reCaptchaTokenNotSpecifiedError: string;
74
- let apiKey: string;
75
- let typeRemaining: string;
76
- let typeCount: string;
77
- let requiredDayField: string;
78
- let requiredDayEmpty: string;
79
- let requiredMonthField: string;
80
- let requiredYearField: string;
81
- }
1
+ declare const _default: {
2
+ unsavedRowsError: string;
3
+ invalidRowsError: string;
4
+ invalidRowError: string;
5
+ invalidOption: string;
6
+ invalidDay: string;
7
+ alertMessageWithLabel: string;
8
+ alertMessage: string;
9
+ complete: string;
10
+ error: string;
11
+ errorListHotkey: string;
12
+ errorsListNavigationMessage: string;
13
+ submitError: string;
14
+ required: string;
15
+ unique: string;
16
+ array: string;
17
+ array_nonempty: string;
18
+ nonarray: string;
19
+ select: string;
20
+ pattern: string;
21
+ minLength: string;
22
+ maxLength: string;
23
+ minWords: string;
24
+ maxWords: string;
25
+ min: string;
26
+ max: string;
27
+ maxDate: string;
28
+ minDate: string;
29
+ maxYear: string;
30
+ minYear: string;
31
+ minSelectedCount: string;
32
+ maxSelectedCount: string;
33
+ invalid_email: string;
34
+ invalid_url: string;
35
+ invalid_regex: string;
36
+ invalid_date: string;
37
+ invalid_day: string;
38
+ invalidValueProperty: string;
39
+ mask: string;
40
+ valueIsNotAvailable: string;
41
+ stripe: string;
42
+ month: string;
43
+ day: string;
44
+ year: string;
45
+ january: string;
46
+ february: string;
47
+ march: string;
48
+ april: string;
49
+ may: string;
50
+ june: string;
51
+ july: string;
52
+ august: string;
53
+ september: string;
54
+ october: string;
55
+ november: string;
56
+ december: string;
57
+ next: string;
58
+ previous: string;
59
+ cancel: string;
60
+ submit: string;
61
+ confirmCancel: string;
62
+ saveDraftInstanceError: string;
63
+ saveDraftAuthError: string;
64
+ restoreDraftInstanceError: string;
65
+ saveDraftError: string;
66
+ restoreDraftError: string;
67
+ time: string;
68
+ cancelButtonAriaLabel: string;
69
+ previousButtonAriaLabel: string;
70
+ nextButtonAriaLabel: string;
71
+ submitButtonAriaLabel: string;
72
+ reCaptchaTokenValidationError: string;
73
+ reCaptchaTokenNotSpecifiedError: string;
74
+ apiKey: string;
75
+ typeRemaining: string;
76
+ typeCount: string;
77
+ requiredDayField: string;
78
+ requiredDayEmpty: string;
79
+ requiredMonthField: string;
80
+ requiredYearField: string;
81
+ formNotReady: string;
82
+ noFormElement: string;
83
+ notUniqueKey: string;
84
+ newFormSchema: string;
85
+ missingUrl: string;
86
+ urlNotAttachedToBtn: string;
87
+ loadingProjectSettingsError: string;
88
+ sessionStorageSupportError: string;
89
+ builderUniqueError: string;
90
+ pageNotFound: string;
91
+ noDragInfoError: string;
92
+ addonSupportTypeError: string;
93
+ setPathError: string;
94
+ calculatedPathDeprecation: string;
95
+ unknownTemplate: string;
96
+ unknownComponent: string;
97
+ renderTemplateFunctionDeprecation: string;
98
+ whenReadyDeprecation: string;
99
+ loadResourcesError: string;
100
+ noSelectDataConfiguration: string;
101
+ indexedDBSupportError: string;
102
+ caretPositionSavingError: string;
103
+ iteratableRowsError: string;
104
+ checkRowDeprecation: string;
105
+ noOAuthBtn: string;
106
+ noOAuthConfiguration: string;
107
+ oAuthErrorsTitle: string;
108
+ noOAuthFormUrl: string;
109
+ oAuthStateError: string;
110
+ componentInvalidRowValidation: string;
111
+ videoPlayerNotFound: string;
112
+ synchronizationFailed: string;
113
+ fileWithDuplicatedNameInProgress: string;
114
+ fileWithDuplicatedNameLoaded: string;
115
+ nestedForm: string;
116
+ noDataProvided: string;
117
+ subformSubmissionLoadingError: string;
118
+ noDelimiterSet: string;
119
+ noSiteKey: string;
120
+ failedToNormalize: string;
121
+ failedToCompareItems: string;
122
+ editorFocusError: string;
123
+ quillImageUploadFailed: string;
124
+ noFilesSelected: string;
125
+ needConfigurationForQuill: string;
126
+ waitPdfConverting: string;
127
+ uploading: string;
128
+ pasteBelow: string;
129
+ copy: string;
130
+ move: string;
131
+ edit: string;
132
+ editJson: string;
133
+ remove: string;
134
+ clickToSetValue: string;
135
+ words: string;
136
+ characters: string;
137
+ addAnother: string;
138
+ yes: string;
139
+ no: string;
140
+ wantToClearData: string;
141
+ yesDelete: string;
142
+ waitFileProcessing: string;
143
+ wrongFileType: string;
144
+ fileTooSmall: string;
145
+ fileTooBig: string;
146
+ noFileService: string;
147
+ fileProcessingFailed: string;
148
+ readyForUpload: string;
149
+ readyForRemovingFromStorage: string;
150
+ preparingFileToRemove: string;
151
+ succefullyRemoved: string;
152
+ succefullyUploaded: string;
153
+ maxSelectItems: string;
154
+ minSelectItems: string;
155
+ clickToSign: string;
156
+ surveyQuestion: string;
157
+ surveyQuestionValue: string;
158
+ success: string;
159
+ noResultsFound: string;
160
+ noChoices: string;
161
+ typeToSearch: string;
162
+ loading: string;
163
+ help: string;
164
+ component: string;
165
+ save: string;
166
+ preview: string;
167
+ dragAndDropComponent: string;
168
+ searchFields: string;
169
+ noMatchesFound: string;
170
+ fileName: string;
171
+ size: string;
172
+ type: string;
173
+ gallery: string;
174
+ camera: string;
175
+ dropFilesToAttach: string;
176
+ useCamera: string;
177
+ browse: string;
178
+ takePicture: string;
179
+ switchToFileUpload: string;
180
+ completeStatus: string;
181
+ noStorageSet: string;
182
+ noFileApiSupport: string;
183
+ noFormDataSupport: string;
184
+ noProgressSupport: string;
185
+ close: string;
186
+ addResource: string;
187
+ autocomplete: string;
188
+ showPreview: string;
189
+ hidePreview: string;
190
+ createPage: string;
191
+ page: string;
192
+ closeBtnDescription: string;
193
+ cancelBtnDescription: string;
194
+ saveBtnDescription: string;
195
+ addOrRemove: string;
196
+ anyFileTypesAllowed: string;
197
+ allowedFileTypes: string;
198
+ syncing: string;
199
+ syncNow: string;
200
+ pressToOpen: string;
201
+ browseToAttachFileFor: string;
202
+ or: string;
203
+ numericOnly: string;
204
+ uploadPdfFile: string;
205
+ dropToStart: string;
206
+ expand: string;
207
+ collapse: string;
208
+ add: string;
209
+ delete: string;
210
+ revert: string;
211
+ removeBtnPressToRemove: string;
212
+ file: string;
213
+ captureVideo: string;
214
+ captureAudio: string;
215
+ captureImage: string;
216
+ browseFiles: string;
217
+ noComponentsSetInGrid: string;
218
+ sortAscending: string;
219
+ sortDescending: string;
220
+ filter: string;
221
+ clear: string;
222
+ showItemsWithValue: string;
223
+ gridItemsPerPage: string;
224
+ gridAllItems: string;
225
+ recordsSelectedOnPage: string;
226
+ recordsSelectedInTable: string;
227
+ gridSelectAll: string;
228
+ itemsInTable: string;
229
+ clearSelection: string;
230
+ editGridRow: string;
231
+ deleteGridRow: string;
232
+ selected: string;
233
+ actions: string;
234
+ };
82
235
  export default _default;
@@ -1,4 +1,6 @@
1
+ import bootstrap from '@formio/bootstrap';
1
2
  export default {
3
+ ...(bootstrap?.translations?.en || {}),
2
4
  unsavedRowsError: 'Please save all rows before proceeding.',
3
5
  invalidRowsError: 'Please correct invalid rows before proceeding.',
4
6
  invalidRowError: 'Invalid row. Please correct it or delete.',
@@ -24,8 +26,8 @@ export default {
24
26
  maxWords: '{{field}} must have no more than {{length}} words.',
25
27
  min: '{{field}} cannot be less than {{min}}.',
26
28
  max: '{{field}} cannot be greater than {{max}}.',
27
- maxDate: '{{field}} should not contain date after {{- maxDate}}',
28
- minDate: '{{field}} should not contain date before {{- minDate}}',
29
+ maxDate: '{{field}} should not contain date after {{maxDate}}',
30
+ minDate: '{{field}} should not contain date before {{minDate}}',
29
31
  maxYear: '{{field}} should not contain year greater than {{maxYear}}',
30
32
  minYear: '{{field}} should not contain year less than {{minYear}}',
31
33
  minSelectedCount: 'You must select at least {{minCount}} items',
@@ -77,5 +79,89 @@ export default {
77
79
  requiredDayField: '{{ field }} is required',
78
80
  requiredDayEmpty: '{{ field }} is required',
79
81
  requiredMonthField: '{{ field }} is required',
80
- requiredYearField: '{{ field }} is required'
82
+ requiredYearField: '{{ field }} is required',
83
+ formNotReady: 'Form not ready. Use form.ready promise',
84
+ noFormElement: 'No DOM element for form.',
85
+ notUniqueKey: 'API Key is not unique',
86
+ newFormSchema: 'Form schema is for a newer version, please upgrade your renderer. Some functionality may not work.',
87
+ missingUrl: 'Missing URL argument',
88
+ urlNotAttachedToBtn: 'You should add a URL to this button.',
89
+ loadingProjectSettingsError: 'Could not load project settings',
90
+ sessionStorageSupportError: 'Session storage is not supported in this browser.',
91
+ builderUniqueError: `You cannot add more than one {{componentKeyOrTitle}} component to one page.`,
92
+ pageNotFound: 'Page not found',
93
+ noDragInfoError: 'There is no Drag Info available for either dragged or sibling element',
94
+ addonSupportTypeError: 'Addon {{label}} does not support component of type {{type}}',
95
+ setPathError: 'Should not be setting the path of a component.',
96
+ calculatedPathDeprecation: 'component.calculatedPath was deprecated, use component.path instead.',
97
+ unknownTemplate: 'Unknown template: {{name}}',
98
+ unknownComponent: 'Unknown component: {{type}}',
99
+ renderTemplateFunctionDeprecation: `Form.io 'render' template function is deprecated.
100
+ If you need to render template (template A) inside of another template (template B),
101
+ pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B`,
102
+ whenReadyDeprecation: 'The whenReady() method has been deprecated. Please use the dataReady property instead.',
103
+ loadResourcesError: 'Unable to load resources for {{componentKey}}',
104
+ noSelectDataConfiguration: 'Select component {{componentKey}} does not have data configuration.',
105
+ indexedDBSupportError: "Your browser doesn't support current version of indexedDB",
106
+ caretPositionSavingError: 'An error occurred while trying to save caret position',
107
+ iteratableRowsError: 'Getter #iteratableRows() is not implemented',
108
+ checkRowDeprecation: 'Deprecation Warning: checkRow method has been replaced with processRow',
109
+ noOAuthBtn: 'You must add the OAuth button to a form for it to function properly',
110
+ noOAuthConfiguration: 'OAuth not configured. You must configure oauth for your project before it will work.',
111
+ oAuthErrorsTitle: 'The Following Error Has Occured',
112
+ noOAuthFormUrl: 'You must attach a Form API url to your form in order to use OAuth buttons.',
113
+ oAuthStateError: 'OAuth state does not match. Please try logging in again.',
114
+ componentInvalidRowValidation: 'Invalid row validation for {{componentKey}}',
115
+ videoPlayerNotFound: 'Video player not found in template.',
116
+ synchronizationFailed: 'Synchronization is failed',
117
+ fileWithDuplicatedNameInProgress: 'File with the same name is already being uploaded',
118
+ fileWithDuplicatedNameLoaded: 'File with the same name is already uploaded',
119
+ nestedForm: 'Nested form',
120
+ noDataProvided: 'No data provided',
121
+ subformSubmissionLoadingError: 'Unable to load subform submission {{submissionId}}:',
122
+ noDelimiterSet: 'In order for thousands separator to work properly, you must set the delimiter to true in the component json',
123
+ noSiteKey: 'There is no Site Key specified in settings in form JSON',
124
+ failedToNormalize: 'Failed to normalize value',
125
+ failedToCompareItems: 'Error while comparing items',
126
+ editorFocusError: 'An editor did not initialize properly when trying to focus:',
127
+ quillImageUploadFailed: 'Quill image upload failed',
128
+ noFilesSelected: 'No files selected',
129
+ 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.',
130
+ waitPdfConverting: 'Converting PDF. Please wait.',
131
+ uploading: 'Uploading',
132
+ pasteBelow: 'Paste below',
133
+ copy: 'Copy',
134
+ move: 'Move',
135
+ edit: 'Edit',
136
+ editJson: 'Edit JSON',
137
+ remove: 'Remove',
138
+ clickToSetValue: 'Click to set value',
139
+ words: 'words',
140
+ characters: 'characters',
141
+ addAnother: 'Add Another',
142
+ yes: 'Yes',
143
+ no: 'No',
144
+ wantToClearData: 'Do you want to clear data?',
145
+ yesDelete: 'Yes, delete it',
146
+ waitFileProcessing: 'Processing file. Please wait...',
147
+ wrongFileType: 'File is the wrong type; it must be {{ pattern }}',
148
+ fileTooSmall: 'File is too small; it must be at least {{ size }}',
149
+ fileTooBig: 'File is too big; it must be at most {{ size }}',
150
+ noFileService: 'File Service not provided.',
151
+ fileProcessingFailed: 'File processing has been failed.',
152
+ readyForUpload: 'Ready to be uploaded into storage',
153
+ readyForRemovingFromStorage: 'Ready to be removed from storage',
154
+ preparingFileToRemove: 'Preparing file to remove',
155
+ succefullyRemoved: 'Succefully removed',
156
+ succefullyUploaded: 'Succefully uploaded',
157
+ maxSelectItems: 'You may only select up to {{maxCount}} items',
158
+ minSelectItems: 'You must select at least {{minCount}} items',
159
+ clickToSign: 'Click to Sign',
160
+ surveyQuestion: 'Question',
161
+ surveyQuestionValue: 'Value',
162
+ success: 'Success',
163
+ noResultsFound: 'No results found',
164
+ noChoices: 'No choices to choose from',
165
+ typeToSearch: 'Type to search',
166
+ loading: 'Loading',
81
167
  };
@@ -2,13 +2,16 @@
2
2
  * This file is used to mimic the i18n library interface.
3
3
  */
4
4
  export class I18n {
5
+ static languages: {};
6
+ static setDefaultTranslations(languages: any): void;
5
7
  static init(languages?: {}): I18n;
6
8
  static createInstance(): I18n;
7
9
  constructor(languages?: {});
8
- languages: {};
10
+ languages: any;
11
+ defaultKeys: any;
9
12
  language: string;
10
13
  currentLanguage: any;
11
- setLanguages(languages: any): void;
14
+ setLanguages(languages: any, noDefaultOverride: any): void;
12
15
  dir(lang?: string): "rtl" | "ltr";
13
16
  changeLanguage(language: any, ready?: null): void;
14
17
  addResourceBundle(language: any, type: any, strings: any): void;