@formio/js 5.0.0-dev.5656.925a8ee → 5.0.0-dev.5659.a16afd8
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 +6 -6
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +6 -6
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/_classes/input/Input.js +6 -4
- package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +29 -0
- package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.js +36 -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/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/radio/Radio.js +3 -2
- package/lib/cjs/components/select/Select.d.ts +0 -38
- package/lib/cjs/components/select/Select.js +0 -10
- package/lib/cjs/components/select/fixtures/index.d.ts +1 -2
- package/lib/cjs/components/select/fixtures/index.js +1 -3
- package/lib/cjs/translations/en.d.ts +2 -0
- package/lib/cjs/translations/en.js +3 -1
- package/lib/cjs/utils/ChoicesWrapper.d.ts +1 -1
- package/lib/cjs/utils/ChoicesWrapper.js +13 -2
- package/lib/mjs/components/_classes/input/Input.js +6 -4
- package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +29 -0
- package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.js +34 -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/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/radio/Radio.js +3 -2
- package/lib/mjs/components/select/Select.d.ts +0 -38
- package/lib/mjs/components/select/Select.js +1 -13
- package/lib/mjs/components/select/fixtures/index.d.ts +1 -2
- package/lib/mjs/components/select/fixtures/index.js +1 -2
- package/lib/mjs/translations/en.d.ts +2 -0
- package/lib/mjs/translations/en.js +3 -1
- package/lib/mjs/utils/ChoicesWrapper.d.ts +1 -1
- package/lib/mjs/utils/ChoicesWrapper.js +13 -2
- package/package.json +1 -1
- package/lib/cjs/components/select/fixtures/comp25.d.ts +0 -44
- package/lib/cjs/components/select/fixtures/comp25.js +0 -59
- package/lib/mjs/components/select/fixtures/comp25.d.ts +0 -44
- package/lib/mjs/components/select/fixtures/comp25.js +0 -57
|
@@ -151,13 +151,15 @@ class Input extends Multivalue_1.default {
|
|
|
151
151
|
else {
|
|
152
152
|
this.addClass(element, 'text-danger');
|
|
153
153
|
}
|
|
154
|
-
this.setContent(element, this.t(`
|
|
155
|
-
remaining: remaining
|
|
154
|
+
this.setContent(element, this.t(`typeRemaining`, {
|
|
155
|
+
remaining: remaining,
|
|
156
|
+
type: type
|
|
156
157
|
}));
|
|
157
158
|
}
|
|
158
159
|
else {
|
|
159
|
-
this.setContent(element, this.t(`
|
|
160
|
-
count: count
|
|
160
|
+
this.setContent(element, this.t(`typeCount`, {
|
|
161
|
+
count: count,
|
|
162
|
+
type: type
|
|
161
163
|
}));
|
|
162
164
|
}
|
|
163
165
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let label: string;
|
|
3
|
+
let reorder: boolean;
|
|
4
|
+
let addAnotherPosition: string;
|
|
5
|
+
let layoutFixed: boolean;
|
|
6
|
+
let enableRowGroups: boolean;
|
|
7
|
+
let initEmpty: boolean;
|
|
8
|
+
let tableView: boolean;
|
|
9
|
+
let defaultValue: {}[];
|
|
10
|
+
let key: string;
|
|
11
|
+
let type: string;
|
|
12
|
+
let input: boolean;
|
|
13
|
+
let components: {
|
|
14
|
+
label: string;
|
|
15
|
+
optionsLabelPosition: string;
|
|
16
|
+
inline: boolean;
|
|
17
|
+
tableView: boolean;
|
|
18
|
+
values: {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
shortcut: string;
|
|
22
|
+
}[];
|
|
23
|
+
key: string;
|
|
24
|
+
type: string;
|
|
25
|
+
input: boolean;
|
|
26
|
+
inputType: string;
|
|
27
|
+
}[];
|
|
28
|
+
}
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
'label': 'Data Grid',
|
|
5
|
+
'reorder': false,
|
|
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': 'Radio',
|
|
20
|
+
'optionsLabelPosition': 'right',
|
|
21
|
+
'inline': false,
|
|
22
|
+
'tableView': false,
|
|
23
|
+
'values': [
|
|
24
|
+
{
|
|
25
|
+
'label': 'yes',
|
|
26
|
+
'value': 'yes',
|
|
27
|
+
'shortcut': ''
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
'key': 'radio',
|
|
31
|
+
'type': 'radio',
|
|
32
|
+
'input': true,
|
|
33
|
+
'inputType': 'checkbox'
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
};
|
|
@@ -14,4 +14,5 @@ import withRowGroupsAndDefValue from './comp-row-groups-with-def-value';
|
|
|
14
14
|
import modalWithRequiredFields from './comp-modal-with-required-fields';
|
|
15
15
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
16
16
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
17
|
-
|
|
17
|
+
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 };
|
|
@@ -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.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.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"));
|
|
@@ -36,3 +36,5 @@ const comp_with_allow_calculate_override_1 = __importDefault(require("./comp-wit
|
|
|
36
36
|
exports.withAllowCalculateOverride = comp_with_allow_calculate_override_1.default;
|
|
37
37
|
const two_comp_with_allow_calculate_override_1 = __importDefault(require("./two-comp-with-allow-calculate-override"));
|
|
38
38
|
exports.twoWithAllowCalculatedOverride = two_comp_with_allow_calculate_override_1.default;
|
|
39
|
+
const comp_with_checkboxes_1 = __importDefault(require("./comp-with-checkboxes"));
|
|
40
|
+
exports.withCheckboxes = comp_with_checkboxes_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;
|
|
@@ -200,7 +200,8 @@ class RadioComponent extends ListComponent_1.default {
|
|
|
200
200
|
if (this.viewOnly || !this.refs.input || !this.refs.input.length) {
|
|
201
201
|
return this.dataValue;
|
|
202
202
|
}
|
|
203
|
-
|
|
203
|
+
// If the input type of the component is checkbox the value should be determined by the checkboxes checked property
|
|
204
|
+
let value = this.component.inputType === 'checkbox' ? '' : this.dataValue;
|
|
204
205
|
this.refs.input.forEach((input, index) => {
|
|
205
206
|
if (input.checked) {
|
|
206
207
|
value = (this.isSelectURL && lodash_1.default.isObject(this.loadedOptions[index].value)) ?
|
|
@@ -322,7 +323,7 @@ class RadioComponent extends ListComponent_1.default {
|
|
|
322
323
|
const value = this.dataValue;
|
|
323
324
|
this.refs.wrapper.forEach((wrapper, index) => {
|
|
324
325
|
const input = this.refs.input[index];
|
|
325
|
-
const checked = (input.type === 'checkbox') ? value[input.value] : (input.value.toString() === value.toString());
|
|
326
|
+
const checked = (input.type === 'checkbox') ? value[input.value] || input.checked : (input.value.toString() === value.toString());
|
|
326
327
|
if (checked) {
|
|
327
328
|
//add class to container when selected
|
|
328
329
|
this.addClass(wrapper, this.optionSelectedClass);
|
|
@@ -9,47 +9,9 @@ export default class SelectComponent extends ListComponent {
|
|
|
9
9
|
};
|
|
10
10
|
static get serverConditionSettings(): {
|
|
11
11
|
valueComponent(classComp: any): any;
|
|
12
|
-
dataTypeOperators: {
|
|
13
|
-
number: string[];
|
|
14
|
-
};
|
|
15
|
-
dataTypeValueComponents: {
|
|
16
|
-
number: {
|
|
17
|
-
lessThan: () => {
|
|
18
|
-
type: string;
|
|
19
|
-
};
|
|
20
|
-
greaterThan: () => {
|
|
21
|
-
type: string;
|
|
22
|
-
};
|
|
23
|
-
lessThanOrEqual: () => {
|
|
24
|
-
type: string;
|
|
25
|
-
};
|
|
26
|
-
greaterThanOrEqual: () => {
|
|
27
|
-
type: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
12
|
};
|
|
32
13
|
static get conditionOperatorsSettings(): {
|
|
33
14
|
valueComponent(classComp: any): any;
|
|
34
|
-
dataTypeOperators: {
|
|
35
|
-
number: string[];
|
|
36
|
-
};
|
|
37
|
-
dataTypeValueComponents: {
|
|
38
|
-
number: {
|
|
39
|
-
lessThan: () => {
|
|
40
|
-
type: string;
|
|
41
|
-
};
|
|
42
|
-
greaterThan: () => {
|
|
43
|
-
type: string;
|
|
44
|
-
};
|
|
45
|
-
lessThanOrEqual: () => {
|
|
46
|
-
type: string;
|
|
47
|
-
};
|
|
48
|
-
greaterThanOrEqual: () => {
|
|
49
|
-
type: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
15
|
};
|
|
54
16
|
static savedValueTypes(schema: any): any[];
|
|
55
17
|
templateData: {} | undefined;
|
|
@@ -63,7 +63,6 @@ class SelectComponent extends ListComponent_1.default {
|
|
|
63
63
|
return SelectComponent.conditionOperatorsSettings;
|
|
64
64
|
}
|
|
65
65
|
static get conditionOperatorsSettings() {
|
|
66
|
-
const numberType = () => ({ type: 'number' });
|
|
67
66
|
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
|
|
68
67
|
const valueComp = Object.assign(Object.assign({}, classComp), { type: 'select' });
|
|
69
68
|
if ((0, utils_1.isSelectResourceWithObjectValue)(classComp)) {
|
|
@@ -78,15 +77,6 @@ class SelectComponent extends ListComponent_1.default {
|
|
|
78
77
|
`;
|
|
79
78
|
}
|
|
80
79
|
return valueComp;
|
|
81
|
-
}, dataTypeOperators: {
|
|
82
|
-
number: ['lessThan', 'greaterThan', 'lessThanOrEqual', 'greaterThanOrEqual'],
|
|
83
|
-
}, dataTypeValueComponents: {
|
|
84
|
-
number: {
|
|
85
|
-
lessThan: numberType,
|
|
86
|
-
greaterThan: numberType,
|
|
87
|
-
lessThanOrEqual: numberType,
|
|
88
|
-
greaterThanOrEqual: numberType,
|
|
89
|
-
},
|
|
90
80
|
} });
|
|
91
81
|
}
|
|
92
82
|
static savedValueTypes(schema) {
|
|
@@ -21,6 +21,5 @@ import comp21 from './comp21';
|
|
|
21
21
|
import comp22 from './comp22';
|
|
22
22
|
import comp23 from './comp23';
|
|
23
23
|
import comp24 from './comp24';
|
|
24
|
-
|
|
25
|
-
export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22, comp23, comp24, comp25 };
|
|
24
|
+
export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22, comp23, comp24 };
|
|
26
25
|
export { multiSelect, multiSelectOptions } from "./comp3";
|
|
@@ -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.
|
|
6
|
+
exports.comp24 = exports.comp23 = exports.comp22 = exports.comp21 = exports.comp20 = exports.comp19 = exports.comp18 = exports.comp17 = exports.comp16 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp2 = exports.comp1 = exports.multiSelectOptions = exports.multiSelect = 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"));
|
|
@@ -53,5 +53,3 @@ const comp23_1 = __importDefault(require("./comp23"));
|
|
|
53
53
|
exports.comp23 = comp23_1.default;
|
|
54
54
|
const comp24_1 = __importDefault(require("./comp24"));
|
|
55
55
|
exports.comp24 = comp24_1.default;
|
|
56
|
-
const comp25_1 = __importDefault(require("./comp25"));
|
|
57
|
-
exports.comp25 = comp25_1.default;
|
|
@@ -73,5 +73,7 @@ exports.default = {
|
|
|
73
73
|
submitButtonAriaLabel: 'Submit Form button. Click to submit the form',
|
|
74
74
|
reCaptchaTokenValidationError: 'ReCAPTCHA: Token validation error',
|
|
75
75
|
reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission',
|
|
76
|
-
apiKey: 'API Key is not unique: {{key}}'
|
|
76
|
+
apiKey: 'API Key is not unique: {{key}}',
|
|
77
|
+
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
|
78
|
+
typeCount: '{{ count }} {{ type }}'
|
|
77
79
|
};
|
|
@@ -24,7 +24,7 @@ declare class ChoicesWrapper extends Choices {
|
|
|
24
24
|
_onEnterKey(args: any): void;
|
|
25
25
|
_onDirectionKey(...args: any[]): void;
|
|
26
26
|
timeout: NodeJS.Timeout | undefined;
|
|
27
|
-
_selectHighlightedChoice(
|
|
27
|
+
_selectHighlightedChoice(): void;
|
|
28
28
|
_onKeyDown(event: any): void;
|
|
29
29
|
onSelectValue({ event, activeItems, hasActiveDropdown }: {
|
|
30
30
|
event: any;
|
|
@@ -105,10 +105,21 @@ class ChoicesWrapper extends choices_js_1.default {
|
|
|
105
105
|
this._selectHighlightedChoice(activeItems);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
_selectHighlightedChoice(
|
|
108
|
+
_selectHighlightedChoice() {
|
|
109
109
|
const highlightedChoice = this.dropdown.getChild(`.${this.config.classNames.highlightedState}`);
|
|
110
110
|
if (highlightedChoice) {
|
|
111
|
-
|
|
111
|
+
const id = highlightedChoice.dataset.id;
|
|
112
|
+
const choice = id && this._store.getChoiceById(id);
|
|
113
|
+
this._addItem({
|
|
114
|
+
value: choice.value,
|
|
115
|
+
label: choice.label,
|
|
116
|
+
choiceId: choice.id,
|
|
117
|
+
groupId: choice.groupId,
|
|
118
|
+
customProperties: choice.customProperties,
|
|
119
|
+
placeholder: choice.placeholder,
|
|
120
|
+
keyCode: choice.keyCode
|
|
121
|
+
});
|
|
122
|
+
this._triggerChange(choice.value);
|
|
112
123
|
}
|
|
113
124
|
event.preventDefault();
|
|
114
125
|
}
|
|
@@ -146,13 +146,15 @@ export default class Input extends Multivalue {
|
|
|
146
146
|
else {
|
|
147
147
|
this.addClass(element, 'text-danger');
|
|
148
148
|
}
|
|
149
|
-
this.setContent(element, this.t(`
|
|
150
|
-
remaining: remaining
|
|
149
|
+
this.setContent(element, this.t(`typeRemaining`, {
|
|
150
|
+
remaining: remaining,
|
|
151
|
+
type: type
|
|
151
152
|
}));
|
|
152
153
|
}
|
|
153
154
|
else {
|
|
154
|
-
this.setContent(element, this.t(`
|
|
155
|
-
count: count
|
|
155
|
+
this.setContent(element, this.t(`typeCount`, {
|
|
156
|
+
count: count,
|
|
157
|
+
type: type
|
|
156
158
|
}));
|
|
157
159
|
}
|
|
158
160
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let label: string;
|
|
3
|
+
let reorder: boolean;
|
|
4
|
+
let addAnotherPosition: string;
|
|
5
|
+
let layoutFixed: boolean;
|
|
6
|
+
let enableRowGroups: boolean;
|
|
7
|
+
let initEmpty: boolean;
|
|
8
|
+
let tableView: boolean;
|
|
9
|
+
let defaultValue: {}[];
|
|
10
|
+
let key: string;
|
|
11
|
+
let type: string;
|
|
12
|
+
let input: boolean;
|
|
13
|
+
let components: {
|
|
14
|
+
label: string;
|
|
15
|
+
optionsLabelPosition: string;
|
|
16
|
+
inline: boolean;
|
|
17
|
+
tableView: boolean;
|
|
18
|
+
values: {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
shortcut: string;
|
|
22
|
+
}[];
|
|
23
|
+
key: string;
|
|
24
|
+
type: string;
|
|
25
|
+
input: boolean;
|
|
26
|
+
inputType: string;
|
|
27
|
+
}[];
|
|
28
|
+
}
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'label': 'Data Grid',
|
|
3
|
+
'reorder': false,
|
|
4
|
+
'addAnotherPosition': 'bottom',
|
|
5
|
+
'layoutFixed': false,
|
|
6
|
+
'enableRowGroups': false,
|
|
7
|
+
'initEmpty': false,
|
|
8
|
+
'tableView': false,
|
|
9
|
+
'defaultValue': [
|
|
10
|
+
{}
|
|
11
|
+
],
|
|
12
|
+
'key': 'dataGrid',
|
|
13
|
+
'type': 'datagrid',
|
|
14
|
+
'input': true,
|
|
15
|
+
'components': [
|
|
16
|
+
{
|
|
17
|
+
'label': 'Radio',
|
|
18
|
+
'optionsLabelPosition': 'right',
|
|
19
|
+
'inline': false,
|
|
20
|
+
'tableView': false,
|
|
21
|
+
'values': [
|
|
22
|
+
{
|
|
23
|
+
'label': 'yes',
|
|
24
|
+
'value': 'yes',
|
|
25
|
+
'shortcut': ''
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
'key': 'radio',
|
|
29
|
+
'type': 'radio',
|
|
30
|
+
'input': true,
|
|
31
|
+
'inputType': 'checkbox'
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
};
|
|
@@ -14,4 +14,5 @@ import withRowGroupsAndDefValue from './comp-row-groups-with-def-value';
|
|
|
14
14
|
import modalWithRequiredFields from './comp-modal-with-required-fields';
|
|
15
15
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
16
16
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
17
|
-
|
|
17
|
+
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 };
|
|
@@ -14,4 +14,5 @@ import withLogic from './comp-with-logic';
|
|
|
14
14
|
import withCollapsibleRowGroups from './comp-with-collapsible-groups';
|
|
15
15
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
16
16
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
17
|
-
|
|
17
|
+
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 };
|