@formio/js 5.1.0-dev.6108.401a61f → 5.1.0-dev.6112.06b0f26
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/README.md +7 -0
- package/dist/formio.builder.css +1 -0
- package/dist/formio.builder.min.css +1 -1
- package/dist/formio.form.css +1 -0
- package/dist/formio.form.js +116 -149
- package/dist/formio.form.min.css +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.css +1 -0
- package/dist/formio.full.js +123 -156
- package/dist/formio.full.min.css +1 -1
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +65 -54
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +76 -76
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Element.d.ts +2 -1
- package/lib/cjs/Element.js +18 -39
- package/lib/cjs/EventEmitter.js +2 -25
- package/lib/cjs/Form.js +2 -25
- package/lib/cjs/PDF.js +1 -1
- package/lib/cjs/PDFBuilder.d.ts +1 -0
- package/lib/cjs/PDFBuilder.js +10 -11
- package/lib/cjs/Webform.d.ts +2 -2
- package/lib/cjs/Webform.js +9 -9
- package/lib/cjs/WebformBuilder.d.ts +1 -1
- package/lib/cjs/WebformBuilder.js +45 -21
- package/lib/cjs/Wizard.d.ts +1 -2
- package/lib/cjs/Wizard.js +18 -24
- package/lib/cjs/WizardBuilder.js +1 -1
- package/lib/cjs/components/_classes/component/Component.d.ts +0 -1
- package/lib/cjs/components/_classes/component/Component.js +55 -62
- package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js +1 -1
- package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.js +1 -1
- package/lib/cjs/components/_classes/componentModal/ComponentModal.js +1 -1
- package/lib/cjs/components/_classes/input/Input.d.ts +1 -1
- package/lib/cjs/components/_classes/input/Input.js +3 -3
- package/lib/cjs/components/_classes/list/ListComponent.js +1 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.js +7 -7
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +1 -1
- package/lib/cjs/components/address/Address.js +1 -1
- package/lib/cjs/components/alert/Alert.js +1 -1
- package/lib/cjs/components/button/Button.js +1 -1
- package/lib/cjs/components/checkbox/Checkbox.js +1 -1
- package/lib/cjs/components/container/Container.js +1 -1
- package/lib/cjs/components/currency/Currency.js +1 -1
- package/lib/cjs/components/datagrid/DataGrid.js +1 -1
- package/lib/cjs/components/datamap/DataMap.js +7 -2
- package/lib/cjs/components/datetime/DateTime.d.ts +1 -1
- package/lib/cjs/components/datetime/DateTime.js +15 -13
- package/lib/cjs/components/day/Day.js +2 -2
- package/lib/cjs/components/editgrid/EditGrid.js +1 -1
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
- package/lib/cjs/components/fieldset/Fieldset.js +1 -0
- package/lib/cjs/components/file/File.js +1 -1
- package/lib/cjs/components/form/Form.js +14 -2
- package/lib/cjs/components/form/editForm/Form.edit.form.js +4 -3
- package/lib/cjs/components/number/Number.js +1 -1
- package/lib/cjs/components/panel/Panel.js +1 -1
- package/lib/cjs/components/radio/Radio.d.ts +8 -0
- package/lib/cjs/components/radio/Radio.js +16 -6
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +1 -1
- package/lib/cjs/components/select/Select.d.ts +1 -0
- package/lib/cjs/components/select/Select.js +20 -4
- package/lib/cjs/components/select/editForm/Select.edit.data.js +1 -1
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +6 -0
- package/lib/cjs/components/selectboxes/SelectBoxes.js +1 -1
- package/lib/cjs/components/signature/Signature.js +1 -1
- package/lib/cjs/components/survey/Survey.js +1 -1
- package/lib/cjs/components/tags/Tags.js +1 -1
- package/lib/cjs/components/textarea/TextArea.js +9 -4
- package/lib/cjs/components/textfield/TextField.js +13 -31
- package/lib/cjs/components/time/Time.js +1 -1
- package/lib/cjs/formio.form.js +5 -5
- package/lib/cjs/providers/storage/uploadAdapter.js +1 -1
- package/lib/cjs/translations/en.d.ts +1 -232
- package/lib/cjs/translations/en.js +4 -2
- package/lib/cjs/utils/Evaluator.d.ts +20 -6
- package/lib/cjs/utils/Evaluator.js +38 -15
- package/lib/cjs/utils/builder.js +5 -5
- package/lib/cjs/utils/conditionOperators/IsEqualTo.js +3 -3
- package/lib/cjs/utils/formUtils.d.ts +2 -2
- package/lib/cjs/utils/index.d.ts +169 -2
- package/lib/cjs/utils/index.js +22 -2
- package/lib/cjs/utils/utils.d.ts +22 -37
- package/lib/cjs/utils/utils.js +64 -135
- package/lib/cjs/widgets/CalendarWidget.d.ts +1 -8
- package/lib/cjs/widgets/CalendarWidget.js +17 -43
- package/lib/mjs/Element.d.ts +2 -1
- package/lib/mjs/Element.js +11 -9
- package/lib/mjs/EventEmitter.js +2 -2
- package/lib/mjs/Form.js +1 -1
- package/lib/mjs/PDF.js +1 -1
- package/lib/mjs/PDFBuilder.d.ts +1 -0
- package/lib/mjs/PDFBuilder.js +9 -10
- package/lib/mjs/Webform.d.ts +2 -2
- package/lib/mjs/Webform.js +7 -7
- package/lib/mjs/WebformBuilder.d.ts +1 -1
- package/lib/mjs/WebformBuilder.js +36 -13
- package/lib/mjs/Wizard.d.ts +1 -2
- package/lib/mjs/Wizard.js +17 -23
- package/lib/mjs/WizardBuilder.js +1 -1
- package/lib/mjs/components/_classes/component/Component.d.ts +0 -1
- package/lib/mjs/components/_classes/component/Component.js +28 -12
- package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.js +1 -1
- package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.js +1 -1
- package/lib/mjs/components/_classes/componentModal/ComponentModal.js +1 -1
- package/lib/mjs/components/_classes/input/Input.d.ts +1 -1
- package/lib/mjs/components/_classes/input/Input.js +3 -3
- package/lib/mjs/components/_classes/list/ListComponent.js +1 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.js +7 -7
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +1 -1
- package/lib/mjs/components/address/Address.js +1 -1
- package/lib/mjs/components/alert/Alert.js +1 -1
- package/lib/mjs/components/button/Button.js +1 -1
- package/lib/mjs/components/checkbox/Checkbox.js +1 -1
- package/lib/mjs/components/container/Container.js +1 -1
- package/lib/mjs/components/currency/Currency.js +1 -1
- package/lib/mjs/components/datagrid/DataGrid.js +1 -1
- package/lib/mjs/components/datamap/DataMap.js +7 -2
- package/lib/mjs/components/datetime/DateTime.d.ts +1 -1
- package/lib/mjs/components/datetime/DateTime.js +15 -13
- package/lib/mjs/components/day/Day.js +2 -2
- package/lib/mjs/components/editgrid/EditGrid.js +1 -1
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
- package/lib/mjs/components/fieldset/Fieldset.js +1 -0
- package/lib/mjs/components/file/File.js +1 -1
- package/lib/mjs/components/form/Form.js +13 -2
- package/lib/mjs/components/form/editForm/Form.edit.form.js +3 -2
- package/lib/mjs/components/number/Number.js +1 -1
- package/lib/mjs/components/panel/Panel.js +1 -1
- package/lib/mjs/components/radio/Radio.d.ts +8 -0
- package/lib/mjs/components/radio/Radio.js +16 -6
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +1 -1
- package/lib/mjs/components/select/Select.d.ts +1 -0
- package/lib/mjs/components/select/Select.js +20 -4
- package/lib/mjs/components/select/editForm/Select.edit.data.js +1 -1
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +6 -0
- package/lib/mjs/components/selectboxes/SelectBoxes.js +1 -1
- package/lib/mjs/components/signature/Signature.js +1 -1
- package/lib/mjs/components/survey/Survey.js +1 -1
- package/lib/mjs/components/tags/Tags.js +1 -1
- package/lib/mjs/components/textarea/TextArea.js +9 -4
- package/lib/mjs/components/textfield/TextField.js +7 -2
- package/lib/mjs/components/time/Time.js +1 -1
- package/lib/mjs/formio.form.js +3 -3
- package/lib/mjs/providers/storage/uploadAdapter.js +1 -1
- package/lib/mjs/translations/en.d.ts +1 -232
- package/lib/mjs/translations/en.js +8 -47
- package/lib/mjs/utils/Evaluator.d.ts +20 -6
- package/lib/mjs/utils/Evaluator.js +31 -13
- package/lib/mjs/utils/builder.js +1 -1
- package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
- package/lib/mjs/utils/formUtils.d.ts +2 -2
- package/lib/mjs/utils/index.d.ts +169 -2
- package/lib/mjs/utils/index.js +18 -1
- package/lib/mjs/utils/utils.d.ts +22 -37
- package/lib/mjs/utils/utils.js +57 -109
- package/lib/mjs/widgets/CalendarWidget.d.ts +1 -8
- package/lib/mjs/widgets/CalendarWidget.js +17 -43
- package/package.json +5 -5
- 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,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.getFormioUploadAdapterPlugin = void 0;
|
4
|
-
const utils_1 = require("../../utils
|
4
|
+
const utils_1 = require("../../utils");
|
5
5
|
/**
|
6
6
|
* UploadAdapter for CKEditor https://ckeditor.com/docs/ckeditor5/latest/framework/guides/deep-dive/upload-adapter.html
|
7
7
|
*/
|
@@ -1,233 +1,2 @@
|
|
1
|
-
declare const _default:
|
2
|
-
unsavedRowsError: string;
|
3
|
-
invalidRowsError: string;
|
4
|
-
invalidRowError: string;
|
5
|
-
invalidOption: string;
|
6
|
-
invalidDay: string;
|
7
|
-
complete: string;
|
8
|
-
error: string;
|
9
|
-
errorListHotkey: string;
|
10
|
-
errorsListNavigationMessage: string;
|
11
|
-
submitError: string;
|
12
|
-
required: string;
|
13
|
-
unique: string;
|
14
|
-
array: string;
|
15
|
-
array_nonempty: string;
|
16
|
-
nonarray: string;
|
17
|
-
select: string;
|
18
|
-
pattern: string;
|
19
|
-
minLength: string;
|
20
|
-
maxLength: string;
|
21
|
-
minWords: string;
|
22
|
-
maxWords: string;
|
23
|
-
min: string;
|
24
|
-
max: string;
|
25
|
-
maxDate: string;
|
26
|
-
minDate: string;
|
27
|
-
maxYear: string;
|
28
|
-
minYear: string;
|
29
|
-
minSelectedCount: string;
|
30
|
-
maxSelectedCount: string;
|
31
|
-
invalid_email: string;
|
32
|
-
invalid_url: string;
|
33
|
-
invalid_regex: string;
|
34
|
-
invalid_date: string;
|
35
|
-
invalid_day: string;
|
36
|
-
invalidValueProperty: string;
|
37
|
-
mask: string;
|
38
|
-
valueIsNotAvailable: string;
|
39
|
-
stripe: string;
|
40
|
-
month: string;
|
41
|
-
day: string;
|
42
|
-
year: string;
|
43
|
-
january: string;
|
44
|
-
february: string;
|
45
|
-
march: string;
|
46
|
-
april: string;
|
47
|
-
may: string;
|
48
|
-
june: string;
|
49
|
-
july: string;
|
50
|
-
august: string;
|
51
|
-
september: string;
|
52
|
-
october: string;
|
53
|
-
november: string;
|
54
|
-
december: string;
|
55
|
-
next: string;
|
56
|
-
previous: string;
|
57
|
-
cancel: string;
|
58
|
-
submit: string;
|
59
|
-
confirmCancel: string;
|
60
|
-
saveDraftInstanceError: string;
|
61
|
-
saveDraftAuthError: string;
|
62
|
-
restoreDraftInstanceError: string;
|
63
|
-
saveDraftError: string;
|
64
|
-
restoreDraftError: string;
|
65
|
-
time: string;
|
66
|
-
cancelButtonAriaLabel: string;
|
67
|
-
previousButtonAriaLabel: string;
|
68
|
-
nextButtonAriaLabel: string;
|
69
|
-
submitButtonAriaLabel: string;
|
70
|
-
reCaptchaTokenValidationError: string;
|
71
|
-
reCaptchaTokenNotSpecifiedError: string;
|
72
|
-
apiKey: string;
|
73
|
-
typeRemaining: string;
|
74
|
-
typeCount: string;
|
75
|
-
requiredDayField: string;
|
76
|
-
requiredDayEmpty: string;
|
77
|
-
requiredMonthField: string;
|
78
|
-
requiredYearField: string;
|
79
|
-
formNotReady: string;
|
80
|
-
noFormElement: string;
|
81
|
-
notUniqueKey: string;
|
82
|
-
newFormSchema: string;
|
83
|
-
missingUrl: string;
|
84
|
-
urlNotAttachedToBtn: string;
|
85
|
-
loadingProjectSettingsError: string;
|
86
|
-
sessionStorageSupportError: string;
|
87
|
-
builderUniqueError: string;
|
88
|
-
pageNotFound: string;
|
89
|
-
noDragInfoError: string;
|
90
|
-
addonSupportTypeError: string;
|
91
|
-
setPathError: string;
|
92
|
-
calculatedPathDeprecation: string;
|
93
|
-
unknownTemplate: string;
|
94
|
-
unknownComponent: string;
|
95
|
-
renderTemplateFunctionDeprecation: string;
|
96
|
-
whenReadyDeprecation: string;
|
97
|
-
loadResourcesError: string;
|
98
|
-
noSelectDataConfiguration: string;
|
99
|
-
indexedDBSupportError: string;
|
100
|
-
caretPositionSavingError: string;
|
101
|
-
iteratableRowsError: string;
|
102
|
-
checkRowDeprecation: string;
|
103
|
-
noOAuthBtn: string;
|
104
|
-
noOAuthConfiguration: string;
|
105
|
-
oAuthErrorsTitle: string;
|
106
|
-
noOAuthFormUrl: string;
|
107
|
-
oAuthStateError: string;
|
108
|
-
componentInvalidRowValidation: string;
|
109
|
-
videoPlayerNotFound: string;
|
110
|
-
synchronizationFailed: string;
|
111
|
-
fileWithDuplicatedNameInProgress: string;
|
112
|
-
fileWithDuplicatedNameLoaded: string;
|
113
|
-
nestedForm: string;
|
114
|
-
noDataProvided: string;
|
115
|
-
subformSubmissionLoadingError: string;
|
116
|
-
noDelimiterSet: string;
|
117
|
-
noSiteKey: string;
|
118
|
-
failedToNormalize: string;
|
119
|
-
failedToCompareItems: string;
|
120
|
-
editorFocusError: string;
|
121
|
-
quillImageUploadFailed: string;
|
122
|
-
noFilesSelected: string;
|
123
|
-
needConfigurationForQuill: string;
|
124
|
-
waitPdfConverting: string;
|
125
|
-
uploading: string;
|
126
|
-
pasteBelow: string;
|
127
|
-
copy: string;
|
128
|
-
move: string;
|
129
|
-
edit: string;
|
130
|
-
editJson: string;
|
131
|
-
remove: string;
|
132
|
-
clickToSetValue: string;
|
133
|
-
words: string;
|
134
|
-
characters: string;
|
135
|
-
addAnother: string;
|
136
|
-
yes: string;
|
137
|
-
no: string;
|
138
|
-
wantToClearData: string;
|
139
|
-
yesDelete: string;
|
140
|
-
waitFileProcessing: string;
|
141
|
-
wrongFileType: string;
|
142
|
-
fileTooSmall: string;
|
143
|
-
fileTooBig: string;
|
144
|
-
noFileService: string;
|
145
|
-
fileProcessingFailed: string;
|
146
|
-
readyForUpload: string;
|
147
|
-
readyForRemovingFromStorage: string;
|
148
|
-
preparingFileToRemove: string;
|
149
|
-
succefullyRemoved: string;
|
150
|
-
succefullyUploaded: string;
|
151
|
-
maxSelectItems: string;
|
152
|
-
minSelectItems: string;
|
153
|
-
clickToSign: string;
|
154
|
-
surveyQuestion: string;
|
155
|
-
surveyQuestionValue: string;
|
156
|
-
success: string;
|
157
|
-
noResultsFound: string;
|
158
|
-
noChoices: string;
|
159
|
-
typeToSearch: string;
|
160
|
-
loading: string;
|
161
|
-
help: string;
|
162
|
-
component: string;
|
163
|
-
save: string;
|
164
|
-
preview: string;
|
165
|
-
dragAndDropComponent: string;
|
166
|
-
searchFields: string;
|
167
|
-
noMatchesFound: string;
|
168
|
-
fileName: string;
|
169
|
-
size: string;
|
170
|
-
type: string;
|
171
|
-
gallery: string;
|
172
|
-
camera: string;
|
173
|
-
dropFilesToAttach: string;
|
174
|
-
useCamera: string;
|
175
|
-
browse: string;
|
176
|
-
takePicture: string;
|
177
|
-
switchToFileUpload: string;
|
178
|
-
completeStatus: string;
|
179
|
-
noStorageSet: string;
|
180
|
-
noFileApiSupport: string;
|
181
|
-
noFormDataSupport: string;
|
182
|
-
noProgressSupport: string;
|
183
|
-
close: string;
|
184
|
-
addResource: string;
|
185
|
-
autocomplete: string;
|
186
|
-
showPreview: string;
|
187
|
-
hidePreview: string;
|
188
|
-
createPage: string;
|
189
|
-
page: string;
|
190
|
-
closeBtnDescription: string;
|
191
|
-
cancelBtnDescription: string;
|
192
|
-
saveBtnDescription: string;
|
193
|
-
addOrRemove: string;
|
194
|
-
anyFileTypesAllowed: string;
|
195
|
-
allowedFileTypes: string;
|
196
|
-
syncing: string;
|
197
|
-
syncNow: string;
|
198
|
-
pressToOpen: string;
|
199
|
-
browseToAttachFileFor: string;
|
200
|
-
or: string;
|
201
|
-
numericOnly: string;
|
202
|
-
uploadPdfFile: string;
|
203
|
-
dropToStart: string;
|
204
|
-
expand: string;
|
205
|
-
collapse: string;
|
206
|
-
add: string;
|
207
|
-
delete: string;
|
208
|
-
revert: string;
|
209
|
-
removeBtnPressToRemove: string;
|
210
|
-
file: string;
|
211
|
-
captureVideo: string;
|
212
|
-
captureAudio: string;
|
213
|
-
captureImage: string;
|
214
|
-
browseFiles: string;
|
215
|
-
noComponentsSetInGrid: string;
|
216
|
-
sortAscending: string;
|
217
|
-
sortDescending: string;
|
218
|
-
filter: string;
|
219
|
-
clear: string;
|
220
|
-
showItemsWithValue: string;
|
221
|
-
gridItemsPerPage: string;
|
222
|
-
gridAllItems: string;
|
223
|
-
recordsSelectedOnPage: string;
|
224
|
-
recordsSelectedInTable: string;
|
225
|
-
gridSelectAll: string;
|
226
|
-
itemsInTable: string;
|
227
|
-
clearSelection: string;
|
228
|
-
editGridRow: string;
|
229
|
-
deleteGridRow: string;
|
230
|
-
selected: string;
|
231
|
-
actions: string;
|
232
|
-
};
|
1
|
+
declare const _default: any;
|
233
2
|
export default _default;
|
@@ -5,6 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
var _a;
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7
7
|
const bootstrap_1 = __importDefault(require("@formio/bootstrap"));
|
8
|
-
|
8
|
+
const core_1 = require("@formio/core");
|
9
|
+
const lodash_1 = __importDefault(require("lodash"));
|
10
|
+
exports.default = Object.assign(Object.assign(Object.assign({}, (((_a = bootstrap_1.default === null || bootstrap_1.default === void 0 ? void 0 : bootstrap_1.default.translations) === null || _a === void 0 ? void 0 : _a.en) || {})), lodash_1.default.omit(core_1.coreEnTranslation, ['maxDate', 'minDate'])), { unsavedRowsError: 'Please save all rows before proceeding.', invalidRowsError: 'Please correct invalid rows before proceeding.', invalidRowError: 'Invalid row. Please correct it or delete.', invalidOption: '{{field}} is an invalid value.', invalidDay: '{{field}} is not a valid day.', alertMessageWithLabel: '{{label}}: {{message}}', alertMessage: '{{message}}', complete: 'Submission Complete', error: 'Please fix the following errors before submitting.', errorListHotkey: 'Press Ctrl + Alt + X to go back to the error list.', errorsListNavigationMessage: 'Click to navigate to the field with following error.', submitError: 'Please check the form and correct all errors before submitting.', maxDate: '{{field}} should not contain date after {{maxDate}}', minDate: '{{field}} should not contain date before {{minDate}}', stripe: '{{stripe}}', next: 'Next', previous: 'Previous', cancel: 'Cancel', submit: 'Submit Form', confirmCancel: 'Are you sure you want to cancel?', saveDraftInstanceError: 'Cannot save draft because there is no formio instance.', saveDraftAuthError: 'Cannot save draft unless a user is authenticated.', restoreDraftInstanceError: 'Cannot restore draft because there is no formio instance.', saveDraftError: 'Unable to save draft.', restoreDraftError: 'Unable to restore draft.', time: 'Invalid time', cancelButtonAriaLabel: 'Cancel button. Click to reset the form', previousButtonAriaLabel: 'Previous button. Click to go back to the previous tab', nextButtonAriaLabel: 'Next button. Click to go to the next tab', submitButtonAriaLabel: 'Submit Form button. Click to submit the form', reCaptchaTokenValidationError: 'ReCAPTCHA: Token validation error', reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission', apiKey: 'API Key is not unique: {{key}}', apiKeyNotValid: 'API Key is not valid: {{key}}', typeRemaining: '{{ remaining }} {{ type }} remaining.', typeCount: '{{ count }} {{ type }}', requiredDayEmpty: '{{ field }} is required', formNotReady: 'Form not ready. Use form.ready promise', noFormElement: 'No DOM element for form.', notUniqueKey: 'API Key is not unique', newFormSchema: 'Form schema is for a newer version, please upgrade your renderer. Some functionality may not work.', missingUrl: 'Missing URL argument', urlNotAttachedToBtn: 'You should add a URL to this button.', loadingProjectSettingsError: 'Could not load project settings', sessionStorageSupportError: 'Session storage is not supported in this browser.', builderUniqueError: `You cannot add more than one {{componentKeyOrTitle}} component to one page.`, pageNotFound: 'Page not found', noDragInfoError: 'There is no Drag Info available for either dragged or sibling element', addonSupportTypeError: 'Addon {{label}} does not support component of type {{type}}', setPathError: 'Should not be setting the path of a component.', calculatedPathDeprecation: 'component.calculatedPath was deprecated, use component.path instead.', unknownTemplate: 'Unknown template: {{name}}', unknownComponent: 'Unknown component: {{type}}', renderTemplateFunctionDeprecation: `Form.io 'render' template function is deprecated.
|
9
11
|
If you need to render template (template A) inside of another template (template B),
|
10
|
-
pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B`, whenReadyDeprecation: 'The whenReady() method has been deprecated. Please use the dataReady property instead.', loadResourcesError: 'Unable to load resources for {{componentKey}}', noSelectDataConfiguration: 'Select component {{componentKey}} does not have data configuration.', indexedDBSupportError: "Your browser doesn't support current version of indexedDB", caretPositionSavingError: 'An error occurred while trying to save caret position', iteratableRowsError: 'Getter #iteratableRows() is not implemented', checkRowDeprecation: 'Deprecation Warning: checkRow method has been replaced with processRow', noOAuthBtn: 'You must add the OAuth button to a form for it to function properly', noOAuthConfiguration: 'OAuth not configured. You must configure oauth for your project before it will work.', oAuthErrorsTitle: 'The Following Error Has Occured', noOAuthFormUrl: 'You must attach a Form API url to your form in order to use OAuth buttons.', oAuthStateError: 'OAuth state does not match. Please try logging in again.', componentInvalidRowValidation: 'Invalid row validation for {{componentKey}}', videoPlayerNotFound: 'Video player not found in template.', synchronizationFailed: 'Synchronization is failed', fileWithDuplicatedNameInProgress: 'File with the same name is already being uploaded', fileWithDuplicatedNameLoaded: 'File with the same name is already uploaded', nestedForm: 'Nested form', noDataProvided: 'No data provided', subformSubmissionLoadingError: 'Unable to load subform submission {{submissionId}}:', noDelimiterSet: 'In order for thousands separator to work properly, you must set the delimiter to true in the component json', noSiteKey: 'There is no Site Key specified in settings in form JSON', failedToNormalize: 'Failed to normalize value', failedToCompareItems: 'Error while comparing items', editorFocusError: 'An editor did not initialize properly when trying to focus:', quillImageUploadFailed: 'Quill image upload failed', noFilesSelected: 'No files selected', needConfigurationForQuill: 'The WYSIWYG settings are configured for CKEditor. For this renderer, you will need to use configurations for the Quill Editor. See https://quilljs.com/docs/configuration for more information.', waitPdfConverting: 'Converting PDF. Please wait.', uploading: 'Uploading', pasteBelow: 'Paste below', copy: 'Copy', move: 'Move', edit: 'Edit', editJson: 'Edit JSON', remove: 'Remove', clickToSetValue: 'Click to set value', words: 'words', characters: 'characters', addAnother: 'Add Another',
|
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' });
|
@@ -1,7 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
/**
|
2
|
+
* For backwards compatibility we a standalone interpolate function. This merely calls the
|
3
|
+
* global mutable Evaluator instance's interpolate function.
|
4
|
+
* @param {...any} args - interpolate arguments, typically "rawTemplate", "data", and "options"
|
5
|
+
* @returns {any} the interpolation result.
|
6
|
+
*/
|
7
|
+
export function interpolate(...args: any[]): any;
|
8
|
+
/**
|
9
|
+
* Set the evaluator to use for evaluating expressions.
|
10
|
+
* @param {CoreEvaluator} override - The new evaluator instance to use.
|
11
|
+
* @returns {void}
|
12
|
+
*/
|
13
|
+
export function registerEvaluator(override: CoreEvaluator): void;
|
14
|
+
export class DefaultEvaluator extends CoreEvaluator {
|
15
|
+
cache: {};
|
16
|
+
protectedEval: boolean;
|
17
|
+
template(template: any, hash: any): any;
|
18
|
+
interpolate(rawTemplate: any, data: any, _options: any): any;
|
7
19
|
}
|
20
|
+
export let Evaluator: DefaultEvaluator;
|
21
|
+
import { DefaultEvaluator as CoreEvaluator } from '@formio/core';
|
@@ -3,26 +3,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.Evaluator = void 0;
|
6
|
+
exports.registerEvaluator = exports.interpolate = exports.Evaluator = exports.DefaultEvaluator = void 0;
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
8
8
|
const string_hash_1 = __importDefault(require("string-hash"));
|
9
|
-
const
|
10
|
-
class
|
11
|
-
|
9
|
+
const core_1 = require("@formio/core");
|
10
|
+
class DefaultEvaluator extends core_1.DefaultEvaluator {
|
11
|
+
constructor() {
|
12
|
+
super(...arguments);
|
13
|
+
this.cache = {};
|
14
|
+
this.protectedEval = false;
|
15
|
+
}
|
16
|
+
template(template, hash) {
|
12
17
|
hash = hash || (0, string_hash_1.default)(template);
|
13
|
-
if (
|
14
|
-
return
|
18
|
+
if (this.cache[hash]) {
|
19
|
+
return this.cache[hash];
|
15
20
|
}
|
16
21
|
try {
|
17
22
|
// Ensure we handle copied templates from the ejs files.
|
18
23
|
template = template.replace(/ctx\./g, '');
|
19
|
-
return (
|
24
|
+
return (this.cache[hash] = lodash_1.default.template(template, this.templateSettings));
|
20
25
|
}
|
21
26
|
catch (err) {
|
22
27
|
console.warn('Error while processing template', err, template);
|
23
28
|
}
|
24
29
|
}
|
25
|
-
|
30
|
+
interpolate(rawTemplate, data, _options) {
|
26
31
|
// Ensure reverse compatability.
|
27
32
|
const options = lodash_1.default.isObject(_options) ? _options : { noeval: _options };
|
28
33
|
if (typeof rawTemplate === 'function') {
|
@@ -36,11 +41,11 @@ class Evaluator extends utils_1.JSONLogicEvaluator {
|
|
36
41
|
}
|
37
42
|
rawTemplate = String(rawTemplate);
|
38
43
|
let template;
|
39
|
-
if (
|
40
|
-
return
|
44
|
+
if (this.noeval || options.noeval) {
|
45
|
+
return this.interpolateString(rawTemplate, data, _options);
|
41
46
|
}
|
42
47
|
else {
|
43
|
-
template =
|
48
|
+
template = this.template(rawTemplate);
|
44
49
|
}
|
45
50
|
if (typeof template === 'function') {
|
46
51
|
try {
|
@@ -54,7 +59,25 @@ class Evaluator extends utils_1.JSONLogicEvaluator {
|
|
54
59
|
return template;
|
55
60
|
}
|
56
61
|
}
|
57
|
-
exports.
|
58
|
-
Evaluator
|
59
|
-
|
60
|
-
|
62
|
+
exports.DefaultEvaluator = DefaultEvaluator;
|
63
|
+
exports.Evaluator = new DefaultEvaluator();
|
64
|
+
// preserve the standalone interpolate function for backwards compatibility
|
65
|
+
/**
|
66
|
+
* For backwards compatibility we a standalone interpolate function. This merely calls the
|
67
|
+
* global mutable Evaluator instance's interpolate function.
|
68
|
+
* @param {...any} args - interpolate arguments, typically "rawTemplate", "data", and "options"
|
69
|
+
* @returns {any} the interpolation result.
|
70
|
+
*/
|
71
|
+
function interpolate(...args) {
|
72
|
+
return exports.Evaluator.interpolate(...args);
|
73
|
+
}
|
74
|
+
exports.interpolate = interpolate;
|
75
|
+
/**
|
76
|
+
* Set the evaluator to use for evaluating expressions.
|
77
|
+
* @param {CoreEvaluator} override - The new evaluator instance to use.
|
78
|
+
* @returns {void}
|
79
|
+
*/
|
80
|
+
function registerEvaluator(override) {
|
81
|
+
exports.Evaluator = override;
|
82
|
+
}
|
83
|
+
exports.registerEvaluator = registerEvaluator;
|
package/lib/cjs/utils/builder.js
CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const lodash_1 = __importDefault(require("lodash"));
|
7
|
-
const
|
7
|
+
const index_1 = require("./index");
|
8
8
|
exports.default = {
|
9
9
|
/**
|
10
10
|
* Appends a number to a component.key to keep it unique
|
@@ -15,19 +15,19 @@ exports.default = {
|
|
15
15
|
uniquify(container, component) {
|
16
16
|
let changed = false;
|
17
17
|
const formKeys = {};
|
18
|
-
(0,
|
18
|
+
(0, index_1.eachComponent)(container, (comp) => {
|
19
19
|
formKeys[comp.key] = true;
|
20
20
|
if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(comp.type) || comp.tree || comp.arrayTree) {
|
21
21
|
return true;
|
22
22
|
}
|
23
23
|
}, true);
|
24
24
|
// Recurse into all child components.
|
25
|
-
(0,
|
25
|
+
(0, index_1.eachComponent)([component], (component) => {
|
26
26
|
// Skip key uniquification if this component doesn't have a key.
|
27
27
|
if (!component.key) {
|
28
28
|
return;
|
29
29
|
}
|
30
|
-
const newKey = (0,
|
30
|
+
const newKey = (0, index_1.uniqueKey)(formKeys, component.key);
|
31
31
|
if (newKey !== component.key) {
|
32
32
|
component.key = newKey;
|
33
33
|
changed = true;
|
@@ -60,7 +60,7 @@ exports.default = {
|
|
60
60
|
},
|
61
61
|
getBindedShortcuts(components, input) {
|
62
62
|
const result = [];
|
63
|
-
(0,
|
63
|
+
(0, index_1.eachComponent)(components, (component) => {
|
64
64
|
if (component === input) {
|
65
65
|
return;
|
66
66
|
}
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const ConditionOperator_1 = __importDefault(require("./ConditionOperator"));
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
8
|
-
const
|
8
|
+
const __1 = require("../");
|
9
9
|
class IsEqualTo extends ConditionOperator_1.default {
|
10
10
|
static get operatorKey() {
|
11
11
|
return 'isEqual';
|
@@ -25,9 +25,9 @@ class IsEqualTo extends ConditionOperator_1.default {
|
|
25
25
|
if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {
|
26
26
|
const conditionTriggerComponent = instance.root.getComponent(path);
|
27
27
|
if (conditionTriggerComponent
|
28
|
-
&& (0,
|
28
|
+
&& (0, __1.isSelectResourceWithObjectValue)(conditionTriggerComponent.component)
|
29
29
|
&& ((_b = conditionTriggerComponent.component) === null || _b === void 0 ? void 0 : _b.template)) {
|
30
|
-
return (0,
|
30
|
+
return (0, __1.compareSelectResourceWithObjectTypeValues)(value, comparedValue, conditionTriggerComponent.component);
|
31
31
|
}
|
32
32
|
}
|
33
33
|
//special check for select boxes
|
@@ -26,8 +26,8 @@ export const getBestMatch: typeof Utils.getBestMatch;
|
|
26
26
|
export const getComponentFromPath: typeof Utils.getComponentFromPath;
|
27
27
|
export const getComponentValue: typeof Utils.getComponentValue;
|
28
28
|
export const findComponents: typeof Utils.findComponents;
|
29
|
-
export const eachComponentDataAsync: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataAsyncCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined) => Promise<void>;
|
30
|
-
export const eachComponentData: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined) => void;
|
29
|
+
export const eachComponentDataAsync: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataAsyncCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined, noScopeReset?: boolean | undefined) => Promise<void>;
|
30
|
+
export const eachComponentData: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined, noScopeReset?: boolean | undefined) => void;
|
31
31
|
export const getComponentKey: typeof Utils.getComponentKey;
|
32
32
|
export const getContextualRowPath: typeof Utils.getContextualRowPath;
|
33
33
|
export const getContextualRowData: typeof Utils.getContextualRowData;
|
package/lib/cjs/utils/index.d.ts
CHANGED
@@ -1,3 +1,170 @@
|
|
1
|
-
export
|
1
|
+
export * from "./utils";
|
2
|
+
export * from "./formUtils";
|
2
3
|
export default FormioUtils;
|
3
|
-
|
4
|
+
declare const FormioUtils: {
|
5
|
+
Evaluator: import("./Evaluator").DefaultEvaluator;
|
6
|
+
interpolate: typeof interpolate;
|
7
|
+
ConditionOperators: {
|
8
|
+
[x: string]: typeof import("./conditionOperators/IsEqualTo").default | typeof import("./conditionOperators/DateGreaterThan").default;
|
9
|
+
};
|
10
|
+
_: any;
|
11
|
+
moment: typeof moment;
|
12
|
+
flattenComponents: typeof import("@formio/core/lib/utils/formUtil").flattenComponents;
|
13
|
+
guid: typeof import("@formio/core/lib/utils/formUtil").guid;
|
14
|
+
uniqueName: typeof import("@formio/core/lib/utils/formUtil").uniqueName;
|
15
|
+
MODEL_TYPES_OF_KNOWN_COMPONENTS: {
|
16
|
+
nestedArray: string[];
|
17
|
+
nestedDataArray: string[];
|
18
|
+
dataObject: string[];
|
19
|
+
object: string[];
|
20
|
+
map: string[];
|
21
|
+
content: string[];
|
22
|
+
string: string[];
|
23
|
+
number: string[];
|
24
|
+
boolean: string[];
|
25
|
+
none: string[];
|
26
|
+
any: string[];
|
27
|
+
};
|
28
|
+
getModelType: typeof import("@formio/core/lib/utils/formUtil").getModelType;
|
29
|
+
getComponentPath: any;
|
30
|
+
setComponentScope: typeof import("@formio/core/lib/utils/formUtil").setComponentScope;
|
31
|
+
resetComponentScope: typeof import("@formio/core/lib/utils/formUtil").resetComponentScope;
|
32
|
+
isComponentNestedDataType: typeof import("@formio/core/lib/utils/formUtil").isComponentNestedDataType;
|
33
|
+
componentPath: typeof import("@formio/core/lib/utils/formUtil").componentPath;
|
34
|
+
getComponentPaths: typeof import("@formio/core/lib/utils/formUtil").getComponentPaths;
|
35
|
+
componentMatches: typeof import("@formio/core/lib/utils/formUtil").componentMatches;
|
36
|
+
getBestMatch: typeof import("@formio/core/lib/utils/formUtil").getBestMatch;
|
37
|
+
getComponentFromPath: typeof import("@formio/core/lib/utils/formUtil").getComponentFromPath;
|
38
|
+
getComponentValue: typeof import("@formio/core/lib/utils/formUtil").getComponentValue;
|
39
|
+
findComponents: typeof import("@formio/core/lib/utils/formUtil").findComponents;
|
40
|
+
eachComponentDataAsync: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataAsyncCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined, noScopeReset?: boolean | undefined) => Promise<void>;
|
41
|
+
eachComponentData: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined, noScopeReset?: boolean | undefined) => void;
|
42
|
+
getComponentKey: typeof import("@formio/core/lib/utils/formUtil").getComponentKey;
|
43
|
+
getContextualRowPath: typeof import("@formio/core/lib/utils/formUtil").getContextualRowPath;
|
44
|
+
getContextualRowData: typeof import("@formio/core/lib/utils/formUtil").getContextualRowData;
|
45
|
+
componentInfo: typeof import("@formio/core/lib/utils/formUtil").componentInfo;
|
46
|
+
eachComponent: typeof import("@formio/core/lib/utils/formUtil").eachComponent;
|
47
|
+
eachComponentAsync: typeof import("@formio/core/lib/utils/formUtil").eachComponentAsync;
|
48
|
+
getComponentData: typeof import("@formio/core/lib/utils/formUtil").getComponentData;
|
49
|
+
getComponentActualValue: any;
|
50
|
+
isLayoutComponent: typeof import("@formio/core/lib/utils/formUtil").isLayoutComponent;
|
51
|
+
matchComponent: typeof import("@formio/core/lib/utils/formUtil").matchComponent;
|
52
|
+
getComponent: typeof import("@formio/core/lib/utils/formUtil").getComponent;
|
53
|
+
searchComponents: typeof import("@formio/core/lib/utils/formUtil").searchComponents;
|
54
|
+
removeComponent: typeof import("@formio/core/lib/utils/formUtil").removeComponent;
|
55
|
+
hasCondition: typeof import("@formio/core/lib/utils/formUtil").hasCondition;
|
56
|
+
parseFloatExt: typeof import("@formio/core/lib/utils/formUtil").parseFloatExt;
|
57
|
+
formatAsCurrency: typeof import("@formio/core/lib/utils/formUtil").formatAsCurrency;
|
58
|
+
escapeRegExCharacters: typeof import("@formio/core/lib/utils/formUtil").escapeRegExCharacters;
|
59
|
+
getValue: typeof import("@formio/core/lib/utils/formUtil").getValue;
|
60
|
+
getStrings: typeof import("@formio/core/lib/utils/formUtil").getStrings;
|
61
|
+
generateFormChange: typeof import("@formio/core/lib/utils/formUtil").generateFormChange;
|
62
|
+
applyFormChanges: typeof import("@formio/core/lib/utils/formUtil").applyFormChanges;
|
63
|
+
findComponent: typeof import("@formio/core/lib/utils/formUtil").findComponent;
|
64
|
+
getEmptyValue: typeof import("@formio/core/lib/utils/formUtil").getEmptyValue;
|
65
|
+
isComponentDataEmpty: typeof import("@formio/core/lib/utils/formUtil").isComponentDataEmpty;
|
66
|
+
isSelectResourceWithObjectValue: typeof import("@formio/core/lib/utils/formUtil").isSelectResourceWithObjectValue;
|
67
|
+
compareSelectResourceWithObjectTypeValues: typeof import("@formio/core/lib/utils/formUtil").compareSelectResourceWithObjectTypeValues;
|
68
|
+
getItemTemplateKeys: typeof import("@formio/core/lib/utils/formUtil").getItemTemplateKeys;
|
69
|
+
evaluate(func: string | object | Function, args: any, ret: string, interpolate: boolean, options?: import("@formio/core").EvaluatorOptions): any;
|
70
|
+
getRandomComponentId(): string;
|
71
|
+
getPropertyValue(style: CSSStyleDeclaration, prop: string): number;
|
72
|
+
getElementRect(element: HTMLElement): {
|
73
|
+
x: number;
|
74
|
+
y: number;
|
75
|
+
width: number;
|
76
|
+
height: number;
|
77
|
+
};
|
78
|
+
getScriptPlugin(property: string): any;
|
79
|
+
boolValue(value: string | boolean): boolean;
|
80
|
+
isMongoId(text: string): boolean;
|
81
|
+
checkCalculated(component: import("@formio/core").Component, submission: import("@formio/core").Submission, rowData: any): void;
|
82
|
+
checkSimpleConditional(component: any, condition: any, row: any, data: any, instance: any): boolean;
|
83
|
+
checkCustomConditional(component: import("@formio/core").Component, custom: string, row: any, data: any, form: import("@formio/core").Form, variable: string, onError: any, instance: any): any;
|
84
|
+
checkJsonConditional(component: import("@formio/core").Component, json: import("@formio/core").JSONConditional, row: any, data: any, form: import("@formio/core").Form, onError: any): boolean;
|
85
|
+
checkCondition(component: import("@formio/core").Component, row: any, data: any, form: import("@formio/core").Form, instance: any): boolean;
|
86
|
+
checkTrigger(component: import("@formio/core").Component, trigger: any, row: import("@formio/core").DataObject, data: import("@formio/core").DataObject, form: import("@formio/core").Form, instance: any): boolean;
|
87
|
+
setActionProperty(component: import("@formio/core").Component, action: any, result: string, row: import("@formio/core").DataObject, data: import("@formio/core").DataObject, instance: any): import("@formio/core").Component;
|
88
|
+
removeHTML(str: string): string;
|
89
|
+
unescapeHTML(str: string): string;
|
90
|
+
convertStringToHTMLElement(str: string, selector: string): HTMLElement;
|
91
|
+
getDateSetting(date: string | Date): import("dayjs").Dayjs | null;
|
92
|
+
isValidDate(date: string | Date): boolean;
|
93
|
+
currentTimezone(): string;
|
94
|
+
offsetDate(date: Date, timezone: string): {
|
95
|
+
date: Date;
|
96
|
+
abbr: string;
|
97
|
+
};
|
98
|
+
shouldHandleTimezone(timezone: string): boolean;
|
99
|
+
dayjsDate(value: string | Date, format: string, timezone: string, options: object): import("dayjs").Dayjs;
|
100
|
+
formatDate(value: string | Date, format: string, timezone: string, flatPickrInputFormat: string): string;
|
101
|
+
formatOffset(formatFn: Function, date: string | Date, format: string, timezone: string): string;
|
102
|
+
getLocaleDateFormatInfo(locale: Intl.LocalesArgument): object;
|
103
|
+
convertFormatToFlatpickr(format: string): string;
|
104
|
+
convertFormatToDayjs(format: string): string;
|
105
|
+
convertFormatToMask(format: string): string;
|
106
|
+
getInputMask(mask: string, placeholderChar: string): any[];
|
107
|
+
unmaskValue(value: string, mask: string, placeholderChar: string): string;
|
108
|
+
matchInputMask(value: string, inputMask: string): boolean;
|
109
|
+
getNumberSeparators(lang?: string): {
|
110
|
+
delimiter: string;
|
111
|
+
decimalSeparator: string;
|
112
|
+
};
|
113
|
+
getNumberDecimalLimit(component: import("@formio/core").Component, defaultLimit: number): number;
|
114
|
+
getCurrencyAffixes({ currency, decimalLimit, decimalSeparator, lang, }: {
|
115
|
+
currency: string;
|
116
|
+
decimalLimit: number;
|
117
|
+
decimalSeparator: string;
|
118
|
+
lang: string;
|
119
|
+
}): {
|
120
|
+
prefix: string;
|
121
|
+
suffix: string;
|
122
|
+
};
|
123
|
+
fieldData(data: import("@formio/core").DataObject, component: import("@formio/core").Component): any;
|
124
|
+
delay(fn: Function, delay?: number, ...args: any[]): any;
|
125
|
+
iterateKey(key: string): string;
|
126
|
+
uniqueKey(map: Record<string, string>, base: string): string;
|
127
|
+
bootstrapVersion(options: {
|
128
|
+
bootstrap: string;
|
129
|
+
}): number;
|
130
|
+
unfold(e: any): any;
|
131
|
+
withSwitch(a: any, b: any): Functions[];
|
132
|
+
observeOverload(callback: Function, options?: {
|
133
|
+
limit: number;
|
134
|
+
delay: number;
|
135
|
+
}): Function;
|
136
|
+
getContextComponents(context: any, excludeNested: boolean, excludedTypes?: string[]): any[];
|
137
|
+
getContextButtons(context: any): any[];
|
138
|
+
translateHTMLTemplate(template: string, translate: Function): string;
|
139
|
+
sanitize(string: string, options: any): string;
|
140
|
+
fastCloneDeep(obj: any): any;
|
141
|
+
isInputComponent(componentJson: import("@formio/core").Component): boolean;
|
142
|
+
getArrayFromComponentPath(pathStr: string): string[];
|
143
|
+
isChildOf(child: any, parent: any): boolean;
|
144
|
+
getStringFromComponentPath(path: number[]): string;
|
145
|
+
round(number: number, precision: number): string;
|
146
|
+
getIEBrowserVersion(): number | null;
|
147
|
+
getBrowserInfo(): object;
|
148
|
+
getComponentPathWithoutIndicies(path?: string): string;
|
149
|
+
getDataParentComponent(componentInstance: Component): any;
|
150
|
+
isPromise(value: any): boolean;
|
151
|
+
getFocusableElements(element: HTMLElement): NodeList<HTMLElement>;
|
152
|
+
getComponentSavedTypes(fullSchema: import("@formio/core").Component): string[] | null;
|
153
|
+
hasEncodedTimezone(value: string): boolean;
|
154
|
+
firstNonNil: any;
|
155
|
+
componentValueTypes: {
|
156
|
+
number: string;
|
157
|
+
string: string;
|
158
|
+
boolean: string;
|
159
|
+
array: string;
|
160
|
+
object: string;
|
161
|
+
date: string;
|
162
|
+
any: string;
|
163
|
+
};
|
164
|
+
interpolateErrors: (component: Component, errors: FieldError[], interpolateFn: Function) => [];
|
165
|
+
};
|
166
|
+
import { Evaluator } from './Evaluator';
|
167
|
+
import { registerEvaluator } from './Evaluator';
|
168
|
+
import { interpolate } from './Evaluator';
|
169
|
+
import moment from 'moment';
|
170
|
+
export { FormioUtils as Utils, Evaluator, registerEvaluator };
|