@formio/js 5.0.0-bb.dev.4 → 5.0.0-bb.dev.6
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/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +10 -11
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +10 -11
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +8 -9
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/Form.js +3 -1
- package/lib/cjs/PDFBuilder.d.ts +1 -1
- package/lib/cjs/Webform.d.ts +1 -1
- package/lib/cjs/WebformBuilder.d.ts +4 -4
- package/lib/cjs/Wizard.d.ts +2 -1
- package/lib/cjs/WizardBuilder.d.ts +2 -14
- package/lib/cjs/components/Components.d.ts +6 -6
- package/lib/cjs/components/_classes/component/Component.d.ts +4 -9
- package/lib/cjs/components/_classes/component/Component.form.d.ts +1 -1112
- package/lib/cjs/components/_classes/component/editForm/utils.d.ts +2 -2
- package/lib/cjs/components/_classes/input/Input.d.ts +2 -6
- package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +1 -1112
- package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +1 -1112
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -1
- package/lib/cjs/components/address/Address.form.d.ts +1 -1112
- package/lib/cjs/components/address/editForm/Address.edit.provider.d.ts +1 -4
- package/lib/cjs/components/button/Button.d.ts +1 -1
- package/lib/cjs/components/button/Button.form.d.ts +1 -1112
- package/lib/cjs/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/cjs/components/checkbox/Checkbox.form.d.ts +1 -1112
- package/lib/cjs/components/columns/Columns.d.ts +0 -2
- package/lib/cjs/components/columns/Columns.form.d.ts +1 -1112
- package/lib/cjs/components/container/Container.form.d.ts +1 -1112
- package/lib/cjs/components/content/Content.form.d.ts +1 -1112
- package/lib/cjs/components/currency/Currency.form.d.ts +1 -1112
- package/lib/cjs/components/datagrid/DataGrid.d.ts +3 -3
- package/lib/cjs/components/datagrid/DataGrid.form.d.ts +1 -1112
- package/lib/cjs/components/datamap/DataMap.d.ts +1 -2
- package/lib/cjs/components/datamap/DataMap.form.d.ts +1 -1112
- package/lib/cjs/components/datetime/DateTime.form.d.ts +1 -1112
- package/lib/cjs/components/day/Day.form.d.ts +1 -1112
- package/lib/cjs/components/editgrid/EditGrid.form.d.ts +1 -1112
- package/lib/cjs/components/email/Email.form.d.ts +1 -1112
- package/lib/cjs/components/fieldset/Fieldset.form.d.ts +1 -1112
- package/lib/cjs/components/file/File.d.ts +7 -2
- package/lib/cjs/components/file/File.form.d.ts +1 -1112
- package/lib/cjs/components/file/editForm/File.edit.file.d.ts +1 -4
- package/lib/cjs/components/form/Form.d.ts +1 -1
- package/lib/cjs/components/form/Form.form.d.ts +1 -1112
- package/lib/cjs/components/hidden/Hidden.form.d.ts +1 -1112
- package/lib/cjs/components/html/HTML.form.d.ts +1 -1112
- package/lib/cjs/components/number/Number.form.d.ts +1 -1112
- package/lib/cjs/components/panel/Panel.form.d.ts +1 -1112
- package/lib/cjs/components/password/Password.d.ts +0 -2
- package/lib/cjs/components/password/Password.form.d.ts +1 -1112
- package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +1 -1112
- package/lib/cjs/components/radio/Radio.d.ts +1 -1
- package/lib/cjs/components/radio/Radio.form.d.ts +1 -1112
- package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +1 -1112
- package/lib/cjs/components/select/Select.d.ts +5 -4
- package/lib/cjs/components/select/Select.form.d.ts +1 -1112
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +7 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +1 -1112
- package/lib/cjs/components/signature/Signature.form.d.ts +1 -1112
- package/lib/cjs/components/survey/Survey.d.ts +0 -1
- package/lib/cjs/components/survey/Survey.form.d.ts +1 -1112
- package/lib/cjs/components/table/Table.d.ts +0 -1
- package/lib/cjs/components/table/Table.form.d.ts +1 -1112
- package/lib/cjs/components/tabs/Tabs.form.d.ts +1 -1112
- package/lib/cjs/components/tags/Tags.form.d.ts +1 -1112
- package/lib/cjs/components/textarea/TextArea.d.ts +1 -1
- package/lib/cjs/components/textarea/TextArea.form.d.ts +1 -1112
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.d.ts +1 -4
- package/lib/cjs/components/textfield/TextField.form.d.ts +1 -1112
- package/lib/cjs/components/time/Time.form.d.ts +1 -1112
- package/lib/cjs/components/url/Url.form.d.ts +1 -1112
- package/lib/cjs/components/well/Well.form.d.ts +1 -1112
- package/lib/cjs/formio.form.d.ts +3 -3
- package/lib/cjs/formio.form.js +48 -47
- package/lib/cjs/providers/address/AddressProvider.d.ts +3 -3
- package/lib/cjs/providers/storage/s3.js +29 -1
- package/lib/cjs/providers/storage/xhr.d.ts +1 -1
- package/lib/cjs/utils/builder.d.ts +1 -1
- package/lib/cjs/utils/conditionOperators/ConditionOperator.d.ts +1 -1
- package/lib/cjs/utils/conditionOperators/EndsWith.d.ts +1 -1
- package/lib/cjs/utils/conditionOperators/GreaterThan.d.ts +1 -1
- package/lib/cjs/utils/conditionOperators/GreaterThanOrEqual.d.ts +1 -1
- package/lib/cjs/utils/conditionOperators/Includes.d.ts +1 -1
- package/lib/cjs/utils/conditionOperators/LessThan.d.ts +1 -1
- package/lib/cjs/utils/conditionOperators/LessThanOrEqual.d.ts +1 -1
- package/lib/cjs/utils/conditionOperators/StartsWith.d.ts +1 -1
- package/lib/cjs/utils/conditionOperators/index.d.ts +2 -2
- package/lib/cjs/utils/utils.d.ts +3 -4
- package/lib/cjs/validator/Validator.d.ts +3 -8
- package/lib/mjs/Form.js +3 -1
- package/lib/mjs/PDFBuilder.d.ts +1 -1
- package/lib/mjs/Webform.d.ts +1 -1
- package/lib/mjs/WebformBuilder.d.ts +4 -4
- package/lib/mjs/Wizard.d.ts +2 -1
- package/lib/mjs/WizardBuilder.d.ts +2 -14
- package/lib/mjs/components/Components.d.ts +6 -6
- package/lib/mjs/components/_classes/component/Component.d.ts +4 -9
- package/lib/mjs/components/_classes/component/Component.form.d.ts +1 -1112
- package/lib/mjs/components/_classes/component/editForm/utils.d.ts +2 -2
- package/lib/mjs/components/_classes/input/Input.d.ts +2 -6
- package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +1 -1112
- package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +1 -1112
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -1
- package/lib/mjs/components/address/Address.form.d.ts +1 -1112
- package/lib/mjs/components/address/editForm/Address.edit.provider.d.ts +1 -4
- package/lib/mjs/components/button/Button.d.ts +1 -1
- package/lib/mjs/components/button/Button.form.d.ts +1 -1112
- package/lib/mjs/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/mjs/components/checkbox/Checkbox.form.d.ts +1 -1112
- package/lib/mjs/components/columns/Columns.d.ts +0 -2
- package/lib/mjs/components/columns/Columns.form.d.ts +1 -1112
- package/lib/mjs/components/container/Container.form.d.ts +1 -1112
- package/lib/mjs/components/content/Content.form.d.ts +1 -1112
- package/lib/mjs/components/currency/Currency.form.d.ts +1 -1112
- package/lib/mjs/components/datagrid/DataGrid.d.ts +3 -3
- package/lib/mjs/components/datagrid/DataGrid.form.d.ts +1 -1112
- package/lib/mjs/components/datamap/DataMap.d.ts +1 -2
- package/lib/mjs/components/datamap/DataMap.form.d.ts +1 -1112
- package/lib/mjs/components/datetime/DateTime.form.d.ts +1 -1112
- package/lib/mjs/components/day/Day.form.d.ts +1 -1112
- package/lib/mjs/components/editgrid/EditGrid.form.d.ts +1 -1112
- package/lib/mjs/components/email/Email.form.d.ts +1 -1112
- package/lib/mjs/components/fieldset/Fieldset.form.d.ts +1 -1112
- package/lib/mjs/components/file/File.d.ts +7 -2
- package/lib/mjs/components/file/File.form.d.ts +1 -1112
- package/lib/mjs/components/file/editForm/File.edit.file.d.ts +1 -4
- package/lib/mjs/components/form/Form.d.ts +1 -1
- package/lib/mjs/components/form/Form.form.d.ts +1 -1112
- package/lib/mjs/components/hidden/Hidden.form.d.ts +1 -1112
- package/lib/mjs/components/html/HTML.form.d.ts +1 -1112
- package/lib/mjs/components/number/Number.form.d.ts +1 -1112
- package/lib/mjs/components/panel/Panel.form.d.ts +1 -1112
- package/lib/mjs/components/password/Password.d.ts +0 -2
- package/lib/mjs/components/password/Password.form.d.ts +1 -1112
- package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +1 -1112
- package/lib/mjs/components/radio/Radio.d.ts +1 -1
- package/lib/mjs/components/radio/Radio.form.d.ts +1 -1112
- package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +1 -1112
- package/lib/mjs/components/select/Select.d.ts +5 -4
- package/lib/mjs/components/select/Select.form.d.ts +1 -1112
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +7 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +1 -1112
- package/lib/mjs/components/signature/Signature.form.d.ts +1 -1112
- package/lib/mjs/components/survey/Survey.d.ts +0 -1
- package/lib/mjs/components/survey/Survey.form.d.ts +1 -1112
- package/lib/mjs/components/table/Table.d.ts +0 -1
- package/lib/mjs/components/table/Table.form.d.ts +1 -1112
- package/lib/mjs/components/tabs/Tabs.form.d.ts +1 -1112
- package/lib/mjs/components/tags/Tags.form.d.ts +1 -1112
- package/lib/mjs/components/textarea/TextArea.d.ts +1 -1
- package/lib/mjs/components/textarea/TextArea.form.d.ts +1 -1112
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.d.ts +1 -4
- package/lib/mjs/components/textfield/TextField.form.d.ts +1 -1112
- package/lib/mjs/components/time/Time.form.d.ts +1 -1112
- package/lib/mjs/components/url/Url.form.d.ts +1 -1112
- package/lib/mjs/components/well/Well.form.d.ts +1 -1112
- package/lib/mjs/formio.form.d.ts +3 -3
- package/lib/mjs/formio.form.js +46 -46
- package/lib/mjs/providers/address/AddressProvider.d.ts +3 -3
- package/lib/mjs/providers/storage/s3.js +6 -1
- package/lib/mjs/providers/storage/xhr.d.ts +1 -1
- package/lib/mjs/utils/builder.d.ts +1 -1
- package/lib/mjs/utils/conditionOperators/ConditionOperator.d.ts +1 -1
- package/lib/mjs/utils/conditionOperators/EndsWith.d.ts +1 -1
- package/lib/mjs/utils/conditionOperators/GreaterThan.d.ts +1 -1
- package/lib/mjs/utils/conditionOperators/GreaterThanOrEqual.d.ts +1 -1
- package/lib/mjs/utils/conditionOperators/Includes.d.ts +1 -1
- package/lib/mjs/utils/conditionOperators/LessThan.d.ts +1 -1
- package/lib/mjs/utils/conditionOperators/LessThanOrEqual.d.ts +1 -1
- package/lib/mjs/utils/conditionOperators/StartsWith.d.ts +1 -1
- package/lib/mjs/utils/conditionOperators/index.d.ts +2 -2
- package/lib/mjs/utils/utils.d.ts +3 -4
- package/lib/mjs/validator/Validator.d.ts +3 -8
- package/package.json +2 -2
package/lib/mjs/formio.form.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import Transformers from './validator/transformers';
|
|
|
18
18
|
import ValueSources from './validator/valueSources';
|
|
19
19
|
import Utils from './utils';
|
|
20
20
|
import Form from './Form';
|
|
21
|
-
declare const extendedFormio: typeof Formio;
|
|
22
|
-
import Licenses from './licenses';
|
|
23
21
|
import { Formio } from './Formio';
|
|
24
|
-
|
|
22
|
+
import Licenses from './licenses';
|
|
23
|
+
import EventEmitter from './EventEmitter';
|
|
24
|
+
export { Components, Displays, Providers, Rules, Widgets, Templates, Conjunctions, Operators, QuickRules, Transformers, ValueSources, Utils, Form, Formio, Licenses, EventEmitter };
|
package/lib/mjs/formio.form.js
CHANGED
|
@@ -16,33 +16,33 @@ import Form from './Form';
|
|
|
16
16
|
import Utils from './utils';
|
|
17
17
|
import Evaluator from './utils/Evaluator';
|
|
18
18
|
import Licenses from './licenses';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
extendedFormio.Templates = Templates;
|
|
23
|
-
extendedFormio.Utils = Utils;
|
|
24
|
-
extendedFormio.Form = Form;
|
|
25
|
-
extendedFormio.Displays = Displays;
|
|
26
|
-
extendedFormio.Providers = Providers;
|
|
27
|
-
extendedFormio.Rules = Rules;
|
|
28
|
-
extendedFormio.Widgets = Widgets;
|
|
29
|
-
extendedFormio.Evaluator = Evaluator;
|
|
30
|
-
extendedFormio.Conjunctions = Conjunctions;
|
|
31
|
-
extendedFormio.Operators = Operators;
|
|
32
|
-
extendedFormio.QuickRules = QuickRules;
|
|
33
|
-
extendedFormio.Transformers = Transformers;
|
|
34
|
-
extendedFormio.ValueSources = ValueSources;
|
|
35
|
-
extendedFormio.AllComponents = AllComponents;
|
|
36
|
-
extendedFormio.Licenses = Licenses;
|
|
37
|
-
// This is strange, but is needed for "premium" components to import correctly.
|
|
38
|
-
extendedFormio.Formio = Formio;
|
|
39
|
-
extendedFormio.Components.setComponents(AllComponents);
|
|
40
|
-
extendedFormio.loadModules = (path = `${Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {
|
|
41
|
-
extendedFormio.requireLibrary(name, name, path, true)
|
|
19
|
+
import EventEmitter from './EventEmitter';
|
|
20
|
+
Formio.loadModules = (path = `${Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {
|
|
21
|
+
Formio.requireLibrary(name, name, path, true)
|
|
42
22
|
.then((modules) => {
|
|
43
|
-
|
|
23
|
+
Formio.use(modules);
|
|
44
24
|
});
|
|
45
25
|
};
|
|
26
|
+
// This is needed to maintain correct imports using the "dist" file.
|
|
27
|
+
Formio.Components = Components;
|
|
28
|
+
Formio.Templates = Templates;
|
|
29
|
+
Formio.Utils = Utils;
|
|
30
|
+
Formio.Form = Form;
|
|
31
|
+
Formio.Displays = Displays;
|
|
32
|
+
Formio.Providers = Providers;
|
|
33
|
+
Formio.Rules = Rules;
|
|
34
|
+
Formio.Widgets = Widgets;
|
|
35
|
+
Formio.Evaluator = Evaluator;
|
|
36
|
+
Formio.Conjunctions = Conjunctions;
|
|
37
|
+
Formio.Operators = Operators;
|
|
38
|
+
Formio.QuickRules = QuickRules;
|
|
39
|
+
Formio.Transformers = Transformers;
|
|
40
|
+
Formio.ValueSources = ValueSources;
|
|
41
|
+
Formio.AllComponents = AllComponents;
|
|
42
|
+
Formio.Licenses = Licenses;
|
|
43
|
+
// This is strange, but is needed for "premium" components to import correctly.
|
|
44
|
+
Formio.Formio = Formio;
|
|
45
|
+
Formio.Components.setComponents(AllComponents);
|
|
46
46
|
/**
|
|
47
47
|
* Register a module
|
|
48
48
|
* @param {*} plugin
|
|
@@ -54,63 +54,63 @@ export function registerModule(mod, defaultFn = null, options = {}) {
|
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
for (const key of Object.keys(mod)) {
|
|
57
|
-
const current = mod.framework ||
|
|
57
|
+
const current = mod.framework || Formio.Templates.framework || 'bootstrap';
|
|
58
58
|
switch (key) {
|
|
59
59
|
case 'options':
|
|
60
|
-
|
|
60
|
+
Formio.options = _.merge(Formio.options, mod.options);
|
|
61
61
|
break;
|
|
62
62
|
case 'templates':
|
|
63
63
|
for (const framework of Object.keys(mod.templates)) {
|
|
64
|
-
|
|
64
|
+
Formio.Templates.extendTemplate(framework, mod.templates[framework]);
|
|
65
65
|
}
|
|
66
66
|
if (mod.templates[current]) {
|
|
67
|
-
|
|
67
|
+
Formio.Templates.current = mod.templates[current];
|
|
68
68
|
}
|
|
69
69
|
break;
|
|
70
70
|
case 'components':
|
|
71
|
-
|
|
71
|
+
Formio.Components.setComponents(mod.components);
|
|
72
72
|
break;
|
|
73
73
|
case 'framework':
|
|
74
|
-
|
|
74
|
+
Formio.Templates.framework = mod.framework;
|
|
75
75
|
break;
|
|
76
76
|
case 'fetch':
|
|
77
77
|
for (const name of Object.keys(mod.fetch)) {
|
|
78
|
-
|
|
78
|
+
Formio.registerPlugin(mod.fetch[name], name);
|
|
79
79
|
}
|
|
80
80
|
break;
|
|
81
81
|
case 'providers':
|
|
82
82
|
for (const type of Object.keys(mod.providers)) {
|
|
83
|
-
|
|
83
|
+
Formio.Providers.addProviders(type, mod.providers[type]);
|
|
84
84
|
}
|
|
85
85
|
break;
|
|
86
86
|
case 'displays':
|
|
87
|
-
|
|
87
|
+
Formio.Displays.addDisplays(mod.displays);
|
|
88
88
|
break;
|
|
89
89
|
case 'rules':
|
|
90
|
-
|
|
90
|
+
Formio.Rules.addRules(mod.rules);
|
|
91
91
|
break;
|
|
92
92
|
case 'evaluator':
|
|
93
|
-
|
|
93
|
+
Formio.Evaluator.registerEvaluator(mod.evaluator);
|
|
94
94
|
break;
|
|
95
95
|
case 'conjunctions':
|
|
96
|
-
|
|
96
|
+
Formio.Conjunctions.addConjunctions(mod.conjunctions);
|
|
97
97
|
break;
|
|
98
98
|
case 'operators':
|
|
99
|
-
|
|
99
|
+
Formio.Operators.addOperators(mod.operators);
|
|
100
100
|
break;
|
|
101
101
|
case 'quickRules':
|
|
102
|
-
|
|
102
|
+
Formio.QuickRules.addQuickRules(mod.quickRules);
|
|
103
103
|
break;
|
|
104
104
|
case 'transformers':
|
|
105
|
-
|
|
105
|
+
Formio.Transformers.addTransformers(mod.transformers);
|
|
106
106
|
break;
|
|
107
107
|
case 'valueSources':
|
|
108
|
-
|
|
108
|
+
Formio.ValueSources.addValueSources(mod.valueSources);
|
|
109
109
|
break;
|
|
110
110
|
case 'library':
|
|
111
111
|
options.license
|
|
112
|
-
?
|
|
113
|
-
:
|
|
112
|
+
? Formio.Licenses.addLicense(mod.library, options.license)
|
|
113
|
+
: Formio.Licenses.removeLicense(mod.library);
|
|
114
114
|
break;
|
|
115
115
|
default:
|
|
116
116
|
if (defaultFn) {
|
|
@@ -142,9 +142,9 @@ export function useModule(defaultFn = null) {
|
|
|
142
142
|
* Formio.plugins(plugin1, options);
|
|
143
143
|
* Formio.plugins([plugin1, plugin2, etc], options);
|
|
144
144
|
*/
|
|
145
|
-
|
|
145
|
+
Formio.use = useModule();
|
|
146
146
|
// Allow simple embedding.
|
|
147
|
-
|
|
147
|
+
Formio.embedForm = (embed) => Form.embed(embed);
|
|
148
148
|
/**
|
|
149
149
|
* Factory that creates a new form based on the form parameters.
|
|
150
150
|
*
|
|
@@ -154,8 +154,8 @@ extendedFormio.embedForm = (embed) => Form.embed(embed);
|
|
|
154
154
|
*
|
|
155
155
|
* @return {Promise} - When the form is instance is ready.
|
|
156
156
|
*/
|
|
157
|
-
|
|
157
|
+
Formio.createForm = (...args) => {
|
|
158
158
|
return (new Form(...args)).ready;
|
|
159
159
|
};
|
|
160
160
|
// Export the components.
|
|
161
|
-
export { Components, Displays, Providers, Rules, Widgets, Templates, Conjunctions, Operators, QuickRules, Transformers, ValueSources, Utils, Form,
|
|
161
|
+
export { Components, Displays, Providers, Rules, Widgets, Templates, Conjunctions, Operators, QuickRules, Transformers, ValueSources, Utils, Form, Formio, Licenses, EventEmitter };
|
|
@@ -2,14 +2,14 @@ export class AddressProvider {
|
|
|
2
2
|
static get name(): string;
|
|
3
3
|
static get displayName(): string;
|
|
4
4
|
constructor(options?: {});
|
|
5
|
-
options:
|
|
5
|
+
options: any;
|
|
6
6
|
beforeMergeOptions(): void;
|
|
7
7
|
get defaultOptions(): {};
|
|
8
8
|
get queryProperty(): string;
|
|
9
9
|
get responseProperty(): null;
|
|
10
10
|
get displayValueProperty(): null;
|
|
11
|
-
serialize(params: any):
|
|
12
|
-
getRequestOptions(options?: {}):
|
|
11
|
+
serialize(params: any): any;
|
|
12
|
+
getRequestOptions(options?: {}): any;
|
|
13
13
|
getRequestUrl(options?: {}): void;
|
|
14
14
|
makeRequest(options?: {}): any;
|
|
15
15
|
search(query: any, options?: {}): any;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import XHR from './xhr';
|
|
2
2
|
import { withRetries } from './util';
|
|
3
|
-
const
|
|
3
|
+
const loadAbortControllerPolyfill = async () => {
|
|
4
|
+
if (typeof AbortController === 'undefined') {
|
|
5
|
+
await import('abortcontroller-polyfill/dist/polyfill-patch-fetch');
|
|
6
|
+
}
|
|
7
|
+
};
|
|
4
8
|
function s3(formio) {
|
|
5
9
|
return {
|
|
6
10
|
async uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback, multipartOptions) {
|
|
@@ -10,6 +14,7 @@ function s3(formio) {
|
|
|
10
14
|
if (response.signed) {
|
|
11
15
|
if (multipartOptions && Array.isArray(response.signed)) {
|
|
12
16
|
// patch abort callback
|
|
17
|
+
await loadAbortControllerPolyfill();
|
|
13
18
|
const abortController = new AbortController();
|
|
14
19
|
const abortSignal = abortController.signal;
|
|
15
20
|
if (typeof abortCallback === 'function') {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function setXhrHeaders(formio: any, xhr: any): void;
|
|
2
2
|
export default XHR;
|
|
3
3
|
declare namespace XHR {
|
|
4
|
-
function trim(text: any):
|
|
4
|
+
function trim(text: any): any;
|
|
5
5
|
function path(items: any): any;
|
|
6
6
|
function upload(formio: any, type: any, xhrCallback: any, file: any, fileName: any, dir: any, progressCallback: any, groupPermissions: any, groupId: any, abortCallback: any, multipartOptions: any): Promise<any>;
|
|
7
7
|
function makeXhrRequest(formio: any, xhrCallback: any, serverResponse: any, progressCallback: any, abortCallback: any): Promise<any>;
|
|
@@ -11,7 +11,7 @@ declare namespace _default {
|
|
|
11
11
|
namespace additionalShortcuts {
|
|
12
12
|
const button: string[];
|
|
13
13
|
}
|
|
14
|
-
function getAlphaShortcuts():
|
|
14
|
+
function getAlphaShortcuts(): any;
|
|
15
15
|
function getAdditionalShortcuts(type: any): any;
|
|
16
16
|
function getBindedShortcuts(components: any, input: any): any[];
|
|
17
17
|
function getAvailableShortcuts(form: any, component: any): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default ConditionOperators;
|
|
2
2
|
declare const ConditionOperators: {
|
|
3
|
-
[x: string]: typeof
|
|
3
|
+
[x: string]: typeof IsEqualTo | typeof DateGreaterThan;
|
|
4
4
|
};
|
|
5
|
-
import
|
|
5
|
+
import IsEqualTo from './IsEqualTo';
|
|
6
6
|
import DateGreaterThan from './DateGreaterThan';
|
package/lib/mjs/utils/utils.d.ts
CHANGED
|
@@ -130,7 +130,7 @@ export function guid(): string;
|
|
|
130
130
|
* @return {(null|Date)}
|
|
131
131
|
*/
|
|
132
132
|
export function getDateSetting(date: any): (null | Date);
|
|
133
|
-
export function isValidDate(date: any):
|
|
133
|
+
export function isValidDate(date: any): any;
|
|
134
134
|
/**
|
|
135
135
|
* Get the current timezone string.
|
|
136
136
|
*
|
|
@@ -305,7 +305,7 @@ export function sanitize(string: any, options: any): any;
|
|
|
305
305
|
*/
|
|
306
306
|
export function fastCloneDeep(obj: any): any;
|
|
307
307
|
export function isInputComponent(componentJson: any): any;
|
|
308
|
-
export function getArrayFromComponentPath(pathStr: any): any
|
|
308
|
+
export function getArrayFromComponentPath(pathStr: any): any;
|
|
309
309
|
export function hasInvalidComponent(component: any): any;
|
|
310
310
|
export function getStringFromComponentPath(path: any): any;
|
|
311
311
|
export function round(number: any, precision: any): any;
|
|
@@ -359,7 +359,7 @@ export * from "./formUtils";
|
|
|
359
359
|
*
|
|
360
360
|
* @return {T}
|
|
361
361
|
*/
|
|
362
|
-
export const firstNonNil:
|
|
362
|
+
export const firstNonNil: any;
|
|
363
363
|
export namespace componentValueTypes {
|
|
364
364
|
const number: string;
|
|
365
365
|
const string: string;
|
|
@@ -373,5 +373,4 @@ import jsonLogic from 'json-logic-js';
|
|
|
373
373
|
import ConditionOperators from './conditionOperators';
|
|
374
374
|
import Evaluator from './Evaluator';
|
|
375
375
|
export const interpolate: (rawTemplate: any, data: any, _options: any) => any;
|
|
376
|
-
import _ from 'lodash';
|
|
377
376
|
export { jsonLogic, ConditionOperators, Evaluator, _ };
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
declare const instance: ValidationChecker;
|
|
2
2
|
export class ValidationChecker {
|
|
3
3
|
constructor(config?: {});
|
|
4
|
-
config:
|
|
5
|
-
db: null;
|
|
6
|
-
token: null;
|
|
7
|
-
form: null;
|
|
8
|
-
submission: null;
|
|
9
|
-
};
|
|
4
|
+
config: any;
|
|
10
5
|
validators: {
|
|
11
6
|
required: {
|
|
12
7
|
key: string;
|
|
@@ -178,7 +173,7 @@ export class ValidationChecker {
|
|
|
178
173
|
validate(component: any, validatorName: any, value: any, data: any, index: any, row: any, async: any, conditionallyVisible: any, validationObj: any): false | {
|
|
179
174
|
message: string;
|
|
180
175
|
level: string;
|
|
181
|
-
path: any
|
|
176
|
+
path: any;
|
|
182
177
|
context: {
|
|
183
178
|
validator: any;
|
|
184
179
|
hasLabel: any;
|
|
@@ -192,7 +187,7 @@ export class ValidationChecker {
|
|
|
192
187
|
} | Promise<false | {
|
|
193
188
|
message: string;
|
|
194
189
|
level: string;
|
|
195
|
-
path: any
|
|
190
|
+
path: any;
|
|
196
191
|
context: {
|
|
197
192
|
validator: any;
|
|
198
193
|
hasLabel: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/js",
|
|
3
|
-
"version": "5.0.0-bb.dev.
|
|
3
|
+
"version": "5.0.0-bb.dev.6",
|
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@formio/bootstrap": "^3.0.0-rc.20",
|
|
81
81
|
"@formio/choices.js": "^10.2.0",
|
|
82
|
-
"@formio/core": "
|
|
82
|
+
"@formio/core": "2.0.0-dev.4",
|
|
83
83
|
"@formio/text-mask-addons": "^3.8.0-formio.2",
|
|
84
84
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
|
85
85
|
"abortcontroller-polyfill": "^1.7.5",
|