@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,22 +1,26 @@
|
|
1
|
+
import { unionWith } from 'lodash';
|
1
2
|
import UnknownEditDisplay from './editForm/Unknown.edit.display';
|
3
|
+
import EditFormUtils from '../../components/_classes/component/editForm/utils';
|
2
4
|
/**
|
3
5
|
* Unknown Component schema.
|
6
|
+
* @param {...any} extend
|
4
7
|
* @returns {object} - The Unknown Component edit form.
|
5
8
|
*/
|
6
|
-
export default function () {
|
9
|
+
export default function (...extend) {
|
10
|
+
const components = [
|
11
|
+
{
|
12
|
+
label: 'Custom',
|
13
|
+
key: 'display',
|
14
|
+
weight: 0,
|
15
|
+
components: UnknownEditDisplay
|
16
|
+
}
|
17
|
+
].concat(...extend);
|
7
18
|
return {
|
8
19
|
components: [
|
9
20
|
{
|
10
21
|
type: 'tabs',
|
11
22
|
key: 'tabs',
|
12
|
-
components:
|
13
|
-
{
|
14
|
-
label: 'Custom',
|
15
|
-
key: 'display',
|
16
|
-
weight: 0,
|
17
|
-
components: UnknownEditDisplay
|
18
|
-
}
|
19
|
-
]
|
23
|
+
components: unionWith(components, EditFormUtils.unifyComponents)
|
20
24
|
}
|
21
25
|
]
|
22
26
|
};
|
@@ -7,6 +7,18 @@ export default [
|
|
7
7
|
key: 'allowMultipleMasks',
|
8
8
|
ignore: true
|
9
9
|
},
|
10
|
+
{
|
11
|
+
key: 'inputMasks',
|
12
|
+
ignore: true
|
13
|
+
},
|
14
|
+
{
|
15
|
+
key: 'widget.type',
|
16
|
+
ignore: true
|
17
|
+
},
|
18
|
+
{
|
19
|
+
key: 'widget',
|
20
|
+
ignore: true
|
21
|
+
},
|
10
22
|
{
|
11
23
|
key: 'showWordCount',
|
12
24
|
ignore: true,
|
package/lib/mjs/formio.form.js
CHANGED
@@ -12,7 +12,7 @@ import { Evaluator } from './utils/Evaluator';
|
|
12
12
|
import Licenses from './licenses';
|
13
13
|
import EventEmitter from './EventEmitter';
|
14
14
|
import Webform from './Webform';
|
15
|
-
import { I18n } from '
|
15
|
+
import { I18n } from '@formio/core';
|
16
16
|
Formio.loadModules = (path = `${Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {
|
17
17
|
Formio.requireLibrary(name, name, path, true)
|
18
18
|
.then((modules) => {
|
@@ -46,9 +46,11 @@ class FormioUploadAdapter {
|
|
46
46
|
}
|
47
47
|
}
|
48
48
|
}
|
49
|
-
const getFormioUploadAdapterPlugin = (fileService, component) =>
|
50
|
-
|
51
|
-
|
49
|
+
const getFormioUploadAdapterPlugin = (fileService, component) => {
|
50
|
+
return function (editor) {
|
51
|
+
editor.plugins.get('FileRepository').createUploadAdapter = (loader) => {
|
52
|
+
return new FormioUploadAdapter(loader, fileService, component);
|
53
|
+
};
|
52
54
|
};
|
53
55
|
};
|
54
56
|
export { getFormioUploadAdapterPlugin };
|
@@ -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;
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import bootstrap from '@formio/bootstrap';
|
2
|
+
import { coreEnTranslation } from '@formio/core';
|
3
|
+
import _ from 'lodash';
|
2
4
|
export default {
|
3
5
|
...(bootstrap?.translations?.en || {}),
|
6
|
+
..._.omit(coreEnTranslation, ['maxDate', 'minDate']),
|
4
7
|
unsavedRowsError: 'Please save all rows before proceeding.',
|
5
8
|
invalidRowsError: 'Please correct invalid rows before proceeding.',
|
6
9
|
invalidRowError: 'Invalid row. Please correct it or delete.',
|
@@ -13,49 +16,9 @@ export default {
|
|
13
16
|
errorListHotkey: 'Press Ctrl + Alt + X to go back to the error list.',
|
14
17
|
errorsListNavigationMessage: 'Click to navigate to the field with following error.',
|
15
18
|
submitError: 'Please check the form and correct all errors before submitting.',
|
16
|
-
required: '{{field}} is required',
|
17
|
-
unique: '{{field}} must be unique',
|
18
|
-
array: '{{field}} must be an array',
|
19
|
-
array_nonempty: '{{field}} must be a non-empty array', // eslint-disable-line camelcase
|
20
|
-
nonarray: '{{field}} must not be an array',
|
21
|
-
select: '{{field}} contains an invalid selection',
|
22
|
-
pattern: '{{field}} does not match the pattern {{pattern}}',
|
23
|
-
minLength: '{{field}} must have at least {{length}} characters.',
|
24
|
-
maxLength: '{{field}} must have no more than {{length}} characters.',
|
25
|
-
minWords: '{{field}} must have at least {{length}} words.',
|
26
|
-
maxWords: '{{field}} must have no more than {{length}} words.',
|
27
|
-
min: '{{field}} cannot be less than {{min}}.',
|
28
|
-
max: '{{field}} cannot be greater than {{max}}.',
|
29
19
|
maxDate: '{{field}} should not contain date after {{maxDate}}',
|
30
20
|
minDate: '{{field}} should not contain date before {{minDate}}',
|
31
|
-
maxYear: '{{field}} should not contain year greater than {{maxYear}}',
|
32
|
-
minYear: '{{field}} should not contain year less than {{minYear}}',
|
33
|
-
minSelectedCount: 'You must select at least {{minCount}} items',
|
34
|
-
maxSelectedCount: 'You may only select up to {{maxCount}} items',
|
35
|
-
invalid_email: '{{field}} must be a valid email.', // eslint-disable-line camelcase
|
36
|
-
invalid_url: '{{field}} must be a valid url.', // eslint-disable-line camelcase
|
37
|
-
invalid_regex: '{{field}} does not match the pattern {{regex}}.', // eslint-disable-line camelcase
|
38
|
-
invalid_date: '{{field}} is not a valid date.', // eslint-disable-line camelcase
|
39
|
-
invalid_day: '{{field}} is not a valid day.', // eslint-disable-line camelcase
|
40
|
-
invalidValueProperty: 'Invalid Value Property',
|
41
|
-
mask: '{{field}} does not match the mask.',
|
42
|
-
valueIsNotAvailable: '{{ field }} is an invalid value.',
|
43
21
|
stripe: '{{stripe}}',
|
44
|
-
month: 'Month',
|
45
|
-
day: 'Day',
|
46
|
-
year: 'Year',
|
47
|
-
january: 'January',
|
48
|
-
february: 'February',
|
49
|
-
march: 'March',
|
50
|
-
april: 'April',
|
51
|
-
may: 'May',
|
52
|
-
june: 'June',
|
53
|
-
july: 'July',
|
54
|
-
august: 'August',
|
55
|
-
september: 'September',
|
56
|
-
october: 'October',
|
57
|
-
november: 'November',
|
58
|
-
december: 'December',
|
59
22
|
next: 'Next',
|
60
23
|
previous: 'Previous',
|
61
24
|
cancel: 'Cancel',
|
@@ -76,10 +39,7 @@ export default {
|
|
76
39
|
apiKey: 'API Key is not unique: {{key}}',
|
77
40
|
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
78
41
|
typeCount: '{{ count }} {{ type }}',
|
79
|
-
requiredDayField: '{{ field }} is required',
|
80
42
|
requiredDayEmpty: '{{ field }} is required',
|
81
|
-
requiredMonthField: '{{ field }} is required',
|
82
|
-
requiredYearField: '{{ field }} is required',
|
83
43
|
formNotReady: 'Form not ready. Use form.ready promise',
|
84
44
|
noFormElement: 'No DOM element for form.',
|
85
45
|
notUniqueKey: 'API Key is not unique',
|
@@ -139,8 +99,6 @@ export default {
|
|
139
99
|
words: 'words',
|
140
100
|
characters: 'characters',
|
141
101
|
addAnother: 'Add Another',
|
142
|
-
yes: 'Yes',
|
143
|
-
no: 'No',
|
144
102
|
wantToClearData: 'Do you want to clear data?',
|
145
103
|
yesDelete: 'Yes, delete it',
|
146
104
|
waitFileProcessing: 'Processing file. Please wait...',
|
@@ -157,8 +115,6 @@ export default {
|
|
157
115
|
maxSelectItems: 'You may only select up to {{maxCount}} items',
|
158
116
|
minSelectItems: 'You must select at least {{minCount}} items',
|
159
117
|
clickToSign: 'Click to Sign',
|
160
|
-
surveyQuestion: 'Question',
|
161
|
-
surveyQuestionValue: 'Value',
|
162
118
|
success: 'Success',
|
163
119
|
noResultsFound: 'No results found',
|
164
120
|
noChoices: 'No choices to choose from',
|
@@ -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/mjs/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/mjs/utils/utils.js
CHANGED
@@ -8,6 +8,7 @@ import dompurify from 'dompurify';
|
|
8
8
|
import { getValue } from './formUtils';
|
9
9
|
import { Evaluator } from './Evaluator';
|
10
10
|
import ConditionOperators from './conditionOperators';
|
11
|
+
import { convertShowToBoolean } from '@formio/core';
|
11
12
|
const interpolate = Evaluator.interpolate;
|
12
13
|
export * from './formUtils';
|
13
14
|
// Configure JsonLogic
|
@@ -236,7 +237,7 @@ export function checkSimpleConditional(component, condition, row, data, instance
|
|
236
237
|
default:
|
237
238
|
result = _.every(conditionsResult.flat(), res => !!res);
|
238
239
|
}
|
239
|
-
return show ? result : !result;
|
240
|
+
return convertShowToBoolean(show) ? result : !result;
|
240
241
|
}
|
241
242
|
}
|
242
243
|
/**
|
@@ -1502,26 +1503,6 @@ export function isPromise(value) {
|
|
1502
1503
|
&& typeof value.then === 'function'
|
1503
1504
|
&& Object.prototype.toString.call(value) === '[object Promise]';
|
1504
1505
|
}
|
1505
|
-
/**
|
1506
|
-
* Determines if the component has a scoping parent in tree (a component which scopes its children and manages its
|
1507
|
-
* changes by itself, e.g. EditGrid)
|
1508
|
-
* @param {Component} componentInstance - The component to check for the scoping parent.
|
1509
|
-
* @param {boolean} firstPass - Whether it is the first pass of the function
|
1510
|
-
* @returns {boolean|*} - TRUE if the component has a scoping parent; FALSE otherwise
|
1511
|
-
*/
|
1512
|
-
export function isInsideScopingComponent(componentInstance, firstPass = true) {
|
1513
|
-
if (!firstPass && componentInstance?.hasScopedChildren) {
|
1514
|
-
return true;
|
1515
|
-
}
|
1516
|
-
const dataParent = getDataParentComponent(componentInstance);
|
1517
|
-
if (dataParent?.hasScopedChildren) {
|
1518
|
-
return true;
|
1519
|
-
}
|
1520
|
-
else if (dataParent?.parent) {
|
1521
|
-
return isInsideScopingComponent(dataParent.parent, false);
|
1522
|
-
}
|
1523
|
-
return false;
|
1524
|
-
}
|
1525
1506
|
/**
|
1526
1507
|
* Returns all the focusable elements within the provided dom element.
|
1527
1508
|
* @param {HTMLElement} element - The element to get the focusable elements from.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@formio/js",
|
3
|
-
"version": "5.1.0-dev.
|
3
|
+
"version": "5.1.0-dev.6042.18ef5d3",
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
5
5
|
"main": "lib/cjs/index.js",
|
6
6
|
"exports": {
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"homepage": "https://github.com/formio/formio.js#readme",
|
82
82
|
"dependencies": {
|
83
83
|
"@formio/bootstrap": "v3.0.0-dev.121.085d187",
|
84
|
-
"@formio/core": "
|
84
|
+
"@formio/core": "2.4.0-dev.235.1b94990",
|
85
85
|
"@formio/text-mask-addons": "3.8.0-formio.4",
|
86
86
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
87
87
|
"abortcontroller-polyfill": "^1.7.5",
|
package/lib/cjs/i18n.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
declare namespace _default {
|
2
|
-
let lng: string;
|
3
|
-
let nsSeparator: string;
|
4
|
-
let keySeparator: string;
|
5
|
-
let pluralSeparator: string;
|
6
|
-
let contextSeparator: string;
|
7
|
-
namespace resources {
|
8
|
-
namespace en {
|
9
|
-
let translation: any;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
}
|
13
|
-
export default _default;
|
package/lib/cjs/i18n.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const en_1 = __importDefault(require("./translations/en"));
|
7
|
-
const utils_1 = require("./utils/utils");
|
8
|
-
exports.default = {
|
9
|
-
lng: 'en',
|
10
|
-
nsSeparator: '::',
|
11
|
-
keySeparator: '.|.',
|
12
|
-
pluralSeparator: '._.',
|
13
|
-
contextSeparator: '._.',
|
14
|
-
resources: {
|
15
|
-
en: {
|
16
|
-
translation: (0, utils_1.fastCloneDeep)(en_1.default)
|
17
|
-
}
|
18
|
-
}
|
19
|
-
};
|
package/lib/cjs/utils/i18n.d.ts
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file is used to mimic the i18n library interface.
|
3
|
-
*/
|
4
|
-
export class I18n {
|
5
|
-
static languages: {};
|
6
|
-
static setDefaultTranslations(languages: any): void;
|
7
|
-
static init(languages?: {}): I18n;
|
8
|
-
static createInstance(): I18n;
|
9
|
-
constructor(languages?: {});
|
10
|
-
languages: any;
|
11
|
-
defaultKeys: any;
|
12
|
-
language: string;
|
13
|
-
currentLanguage: any;
|
14
|
-
setLanguages(languages: any, noDefaultOverride: any): void;
|
15
|
-
dir(lang?: string): "rtl" | "ltr";
|
16
|
-
changeLanguage(language: any, ready?: null): void;
|
17
|
-
addResourceBundle(language: any, type: any, strings: any): void;
|
18
|
-
t(text: any, ...args: any[]): any;
|
19
|
-
}
|