@formio/js 5.1.0-dev.6039.a838d78 → 5.1.0-dev.6042.18ef5d3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +140 -6
- package/dist/formio.form.js +587 -576
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +609 -598
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +45 -12
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +46 -13
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Element.d.ts +2 -1
- package/lib/cjs/Element.js +6 -4
- package/lib/cjs/Webform.d.ts +2 -2
- package/lib/cjs/Webform.js +6 -8
- package/lib/cjs/WebformBuilder.js +4 -0
- package/lib/cjs/Wizard.d.ts +1 -0
- package/lib/cjs/Wizard.js +23 -3
- package/lib/cjs/components/_classes/component/Component.d.ts +27 -17
- package/lib/cjs/components/_classes/component/Component.js +124 -70
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +19 -0
- package/lib/cjs/components/_classes/component/editForm/utils.js +1 -1
- package/lib/cjs/components/_classes/list/ListComponent.js +2 -2
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +0 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.form.js +13 -0
- package/lib/cjs/components/_classes/nested/NestedComponent.js +10 -18
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -2
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +0 -11
- package/lib/cjs/components/address/Address.d.ts +9 -0
- package/lib/cjs/components/address/Address.js +31 -8
- package/lib/cjs/components/address/editForm/Address.edit.display.d.ts +4 -0
- package/lib/cjs/components/address/editForm/Address.edit.display.js +1 -0
- package/lib/cjs/components/address/editForm/Address.edit.provider.js +8 -8
- package/lib/cjs/components/content/editForm/Content.edit.display.js +8 -0
- package/lib/cjs/components/currency/editForm/Currency.edit.display.js +12 -0
- package/lib/cjs/components/datagrid/DataGrid.js +0 -3
- package/lib/cjs/components/datamap/DataMap.js +2 -6
- package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.d.ts +66 -15
- package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.js +68 -47
- package/lib/cjs/components/day/editForm/Day.edit.display.js +8 -0
- package/lib/cjs/components/editgrid/EditGrid.js +3 -13
- package/lib/cjs/components/email/editForm/Email.edit.display.js +12 -0
- package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
- package/lib/cjs/components/file/File.js +7 -2
- package/lib/cjs/components/file/editForm/File.edit.file.d.ts +13 -0
- package/lib/cjs/components/file/editForm/File.edit.file.js +1 -0
- package/lib/cjs/components/form/Form.js +11 -11
- package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
- package/lib/cjs/components/html/HTML.js +1 -2
- package/lib/cjs/components/html/editForm/HTML.edit.display.js +8 -0
- package/lib/cjs/components/number/editForm/Number.edit.display.js +12 -0
- package/lib/cjs/components/password/editForm/Password.edit.display.js +13 -1
- package/lib/cjs/components/phonenumber/PhoneNumber.form.js +9 -1
- package/lib/cjs/components/radio/Radio.js +1 -1
- package/lib/cjs/components/select/Select.js +1 -1
- package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +68 -110
- package/lib/cjs/components/select/editForm/Select.edit.data.js +2 -37
- package/lib/cjs/components/selectboxes/SelectBoxes.js +3 -0
- package/lib/cjs/components/survey/Survey.js +1 -1
- package/lib/cjs/components/tabs/Tabs.js +1 -0
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
- package/lib/cjs/components/textarea/TextArea.js +9 -1
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
- package/lib/cjs/components/unknown/Unknown.form.d.ts +2 -1
- package/lib/cjs/components/unknown/Unknown.form.js +13 -9
- package/lib/cjs/components/url/editForm/Url.edit.display.js +12 -0
- package/lib/cjs/components/well/editForm/Well.edit.display.js +8 -0
- package/lib/cjs/formio.form.js +2 -2
- package/lib/cjs/providers/storage/uploadAdapter.js +5 -3
- package/lib/cjs/translations/en.d.ts +1 -234
- package/lib/cjs/translations/en.js +4 -2
- package/lib/cjs/utils/formUtils.d.ts +2 -2
- package/lib/cjs/utils/utils.d.ts +0 -8
- package/lib/cjs/utils/utils.js +3 -23
- package/lib/mjs/Element.d.ts +2 -1
- package/lib/mjs/Element.js +6 -4
- package/lib/mjs/Webform.d.ts +2 -2
- package/lib/mjs/Webform.js +6 -8
- package/lib/mjs/WebformBuilder.js +4 -0
- package/lib/mjs/Wizard.d.ts +1 -0
- package/lib/mjs/Wizard.js +22 -2
- package/lib/mjs/components/_classes/component/Component.d.ts +27 -17
- package/lib/mjs/components/_classes/component/Component.js +125 -71
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +19 -0
- package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
- package/lib/mjs/components/_classes/list/ListComponent.js +2 -2
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +0 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.form.js +13 -0
- package/lib/mjs/components/_classes/nested/NestedComponent.js +10 -18
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -2
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +0 -11
- package/lib/mjs/components/address/Address.d.ts +9 -0
- package/lib/mjs/components/address/Address.js +31 -8
- package/lib/mjs/components/address/editForm/Address.edit.display.d.ts +4 -0
- package/lib/mjs/components/address/editForm/Address.edit.display.js +1 -0
- package/lib/mjs/components/address/editForm/Address.edit.provider.js +8 -8
- package/lib/mjs/components/content/editForm/Content.edit.display.js +8 -0
- package/lib/mjs/components/currency/editForm/Currency.edit.display.js +12 -0
- package/lib/mjs/components/datagrid/DataGrid.js +0 -3
- package/lib/mjs/components/datamap/DataMap.js +2 -6
- package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.d.ts +66 -15
- package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.js +68 -47
- package/lib/mjs/components/day/editForm/Day.edit.display.js +8 -0
- package/lib/mjs/components/editgrid/EditGrid.js +3 -12
- package/lib/mjs/components/email/editForm/Email.edit.display.js +12 -0
- package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
- package/lib/mjs/components/file/File.js +7 -2
- package/lib/mjs/components/file/editForm/File.edit.file.d.ts +13 -0
- package/lib/mjs/components/file/editForm/File.edit.file.js +1 -0
- package/lib/mjs/components/form/Form.js +11 -11
- package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
- package/lib/mjs/components/html/HTML.js +1 -2
- package/lib/mjs/components/html/editForm/HTML.edit.display.js +8 -0
- package/lib/mjs/components/number/editForm/Number.edit.display.js +12 -0
- package/lib/mjs/components/password/editForm/Password.edit.display.js +13 -1
- package/lib/mjs/components/phonenumber/PhoneNumber.form.js +9 -1
- package/lib/mjs/components/radio/Radio.js +1 -1
- package/lib/mjs/components/select/Select.js +1 -1
- package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +68 -110
- package/lib/mjs/components/select/editForm/Select.edit.data.js +2 -37
- package/lib/mjs/components/selectboxes/SelectBoxes.js +3 -0
- package/lib/mjs/components/survey/Survey.js +1 -1
- package/lib/mjs/components/tabs/Tabs.js +1 -0
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
- package/lib/mjs/components/textarea/TextArea.js +9 -1
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
- package/lib/mjs/components/unknown/Unknown.form.d.ts +2 -1
- package/lib/mjs/components/unknown/Unknown.form.js +13 -9
- package/lib/mjs/components/url/editForm/Url.edit.display.js +12 -0
- package/lib/mjs/components/well/editForm/Well.edit.display.js +8 -0
- package/lib/mjs/formio.form.js +1 -1
- package/lib/mjs/providers/storage/uploadAdapter.js +5 -3
- package/lib/mjs/translations/en.d.ts +1 -234
- package/lib/mjs/translations/en.js +3 -47
- package/lib/mjs/utils/formUtils.d.ts +2 -2
- package/lib/mjs/utils/utils.d.ts +0 -8
- package/lib/mjs/utils/utils.js +2 -21
- package/package.json +2 -2
- package/lib/cjs/i18n.d.ts +0 -13
- package/lib/cjs/i18n.js +0 -19
- package/lib/cjs/utils/i18n.d.ts +0 -19
- package/lib/cjs/utils/i18n.js +0 -120
- package/lib/mjs/i18n.d.ts +0 -13
- package/lib/mjs/i18n.js +0 -14
- package/lib/mjs/utils/i18n.d.ts +0 -19
- package/lib/mjs/utils/i18n.js +0 -112
@@ -1,235 +1,2 @@
|
|
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
|
-
};
|
1
|
+
declare const _default: any;
|
235
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
|
-
|
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}}', 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',
|
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: Component[], data: DataObject, fn: EachComponentDataAsyncCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?:
|
30
|
-
export const eachComponentData: (components: Component[], data: DataObject, fn: EachComponentDataCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?:
|
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;
|
31
31
|
export const getComponentKey: typeof Utils.getComponentKey;
|
32
32
|
export const getContextualRowPath: typeof Utils.getContextualRowPath;
|
33
33
|
export const getContextualRowData: typeof Utils.getContextualRowData;
|
package/lib/cjs/utils/utils.d.ts
CHANGED
@@ -478,14 +478,6 @@ export function getDataParentComponent(componentInstance: Component): Component
|
|
478
478
|
* @returns {boolean} - TRUE if the value is a promise; FALSE otherwise
|
479
479
|
*/
|
480
480
|
export function isPromise(value: any): boolean;
|
481
|
-
/**
|
482
|
-
* Determines if the component has a scoping parent in tree (a component which scopes its children and manages its
|
483
|
-
* changes by itself, e.g. EditGrid)
|
484
|
-
* @param {Component} componentInstance - The component to check for the scoping parent.
|
485
|
-
* @param {boolean} firstPass - Whether it is the first pass of the function
|
486
|
-
* @returns {boolean|*} - TRUE if the component has a scoping parent; FALSE otherwise
|
487
|
-
*/
|
488
|
-
export function isInsideScopingComponent(componentInstance: Component, firstPass?: boolean): boolean | any;
|
489
481
|
/**
|
490
482
|
* Returns all the focusable elements within the provided dom element.
|
491
483
|
* @param {HTMLElement} element - The element to get the focusable elements from.
|
package/lib/cjs/utils/utils.js
CHANGED
@@ -19,7 +19,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
19
|
};
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
21
21
|
exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.uniqueKey = exports.iterateKey = exports.delay = exports.fieldData = exports.getCurrencyAffixes = exports.getNumberDecimalLimit = exports.getNumberSeparators = exports.matchInputMask = exports.unmaskValue = exports.getInputMask = exports.convertFormatToMask = exports.convertFormatToMoment = exports.convertFormatToFlatpickr = exports.getLocaleDateFormatInfo = exports.formatOffset = exports.formatDate = exports.momentDate = exports.loadZones = exports.shouldLoadZones = exports.zonesLoaded = exports.offsetDate = exports.currentTimezone = exports.isValidDate = exports.getDateSetting = exports.guid = exports.uniqueName = exports.convertStringToHTMLElement = exports.unescapeHTML = exports.removeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getScriptPlugin = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = exports.moment = exports.ConditionOperators = exports.jsonLogic = void 0;
|
22
|
-
exports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.
|
22
|
+
exports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.interpolate = exports.Evaluator = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = exports.observeOverload = exports.withSwitch = void 0;
|
23
23
|
const lodash_1 = __importDefault(require("lodash"));
|
24
24
|
exports._ = lodash_1.default;
|
25
25
|
const json_logic_js_1 = __importDefault(require("json-logic-js"));
|
@@ -34,6 +34,7 @@ const Evaluator_1 = require("./Evaluator");
|
|
34
34
|
Object.defineProperty(exports, "Evaluator", { enumerable: true, get: function () { return Evaluator_1.Evaluator; } });
|
35
35
|
const conditionOperators_1 = __importDefault(require("./conditionOperators"));
|
36
36
|
exports.ConditionOperators = conditionOperators_1.default;
|
37
|
+
const core_1 = require("@formio/core");
|
37
38
|
const interpolate = Evaluator_1.Evaluator.interpolate;
|
38
39
|
exports.interpolate = interpolate;
|
39
40
|
__exportStar(require("./formUtils"), exports);
|
@@ -271,7 +272,7 @@ function checkSimpleConditional(component, condition, row, data, instance) {
|
|
271
272
|
default:
|
272
273
|
result = lodash_1.default.every(conditionsResult.flat(), res => !!res);
|
273
274
|
}
|
274
|
-
return show ? result : !result;
|
275
|
+
return (0, core_1.convertShowToBoolean)(show) ? result : !result;
|
275
276
|
}
|
276
277
|
}
|
277
278
|
exports.checkSimpleConditional = checkSimpleConditional;
|
@@ -1593,27 +1594,6 @@ function isPromise(value) {
|
|
1593
1594
|
&& Object.prototype.toString.call(value) === '[object Promise]';
|
1594
1595
|
}
|
1595
1596
|
exports.isPromise = isPromise;
|
1596
|
-
/**
|
1597
|
-
* Determines if the component has a scoping parent in tree (a component which scopes its children and manages its
|
1598
|
-
* changes by itself, e.g. EditGrid)
|
1599
|
-
* @param {Component} componentInstance - The component to check for the scoping parent.
|
1600
|
-
* @param {boolean} firstPass - Whether it is the first pass of the function
|
1601
|
-
* @returns {boolean|*} - TRUE if the component has a scoping parent; FALSE otherwise
|
1602
|
-
*/
|
1603
|
-
function isInsideScopingComponent(componentInstance, firstPass = true) {
|
1604
|
-
if (!firstPass && (componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.hasScopedChildren)) {
|
1605
|
-
return true;
|
1606
|
-
}
|
1607
|
-
const dataParent = getDataParentComponent(componentInstance);
|
1608
|
-
if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.hasScopedChildren) {
|
1609
|
-
return true;
|
1610
|
-
}
|
1611
|
-
else if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.parent) {
|
1612
|
-
return isInsideScopingComponent(dataParent.parent, false);
|
1613
|
-
}
|
1614
|
-
return false;
|
1615
|
-
}
|
1616
|
-
exports.isInsideScopingComponent = isInsideScopingComponent;
|
1617
1597
|
/**
|
1618
1598
|
* Returns all the focusable elements within the provided dom element.
|
1619
1599
|
* @param {HTMLElement} element - The element to get the focusable elements from.
|
package/lib/mjs/Element.d.ts
CHANGED
@@ -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.
|
package/lib/mjs/Element.js
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
import EventEmitter from './EventEmitter';
|
2
2
|
import { Formio } from './Formio';
|
3
3
|
import * as FormioUtils from './utils/utils';
|
4
|
-
import { I18n } from '
|
4
|
+
import { I18n } from '@formio/core';
|
5
5
|
import _ from 'lodash';
|
6
6
|
import moment from 'moment';
|
7
7
|
import maskInput from '@formio/vanilla-text-mask';
|
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.
|
package/lib/mjs/Webform.d.ts
CHANGED
@@ -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}} [
|
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
|
-
|
589
|
+
enTranslation?: {
|
590
590
|
[key: string]: string;
|
591
591
|
} | undefined;
|
592
592
|
/**
|
package/lib/mjs/Webform.js
CHANGED
@@ -2,7 +2,7 @@ import _ from 'lodash';
|
|
2
2
|
import moment from 'moment';
|
3
3
|
import { compareVersions } from 'compare-versions';
|
4
4
|
import EventEmitter from './EventEmitter';
|
5
|
-
import
|
5
|
+
import enTranslation from './translations/en';
|
6
6
|
import { Formio } from './Formio';
|
7
7
|
import Components from './components/Components';
|
8
8
|
import NestedDataComponent from './components/_classes/nesteddata/NestedDataComponent';
|
@@ -95,7 +95,7 @@ function getOptions(options) {
|
|
95
95
|
* @property {number} [saveDraftThrottle] - The throttle for the save draft feature.
|
96
96
|
* @property {boolean} [readOnly] - Set this form to readOnly.
|
97
97
|
* @property {boolean} [noAlerts] - Disable the alerts dialog.
|
98
|
-
* @property {{[key: string]: string}} [
|
98
|
+
* @property {{[key: string]: string}} [enTranslation] - The translation file for this rendering.
|
99
99
|
* @property {string} [template] - Custom logic for creation of elements.
|
100
100
|
* @property {boolean} [noDefaults] - Exclude default values from the settings.
|
101
101
|
* @property {any} [fileService] - The file service for this form.
|
@@ -342,7 +342,7 @@ export default class Webform extends NestedDataComponent {
|
|
342
342
|
*/
|
343
343
|
addLanguage(code, lang, active = false) {
|
344
344
|
if (this.i18next) {
|
345
|
-
var translations = _.assign(fastCloneDeep(
|
345
|
+
var translations = _.assign(fastCloneDeep(enTranslation), lang);
|
346
346
|
this.i18next.addResourceBundle(code, 'translation', translations, true, true);
|
347
347
|
if (active) {
|
348
348
|
this.language = code;
|
@@ -1158,11 +1158,8 @@ export default class Webform extends NestedDataComponent {
|
|
1158
1158
|
};
|
1159
1159
|
errors.forEach(({ message, context, fromServer, component }, index) => {
|
1160
1160
|
const text = !component?.label || context?.hasLabel || fromServer
|
1161
|
-
? this.t(
|
1162
|
-
: this.t(
|
1163
|
-
label: this.t(component?.label),
|
1164
|
-
message: this.t(message),
|
1165
|
-
});
|
1161
|
+
? this.t(message)
|
1162
|
+
: `${this.t(component?.label)}: ${this.t(message)}`;
|
1166
1163
|
displayedErrors.push(createListItem(text, index));
|
1167
1164
|
});
|
1168
1165
|
}
|
@@ -1325,6 +1322,7 @@ export default class Webform extends NestedDataComponent {
|
|
1325
1322
|
userAgent: navigator.userAgent,
|
1326
1323
|
pathName: window.location.pathname,
|
1327
1324
|
onLine: navigator.onLine,
|
1325
|
+
language: this.language,
|
1328
1326
|
});
|
1329
1327
|
}
|
1330
1328
|
submitForm(options = {}, local = false) {
|
@@ -1626,6 +1626,10 @@ export default class WebformBuilder extends Component {
|
|
1626
1626
|
info.type);
|
1627
1627
|
}
|
1628
1628
|
hasEditTabs(type) {
|
1629
|
+
// If the component type does not exist then it has no edit tabs
|
1630
|
+
if (!Components.components[type === 'custom' ? 'unknown' : type]) {
|
1631
|
+
return false;
|
1632
|
+
}
|
1629
1633
|
const editTabs = getComponent(Components.components[type === 'custom' ? 'unknown' : type].editForm().components, 'tabs', true).components;
|
1630
1634
|
const hiddenEditTabs = _.filter(_.get(this.options, `editForm.${type}`, []), 'ignore');
|
1631
1635
|
return _.intersectionBy(editTabs, hiddenEditTabs, 'key').length !== editTabs.length;
|
package/lib/mjs/Wizard.d.ts
CHANGED
@@ -106,6 +106,7 @@ declare class Wizard extends Webform {
|
|
106
106
|
onChange(flags: any, changed: any, modified: any, changes: any): void;
|
107
107
|
checkValidity(data: any, dirty: any, row: any, currentPageOnly: any, childErrors?: any[]): any;
|
108
108
|
focusOnComponent(key: any): void | Promise<void>;
|
109
|
+
triggerButtonCaptcha(page: any): void;
|
109
110
|
}
|
110
111
|
declare namespace Wizard {
|
111
112
|
let setBaseUrl: any;
|
package/lib/mjs/Wizard.js
CHANGED
@@ -594,7 +594,7 @@ export default class Wizard extends Webform {
|
|
594
594
|
}
|
595
595
|
this.redraw().then(() => {
|
596
596
|
this.checkData(this.submission.data);
|
597
|
-
this.triggerCaptcha(this.
|
597
|
+
this.triggerCaptcha(this.currentPage.components);
|
598
598
|
const errors = this.submitted ? this.validate(this.localData, { dirty: true }) : this.validateCurrentPage();
|
599
599
|
if (this.alert) {
|
600
600
|
this.showErrors(errors, true, true);
|
@@ -660,6 +660,7 @@ export default class Wizard extends Webform {
|
|
660
660
|
beforeSubmit() {
|
661
661
|
const pages = this.getPages({ all: true });
|
662
662
|
return Promise.all(pages.map((page) => {
|
663
|
+
this.triggerButtonCaptcha(page);
|
663
664
|
page.options.beforeSubmit = true;
|
664
665
|
return page.beforeSubmit();
|
665
666
|
}));
|
@@ -718,7 +719,10 @@ export default class Wizard extends Webform {
|
|
718
719
|
validateCurrentPage(flags = {}) {
|
719
720
|
const components = this.currentPage?.components.map((component) => component.component);
|
720
721
|
// Accessing the parent ensures the right instance (whether it's the parent Wizard or a nested Wizard) performs its validation
|
721
|
-
|
722
|
+
if (this.currentPage?.parent) {
|
723
|
+
return this.currentPage?.parent.validateComponents(components, this.root.data, flags);
|
724
|
+
}
|
725
|
+
return this.currentPage?.validateComponents(components, this.root ? this.root.data : this.data, flags);
|
722
726
|
}
|
723
727
|
emitPrevPage() {
|
724
728
|
this.emit('prevPage', { page: this.page, submission: this.submission });
|
@@ -930,6 +934,22 @@ export default class Wizard extends Webform {
|
|
930
934
|
}
|
931
935
|
return super.focusOnComponent(key);
|
932
936
|
}
|
937
|
+
triggerButtonCaptcha(page) {
|
938
|
+
if (!page.components) {
|
939
|
+
return;
|
940
|
+
}
|
941
|
+
let captchaComponent;
|
942
|
+
page.eachComponent((component) => {
|
943
|
+
if (/^(re)?captcha$/.test(component.component.type) &&
|
944
|
+
component.component.eventType === 'buttonClick' &&
|
945
|
+
component.component.buttonKey === 'submit') {
|
946
|
+
captchaComponent = component;
|
947
|
+
}
|
948
|
+
});
|
949
|
+
if (captchaComponent) {
|
950
|
+
captchaComponent.verify(`submitClick`);
|
951
|
+
}
|
952
|
+
}
|
933
953
|
}
|
934
954
|
Wizard.setBaseUrl = Formio.setBaseUrl;
|
935
955
|
Wizard.setApiUrl = Formio.setApiUrl;
|
@@ -119,13 +119,6 @@ declare class Component extends Element {
|
|
119
119
|
*/
|
120
120
|
paths: import('@formio/core').ComponentPaths;
|
121
121
|
_path: string;
|
122
|
-
/**
|
123
|
-
* Determines if this component is conditionally hidden. Should generally not be set outside of conditional logic pipeline.
|
124
|
-
* This is necessary because of clearOnHide behavior that only clears when conditionally hidden - we need to track
|
125
|
-
* conditionallyHidden separately from "regular" visibility.
|
126
|
-
*/
|
127
|
-
_parentConditionallyHidden: any;
|
128
|
-
_conditionallyHidden: any;
|
129
122
|
/**
|
130
123
|
* Determines if this component is visible, or not.
|
131
124
|
*/
|
@@ -170,6 +163,8 @@ declare class Component extends Element {
|
|
170
163
|
*/
|
171
164
|
info: any;
|
172
165
|
get componentsMap(): object;
|
166
|
+
parentShouldConditionallyClear(): boolean;
|
167
|
+
parentConditionallyHidden(): boolean;
|
173
168
|
set data(value: any);
|
174
169
|
get data(): any;
|
175
170
|
mergeSchema(component?: {}): any;
|
@@ -231,14 +226,10 @@ declare class Component extends Element {
|
|
231
226
|
* @returns {boolean} - Whether the component is visible or not.
|
232
227
|
*/
|
233
228
|
get visible(): boolean;
|
234
|
-
get
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
* @param {object} row - The row object to evaluate the condition against.
|
239
|
-
* @returns {boolean} - Whether the component is conditionally hidden.
|
240
|
-
*/
|
241
|
-
checkConditionallyHidden(data?: object, row?: object): boolean;
|
229
|
+
get logicallyHidden(): any;
|
230
|
+
_logicallyHidden: any;
|
231
|
+
shouldConditionallyClear(skipParent?: boolean): boolean;
|
232
|
+
conditionallyHidden(skipParent?: boolean): boolean;
|
242
233
|
set currentForm(instance: any);
|
243
234
|
get currentForm(): any;
|
244
235
|
_currentForm: any;
|
@@ -789,6 +780,10 @@ declare class Component extends Element {
|
|
789
780
|
* @returns {void}
|
790
781
|
*/
|
791
782
|
setElementInvalid(element: HTMLElement, invalid: boolean): void;
|
783
|
+
/**
|
784
|
+
* Clear any conditionally hidden components for this component only.
|
785
|
+
*/
|
786
|
+
clearComponentOnHide(): void;
|
792
787
|
/**
|
793
788
|
* Clears the components data if it is conditionally hidden AND clearOnHide is set to true for this component.
|
794
789
|
*/
|
@@ -893,7 +888,20 @@ declare class Component extends Element {
|
|
893
888
|
*/
|
894
889
|
deleteValue(): void;
|
895
890
|
getCustomDefaultValue(defaultValue: any): any;
|
896
|
-
|
891
|
+
/**
|
892
|
+
* Returns if a component has a default value set.
|
893
|
+
* @returns {boolean} - TRUE if a default value is set.
|
894
|
+
*/
|
895
|
+
get hasDefaultValue(): boolean;
|
896
|
+
/**
|
897
|
+
* Determine if we should add a default value for this component.
|
898
|
+
* @returns {boolean} - TRUE if a default value should be set
|
899
|
+
*/
|
900
|
+
get shouldAddDefaultValue(): boolean;
|
901
|
+
/**
|
902
|
+
* Get the default value of this component.
|
903
|
+
* @returns {*} - The default value for this component.
|
904
|
+
*/
|
897
905
|
get defaultValue(): any;
|
898
906
|
/**
|
899
907
|
* Get the input value of this component.
|
@@ -1003,9 +1011,10 @@ declare class Component extends Element {
|
|
1003
1011
|
* @param {boolean} dirty - If the component is dirty.
|
1004
1012
|
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
1005
1013
|
* @param {*} row - Contextual row data for this component.
|
1014
|
+
* @param {*} options - Additional options for validation.
|
1006
1015
|
* @returns {string} - The message to show when the component is invalid.
|
1007
1016
|
*/
|
1008
|
-
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any): string;
|
1017
|
+
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any, options?: any): string;
|
1009
1018
|
/**
|
1010
1019
|
* Returns if the component is valid or not.
|
1011
1020
|
* @param {*} data - The data to check if the component is valid.
|
@@ -1067,6 +1076,7 @@ declare class Component extends Element {
|
|
1067
1076
|
* @returns {void|boolean} - TRUE if no check should be performed on the component.
|
1068
1077
|
*/
|
1069
1078
|
checkData(data?: any, flags?: any, row?: any): void | boolean;
|
1079
|
+
checkingData: boolean | undefined;
|
1070
1080
|
checkModal(errors?: any[], dirty?: boolean): void;
|
1071
1081
|
get validationValue(): any;
|
1072
1082
|
isEmpty(value?: any): any;
|