@formio/js 5.0.0-bb.dev.3 → 5.0.0-bb.dev.4
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 +20 -19
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +20 -19
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +9 -8
- 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 +1 -18
- 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 +1 -2
- package/lib/cjs/WizardBuilder.d.ts +14 -2
- package/lib/cjs/components/Components.d.ts +6 -6
- package/lib/cjs/components/_classes/component/Component.d.ts +9 -4
- package/lib/cjs/components/_classes/component/Component.form.d.ts +1112 -1
- package/lib/cjs/components/_classes/component/Component.js +10 -4
- package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +8 -0
- package/lib/cjs/components/_classes/component/editForm/utils.d.ts +2 -2
- package/lib/cjs/components/_classes/input/Input.d.ts +6 -2
- package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +1112 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +1112 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.js +2 -2
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -1
- package/lib/cjs/components/address/Address.form.d.ts +1112 -1
- package/lib/cjs/components/address/editForm/Address.edit.provider.d.ts +4 -1
- package/lib/cjs/components/button/Button.d.ts +1 -1
- package/lib/cjs/components/button/Button.form.d.ts +1112 -1
- package/lib/cjs/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/cjs/components/checkbox/Checkbox.form.d.ts +1112 -1
- package/lib/cjs/components/columns/Columns.d.ts +2 -0
- package/lib/cjs/components/columns/Columns.form.d.ts +1112 -1
- package/lib/cjs/components/container/Container.form.d.ts +1112 -1
- package/lib/cjs/components/content/Content.form.d.ts +1112 -1
- package/lib/cjs/components/currency/Currency.form.d.ts +1112 -1
- package/lib/cjs/components/datagrid/DataGrid.d.ts +3 -3
- package/lib/cjs/components/datagrid/DataGrid.form.d.ts +1112 -1
- package/lib/cjs/components/datagrid/DataGrid.js +2 -1
- package/lib/cjs/components/datagrid/fixtures/comp-with-allow-calculate-override.js +1 -1
- package/lib/cjs/components/datagrid/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/datagrid/fixtures/index.js +3 -1
- package/lib/cjs/components/datagrid/fixtures/two-comp-with-allow-calculate-override.d.ts +53 -0
- package/lib/cjs/components/datagrid/fixtures/two-comp-with-allow-calculate-override.js +104 -0
- package/lib/cjs/components/datamap/DataMap.d.ts +2 -1
- package/lib/cjs/components/datamap/DataMap.form.d.ts +1112 -1
- package/lib/cjs/components/datetime/DateTime.form.d.ts +1112 -1
- package/lib/cjs/components/day/Day.form.d.ts +1112 -1
- package/lib/cjs/components/editgrid/EditGrid.form.d.ts +1112 -1
- package/lib/cjs/components/editgrid/EditGrid.js +7 -4
- package/lib/cjs/components/editgrid/fixtures/formsWithEditGridAndConditions.d.ts +910 -0
- package/lib/cjs/components/editgrid/fixtures/formsWithEditGridAndConditions.js +923 -0
- package/lib/cjs/components/email/Email.form.d.ts +1112 -1
- package/lib/cjs/components/fieldset/Fieldset.form.d.ts +1112 -1
- package/lib/cjs/components/file/File.d.ts +2 -7
- package/lib/cjs/components/file/File.form.d.ts +1112 -1
- package/lib/cjs/components/file/editForm/File.edit.file.d.ts +4 -1
- package/lib/cjs/components/form/Form.d.ts +1 -1
- package/lib/cjs/components/form/Form.form.d.ts +1112 -1
- package/lib/cjs/components/hidden/Hidden.form.d.ts +1112 -1
- package/lib/cjs/components/html/HTML.d.ts +1 -0
- package/lib/cjs/components/html/HTML.form.d.ts +1112 -1
- package/lib/cjs/components/html/HTML.js +9 -0
- package/lib/cjs/components/number/Number.form.d.ts +1112 -1
- package/lib/cjs/components/panel/Panel.form.d.ts +1112 -1
- package/lib/cjs/components/password/Password.d.ts +2 -0
- package/lib/cjs/components/password/Password.form.d.ts +1112 -1
- package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +1112 -1
- package/lib/cjs/components/radio/Radio.d.ts +1 -1
- package/lib/cjs/components/radio/Radio.form.d.ts +1112 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +1112 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.js +3 -3
- package/lib/cjs/components/select/Select.d.ts +4 -5
- package/lib/cjs/components/select/Select.form.d.ts +1112 -1
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +2 -7
- package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +1112 -1
- package/lib/cjs/components/signature/Signature.form.d.ts +1112 -1
- package/lib/cjs/components/survey/Survey.d.ts +1 -0
- package/lib/cjs/components/survey/Survey.form.d.ts +1112 -1
- package/lib/cjs/components/table/Table.d.ts +1 -0
- package/lib/cjs/components/table/Table.form.d.ts +1112 -1
- package/lib/cjs/components/tabs/Tabs.form.d.ts +1112 -1
- package/lib/cjs/components/tags/Tags.form.d.ts +1112 -1
- package/lib/cjs/components/textarea/TextArea.d.ts +1 -1
- package/lib/cjs/components/textarea/TextArea.form.d.ts +1112 -1
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.d.ts +4 -1
- package/lib/cjs/components/textfield/TextField.form.d.ts +1112 -1
- package/lib/cjs/components/time/Time.form.d.ts +1112 -1
- package/lib/cjs/components/url/Url.form.d.ts +1112 -1
- package/lib/cjs/components/well/Well.form.d.ts +1112 -1
- package/lib/cjs/formio.form.d.ts +3 -3
- package/lib/cjs/formio.form.js +59 -46
- package/lib/cjs/providers/address/AddressProvider.d.ts +3 -3
- package/lib/cjs/providers/storage/s3.js +1 -29
- package/lib/cjs/providers/storage/xhr.d.ts +1 -1
- package/lib/cjs/translations/en.d.ts +2 -0
- package/lib/cjs/translations/en.js +2 -0
- 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 +4 -3
- package/lib/cjs/validator/Validator.d.ts +8 -3
- package/lib/cjs/validator/Validator.js +1 -1
- package/lib/mjs/Form.js +1 -18
- 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 +1 -2
- package/lib/mjs/WizardBuilder.d.ts +14 -2
- package/lib/mjs/components/Components.d.ts +6 -6
- package/lib/mjs/components/_classes/component/Component.d.ts +9 -4
- package/lib/mjs/components/_classes/component/Component.form.d.ts +1112 -1
- package/lib/mjs/components/_classes/component/Component.js +10 -4
- package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +8 -0
- package/lib/mjs/components/_classes/component/editForm/utils.d.ts +2 -2
- package/lib/mjs/components/_classes/input/Input.d.ts +6 -2
- package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +1112 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +1112 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.js +2 -2
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -1
- package/lib/mjs/components/address/Address.form.d.ts +1112 -1
- package/lib/mjs/components/address/editForm/Address.edit.provider.d.ts +4 -1
- package/lib/mjs/components/button/Button.d.ts +1 -1
- package/lib/mjs/components/button/Button.form.d.ts +1112 -1
- package/lib/mjs/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/mjs/components/checkbox/Checkbox.form.d.ts +1112 -1
- package/lib/mjs/components/columns/Columns.d.ts +2 -0
- package/lib/mjs/components/columns/Columns.form.d.ts +1112 -1
- package/lib/mjs/components/container/Container.form.d.ts +1112 -1
- package/lib/mjs/components/content/Content.form.d.ts +1112 -1
- package/lib/mjs/components/currency/Currency.form.d.ts +1112 -1
- package/lib/mjs/components/datagrid/DataGrid.d.ts +3 -3
- package/lib/mjs/components/datagrid/DataGrid.form.d.ts +1112 -1
- package/lib/mjs/components/datagrid/DataGrid.js +2 -1
- package/lib/mjs/components/datagrid/fixtures/comp-with-allow-calculate-override.js +1 -1
- package/lib/mjs/components/datagrid/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/datagrid/fixtures/index.js +2 -1
- package/lib/mjs/components/datagrid/fixtures/two-comp-with-allow-calculate-override.d.ts +53 -0
- package/lib/mjs/components/datagrid/fixtures/two-comp-with-allow-calculate-override.js +102 -0
- package/lib/mjs/components/datamap/DataMap.d.ts +2 -1
- package/lib/mjs/components/datamap/DataMap.form.d.ts +1112 -1
- package/lib/mjs/components/datetime/DateTime.form.d.ts +1112 -1
- package/lib/mjs/components/day/Day.form.d.ts +1112 -1
- package/lib/mjs/components/editgrid/EditGrid.form.d.ts +1112 -1
- package/lib/mjs/components/editgrid/EditGrid.js +7 -4
- package/lib/mjs/components/editgrid/fixtures/formsWithEditGridAndConditions.d.ts +910 -0
- package/lib/mjs/components/editgrid/fixtures/formsWithEditGridAndConditions.js +921 -0
- package/lib/mjs/components/email/Email.form.d.ts +1112 -1
- package/lib/mjs/components/fieldset/Fieldset.form.d.ts +1112 -1
- package/lib/mjs/components/file/File.d.ts +2 -7
- package/lib/mjs/components/file/File.form.d.ts +1112 -1
- package/lib/mjs/components/file/editForm/File.edit.file.d.ts +4 -1
- package/lib/mjs/components/form/Form.d.ts +1 -1
- package/lib/mjs/components/form/Form.form.d.ts +1112 -1
- package/lib/mjs/components/hidden/Hidden.form.d.ts +1112 -1
- package/lib/mjs/components/html/HTML.d.ts +1 -0
- package/lib/mjs/components/html/HTML.form.d.ts +1112 -1
- package/lib/mjs/components/html/HTML.js +8 -0
- package/lib/mjs/components/number/Number.form.d.ts +1112 -1
- package/lib/mjs/components/panel/Panel.form.d.ts +1112 -1
- package/lib/mjs/components/password/Password.d.ts +2 -0
- package/lib/mjs/components/password/Password.form.d.ts +1112 -1
- package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +1112 -1
- package/lib/mjs/components/radio/Radio.d.ts +1 -1
- package/lib/mjs/components/radio/Radio.form.d.ts +1112 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +1112 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.js +3 -3
- package/lib/mjs/components/select/Select.d.ts +4 -5
- package/lib/mjs/components/select/Select.form.d.ts +1112 -1
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +2 -7
- package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +1112 -1
- package/lib/mjs/components/signature/Signature.form.d.ts +1112 -1
- package/lib/mjs/components/survey/Survey.d.ts +1 -0
- package/lib/mjs/components/survey/Survey.form.d.ts +1112 -1
- package/lib/mjs/components/table/Table.d.ts +1 -0
- package/lib/mjs/components/table/Table.form.d.ts +1112 -1
- package/lib/mjs/components/tabs/Tabs.form.d.ts +1112 -1
- package/lib/mjs/components/tags/Tags.form.d.ts +1112 -1
- package/lib/mjs/components/textarea/TextArea.d.ts +1 -1
- package/lib/mjs/components/textarea/TextArea.form.d.ts +1112 -1
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.d.ts +4 -1
- package/lib/mjs/components/textfield/TextField.form.d.ts +1112 -1
- package/lib/mjs/components/time/Time.form.d.ts +1112 -1
- package/lib/mjs/components/url/Url.form.d.ts +1112 -1
- package/lib/mjs/components/well/Well.form.d.ts +1112 -1
- package/lib/mjs/formio.form.d.ts +3 -3
- package/lib/mjs/formio.form.js +58 -44
- package/lib/mjs/providers/address/AddressProvider.d.ts +3 -3
- package/lib/mjs/providers/storage/s3.js +1 -6
- package/lib/mjs/providers/storage/xhr.d.ts +1 -1
- package/lib/mjs/translations/en.d.ts +2 -0
- package/lib/mjs/translations/en.js +2 -0
- 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 +4 -3
- package/lib/mjs/validator/Validator.d.ts +8 -3
- package/lib/mjs/validator/Validator.js +1 -1
- package/package.json +1 -1
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
|
-
|
|
21
|
+
declare const extendedFormio: typeof Formio;
|
|
22
22
|
import Licenses from './licenses';
|
|
23
|
-
import
|
|
24
|
-
export { Components, Displays, Providers, Rules, Widgets, Templates, Conjunctions, Operators, QuickRules, Transformers, ValueSources, Utils, Form, Formio, Licenses
|
|
23
|
+
import { Formio } from './Formio';
|
|
24
|
+
export { Components, Displays, Providers, Rules, Widgets, Templates, Conjunctions, Operators, QuickRules, Transformers, ValueSources, Utils, Form, extendedFormio as Formio, Licenses };
|
package/lib/cjs/formio.form.js
CHANGED
|
@@ -3,10 +3,9 @@ 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.
|
|
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;
|
|
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; } });
|
|
10
9
|
const components_1 = __importDefault(require("./components"));
|
|
11
10
|
const Components_1 = __importDefault(require("./components/Components"));
|
|
12
11
|
exports.Components = Components_1.default;
|
|
@@ -37,34 +36,34 @@ exports.Utils = utils_1.default;
|
|
|
37
36
|
const Evaluator_1 = __importDefault(require("./utils/Evaluator"));
|
|
38
37
|
const licenses_1 = __importDefault(require("./licenses"));
|
|
39
38
|
exports.Licenses = licenses_1.default;
|
|
40
|
-
const
|
|
41
|
-
exports.
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
const extendedFormio = Formio_1.Formio;
|
|
40
|
+
exports.Formio = extendedFormio;
|
|
41
|
+
// This is needed to maintain correct imports using the "dist" file.
|
|
42
|
+
extendedFormio.Components = Components_1.default;
|
|
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)
|
|
44
63
|
.then((modules) => {
|
|
45
|
-
|
|
64
|
+
extendedFormio.use(modules);
|
|
46
65
|
});
|
|
47
66
|
};
|
|
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);
|
|
68
67
|
/**
|
|
69
68
|
* Register a module
|
|
70
69
|
* @param {*} plugin
|
|
@@ -76,63 +75,63 @@ function registerModule(mod, defaultFn = null, options = {}) {
|
|
|
76
75
|
return;
|
|
77
76
|
}
|
|
78
77
|
for (const key of Object.keys(mod)) {
|
|
79
|
-
const current = mod.framework ||
|
|
78
|
+
const current = mod.framework || extendedFormio.Templates.framework || 'bootstrap';
|
|
80
79
|
switch (key) {
|
|
81
80
|
case 'options':
|
|
82
|
-
|
|
81
|
+
extendedFormio.options = lodash_1.default.merge(extendedFormio.options, mod.options);
|
|
83
82
|
break;
|
|
84
83
|
case 'templates':
|
|
85
84
|
for (const framework of Object.keys(mod.templates)) {
|
|
86
|
-
|
|
85
|
+
extendedFormio.Templates.extendTemplate(framework, mod.templates[framework]);
|
|
87
86
|
}
|
|
88
87
|
if (mod.templates[current]) {
|
|
89
|
-
|
|
88
|
+
extendedFormio.Templates.current = mod.templates[current];
|
|
90
89
|
}
|
|
91
90
|
break;
|
|
92
91
|
case 'components':
|
|
93
|
-
|
|
92
|
+
extendedFormio.Components.setComponents(mod.components);
|
|
94
93
|
break;
|
|
95
94
|
case 'framework':
|
|
96
|
-
|
|
95
|
+
extendedFormio.Templates.framework = mod.framework;
|
|
97
96
|
break;
|
|
98
97
|
case 'fetch':
|
|
99
98
|
for (const name of Object.keys(mod.fetch)) {
|
|
100
|
-
|
|
99
|
+
extendedFormio.registerPlugin(mod.fetch[name], name);
|
|
101
100
|
}
|
|
102
101
|
break;
|
|
103
102
|
case 'providers':
|
|
104
103
|
for (const type of Object.keys(mod.providers)) {
|
|
105
|
-
|
|
104
|
+
extendedFormio.Providers.addProviders(type, mod.providers[type]);
|
|
106
105
|
}
|
|
107
106
|
break;
|
|
108
107
|
case 'displays':
|
|
109
|
-
|
|
108
|
+
extendedFormio.Displays.addDisplays(mod.displays);
|
|
110
109
|
break;
|
|
111
110
|
case 'rules':
|
|
112
|
-
|
|
111
|
+
extendedFormio.Rules.addRules(mod.rules);
|
|
113
112
|
break;
|
|
114
113
|
case 'evaluator':
|
|
115
|
-
|
|
114
|
+
extendedFormio.Evaluator.registerEvaluator(mod.evaluator);
|
|
116
115
|
break;
|
|
117
116
|
case 'conjunctions':
|
|
118
|
-
|
|
117
|
+
extendedFormio.Conjunctions.addConjunctions(mod.conjunctions);
|
|
119
118
|
break;
|
|
120
119
|
case 'operators':
|
|
121
|
-
|
|
120
|
+
extendedFormio.Operators.addOperators(mod.operators);
|
|
122
121
|
break;
|
|
123
122
|
case 'quickRules':
|
|
124
|
-
|
|
123
|
+
extendedFormio.QuickRules.addQuickRules(mod.quickRules);
|
|
125
124
|
break;
|
|
126
125
|
case 'transformers':
|
|
127
|
-
|
|
126
|
+
extendedFormio.Transformers.addTransformers(mod.transformers);
|
|
128
127
|
break;
|
|
129
128
|
case 'valueSources':
|
|
130
|
-
|
|
129
|
+
extendedFormio.ValueSources.addValueSources(mod.valueSources);
|
|
131
130
|
break;
|
|
132
131
|
case 'library':
|
|
133
132
|
options.license
|
|
134
|
-
?
|
|
135
|
-
:
|
|
133
|
+
? extendedFormio.Licenses.addLicense(mod.library, options.license)
|
|
134
|
+
: extendedFormio.Licenses.removeLicense(mod.library);
|
|
136
135
|
break;
|
|
137
136
|
default:
|
|
138
137
|
if (defaultFn) {
|
|
@@ -166,4 +165,18 @@ exports.useModule = useModule;
|
|
|
166
165
|
* Formio.plugins(plugin1, options);
|
|
167
166
|
* Formio.plugins([plugin1, plugin2, etc], options);
|
|
168
167
|
*/
|
|
169
|
-
|
|
168
|
+
extendedFormio.use = useModule();
|
|
169
|
+
// Allow simple embedding.
|
|
170
|
+
extendedFormio.embedForm = (embed) => Form_1.default.embed(embed);
|
|
171
|
+
/**
|
|
172
|
+
* Factory that creates a new form based on the form parameters.
|
|
173
|
+
*
|
|
174
|
+
* @param element {HMTLElement} - The HTML Element to add this form to.
|
|
175
|
+
* @param form {string|Object} - The src of the form, or a form object.
|
|
176
|
+
* @param options {Object} - The options to create this form.
|
|
177
|
+
*
|
|
178
|
+
* @return {Promise} - When the form is instance is ready.
|
|
179
|
+
*/
|
|
180
|
+
extendedFormio.createForm = (...args) => {
|
|
181
|
+
return (new Form_1.default(...args)).ready;
|
|
182
|
+
};
|
|
@@ -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: {};
|
|
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): string;
|
|
12
|
+
getRequestOptions(options?: {}): {};
|
|
13
13
|
getRequestUrl(options?: {}): void;
|
|
14
14
|
makeRequest(options?: {}): any;
|
|
15
15
|
search(query: any, options?: {}): any;
|
|
@@ -1,27 +1,4 @@
|
|
|
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
|
-
};
|
|
25
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -37,11 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
15
|
const xhr_1 = __importDefault(require("./xhr"));
|
|
39
16
|
const util_1 = require("./util");
|
|
40
|
-
const
|
|
41
|
-
if (typeof AbortController === 'undefined') {
|
|
42
|
-
yield Promise.resolve().then(() => __importStar(require('abortcontroller-polyfill/dist/polyfill-patch-fetch')));
|
|
43
|
-
}
|
|
44
|
-
});
|
|
17
|
+
const AbortController = window.AbortController || require('abortcontroller-polyfill/dist/cjs-ponyfill');
|
|
45
18
|
function s3(formio) {
|
|
46
19
|
return {
|
|
47
20
|
uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback, multipartOptions) {
|
|
@@ -52,7 +25,6 @@ function s3(formio) {
|
|
|
52
25
|
if (response.signed) {
|
|
53
26
|
if (multipartOptions && Array.isArray(response.signed)) {
|
|
54
27
|
// patch abort callback
|
|
55
|
-
yield loadAbortControllerPolyfill();
|
|
56
28
|
const abortController = new AbortController();
|
|
57
29
|
const abortSignal = abortController.signal;
|
|
58
30
|
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): string;
|
|
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>;
|
|
@@ -62,5 +62,7 @@ declare namespace _default {
|
|
|
62
62
|
const previousButtonAriaLabel: string;
|
|
63
63
|
const nextButtonAriaLabel: string;
|
|
64
64
|
const submitButtonAriaLabel: string;
|
|
65
|
+
const reCaptchaTokenValidationError: string;
|
|
66
|
+
const reCaptchaTokenNotSpecifiedError: string;
|
|
65
67
|
}
|
|
66
68
|
export default _default;
|
|
@@ -64,4 +64,6 @@ exports.default = {
|
|
|
64
64
|
previousButtonAriaLabel: 'Previous button. Click to go back to the previous tab',
|
|
65
65
|
nextButtonAriaLabel: 'Next button. Click to go to the next tab',
|
|
66
66
|
submitButtonAriaLabel: 'Submit Form button. Click to submit the form',
|
|
67
|
+
reCaptchaTokenValidationError: 'ReCAPTCHA: Token validation error',
|
|
68
|
+
reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission',
|
|
67
69
|
};
|
|
@@ -11,7 +11,7 @@ declare namespace _default {
|
|
|
11
11
|
namespace additionalShortcuts {
|
|
12
12
|
const button: string[];
|
|
13
13
|
}
|
|
14
|
-
function getAlphaShortcuts():
|
|
14
|
+
function getAlphaShortcuts(): string[];
|
|
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 IsEmptyValue | typeof DateGreaterThan;
|
|
4
4
|
};
|
|
5
|
-
import
|
|
5
|
+
import IsEmptyValue from './IsEmptyValue';
|
|
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): boolean;
|
|
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: any;
|
|
362
|
+
export const firstNonNil: (...args: any[]) => any;
|
|
363
363
|
export namespace componentValueTypes {
|
|
364
364
|
const number: string;
|
|
365
365
|
const string: string;
|
|
@@ -373,4 +373,5 @@ 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';
|
|
376
377
|
export { jsonLogic, ConditionOperators, Evaluator, _ };
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
declare const instance: ValidationChecker;
|
|
2
2
|
export class ValidationChecker {
|
|
3
3
|
constructor(config?: {});
|
|
4
|
-
config:
|
|
4
|
+
config: {
|
|
5
|
+
db: null;
|
|
6
|
+
token: null;
|
|
7
|
+
form: null;
|
|
8
|
+
submission: null;
|
|
9
|
+
};
|
|
5
10
|
validators: {
|
|
6
11
|
required: {
|
|
7
12
|
key: string;
|
|
@@ -173,7 +178,7 @@ export class ValidationChecker {
|
|
|
173
178
|
validate(component: any, validatorName: any, value: any, data: any, index: any, row: any, async: any, conditionallyVisible: any, validationObj: any): false | {
|
|
174
179
|
message: string;
|
|
175
180
|
level: string;
|
|
176
|
-
path: any;
|
|
181
|
+
path: any[];
|
|
177
182
|
context: {
|
|
178
183
|
validator: any;
|
|
179
184
|
hasLabel: any;
|
|
@@ -187,7 +192,7 @@ export class ValidationChecker {
|
|
|
187
192
|
} | Promise<false | {
|
|
188
193
|
message: string;
|
|
189
194
|
level: string;
|
|
190
|
-
path: any;
|
|
195
|
+
path: any[];
|
|
191
196
|
context: {
|
|
192
197
|
validator: any;
|
|
193
198
|
hasLabel: any;
|
|
@@ -860,7 +860,7 @@ class ValidationChecker {
|
|
|
860
860
|
}
|
|
861
861
|
validate(component, validatorName, value, data, index, row, async, conditionallyVisible, validationObj) {
|
|
862
862
|
// Skip validation for conditionally hidden components
|
|
863
|
-
if (!conditionallyVisible) {
|
|
863
|
+
if (!conditionallyVisible && !lodash_1.default.get(component.component, 'validateWhenHidden', false)) {
|
|
864
864
|
return false;
|
|
865
865
|
}
|
|
866
866
|
const validator = this.validators[validatorName];
|
package/lib/mjs/Form.js
CHANGED
|
@@ -97,9 +97,7 @@ export default class Form extends Element {
|
|
|
97
97
|
this.element.appendChild(this.loader);
|
|
98
98
|
}
|
|
99
99
|
else if (this.loader) {
|
|
100
|
-
|
|
101
|
-
this.element.removeChild(this.loader);
|
|
102
|
-
}
|
|
100
|
+
this.element.removeChild(this.loader);
|
|
103
101
|
this.loader = null;
|
|
104
102
|
}
|
|
105
103
|
}
|
|
@@ -335,18 +333,3 @@ export default class Form extends Element {
|
|
|
335
333
|
delete this.ready;
|
|
336
334
|
}
|
|
337
335
|
}
|
|
338
|
-
// Allow simple embedding.
|
|
339
|
-
Formio.embedForm = (embed) => Form.embed(embed);
|
|
340
|
-
/**
|
|
341
|
-
* Factory that creates a new form based on the form parameters.
|
|
342
|
-
*
|
|
343
|
-
* @param element {HMTLElement} - The HTML Element to add this form to.
|
|
344
|
-
* @param form {string|Object} - The src of the form, or a form object.
|
|
345
|
-
* @param options {Object} - The options to create this form.
|
|
346
|
-
*
|
|
347
|
-
* @return {Promise} - When the form is instance is ready.
|
|
348
|
-
*/
|
|
349
|
-
Formio.createForm = (...args) => {
|
|
350
|
-
return (new Form(...args)).ready;
|
|
351
|
-
};
|
|
352
|
-
Formio.Form = Form;
|
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: boolean;
|
|
8
|
+
sideBarScrollOffset: number;
|
|
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: any;
|
|
96
96
|
preview: Webform | null | undefined;
|
|
97
97
|
componentEdit: any;
|
|
98
98
|
dialog: any;
|
|
99
|
-
updateComponentKey(data: any):
|
|
99
|
+
updateComponentKey(data: any): string;
|
|
100
100
|
moveComponent(component: any): void;
|
|
101
101
|
selectedComponent: any;
|
|
102
102
|
moveHandler: (e: any) => void;
|
package/lib/mjs/Wizard.d.ts
CHANGED
|
@@ -14,8 +14,7 @@ declare class Wizard extends Webform {
|
|
|
14
14
|
lastPromise: Promise<void>;
|
|
15
15
|
enabledIndex: number;
|
|
16
16
|
editMode: boolean;
|
|
17
|
-
originalOptions:
|
|
18
|
-
isLastPage(): any;
|
|
17
|
+
originalOptions: {};
|
|
19
18
|
getPages(args?: {}): any[];
|
|
20
19
|
get hasExtraPages(): boolean;
|
|
21
20
|
get localData(): any;
|
|
@@ -11,8 +11,20 @@ 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
|
-
|
|
14
|
+
get pages(): {
|
|
15
|
+
title: string;
|
|
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;
|
|
16
28
|
set form(arg: {
|
|
17
29
|
components: {
|
|
18
30
|
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): boolean;
|
|
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): boolean;
|
|
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): boolean;
|
|
170
170
|
logicVariablesTable(additional: any): {
|
|
171
171
|
type: string;
|
|
172
172
|
tag: string;
|
|
@@ -129,7 +129,12 @@ declare class Component extends Element {
|
|
|
129
129
|
_parentVisible: any;
|
|
130
130
|
_visible: any;
|
|
131
131
|
_parentDisabled: boolean;
|
|
132
|
-
triggerChange: (...args: any[]) =>
|
|
132
|
+
triggerChange: (...args: any[]) => {
|
|
133
|
+
instance: Component;
|
|
134
|
+
component: any;
|
|
135
|
+
value: any;
|
|
136
|
+
flags: any;
|
|
137
|
+
} | undefined;
|
|
133
138
|
/**
|
|
134
139
|
* Used to trigger a redraw event within this component.
|
|
135
140
|
*
|
|
@@ -573,7 +578,7 @@ declare class Component extends Element {
|
|
|
573
578
|
deleteValue(): void;
|
|
574
579
|
getCustomDefaultValue(defaultValue: any): any;
|
|
575
580
|
get shouldAddDefaultValue(): any;
|
|
576
|
-
get defaultValue():
|
|
581
|
+
get defaultValue(): null;
|
|
577
582
|
/**
|
|
578
583
|
* Get the input value of this component.
|
|
579
584
|
*
|
|
@@ -723,8 +728,8 @@ declare class Component extends Element {
|
|
|
723
728
|
checkData(data: any, flags: any, row: any): boolean;
|
|
724
729
|
checkModal(isValid?: boolean, dirty?: boolean): void;
|
|
725
730
|
get validationValue(): any;
|
|
726
|
-
isEmpty(value?: any):
|
|
727
|
-
isEqual(valueA: any, valueB?: any):
|
|
731
|
+
isEmpty(value?: any): boolean;
|
|
732
|
+
isEqual(valueA: any, valueB?: any): boolean;
|
|
728
733
|
/**
|
|
729
734
|
* Check if a component is eligible for multiple validation
|
|
730
735
|
*
|