@formio/js 5.0.0-dev.5749.8f49547 → 5.0.0-dev.5750.5b1284a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.form.js +4 -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/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/lib/cjs/CDN.js +2 -1
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -0
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +6 -0
- package/lib/cjs/components/datagrid/DataGrid.js +1 -0
- package/lib/cjs/components/datagrid/fixtures/comp11.d.ts +50 -0
- package/lib/cjs/components/datagrid/fixtures/comp11.js +55 -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/editgrid/EditGrid.js +1 -0
- package/lib/mjs/CDN.js +2 -1
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -0
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +6 -0
- package/lib/mjs/components/datagrid/DataGrid.js +1 -0
- package/lib/mjs/components/datagrid/fixtures/comp11.d.ts +50 -0
- package/lib/mjs/components/datagrid/fixtures/comp11.js +53 -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/editgrid/EditGrid.js +1 -0
- package/package.json +1 -1
package/lib/cjs/CDN.js
CHANGED
|
@@ -64,7 +64,8 @@ class CDN {
|
|
|
64
64
|
url += `/${lib}`;
|
|
65
65
|
}
|
|
66
66
|
// Only attach the version if this is the hosted cdn.
|
|
67
|
-
if (cdnUrl.
|
|
67
|
+
if (cdnUrl.includes('form.io') &&
|
|
68
|
+
version && version !== 'latest') {
|
|
68
69
|
url += `/${version}`;
|
|
69
70
|
}
|
|
70
71
|
return url;
|
|
@@ -15,5 +15,6 @@ export default class NestedArrayComponent extends NestedDataComponent {
|
|
|
15
15
|
_getEmailTableHeader(options: any): string;
|
|
16
16
|
_getEmailTableBody(options: any): string;
|
|
17
17
|
getComponents(rowIndex: any): any;
|
|
18
|
+
removeSubmissionMetadataRow(index: any): void;
|
|
18
19
|
}
|
|
19
20
|
import NestedDataComponent from '../nesteddata/NestedDataComponent';
|
|
@@ -218,5 +218,11 @@ class NestedArrayComponent extends NestedDataComponent_1.default {
|
|
|
218
218
|
}
|
|
219
219
|
return super.getComponents();
|
|
220
220
|
}
|
|
221
|
+
removeSubmissionMetadataRow(index) {
|
|
222
|
+
const componentMetadata = lodash_1.default.get(this.root, `submission.metadata.selectData.${this.path}`, null);
|
|
223
|
+
if (lodash_1.default.isArray(componentMetadata)) {
|
|
224
|
+
componentMetadata.splice(index, 1);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
221
227
|
}
|
|
222
228
|
exports.default = NestedArrayComponent;
|
|
@@ -440,6 +440,7 @@ class DataGridComponent extends NestedArrayComponent_1.default {
|
|
|
440
440
|
this.splice(index, flags);
|
|
441
441
|
this.emit('dataGridDeleteRow', { index });
|
|
442
442
|
const [row] = this.rows.splice(index, 1);
|
|
443
|
+
this.removeSubmissionMetadataRow(index);
|
|
443
444
|
this.removeRowComponents(row);
|
|
444
445
|
this.updateRowsComponents(index);
|
|
445
446
|
this.setValue(this.dataValue, flags);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let title: string;
|
|
3
|
+
let name: string;
|
|
4
|
+
let path: string;
|
|
5
|
+
let type: string;
|
|
6
|
+
let display: string;
|
|
7
|
+
let components: ({
|
|
8
|
+
label: string;
|
|
9
|
+
reorder: boolean;
|
|
10
|
+
addAnotherPosition: string;
|
|
11
|
+
layoutFixed: boolean;
|
|
12
|
+
enableRowGroups: boolean;
|
|
13
|
+
initEmpty: boolean;
|
|
14
|
+
tableView: boolean;
|
|
15
|
+
key: string;
|
|
16
|
+
type: string;
|
|
17
|
+
input: boolean;
|
|
18
|
+
components: {
|
|
19
|
+
label: string;
|
|
20
|
+
widget: string;
|
|
21
|
+
tableView: boolean;
|
|
22
|
+
data: {
|
|
23
|
+
values: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
validateWhenHidden: boolean;
|
|
29
|
+
key: string;
|
|
30
|
+
type: string;
|
|
31
|
+
input: boolean;
|
|
32
|
+
defaultValue: string;
|
|
33
|
+
}[];
|
|
34
|
+
disableOnInvalid?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
type: string;
|
|
37
|
+
label: string;
|
|
38
|
+
key: string;
|
|
39
|
+
disableOnInvalid: boolean;
|
|
40
|
+
input: boolean;
|
|
41
|
+
tableView: boolean;
|
|
42
|
+
reorder?: undefined;
|
|
43
|
+
addAnotherPosition?: undefined;
|
|
44
|
+
layoutFixed?: undefined;
|
|
45
|
+
enableRowGroups?: undefined;
|
|
46
|
+
initEmpty?: undefined;
|
|
47
|
+
components?: undefined;
|
|
48
|
+
})[];
|
|
49
|
+
}
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
title: 'Select in Data Grid',
|
|
5
|
+
name: 'selectInDataGrid',
|
|
6
|
+
path: 'selectInDataGrid',
|
|
7
|
+
type: 'form',
|
|
8
|
+
display: 'form',
|
|
9
|
+
components: [
|
|
10
|
+
{
|
|
11
|
+
label: 'Data Grid',
|
|
12
|
+
reorder: false,
|
|
13
|
+
addAnotherPosition: 'bottom',
|
|
14
|
+
layoutFixed: false,
|
|
15
|
+
enableRowGroups: false,
|
|
16
|
+
initEmpty: false,
|
|
17
|
+
tableView: false,
|
|
18
|
+
key: 'dataGrid',
|
|
19
|
+
type: 'datagrid',
|
|
20
|
+
input: true,
|
|
21
|
+
components: [
|
|
22
|
+
{
|
|
23
|
+
label: 'Select',
|
|
24
|
+
widget: 'choicesjs',
|
|
25
|
+
tableView: true,
|
|
26
|
+
data: {
|
|
27
|
+
values: [
|
|
28
|
+
{
|
|
29
|
+
label: 'Individual',
|
|
30
|
+
value: 'individual'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: 'Entity',
|
|
34
|
+
value: 'entity'
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
validateWhenHidden: false,
|
|
39
|
+
key: 'select',
|
|
40
|
+
type: 'select',
|
|
41
|
+
input: true,
|
|
42
|
+
defaultValue: 'entity'
|
|
43
|
+
},
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'button',
|
|
48
|
+
label: 'Submit',
|
|
49
|
+
key: 'submit',
|
|
50
|
+
disableOnInvalid: true,
|
|
51
|
+
input: true,
|
|
52
|
+
tableView: false
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
};
|
|
@@ -8,6 +8,7 @@ import comp7 from './comp7';
|
|
|
8
8
|
import comp8 from './comp8';
|
|
9
9
|
import comp9 from './comp9';
|
|
10
10
|
import comp10 from './comp10';
|
|
11
|
+
import comp11 from './comp11';
|
|
11
12
|
import withCollapsibleRowGroups from './comp-with-collapsible-groups';
|
|
12
13
|
import withConditionalFieldsAndValidations from './comp-with-conditional-components-and-validations';
|
|
13
14
|
import withDefValue from './comp-with-def-value';
|
|
@@ -18,4 +19,4 @@ import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
|
18
19
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
19
20
|
import withCheckboxes from './comp-with-checkboxes';
|
|
20
21
|
import withReorder from './comp-with-reorder';
|
|
21
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes, withReorder };
|
|
22
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes, withReorder };
|
|
@@ -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.withReorder = exports.withCheckboxes = exports.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
|
6
|
+
exports.withReorder = exports.withCheckboxes = exports.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = exports.comp11 = exports.comp10 = 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"));
|
|
@@ -24,6 +24,8 @@ const comp9_1 = __importDefault(require("./comp9"));
|
|
|
24
24
|
exports.comp9 = comp9_1.default;
|
|
25
25
|
const comp10_1 = __importDefault(require("./comp10"));
|
|
26
26
|
exports.comp10 = comp10_1.default;
|
|
27
|
+
const comp11_1 = __importDefault(require("./comp11"));
|
|
28
|
+
exports.comp11 = comp11_1.default;
|
|
27
29
|
const comp_with_def_value_1 = __importDefault(require("./comp-with-def-value"));
|
|
28
30
|
exports.withDefValue = comp_with_def_value_1.default;
|
|
29
31
|
const comp_row_groups_with_def_value_1 = __importDefault(require("./comp-row-groups-with-def-value"));
|
|
@@ -895,6 +895,7 @@ class EditGridComponent extends NestedArrayComponent_1.default {
|
|
|
895
895
|
}
|
|
896
896
|
this.clearErrors(rowIndex);
|
|
897
897
|
this.baseRemoveRow(rowIndex);
|
|
898
|
+
this.removeSubmissionMetadataRow(rowIndex);
|
|
898
899
|
this.splice(rowIndex);
|
|
899
900
|
this.emit('editGridDeleteRow', {
|
|
900
901
|
index: rowIndex
|
package/lib/mjs/CDN.js
CHANGED
|
@@ -63,7 +63,8 @@ class CDN {
|
|
|
63
63
|
url += `/${lib}`;
|
|
64
64
|
}
|
|
65
65
|
// Only attach the version if this is the hosted cdn.
|
|
66
|
-
if (cdnUrl.
|
|
66
|
+
if (cdnUrl.includes('form.io') &&
|
|
67
|
+
version && version !== 'latest') {
|
|
67
68
|
url += `/${version}`;
|
|
68
69
|
}
|
|
69
70
|
return url;
|
|
@@ -15,5 +15,6 @@ export default class NestedArrayComponent extends NestedDataComponent {
|
|
|
15
15
|
_getEmailTableHeader(options: any): string;
|
|
16
16
|
_getEmailTableBody(options: any): string;
|
|
17
17
|
getComponents(rowIndex: any): any;
|
|
18
|
+
removeSubmissionMetadataRow(index: any): void;
|
|
18
19
|
}
|
|
19
20
|
import NestedDataComponent from '../nesteddata/NestedDataComponent';
|
|
@@ -214,4 +214,10 @@ export default class NestedArrayComponent extends NestedDataComponent {
|
|
|
214
214
|
}
|
|
215
215
|
return super.getComponents();
|
|
216
216
|
}
|
|
217
|
+
removeSubmissionMetadataRow(index) {
|
|
218
|
+
const componentMetadata = _.get(this.root, `submission.metadata.selectData.${this.path}`, null);
|
|
219
|
+
if (_.isArray(componentMetadata)) {
|
|
220
|
+
componentMetadata.splice(index, 1);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
217
223
|
}
|
|
@@ -436,6 +436,7 @@ export default class DataGridComponent extends NestedArrayComponent {
|
|
|
436
436
|
this.splice(index, flags);
|
|
437
437
|
this.emit('dataGridDeleteRow', { index });
|
|
438
438
|
const [row] = this.rows.splice(index, 1);
|
|
439
|
+
this.removeSubmissionMetadataRow(index);
|
|
439
440
|
this.removeRowComponents(row);
|
|
440
441
|
this.updateRowsComponents(index);
|
|
441
442
|
this.setValue(this.dataValue, flags);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let title: string;
|
|
3
|
+
let name: string;
|
|
4
|
+
let path: string;
|
|
5
|
+
let type: string;
|
|
6
|
+
let display: string;
|
|
7
|
+
let components: ({
|
|
8
|
+
label: string;
|
|
9
|
+
reorder: boolean;
|
|
10
|
+
addAnotherPosition: string;
|
|
11
|
+
layoutFixed: boolean;
|
|
12
|
+
enableRowGroups: boolean;
|
|
13
|
+
initEmpty: boolean;
|
|
14
|
+
tableView: boolean;
|
|
15
|
+
key: string;
|
|
16
|
+
type: string;
|
|
17
|
+
input: boolean;
|
|
18
|
+
components: {
|
|
19
|
+
label: string;
|
|
20
|
+
widget: string;
|
|
21
|
+
tableView: boolean;
|
|
22
|
+
data: {
|
|
23
|
+
values: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
validateWhenHidden: boolean;
|
|
29
|
+
key: string;
|
|
30
|
+
type: string;
|
|
31
|
+
input: boolean;
|
|
32
|
+
defaultValue: string;
|
|
33
|
+
}[];
|
|
34
|
+
disableOnInvalid?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
type: string;
|
|
37
|
+
label: string;
|
|
38
|
+
key: string;
|
|
39
|
+
disableOnInvalid: boolean;
|
|
40
|
+
input: boolean;
|
|
41
|
+
tableView: boolean;
|
|
42
|
+
reorder?: undefined;
|
|
43
|
+
addAnotherPosition?: undefined;
|
|
44
|
+
layoutFixed?: undefined;
|
|
45
|
+
enableRowGroups?: undefined;
|
|
46
|
+
initEmpty?: undefined;
|
|
47
|
+
components?: undefined;
|
|
48
|
+
})[];
|
|
49
|
+
}
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Select in Data Grid',
|
|
3
|
+
name: 'selectInDataGrid',
|
|
4
|
+
path: 'selectInDataGrid',
|
|
5
|
+
type: 'form',
|
|
6
|
+
display: 'form',
|
|
7
|
+
components: [
|
|
8
|
+
{
|
|
9
|
+
label: 'Data Grid',
|
|
10
|
+
reorder: false,
|
|
11
|
+
addAnotherPosition: 'bottom',
|
|
12
|
+
layoutFixed: false,
|
|
13
|
+
enableRowGroups: false,
|
|
14
|
+
initEmpty: false,
|
|
15
|
+
tableView: false,
|
|
16
|
+
key: 'dataGrid',
|
|
17
|
+
type: 'datagrid',
|
|
18
|
+
input: true,
|
|
19
|
+
components: [
|
|
20
|
+
{
|
|
21
|
+
label: 'Select',
|
|
22
|
+
widget: 'choicesjs',
|
|
23
|
+
tableView: true,
|
|
24
|
+
data: {
|
|
25
|
+
values: [
|
|
26
|
+
{
|
|
27
|
+
label: 'Individual',
|
|
28
|
+
value: 'individual'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: 'Entity',
|
|
32
|
+
value: 'entity'
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
validateWhenHidden: false,
|
|
37
|
+
key: 'select',
|
|
38
|
+
type: 'select',
|
|
39
|
+
input: true,
|
|
40
|
+
defaultValue: 'entity'
|
|
41
|
+
},
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'button',
|
|
46
|
+
label: 'Submit',
|
|
47
|
+
key: 'submit',
|
|
48
|
+
disableOnInvalid: true,
|
|
49
|
+
input: true,
|
|
50
|
+
tableView: false
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
};
|
|
@@ -8,6 +8,7 @@ import comp7 from './comp7';
|
|
|
8
8
|
import comp8 from './comp8';
|
|
9
9
|
import comp9 from './comp9';
|
|
10
10
|
import comp10 from './comp10';
|
|
11
|
+
import comp11 from './comp11';
|
|
11
12
|
import withCollapsibleRowGroups from './comp-with-collapsible-groups';
|
|
12
13
|
import withConditionalFieldsAndValidations from './comp-with-conditional-components-and-validations';
|
|
13
14
|
import withDefValue from './comp-with-def-value';
|
|
@@ -18,4 +19,4 @@ import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
|
18
19
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
19
20
|
import withCheckboxes from './comp-with-checkboxes';
|
|
20
21
|
import withReorder from './comp-with-reorder';
|
|
21
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes, withReorder };
|
|
22
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes, withReorder };
|
|
@@ -8,6 +8,7 @@ import comp7 from './comp7';
|
|
|
8
8
|
import comp8 from './comp8';
|
|
9
9
|
import comp9 from './comp9';
|
|
10
10
|
import comp10 from './comp10';
|
|
11
|
+
import comp11 from './comp11';
|
|
11
12
|
import withDefValue from './comp-with-def-value';
|
|
12
13
|
import withRowGroupsAndDefValue from './comp-row-groups-with-def-value';
|
|
13
14
|
import modalWithRequiredFields from './comp-modal-with-required-fields';
|
|
@@ -18,4 +19,4 @@ import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
|
18
19
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
19
20
|
import withCheckboxes from './comp-with-checkboxes';
|
|
20
21
|
import withReorder from './comp-with-reorder';
|
|
21
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes, withReorder };
|
|
22
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes, withReorder };
|
|
@@ -885,6 +885,7 @@ export default class EditGridComponent extends NestedArrayComponent {
|
|
|
885
885
|
}
|
|
886
886
|
this.clearErrors(rowIndex);
|
|
887
887
|
this.baseRemoveRow(rowIndex);
|
|
888
|
+
this.removeSubmissionMetadataRow(rowIndex);
|
|
888
889
|
this.splice(rowIndex);
|
|
889
890
|
this.emit('editGridDeleteRow', {
|
|
890
891
|
index: rowIndex
|