@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/cjs/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/cjs/formio.form.js
CHANGED
|
@@ -3,9 +3,10 @@ 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.Licenses = exports.Formio = exports.Form = exports.Utils = exports.ValueSources = exports.Transformers = exports.QuickRules = exports.Operators = exports.Conjunctions = exports.Templates = exports.Widgets = exports.Rules = exports.Providers = exports.Displays = exports.Components = exports.useModule = exports.registerModule = void 0;
|
|
6
|
+
exports.EventEmitter = exports.Licenses = exports.Formio = exports.Form = exports.Utils = exports.ValueSources = exports.Transformers = exports.QuickRules = exports.Operators = exports.Conjunctions = exports.Templates = exports.Widgets = exports.Rules = exports.Providers = exports.Displays = exports.Components = exports.useModule = exports.registerModule = void 0;
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
8
|
const Formio_1 = require("./Formio");
|
|
9
|
+
Object.defineProperty(exports, "Formio", { enumerable: true, get: function () { return Formio_1.Formio; } });
|
|
9
10
|
const components_1 = __importDefault(require("./components"));
|
|
10
11
|
const Components_1 = __importDefault(require("./components/Components"));
|
|
11
12
|
exports.Components = Components_1.default;
|
|
@@ -36,34 +37,34 @@ exports.Utils = utils_1.default;
|
|
|
36
37
|
const Evaluator_1 = __importDefault(require("./utils/Evaluator"));
|
|
37
38
|
const licenses_1 = __importDefault(require("./licenses"));
|
|
38
39
|
exports.Licenses = licenses_1.default;
|
|
39
|
-
const
|
|
40
|
-
exports.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
extendedFormio.Templates = Templates_1.default;
|
|
44
|
-
extendedFormio.Utils = utils_1.default;
|
|
45
|
-
extendedFormio.Form = Form_1.default;
|
|
46
|
-
extendedFormio.Displays = Displays_1.default;
|
|
47
|
-
extendedFormio.Providers = providers_1.default;
|
|
48
|
-
extendedFormio.Rules = Rules_1.default;
|
|
49
|
-
extendedFormio.Widgets = widgets_1.default;
|
|
50
|
-
extendedFormio.Evaluator = Evaluator_1.default;
|
|
51
|
-
extendedFormio.Conjunctions = conjunctions_1.default;
|
|
52
|
-
extendedFormio.Operators = operators_1.default;
|
|
53
|
-
extendedFormio.QuickRules = quickRules_1.default;
|
|
54
|
-
extendedFormio.Transformers = transformers_1.default;
|
|
55
|
-
extendedFormio.ValueSources = valueSources_1.default;
|
|
56
|
-
extendedFormio.AllComponents = components_1.default;
|
|
57
|
-
extendedFormio.Licenses = licenses_1.default;
|
|
58
|
-
// This is strange, but is needed for "premium" components to import correctly.
|
|
59
|
-
extendedFormio.Formio = Formio_1.Formio;
|
|
60
|
-
extendedFormio.Components.setComponents(components_1.default);
|
|
61
|
-
extendedFormio.loadModules = (path = `${Formio_1.Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {
|
|
62
|
-
extendedFormio.requireLibrary(name, name, path, true)
|
|
40
|
+
const EventEmitter_1 = __importDefault(require("./EventEmitter"));
|
|
41
|
+
exports.EventEmitter = EventEmitter_1.default;
|
|
42
|
+
Formio_1.Formio.loadModules = (path = `${Formio_1.Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {
|
|
43
|
+
Formio_1.Formio.requireLibrary(name, name, path, true)
|
|
63
44
|
.then((modules) => {
|
|
64
|
-
|
|
45
|
+
Formio_1.Formio.use(modules);
|
|
65
46
|
});
|
|
66
47
|
};
|
|
48
|
+
// This is needed to maintain correct imports using the "dist" file.
|
|
49
|
+
Formio_1.Formio.Components = Components_1.default;
|
|
50
|
+
Formio_1.Formio.Templates = Templates_1.default;
|
|
51
|
+
Formio_1.Formio.Utils = utils_1.default;
|
|
52
|
+
Formio_1.Formio.Form = Form_1.default;
|
|
53
|
+
Formio_1.Formio.Displays = Displays_1.default;
|
|
54
|
+
Formio_1.Formio.Providers = providers_1.default;
|
|
55
|
+
Formio_1.Formio.Rules = Rules_1.default;
|
|
56
|
+
Formio_1.Formio.Widgets = widgets_1.default;
|
|
57
|
+
Formio_1.Formio.Evaluator = Evaluator_1.default;
|
|
58
|
+
Formio_1.Formio.Conjunctions = conjunctions_1.default;
|
|
59
|
+
Formio_1.Formio.Operators = operators_1.default;
|
|
60
|
+
Formio_1.Formio.QuickRules = quickRules_1.default;
|
|
61
|
+
Formio_1.Formio.Transformers = transformers_1.default;
|
|
62
|
+
Formio_1.Formio.ValueSources = valueSources_1.default;
|
|
63
|
+
Formio_1.Formio.AllComponents = components_1.default;
|
|
64
|
+
Formio_1.Formio.Licenses = licenses_1.default;
|
|
65
|
+
// This is strange, but is needed for "premium" components to import correctly.
|
|
66
|
+
Formio_1.Formio.Formio = Formio_1.Formio;
|
|
67
|
+
Formio_1.Formio.Components.setComponents(components_1.default);
|
|
67
68
|
/**
|
|
68
69
|
* Register a module
|
|
69
70
|
* @param {*} plugin
|
|
@@ -75,63 +76,63 @@ function registerModule(mod, defaultFn = null, options = {}) {
|
|
|
75
76
|
return;
|
|
76
77
|
}
|
|
77
78
|
for (const key of Object.keys(mod)) {
|
|
78
|
-
const current = mod.framework ||
|
|
79
|
+
const current = mod.framework || Formio_1.Formio.Templates.framework || 'bootstrap';
|
|
79
80
|
switch (key) {
|
|
80
81
|
case 'options':
|
|
81
|
-
|
|
82
|
+
Formio_1.Formio.options = lodash_1.default.merge(Formio_1.Formio.options, mod.options);
|
|
82
83
|
break;
|
|
83
84
|
case 'templates':
|
|
84
85
|
for (const framework of Object.keys(mod.templates)) {
|
|
85
|
-
|
|
86
|
+
Formio_1.Formio.Templates.extendTemplate(framework, mod.templates[framework]);
|
|
86
87
|
}
|
|
87
88
|
if (mod.templates[current]) {
|
|
88
|
-
|
|
89
|
+
Formio_1.Formio.Templates.current = mod.templates[current];
|
|
89
90
|
}
|
|
90
91
|
break;
|
|
91
92
|
case 'components':
|
|
92
|
-
|
|
93
|
+
Formio_1.Formio.Components.setComponents(mod.components);
|
|
93
94
|
break;
|
|
94
95
|
case 'framework':
|
|
95
|
-
|
|
96
|
+
Formio_1.Formio.Templates.framework = mod.framework;
|
|
96
97
|
break;
|
|
97
98
|
case 'fetch':
|
|
98
99
|
for (const name of Object.keys(mod.fetch)) {
|
|
99
|
-
|
|
100
|
+
Formio_1.Formio.registerPlugin(mod.fetch[name], name);
|
|
100
101
|
}
|
|
101
102
|
break;
|
|
102
103
|
case 'providers':
|
|
103
104
|
for (const type of Object.keys(mod.providers)) {
|
|
104
|
-
|
|
105
|
+
Formio_1.Formio.Providers.addProviders(type, mod.providers[type]);
|
|
105
106
|
}
|
|
106
107
|
break;
|
|
107
108
|
case 'displays':
|
|
108
|
-
|
|
109
|
+
Formio_1.Formio.Displays.addDisplays(mod.displays);
|
|
109
110
|
break;
|
|
110
111
|
case 'rules':
|
|
111
|
-
|
|
112
|
+
Formio_1.Formio.Rules.addRules(mod.rules);
|
|
112
113
|
break;
|
|
113
114
|
case 'evaluator':
|
|
114
|
-
|
|
115
|
+
Formio_1.Formio.Evaluator.registerEvaluator(mod.evaluator);
|
|
115
116
|
break;
|
|
116
117
|
case 'conjunctions':
|
|
117
|
-
|
|
118
|
+
Formio_1.Formio.Conjunctions.addConjunctions(mod.conjunctions);
|
|
118
119
|
break;
|
|
119
120
|
case 'operators':
|
|
120
|
-
|
|
121
|
+
Formio_1.Formio.Operators.addOperators(mod.operators);
|
|
121
122
|
break;
|
|
122
123
|
case 'quickRules':
|
|
123
|
-
|
|
124
|
+
Formio_1.Formio.QuickRules.addQuickRules(mod.quickRules);
|
|
124
125
|
break;
|
|
125
126
|
case 'transformers':
|
|
126
|
-
|
|
127
|
+
Formio_1.Formio.Transformers.addTransformers(mod.transformers);
|
|
127
128
|
break;
|
|
128
129
|
case 'valueSources':
|
|
129
|
-
|
|
130
|
+
Formio_1.Formio.ValueSources.addValueSources(mod.valueSources);
|
|
130
131
|
break;
|
|
131
132
|
case 'library':
|
|
132
133
|
options.license
|
|
133
|
-
?
|
|
134
|
-
:
|
|
134
|
+
? Formio_1.Formio.Licenses.addLicense(mod.library, options.license)
|
|
135
|
+
: Formio_1.Formio.Licenses.removeLicense(mod.library);
|
|
135
136
|
break;
|
|
136
137
|
default:
|
|
137
138
|
if (defaultFn) {
|
|
@@ -165,9 +166,9 @@ exports.useModule = useModule;
|
|
|
165
166
|
* Formio.plugins(plugin1, options);
|
|
166
167
|
* Formio.plugins([plugin1, plugin2, etc], options);
|
|
167
168
|
*/
|
|
168
|
-
|
|
169
|
+
Formio_1.Formio.use = useModule();
|
|
169
170
|
// Allow simple embedding.
|
|
170
|
-
|
|
171
|
+
Formio_1.Formio.embedForm = (embed) => Form_1.default.embed(embed);
|
|
171
172
|
/**
|
|
172
173
|
* Factory that creates a new form based on the form parameters.
|
|
173
174
|
*
|
|
@@ -177,6 +178,6 @@ extendedFormio.embedForm = (embed) => Form_1.default.embed(embed);
|
|
|
177
178
|
*
|
|
178
179
|
* @return {Promise} - When the form is instance is ready.
|
|
179
180
|
*/
|
|
180
|
-
|
|
181
|
+
Formio_1.Formio.createForm = (...args) => {
|
|
181
182
|
return (new Form_1.default(...args)).ready;
|
|
182
183
|
};
|
|
@@ -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,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -14,7 +37,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
38
|
const xhr_1 = __importDefault(require("./xhr"));
|
|
16
39
|
const util_1 = require("./util");
|
|
17
|
-
const
|
|
40
|
+
const loadAbortControllerPolyfill = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
if (typeof AbortController === 'undefined') {
|
|
42
|
+
yield Promise.resolve().then(() => __importStar(require('abortcontroller-polyfill/dist/polyfill-patch-fetch')));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
18
45
|
function s3(formio) {
|
|
19
46
|
return {
|
|
20
47
|
uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback, multipartOptions) {
|
|
@@ -25,6 +52,7 @@ function s3(formio) {
|
|
|
25
52
|
if (response.signed) {
|
|
26
53
|
if (multipartOptions && Array.isArray(response.signed)) {
|
|
27
54
|
// patch abort callback
|
|
55
|
+
yield loadAbortControllerPolyfill();
|
|
28
56
|
const abortController = new AbortController();
|
|
29
57
|
const abortSignal = abortController.signal;
|
|
30
58
|
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/cjs/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/lib/mjs/Form.js
CHANGED
|
@@ -97,7 +97,9 @@ export default class Form extends Element {
|
|
|
97
97
|
this.element.appendChild(this.loader);
|
|
98
98
|
}
|
|
99
99
|
else if (this.loader) {
|
|
100
|
-
this.element.
|
|
100
|
+
if (this.element.contains(this.loader)) {
|
|
101
|
+
this.element.removeChild(this.loader);
|
|
102
|
+
}
|
|
101
103
|
this.loader = null;
|
|
102
104
|
}
|
|
103
105
|
}
|
package/lib/mjs/PDFBuilder.d.ts
CHANGED
package/lib/mjs/Webform.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export default class WebformBuilder extends Component {
|
|
|
4
4
|
builderHeight: number;
|
|
5
5
|
schemas: {};
|
|
6
6
|
repeatablePaths: any[];
|
|
7
|
-
sideBarScroll:
|
|
8
|
-
sideBarScrollOffset:
|
|
7
|
+
sideBarScroll: any;
|
|
8
|
+
sideBarScrollOffset: any;
|
|
9
9
|
dragDropEnabled: boolean;
|
|
10
10
|
builder: any;
|
|
11
11
|
groups: {};
|
|
@@ -92,11 +92,11 @@ export default class WebformBuilder extends Component {
|
|
|
92
92
|
saved: boolean | undefined;
|
|
93
93
|
showPreview: any;
|
|
94
94
|
editComponent(component: any, parent: any, isNew: any, isJsonEdit: any, original: any, flags?: {}): void;
|
|
95
|
-
editForm:
|
|
95
|
+
editForm: Webform | undefined;
|
|
96
96
|
preview: Webform | null | undefined;
|
|
97
97
|
componentEdit: any;
|
|
98
98
|
dialog: any;
|
|
99
|
-
updateComponentKey(data: any):
|
|
99
|
+
updateComponentKey(data: any): any;
|
|
100
100
|
moveComponent(component: any): void;
|
|
101
101
|
selectedComponent: any;
|
|
102
102
|
moveHandler: (e: any) => void;
|
package/lib/mjs/Wizard.d.ts
CHANGED
|
@@ -14,7 +14,8 @@ declare class Wizard extends Webform {
|
|
|
14
14
|
lastPromise: Promise<void>;
|
|
15
15
|
enabledIndex: number;
|
|
16
16
|
editMode: boolean;
|
|
17
|
-
originalOptions:
|
|
17
|
+
originalOptions: any;
|
|
18
|
+
isLastPage(): any;
|
|
18
19
|
getPages(args?: {}): any[];
|
|
19
20
|
get hasExtraPages(): boolean;
|
|
20
21
|
get localData(): any;
|
|
@@ -11,20 +11,8 @@ export default class WizardBuilder extends WebformBuilder {
|
|
|
11
11
|
page: number;
|
|
12
12
|
removeComponent(component: any, parent: any, original: any): boolean | undefined;
|
|
13
13
|
allowDrop(element: any): boolean;
|
|
14
|
-
get pages():
|
|
15
|
-
|
|
16
|
-
label: string;
|
|
17
|
-
type: string;
|
|
18
|
-
key: string;
|
|
19
|
-
components: any[];
|
|
20
|
-
}[];
|
|
21
|
-
get currentPage(): {
|
|
22
|
-
title: string;
|
|
23
|
-
label: string;
|
|
24
|
-
type: string;
|
|
25
|
-
key: string;
|
|
26
|
-
components: any[];
|
|
27
|
-
} | null;
|
|
14
|
+
get pages(): any;
|
|
15
|
+
get currentPage(): any;
|
|
28
16
|
set form(arg: {
|
|
29
17
|
components: {
|
|
30
18
|
title: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default class Components {
|
|
2
2
|
static _editFormUtils: {
|
|
3
|
-
sortAndFilterComponents(components: any): any
|
|
4
|
-
unifyComponents(objValue: any, srcValue: any):
|
|
3
|
+
sortAndFilterComponents(components: any): any;
|
|
4
|
+
unifyComponents(objValue: any, srcValue: any): any;
|
|
5
5
|
logicVariablesTable(additional: any): {
|
|
6
6
|
type: string;
|
|
7
7
|
tag: string;
|
|
@@ -83,8 +83,8 @@ export default class Components {
|
|
|
83
83
|
};
|
|
84
84
|
static _baseEditForm: typeof BaseEditForm;
|
|
85
85
|
static set EditFormUtils(arg: {
|
|
86
|
-
sortAndFilterComponents(components: any): any
|
|
87
|
-
unifyComponents(objValue: any, srcValue: any):
|
|
86
|
+
sortAndFilterComponents(components: any): any;
|
|
87
|
+
unifyComponents(objValue: any, srcValue: any): any;
|
|
88
88
|
logicVariablesTable(additional: any): {
|
|
89
89
|
type: string;
|
|
90
90
|
tag: string;
|
|
@@ -165,8 +165,8 @@ export default class Components {
|
|
|
165
165
|
};
|
|
166
166
|
});
|
|
167
167
|
static get EditFormUtils(): {
|
|
168
|
-
sortAndFilterComponents(components: any): any
|
|
169
|
-
unifyComponents(objValue: any, srcValue: any):
|
|
168
|
+
sortAndFilterComponents(components: any): any;
|
|
169
|
+
unifyComponents(objValue: any, srcValue: any): any;
|
|
170
170
|
logicVariablesTable(additional: any): {
|
|
171
171
|
type: string;
|
|
172
172
|
tag: string;
|
|
@@ -129,12 +129,7 @@ declare class Component extends Element {
|
|
|
129
129
|
_parentVisible: any;
|
|
130
130
|
_visible: any;
|
|
131
131
|
_parentDisabled: boolean;
|
|
132
|
-
triggerChange: (...args: any[]) =>
|
|
133
|
-
instance: Component;
|
|
134
|
-
component: any;
|
|
135
|
-
value: any;
|
|
136
|
-
flags: any;
|
|
137
|
-
} | undefined;
|
|
132
|
+
triggerChange: (...args: any[]) => any;
|
|
138
133
|
/**
|
|
139
134
|
* Used to trigger a redraw event within this component.
|
|
140
135
|
*
|
|
@@ -578,7 +573,7 @@ declare class Component extends Element {
|
|
|
578
573
|
deleteValue(): void;
|
|
579
574
|
getCustomDefaultValue(defaultValue: any): any;
|
|
580
575
|
get shouldAddDefaultValue(): any;
|
|
581
|
-
get defaultValue():
|
|
576
|
+
get defaultValue(): any;
|
|
582
577
|
/**
|
|
583
578
|
* Get the input value of this component.
|
|
584
579
|
*
|
|
@@ -728,8 +723,8 @@ declare class Component extends Element {
|
|
|
728
723
|
checkData(data: any, flags: any, row: any): boolean;
|
|
729
724
|
checkModal(isValid?: boolean, dirty?: boolean): void;
|
|
730
725
|
get validationValue(): any;
|
|
731
|
-
isEmpty(value?: any):
|
|
732
|
-
isEqual(valueA: any, valueB?: any):
|
|
726
|
+
isEmpty(value?: any): any;
|
|
727
|
+
isEqual(valueA: any, valueB?: any): any;
|
|
733
728
|
/**
|
|
734
729
|
* Check if a component is eligible for multiple validation
|
|
735
730
|
*
|