@formio/js 5.0.0-dev.5713.ee12658 → 5.0.0-dev.5714.6318ec3
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 +18 -0
- package/dist/formio.form.js +34 -24
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +2 -0
- package/dist/formio.full.js +38 -28
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +2 -0
- package/dist/formio.utils.js +12 -2
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +2 -0
- package/lib/cjs/Form.d.ts +2 -2
- package/lib/cjs/Form.js +9 -3
- package/lib/cjs/PDF.js +1 -1
- package/lib/cjs/Webform.js +1 -2
- package/lib/cjs/WebformBuilder.js +13 -3
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +2 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.js +5 -1
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -0
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +50 -29
- package/lib/cjs/components/currency/Currency.d.ts +1 -0
- package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -1
- package/lib/cjs/components/datagrid/DataGrid.js +0 -8
- package/lib/cjs/components/datamap/DataMap.js +1 -1
- package/lib/cjs/components/day/Day.d.ts +2 -2
- package/lib/cjs/components/day/Day.js +3 -3
- package/lib/cjs/components/editgrid/EditGrid.js +1 -5
- package/lib/cjs/components/editgrid/fixtures/comp17.d.ts +80 -0
- package/lib/cjs/components/editgrid/fixtures/comp17.js +99 -0
- package/lib/cjs/components/editgrid/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/editgrid/fixtures/index.js +3 -1
- package/lib/cjs/components/file/File.js +4 -0
- package/lib/cjs/components/form/editForm/Form.edit.form.js +1 -1
- package/lib/cjs/components/number/Number.d.ts +7 -1
- package/lib/cjs/components/number/Number.js +11 -0
- package/lib/cjs/components/number/editForm/Number.edit.data.d.ts +0 -32
- package/lib/cjs/components/number/editForm/Number.edit.data.js +2 -29
- package/lib/cjs/components/number/fixtures/comp10.d.ts +18 -0
- package/lib/cjs/components/number/fixtures/comp10.js +21 -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/panel/Panel.d.ts +1 -0
- package/lib/cjs/components/panel/Panel.js +1 -0
- package/lib/cjs/components/radio/Radio.js +7 -6
- package/lib/cjs/components/radio/fixtures/comp12.d.ts +29 -0
- package/lib/cjs/components/radio/fixtures/comp12.js +36 -0
- package/lib/cjs/components/radio/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/radio/fixtures/index.js +3 -1
- package/lib/cjs/components/select/Select.d.ts +38 -0
- package/lib/cjs/components/select/Select.js +10 -0
- package/lib/cjs/components/select/fixtures/comp25.d.ts +44 -0
- package/lib/cjs/components/select/fixtures/comp25.js +59 -0
- package/lib/cjs/components/select/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/select/fixtures/index.js +3 -1
- package/lib/cjs/components/time/Time.d.ts +2 -2
- package/lib/cjs/components/time/Time.form.js +2 -2
- package/lib/cjs/components/time/Time.js +3 -2
- package/lib/cjs/components/time/fixtures/comp4.d.ts +166 -0
- package/lib/cjs/components/time/fixtures/comp4.js +171 -0
- package/lib/cjs/components/time/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/time/fixtures/index.js +3 -1
- package/lib/cjs/templates/Templates.js +1 -1
- package/lib/cjs/translations/en.d.ts +1 -0
- package/lib/cjs/translations/en.js +1 -0
- package/lib/mjs/Form.d.ts +2 -2
- package/lib/mjs/Form.js +9 -3
- package/lib/mjs/PDF.js +1 -1
- package/lib/mjs/Webform.js +1 -2
- package/lib/mjs/WebformBuilder.js +12 -3
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +2 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.js +5 -1
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -0
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +51 -29
- package/lib/mjs/components/currency/Currency.d.ts +1 -0
- package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -1
- package/lib/mjs/components/datagrid/DataGrid.js +0 -8
- package/lib/mjs/components/datamap/DataMap.js +1 -1
- package/lib/mjs/components/day/Day.d.ts +2 -2
- package/lib/mjs/components/day/Day.js +3 -3
- package/lib/mjs/components/editgrid/EditGrid.js +1 -5
- package/lib/mjs/components/editgrid/fixtures/comp17.d.ts +80 -0
- package/lib/mjs/components/editgrid/fixtures/comp17.js +97 -0
- package/lib/mjs/components/editgrid/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/editgrid/fixtures/index.js +2 -1
- package/lib/mjs/components/file/File.js +4 -0
- package/lib/mjs/components/form/editForm/Form.edit.form.js +1 -1
- package/lib/mjs/components/number/Number.d.ts +7 -1
- package/lib/mjs/components/number/Number.js +11 -0
- package/lib/mjs/components/number/editForm/Number.edit.data.d.ts +0 -32
- package/lib/mjs/components/number/editForm/Number.edit.data.js +2 -29
- package/lib/mjs/components/number/fixtures/comp10.d.ts +18 -0
- package/lib/mjs/components/number/fixtures/comp10.js +19 -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/panel/Panel.d.ts +1 -0
- package/lib/mjs/components/panel/Panel.js +1 -0
- package/lib/mjs/components/radio/Radio.js +7 -6
- package/lib/mjs/components/radio/fixtures/comp12.d.ts +29 -0
- package/lib/mjs/components/radio/fixtures/comp12.js +34 -0
- package/lib/mjs/components/radio/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/radio/fixtures/index.js +2 -1
- package/lib/mjs/components/select/Select.d.ts +38 -0
- package/lib/mjs/components/select/Select.js +13 -1
- package/lib/mjs/components/select/fixtures/comp25.d.ts +44 -0
- package/lib/mjs/components/select/fixtures/comp25.js +57 -0
- package/lib/mjs/components/select/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/select/fixtures/index.js +2 -1
- package/lib/mjs/components/time/Time.d.ts +2 -2
- package/lib/mjs/components/time/Time.form.js +2 -2
- package/lib/mjs/components/time/Time.js +3 -2
- package/lib/mjs/components/time/fixtures/comp4.d.ts +166 -0
- package/lib/mjs/components/time/fixtures/comp4.js +169 -0
- package/lib/mjs/components/time/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/time/fixtures/index.js +2 -1
- package/lib/mjs/templates/Templates.js +1 -1
- package/lib/mjs/translations/en.d.ts +1 -0
- package/lib/mjs/translations/en.js +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let type: string;
|
|
3
|
+
let display: string;
|
|
4
|
+
let components: {
|
|
5
|
+
title: string;
|
|
6
|
+
breadcrumbClickable: boolean;
|
|
7
|
+
buttonSettings: {
|
|
8
|
+
previous: boolean;
|
|
9
|
+
cancel: boolean;
|
|
10
|
+
next: boolean;
|
|
11
|
+
};
|
|
12
|
+
navigateOnEnter: boolean;
|
|
13
|
+
saveOnEnter: boolean;
|
|
14
|
+
scrollToTop: boolean;
|
|
15
|
+
collapsible: boolean;
|
|
16
|
+
key: string;
|
|
17
|
+
type: string;
|
|
18
|
+
label: string;
|
|
19
|
+
components: {
|
|
20
|
+
label: string;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
alwaysEnabled: boolean;
|
|
23
|
+
tableView: boolean;
|
|
24
|
+
defaultValue: string;
|
|
25
|
+
key: string;
|
|
26
|
+
type: string;
|
|
27
|
+
input: boolean;
|
|
28
|
+
inputMask: string;
|
|
29
|
+
hideOnChildrenHidden: boolean;
|
|
30
|
+
id: string;
|
|
31
|
+
placeholder: string;
|
|
32
|
+
prefix: string;
|
|
33
|
+
customClass: string;
|
|
34
|
+
suffix: string;
|
|
35
|
+
multiple: boolean;
|
|
36
|
+
protected: boolean;
|
|
37
|
+
unique: boolean;
|
|
38
|
+
persistent: boolean;
|
|
39
|
+
hidden: boolean;
|
|
40
|
+
clearOnHide: boolean;
|
|
41
|
+
refreshOn: string;
|
|
42
|
+
redrawOn: string;
|
|
43
|
+
modalEdit: boolean;
|
|
44
|
+
dataGridLabel: boolean;
|
|
45
|
+
labelPosition: string;
|
|
46
|
+
description: string;
|
|
47
|
+
errorLabel: string;
|
|
48
|
+
tooltip: string;
|
|
49
|
+
hideLabel: boolean;
|
|
50
|
+
tabindex: string;
|
|
51
|
+
autofocus: boolean;
|
|
52
|
+
dbIndex: boolean;
|
|
53
|
+
customDefaultValue: string;
|
|
54
|
+
calculateValue: string;
|
|
55
|
+
calculateServer: boolean;
|
|
56
|
+
widget: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
attributes: {};
|
|
60
|
+
validateOn: string;
|
|
61
|
+
validate: {
|
|
62
|
+
required: boolean;
|
|
63
|
+
custom: string;
|
|
64
|
+
customPrivate: boolean;
|
|
65
|
+
strictDateValidation: boolean;
|
|
66
|
+
multiple: boolean;
|
|
67
|
+
unique: boolean;
|
|
68
|
+
minLength: string;
|
|
69
|
+
maxLength: string;
|
|
70
|
+
pattern: string;
|
|
71
|
+
};
|
|
72
|
+
conditional: {
|
|
73
|
+
show: null;
|
|
74
|
+
when: null;
|
|
75
|
+
eq: string;
|
|
76
|
+
};
|
|
77
|
+
overlay: {
|
|
78
|
+
style: string;
|
|
79
|
+
left: string;
|
|
80
|
+
top: string;
|
|
81
|
+
width: string;
|
|
82
|
+
height: string;
|
|
83
|
+
};
|
|
84
|
+
allowCalculateOverride: boolean;
|
|
85
|
+
encrypted: boolean;
|
|
86
|
+
showCharCount: boolean;
|
|
87
|
+
showWordCount: boolean;
|
|
88
|
+
properties: {};
|
|
89
|
+
allowMultipleMasks: boolean;
|
|
90
|
+
addons: never[];
|
|
91
|
+
mask: boolean;
|
|
92
|
+
inputType: string;
|
|
93
|
+
inputFormat: string;
|
|
94
|
+
displayMask: string;
|
|
95
|
+
spellcheck: boolean;
|
|
96
|
+
truncateMultipleSpaces: boolean;
|
|
97
|
+
format: string;
|
|
98
|
+
dataFormat: string;
|
|
99
|
+
}[];
|
|
100
|
+
input: boolean;
|
|
101
|
+
tableView: boolean;
|
|
102
|
+
id: string;
|
|
103
|
+
placeholder: string;
|
|
104
|
+
prefix: string;
|
|
105
|
+
customClass: string;
|
|
106
|
+
suffix: string;
|
|
107
|
+
multiple: boolean;
|
|
108
|
+
defaultValue: null;
|
|
109
|
+
protected: boolean;
|
|
110
|
+
unique: boolean;
|
|
111
|
+
persistent: boolean;
|
|
112
|
+
hidden: boolean;
|
|
113
|
+
clearOnHide: boolean;
|
|
114
|
+
refreshOn: string;
|
|
115
|
+
redrawOn: string;
|
|
116
|
+
modalEdit: boolean;
|
|
117
|
+
dataGridLabel: boolean;
|
|
118
|
+
labelPosition: string;
|
|
119
|
+
description: string;
|
|
120
|
+
errorLabel: string;
|
|
121
|
+
tooltip: string;
|
|
122
|
+
hideLabel: boolean;
|
|
123
|
+
tabindex: string;
|
|
124
|
+
disabled: boolean;
|
|
125
|
+
autofocus: boolean;
|
|
126
|
+
dbIndex: boolean;
|
|
127
|
+
customDefaultValue: string;
|
|
128
|
+
calculateValue: string;
|
|
129
|
+
calculateServer: boolean;
|
|
130
|
+
widget: null;
|
|
131
|
+
attributes: {};
|
|
132
|
+
validateOn: string;
|
|
133
|
+
validate: {
|
|
134
|
+
required: boolean;
|
|
135
|
+
custom: string;
|
|
136
|
+
customPrivate: boolean;
|
|
137
|
+
strictDateValidation: boolean;
|
|
138
|
+
multiple: boolean;
|
|
139
|
+
unique: boolean;
|
|
140
|
+
};
|
|
141
|
+
conditional: {
|
|
142
|
+
show: null;
|
|
143
|
+
when: null;
|
|
144
|
+
eq: string;
|
|
145
|
+
};
|
|
146
|
+
overlay: {
|
|
147
|
+
style: string;
|
|
148
|
+
left: string;
|
|
149
|
+
top: string;
|
|
150
|
+
width: string;
|
|
151
|
+
height: string;
|
|
152
|
+
};
|
|
153
|
+
allowCalculateOverride: boolean;
|
|
154
|
+
encrypted: boolean;
|
|
155
|
+
showCharCount: boolean;
|
|
156
|
+
showWordCount: boolean;
|
|
157
|
+
properties: {};
|
|
158
|
+
allowMultipleMasks: boolean;
|
|
159
|
+
addons: never[];
|
|
160
|
+
tree: boolean;
|
|
161
|
+
lazyLoad: boolean;
|
|
162
|
+
theme: string;
|
|
163
|
+
breadcrumb: string;
|
|
164
|
+
}[];
|
|
165
|
+
}
|
|
166
|
+
export default _default;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
"type": "form",
|
|
5
|
+
"display": "wizard",
|
|
6
|
+
"components": [
|
|
7
|
+
{
|
|
8
|
+
"title": "Page 1",
|
|
9
|
+
"breadcrumbClickable": true,
|
|
10
|
+
"buttonSettings": {
|
|
11
|
+
"previous": true,
|
|
12
|
+
"cancel": true,
|
|
13
|
+
"next": true
|
|
14
|
+
},
|
|
15
|
+
"navigateOnEnter": false,
|
|
16
|
+
"saveOnEnter": false,
|
|
17
|
+
"scrollToTop": false,
|
|
18
|
+
"collapsible": false,
|
|
19
|
+
"key": "page1",
|
|
20
|
+
"type": "panel",
|
|
21
|
+
"label": "Page 1",
|
|
22
|
+
"components": [
|
|
23
|
+
{
|
|
24
|
+
"label": "Time",
|
|
25
|
+
"disabled": true,
|
|
26
|
+
"alwaysEnabled": false,
|
|
27
|
+
"tableView": true,
|
|
28
|
+
"defaultValue": "03:03 PM",
|
|
29
|
+
"key": "time1",
|
|
30
|
+
"type": "time",
|
|
31
|
+
"input": true,
|
|
32
|
+
"inputMask": "99:99",
|
|
33
|
+
"hideOnChildrenHidden": false,
|
|
34
|
+
"id": "efw9yyq",
|
|
35
|
+
"placeholder": "",
|
|
36
|
+
"prefix": "",
|
|
37
|
+
"customClass": "",
|
|
38
|
+
"suffix": "",
|
|
39
|
+
"multiple": false,
|
|
40
|
+
"protected": false,
|
|
41
|
+
"unique": false,
|
|
42
|
+
"persistent": true,
|
|
43
|
+
"hidden": false,
|
|
44
|
+
"clearOnHide": true,
|
|
45
|
+
"refreshOn": "",
|
|
46
|
+
"redrawOn": "",
|
|
47
|
+
"modalEdit": false,
|
|
48
|
+
"dataGridLabel": false,
|
|
49
|
+
"labelPosition": "top",
|
|
50
|
+
"description": "",
|
|
51
|
+
"errorLabel": "",
|
|
52
|
+
"tooltip": "",
|
|
53
|
+
"hideLabel": false,
|
|
54
|
+
"tabindex": "",
|
|
55
|
+
"autofocus": false,
|
|
56
|
+
"dbIndex": false,
|
|
57
|
+
"customDefaultValue": "",
|
|
58
|
+
"calculateValue": "",
|
|
59
|
+
"calculateServer": false,
|
|
60
|
+
"widget": {
|
|
61
|
+
"type": "input"
|
|
62
|
+
},
|
|
63
|
+
"attributes": {},
|
|
64
|
+
"validateOn": "change",
|
|
65
|
+
"validate": {
|
|
66
|
+
"required": false,
|
|
67
|
+
"custom": "",
|
|
68
|
+
"customPrivate": false,
|
|
69
|
+
"strictDateValidation": false,
|
|
70
|
+
"multiple": false,
|
|
71
|
+
"unique": false,
|
|
72
|
+
"minLength": "",
|
|
73
|
+
"maxLength": "",
|
|
74
|
+
"pattern": ""
|
|
75
|
+
},
|
|
76
|
+
"conditional": {
|
|
77
|
+
"show": null,
|
|
78
|
+
"when": null,
|
|
79
|
+
"eq": ""
|
|
80
|
+
},
|
|
81
|
+
"overlay": {
|
|
82
|
+
"style": "",
|
|
83
|
+
"left": "",
|
|
84
|
+
"top": "",
|
|
85
|
+
"width": "",
|
|
86
|
+
"height": ""
|
|
87
|
+
},
|
|
88
|
+
"allowCalculateOverride": false,
|
|
89
|
+
"encrypted": false,
|
|
90
|
+
"showCharCount": false,
|
|
91
|
+
"showWordCount": false,
|
|
92
|
+
"properties": {},
|
|
93
|
+
"allowMultipleMasks": false,
|
|
94
|
+
"addons": [],
|
|
95
|
+
"mask": false,
|
|
96
|
+
"inputType": "time",
|
|
97
|
+
"inputFormat": "plain",
|
|
98
|
+
"displayMask": "",
|
|
99
|
+
"spellcheck": true,
|
|
100
|
+
"truncateMultipleSpaces": false,
|
|
101
|
+
"format": "HH:mm",
|
|
102
|
+
"dataFormat": "HH:mm:ss"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"input": false,
|
|
106
|
+
"tableView": false,
|
|
107
|
+
"id": "e7vej1d",
|
|
108
|
+
"placeholder": "",
|
|
109
|
+
"prefix": "",
|
|
110
|
+
"customClass": "",
|
|
111
|
+
"suffix": "",
|
|
112
|
+
"multiple": false,
|
|
113
|
+
"defaultValue": null,
|
|
114
|
+
"protected": false,
|
|
115
|
+
"unique": false,
|
|
116
|
+
"persistent": false,
|
|
117
|
+
"hidden": false,
|
|
118
|
+
"clearOnHide": false,
|
|
119
|
+
"refreshOn": "",
|
|
120
|
+
"redrawOn": "",
|
|
121
|
+
"modalEdit": false,
|
|
122
|
+
"dataGridLabel": false,
|
|
123
|
+
"labelPosition": "top",
|
|
124
|
+
"description": "",
|
|
125
|
+
"errorLabel": "",
|
|
126
|
+
"tooltip": "",
|
|
127
|
+
"hideLabel": false,
|
|
128
|
+
"tabindex": "",
|
|
129
|
+
"disabled": false,
|
|
130
|
+
"autofocus": false,
|
|
131
|
+
"dbIndex": false,
|
|
132
|
+
"customDefaultValue": "",
|
|
133
|
+
"calculateValue": "",
|
|
134
|
+
"calculateServer": false,
|
|
135
|
+
"widget": null,
|
|
136
|
+
"attributes": {},
|
|
137
|
+
"validateOn": "change",
|
|
138
|
+
"validate": {
|
|
139
|
+
"required": false,
|
|
140
|
+
"custom": "",
|
|
141
|
+
"customPrivate": false,
|
|
142
|
+
"strictDateValidation": false,
|
|
143
|
+
"multiple": false,
|
|
144
|
+
"unique": false
|
|
145
|
+
},
|
|
146
|
+
"conditional": {
|
|
147
|
+
"show": null,
|
|
148
|
+
"when": null,
|
|
149
|
+
"eq": ""
|
|
150
|
+
},
|
|
151
|
+
"overlay": {
|
|
152
|
+
"style": "",
|
|
153
|
+
"left": "",
|
|
154
|
+
"top": "",
|
|
155
|
+
"width": "",
|
|
156
|
+
"height": ""
|
|
157
|
+
},
|
|
158
|
+
"allowCalculateOverride": false,
|
|
159
|
+
"encrypted": false,
|
|
160
|
+
"showCharCount": false,
|
|
161
|
+
"showWordCount": false,
|
|
162
|
+
"properties": {},
|
|
163
|
+
"allowMultipleMasks": false,
|
|
164
|
+
"addons": [],
|
|
165
|
+
"tree": false,
|
|
166
|
+
"lazyLoad": false,
|
|
167
|
+
"theme": "default",
|
|
168
|
+
"breadcrumb": "default"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import comp1 from './comp1';
|
|
2
2
|
import comp2 from './comp2';
|
|
3
3
|
import comp3 from './comp3';
|
|
4
|
+
import comp4 from './comp4';
|
|
4
5
|
import timeForm from './timeForm';
|
|
5
6
|
import timeForm2 from './timeForm2';
|
|
6
|
-
export { comp1, comp2, comp3, timeForm, timeForm2 };
|
|
7
|
+
export { comp1, comp2, comp3, comp4, timeForm, timeForm2 };
|
|
@@ -3,13 +3,15 @@ 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.timeForm2 = exports.timeForm = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
|
6
|
+
exports.timeForm2 = exports.timeForm = 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"));
|
|
10
10
|
exports.comp2 = comp2_1.default;
|
|
11
11
|
const comp3_1 = __importDefault(require("./comp3"));
|
|
12
12
|
exports.comp3 = comp3_1.default;
|
|
13
|
+
const comp4_1 = __importDefault(require("./comp4"));
|
|
14
|
+
exports.comp4 = comp4_1.default;
|
|
13
15
|
const timeForm_1 = __importDefault(require("./timeForm"));
|
|
14
16
|
exports.timeForm = timeForm_1.default;
|
|
15
17
|
const timeForm2_1 = __importDefault(require("./timeForm2"));
|
|
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const index_1 = __importDefault(require("./index"));
|
|
7
7
|
const experimental_1 = require("@formio/core/experimental");
|
|
8
8
|
experimental_1.Template.addTemplates(index_1.default);
|
|
9
|
-
experimental_1.Template.defaultTemplates =
|
|
9
|
+
experimental_1.Template.defaultTemplates = experimental_1.Template.templates.bootstrap;
|
|
10
10
|
exports.default = experimental_1.Template;
|
|
@@ -77,6 +77,7 @@ exports.default = {
|
|
|
77
77
|
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
|
78
78
|
typeCount: '{{ count }} {{ type }}',
|
|
79
79
|
requiredDayField: '{{ field }} is required',
|
|
80
|
+
requiredDayEmpty: '{{ field }} is required',
|
|
80
81
|
requiredMonthField: '{{ field }} is required',
|
|
81
82
|
requiredYearField: '{{ field }} is required'
|
|
82
83
|
};
|
package/lib/mjs/Form.d.ts
CHANGED
|
@@ -398,10 +398,10 @@ export default class Form extends Element {
|
|
|
398
398
|
getFormInitOptions(url: string, form: import('@formio/core').Form): object;
|
|
399
399
|
/**
|
|
400
400
|
* Sets the form to the JSON schema of a form.
|
|
401
|
-
* @param {import('@formio/core').Form} formParam - The form JSON to set this form to.
|
|
401
|
+
* @param {import('@formio/core').Form | string} formParam - The form JSON to set this form to.
|
|
402
402
|
* @returns {Promise<Webform|Wizard|PDF>} - The webform instance that was created.
|
|
403
403
|
*/
|
|
404
|
-
setForm(formParam: import('@formio/core').Form): Promise<Webform | Wizard | PDF>;
|
|
404
|
+
setForm(formParam: import('@formio/core').Form | string): Promise<Webform | Wizard | PDF>;
|
|
405
405
|
_form: any;
|
|
406
406
|
getSubmission(formio: any, opts: any): any;
|
|
407
407
|
/**
|
package/lib/mjs/Form.js
CHANGED
|
@@ -264,7 +264,7 @@ export default class Form extends Element {
|
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
266
|
* Sets the form to the JSON schema of a form.
|
|
267
|
-
* @param {import('@formio/core').Form} formParam - The form JSON to set this form to.
|
|
267
|
+
* @param {import('@formio/core').Form | string} formParam - The form JSON to set this form to.
|
|
268
268
|
* @returns {Promise<Webform|Wizard|PDF>} - The webform instance that was created.
|
|
269
269
|
*/
|
|
270
270
|
setForm(formParam) {
|
|
@@ -291,8 +291,14 @@ export default class Form extends Element {
|
|
|
291
291
|
}
|
|
292
292
|
this.loading = false;
|
|
293
293
|
this.instance = this.instance || this.create(form.display);
|
|
294
|
-
|
|
295
|
-
this.instance.setUrl
|
|
294
|
+
// If we're in builder mode, instance.setUrl is not a function, so just manually set the URL.
|
|
295
|
+
if (this.instance.setUrl) {
|
|
296
|
+
const options = this.getFormInitOptions(formParam, form);
|
|
297
|
+
this.instance.setUrl(formParam, options);
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
this.instance.url = formParam;
|
|
301
|
+
}
|
|
296
302
|
this.instance.nosubmit = false;
|
|
297
303
|
this._form = this.instance.form = form;
|
|
298
304
|
if (submission) {
|
package/lib/mjs/PDF.js
CHANGED
|
@@ -65,7 +65,7 @@ export default class PDF extends Webform {
|
|
|
65
65
|
super.destroy(all);
|
|
66
66
|
}
|
|
67
67
|
rebuild() {
|
|
68
|
-
if (this.
|
|
68
|
+
if (this.builderMode && this.component.components) {
|
|
69
69
|
this.destroyComponents();
|
|
70
70
|
this.addComponents();
|
|
71
71
|
return Promise.resolve();
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -830,7 +830,6 @@ export default class Webform extends NestedDataComponent {
|
|
|
830
830
|
if (!submission || !submission.data) {
|
|
831
831
|
submission = {
|
|
832
832
|
data: {},
|
|
833
|
-
metadata: submission.metadata,
|
|
834
833
|
};
|
|
835
834
|
}
|
|
836
835
|
// Metadata needs to be available before setValue
|
|
@@ -1134,7 +1133,7 @@ export default class Webform extends NestedDataComponent {
|
|
|
1134
1133
|
});
|
|
1135
1134
|
const displayedErrors = [];
|
|
1136
1135
|
if (errors.length) {
|
|
1137
|
-
errors = _.uniqBy(errors, (error) => error.message);
|
|
1136
|
+
errors = _.uniqBy(errors, (error) => [error.message, error.component?.id, error.context?.path].join());
|
|
1138
1137
|
const createListItem = (message, index) => {
|
|
1139
1138
|
const err = errors[index];
|
|
1140
1139
|
const messageFromIndex = !_.isUndefined(index) && errors && errors[index];
|
|
@@ -187,7 +187,8 @@ export default class WebformBuilder extends Component {
|
|
|
187
187
|
params: {
|
|
188
188
|
type: 'resource',
|
|
189
189
|
limit: 1000000,
|
|
190
|
-
select: '_id,title,name,components'
|
|
190
|
+
select: '_id,title,name,components',
|
|
191
|
+
'tags__ne': 'noBuilderResource'
|
|
191
192
|
}
|
|
192
193
|
};
|
|
193
194
|
if (this.options && this.options.resourceTag) {
|
|
@@ -892,7 +893,11 @@ export default class WebformBuilder extends Component {
|
|
|
892
893
|
if (form && form.properties) {
|
|
893
894
|
this.options.properties = form.properties;
|
|
894
895
|
}
|
|
895
|
-
|
|
896
|
+
let keyboardActionsEnabled = _.get(this.options, 'keyboardBuilder', false) || this.options.properties?.keyboardBuilder;
|
|
897
|
+
if (typeof keyboardActionsEnabled === 'string') {
|
|
898
|
+
keyboardActionsEnabled = keyboardActionsEnabled === 'true';
|
|
899
|
+
}
|
|
900
|
+
this.keyboardActionsEnabled = keyboardActionsEnabled;
|
|
896
901
|
const isShowSubmitButton = !this.options.noDefaultSubmitButton
|
|
897
902
|
&& (!form.components.length || !form.components.find(comp => comp.key === 'submit'));
|
|
898
903
|
// Ensure there is at least a submit button.
|
|
@@ -1044,7 +1049,10 @@ export default class WebformBuilder extends Component {
|
|
|
1044
1049
|
'calculateValue',
|
|
1045
1050
|
'conditional',
|
|
1046
1051
|
'customConditional',
|
|
1047
|
-
'id'
|
|
1052
|
+
'id',
|
|
1053
|
+
'fields.day.required',
|
|
1054
|
+
'fields.month.required',
|
|
1055
|
+
'fields.year.required',
|
|
1048
1056
|
]));
|
|
1049
1057
|
const parentComponent = defaultValueComponent.parent;
|
|
1050
1058
|
let tabIndex = -1;
|
|
@@ -1231,6 +1239,7 @@ export default class WebformBuilder extends Component {
|
|
|
1231
1239
|
helplinks: this.helplinks,
|
|
1232
1240
|
}));
|
|
1233
1241
|
this.editForm.attach(this.componentEdit.querySelector(`[${this._referenceAttributeName}="editForm"]`));
|
|
1242
|
+
this.updateComponent(this.editForm.submission.data ?? component);
|
|
1234
1243
|
this.attachEditComponentControls(component, parent, isNew, original, ComponentClass);
|
|
1235
1244
|
});
|
|
1236
1245
|
});
|
|
@@ -211,11 +211,12 @@ export default class NestedComponent extends Field {
|
|
|
211
211
|
calculateValue(data: any, flags: any, row: any): any;
|
|
212
212
|
isLastPage(): boolean;
|
|
213
213
|
isValid(data: any, dirty: any): any;
|
|
214
|
-
validationProcessor({ scope, data, row, instance }: {
|
|
214
|
+
validationProcessor({ scope, data, row, instance, component }: {
|
|
215
215
|
scope: any;
|
|
216
216
|
data: any;
|
|
217
217
|
row: any;
|
|
218
218
|
instance: any;
|
|
219
|
+
component: any;
|
|
219
220
|
}, flags: any): void;
|
|
220
221
|
/**
|
|
221
222
|
* Perform a validation on all child components of this nested component.
|
|
@@ -493,6 +493,7 @@ export default class NestedComponent extends Field {
|
|
|
493
493
|
header: 'single',
|
|
494
494
|
collapsed: this.collapsed,
|
|
495
495
|
[this.nestedKey]: 'single',
|
|
496
|
+
messageContainer: 'single-scope',
|
|
496
497
|
});
|
|
497
498
|
let childPromise = Promise.resolve();
|
|
498
499
|
if (this.refs[this.nestedKey]) {
|
|
@@ -677,8 +678,11 @@ export default class NestedComponent extends Field {
|
|
|
677
678
|
isValid(data, dirty) {
|
|
678
679
|
return this.getComponents().reduce((valid, comp) => comp.isValid(data, dirty) && valid, super.isValid(data, dirty));
|
|
679
680
|
}
|
|
680
|
-
validationProcessor({ scope, data, row, instance }, flags) {
|
|
681
|
+
validationProcessor({ scope, data, row, instance, component }, flags) {
|
|
681
682
|
const { dirty } = flags;
|
|
683
|
+
if (this.root.hasExtraPages && this.page !== this.root.page) {
|
|
684
|
+
instance = this.getComponent(component.path);
|
|
685
|
+
}
|
|
682
686
|
if (!instance) {
|
|
683
687
|
return;
|
|
684
688
|
}
|
|
@@ -12,6 +12,8 @@ export default class NestedArrayComponent extends NestedDataComponent {
|
|
|
12
12
|
hasAddButton(): any;
|
|
13
13
|
getComponent(path: any, fn: any, originalPath: any): any;
|
|
14
14
|
everyComponent(fn: any, rowIndex: any, options?: {}): void;
|
|
15
|
+
_getEmailTableHeader(options: any): string;
|
|
16
|
+
_getEmailTableBody(options: any): string;
|
|
15
17
|
getComponents(rowIndex: any): any;
|
|
16
18
|
}
|
|
17
19
|
import NestedDataComponent from '../nesteddata/NestedDataComponent';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import _ from 'lodash';
|
|
3
|
-
import { componentValueTypes, getStringFromComponentPath } from '../../../utils/utils';
|
|
3
|
+
import { componentValueTypes, getStringFromComponentPath, isLayoutComponent } from '../../../utils/utils';
|
|
4
4
|
import Component from '../component/Component';
|
|
5
5
|
import NestedDataComponent from '../nesteddata/NestedDataComponent';
|
|
6
6
|
export default class NestedArrayComponent extends NestedDataComponent {
|
|
@@ -145,38 +145,60 @@ export default class NestedArrayComponent extends NestedDataComponent {
|
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
+
_getEmailTableHeader(options) {
|
|
149
|
+
let row = '';
|
|
150
|
+
const getHeaderCell = (component) => {
|
|
151
|
+
if (!component.isInputComponent || !component.visible || component.skipInEmail) {
|
|
152
|
+
return '';
|
|
153
|
+
}
|
|
154
|
+
const label = component.label || component.key;
|
|
155
|
+
return `<th style="padding: 5px 10px;">${label}</th>`;
|
|
156
|
+
};
|
|
157
|
+
const components = this.getComponents(0);
|
|
158
|
+
for (const component of components) {
|
|
159
|
+
if (component.isInputComponent) {
|
|
160
|
+
row += getHeaderCell(component);
|
|
161
|
+
}
|
|
162
|
+
else if (isLayoutComponent(component) && typeof component.everyComponent === 'function') {
|
|
163
|
+
component.everyComponent((comp) => {
|
|
164
|
+
row += getHeaderCell(comp);
|
|
165
|
+
}, options);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return `<thead><tr>${row}</tr></thead>`;
|
|
169
|
+
}
|
|
170
|
+
_getEmailTableBody(options) {
|
|
171
|
+
const getBodyCell = (component) => {
|
|
172
|
+
if (!component.isInputComponent || !component.visible || component.skipInEmail) {
|
|
173
|
+
return '';
|
|
174
|
+
}
|
|
175
|
+
return `<td style="padding: 5px 10px;">${component.getView(component.dataValue, options)}</td>`;
|
|
176
|
+
};
|
|
177
|
+
const rows = [];
|
|
178
|
+
for (const { components } of this.iteratableRows) {
|
|
179
|
+
let row = '';
|
|
180
|
+
for (const component of components) {
|
|
181
|
+
if (component.isInputComponent) {
|
|
182
|
+
row += getBodyCell(component);
|
|
183
|
+
}
|
|
184
|
+
else if (isLayoutComponent(component) && typeof component.everyComponent === 'function') {
|
|
185
|
+
component.everyComponent((comp) => {
|
|
186
|
+
row += getBodyCell(comp);
|
|
187
|
+
}, options);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
rows.push(`<tr>${row}</tr>`);
|
|
191
|
+
}
|
|
192
|
+
return `<tbody>${rows.join('')}</tbody>`;
|
|
193
|
+
}
|
|
148
194
|
getValueAsString(value, options) {
|
|
149
195
|
if (options?.email) {
|
|
150
|
-
|
|
196
|
+
return `
|
|
151
197
|
<table border="1" style="width:100%">
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
`);
|
|
155
|
-
this.component.components?.forEach((component) => {
|
|
156
|
-
const label = component.label || component.key;
|
|
157
|
-
result += `<th style="padding: 5px 10px;">${label}</th>`;
|
|
158
|
-
});
|
|
159
|
-
result += (`
|
|
160
|
-
</tr>
|
|
161
|
-
</thead>
|
|
162
|
-
<tbody>
|
|
163
|
-
`);
|
|
164
|
-
this.iteratableRows.forEach(({ components }) => {
|
|
165
|
-
result += '<tr>';
|
|
166
|
-
_.each(components, (component) => {
|
|
167
|
-
result += '<td style="padding:5px 10px;">';
|
|
168
|
-
if (component.isInputComponent && component.visible && !component.skipInEmail) {
|
|
169
|
-
result += component.getView(component.dataValue, options);
|
|
170
|
-
}
|
|
171
|
-
result += '</td>';
|
|
172
|
-
});
|
|
173
|
-
result += '</tr>';
|
|
174
|
-
});
|
|
175
|
-
result += (`
|
|
176
|
-
</tbody>
|
|
198
|
+
${this._getEmailTableHeader(options)}
|
|
199
|
+
${this._getEmailTableBody(options)}
|
|
177
200
|
</table>
|
|
178
|
-
|
|
179
|
-
return result;
|
|
201
|
+
`;
|
|
180
202
|
}
|
|
181
203
|
if (!value || !value.length) {
|
|
182
204
|
return '';
|
|
@@ -2,6 +2,7 @@ export default class CurrencyComponent extends NumberComponent {
|
|
|
2
2
|
constructor(component: any, options: any, data: any);
|
|
3
3
|
currencyPrefix: any;
|
|
4
4
|
currencySuffix: any;
|
|
5
|
+
parseNumber(value: any): number;
|
|
5
6
|
parseValue(value: any): string | null;
|
|
6
7
|
addZerosAndFormatValue(value: any): any;
|
|
7
8
|
stripPrefixSuffix(value: any): any;
|