@formio/js 5.4.0 → 5.4.2

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 (217) hide show
  1. package/README.md +11 -5
  2. package/dist/formio.builder.css +12 -5
  3. package/dist/formio.builder.min.css +1 -1
  4. package/dist/formio.embed.js +1 -1
  5. package/dist/formio.embed.min.js +1 -1
  6. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  7. package/dist/formio.form.css +12 -5
  8. package/dist/formio.form.js +2883 -2867
  9. package/dist/formio.form.min.css +1 -1
  10. package/dist/formio.form.min.js +1 -1
  11. package/dist/formio.form.min.js.LICENSE.txt +2 -2
  12. package/dist/formio.full.css +12 -5
  13. package/dist/formio.full.js +3507 -3491
  14. package/dist/formio.full.min.css +1 -1
  15. package/dist/formio.full.min.js +1 -1
  16. package/dist/formio.full.min.js.LICENSE.txt +2 -2
  17. package/dist/formio.js +1139 -1145
  18. package/dist/formio.min.js +1 -1
  19. package/dist/formio.min.js.LICENSE.txt +2 -2
  20. package/dist/formio.utils.js +1066 -1072
  21. package/dist/formio.utils.min.js +1 -1
  22. package/dist/formio.utils.min.js.LICENSE.txt +2 -2
  23. package/lib/cjs/Embed.js +8 -16
  24. package/lib/cjs/Form.js +4 -4
  25. package/lib/cjs/Formio.js +2 -9
  26. package/lib/cjs/InlineEmbed.js +1 -4
  27. package/lib/cjs/PDF.js +28 -8
  28. package/lib/cjs/PDFBuilder.js +6 -10
  29. package/lib/cjs/Webform.d.ts +1 -0
  30. package/lib/cjs/Webform.js +19 -34
  31. package/lib/cjs/WebformBuilder.js +27 -68
  32. package/lib/cjs/Wizard.d.ts +1 -0
  33. package/lib/cjs/Wizard.js +44 -31
  34. package/lib/cjs/WizardBuilder.js +5 -15
  35. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +2 -6
  36. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +3 -9
  37. package/lib/cjs/addons/index.js +1 -3
  38. package/lib/cjs/components/_classes/component/Component.d.ts +10 -5
  39. package/lib/cjs/components/_classes/component/Component.js +76 -134
  40. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +2 -4
  41. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +4 -16
  42. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +1 -4
  43. package/lib/cjs/components/_classes/field/Field.js +1 -4
  44. package/lib/cjs/components/_classes/input/Input.js +2 -2
  45. package/lib/cjs/components/_classes/list/ListComponent.js +4 -4
  46. package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.js +6 -28
  47. package/lib/cjs/components/_classes/multivalue/Multivalue.js +8 -26
  48. package/lib/cjs/components/_classes/nested/NestedComponent.js +1 -4
  49. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +5 -9
  50. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +1 -3
  51. package/lib/cjs/components/address/Address.js +10 -30
  52. package/lib/cjs/components/address/editForm/Address.edit.provider.js +8 -32
  53. package/lib/cjs/components/alert/Alert.js +3 -6
  54. package/lib/cjs/components/button/Button.d.ts +1 -0
  55. package/lib/cjs/components/button/Button.js +31 -17
  56. package/lib/cjs/components/button/editForm/Button.edit.display.js +8 -32
  57. package/lib/cjs/components/checkbox/Checkbox.js +4 -10
  58. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.js +2 -8
  59. package/lib/cjs/components/columns/Columns.js +5 -17
  60. package/lib/cjs/components/container/Container.js +1 -3
  61. package/lib/cjs/components/currency/Currency.js +2 -7
  62. package/lib/cjs/components/datagrid/DataGrid.js +27 -68
  63. package/lib/cjs/components/datamap/DataMap.js +4 -16
  64. package/lib/cjs/components/datetime/DateTime.js +2 -6
  65. package/lib/cjs/components/datetime/editForm/DateTime.edit.display.js +1 -4
  66. package/lib/cjs/components/day/Day.js +12 -70
  67. package/lib/cjs/components/day/editForm/Day.edit.day.js +1 -3
  68. package/lib/cjs/components/day/editForm/Day.edit.month.js +1 -3
  69. package/lib/cjs/components/editgrid/EditGrid.d.ts +1 -0
  70. package/lib/cjs/components/editgrid/EditGrid.js +18 -44
  71. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -4
  72. package/lib/cjs/components/file/File.js +40 -70
  73. package/lib/cjs/components/file/editForm/File.edit.display.js +1 -5
  74. package/lib/cjs/components/file/editForm/File.edit.file.js +8 -30
  75. package/lib/cjs/components/form/Form.js +5 -7
  76. package/lib/cjs/components/html/HTML.js +1 -5
  77. package/lib/cjs/components/number/Number.js +2 -4
  78. package/lib/cjs/components/panel/editForm/Panel.edit.display.js +3 -12
  79. package/lib/cjs/components/password/Password.js +1 -4
  80. package/lib/cjs/components/radio/Radio.js +7 -17
  81. package/lib/cjs/components/radio/editForm/Radio.edit.data.js +4 -14
  82. package/lib/cjs/components/recaptcha/ReCaptcha.js +3 -6
  83. package/lib/cjs/components/select/Select.js +49 -94
  84. package/lib/cjs/components/select/editForm/Select.edit.data.js +37 -182
  85. package/lib/cjs/components/select/editForm/Select.edit.validation.js +1 -9
  86. package/lib/cjs/components/selectboxes/SelectBoxes.js +3 -6
  87. package/lib/cjs/components/signature/Signature.d.ts +1 -1
  88. package/lib/cjs/components/signature/Signature.js +5 -10
  89. package/lib/cjs/components/signature/editForm/Signature.edit.display.js +2 -6
  90. package/lib/cjs/components/survey/Survey.js +6 -17
  91. package/lib/cjs/components/survey/editForm/Survey.edit.data.js +4 -12
  92. package/lib/cjs/components/table/editForm/Table.edit.display.js +3 -3
  93. package/lib/cjs/components/tabs/Tabs.js +4 -19
  94. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +1 -3
  95. package/lib/cjs/components/tags/Tags.js +4 -14
  96. package/lib/cjs/components/textarea/TextArea.js +8 -15
  97. package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +14 -56
  98. package/lib/cjs/components/textfield/TextField.js +4 -4
  99. package/lib/cjs/components/textfield/editForm/TextField.edit.display.js +2 -8
  100. package/lib/cjs/components/time/Time.js +1 -4
  101. package/lib/cjs/components/time/editForm/Time.edit.display.js +1 -4
  102. package/lib/cjs/formio.form.js +5 -5
  103. package/lib/cjs/package.json +1 -1
  104. package/lib/cjs/providers/address/AddressProvider.js +1 -1
  105. package/lib/cjs/providers/address/GoogleAddressProvider.js +2 -4
  106. package/lib/cjs/providers/processor/fileProcessor.js +1 -3
  107. package/lib/cjs/providers/storage/azure.js +5 -6
  108. package/lib/cjs/providers/storage/indexeddb.js +5 -15
  109. package/lib/cjs/providers/storage/s3.js +3 -14
  110. package/lib/cjs/providers/storage/xhr.js +19 -28
  111. package/lib/cjs/templates/Templates.js +1 -0
  112. package/lib/cjs/translations/en.d.ts +237 -81
  113. package/lib/cjs/translations/en.js +10 -81
  114. package/lib/cjs/utils/ChoicesWrapper.js +1 -1
  115. package/lib/cjs/utils/builder.js +5 -26
  116. package/lib/cjs/utils/i18n.d.ts +5 -2
  117. package/lib/cjs/utils/i18n.js +33 -12
  118. package/lib/cjs/utils/utils.js +42 -52
  119. package/lib/cjs/widgets/CalendarWidget.js +2 -6
  120. package/lib/mjs/Embed.js +8 -16
  121. package/lib/mjs/Form.js +4 -4
  122. package/lib/mjs/Formio.js +2 -9
  123. package/lib/mjs/InlineEmbed.js +1 -4
  124. package/lib/mjs/PDF.js +27 -8
  125. package/lib/mjs/PDFBuilder.js +6 -10
  126. package/lib/mjs/Webform.d.ts +1 -0
  127. package/lib/mjs/Webform.js +19 -31
  128. package/lib/mjs/WebformBuilder.js +27 -68
  129. package/lib/mjs/Wizard.d.ts +1 -0
  130. package/lib/mjs/Wizard.js +39 -27
  131. package/lib/mjs/WizardBuilder.js +5 -15
  132. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +2 -6
  133. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +3 -9
  134. package/lib/mjs/addons/index.js +1 -3
  135. package/lib/mjs/components/_classes/component/Component.d.ts +10 -5
  136. package/lib/mjs/components/_classes/component/Component.js +75 -134
  137. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +2 -4
  138. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +4 -16
  139. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -4
  140. package/lib/mjs/components/_classes/field/Field.js +1 -4
  141. package/lib/mjs/components/_classes/input/Input.js +2 -2
  142. package/lib/mjs/components/_classes/list/ListComponent.js +4 -4
  143. package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.js +6 -28
  144. package/lib/mjs/components/_classes/multivalue/Multivalue.js +8 -26
  145. package/lib/mjs/components/_classes/nested/NestedComponent.js +1 -4
  146. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +5 -9
  147. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +1 -3
  148. package/lib/mjs/components/address/Address.js +10 -30
  149. package/lib/mjs/components/address/editForm/Address.edit.provider.js +8 -32
  150. package/lib/mjs/components/alert/Alert.js +3 -6
  151. package/lib/mjs/components/button/Button.d.ts +1 -0
  152. package/lib/mjs/components/button/Button.js +29 -16
  153. package/lib/mjs/components/button/editForm/Button.edit.display.js +8 -32
  154. package/lib/mjs/components/checkbox/Checkbox.js +4 -10
  155. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.js +2 -8
  156. package/lib/mjs/components/columns/Columns.js +5 -17
  157. package/lib/mjs/components/container/Container.js +1 -3
  158. package/lib/mjs/components/currency/Currency.js +2 -7
  159. package/lib/mjs/components/datagrid/DataGrid.js +28 -69
  160. package/lib/mjs/components/datamap/DataMap.js +12 -18
  161. package/lib/mjs/components/datetime/DateTime.js +2 -6
  162. package/lib/mjs/components/datetime/editForm/DateTime.edit.display.js +1 -4
  163. package/lib/mjs/components/day/Day.js +12 -70
  164. package/lib/mjs/components/day/editForm/Day.edit.day.js +1 -3
  165. package/lib/mjs/components/day/editForm/Day.edit.month.js +1 -3
  166. package/lib/mjs/components/editgrid/EditGrid.d.ts +1 -0
  167. package/lib/mjs/components/editgrid/EditGrid.js +18 -44
  168. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -4
  169. package/lib/mjs/components/file/File.js +40 -70
  170. package/lib/mjs/components/file/editForm/File.edit.display.js +1 -5
  171. package/lib/mjs/components/file/editForm/File.edit.file.js +8 -30
  172. package/lib/mjs/components/form/Form.js +5 -7
  173. package/lib/mjs/components/html/HTML.js +1 -5
  174. package/lib/mjs/components/number/Number.js +2 -4
  175. package/lib/mjs/components/panel/editForm/Panel.edit.display.js +3 -12
  176. package/lib/mjs/components/password/Password.js +1 -4
  177. package/lib/mjs/components/radio/Radio.js +7 -17
  178. package/lib/mjs/components/radio/editForm/Radio.edit.data.js +4 -14
  179. package/lib/mjs/components/recaptcha/ReCaptcha.js +3 -6
  180. package/lib/mjs/components/select/Select.js +52 -97
  181. package/lib/mjs/components/select/editForm/Select.edit.data.js +37 -182
  182. package/lib/mjs/components/select/editForm/Select.edit.validation.js +1 -9
  183. package/lib/mjs/components/selectboxes/SelectBoxes.js +3 -6
  184. package/lib/mjs/components/signature/Signature.d.ts +1 -1
  185. package/lib/mjs/components/signature/Signature.js +5 -10
  186. package/lib/mjs/components/signature/editForm/Signature.edit.display.js +2 -6
  187. package/lib/mjs/components/survey/Survey.js +6 -17
  188. package/lib/mjs/components/survey/editForm/Survey.edit.data.js +4 -12
  189. package/lib/mjs/components/table/editForm/Table.edit.display.js +3 -3
  190. package/lib/mjs/components/tabs/Tabs.js +4 -19
  191. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +1 -3
  192. package/lib/mjs/components/tags/Tags.js +4 -14
  193. package/lib/mjs/components/textarea/TextArea.js +8 -15
  194. package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +14 -56
  195. package/lib/mjs/components/textfield/TextField.js +4 -4
  196. package/lib/mjs/components/textfield/editForm/TextField.edit.display.js +2 -8
  197. package/lib/mjs/components/time/Time.js +1 -4
  198. package/lib/mjs/components/time/editForm/Time.edit.display.js +1 -4
  199. package/lib/mjs/formio.form.js +6 -6
  200. package/lib/mjs/package.json +1 -1
  201. package/lib/mjs/providers/address/AddressProvider.js +1 -1
  202. package/lib/mjs/providers/address/GoogleAddressProvider.js +2 -4
  203. package/lib/mjs/providers/processor/fileProcessor.js +1 -3
  204. package/lib/mjs/providers/storage/azure.js +5 -6
  205. package/lib/mjs/providers/storage/indexeddb.js +5 -15
  206. package/lib/mjs/providers/storage/s3.js +3 -14
  207. package/lib/mjs/providers/storage/xhr.js +19 -32
  208. package/lib/mjs/templates/Templates.js +1 -0
  209. package/lib/mjs/translations/en.d.ts +237 -81
  210. package/lib/mjs/translations/en.js +91 -1
  211. package/lib/mjs/utils/ChoicesWrapper.js +1 -1
  212. package/lib/mjs/utils/builder.js +5 -26
  213. package/lib/mjs/utils/i18n.d.ts +5 -2
  214. package/lib/mjs/utils/i18n.js +33 -12
  215. package/lib/mjs/utils/utils.js +42 -52
  216. package/lib/mjs/widgets/CalendarWidget.js +2 -6
  217. package/package.json +8 -6
@@ -1,4 +1,5 @@
1
1
  import templates from './index';
2
+ // GOTCHA(G-FJS03)
2
3
  import { Template } from '@formio/core/experimental';
3
4
  Template.addTemplates(templates);
4
5
  Template.defaultTemplates = Template.templates.bootstrap;
@@ -1,82 +1,238 @@
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 complete: string;
8
- let error: string;
9
- let errorListHotkey: string;
10
- let errorsListNavigationMessage: string;
11
- let submitError: string;
12
- let required: string;
13
- let unique: string;
14
- let array: string;
15
- let array_nonempty: string;
16
- let nonarray: string;
17
- let select: string;
18
- let pattern: string;
19
- let minLength: string;
20
- let maxLength: string;
21
- let minWords: string;
22
- let maxWords: string;
23
- let min: string;
24
- let max: string;
25
- let maxDate: string;
26
- let minDate: string;
27
- let maxYear: string;
28
- let minYear: string;
29
- let minSelectedCount: string;
30
- let maxSelectedCount: string;
31
- let invalid_email: string;
32
- let invalid_url: string;
33
- let invalid_regex: string;
34
- let invalid_date: string;
35
- let invalid_day: string;
36
- let invalidValueProperty: string;
37
- let mask: string;
38
- let valueIsNotAvailable: string;
39
- let stripe: string;
40
- let month: string;
41
- let day: string;
42
- let year: string;
43
- let january: string;
44
- let february: string;
45
- let march: string;
46
- let april: string;
47
- let may: string;
48
- let june: string;
49
- let july: string;
50
- let august: string;
51
- let september: string;
52
- let october: string;
53
- let november: string;
54
- let december: string;
55
- let next: string;
56
- let previous: string;
57
- let cancel: string;
58
- let submit: string;
59
- let confirmCancel: string;
60
- let saveDraftInstanceError: string;
61
- let saveDraftAuthError: string;
62
- let restoreDraftInstanceError: string;
63
- let saveDraftError: string;
64
- let restoreDraftError: string;
65
- let time: string;
66
- let cancelButtonAriaLabel: string;
67
- let previousButtonAriaLabel: string;
68
- let nextButtonAriaLabel: string;
69
- let submitButtonAriaLabel: string;
70
- let reCaptchaTokenValidationError: string;
71
- let reCaptchaTokenNotSpecifiedError: string;
72
- let apiKey: string;
73
- let typeRemaining: string;
74
- let typeCount: string;
75
- let requiredDayField: string;
76
- let requiredDayEmpty: string;
77
- let requiredMonthField: string;
78
- let requiredYearField: string;
79
- let fileTooSmall: string;
80
- let fileTooBig: string;
81
- }
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
+ fileTooSmall: string;
80
+ fileTooBig: 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
+ 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
+ confirmComponentRemoveWithChildren: string;
162
+ confirmComponentRemove: string;
163
+ requestAborted: string;
164
+ checkEnteredParameters: string;
165
+ oauthSessionExpired: string;
166
+ help: string;
167
+ component: string;
168
+ save: string;
169
+ preview: string;
170
+ dragAndDropComponent: string;
171
+ searchFields: string;
172
+ noMatchesFound: string;
173
+ fileName: string;
174
+ size: string;
175
+ type: string;
176
+ gallery: string;
177
+ camera: string;
178
+ dropFilesToAttach: string;
179
+ useCamera: string;
180
+ browse: string;
181
+ takePicture: string;
182
+ switchToFileUpload: string;
183
+ completeStatus: string;
184
+ noStorageSet: string;
185
+ noFileApiSupport: string;
186
+ noFormDataSupport: string;
187
+ noProgressSupport: string;
188
+ close: string;
189
+ addResource: string;
190
+ autocomplete: string;
191
+ showPreview: string;
192
+ hidePreview: string;
193
+ createPage: string;
194
+ page: string;
195
+ closeBtnDescription: string;
196
+ cancelBtnDescription: string;
197
+ saveBtnDescription: string;
198
+ addOrRemove: string;
199
+ anyFileTypesAllowed: string;
200
+ allowedFileTypes: string;
201
+ syncing: string;
202
+ syncNow: string;
203
+ pressToOpen: string;
204
+ browseToAttachFileFor: string;
205
+ or: string;
206
+ numericOnly: string;
207
+ uploadPdfFile: string;
208
+ dropToStart: string;
209
+ expand: string;
210
+ collapse: string;
211
+ add: string;
212
+ delete: string;
213
+ revert: string;
214
+ removeBtnPressToRemove: string;
215
+ file: string;
216
+ captureVideo: string;
217
+ captureAudio: string;
218
+ captureImage: string;
219
+ browseFiles: string;
220
+ noComponentsSetInGrid: string;
221
+ sortAscending: string;
222
+ sortDescending: string;
223
+ filter: string;
224
+ clear: string;
225
+ showItemsWithValue: string;
226
+ gridItemsPerPage: string;
227
+ gridAllItems: string;
228
+ recordsSelectedOnPage: string;
229
+ recordsSelectedInTable: string;
230
+ gridSelectAll: string;
231
+ itemsInTable: string;
232
+ clearSelection: string;
233
+ editGridRow: string;
234
+ deleteGridRow: string;
235
+ selected: string;
236
+ actions: string;
237
+ };
82
238
  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.',
@@ -77,5 +79,93 @@ export default {
77
79
  requiredMonthField: '{{ field }} is required',
78
80
  requiredYearField: '{{ field }} is required',
79
81
  fileTooSmall: 'File is too small; it must be at least {{ size }}',
80
- fileTooBig: 'File is too big; it must be at most {{ size }}'
82
+ fileTooBig: 'File is too big; it must be at most {{ size }}',
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
+ noFileService: 'File Service not provided.',
149
+ fileProcessingFailed: 'File processing has been failed.',
150
+ readyForUpload: 'Ready to be uploaded into storage',
151
+ readyForRemovingFromStorage: 'Ready to be removed from storage',
152
+ preparingFileToRemove: 'Preparing file to remove',
153
+ succefullyRemoved: 'Succefully removed',
154
+ succefullyUploaded: 'Succefully uploaded',
155
+ maxSelectItems: 'You may only select up to {{maxCount}} items',
156
+ minSelectItems: 'You must select at least {{minCount}} items',
157
+ clickToSign: 'Click to Sign',
158
+ surveyQuestion: 'Question',
159
+ surveyQuestionValue: 'Value',
160
+ success: 'Success',
161
+ noResultsFound: 'No results found',
162
+ noChoices: 'No choices to choose from',
163
+ typeToSearch: 'Type to search',
164
+ loading: 'Loading',
165
+ confirmComponentRemoveWithChildren: 'Removing this component will also remove all of its children. Are you sure you want to do this?',
166
+ confirmComponentRemove: 'Are you sure you want to remove this component?',
167
+ requestAborted: 'Request was aborted',
168
+ checkEnteredParameters: 'Please, check the entered parameters',
169
+ // when temp document storing oauth state and code verifier is cleared by ttl before the user completes login
170
+ oauthSessionExpired: 'Login attempt expired; please try again. Refreshing...',
81
171
  };
@@ -30,7 +30,7 @@ class ChoicesWrapper extends Choices {
30
30
  this._wasTap = true;
31
31
  }
32
32
  _onEnterKey(...args) {
33
- const [event,] = args;
33
+ const [event] = args;
34
34
  // Prevent dropdown form opening when removeItemButton was pressed using 'Enter' on keyboard
35
35
  if (event.target.className === 'choices__button') {
36
36
  this.shouldOpenDropDown = false;
@@ -12,23 +12,14 @@ export default {
12
12
  const formKeys = {};
13
13
  eachComponent(container, (comp) => {
14
14
  formKeys[comp.key] = true;
15
- if ([
16
- 'address',
17
- 'container',
18
- 'datagrid',
19
- 'editgrid',
20
- 'dynamicWizard',
21
- 'tree',
22
- ].includes(comp.type) ||
15
+ if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(comp.type) ||
23
16
  comp.tree ||
24
17
  comp.arrayTree) {
25
18
  return true;
26
19
  }
27
20
  }, true);
28
21
  // Recurse into all child components.
29
- eachComponent([
30
- component,
31
- ], (component) => {
22
+ eachComponent([component], (component) => {
32
23
  // Skip key uniquification if this component doesn't have a key.
33
24
  if (!component.key) {
34
25
  return;
@@ -39,14 +30,7 @@ export default {
39
30
  changed = true;
40
31
  }
41
32
  formKeys[newKey] = true;
42
- if ([
43
- 'address',
44
- 'container',
45
- 'datagrid',
46
- 'editgrid',
47
- 'dynamicWizard',
48
- 'tree',
49
- ].includes(component.type) ||
33
+ if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(component.type) ||
50
34
  component.tree ||
51
35
  component.arrayTree) {
52
36
  return true;
@@ -58,10 +42,7 @@ export default {
58
42
  * Additional shortcuts for the builder.
59
43
  */
60
44
  additionalShortcuts: {
61
- button: [
62
- 'Enter',
63
- 'Esc',
64
- ],
45
+ button: ['Enter', 'Esc'],
65
46
  },
66
47
  /**
67
48
  * Returns the alpha character shortcuts.
@@ -96,9 +77,7 @@ export default {
96
77
  if (!component) {
97
78
  return [];
98
79
  }
99
- return [
100
- '',
101
- ]
80
+ return ['']
102
81
  .concat(_.difference(this.getAlphaShortcuts().concat(this.getAdditionalShortcuts(component.type)), this.getBindedShortcuts(form.components, component)))
103
82
  .map((shortcut) => ({
104
83
  label: shortcut,
@@ -2,14 +2,17 @@
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
  originalLanguage: string;
11
14
  currentLanguage: any;
12
- setLanguages(languages: any): void;
15
+ setLanguages(languages: any, noDefaultOverride: any): void;
13
16
  dir(lang?: string): "rtl" | "ltr";
14
17
  changeLanguage(language: any, ready?: null): void;
15
18
  addResourceBundle(language: any, type: any, strings: any): void;
@@ -1,5 +1,7 @@
1
1
  import { Evaluator } from './Evaluator';
2
2
  import i18n from '../i18n';
3
+ import { isEmpty } from 'lodash';
4
+ import { fastCloneDeep } from '@formio/core';
3
5
  const i18Defaults = {};
4
6
  for (const lang in i18n.resources) {
5
7
  if (i18n.resources.hasOwnProperty(lang)) {
@@ -10,7 +12,9 @@ for (const lang in i18n.resources) {
10
12
  * This file is used to mimic the i18n library interface.
11
13
  */
12
14
  export class I18n {
13
- languages = i18Defaults;
15
+ static languages = i18Defaults;
16
+ languages = fastCloneDeep(I18n.languages || {});
17
+ defaultKeys = I18n.languages?.en || {};
14
18
  language = 'en';
15
19
  originalLanguage = 'en';
16
20
  currentLanguage = i18Defaults.en;
@@ -18,7 +22,20 @@ export class I18n {
18
22
  this.setLanguages(languages);
19
23
  this.changeLanguage(this.language);
20
24
  }
21
- setLanguages(languages) {
25
+ static setDefaultTranslations(languages) {
26
+ if (isEmpty(languages)) {
27
+ return;
28
+ }
29
+ for (const lang in languages) {
30
+ if (lang !== 'language' && languages.hasOwnProperty(lang)) {
31
+ if (!this.languages[lang]) {
32
+ this.languages[lang] = {};
33
+ }
34
+ this.languages[lang] = { ...languages[lang], ...this.languages[lang], };
35
+ }
36
+ }
37
+ }
38
+ setLanguages(languages, noDefaultOverride) {
22
39
  if (languages.resources) {
23
40
  for (const lang in languages.resources) {
24
41
  if (languages.resources.hasOwnProperty(lang)) {
@@ -45,7 +62,9 @@ export class I18n {
45
62
  if (!this.languages[lang]) {
46
63
  this.languages[lang] = {};
47
64
  }
48
- this.languages[lang] = { ...this.languages[lang], ...languages[lang] };
65
+ this.languages[lang] = noDefaultOverride
66
+ ? { ...languages[lang], ...this.languages[lang] }
67
+ : { ...this.languages[lang], ...languages[lang] };
49
68
  }
50
69
  }
51
70
  }
@@ -54,13 +73,7 @@ export class I18n {
54
73
  }
55
74
  dir(lang = '') {
56
75
  lang = lang || this.language;
57
- const rtls = [
58
- 'ar',
59
- 'he',
60
- 'fa',
61
- 'ps',
62
- 'ur',
63
- ];
76
+ const rtls = ['ar', 'he', 'fa', 'ps', 'ur'];
64
77
  return rtls.includes(lang) ? 'rtl' : 'ltr';
65
78
  }
66
79
  static createInstance() {
@@ -81,12 +94,20 @@ export class I18n {
81
94
  this.languages[language] = strings;
82
95
  }
83
96
  t(text, ...args) {
84
- if (this.currentLanguage[text]) {
97
+ let currentTranslation = this.currentLanguage[text];
98
+ // provide compatibility with cases where the entire phrase is used as a key
99
+ // get the phrase that is possibly being used as a key
100
+ const defaultKey = this.defaultKeys[text];
101
+ if (defaultKey && this.currentLanguage[defaultKey]) {
102
+ // get translation using the phrase as a key
103
+ currentTranslation = this.currentLanguage[defaultKey];
104
+ }
105
+ if (currentTranslation) {
85
106
  const customTranslationFieldName = args[0]?.field;
86
107
  if (customTranslationFieldName && this.currentLanguage[customTranslationFieldName]) {
87
108
  args[0].field = this.currentLanguage[customTranslationFieldName];
88
109
  }
89
- return Evaluator.interpolateString(this.currentLanguage[text], ...args);
110
+ return Evaluator.interpolateString(currentTranslation, ...args);
90
111
  }
91
112
  return Evaluator.interpolateString(text, ...args);
92
113
  }