@formio/js 5.0.0-dev.5661.22d0f16 → 5.0.0-dev.5664.50b8944
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/Changelog.md +21 -2
- package/dist/formio.form.js +111 -15
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +15 -15
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +2 -2
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +1 -1
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Formio.js +1 -0
- package/lib/cjs/Webform.d.ts +7 -0
- package/lib/cjs/Webform.js +18 -5
- package/lib/cjs/components/_classes/component/Component.d.ts +13 -0
- package/lib/cjs/components/_classes/component/Component.js +27 -13
- package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
- package/lib/cjs/components/_classes/component/fixtures/comp7.d.ts +84 -0
- package/lib/cjs/components/_classes/component/fixtures/comp7.js +86 -0
- package/lib/cjs/components/_classes/component/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/_classes/component/fixtures/index.js +3 -1
- package/lib/cjs/components/_classes/input/Input.js +23 -1
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +8 -1
- package/lib/cjs/components/datagrid/DataGrid.d.ts +9 -0
- package/lib/cjs/components/datagrid/DataGrid.js +50 -32
- package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
- package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.js +139 -0
- 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 +3 -1
- package/lib/cjs/components/datagrid/fixtures/index.js +5 -1
- package/lib/cjs/components/day/Day.d.ts +1 -1
- package/lib/cjs/components/day/Day.js +1 -1
- package/lib/cjs/components/day/fixtures/comp7.d.ts +109 -0
- package/lib/cjs/components/day/fixtures/comp7.js +109 -0
- package/lib/cjs/components/day/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/day/fixtures/index.js +3 -1
- package/lib/cjs/components/editgrid/EditGrid.js +2 -2
- package/lib/cjs/components/form/Form.d.ts +7 -0
- package/lib/cjs/components/form/Form.js +10 -1
- package/lib/cjs/components/number/Number.js +1 -1
- package/lib/cjs/components/number/fixtures/comp8.d.ts +32 -0
- package/lib/cjs/components/number/fixtures/comp8.js +28 -0
- package/lib/cjs/components/number/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/number/fixtures/index.js +3 -1
- package/lib/cjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
- package/lib/cjs/components/phonenumber/fixtures/comp2.js +25 -0
- package/lib/cjs/components/phonenumber/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/phonenumber/fixtures/index.js +3 -1
- package/lib/cjs/components/select/Select.js +1 -2
- package/lib/cjs/components/signature/Signature.d.ts +0 -1
- package/lib/cjs/components/signature/Signature.js +1 -1
- package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +5 -0
- package/lib/cjs/providers/address/GoogleAddressProvider.js +23 -1
- package/lib/cjs/utils/utils.js +0 -4
- package/lib/mjs/Formio.js +1 -0
- package/lib/mjs/Webform.d.ts +7 -0
- package/lib/mjs/Webform.js +18 -5
- package/lib/mjs/components/_classes/component/Component.d.ts +13 -0
- package/lib/mjs/components/_classes/component/Component.js +35 -13
- package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
- package/lib/mjs/components/_classes/component/fixtures/comp7.d.ts +84 -0
- package/lib/mjs/components/_classes/component/fixtures/comp7.js +84 -0
- package/lib/mjs/components/_classes/component/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/_classes/component/fixtures/index.js +2 -1
- package/lib/mjs/components/_classes/input/Input.js +22 -1
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +8 -1
- package/lib/mjs/components/datagrid/DataGrid.d.ts +9 -0
- package/lib/mjs/components/datagrid/DataGrid.js +50 -32
- package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
- package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.js +137 -0
- 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 +3 -1
- package/lib/mjs/components/datagrid/fixtures/index.js +3 -1
- package/lib/mjs/components/day/Day.d.ts +1 -1
- package/lib/mjs/components/day/Day.js +1 -1
- package/lib/mjs/components/day/fixtures/comp7.d.ts +109 -0
- package/lib/mjs/components/day/fixtures/comp7.js +107 -0
- package/lib/mjs/components/day/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/day/fixtures/index.js +2 -1
- package/lib/mjs/components/editgrid/EditGrid.js +2 -2
- package/lib/mjs/components/form/Form.d.ts +7 -0
- package/lib/mjs/components/form/Form.js +10 -1
- package/lib/mjs/components/number/Number.js +1 -1
- package/lib/mjs/components/number/fixtures/comp8.d.ts +32 -0
- package/lib/mjs/components/number/fixtures/comp8.js +26 -0
- package/lib/mjs/components/number/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/number/fixtures/index.js +2 -1
- package/lib/mjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
- package/lib/mjs/components/phonenumber/fixtures/comp2.js +23 -0
- package/lib/mjs/components/phonenumber/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/phonenumber/fixtures/index.js +2 -1
- package/lib/mjs/components/select/Select.js +1 -2
- package/lib/mjs/components/signature/Signature.d.ts +0 -1
- package/lib/mjs/components/signature/Signature.js +1 -1
- package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +5 -0
- package/lib/mjs/providers/address/GoogleAddressProvider.js +22 -1
- package/lib/mjs/utils/utils.js +0 -4
- package/package.json +1 -2
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export { form };
|
|
3
|
+
export { submission };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
declare namespace form {
|
|
7
|
+
let _id: string;
|
|
8
|
+
let title: string;
|
|
9
|
+
let name: string;
|
|
10
|
+
let path: string;
|
|
11
|
+
let type: string;
|
|
12
|
+
let display: string;
|
|
13
|
+
let components: ({
|
|
14
|
+
label: string;
|
|
15
|
+
reorder: boolean;
|
|
16
|
+
addAnotherPosition: string;
|
|
17
|
+
layoutFixed: boolean;
|
|
18
|
+
enableRowGroups: boolean;
|
|
19
|
+
initEmpty: boolean;
|
|
20
|
+
tableView: boolean;
|
|
21
|
+
defaultValue: {
|
|
22
|
+
select: string;
|
|
23
|
+
}[];
|
|
24
|
+
key: string;
|
|
25
|
+
type: string;
|
|
26
|
+
input: boolean;
|
|
27
|
+
components: {
|
|
28
|
+
label: string;
|
|
29
|
+
widget: string;
|
|
30
|
+
tableView: boolean;
|
|
31
|
+
dataSrc: string;
|
|
32
|
+
data: {
|
|
33
|
+
resource: string;
|
|
34
|
+
};
|
|
35
|
+
dataType: string;
|
|
36
|
+
valueProperty: string;
|
|
37
|
+
template: string;
|
|
38
|
+
validate: {
|
|
39
|
+
select: boolean;
|
|
40
|
+
};
|
|
41
|
+
key: string;
|
|
42
|
+
type: string;
|
|
43
|
+
searchField: string;
|
|
44
|
+
limit: number;
|
|
45
|
+
noRefreshOnScroll: boolean;
|
|
46
|
+
addResource: boolean;
|
|
47
|
+
reference: boolean;
|
|
48
|
+
input: boolean;
|
|
49
|
+
}[];
|
|
50
|
+
disableOnInvalid?: undefined;
|
|
51
|
+
} | {
|
|
52
|
+
type: string;
|
|
53
|
+
label: string;
|
|
54
|
+
key: string;
|
|
55
|
+
disableOnInvalid: boolean;
|
|
56
|
+
input: boolean;
|
|
57
|
+
tableView: boolean;
|
|
58
|
+
reorder?: undefined;
|
|
59
|
+
addAnotherPosition?: undefined;
|
|
60
|
+
layoutFixed?: undefined;
|
|
61
|
+
enableRowGroups?: undefined;
|
|
62
|
+
initEmpty?: undefined;
|
|
63
|
+
defaultValue?: undefined;
|
|
64
|
+
components?: undefined;
|
|
65
|
+
})[];
|
|
66
|
+
let created: string;
|
|
67
|
+
let modified: string;
|
|
68
|
+
let machineName: string;
|
|
69
|
+
}
|
|
70
|
+
declare namespace submission {
|
|
71
|
+
let form_1: string;
|
|
72
|
+
export { form_1 as form };
|
|
73
|
+
export namespace metadata {
|
|
74
|
+
namespace selectData {
|
|
75
|
+
let dataGrid: {
|
|
76
|
+
select: {
|
|
77
|
+
data: {
|
|
78
|
+
number: number;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
}[];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export namespace data {
|
|
85
|
+
let dataGrid_1: {
|
|
86
|
+
select: string;
|
|
87
|
+
}[];
|
|
88
|
+
export { dataGrid_1 as dataGrid };
|
|
89
|
+
export let dataTable: never[];
|
|
90
|
+
export let submit: boolean;
|
|
91
|
+
}
|
|
92
|
+
let _id_1: string;
|
|
93
|
+
export { _id_1 as _id };
|
|
94
|
+
export let project: string;
|
|
95
|
+
export let state: string;
|
|
96
|
+
let created_1: string;
|
|
97
|
+
export { created_1 as created };
|
|
98
|
+
let modified_1: string;
|
|
99
|
+
export { modified_1 as modified };
|
|
100
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const form = {
|
|
4
|
+
_id: '66742f4146717b98a9fa280f',
|
|
5
|
+
title: 'test reorder',
|
|
6
|
+
name: 'testReorder',
|
|
7
|
+
path: 'testreorder',
|
|
8
|
+
type: 'form',
|
|
9
|
+
display: 'form',
|
|
10
|
+
components: [
|
|
11
|
+
{
|
|
12
|
+
label: 'Data Grid',
|
|
13
|
+
reorder: true,
|
|
14
|
+
addAnotherPosition: 'bottom',
|
|
15
|
+
layoutFixed: false,
|
|
16
|
+
enableRowGroups: false,
|
|
17
|
+
initEmpty: false,
|
|
18
|
+
tableView: false,
|
|
19
|
+
defaultValue: [
|
|
20
|
+
{
|
|
21
|
+
select: '',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
key: 'dataGrid',
|
|
25
|
+
type: 'datagrid',
|
|
26
|
+
input: true,
|
|
27
|
+
components: [
|
|
28
|
+
{
|
|
29
|
+
label: 'Select',
|
|
30
|
+
widget: 'choicesjs',
|
|
31
|
+
tableView: true,
|
|
32
|
+
dataSrc: 'resource',
|
|
33
|
+
data: {
|
|
34
|
+
resource: '66742ee946717b98a9fa1b0b',
|
|
35
|
+
},
|
|
36
|
+
dataType: 'string',
|
|
37
|
+
valueProperty: 'data.textField',
|
|
38
|
+
template: '<span>{{ item.data.number }}</span>',
|
|
39
|
+
validate: {
|
|
40
|
+
select: false,
|
|
41
|
+
},
|
|
42
|
+
key: 'select',
|
|
43
|
+
type: 'select',
|
|
44
|
+
searchField: 'data.textField__regex',
|
|
45
|
+
limit: 10,
|
|
46
|
+
noRefreshOnScroll: false,
|
|
47
|
+
addResource: false,
|
|
48
|
+
reference: false,
|
|
49
|
+
input: true,
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: 'button',
|
|
55
|
+
label: 'Submit',
|
|
56
|
+
key: 'submit',
|
|
57
|
+
disableOnInvalid: true,
|
|
58
|
+
input: true,
|
|
59
|
+
tableView: false,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
created: '2024-06-20T13:31:45.177Z',
|
|
63
|
+
modified: '2024-06-25T10:32:46.577Z',
|
|
64
|
+
machineName: 'tifwklexhyrgxbr:testReorder',
|
|
65
|
+
};
|
|
66
|
+
const submission = {
|
|
67
|
+
form: '66742f4146717b98a9fa280f',
|
|
68
|
+
metadata: {
|
|
69
|
+
selectData: {
|
|
70
|
+
dataGrid: [
|
|
71
|
+
{
|
|
72
|
+
select: {
|
|
73
|
+
data: {
|
|
74
|
+
number: 1,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
select: {
|
|
80
|
+
data: {
|
|
81
|
+
number: 2,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
select: {
|
|
87
|
+
data: {
|
|
88
|
+
number: 3,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
select: {
|
|
94
|
+
data: {
|
|
95
|
+
number: 4,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
select: {
|
|
101
|
+
data: {
|
|
102
|
+
number: 5,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
data: {
|
|
110
|
+
dataGrid: [
|
|
111
|
+
{
|
|
112
|
+
select: '11',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
select: '22',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
select: '33',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
select: '44',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
select: '55',
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
dataTable: [],
|
|
128
|
+
submit: true,
|
|
129
|
+
},
|
|
130
|
+
_id: '667ab5ee6a69739703d30def',
|
|
131
|
+
project: '65df46bc93bcfaa231f3db1c',
|
|
132
|
+
state: 'submitted',
|
|
133
|
+
created: '2024-06-25T12:19:58.626Z',
|
|
134
|
+
modified: '2024-06-25T12:19:58.627Z',
|
|
135
|
+
};
|
|
136
|
+
exports.default = {
|
|
137
|
+
form,
|
|
138
|
+
submission,
|
|
139
|
+
};
|
|
@@ -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,5 @@ 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
|
-
|
|
19
|
+
import withReorder from './comp-with-reorder';
|
|
20
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, 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.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.withReorder = 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"));
|
|
@@ -38,3 +40,5 @@ const two_comp_with_allow_calculate_override_1 = __importDefault(require("./two-
|
|
|
38
40
|
exports.twoWithAllowCalculatedOverride = two_comp_with_allow_calculate_override_1.default;
|
|
39
41
|
const comp_with_checkboxes_1 = __importDefault(require("./comp-with-checkboxes"));
|
|
40
42
|
exports.withCheckboxes = comp_with_checkboxes_1.default;
|
|
43
|
+
const comp_with_reorder_1 = __importDefault(require("./comp-with-reorder"));
|
|
44
|
+
exports.withReorder = comp_with_reorder_1.default;
|
|
@@ -124,7 +124,7 @@ class DayComponent extends Field_1.default {
|
|
|
124
124
|
id: `${this.component.key}-${name}`,
|
|
125
125
|
class: `form-control ${this.transform('class', `formio-day-component-${name}`)}`,
|
|
126
126
|
type: this.component.fields[name].type === 'select' ? 'select' : 'number',
|
|
127
|
-
placeholder: this.component.fields[name].placeholder,
|
|
127
|
+
placeholder: this.t(this.component.fields[name].placeholder),
|
|
128
128
|
step: 1,
|
|
129
129
|
min,
|
|
130
130
|
max,
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let components: ({
|
|
3
|
+
type: string;
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
placeholder: string;
|
|
7
|
+
input: boolean;
|
|
8
|
+
applyMaskOn?: undefined;
|
|
9
|
+
tableView?: undefined;
|
|
10
|
+
hideInputLabels?: undefined;
|
|
11
|
+
inputsLabelPosition?: undefined;
|
|
12
|
+
useLocaleSettings?: undefined;
|
|
13
|
+
fields?: undefined;
|
|
14
|
+
defaultValue?: undefined;
|
|
15
|
+
values?: undefined;
|
|
16
|
+
questions?: undefined;
|
|
17
|
+
action?: undefined;
|
|
18
|
+
theme?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
label: string;
|
|
21
|
+
placeholder: string;
|
|
22
|
+
applyMaskOn: string;
|
|
23
|
+
tableView: boolean;
|
|
24
|
+
key: string;
|
|
25
|
+
type: string;
|
|
26
|
+
input: boolean;
|
|
27
|
+
hideInputLabels?: undefined;
|
|
28
|
+
inputsLabelPosition?: undefined;
|
|
29
|
+
useLocaleSettings?: undefined;
|
|
30
|
+
fields?: undefined;
|
|
31
|
+
defaultValue?: undefined;
|
|
32
|
+
values?: undefined;
|
|
33
|
+
questions?: undefined;
|
|
34
|
+
action?: undefined;
|
|
35
|
+
theme?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
label: string;
|
|
38
|
+
hideInputLabels: boolean;
|
|
39
|
+
inputsLabelPosition: string;
|
|
40
|
+
useLocaleSettings: boolean;
|
|
41
|
+
tableView: boolean;
|
|
42
|
+
fields: {
|
|
43
|
+
day: {
|
|
44
|
+
placeholder: string;
|
|
45
|
+
hide: boolean;
|
|
46
|
+
};
|
|
47
|
+
month: {
|
|
48
|
+
type: string;
|
|
49
|
+
placeholder: string;
|
|
50
|
+
hide: boolean;
|
|
51
|
+
};
|
|
52
|
+
year: {
|
|
53
|
+
placeholder: string;
|
|
54
|
+
hide: boolean;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
key: string;
|
|
58
|
+
type: string;
|
|
59
|
+
input: boolean;
|
|
60
|
+
defaultValue: string;
|
|
61
|
+
placeholder?: undefined;
|
|
62
|
+
applyMaskOn?: undefined;
|
|
63
|
+
values?: undefined;
|
|
64
|
+
questions?: undefined;
|
|
65
|
+
action?: undefined;
|
|
66
|
+
theme?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
type: string;
|
|
69
|
+
key: string;
|
|
70
|
+
label: string;
|
|
71
|
+
values: {
|
|
72
|
+
label: string;
|
|
73
|
+
value: string;
|
|
74
|
+
}[];
|
|
75
|
+
questions: {
|
|
76
|
+
label: string;
|
|
77
|
+
value: string;
|
|
78
|
+
}[];
|
|
79
|
+
placeholder?: undefined;
|
|
80
|
+
input?: undefined;
|
|
81
|
+
applyMaskOn?: undefined;
|
|
82
|
+
tableView?: undefined;
|
|
83
|
+
hideInputLabels?: undefined;
|
|
84
|
+
inputsLabelPosition?: undefined;
|
|
85
|
+
useLocaleSettings?: undefined;
|
|
86
|
+
fields?: undefined;
|
|
87
|
+
defaultValue?: undefined;
|
|
88
|
+
action?: undefined;
|
|
89
|
+
theme?: undefined;
|
|
90
|
+
} | {
|
|
91
|
+
type: string;
|
|
92
|
+
action: string;
|
|
93
|
+
label: string;
|
|
94
|
+
theme: string;
|
|
95
|
+
key?: undefined;
|
|
96
|
+
placeholder?: undefined;
|
|
97
|
+
input?: undefined;
|
|
98
|
+
applyMaskOn?: undefined;
|
|
99
|
+
tableView?: undefined;
|
|
100
|
+
hideInputLabels?: undefined;
|
|
101
|
+
inputsLabelPosition?: undefined;
|
|
102
|
+
useLocaleSettings?: undefined;
|
|
103
|
+
fields?: undefined;
|
|
104
|
+
defaultValue?: undefined;
|
|
105
|
+
values?: undefined;
|
|
106
|
+
questions?: undefined;
|
|
107
|
+
})[];
|
|
108
|
+
}
|
|
109
|
+
export default _default;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
components: [
|
|
5
|
+
{
|
|
6
|
+
type: 'textfield',
|
|
7
|
+
key: 'firstName',
|
|
8
|
+
label: 'First Name',
|
|
9
|
+
placeholder: 'Enter your first name',
|
|
10
|
+
input: true
|
|
11
|
+
}, {
|
|
12
|
+
"label": "Day",
|
|
13
|
+
"placeholder": "Day",
|
|
14
|
+
"applyMaskOn": "change",
|
|
15
|
+
"tableView": true,
|
|
16
|
+
"key": "day2",
|
|
17
|
+
"type": "textfield",
|
|
18
|
+
"input": true
|
|
19
|
+
}, {
|
|
20
|
+
"label": "Month",
|
|
21
|
+
"placeholder": "Month",
|
|
22
|
+
"applyMaskOn": "change",
|
|
23
|
+
"tableView": true,
|
|
24
|
+
"key": "month2",
|
|
25
|
+
"type": "textfield",
|
|
26
|
+
"input": true
|
|
27
|
+
}, {
|
|
28
|
+
"label": "Year",
|
|
29
|
+
"placeholder": "Year",
|
|
30
|
+
"applyMaskOn": "change",
|
|
31
|
+
"tableView": true,
|
|
32
|
+
"key": "year2",
|
|
33
|
+
"type": "textfield",
|
|
34
|
+
"input": true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"label": "Day",
|
|
38
|
+
"hideInputLabels": false,
|
|
39
|
+
"inputsLabelPosition": "top",
|
|
40
|
+
"useLocaleSettings": false,
|
|
41
|
+
"tableView": false,
|
|
42
|
+
"fields": {
|
|
43
|
+
"day": {
|
|
44
|
+
"placeholder": "Day",
|
|
45
|
+
"hide": false
|
|
46
|
+
},
|
|
47
|
+
"month": {
|
|
48
|
+
"type": "number",
|
|
49
|
+
"placeholder": "Month",
|
|
50
|
+
"hide": false
|
|
51
|
+
},
|
|
52
|
+
"year": {
|
|
53
|
+
"placeholder": "Year",
|
|
54
|
+
"hide": false
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"key": "day",
|
|
58
|
+
"type": "day",
|
|
59
|
+
"input": true,
|
|
60
|
+
"defaultValue": "00/00/0000"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'textfield',
|
|
64
|
+
key: 'lastName',
|
|
65
|
+
label: 'Last Name',
|
|
66
|
+
placeholder: 'Enter your last name',
|
|
67
|
+
input: true
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: 'survey',
|
|
71
|
+
key: 'questions',
|
|
72
|
+
label: 'Survey',
|
|
73
|
+
values: [
|
|
74
|
+
{
|
|
75
|
+
label: 'Great',
|
|
76
|
+
value: 'great'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: 'Good',
|
|
80
|
+
value: 'good'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: 'Poor',
|
|
84
|
+
value: 'poor'
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
questions: [
|
|
88
|
+
{
|
|
89
|
+
label: 'How would you rate the Form.io platform?',
|
|
90
|
+
value: 'howWouldYouRateTheFormIoPlatform'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: 'How was Customer Support?',
|
|
94
|
+
value: 'howWasCustomerSupport'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: 'Overall Experience?',
|
|
98
|
+
value: 'overallExperience'
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
type: 'button',
|
|
104
|
+
action: 'submit',
|
|
105
|
+
label: 'Submit',
|
|
106
|
+
theme: 'primary'
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
};
|
|
@@ -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.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
|
6
|
+
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"));
|
|
@@ -16,3 +16,5 @@ const comp5_1 = __importDefault(require("./comp5"));
|
|
|
16
16
|
exports.comp5 = comp5_1.default;
|
|
17
17
|
const comp6_1 = __importDefault(require("./comp6"));
|
|
18
18
|
exports.comp6 = comp6_1.default;
|
|
19
|
+
const comp7_1 = __importDefault(require("./comp7"));
|
|
20
|
+
exports.comp7 = comp7_1.default;
|
|
@@ -88,7 +88,7 @@ class EditGridComponent extends NestedArrayComponent_1.default {
|
|
|
88
88
|
{% if (!instance.options.readOnly && !instance.disabled) { %}
|
|
89
89
|
<div class="col-sm-2">
|
|
90
90
|
<div class="btn-group pull-right">
|
|
91
|
-
<button class="btn btn-default btn-light btn-sm editRow"><i class="{{ iconClass('
|
|
91
|
+
<button class="btn btn-default btn-light btn-sm editRow"><i class="{{ iconClass('edit') }}"></i></button>
|
|
92
92
|
{% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}
|
|
93
93
|
<button class="btn btn-danger btn-sm removeRow"><i class="{{ iconClass('trash') }}"></i></button>
|
|
94
94
|
{% } %}
|
|
@@ -109,7 +109,7 @@ class EditGridComponent extends NestedArrayComponent_1.default {
|
|
|
109
109
|
{% if (!instance.options.readOnly && !instance.disabled) { %}
|
|
110
110
|
<td class="editgrid-table-column">
|
|
111
111
|
<div class="btn-group">
|
|
112
|
-
<button class="btn btn-default btn-light btn-sm editRow" aria-label="{{ t('Edit row') }}"><i class="{{ iconClass('
|
|
112
|
+
<button class="btn btn-default btn-light btn-sm editRow" aria-label="{{ t('Edit row') }}"><i class="{{ iconClass('edit') }}"></i></button>
|
|
113
113
|
{% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}
|
|
114
114
|
<button class="btn btn-danger btn-sm removeRow" aria-label="{{ t('Remove row') }}"><i class="{{ iconClass('trash') }}"></i></button>
|
|
115
115
|
{% } %}
|
|
@@ -90,6 +90,13 @@ export default class FormComponent extends Component {
|
|
|
90
90
|
isHidden(): boolean;
|
|
91
91
|
setValue(submission: any, flags?: {}): boolean;
|
|
92
92
|
setSubFormValue(submission: any, flags: any): void;
|
|
93
|
+
/**
|
|
94
|
+
* Sets the subform value
|
|
95
|
+
* @param {object|null|undefined} submission - The submission to set.
|
|
96
|
+
* @param {object|null|undefined} flags - Any flags to apply when setting the submission.
|
|
97
|
+
* @returns {void}
|
|
98
|
+
*/
|
|
99
|
+
onSetSubFormValue(submission: object | null | undefined, flags: object | null | undefined): void;
|
|
93
100
|
areAllComponentsEmpty(data: any): boolean;
|
|
94
101
|
updateSubFormVisibility(): void;
|
|
95
102
|
/**
|
|
@@ -649,9 +649,18 @@ class FormComponent extends Component_1.default {
|
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
651
|
else {
|
|
652
|
-
this.
|
|
652
|
+
this.onSetSubFormValue(submission, flags);
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
+
/**
|
|
656
|
+
* Sets the subform value
|
|
657
|
+
* @param {object|null|undefined} submission - The submission to set.
|
|
658
|
+
* @param {object|null|undefined} flags - Any flags to apply when setting the submission.
|
|
659
|
+
* @returns {void}
|
|
660
|
+
*/
|
|
661
|
+
onSetSubFormValue(submission, flags) {
|
|
662
|
+
this.subForm.setValue(submission, flags);
|
|
663
|
+
}
|
|
655
664
|
isEmpty(value = this.dataValue) {
|
|
656
665
|
return value === null || lodash_1.default.isEqual(value, this.emptyValue) || (this.areAllComponentsEmpty(value === null || value === void 0 ? void 0 : value.data) && !(value === null || value === void 0 ? void 0 : value._id));
|
|
657
666
|
}
|