@formio/js 5.0.0-dev.5679.8f14c25 → 5.0.0-dev.5682.2fe896c
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.form.js +100 -4
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +4 -4
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/Webform.d.ts +1 -1
- package/lib/cjs/Webform.js +6 -2
- package/lib/cjs/components/_classes/component/Component.d.ts +2 -2
- package/lib/cjs/components/_classes/component/Component.js +2 -2
- package/lib/cjs/components/_classes/input/Input.js +23 -1
- package/lib/cjs/components/datagrid/fixtures/comp9.d.ts +41 -0
- package/lib/cjs/components/datagrid/fixtures/comp9.js +44 -0
- 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/form/Form.d.ts +1 -1
- package/lib/cjs/components/form/Form.js +1 -1
- package/lib/mjs/Webform.d.ts +1 -1
- package/lib/mjs/Webform.js +6 -2
- package/lib/mjs/components/_classes/component/Component.d.ts +2 -2
- package/lib/mjs/components/_classes/component/Component.js +2 -2
- package/lib/mjs/components/_classes/input/Input.js +22 -1
- package/lib/mjs/components/datagrid/fixtures/comp9.d.ts +41 -0
- package/lib/mjs/components/datagrid/fixtures/comp9.js +42 -0
- 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/form/Form.d.ts +1 -1
- package/lib/mjs/components/form/Form.js +1 -1
- package/package.json +1 -1
package/lib/cjs/Webform.d.ts
CHANGED
|
@@ -334,7 +334,7 @@ declare class Webform extends NestedDataComponent {
|
|
|
334
334
|
* Sets the submission value
|
|
335
335
|
* @param {object|null|undefined} submission - The submission to set.
|
|
336
336
|
* @param {object|null|undefined} flags - Any flags to apply when setting the submission.
|
|
337
|
-
* @
|
|
337
|
+
* @returns {void}
|
|
338
338
|
*/
|
|
339
339
|
onSetSubmission(submission: object | null | undefined, flags?: object | null | undefined): void;
|
|
340
340
|
/**
|
package/lib/cjs/Webform.js
CHANGED
|
@@ -13,6 +13,7 @@ const Components_1 = __importDefault(require("./components/Components"));
|
|
|
13
13
|
const NestedDataComponent_1 = __importDefault(require("./components/_classes/nesteddata/NestedDataComponent"));
|
|
14
14
|
const utils_1 = require("./utils/utils");
|
|
15
15
|
const formUtils_1 = require("./utils/formUtils");
|
|
16
|
+
const dragula_1 = __importDefault(require("dragula"));
|
|
16
17
|
// Initialize the available forms.
|
|
17
18
|
Formio_1.Formio.forms = {};
|
|
18
19
|
// Allow people to register components.
|
|
@@ -309,6 +310,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
309
310
|
// Ensure the root is set to this component.
|
|
310
311
|
this.root = this;
|
|
311
312
|
this.localRoot = this;
|
|
313
|
+
this.root.dragulaLib = dragula_1.default;
|
|
312
314
|
}
|
|
313
315
|
/* eslint-enable max-statements */
|
|
314
316
|
get language() {
|
|
@@ -702,7 +704,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
702
704
|
* Sets the submission value
|
|
703
705
|
* @param {object|null|undefined} submission - The submission to set.
|
|
704
706
|
* @param {object|null|undefined} flags - Any flags to apply when setting the submission.
|
|
705
|
-
* @
|
|
707
|
+
* @returns {void}
|
|
706
708
|
*/
|
|
707
709
|
onSetSubmission(submission, flags = {}) {
|
|
708
710
|
this.submissionSet = true;
|
|
@@ -882,7 +884,9 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
882
884
|
this.addComponents();
|
|
883
885
|
this.on("submitButton", (options) => {
|
|
884
886
|
this.submit(false, options).catch((e) => {
|
|
885
|
-
options.instance
|
|
887
|
+
if (options === null || options === void 0 ? void 0 : options.instance) {
|
|
888
|
+
options.instance.loading = false;
|
|
889
|
+
}
|
|
886
890
|
return e !== false && e !== undefined && console.log(e);
|
|
887
891
|
});
|
|
888
892
|
}, true);
|
|
@@ -346,7 +346,7 @@ declare class Component extends Element {
|
|
|
346
346
|
/**
|
|
347
347
|
* Renders a modal preview template and returns the markup as a string
|
|
348
348
|
* @param {object|null|undefined} ctx - The rendering context
|
|
349
|
-
* @
|
|
349
|
+
* @returns {string} - The modal preview markup
|
|
350
350
|
*/
|
|
351
351
|
renderModalPreview(ctx: object | null | undefined): string;
|
|
352
352
|
/**
|
|
@@ -372,7 +372,7 @@ declare class Component extends Element {
|
|
|
372
372
|
* Creates the tooltip instance using tippy.js and returns it
|
|
373
373
|
* @param {HTMLElement} tooltipEl - HTML element to attach the tooltip
|
|
374
374
|
* @param {object|null|undefined} settings - tippy.js options
|
|
375
|
-
* @
|
|
375
|
+
* @returns {import('tippy.js').Tippy} - tippy.js instance
|
|
376
376
|
*/
|
|
377
377
|
createTooltip(tooltipEl: HTMLElement, settings?: object | null | undefined): import('tippy.js').Tippy;
|
|
378
378
|
/**
|
|
@@ -1049,7 +1049,7 @@ class Component extends Element_1.default {
|
|
|
1049
1049
|
/**
|
|
1050
1050
|
* Renders a modal preview template and returns the markup as a string
|
|
1051
1051
|
* @param {object|null|undefined} ctx - The rendering context
|
|
1052
|
-
* @
|
|
1052
|
+
* @returns {string} - The modal preview markup
|
|
1053
1053
|
*/
|
|
1054
1054
|
renderModalPreview(ctx) {
|
|
1055
1055
|
return this.renderTemplate('modalPreview', ctx || {});
|
|
@@ -1118,7 +1118,7 @@ class Component extends Element_1.default {
|
|
|
1118
1118
|
* Creates the tooltip instance using tippy.js and returns it
|
|
1119
1119
|
* @param {HTMLElement} tooltipEl - HTML element to attach the tooltip
|
|
1120
1120
|
* @param {object|null|undefined} settings - tippy.js options
|
|
1121
|
-
* @
|
|
1121
|
+
* @returns {import('tippy.js').Tippy} - tippy.js instance
|
|
1122
1122
|
*/
|
|
1123
1123
|
createTooltip(tooltipEl, settings = {}) {
|
|
1124
1124
|
const tooltipAttribute = tooltipEl.getAttribute('data-tooltip');
|
|
@@ -234,11 +234,33 @@ class Input extends Multivalue_1.default {
|
|
|
234
234
|
this.addFocusBlurEvents(element);
|
|
235
235
|
if (this.options.submitOnEnter) {
|
|
236
236
|
this.addEventListener(element, 'keypress', (event) => {
|
|
237
|
+
var _a;
|
|
237
238
|
const key = event.keyCode || event.which;
|
|
238
239
|
if (key === 13) {
|
|
239
240
|
event.preventDefault();
|
|
240
241
|
event.stopPropagation();
|
|
241
|
-
|
|
242
|
+
let submitButton = null;
|
|
243
|
+
if ((_a = this.root) === null || _a === void 0 ? void 0 : _a.everyComponent) {
|
|
244
|
+
this.root.everyComponent((component) => {
|
|
245
|
+
if ((component === null || component === void 0 ? void 0 : component.component.type) === 'button' &&
|
|
246
|
+
(component === null || component === void 0 ? void 0 : component.component.action) === 'submit') {
|
|
247
|
+
submitButton = component;
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
const options = {};
|
|
253
|
+
if (submitButton) {
|
|
254
|
+
options.instance = submitButton;
|
|
255
|
+
options.component = submitButton.component;
|
|
256
|
+
options.noValidate = this.component.state === 'draft';
|
|
257
|
+
options.state = this.component.state || 'submitted';
|
|
258
|
+
submitButton.loading = true;
|
|
259
|
+
this.emit('submitButton', options);
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
this.emit('submitButton', options);
|
|
263
|
+
}
|
|
242
264
|
}
|
|
243
265
|
});
|
|
244
266
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let components: {
|
|
3
|
+
label: string;
|
|
4
|
+
reorder: boolean;
|
|
5
|
+
addAnotherPosition: string;
|
|
6
|
+
layoutFixed: boolean;
|
|
7
|
+
enableRowGroups: boolean;
|
|
8
|
+
initEmpty: boolean;
|
|
9
|
+
tableView: boolean;
|
|
10
|
+
defaultValue: {}[];
|
|
11
|
+
key: string;
|
|
12
|
+
type: string;
|
|
13
|
+
input: boolean;
|
|
14
|
+
components: ({
|
|
15
|
+
label: string;
|
|
16
|
+
applyMaskOn: string;
|
|
17
|
+
tableView: boolean;
|
|
18
|
+
key: string;
|
|
19
|
+
type: string;
|
|
20
|
+
input: boolean;
|
|
21
|
+
mask?: undefined;
|
|
22
|
+
delimiter?: undefined;
|
|
23
|
+
requireDecimal?: undefined;
|
|
24
|
+
inputFormat?: undefined;
|
|
25
|
+
truncateMultipleSpaces?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
label: string;
|
|
28
|
+
applyMaskOn: string;
|
|
29
|
+
mask: boolean;
|
|
30
|
+
tableView: boolean;
|
|
31
|
+
delimiter: boolean;
|
|
32
|
+
requireDecimal: boolean;
|
|
33
|
+
inputFormat: string;
|
|
34
|
+
truncateMultipleSpaces: boolean;
|
|
35
|
+
key: string;
|
|
36
|
+
type: string;
|
|
37
|
+
input: boolean;
|
|
38
|
+
})[];
|
|
39
|
+
}[];
|
|
40
|
+
}
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
"components": [
|
|
5
|
+
{
|
|
6
|
+
"label": "Data Grid",
|
|
7
|
+
"reorder": true,
|
|
8
|
+
"addAnotherPosition": "bottom",
|
|
9
|
+
"layoutFixed": false,
|
|
10
|
+
"enableRowGroups": false,
|
|
11
|
+
"initEmpty": false,
|
|
12
|
+
"tableView": false,
|
|
13
|
+
"defaultValue": [
|
|
14
|
+
{}
|
|
15
|
+
],
|
|
16
|
+
"key": "dataGrid",
|
|
17
|
+
"type": "datagrid",
|
|
18
|
+
"input": true,
|
|
19
|
+
"components": [
|
|
20
|
+
{
|
|
21
|
+
"label": "Text Field",
|
|
22
|
+
"applyMaskOn": "change",
|
|
23
|
+
"tableView": true,
|
|
24
|
+
"key": "textField",
|
|
25
|
+
"type": "textfield",
|
|
26
|
+
"input": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"label": "Number",
|
|
30
|
+
"applyMaskOn": "change",
|
|
31
|
+
"mask": false,
|
|
32
|
+
"tableView": false,
|
|
33
|
+
"delimiter": false,
|
|
34
|
+
"requireDecimal": false,
|
|
35
|
+
"inputFormat": "plain",
|
|
36
|
+
"truncateMultipleSpaces": false,
|
|
37
|
+
"key": "number",
|
|
38
|
+
"type": "number",
|
|
39
|
+
"input": true
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
};
|
|
@@ -6,6 +6,7 @@ import comp5 from './comp5';
|
|
|
6
6
|
import comp6 from './comp6';
|
|
7
7
|
import comp7 from './comp7';
|
|
8
8
|
import comp8 from './comp8';
|
|
9
|
+
import comp9 from './comp9';
|
|
9
10
|
import withCollapsibleRowGroups from './comp-with-collapsible-groups';
|
|
10
11
|
import withConditionalFieldsAndValidations from './comp-with-conditional-components-and-validations';
|
|
11
12
|
import withDefValue from './comp-with-def-value';
|
|
@@ -15,4 +16,4 @@ import modalWithRequiredFields from './comp-modal-with-required-fields';
|
|
|
15
16
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
16
17
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
17
18
|
import withCheckboxes from './comp-with-checkboxes';
|
|
18
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
|
19
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
|
@@ -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.withCheckboxes = exports.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
|
6
|
+
exports.withCheckboxes = exports.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = exports.comp9 = exports.comp8 = exports.comp7 = 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"));
|
|
@@ -20,6 +20,8 @@ const comp7_1 = __importDefault(require("./comp7"));
|
|
|
20
20
|
exports.comp7 = comp7_1.default;
|
|
21
21
|
const comp8_1 = __importDefault(require("./comp8"));
|
|
22
22
|
exports.comp8 = comp8_1.default;
|
|
23
|
+
const comp9_1 = __importDefault(require("./comp9"));
|
|
24
|
+
exports.comp9 = comp9_1.default;
|
|
23
25
|
const comp_with_def_value_1 = __importDefault(require("./comp-with-def-value"));
|
|
24
26
|
exports.withDefValue = comp_with_def_value_1.default;
|
|
25
27
|
const comp_row_groups_with_def_value_1 = __importDefault(require("./comp-row-groups-with-def-value"));
|
|
@@ -94,7 +94,7 @@ export default class FormComponent extends Component {
|
|
|
94
94
|
* Sets the subform value
|
|
95
95
|
* @param {object|null|undefined} submission - The submission to set.
|
|
96
96
|
* @param {object|null|undefined} flags - Any flags to apply when setting the submission.
|
|
97
|
-
* @
|
|
97
|
+
* @returns {void}
|
|
98
98
|
*/
|
|
99
99
|
onSetSubFormValue(submission: object | null | undefined, flags: object | null | undefined): void;
|
|
100
100
|
areAllComponentsEmpty(data: any): boolean;
|
|
@@ -656,7 +656,7 @@ class FormComponent extends Component_1.default {
|
|
|
656
656
|
* Sets the subform value
|
|
657
657
|
* @param {object|null|undefined} submission - The submission to set.
|
|
658
658
|
* @param {object|null|undefined} flags - Any flags to apply when setting the submission.
|
|
659
|
-
* @
|
|
659
|
+
* @returns {void}
|
|
660
660
|
*/
|
|
661
661
|
onSetSubFormValue(submission, flags) {
|
|
662
662
|
this.subForm.setValue(submission, flags);
|
package/lib/mjs/Webform.d.ts
CHANGED
|
@@ -334,7 +334,7 @@ declare class Webform extends NestedDataComponent {
|
|
|
334
334
|
* Sets the submission value
|
|
335
335
|
* @param {object|null|undefined} submission - The submission to set.
|
|
336
336
|
* @param {object|null|undefined} flags - Any flags to apply when setting the submission.
|
|
337
|
-
* @
|
|
337
|
+
* @returns {void}
|
|
338
338
|
*/
|
|
339
339
|
onSetSubmission(submission: object | null | undefined, flags?: object | null | undefined): void;
|
|
340
340
|
/**
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -8,6 +8,7 @@ import Components from "./components/Components";
|
|
|
8
8
|
import NestedDataComponent from "./components/_classes/nesteddata/NestedDataComponent";
|
|
9
9
|
import { fastCloneDeep, currentTimezone, unescapeHTML, getStringFromComponentPath, convertStringToHTMLElement, getArrayFromComponentPath, } from "./utils/utils";
|
|
10
10
|
import { eachComponent } from "./utils/formUtils";
|
|
11
|
+
import dragula from "dragula";
|
|
11
12
|
// Initialize the available forms.
|
|
12
13
|
Formio.forms = {};
|
|
13
14
|
// Allow people to register components.
|
|
@@ -281,6 +282,7 @@ export default class Webform extends NestedDataComponent {
|
|
|
281
282
|
// Ensure the root is set to this component.
|
|
282
283
|
this.root = this;
|
|
283
284
|
this.localRoot = this;
|
|
285
|
+
this.root.dragulaLib = dragula;
|
|
284
286
|
}
|
|
285
287
|
/* eslint-enable max-statements */
|
|
286
288
|
get language() {
|
|
@@ -700,7 +702,7 @@ export default class Webform extends NestedDataComponent {
|
|
|
700
702
|
* Sets the submission value
|
|
701
703
|
* @param {object|null|undefined} submission - The submission to set.
|
|
702
704
|
* @param {object|null|undefined} flags - Any flags to apply when setting the submission.
|
|
703
|
-
* @
|
|
705
|
+
* @returns {void}
|
|
704
706
|
*/
|
|
705
707
|
onSetSubmission(submission, flags = {}) {
|
|
706
708
|
this.submissionSet = true;
|
|
@@ -886,7 +888,9 @@ export default class Webform extends NestedDataComponent {
|
|
|
886
888
|
this.addComponents();
|
|
887
889
|
this.on("submitButton", (options) => {
|
|
888
890
|
this.submit(false, options).catch((e) => {
|
|
889
|
-
options
|
|
891
|
+
if (options?.instance) {
|
|
892
|
+
options.instance.loading = false;
|
|
893
|
+
}
|
|
890
894
|
return e !== false && e !== undefined && console.log(e);
|
|
891
895
|
});
|
|
892
896
|
}, true);
|
|
@@ -346,7 +346,7 @@ declare class Component extends Element {
|
|
|
346
346
|
/**
|
|
347
347
|
* Renders a modal preview template and returns the markup as a string
|
|
348
348
|
* @param {object|null|undefined} ctx - The rendering context
|
|
349
|
-
* @
|
|
349
|
+
* @returns {string} - The modal preview markup
|
|
350
350
|
*/
|
|
351
351
|
renderModalPreview(ctx: object | null | undefined): string;
|
|
352
352
|
/**
|
|
@@ -372,7 +372,7 @@ declare class Component extends Element {
|
|
|
372
372
|
* Creates the tooltip instance using tippy.js and returns it
|
|
373
373
|
* @param {HTMLElement} tooltipEl - HTML element to attach the tooltip
|
|
374
374
|
* @param {object|null|undefined} settings - tippy.js options
|
|
375
|
-
* @
|
|
375
|
+
* @returns {import('tippy.js').Tippy} - tippy.js instance
|
|
376
376
|
*/
|
|
377
377
|
createTooltip(tooltipEl: HTMLElement, settings?: object | null | undefined): import('tippy.js').Tippy;
|
|
378
378
|
/**
|
|
@@ -1016,7 +1016,7 @@ export default class Component extends Element {
|
|
|
1016
1016
|
/**
|
|
1017
1017
|
* Renders a modal preview template and returns the markup as a string
|
|
1018
1018
|
* @param {object|null|undefined} ctx - The rendering context
|
|
1019
|
-
* @
|
|
1019
|
+
* @returns {string} - The modal preview markup
|
|
1020
1020
|
*/
|
|
1021
1021
|
renderModalPreview(ctx) {
|
|
1022
1022
|
return this.renderTemplate('modalPreview', ctx || {});
|
|
@@ -1084,7 +1084,7 @@ export default class Component extends Element {
|
|
|
1084
1084
|
* Creates the tooltip instance using tippy.js and returns it
|
|
1085
1085
|
* @param {HTMLElement} tooltipEl - HTML element to attach the tooltip
|
|
1086
1086
|
* @param {object|null|undefined} settings - tippy.js options
|
|
1087
|
-
* @
|
|
1087
|
+
* @returns {import('tippy.js').Tippy} - tippy.js instance
|
|
1088
1088
|
*/
|
|
1089
1089
|
createTooltip(tooltipEl, settings = {}) {
|
|
1090
1090
|
const tooltipAttribute = tooltipEl.getAttribute('data-tooltip');
|
|
@@ -233,7 +233,28 @@ export default class Input extends Multivalue {
|
|
|
233
233
|
if (key === 13) {
|
|
234
234
|
event.preventDefault();
|
|
235
235
|
event.stopPropagation();
|
|
236
|
-
|
|
236
|
+
let submitButton = null;
|
|
237
|
+
if (this.root?.everyComponent) {
|
|
238
|
+
this.root.everyComponent((component) => {
|
|
239
|
+
if (component?.component.type === 'button' &&
|
|
240
|
+
component?.component.action === 'submit') {
|
|
241
|
+
submitButton = component;
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
const options = {};
|
|
247
|
+
if (submitButton) {
|
|
248
|
+
options.instance = submitButton;
|
|
249
|
+
options.component = submitButton.component;
|
|
250
|
+
options.noValidate = this.component.state === 'draft';
|
|
251
|
+
options.state = this.component.state || 'submitted';
|
|
252
|
+
submitButton.loading = true;
|
|
253
|
+
this.emit('submitButton', options);
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
this.emit('submitButton', options);
|
|
257
|
+
}
|
|
237
258
|
}
|
|
238
259
|
});
|
|
239
260
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let components: {
|
|
3
|
+
label: string;
|
|
4
|
+
reorder: boolean;
|
|
5
|
+
addAnotherPosition: string;
|
|
6
|
+
layoutFixed: boolean;
|
|
7
|
+
enableRowGroups: boolean;
|
|
8
|
+
initEmpty: boolean;
|
|
9
|
+
tableView: boolean;
|
|
10
|
+
defaultValue: {}[];
|
|
11
|
+
key: string;
|
|
12
|
+
type: string;
|
|
13
|
+
input: boolean;
|
|
14
|
+
components: ({
|
|
15
|
+
label: string;
|
|
16
|
+
applyMaskOn: string;
|
|
17
|
+
tableView: boolean;
|
|
18
|
+
key: string;
|
|
19
|
+
type: string;
|
|
20
|
+
input: boolean;
|
|
21
|
+
mask?: undefined;
|
|
22
|
+
delimiter?: undefined;
|
|
23
|
+
requireDecimal?: undefined;
|
|
24
|
+
inputFormat?: undefined;
|
|
25
|
+
truncateMultipleSpaces?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
label: string;
|
|
28
|
+
applyMaskOn: string;
|
|
29
|
+
mask: boolean;
|
|
30
|
+
tableView: boolean;
|
|
31
|
+
delimiter: boolean;
|
|
32
|
+
requireDecimal: boolean;
|
|
33
|
+
inputFormat: string;
|
|
34
|
+
truncateMultipleSpaces: boolean;
|
|
35
|
+
key: string;
|
|
36
|
+
type: string;
|
|
37
|
+
input: boolean;
|
|
38
|
+
})[];
|
|
39
|
+
}[];
|
|
40
|
+
}
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"components": [
|
|
3
|
+
{
|
|
4
|
+
"label": "Data Grid",
|
|
5
|
+
"reorder": true,
|
|
6
|
+
"addAnotherPosition": "bottom",
|
|
7
|
+
"layoutFixed": false,
|
|
8
|
+
"enableRowGroups": false,
|
|
9
|
+
"initEmpty": false,
|
|
10
|
+
"tableView": false,
|
|
11
|
+
"defaultValue": [
|
|
12
|
+
{}
|
|
13
|
+
],
|
|
14
|
+
"key": "dataGrid",
|
|
15
|
+
"type": "datagrid",
|
|
16
|
+
"input": true,
|
|
17
|
+
"components": [
|
|
18
|
+
{
|
|
19
|
+
"label": "Text Field",
|
|
20
|
+
"applyMaskOn": "change",
|
|
21
|
+
"tableView": true,
|
|
22
|
+
"key": "textField",
|
|
23
|
+
"type": "textfield",
|
|
24
|
+
"input": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"label": "Number",
|
|
28
|
+
"applyMaskOn": "change",
|
|
29
|
+
"mask": false,
|
|
30
|
+
"tableView": false,
|
|
31
|
+
"delimiter": false,
|
|
32
|
+
"requireDecimal": false,
|
|
33
|
+
"inputFormat": "plain",
|
|
34
|
+
"truncateMultipleSpaces": false,
|
|
35
|
+
"key": "number",
|
|
36
|
+
"type": "number",
|
|
37
|
+
"input": true
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
};
|
|
@@ -6,6 +6,7 @@ import comp5 from './comp5';
|
|
|
6
6
|
import comp6 from './comp6';
|
|
7
7
|
import comp7 from './comp7';
|
|
8
8
|
import comp8 from './comp8';
|
|
9
|
+
import comp9 from './comp9';
|
|
9
10
|
import withCollapsibleRowGroups from './comp-with-collapsible-groups';
|
|
10
11
|
import withConditionalFieldsAndValidations from './comp-with-conditional-components-and-validations';
|
|
11
12
|
import withDefValue from './comp-with-def-value';
|
|
@@ -15,4 +16,4 @@ import modalWithRequiredFields from './comp-modal-with-required-fields';
|
|
|
15
16
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
16
17
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
17
18
|
import withCheckboxes from './comp-with-checkboxes';
|
|
18
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
|
19
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
|
@@ -6,6 +6,7 @@ import comp5 from './comp5';
|
|
|
6
6
|
import comp6 from './comp6';
|
|
7
7
|
import comp7 from './comp7';
|
|
8
8
|
import comp8 from './comp8';
|
|
9
|
+
import comp9 from './comp9';
|
|
9
10
|
import withDefValue from './comp-with-def-value';
|
|
10
11
|
import withRowGroupsAndDefValue from './comp-row-groups-with-def-value';
|
|
11
12
|
import modalWithRequiredFields from './comp-modal-with-required-fields';
|
|
@@ -15,4 +16,4 @@ import withCollapsibleRowGroups from './comp-with-collapsible-groups';
|
|
|
15
16
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
16
17
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
17
18
|
import withCheckboxes from './comp-with-checkboxes';
|
|
18
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
|
19
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
|
@@ -94,7 +94,7 @@ export default class FormComponent extends Component {
|
|
|
94
94
|
* Sets the subform value
|
|
95
95
|
* @param {object|null|undefined} submission - The submission to set.
|
|
96
96
|
* @param {object|null|undefined} flags - Any flags to apply when setting the submission.
|
|
97
|
-
* @
|
|
97
|
+
* @returns {void}
|
|
98
98
|
*/
|
|
99
99
|
onSetSubFormValue(submission: object | null | undefined, flags: object | null | undefined): void;
|
|
100
100
|
areAllComponentsEmpty(data: any): boolean;
|
|
@@ -646,7 +646,7 @@ export default class FormComponent extends Component {
|
|
|
646
646
|
* Sets the subform value
|
|
647
647
|
* @param {object|null|undefined} submission - The submission to set.
|
|
648
648
|
* @param {object|null|undefined} flags - Any flags to apply when setting the submission.
|
|
649
|
-
* @
|
|
649
|
+
* @returns {void}
|
|
650
650
|
*/
|
|
651
651
|
onSetSubFormValue(submission, flags) {
|
|
652
652
|
this.subForm.setValue(submission, flags);
|