@formio/js 5.0.0-rc.20 → 5.0.0-rc.21
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/formio.embed.css +1 -39
- package/dist/formio.embed.js +2 -90
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +57 -35
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +58 -36
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +2 -2
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +1 -1
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/CDN.d.ts +1 -0
- package/lib/cjs/CDN.js +1 -0
- package/lib/cjs/Embed.d.ts +21 -1
- package/lib/cjs/Embed.js +211 -308
- package/lib/cjs/Form.d.ts +1 -1
- package/lib/cjs/Form.js +1 -1
- package/lib/cjs/Webform.d.ts +6 -6
- package/lib/cjs/Webform.js +6 -6
- package/lib/cjs/WebformBuilder.js +1 -1
- package/lib/cjs/components/_classes/component/Component.d.ts +16 -6
- package/lib/cjs/components/_classes/component/Component.js +26 -6
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -0
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +4 -0
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -0
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +4 -0
- package/lib/cjs/components/address/Address.js +5 -0
- package/lib/cjs/components/button/Button.d.ts +1 -0
- package/lib/cjs/components/button/Button.js +3 -0
- package/lib/cjs/components/checkbox/Checkbox.d.ts +28 -0
- package/lib/cjs/components/checkbox/Checkbox.js +17 -2
- package/lib/cjs/components/columns/Columns.d.ts +1 -0
- package/lib/cjs/components/columns/Columns.js +3 -0
- package/lib/cjs/components/container/Container.js +3 -0
- package/lib/cjs/components/content/Content.d.ts +1 -0
- package/lib/cjs/components/content/Content.js +3 -0
- package/lib/cjs/components/datamap/DataMap.d.ts +1 -0
- package/lib/cjs/components/datamap/DataMap.js +3 -0
- package/lib/cjs/components/datetime/DateTime.d.ts +19 -0
- package/lib/cjs/components/datetime/DateTime.js +9 -10
- package/lib/cjs/components/day/Day.d.ts +21 -0
- package/lib/cjs/components/day/Day.js +8 -10
- package/lib/cjs/components/fieldset/Fieldset.d.ts +1 -0
- package/lib/cjs/components/fieldset/Fieldset.js +3 -0
- package/lib/cjs/components/file/File.d.ts +21 -1
- package/lib/cjs/components/file/File.js +15 -7
- package/lib/cjs/components/form/Form.d.ts +1 -0
- package/lib/cjs/components/form/Form.js +3 -0
- package/lib/cjs/components/html/HTML.d.ts +1 -0
- package/lib/cjs/components/html/HTML.js +3 -0
- package/lib/cjs/components/number/Number.d.ts +20 -1
- package/lib/cjs/components/number/Number.js +10 -15
- package/lib/cjs/components/panel/Panel.d.ts +1 -0
- package/lib/cjs/components/panel/Panel.js +3 -0
- package/lib/cjs/components/radio/Radio.d.ts +19 -0
- package/lib/cjs/components/radio/Radio.js +30 -0
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -0
- package/lib/cjs/components/recaptcha/ReCaptcha.js +3 -0
- package/lib/cjs/components/select/Select.d.ts +19 -1
- package/lib/cjs/components/select/Select.js +37 -3
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +26 -1
- package/lib/cjs/components/selectboxes/SelectBoxes.js +8 -1
- package/lib/cjs/components/signature/Signature.d.ts +21 -0
- package/lib/cjs/components/signature/Signature.js +9 -1
- package/lib/cjs/components/survey/Survey.d.ts +21 -0
- package/lib/cjs/components/survey/Survey.js +7 -1
- package/lib/cjs/components/table/Table.d.ts +1 -0
- package/lib/cjs/components/table/Table.js +3 -0
- package/lib/cjs/components/tabs/Tabs.d.ts +1 -0
- package/lib/cjs/components/tabs/Tabs.js +3 -0
- package/lib/cjs/components/tags/Tags.d.ts +21 -0
- package/lib/cjs/components/tags/Tags.js +9 -1
- package/lib/cjs/components/textfield/TextField.d.ts +21 -0
- package/lib/cjs/components/textfield/TextField.js +7 -1
- package/lib/cjs/components/time/Time.d.ts +8 -1
- package/lib/cjs/components/well/Well.d.ts +1 -0
- package/lib/cjs/components/well/Well.js +3 -0
- package/lib/cjs/formio.embed.d.ts +2 -1
- package/lib/cjs/formio.embed.js +96 -1
- package/lib/cjs/formio.form.d.ts +4 -3
- package/lib/cjs/formio.form.js +17 -8
- package/lib/cjs/licenses/Licenses.d.ts +7 -0
- package/lib/cjs/licenses/Licenses.js +22 -0
- package/lib/cjs/licenses/index.d.ts +2 -0
- package/lib/cjs/licenses/index.js +7 -0
- package/lib/cjs/utils/utils.d.ts +10 -0
- package/lib/cjs/utils/utils.js +21 -1
- package/lib/mjs/CDN.d.ts +1 -0
- package/lib/mjs/CDN.js +1 -0
- package/lib/mjs/Embed.d.ts +21 -1
- package/lib/mjs/Embed.js +208 -322
- package/lib/mjs/Form.d.ts +1 -1
- package/lib/mjs/Form.js +1 -1
- package/lib/mjs/Webform.d.ts +6 -6
- package/lib/mjs/Webform.js +6 -6
- package/lib/mjs/WebformBuilder.js +1 -1
- package/lib/mjs/components/_classes/component/Component.d.ts +16 -6
- package/lib/mjs/components/_classes/component/Component.js +26 -6
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -0
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +4 -0
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -0
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +4 -0
- package/lib/mjs/components/address/Address.js +5 -0
- package/lib/mjs/components/button/Button.d.ts +1 -0
- package/lib/mjs/components/button/Button.js +4 -1
- package/lib/mjs/components/checkbox/Checkbox.d.ts +28 -0
- package/lib/mjs/components/checkbox/Checkbox.js +18 -3
- package/lib/mjs/components/columns/Columns.d.ts +1 -0
- package/lib/mjs/components/columns/Columns.js +3 -0
- package/lib/mjs/components/container/Container.js +4 -1
- package/lib/mjs/components/content/Content.d.ts +1 -0
- package/lib/mjs/components/content/Content.js +3 -0
- package/lib/mjs/components/datamap/DataMap.d.ts +1 -0
- package/lib/mjs/components/datamap/DataMap.js +4 -1
- package/lib/mjs/components/datetime/DateTime.d.ts +19 -0
- package/lib/mjs/components/datetime/DateTime.js +11 -12
- package/lib/mjs/components/day/Day.d.ts +21 -0
- package/lib/mjs/components/day/Day.js +12 -14
- package/lib/mjs/components/fieldset/Fieldset.d.ts +1 -0
- package/lib/mjs/components/fieldset/Fieldset.js +3 -0
- package/lib/mjs/components/file/File.d.ts +21 -1
- package/lib/mjs/components/file/File.js +16 -8
- package/lib/mjs/components/form/Form.d.ts +1 -0
- package/lib/mjs/components/form/Form.js +4 -1
- package/lib/mjs/components/html/HTML.d.ts +1 -0
- package/lib/mjs/components/html/HTML.js +3 -0
- package/lib/mjs/components/number/Number.d.ts +20 -1
- package/lib/mjs/components/number/Number.js +11 -12
- package/lib/mjs/components/panel/Panel.d.ts +1 -0
- package/lib/mjs/components/panel/Panel.js +3 -0
- package/lib/mjs/components/radio/Radio.d.ts +19 -0
- package/lib/mjs/components/radio/Radio.js +34 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -0
- package/lib/mjs/components/recaptcha/ReCaptcha.js +3 -0
- package/lib/mjs/components/select/Select.d.ts +19 -1
- package/lib/mjs/components/select/Select.js +39 -5
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +26 -1
- package/lib/mjs/components/selectboxes/SelectBoxes.js +8 -1
- package/lib/mjs/components/signature/Signature.d.ts +21 -0
- package/lib/mjs/components/signature/Signature.js +9 -1
- package/lib/mjs/components/survey/Survey.d.ts +21 -0
- package/lib/mjs/components/survey/Survey.js +8 -2
- package/lib/mjs/components/table/Table.d.ts +1 -0
- package/lib/mjs/components/table/Table.js +3 -0
- package/lib/mjs/components/tabs/Tabs.d.ts +1 -0
- package/lib/mjs/components/tabs/Tabs.js +3 -0
- package/lib/mjs/components/tags/Tags.d.ts +21 -0
- package/lib/mjs/components/tags/Tags.js +10 -2
- package/lib/mjs/components/textfield/TextField.d.ts +21 -0
- package/lib/mjs/components/textfield/TextField.js +8 -2
- package/lib/mjs/components/time/Time.d.ts +8 -1
- package/lib/mjs/components/well/Well.d.ts +1 -0
- package/lib/mjs/components/well/Well.js +3 -0
- package/lib/mjs/formio.embed.d.ts +2 -1
- package/lib/mjs/formio.embed.js +96 -2
- package/lib/mjs/formio.form.d.ts +4 -3
- package/lib/mjs/formio.form.js +16 -8
- package/lib/mjs/licenses/Licenses.d.ts +7 -0
- package/lib/mjs/licenses/Licenses.js +17 -0
- package/lib/mjs/licenses/index.d.ts +2 -0
- package/lib/mjs/licenses/index.js +2 -0
- package/lib/mjs/utils/utils.d.ts +10 -0
- package/lib/mjs/utils/utils.js +19 -0
- package/package.json +5 -1
- package/types/index.d.ts +1 -0
- package/types/licenses.d.ts +7 -0
- package/types/utils.d.ts +2 -0
package/lib/cjs/Webform.d.ts
CHANGED
@@ -65,7 +65,7 @@ declare class Webform extends NestedDataComponent {
|
|
65
65
|
* @type {Promise}
|
66
66
|
*
|
67
67
|
* @example
|
68
|
-
* import Webform from '
|
68
|
+
* import Webform from '@formio/js/Webform';
|
69
69
|
* let form = new Webform(document.getElementById('formio'));
|
70
70
|
* form.formReady.then(() => {
|
71
71
|
* console.log('The form is ready!');
|
@@ -90,7 +90,7 @@ declare class Webform extends NestedDataComponent {
|
|
90
90
|
* @type {Promise}
|
91
91
|
*
|
92
92
|
* @example
|
93
|
-
* import Webform from '
|
93
|
+
* import Webform from '@formio/js/Webform';
|
94
94
|
* let form = new Webform(document.getElementById('formio'));
|
95
95
|
* form.submissionReady.then(() => {
|
96
96
|
* console.log('The submission is ready!');
|
@@ -140,7 +140,7 @@ declare class Webform extends NestedDataComponent {
|
|
140
140
|
* @param {string} value - The value of the form embed url.
|
141
141
|
*
|
142
142
|
* @example
|
143
|
-
* import Webform from '
|
143
|
+
* import Webform from '@formio/js/Webform';
|
144
144
|
* let form = new Webform(document.getElementById('formio'));
|
145
145
|
* form.formReady.then(() => {
|
146
146
|
* console.log('The form is formReady!');
|
@@ -207,7 +207,7 @@ declare class Webform extends NestedDataComponent {
|
|
207
207
|
* Sets the JSON schema for the form to be rendered.
|
208
208
|
*
|
209
209
|
* @example
|
210
|
-
* import Webform from '
|
210
|
+
* import Webform from '@formio/js/Webform';
|
211
211
|
* let form = new Webform(document.getElementById('formio'));
|
212
212
|
* form.setForm({
|
213
213
|
* components: [
|
@@ -257,7 +257,7 @@ declare class Webform extends NestedDataComponent {
|
|
257
257
|
* Sets the submission of a form.
|
258
258
|
*
|
259
259
|
* @example
|
260
|
-
* import Webform from '
|
260
|
+
* import Webform from '@formio/js/Webform';
|
261
261
|
* let form = new Webform(document.getElementById('formio'));
|
262
262
|
* form.src = 'https://examples.form.io/example';
|
263
263
|
* form.submission = {data: {
|
@@ -372,7 +372,7 @@ declare class Webform extends NestedDataComponent {
|
|
372
372
|
* Submits the form.
|
373
373
|
*
|
374
374
|
* @example
|
375
|
-
* import Webform from '
|
375
|
+
* import Webform from '@formio/js/Webform';
|
376
376
|
* let form = new Webform(document.getElementById('formio'));
|
377
377
|
* form.src = 'https://examples.form.io/example';
|
378
378
|
* form.submission = {data: {
|
package/lib/cjs/Webform.js
CHANGED
@@ -163,7 +163,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
163
163
|
* @type {Promise}
|
164
164
|
*
|
165
165
|
* @example
|
166
|
-
* import Webform from '
|
166
|
+
* import Webform from '@formio/js/Webform';
|
167
167
|
* let form = new Webform(document.getElementById('formio'));
|
168
168
|
* form.formReady.then(() => {
|
169
169
|
* console.log('The form is ready!');
|
@@ -189,7 +189,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
189
189
|
* @type {Promise}
|
190
190
|
*
|
191
191
|
* @example
|
192
|
-
* import Webform from '
|
192
|
+
* import Webform from '@formio/js/Webform';
|
193
193
|
* let form = new Webform(document.getElementById('formio'));
|
194
194
|
* form.submissionReady.then(() => {
|
195
195
|
* console.log('The submission is ready!');
|
@@ -373,7 +373,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
373
373
|
* @param {string} value - The value of the form embed url.
|
374
374
|
*
|
375
375
|
* @example
|
376
|
-
* import Webform from '
|
376
|
+
* import Webform from '@formio/js/Webform';
|
377
377
|
* let form = new Webform(document.getElementById('formio'));
|
378
378
|
* form.formReady.then(() => {
|
379
379
|
* console.log('The form is formReady!');
|
@@ -478,7 +478,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
478
478
|
* Sets the JSON schema for the form to be rendered.
|
479
479
|
*
|
480
480
|
* @example
|
481
|
-
* import Webform from '
|
481
|
+
* import Webform from '@formio/js/Webform';
|
482
482
|
* let form = new Webform(document.getElementById('formio'));
|
483
483
|
* form.setForm({
|
484
484
|
* components: [
|
@@ -612,7 +612,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
612
612
|
* Sets the submission of a form.
|
613
613
|
*
|
614
614
|
* @example
|
615
|
-
* import Webform from '
|
615
|
+
* import Webform from '@formio/js/Webform';
|
616
616
|
* let form = new Webform(document.getElementById('formio'));
|
617
617
|
* form.src = 'https://examples.form.io/example';
|
618
618
|
* form.submission = {data: {
|
@@ -1342,7 +1342,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
1342
1342
|
* Submits the form.
|
1343
1343
|
*
|
1344
1344
|
* @example
|
1345
|
-
* import Webform from '
|
1345
|
+
* import Webform from '@formio/js/Webform';
|
1346
1346
|
* let form = new Webform(document.getElementById('formio'));
|
1347
1347
|
* form.src = 'https://examples.form.io/example';
|
1348
1348
|
* form.submission = {data: {
|
@@ -4,6 +4,21 @@
|
|
4
4
|
*/
|
5
5
|
declare class Component extends Element {
|
6
6
|
static schema(...sources: any[]): any;
|
7
|
+
/**
|
8
|
+
* Return the simple condition settings as part of the component.
|
9
|
+
*
|
10
|
+
* @return {Object}
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
static get conditionOperatorsSettings(): Object;
|
14
|
+
/**
|
15
|
+
* Return the array of possible types of component value absed on its schema.
|
16
|
+
*
|
17
|
+
* @param schema
|
18
|
+
* @return {Array}
|
19
|
+
*
|
20
|
+
*/
|
21
|
+
static savedValueTypes(schema: any): any[];
|
7
22
|
/**
|
8
23
|
* Provides a table view for this component. Override if you wish to do something different than using getView
|
9
24
|
* method of your instance.
|
@@ -12,12 +27,7 @@ declare class Component extends Element {
|
|
12
27
|
* @param options
|
13
28
|
*/
|
14
29
|
static tableView(value: any, options: any): void;
|
15
|
-
static get serverConditionSettings():
|
16
|
-
operators: string[];
|
17
|
-
valueComponent(): {
|
18
|
-
type: string;
|
19
|
-
};
|
20
|
-
};
|
30
|
+
static get serverConditionSettings(): Object;
|
21
31
|
/**
|
22
32
|
* Initialize a new Component.
|
23
33
|
*
|
@@ -200,6 +200,31 @@ class Component extends Element_1.default {
|
|
200
200
|
static get Validator() {
|
201
201
|
return Validator_1.default;
|
202
202
|
}
|
203
|
+
/**
|
204
|
+
* Return the simple condition settings as part of the component.
|
205
|
+
*
|
206
|
+
* @return {Object}
|
207
|
+
*
|
208
|
+
*/
|
209
|
+
static get conditionOperatorsSettings() {
|
210
|
+
return {
|
211
|
+
operators: ['isEqual', 'isNotEqual', 'isEmpty', 'isNotEmpty'],
|
212
|
+
valueComponent() {
|
213
|
+
return { type: 'textfield' };
|
214
|
+
}
|
215
|
+
};
|
216
|
+
}
|
217
|
+
/**
|
218
|
+
* Return the array of possible types of component value absed on its schema.
|
219
|
+
*
|
220
|
+
* @param schema
|
221
|
+
* @return {Array}
|
222
|
+
*
|
223
|
+
*/
|
224
|
+
static savedValueTypes(schema) {
|
225
|
+
schema = schema || {};
|
226
|
+
return FormioUtils.getComponentSavedTypes(schema) || [FormioUtils.componentValueTypes.any];
|
227
|
+
}
|
203
228
|
/**
|
204
229
|
* Provides a table view for this component. Override if you wish to do something different than using getView
|
205
230
|
* method of your instance.
|
@@ -1404,12 +1429,7 @@ class Component extends Element_1.default {
|
|
1404
1429
|
return customCSS;
|
1405
1430
|
}
|
1406
1431
|
static get serverConditionSettings() {
|
1407
|
-
return
|
1408
|
-
operators: ['isEqual', 'isNotEqual', 'isEmpty', 'isNotEmpty'],
|
1409
|
-
valueComponent() {
|
1410
|
-
return { type: 'textfield' };
|
1411
|
-
},
|
1412
|
-
};
|
1432
|
+
return Component.conditionOperatorsSettings;
|
1413
1433
|
}
|
1414
1434
|
get isMobile() {
|
1415
1435
|
return (0, ismobilejs_1.default)();
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const lodash_1 = __importDefault(require("lodash"));
|
7
|
+
const utils_1 = require("../../../utils/utils");
|
7
8
|
const Component_1 = __importDefault(require("../component/Component"));
|
8
9
|
const NestedDataComponent_1 = __importDefault(require("../nesteddata/NestedDataComponent"));
|
9
10
|
class NestedArrayComponent extends NestedDataComponent_1.default {
|
@@ -12,6 +13,9 @@ class NestedArrayComponent extends NestedDataComponent_1.default {
|
|
12
13
|
disableAddingRemovingRows: false
|
13
14
|
}, ...extend);
|
14
15
|
}
|
16
|
+
static savedValueTypes() {
|
17
|
+
return [utils_1.componentValueTypes.array];
|
18
|
+
}
|
15
19
|
componentContext(component) {
|
16
20
|
return this.iteratableRows[component.rowIndex].data;
|
17
21
|
}
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Component_1 = __importDefault(require("../component/Component"));
|
7
7
|
const NestedComponent_1 = __importDefault(require("../nested/NestedComponent"));
|
8
8
|
const lodash_1 = __importDefault(require("lodash"));
|
9
|
+
const utils_1 = require("../../../utils/utils");
|
9
10
|
class NestedDataComponent extends NestedComponent_1.default {
|
10
11
|
hasChanged(newValue, oldValue) {
|
11
12
|
// If we do not have a value and are getting set to anything other than undefined or null, then we changed.
|
@@ -16,6 +17,9 @@ class NestedDataComponent extends NestedComponent_1.default {
|
|
16
17
|
}
|
17
18
|
return !lodash_1.default.isEqual(newValue, oldValue);
|
18
19
|
}
|
20
|
+
static savedValueTypes(schema) {
|
21
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.object];
|
22
|
+
}
|
19
23
|
get allowData() {
|
20
24
|
return true;
|
21
25
|
}
|
@@ -11,6 +11,7 @@ const GoogleAddressProvider_1 = require("../../providers/address/GoogleAddressPr
|
|
11
11
|
const Field_1 = __importDefault(require("../_classes/field/Field"));
|
12
12
|
const NestedComponent_1 = __importDefault(require("../_classes/nested/NestedComponent"));
|
13
13
|
const Container_1 = __importDefault(require("../container/Container"));
|
14
|
+
const utils_1 = require("../../utils/utils");
|
14
15
|
exports.AddressComponentMode = {
|
15
16
|
Autocomplete: 'autocomplete',
|
16
17
|
Manual: 'manual',
|
@@ -82,6 +83,10 @@ class AddressComponent extends Container_1.default {
|
|
82
83
|
],
|
83
84
|
}, ...extend);
|
84
85
|
}
|
86
|
+
static savedValueTypes(schema) {
|
87
|
+
schema = schema || {};
|
88
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.object];
|
89
|
+
}
|
85
90
|
static get builderInfo() {
|
86
91
|
return {
|
87
92
|
title: 'Address',
|
@@ -34,6 +34,9 @@ class ButtonComponent extends Field_1.default {
|
|
34
34
|
schema: ButtonComponent.schema()
|
35
35
|
};
|
36
36
|
}
|
37
|
+
static savedValueTypes(schema) {
|
38
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.boolean];
|
39
|
+
}
|
37
40
|
constructor(component, options, data) {
|
38
41
|
super(component, options, data);
|
39
42
|
this.filesUploading = [];
|
@@ -19,7 +19,35 @@ export default class CheckBoxComponent extends Field {
|
|
19
19
|
};
|
20
20
|
type: string;
|
21
21
|
};
|
22
|
+
constructor: Function;
|
23
|
+
toString(): string;
|
24
|
+
toLocaleString(): string;
|
25
|
+
valueOf(): Object;
|
26
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
27
|
+
isPrototypeOf(v: Object): boolean;
|
28
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
22
29
|
};
|
30
|
+
static get conditionOperatorsSettings(): {
|
31
|
+
operators: string[];
|
32
|
+
valueComponent(): {
|
33
|
+
valueType: string;
|
34
|
+
data: {
|
35
|
+
values: {
|
36
|
+
label: string;
|
37
|
+
value: string;
|
38
|
+
}[];
|
39
|
+
};
|
40
|
+
type: string;
|
41
|
+
};
|
42
|
+
constructor: Function;
|
43
|
+
toString(): string;
|
44
|
+
toLocaleString(): string;
|
45
|
+
valueOf(): Object;
|
46
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
47
|
+
isPrototypeOf(v: Object): boolean;
|
48
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
49
|
+
};
|
50
|
+
static savedValueTypes(schema: any): string[] | null;
|
23
51
|
get labelClass(): string;
|
24
52
|
get inputInfo(): {
|
25
53
|
type: string;
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const lodash_1 = __importDefault(require("lodash"));
|
7
|
+
const utils_1 = require("../../utils/utils");
|
7
8
|
const Field_1 = __importDefault(require("../_classes/field/Field"));
|
8
9
|
class CheckBoxComponent extends Field_1.default {
|
9
10
|
static schema(...extend) {
|
@@ -29,7 +30,10 @@ class CheckBoxComponent extends Field_1.default {
|
|
29
30
|
};
|
30
31
|
}
|
31
32
|
static get serverConditionSettings() {
|
32
|
-
return
|
33
|
+
return CheckBoxComponent.conditionOperatorsSettings;
|
34
|
+
}
|
35
|
+
static get conditionOperatorsSettings() {
|
36
|
+
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: ['isEqual'], valueComponent() {
|
33
37
|
return {
|
34
38
|
valueType: 'boolean',
|
35
39
|
data: {
|
@@ -38,10 +42,21 @@ class CheckBoxComponent extends Field_1.default {
|
|
38
42
|
{ label: 'Not Checked', value: 'false' },
|
39
43
|
]
|
40
44
|
},
|
41
|
-
type: 'select'
|
45
|
+
type: 'select'
|
42
46
|
};
|
43
47
|
} });
|
44
48
|
}
|
49
|
+
static savedValueTypes(schema) {
|
50
|
+
schema = schema || {};
|
51
|
+
const types = (0, utils_1.getComponentSavedTypes)(schema);
|
52
|
+
if (lodash_1.default.isArray(types)) {
|
53
|
+
return types;
|
54
|
+
}
|
55
|
+
if (schema.inputType === 'radio') {
|
56
|
+
return [utils_1.componentValueTypes.string];
|
57
|
+
}
|
58
|
+
return [utils_1.componentValueTypes.boolean];
|
59
|
+
}
|
45
60
|
get defaultSchema() {
|
46
61
|
return CheckBoxComponent.schema();
|
47
62
|
}
|
@@ -36,6 +36,9 @@ class ContainerComponent extends NestedDataComponent_1.default {
|
|
36
36
|
super(...args);
|
37
37
|
this.type = 'container';
|
38
38
|
}
|
39
|
+
static savedValueTypes(schema) {
|
40
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.object];
|
41
|
+
}
|
39
42
|
addComponents(data, options) {
|
40
43
|
return super.addComponents(this.dataValue, options);
|
41
44
|
}
|
@@ -49,6 +49,9 @@ class DataMapComponent extends DataGrid_1.default {
|
|
49
49
|
}
|
50
50
|
return lodash_1.default.omit(schema, 'components');
|
51
51
|
}
|
52
|
+
static savedValueTypes(schema) {
|
53
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.object];
|
54
|
+
}
|
52
55
|
constructor(component, options, data) {
|
53
56
|
super(component, options, data);
|
54
57
|
this.type = 'datamap';
|
@@ -10,7 +10,26 @@ export default class DateTimeComponent extends Input {
|
|
10
10
|
static get serverConditionSettings(): {
|
11
11
|
operators: string[];
|
12
12
|
valueComponent(classComp: any): any;
|
13
|
+
constructor: Function;
|
14
|
+
toString(): string;
|
15
|
+
toLocaleString(): string;
|
16
|
+
valueOf(): Object;
|
17
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
18
|
+
isPrototypeOf(v: Object): boolean;
|
19
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
13
20
|
};
|
21
|
+
static get conditionOperatorsSettings(): {
|
22
|
+
operators: string[];
|
23
|
+
valueComponent(classComp: any): any;
|
24
|
+
constructor: Function;
|
25
|
+
toString(): string;
|
26
|
+
toLocaleString(): string;
|
27
|
+
valueOf(): Object;
|
28
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
29
|
+
isPrototypeOf(v: Object): boolean;
|
30
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
31
|
+
};
|
32
|
+
static savedValueTypes(schema: any): string[];
|
14
33
|
get emptyValue(): string;
|
15
34
|
get momentFormat(): string;
|
16
35
|
createWrapper(): boolean;
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const lodash_1 = __importDefault(require("lodash"));
|
7
7
|
const moment_1 = __importDefault(require("moment"));
|
8
8
|
const utils_1 = __importDefault(require("../../utils"));
|
9
|
+
const utils_2 = require("../../utils/utils");
|
9
10
|
const Input_1 = __importDefault(require("../_classes/input/Input"));
|
10
11
|
class DateTimeComponent extends Input_1.default {
|
11
12
|
static schema(...extend) {
|
@@ -56,19 +57,17 @@ class DateTimeComponent extends Input_1.default {
|
|
56
57
|
};
|
57
58
|
}
|
58
59
|
static get serverConditionSettings() {
|
59
|
-
return
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
'isNotEmpty',
|
64
|
-
'dateLessThan',
|
65
|
-
'dateGreaterThan',
|
66
|
-
'dateLessThanOrEqual',
|
67
|
-
'dateGreaterThanOrEqual',
|
68
|
-
], valueComponent(classComp) {
|
60
|
+
return DateTimeComponent.conditionOperatorsSettings;
|
61
|
+
}
|
62
|
+
static get conditionOperatorsSettings() {
|
63
|
+
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: ['isDateEqual', 'isNotDateEqual', 'isEmpty', 'isNotEmpty', 'dateLessThan', 'dateGreaterThan', 'dateLessThanOrEqual', 'dateGreaterThanOrEqual'], valueComponent(classComp) {
|
69
64
|
return Object.assign(Object.assign({}, classComp), { type: 'datetime' });
|
70
65
|
} });
|
71
66
|
}
|
67
|
+
static savedValueTypes(schema) {
|
68
|
+
schema = schema || {};
|
69
|
+
return (0, utils_2.getComponentSavedTypes)(schema) || [utils_2.componentValueTypes.date];
|
70
|
+
}
|
72
71
|
constructor(component, options, data) {
|
73
72
|
super(component, options, data);
|
74
73
|
const timezone = (this.component.timezone || this.options.timezone);
|
@@ -7,6 +7,27 @@ export default class DayComponent extends Field {
|
|
7
7
|
weight: number;
|
8
8
|
schema: any;
|
9
9
|
};
|
10
|
+
static get conditionOperatorsSettings(): {
|
11
|
+
operators: string[];
|
12
|
+
constructor: Function;
|
13
|
+
toString(): string;
|
14
|
+
toLocaleString(): string;
|
15
|
+
valueOf(): Object;
|
16
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
17
|
+
isPrototypeOf(v: Object): boolean;
|
18
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
19
|
+
};
|
20
|
+
static savedValueTypes(schema: any): string[];
|
21
|
+
static get serverConditionSettings(): {
|
22
|
+
operators: string[];
|
23
|
+
constructor: Function;
|
24
|
+
toString(): string;
|
25
|
+
toLocaleString(): string;
|
26
|
+
valueOf(): Object;
|
27
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
28
|
+
isPrototypeOf(v: Object): boolean;
|
29
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
30
|
+
};
|
10
31
|
constructor(component: any, options: any, data: any);
|
11
32
|
/**
|
12
33
|
* The empty value for day component.
|
@@ -43,6 +43,13 @@ class DayComponent extends Field_1.default {
|
|
43
43
|
schema: DayComponent.schema()
|
44
44
|
};
|
45
45
|
}
|
46
|
+
static get conditionOperatorsSettings() {
|
47
|
+
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: ['isDateEqual', 'isNotDateEqual', 'isEmpty', 'isNotEmpty', 'dateLessThan', 'dateGreaterThan', 'dateLessThanOrEqual', 'dateGreaterThanOrEqual'] });
|
48
|
+
}
|
49
|
+
static savedValueTypes(schema) {
|
50
|
+
schema = schema || {};
|
51
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.string];
|
52
|
+
}
|
46
53
|
constructor(component, options, data) {
|
47
54
|
if (component.maxDate) {
|
48
55
|
component.maxDate = (0, moment_1.default)(component.maxDate, 'YYYY-MM-DD').toISOString();
|
@@ -53,16 +60,7 @@ class DayComponent extends Field_1.default {
|
|
53
60
|
super(component, options, data);
|
54
61
|
}
|
55
62
|
static get serverConditionSettings() {
|
56
|
-
return
|
57
|
-
'isDateEqual',
|
58
|
-
'isNotDateEqual',
|
59
|
-
'isEmpty',
|
60
|
-
'isNotEmpty',
|
61
|
-
'dateLessThan',
|
62
|
-
'dateGreaterThan',
|
63
|
-
'dateLessThanOrEqual',
|
64
|
-
'dateGreaterThanOrEqual',
|
65
|
-
] });
|
63
|
+
return DayComponent.conditionOperatorsSettings;
|
66
64
|
}
|
67
65
|
/**
|
68
66
|
* The empty value for day component.
|
@@ -7,6 +7,27 @@ export default class FileComponent extends Field {
|
|
7
7
|
weight: number;
|
8
8
|
schema: any;
|
9
9
|
};
|
10
|
+
static get serverConditionSettings(): {
|
11
|
+
operators: string[];
|
12
|
+
constructor: Function;
|
13
|
+
toString(): string;
|
14
|
+
toLocaleString(): string;
|
15
|
+
valueOf(): Object;
|
16
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
17
|
+
isPrototypeOf(v: Object): boolean;
|
18
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
19
|
+
};
|
20
|
+
static get conditionOperatorsSettings(): {
|
21
|
+
operators: string[];
|
22
|
+
constructor: Function;
|
23
|
+
toString(): string;
|
24
|
+
toLocaleString(): string;
|
25
|
+
valueOf(): Object;
|
26
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
27
|
+
isPrototypeOf(v: Object): boolean;
|
28
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
29
|
+
};
|
30
|
+
static savedValueTypes(schema: any): string[];
|
10
31
|
support: {
|
11
32
|
filereader: boolean;
|
12
33
|
formdata: boolean;
|
@@ -54,7 +75,6 @@ export default class FileComponent extends Field {
|
|
54
75
|
validateMaxSize(file: any, val: any): boolean;
|
55
76
|
upload(files: any): void;
|
56
77
|
filesUploading: any[] | undefined;
|
57
|
-
abortUpload: any;
|
58
78
|
getFile(fileInfo: any): any;
|
59
79
|
focus(): void;
|
60
80
|
}
|