@formio/js 5.0.0-rc.18 → 5.0.0-rc.20
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/formio.builder.css +14 -22
- package/dist/formio.builder.min.css +1 -1
- package/dist/formio.embed.css +1 -2
- package/dist/formio.embed.js +2 -2
- package/dist/formio.embed.min.css +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.css +10 -2
- package/dist/formio.form.js +333 -361
- package/dist/formio.form.min.css +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +3 -8
- package/dist/formio.full.css +14 -22
- package/dist/formio.full.js +353 -370
- package/dist/formio.full.min.css +1 -1
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +3 -8
- package/dist/formio.js +208 -121
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +2 -7
- package/dist/formio.utils.js +220 -13
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +2 -7
- package/lib/cjs/CDN.js +1 -1
- package/lib/cjs/Element.js +7 -2
- package/lib/cjs/Embed.js +1 -1
- package/lib/cjs/Form.d.ts +8 -5
- package/lib/cjs/Form.js +52 -10
- package/lib/cjs/PDF.d.ts +11 -3
- package/lib/cjs/PDF.js +4 -5
- package/lib/cjs/PDFBuilder.js +2 -3
- package/lib/cjs/Webform.d.ts +4 -7
- package/lib/cjs/Webform.js +40 -119
- package/lib/cjs/WebformBuilder.d.ts +6 -1
- package/lib/cjs/WebformBuilder.js +104 -64
- package/lib/cjs/Wizard.d.ts +8 -5
- package/lib/cjs/Wizard.js +14 -14
- package/lib/cjs/WizardBuilder.d.ts +6 -4
- package/lib/cjs/WizardBuilder.js +20 -3
- package/lib/cjs/addons/FormioAddon.d.ts +1 -1
- package/lib/cjs/addons/FormioAddon.js +1 -2
- package/lib/cjs/components/_classes/component/Component.d.ts +17 -8
- package/lib/cjs/components/_classes/component/Component.js +52 -18
- package/lib/cjs/components/_classes/input/Input.d.ts +1 -1
- package/lib/cjs/components/_classes/input/Input.js +1 -2
- package/lib/cjs/components/_classes/list/ListComponent.d.ts +4 -0
- package/lib/cjs/components/_classes/list/ListComponent.js +43 -6
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +1 -0
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +10 -4
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +5 -2
- package/lib/cjs/components/_classes/nested/NestedComponent.js +11 -12
- package/lib/cjs/components/address/Address.d.ts +8 -0
- package/lib/cjs/components/button/Button.js +2 -3
- package/lib/cjs/components/checkbox/Checkbox.d.ts +13 -0
- package/lib/cjs/components/checkbox/Checkbox.js +17 -5
- package/lib/cjs/components/columns/Columns.d.ts +1 -0
- package/lib/cjs/components/columns/Columns.js +1 -0
- package/lib/cjs/components/container/Container.d.ts +1 -0
- package/lib/cjs/components/container/Container.js +1 -0
- package/lib/cjs/components/content/Content.d.ts +1 -0
- package/lib/cjs/components/content/Content.js +1 -2
- package/lib/cjs/components/currency/editForm/Currency.edit.data.d.ts +14 -2
- package/lib/cjs/components/currency/editForm/Currency.edit.data.js +4 -0
- package/lib/cjs/components/currency/editForm/Currency.edit.display.js +4 -0
- package/lib/cjs/components/datagrid/DataGrid.d.ts +1 -0
- package/lib/cjs/components/datagrid/DataGrid.js +8 -1
- package/lib/cjs/components/datamap/DataMap.js +1 -0
- package/lib/cjs/components/datetime/DateTime.d.ts +4 -0
- package/lib/cjs/components/datetime/DateTime.js +21 -1
- package/lib/cjs/components/day/Day.d.ts +1 -1
- package/lib/cjs/components/day/Day.js +22 -6
- package/lib/cjs/components/day/fixtures/comp3.js +2 -2
- package/lib/cjs/components/editgrid/EditGrid.d.ts +4 -3
- package/lib/cjs/components/editgrid/EditGrid.js +11 -6
- package/lib/cjs/components/editgrid/fixtures/comp-with-custom-default-value.d.ts +190 -0
- package/lib/cjs/components/editgrid/fixtures/comp-with-custom-default-value.js +227 -0
- package/lib/cjs/components/editgrid/fixtures/comp15.d.ts +54 -0
- package/lib/cjs/components/editgrid/fixtures/comp15.js +51 -0
- package/lib/cjs/components/editgrid/fixtures/index.d.ts +3 -1
- package/lib/cjs/components/editgrid/fixtures/index.js +5 -1
- package/lib/cjs/components/fieldset/Fieldset.d.ts +1 -0
- package/lib/cjs/components/fieldset/Fieldset.js +1 -0
- package/lib/cjs/components/file/File.d.ts +7 -5
- package/lib/cjs/components/file/File.js +26 -9
- package/lib/cjs/components/file/editForm/File.edit.file.d.ts +62 -0
- package/lib/cjs/components/file/editForm/File.edit.file.js +29 -2
- package/lib/cjs/components/form/Form.d.ts +3 -0
- package/lib/cjs/components/form/Form.js +9 -10
- package/lib/cjs/components/hidden/Hidden.d.ts +1 -0
- package/lib/cjs/components/hidden/Hidden.js +1 -0
- package/lib/cjs/components/html/HTML.d.ts +1 -0
- package/lib/cjs/components/html/HTML.js +1 -0
- package/lib/cjs/components/number/Number.d.ts +5 -1
- package/lib/cjs/components/number/Number.js +24 -7
- package/lib/cjs/components/phonenumber/PhoneNumber.form.js +9 -0
- package/lib/cjs/components/radio/Radio.d.ts +5 -3
- package/lib/cjs/components/radio/Radio.js +59 -18
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.js +4 -5
- package/lib/cjs/components/resource/Resource.d.ts +7 -0
- package/lib/cjs/components/resource/Resource.js +0 -1
- package/lib/cjs/components/resource/editForm/Resource.edit.display.js +1 -1
- package/lib/cjs/components/select/Select.d.ts +7 -5
- package/lib/cjs/components/select/Select.js +15 -49
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +12 -0
- package/lib/cjs/components/selectboxes/SelectBoxes.js +53 -25
- package/lib/cjs/components/selectboxes/fixtures/comp4.d.ts +30 -27
- package/lib/cjs/components/selectboxes/fixtures/comp4.js +47 -32
- package/lib/cjs/components/selectboxes/fixtures/comp6.d.ts +14 -0
- package/lib/cjs/components/selectboxes/fixtures/comp6.js +15 -0
- package/lib/cjs/components/selectboxes/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/selectboxes/fixtures/index.js +3 -1
- package/lib/cjs/components/signature/Signature.d.ts +1 -1
- package/lib/cjs/components/signature/Signature.js +8 -3
- package/lib/cjs/components/survey/Survey.js +3 -0
- package/lib/cjs/components/table/Table.d.ts +1 -0
- package/lib/cjs/components/table/Table.js +1 -0
- package/lib/cjs/components/tabs/Tabs.d.ts +1 -0
- package/lib/cjs/components/tabs/Tabs.js +1 -0
- package/lib/cjs/components/tags/Tags.js +3 -0
- package/lib/cjs/components/textarea/TextArea.d.ts +3 -2
- package/lib/cjs/components/textarea/TextArea.js +4 -5
- package/lib/cjs/components/textarea/fixtures/comp4.d.ts +30 -0
- package/lib/cjs/components/textarea/fixtures/comp4.js +27 -0
- package/lib/cjs/components/textarea/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/textarea/fixtures/index.js +3 -1
- package/lib/cjs/components/textfield/TextField.d.ts +1 -0
- package/lib/cjs/components/textfield/TextField.js +5 -3
- package/lib/cjs/components/time/Time.d.ts +4 -0
- package/lib/cjs/components/time/Time.js +6 -1
- package/lib/cjs/components/tree/Tree.d.ts +5 -4
- package/lib/cjs/components/tree/Tree.form.js +5 -0
- package/lib/cjs/components/tree/Tree.js +8 -9
- package/lib/cjs/components/tree/editForm/Tree.edit.display.d.ts +9 -0
- package/lib/cjs/components/tree/editForm/Tree.edit.display.js +12 -0
- package/lib/cjs/components/well/Well.d.ts +1 -0
- package/lib/cjs/components/well/Well.js +1 -0
- package/lib/cjs/providers/Providers.d.ts +31 -11
- package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +2 -2
- package/lib/cjs/providers/address/GoogleAddressProvider.js +2 -3
- package/lib/cjs/providers/processor/fileProcessor.d.ts +1 -1
- package/lib/cjs/providers/processor/fileProcessor.js +1 -5
- package/lib/cjs/providers/storage/azure.d.ts +10 -1
- package/lib/cjs/providers/storage/azure.js +7 -2
- package/lib/cjs/providers/storage/base64.d.ts +2 -2
- package/lib/cjs/providers/storage/base64.js +2 -6
- package/lib/cjs/providers/storage/dropbox.d.ts +2 -2
- package/lib/cjs/providers/storage/dropbox.js +2 -6
- package/lib/cjs/providers/storage/googleDrive.d.ts +3 -2
- package/lib/cjs/providers/storage/googleDrive.js +6 -6
- package/lib/cjs/providers/storage/indexeddb.d.ts +3 -3
- package/lib/cjs/providers/storage/indexeddb.js +9 -13
- package/lib/cjs/providers/storage/s3.d.ts +11 -1
- package/lib/cjs/providers/storage/s3.js +5 -2
- package/lib/cjs/providers/storage/uploadAdapter.js +1 -5
- package/lib/cjs/providers/storage/url.d.ts +2 -2
- package/lib/cjs/providers/storage/url.js +12 -8
- package/lib/cjs/providers/storage/xhr.d.ts +1 -1
- package/lib/cjs/providers/storage/xhr.js +1 -2
- package/lib/cjs/templates/index.d.ts +226 -1
- package/lib/cjs/utils/Evaluator.js +4 -33
- package/lib/cjs/utils/i18n.d.ts +16 -0
- package/lib/cjs/utils/i18n.js +88 -0
- package/lib/cjs/utils/utils.d.ts +1 -1
- package/lib/cjs/utils/utils.js +8 -9
- package/lib/cjs/validator/Validator.d.ts +30 -2
- package/lib/cjs/validator/Validator.js +32 -9
- package/lib/cjs/validator/rules/Select.js +1 -2
- package/lib/cjs/validator/rules/Unique.d.ts +1 -1
- package/lib/cjs/validator/rules/Unique.js +1 -2
- package/lib/cjs/widgets/CalendarWidget.d.ts +1 -0
- package/lib/cjs/widgets/InputWidget.d.ts +1 -1
- package/lib/cjs/widgets/InputWidget.js +1 -2
- package/lib/mjs/CDN.js +1 -1
- package/lib/mjs/Element.js +6 -2
- package/lib/mjs/Embed.js +4 -1
- package/lib/mjs/Form.d.ts +8 -5
- package/lib/mjs/Form.js +52 -10
- package/lib/mjs/PDF.d.ts +11 -3
- package/lib/mjs/PDF.js +4 -5
- package/lib/mjs/PDFBuilder.js +2 -3
- package/lib/mjs/Webform.d.ts +4 -7
- package/lib/mjs/Webform.js +40 -122
- package/lib/mjs/WebformBuilder.d.ts +6 -1
- package/lib/mjs/WebformBuilder.js +102 -64
- package/lib/mjs/Wizard.d.ts +8 -5
- package/lib/mjs/Wizard.js +14 -14
- package/lib/mjs/WizardBuilder.d.ts +6 -4
- package/lib/mjs/WizardBuilder.js +20 -3
- package/lib/mjs/addons/FormioAddon.d.ts +1 -1
- package/lib/mjs/addons/FormioAddon.js +1 -2
- package/lib/mjs/components/_classes/component/Component.d.ts +17 -8
- package/lib/mjs/components/_classes/component/Component.js +52 -18
- package/lib/mjs/components/_classes/input/Input.d.ts +1 -1
- package/lib/mjs/components/_classes/input/Input.js +1 -2
- package/lib/mjs/components/_classes/list/ListComponent.d.ts +4 -0
- package/lib/mjs/components/_classes/list/ListComponent.js +43 -5
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +1 -0
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +10 -4
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +5 -2
- package/lib/mjs/components/_classes/nested/NestedComponent.js +11 -12
- package/lib/mjs/components/address/Address.d.ts +8 -0
- package/lib/mjs/components/button/Button.js +2 -3
- package/lib/mjs/components/checkbox/Checkbox.d.ts +13 -0
- package/lib/mjs/components/checkbox/Checkbox.js +21 -5
- package/lib/mjs/components/columns/Columns.d.ts +1 -0
- package/lib/mjs/components/columns/Columns.js +1 -0
- package/lib/mjs/components/container/Container.d.ts +1 -0
- package/lib/mjs/components/container/Container.js +1 -0
- package/lib/mjs/components/content/Content.d.ts +1 -0
- package/lib/mjs/components/content/Content.js +1 -2
- package/lib/mjs/components/currency/editForm/Currency.edit.data.d.ts +14 -2
- package/lib/mjs/components/currency/editForm/Currency.edit.data.js +4 -0
- package/lib/mjs/components/currency/editForm/Currency.edit.display.js +4 -0
- package/lib/mjs/components/datagrid/DataGrid.d.ts +1 -0
- package/lib/mjs/components/datagrid/DataGrid.js +8 -1
- package/lib/mjs/components/datamap/DataMap.js +1 -0
- package/lib/mjs/components/datetime/DateTime.d.ts +4 -0
- package/lib/mjs/components/datetime/DateTime.js +28 -1
- package/lib/mjs/components/day/Day.d.ts +1 -1
- package/lib/mjs/components/day/Day.js +25 -6
- package/lib/mjs/components/day/fixtures/comp3.js +2 -2
- package/lib/mjs/components/editgrid/EditGrid.d.ts +4 -3
- package/lib/mjs/components/editgrid/EditGrid.js +11 -6
- package/lib/mjs/components/editgrid/fixtures/comp-with-custom-default-value.d.ts +190 -0
- package/lib/mjs/components/editgrid/fixtures/comp-with-custom-default-value.js +225 -0
- package/lib/mjs/components/editgrid/fixtures/comp15.d.ts +54 -0
- package/lib/mjs/components/editgrid/fixtures/comp15.js +49 -0
- package/lib/mjs/components/editgrid/fixtures/index.d.ts +3 -1
- package/lib/mjs/components/editgrid/fixtures/index.js +3 -1
- package/lib/mjs/components/fieldset/Fieldset.d.ts +1 -0
- package/lib/mjs/components/fieldset/Fieldset.js +1 -0
- package/lib/mjs/components/file/File.d.ts +7 -5
- package/lib/mjs/components/file/File.js +29 -9
- package/lib/mjs/components/file/editForm/File.edit.file.d.ts +62 -0
- package/lib/mjs/components/file/editForm/File.edit.file.js +29 -2
- package/lib/mjs/components/form/Form.d.ts +3 -0
- package/lib/mjs/components/form/Form.js +9 -10
- package/lib/mjs/components/hidden/Hidden.d.ts +1 -0
- package/lib/mjs/components/hidden/Hidden.js +1 -0
- package/lib/mjs/components/html/HTML.d.ts +1 -0
- package/lib/mjs/components/html/HTML.js +1 -0
- package/lib/mjs/components/number/Number.d.ts +5 -1
- package/lib/mjs/components/number/Number.js +24 -7
- package/lib/mjs/components/phonenumber/PhoneNumber.form.js +9 -0
- package/lib/mjs/components/radio/Radio.d.ts +5 -3
- package/lib/mjs/components/radio/Radio.js +59 -18
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.js +4 -5
- package/lib/mjs/components/resource/Resource.d.ts +7 -0
- package/lib/mjs/components/resource/Resource.js +0 -1
- package/lib/mjs/components/resource/editForm/Resource.edit.display.js +1 -1
- package/lib/mjs/components/select/Select.d.ts +7 -5
- package/lib/mjs/components/select/Select.js +18 -49
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +12 -0
- package/lib/mjs/components/selectboxes/SelectBoxes.js +56 -25
- package/lib/mjs/components/selectboxes/fixtures/comp4.d.ts +30 -27
- package/lib/mjs/components/selectboxes/fixtures/comp4.js +47 -32
- package/lib/mjs/components/selectboxes/fixtures/comp6.d.ts +14 -0
- package/lib/mjs/components/selectboxes/fixtures/comp6.js +13 -0
- package/lib/mjs/components/selectboxes/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/selectboxes/fixtures/index.js +2 -1
- package/lib/mjs/components/signature/Signature.d.ts +1 -1
- package/lib/mjs/components/signature/Signature.js +11 -3
- package/lib/mjs/components/survey/Survey.js +6 -0
- package/lib/mjs/components/table/Table.d.ts +1 -0
- package/lib/mjs/components/table/Table.js +1 -0
- package/lib/mjs/components/tabs/Tabs.d.ts +1 -0
- package/lib/mjs/components/tabs/Tabs.js +1 -0
- package/lib/mjs/components/tags/Tags.js +6 -0
- package/lib/mjs/components/textarea/TextArea.d.ts +3 -2
- package/lib/mjs/components/textarea/TextArea.js +4 -5
- package/lib/mjs/components/textarea/fixtures/comp4.d.ts +30 -0
- package/lib/mjs/components/textarea/fixtures/comp4.js +25 -0
- package/lib/mjs/components/textarea/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/textarea/fixtures/index.js +2 -1
- package/lib/mjs/components/textfield/TextField.d.ts +1 -0
- package/lib/mjs/components/textfield/TextField.js +8 -3
- package/lib/mjs/components/time/Time.d.ts +4 -0
- package/lib/mjs/components/time/Time.js +12 -1
- package/lib/mjs/components/tree/Tree.d.ts +5 -4
- package/lib/mjs/components/tree/Tree.form.js +5 -0
- package/lib/mjs/components/tree/Tree.js +8 -9
- package/lib/mjs/components/tree/editForm/Tree.edit.display.d.ts +9 -0
- package/lib/mjs/components/tree/editForm/Tree.edit.display.js +10 -0
- package/lib/mjs/components/well/Well.d.ts +1 -0
- package/lib/mjs/components/well/Well.js +1 -0
- package/lib/mjs/providers/Providers.d.ts +31 -11
- package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +2 -2
- package/lib/mjs/providers/address/GoogleAddressProvider.js +2 -3
- package/lib/mjs/providers/processor/fileProcessor.d.ts +1 -1
- package/lib/mjs/providers/processor/fileProcessor.js +1 -2
- package/lib/mjs/providers/storage/azure.d.ts +10 -1
- package/lib/mjs/providers/storage/azure.js +7 -2
- package/lib/mjs/providers/storage/base64.d.ts +2 -2
- package/lib/mjs/providers/storage/base64.js +2 -3
- package/lib/mjs/providers/storage/dropbox.d.ts +2 -2
- package/lib/mjs/providers/storage/dropbox.js +2 -3
- package/lib/mjs/providers/storage/googleDrive.d.ts +3 -2
- package/lib/mjs/providers/storage/googleDrive.js +6 -3
- package/lib/mjs/providers/storage/indexeddb.d.ts +3 -3
- package/lib/mjs/providers/storage/indexeddb.js +9 -10
- package/lib/mjs/providers/storage/s3.d.ts +11 -1
- package/lib/mjs/providers/storage/s3.js +5 -2
- package/lib/mjs/providers/storage/uploadAdapter.js +1 -2
- package/lib/mjs/providers/storage/url.d.ts +2 -2
- package/lib/mjs/providers/storage/url.js +12 -5
- package/lib/mjs/providers/storage/xhr.d.ts +1 -1
- package/lib/mjs/providers/storage/xhr.js +1 -2
- package/lib/mjs/templates/index.d.ts +226 -1
- package/lib/mjs/utils/Evaluator.js +4 -33
- package/lib/mjs/utils/i18n.d.ts +16 -0
- package/lib/mjs/utils/i18n.js +81 -0
- package/lib/mjs/utils/utils.d.ts +1 -1
- package/lib/mjs/utils/utils.js +8 -9
- package/lib/mjs/validator/Validator.d.ts +30 -2
- package/lib/mjs/validator/Validator.js +31 -9
- package/lib/mjs/validator/rules/Select.js +1 -2
- package/lib/mjs/validator/rules/Unique.d.ts +1 -1
- package/lib/mjs/validator/rules/Unique.js +1 -2
- package/lib/mjs/widgets/CalendarWidget.d.ts +1 -0
- package/lib/mjs/widgets/InputWidget.d.ts +1 -1
- package/lib/mjs/widgets/InputWidget.js +1 -2
- package/package.json +24 -25
@@ -7,7 +7,6 @@ const lodash_1 = __importDefault(require("lodash"));
|
|
7
7
|
const Formio_1 = require("../../Formio");
|
8
8
|
const ListComponent_1 = __importDefault(require("../_classes/list/ListComponent"));
|
9
9
|
const Form_1 = __importDefault(require("../../Form"));
|
10
|
-
const native_promise_only_1 = __importDefault(require("native-promise-only"));
|
11
10
|
const utils_1 = require("../../utils/utils");
|
12
11
|
const ChoicesWrapper_1 = __importDefault(require("../../utils/ChoicesWrapper"));
|
13
12
|
class SelectComponent extends ListComponent_1.default {
|
@@ -59,6 +58,11 @@ class SelectComponent extends ListComponent_1.default {
|
|
59
58
|
schema: SelectComponent.schema()
|
60
59
|
};
|
61
60
|
}
|
61
|
+
static get serverConditionSettings() {
|
62
|
+
return Object.assign(Object.assign({}, super.serverConditionSettings), { valueComponent(classComp) {
|
63
|
+
return Object.assign(Object.assign({}, classComp), { type: 'select' });
|
64
|
+
} });
|
65
|
+
}
|
62
66
|
init() {
|
63
67
|
super.init();
|
64
68
|
this.templateData = {};
|
@@ -74,7 +78,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
74
78
|
if (typeof this.itemsLoadedResolve === 'function') {
|
75
79
|
this.itemsLoadedResolve();
|
76
80
|
}
|
77
|
-
this.itemsLoaded = new
|
81
|
+
this.itemsLoaded = new Promise((resolve) => {
|
78
82
|
this.itemsLoadedResolve = resolve;
|
79
83
|
});
|
80
84
|
if (args.length) {
|
@@ -94,7 +98,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
94
98
|
}
|
95
99
|
// If this component has been activated.//
|
96
100
|
this.activated = false;
|
97
|
-
this.itemsLoaded = new
|
101
|
+
this.itemsLoaded = new Promise((resolve) => {
|
98
102
|
this.itemsLoadedResolve = resolve;
|
99
103
|
});
|
100
104
|
if (this.isHtmlRenderMode()) {
|
@@ -109,7 +113,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
109
113
|
if (this.root &&
|
110
114
|
this.root.submissionSet &&
|
111
115
|
!this.attached) {
|
112
|
-
return
|
116
|
+
return Promise.resolve();
|
113
117
|
}
|
114
118
|
return this.itemsLoaded;
|
115
119
|
}
|
@@ -194,7 +198,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
194
198
|
const value = (typeof itemLabel === 'string') ? this.t(itemLabel, { _userInput: true }) : itemLabel;
|
195
199
|
return this.sanitize(value, this.shouldSanitizeValue);
|
196
200
|
}
|
197
|
-
if (this.component.multiple ? this.dataValue.find((val) => value === val) : (this.dataValue === value)) {
|
201
|
+
if (this.component.multiple && lodash_1.default.isArray(this.dataValue) ? this.dataValue.find((val) => value === val) : (this.dataValue === value)) {
|
198
202
|
const selectData = this.selectData;
|
199
203
|
if (selectData) {
|
200
204
|
const templateValue = this.component.reference && (value === null || value === void 0 ? void 0 : value._id) ? value._id.toString() : value;
|
@@ -437,48 +441,9 @@ class SelectComponent extends ListComponent_1.default {
|
|
437
441
|
}
|
438
442
|
return defaultValue;
|
439
443
|
}
|
440
|
-
getTemplateKeys() {
|
441
|
-
this.templateKeys = [];
|
442
|
-
if (this.options.readOnly && this.component.template) {
|
443
|
-
const keys = this.component.template.match(/({{\s*(.*?)\s*}})/g);
|
444
|
-
if (keys) {
|
445
|
-
keys.forEach((key) => {
|
446
|
-
const propKey = key.match(/{{\s*item\.(.*?)\s*}}/);
|
447
|
-
if (propKey && propKey.length > 1) {
|
448
|
-
this.templateKeys.push(propKey[1]);
|
449
|
-
}
|
450
|
-
});
|
451
|
-
}
|
452
|
-
}
|
453
|
-
}
|
454
444
|
get loadingError() {
|
455
445
|
return !this.component.refreshOn && !this.component.refreshOnBlur && this.networkError;
|
456
446
|
}
|
457
|
-
get selectData() {
|
458
|
-
const selectData = lodash_1.default.get(this.root, 'submission.metadata.selectData', {});
|
459
|
-
return lodash_1.default.get(selectData, this.path);
|
460
|
-
}
|
461
|
-
get shouldLoad() {
|
462
|
-
if (this.loadingError) {
|
463
|
-
return false;
|
464
|
-
}
|
465
|
-
// Live forms should always load.
|
466
|
-
if (!this.options.readOnly) {
|
467
|
-
return true;
|
468
|
-
}
|
469
|
-
// If there are template keys, then we need to see if we have the data.
|
470
|
-
if (this.templateKeys && this.templateKeys.length) {
|
471
|
-
// See if we already have the data we need.
|
472
|
-
const dataValue = this.dataValue;
|
473
|
-
const selectData = this.selectData;
|
474
|
-
return this.templateKeys.reduce((shouldLoad, key) => {
|
475
|
-
const hasValue = lodash_1.default.has(dataValue, key) || lodash_1.default.has(selectData, key);
|
476
|
-
return shouldLoad || !hasValue;
|
477
|
-
}, false);
|
478
|
-
}
|
479
|
-
// Return that we should load.
|
480
|
-
return true;
|
481
|
-
}
|
482
447
|
loadItems(url, search, headers, options, method, body) {
|
483
448
|
options = options || {};
|
484
449
|
// See if we should load items or not.
|
@@ -911,7 +876,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
911
876
|
const items = this.choices._store.activeItems;
|
912
877
|
if (!items.length) {
|
913
878
|
this.choices._addItem({
|
914
|
-
value:
|
879
|
+
value: '',
|
915
880
|
label: placeholderValue,
|
916
881
|
choiceId: 0,
|
917
882
|
groupId: -1,
|
@@ -1082,7 +1047,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
1082
1047
|
if (this.component.multiple) {
|
1083
1048
|
templateData = {};
|
1084
1049
|
const dataValue = this.dataValue;
|
1085
|
-
if (dataValue && dataValue.length) {
|
1050
|
+
if (dataValue && lodash_1.default.isArray(dataValue) && dataValue.length) {
|
1086
1051
|
dataValue.forEach((dataValueItem) => {
|
1087
1052
|
const dataValueItemValue = this.component.reference ? dataValueItem._id.toString() : dataValueItem;
|
1088
1053
|
templateData[dataValueItemValue] = this.templateData[dataValueItemValue];
|
@@ -1150,7 +1115,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
1150
1115
|
}
|
1151
1116
|
setValue(value, flags = {}) {
|
1152
1117
|
const previousValue = this.dataValue;
|
1153
|
-
if (this.component.widget === 'html5' && (lodash_1.default.isEqual(value, previousValue) || lodash_1.default.isEqual(previousValue, {}) && lodash_1.default.isEqual(flags, {}))) {
|
1118
|
+
if (this.component.widget === 'html5' && (lodash_1.default.isEqual(value, previousValue) || lodash_1.default.isEqual(previousValue, {}) && lodash_1.default.isEqual(flags, {})) && !flags.fromSubmission) {
|
1154
1119
|
return false;
|
1155
1120
|
}
|
1156
1121
|
const changed = this.updateValue(value, flags);
|
@@ -1226,7 +1191,8 @@ class SelectComponent extends ListComponent_1.default {
|
|
1226
1191
|
else {
|
1227
1192
|
if (hasValue) {
|
1228
1193
|
const values = Array.isArray(value) ? value : [value];
|
1229
|
-
if (!lodash_1.default.isEqual(this.dataValue, this.defaultValue) && this.selectOptions.length < 2
|
1194
|
+
if (!lodash_1.default.isEqual(this.dataValue, this.defaultValue) && this.selectOptions.length < 2
|
1195
|
+
|| (this.selectData && flags.fromSubmission)) {
|
1230
1196
|
const { value, label } = this.selectValueAndLabel(this.dataValue);
|
1231
1197
|
this.addOption(value, label);
|
1232
1198
|
}
|
@@ -1254,7 +1220,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
1254
1220
|
}
|
1255
1221
|
}
|
1256
1222
|
get itemsLoaded() {
|
1257
|
-
return this._itemsLoaded ||
|
1223
|
+
return this._itemsLoaded || Promise.resolve();
|
1258
1224
|
}
|
1259
1225
|
set itemsLoaded(promise) {
|
1260
1226
|
this._itemsLoaded = promise;
|
@@ -1,4 +1,16 @@
|
|
1
1
|
export default class SelectBoxesComponent extends RadioComponent {
|
2
|
+
static get serverConditionSettings(): {
|
3
|
+
valueComponent(classComp: any): {
|
4
|
+
type: string;
|
5
|
+
dataSrc: string;
|
6
|
+
valueProperty: string;
|
7
|
+
valueType: string;
|
8
|
+
data: {
|
9
|
+
custom: string;
|
10
|
+
};
|
11
|
+
};
|
12
|
+
operators: string[];
|
13
|
+
};
|
2
14
|
constructor(...args: any[]);
|
3
15
|
validators: string[];
|
4
16
|
get emptyValue(): any;
|
@@ -24,6 +24,19 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
24
24
|
schema: SelectBoxesComponent.schema()
|
25
25
|
};
|
26
26
|
}
|
27
|
+
static get serverConditionSettings() {
|
28
|
+
return Object.assign(Object.assign({}, super.serverConditionSettings), { valueComponent(classComp) {
|
29
|
+
return {
|
30
|
+
type: 'select',
|
31
|
+
dataSrc: 'custom',
|
32
|
+
valueProperty: 'value',
|
33
|
+
valueType: 'string',
|
34
|
+
data: {
|
35
|
+
custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`
|
36
|
+
},
|
37
|
+
};
|
38
|
+
} });
|
39
|
+
}
|
27
40
|
constructor(...args) {
|
28
41
|
super(...args);
|
29
42
|
this.validators = this.validators.concat('minSelectedCount', 'maxSelectedCount', 'availableValueProperty');
|
@@ -109,6 +122,16 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
109
122
|
value[val] = true;
|
110
123
|
});
|
111
124
|
}
|
125
|
+
const checkedValues = lodash_1.default.keys(lodash_1.default.pickBy(value, (val) => val));
|
126
|
+
if (this.isSelectURL && this.templateData && lodash_1.default.every(checkedValues, (val) => this.templateData[val])) {
|
127
|
+
const submission = this.root.submission;
|
128
|
+
if (!submission.metadata.selectData) {
|
129
|
+
submission.metadata.selectData = {};
|
130
|
+
}
|
131
|
+
const selectData = [];
|
132
|
+
checkedValues.forEach((value) => selectData.push(this.templateData[value]));
|
133
|
+
lodash_1.default.set(submission.metadata.selectData, this.path, selectData);
|
134
|
+
}
|
112
135
|
return value;
|
113
136
|
}
|
114
137
|
/**
|
@@ -139,6 +162,9 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
139
162
|
if (!value) {
|
140
163
|
return '';
|
141
164
|
}
|
165
|
+
if (this.isSelectURL) {
|
166
|
+
return (0, lodash_1.default)(value).pickBy((val) => val).keys().join(', ');
|
167
|
+
}
|
142
168
|
return (0, lodash_1.default)(this.component.values || [])
|
143
169
|
.filter((v) => value[v.value])
|
144
170
|
.map('label')
|
@@ -156,7 +182,7 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
156
182
|
key = valuesKeys.find((k) => (input === null || input === void 0 ? void 0 : input.value.toString()) === k);
|
157
183
|
}
|
158
184
|
const isChecked = value[key];
|
159
|
-
if (isChecked && key) {
|
185
|
+
if ((isChecked && key) || (this.isSelectURL && !this.shouldLoad && this.listData && lodash_1.default.findIndex(this.selectData, this.listData[index]) !== -1)) {
|
160
186
|
//add class to container when selected
|
161
187
|
this.addClass(wrapper, this.optionSelectedClass);
|
162
188
|
//change "checked" attribute
|
@@ -181,31 +207,33 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
181
207
|
checkComponentValidity(data, dirty, rowData, options) {
|
182
208
|
const minCount = this.component.validate.minSelectedCount;
|
183
209
|
const maxCount = this.component.validate.maxSelectedCount;
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
210
|
+
if (!this.shouldSkipValidation(data, dirty, rowData)) {
|
211
|
+
const isValid = this.isValid(data, dirty);
|
212
|
+
if ((maxCount || minCount)) {
|
213
|
+
const count = Object.keys(this.validationValue).reduce((total, key) => {
|
214
|
+
if (this.validationValue[key]) {
|
215
|
+
total++;
|
216
|
+
}
|
217
|
+
return total;
|
218
|
+
}, 0);
|
219
|
+
// Disable the rest of inputs if the max amount is already checked
|
220
|
+
if (maxCount && count >= maxCount) {
|
221
|
+
this.setInputsDisabled(true, true);
|
222
|
+
}
|
223
|
+
else if (maxCount && !this.shouldDisabled) {
|
224
|
+
this.setInputsDisabled(false);
|
225
|
+
}
|
226
|
+
if (!isValid && maxCount && count > maxCount) {
|
227
|
+
const message = this.t(this.component.maxSelectedCountMessage || 'You can only select up to {{maxCount}} items.', { maxCount });
|
228
|
+
this.setCustomValidity(message, dirty);
|
229
|
+
return false;
|
230
|
+
}
|
231
|
+
else if (!isValid && minCount && count < minCount) {
|
232
|
+
this.setInputsDisabled(false);
|
233
|
+
const message = this.t(this.component.minSelectedCountMessage || 'You must select at least {{minCount}} items.', { minCount });
|
234
|
+
this.setCustomValidity(message, dirty);
|
235
|
+
return false;
|
189
236
|
}
|
190
|
-
return total;
|
191
|
-
}, 0);
|
192
|
-
// Disable the rest of inputs if the max amount is already checked
|
193
|
-
if (maxCount && count >= maxCount) {
|
194
|
-
this.setInputsDisabled(true, true);
|
195
|
-
}
|
196
|
-
else if (maxCount && !this.shouldDisabled) {
|
197
|
-
this.setInputsDisabled(false);
|
198
|
-
}
|
199
|
-
if (!isValid && maxCount && count > maxCount) {
|
200
|
-
const message = this.t(this.component.maxSelectedCountMessage || 'You can only select up to {{maxCount}} items.', { maxCount });
|
201
|
-
this.setCustomValidity(message, dirty);
|
202
|
-
return false;
|
203
|
-
}
|
204
|
-
else if (!isValid && minCount && count < minCount) {
|
205
|
-
this.setInputsDisabled(false);
|
206
|
-
const message = this.t(this.component.minSelectedCountMessage || 'You must select at least {{minCount}} items.', { minCount });
|
207
|
-
this.setCustomValidity(message, dirty);
|
208
|
-
return false;
|
209
237
|
}
|
210
238
|
}
|
211
239
|
return super.checkComponentValidity(data, dirty, rowData, options);
|
@@ -11,39 +11,46 @@ declare namespace _default {
|
|
11
11
|
key: string;
|
12
12
|
type: string;
|
13
13
|
input: boolean;
|
14
|
-
optionsLabelPosition?: undefined;
|
15
|
-
defaultValue?: undefined;
|
16
|
-
values?: undefined;
|
17
|
-
validate?: undefined;
|
18
14
|
conditional?: undefined;
|
19
|
-
|
15
|
+
components?: undefined;
|
20
16
|
disableOnInvalid?: undefined;
|
21
17
|
} | {
|
22
18
|
label: string;
|
23
|
-
optionsLabelPosition: string;
|
24
19
|
tableView: boolean;
|
25
|
-
defaultValue: {
|
26
|
-
'1': boolean;
|
27
|
-
'2': boolean;
|
28
|
-
'3': boolean;
|
29
|
-
};
|
30
|
-
values: {
|
31
|
-
label: string;
|
32
|
-
value: string;
|
33
|
-
shortcut: string;
|
34
|
-
}[];
|
35
|
-
validate: {
|
36
|
-
minSelectedCount: number;
|
37
|
-
};
|
38
20
|
key: string;
|
39
21
|
conditional: {
|
40
22
|
show: boolean;
|
41
|
-
|
42
|
-
|
23
|
+
conjunction: string;
|
24
|
+
conditions: {
|
25
|
+
component: string;
|
26
|
+
operator: string;
|
27
|
+
value: boolean;
|
28
|
+
}[];
|
43
29
|
};
|
44
30
|
type: string;
|
45
31
|
input: boolean;
|
46
|
-
|
32
|
+
components: {
|
33
|
+
label: string;
|
34
|
+
optionsLabelPosition: string;
|
35
|
+
tableView: boolean;
|
36
|
+
defaultValue: {
|
37
|
+
'1': boolean;
|
38
|
+
'2': boolean;
|
39
|
+
'3': boolean;
|
40
|
+
};
|
41
|
+
values: {
|
42
|
+
label: string;
|
43
|
+
value: string;
|
44
|
+
shortcut: string;
|
45
|
+
}[];
|
46
|
+
validate: {
|
47
|
+
minSelectedCount: number;
|
48
|
+
};
|
49
|
+
key: string;
|
50
|
+
type: string;
|
51
|
+
input: boolean;
|
52
|
+
inputType: string;
|
53
|
+
}[];
|
47
54
|
disableOnInvalid?: undefined;
|
48
55
|
} | {
|
49
56
|
type: string;
|
@@ -52,12 +59,8 @@ declare namespace _default {
|
|
52
59
|
disableOnInvalid: boolean;
|
53
60
|
input: boolean;
|
54
61
|
tableView: boolean;
|
55
|
-
optionsLabelPosition?: undefined;
|
56
|
-
defaultValue?: undefined;
|
57
|
-
values?: undefined;
|
58
|
-
validate?: undefined;
|
59
62
|
conditional?: undefined;
|
60
|
-
|
63
|
+
components?: undefined;
|
61
64
|
})[];
|
62
65
|
}
|
63
66
|
export default _default;
|
@@ -16,43 +16,58 @@ exports.default = {
|
|
16
16
|
input: true
|
17
17
|
},
|
18
18
|
{
|
19
|
-
label: '
|
20
|
-
optionsLabelPosition: 'right',
|
19
|
+
label: 'Container',
|
21
20
|
tableView: false,
|
22
|
-
|
23
|
-
'1': false,
|
24
|
-
'2': false,
|
25
|
-
'3': false
|
26
|
-
},
|
27
|
-
values: [
|
28
|
-
{
|
29
|
-
label: '1',
|
30
|
-
value: '1',
|
31
|
-
shortcut: ''
|
32
|
-
},
|
33
|
-
{
|
34
|
-
label: '2',
|
35
|
-
value: '2',
|
36
|
-
shortcut: ''
|
37
|
-
},
|
38
|
-
{
|
39
|
-
label: '3',
|
40
|
-
value: '3',
|
41
|
-
shortcut: ''
|
42
|
-
}
|
43
|
-
],
|
44
|
-
validate: {
|
45
|
-
minSelectedCount: 1
|
46
|
-
},
|
47
|
-
key: 'selectBoxes1',
|
21
|
+
key: 'container',
|
48
22
|
conditional: {
|
49
23
|
show: true,
|
50
|
-
|
51
|
-
|
24
|
+
conjunction: 'all',
|
25
|
+
conditions: [
|
26
|
+
{
|
27
|
+
component: 'checkbox',
|
28
|
+
operator: 'isEqual',
|
29
|
+
value: true
|
30
|
+
}
|
31
|
+
]
|
52
32
|
},
|
53
|
-
type: '
|
33
|
+
type: 'container',
|
54
34
|
input: true,
|
55
|
-
|
35
|
+
components: [
|
36
|
+
{
|
37
|
+
label: 'Select Boxes',
|
38
|
+
optionsLabelPosition: 'right',
|
39
|
+
tableView: false,
|
40
|
+
defaultValue: {
|
41
|
+
'1': false,
|
42
|
+
'2': false,
|
43
|
+
'3': false
|
44
|
+
},
|
45
|
+
values: [
|
46
|
+
{
|
47
|
+
label: '1',
|
48
|
+
value: '1',
|
49
|
+
shortcut: ''
|
50
|
+
},
|
51
|
+
{
|
52
|
+
label: '2',
|
53
|
+
value: '2',
|
54
|
+
shortcut: ''
|
55
|
+
},
|
56
|
+
{
|
57
|
+
label: '3',
|
58
|
+
value: '3',
|
59
|
+
shortcut: ''
|
60
|
+
}
|
61
|
+
],
|
62
|
+
validate: {
|
63
|
+
minSelectedCount: 1
|
64
|
+
},
|
65
|
+
key: 'selectBoxes',
|
66
|
+
type: 'selectboxes',
|
67
|
+
input: true,
|
68
|
+
inputType: 'checkbox'
|
69
|
+
}
|
70
|
+
]
|
56
71
|
},
|
57
72
|
{
|
58
73
|
type: 'button',
|
@@ -0,0 +1,14 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
const label: string;
|
3
|
+
const dataSrc: string;
|
4
|
+
namespace data {
|
5
|
+
const url: string;
|
6
|
+
}
|
7
|
+
const valueProperty: string;
|
8
|
+
const template: string;
|
9
|
+
const key: string;
|
10
|
+
const type: string;
|
11
|
+
const input: boolean;
|
12
|
+
const inputType: string;
|
13
|
+
}
|
14
|
+
export default _default;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = {
|
4
|
+
label: 'Select Boxes',
|
5
|
+
dataSrc: 'url',
|
6
|
+
data: {
|
7
|
+
url: 'https://cdn.rawgit.com/mshafrir/2646763/raw/states_titlecase.json'
|
8
|
+
},
|
9
|
+
valueProperty: 'abbreviation',
|
10
|
+
template: '<span>{{ item.name }}</span>',
|
11
|
+
key: 'selectBoxes',
|
12
|
+
type: 'selectboxes',
|
13
|
+
input: true,
|
14
|
+
inputType: 'checkbox',
|
15
|
+
};
|
@@ -3,7 +3,7 @@ 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.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
6
|
+
exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
7
7
|
const comp1_1 = __importDefault(require("./comp1"));
|
8
8
|
exports.comp1 = comp1_1.default;
|
9
9
|
const comp2_1 = __importDefault(require("./comp2"));
|
@@ -14,3 +14,5 @@ const comp4_1 = __importDefault(require("./comp4"));
|
|
14
14
|
exports.comp4 = comp4_1.default;
|
15
15
|
const comp5_1 = __importDefault(require("./comp5"));
|
16
16
|
exports.comp5 = comp5_1.default;
|
17
|
+
const comp6_1 = __importDefault(require("./comp6"));
|
18
|
+
exports.comp6 = comp6_1.default;
|
@@ -17,7 +17,7 @@ export default class SignatureComponent extends Input {
|
|
17
17
|
checkSize(force: any, scale: any): void;
|
18
18
|
signaturePad: SignaturePad | null | undefined;
|
19
19
|
observer: _ResizeObserver | null | undefined;
|
20
|
-
getValueAsString(value: any): "Yes" | "No";
|
20
|
+
getValueAsString(value: any): "" | "Yes" | "No";
|
21
21
|
focus(): void;
|
22
22
|
setDataToSigaturePad(): void;
|
23
23
|
}
|
@@ -33,12 +33,14 @@ class SignatureComponent extends Input_1.default {
|
|
33
33
|
schema: SignatureComponent.schema()
|
34
34
|
};
|
35
35
|
}
|
36
|
+
static get serverConditionSettings() {
|
37
|
+
return Object.assign(Object.assign({}, super.serverConditionSettings), { operators: ['isEmpty', 'isNotEmpty'] });
|
38
|
+
}
|
36
39
|
init() {
|
37
40
|
var _a, _b, _c, _d, _e;
|
38
41
|
super.init();
|
39
42
|
this.currentWidth = 0;
|
40
43
|
this.scale = 1;
|
41
|
-
this.ratio = 1;
|
42
44
|
if (!this.component.width) {
|
43
45
|
this.component.width = '100%';
|
44
46
|
}
|
@@ -135,9 +137,9 @@ class SignatureComponent extends Input_1.default {
|
|
135
137
|
this.scale = force ? scale : this.scale;
|
136
138
|
this.currentWidth = this.refs.padBody.offsetWidth;
|
137
139
|
const width = this.currentWidth * this.scale;
|
138
|
-
this.refs.canvas.width = width;
|
139
140
|
const height = this.ratio ? width / this.ratio : this.refs.padBody.offsetHeight * this.scale;
|
140
|
-
const maxHeight = this.refs.padBody.offsetHeight * this.scale;
|
141
|
+
const maxHeight = this.ratio ? height : this.refs.padBody.offsetHeight * this.scale;
|
142
|
+
this.refs.canvas.width = width;
|
141
143
|
this.refs.canvas.height = height > maxHeight ? maxHeight : height;
|
142
144
|
this.refs.canvas.style.maxWidth = `${this.currentWidth * this.scale}px`;
|
143
145
|
this.refs.canvas.style.maxHeight = `${maxHeight}px`;
|
@@ -231,6 +233,9 @@ class SignatureComponent extends Input_1.default {
|
|
231
233
|
super.detach();
|
232
234
|
}
|
233
235
|
getValueAsString(value) {
|
236
|
+
if (lodash_1.default.isUndefined(value) && this.inDataTable) {
|
237
|
+
return '';
|
238
|
+
}
|
234
239
|
return value ? 'Yes' : 'No';
|
235
240
|
}
|
236
241
|
focus() {
|
@@ -26,6 +26,9 @@ class SurveyComponent extends Field_1.default {
|
|
26
26
|
schema: SurveyComponent.schema()
|
27
27
|
};
|
28
28
|
}
|
29
|
+
static get serverConditionSettings() {
|
30
|
+
return Object.assign(Object.assign({}, super.serverConditionSettings), { operators: ['isEmpty', 'isNotEmpty'] });
|
31
|
+
}
|
29
32
|
get defaultSchema() {
|
30
33
|
return SurveyComponent.schema();
|
31
34
|
}
|
@@ -26,6 +26,9 @@ class TagsComponent extends Input_1.default {
|
|
26
26
|
schema: TagsComponent.schema()
|
27
27
|
};
|
28
28
|
}
|
29
|
+
static get serverConditionSettings() {
|
30
|
+
return Object.assign(Object.assign({}, super.serverConditionSettings), { operators: [...super.serverConditionSettings.operators, 'includes', 'notIncludes'] });
|
31
|
+
}
|
29
32
|
init() {
|
30
33
|
super.init();
|
31
34
|
}
|
@@ -10,6 +10,7 @@ export default class TextAreaComponent extends TextFieldComponent {
|
|
10
10
|
*/
|
11
11
|
updateEditorValue(index: any, newValue: any): void;
|
12
12
|
autoModified: boolean | undefined;
|
13
|
+
attachElement(element: any, index: any): any;
|
13
14
|
imageHandler(moduleInstance: any, range: any, files: any): void;
|
14
15
|
get isPlain(): boolean;
|
15
16
|
get htmlView(): any;
|
@@ -19,8 +20,8 @@ export default class TextAreaComponent extends TextFieldComponent {
|
|
19
20
|
setReadOnlyValue(value: any, index: any): void;
|
20
21
|
get isJsonValue(): any;
|
21
22
|
setConvertedValue(value: any, index: any): any;
|
22
|
-
setAsyncConvertedValue(value: any): any
|
23
|
-
setImagesUrl(images: any): any
|
23
|
+
setAsyncConvertedValue(value: any): Promise<any>;
|
24
|
+
setImagesUrl(images: any): Promise<any>;
|
24
25
|
addAutoExpanding(textarea: any, index: any): void;
|
25
26
|
trimBlanks(value: any): any;
|
26
27
|
onChange(flags: any, fromRoot: any): {
|