@formio/js 5.0.0-dev.5655.a31d680 → 5.0.0-dev.5656.925a8ee
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 +3 -3
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +3 -3
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/_classes/input/Input.js +4 -6
- 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/translations/en.d.ts +0 -2
- package/lib/cjs/translations/en.js +1 -3
- package/lib/mjs/components/_classes/input/Input.js +4 -6
- 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/translations/en.d.ts +0 -2
- package/lib/mjs/translations/en.js +1 -3
- package/package.json +1 -1
|
@@ -151,15 +151,13 @@ 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
|
|
156
|
-
type: type
|
|
154
|
+
this.setContent(element, this.t(`{{ remaining }} ${type} remaining.`, {
|
|
155
|
+
remaining: remaining
|
|
157
156
|
}));
|
|
158
157
|
}
|
|
159
158
|
else {
|
|
160
|
-
this.setContent(element, this.t(`
|
|
161
|
-
count: count
|
|
162
|
-
type: type
|
|
159
|
+
this.setContent(element, this.t(`{{ count }} ${type}`, {
|
|
160
|
+
count: count
|
|
163
161
|
}));
|
|
164
162
|
}
|
|
165
163
|
}
|
|
@@ -9,9 +9,47 @@ 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
|
+
};
|
|
12
31
|
};
|
|
13
32
|
static get conditionOperatorsSettings(): {
|
|
14
33
|
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
|
+
};
|
|
15
53
|
};
|
|
16
54
|
static savedValueTypes(schema: any): any[];
|
|
17
55
|
templateData: {} | undefined;
|
|
@@ -63,6 +63,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
|
63
63
|
return SelectComponent.conditionOperatorsSettings;
|
|
64
64
|
}
|
|
65
65
|
static get conditionOperatorsSettings() {
|
|
66
|
+
const numberType = () => ({ type: 'number' });
|
|
66
67
|
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
|
|
67
68
|
const valueComp = Object.assign(Object.assign({}, classComp), { type: 'select' });
|
|
68
69
|
if ((0, utils_1.isSelectResourceWithObjectValue)(classComp)) {
|
|
@@ -77,6 +78,15 @@ class SelectComponent extends ListComponent_1.default {
|
|
|
77
78
|
`;
|
|
78
79
|
}
|
|
79
80
|
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
|
+
},
|
|
80
90
|
} });
|
|
81
91
|
}
|
|
82
92
|
static savedValueTypes(schema) {
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
widget: string;
|
|
10
|
+
tableView: boolean;
|
|
11
|
+
data: {
|
|
12
|
+
values: {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
dataType: string;
|
|
18
|
+
key: string;
|
|
19
|
+
type: string;
|
|
20
|
+
input: boolean;
|
|
21
|
+
applyMaskOn?: undefined;
|
|
22
|
+
conditional?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
label: string;
|
|
25
|
+
applyMaskOn: string;
|
|
26
|
+
tableView: boolean;
|
|
27
|
+
key: string;
|
|
28
|
+
type: string;
|
|
29
|
+
input: boolean;
|
|
30
|
+
conditional: {
|
|
31
|
+
show: boolean;
|
|
32
|
+
conjunction: string;
|
|
33
|
+
conditions: {
|
|
34
|
+
component: string;
|
|
35
|
+
operator: string;
|
|
36
|
+
value: number;
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
widget?: undefined;
|
|
40
|
+
data?: undefined;
|
|
41
|
+
dataType?: undefined;
|
|
42
|
+
})[];
|
|
43
|
+
}
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
title: 'FIO-8072',
|
|
5
|
+
name: 'fio8072',
|
|
6
|
+
path: 'fio8072',
|
|
7
|
+
type: 'form',
|
|
8
|
+
display: 'form',
|
|
9
|
+
components: [
|
|
10
|
+
{
|
|
11
|
+
label: 'Select',
|
|
12
|
+
widget: 'choicesjs',
|
|
13
|
+
tableView: true,
|
|
14
|
+
data: {
|
|
15
|
+
values: [
|
|
16
|
+
{
|
|
17
|
+
label: 'A',
|
|
18
|
+
value: '1',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: 'B',
|
|
22
|
+
value: '2',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: 'C',
|
|
26
|
+
value: '10',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: 'D',
|
|
30
|
+
value: '1d',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
dataType: 'number',
|
|
35
|
+
key: 'select',
|
|
36
|
+
type: 'select',
|
|
37
|
+
input: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: 'Text Field',
|
|
41
|
+
applyMaskOn: 'change',
|
|
42
|
+
tableView: true,
|
|
43
|
+
key: 'textField',
|
|
44
|
+
type: 'textfield',
|
|
45
|
+
input: true,
|
|
46
|
+
conditional: {
|
|
47
|
+
show: true,
|
|
48
|
+
conjunction: 'all',
|
|
49
|
+
conditions: [
|
|
50
|
+
{
|
|
51
|
+
component: 'select',
|
|
52
|
+
operator: 'lessThan',
|
|
53
|
+
value: 5,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
};
|
|
@@ -21,5 +21,6 @@ import comp21 from './comp21';
|
|
|
21
21
|
import comp22 from './comp22';
|
|
22
22
|
import comp23 from './comp23';
|
|
23
23
|
import comp24 from './comp24';
|
|
24
|
-
|
|
24
|
+
import comp25 from './comp25';
|
|
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 };
|
|
25
26
|
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.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;
|
|
6
|
+
exports.comp25 = 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,3 +53,5 @@ 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,7 +73,5 @@ 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}}'
|
|
77
|
-
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
|
78
|
-
typeCount: '{{ count }} {{ type }}'
|
|
76
|
+
apiKey: 'API Key is not unique: {{key}}'
|
|
79
77
|
};
|
|
@@ -146,15 +146,13 @@ 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
|
|
151
|
-
type: type
|
|
149
|
+
this.setContent(element, this.t(`{{ remaining }} ${type} remaining.`, {
|
|
150
|
+
remaining: remaining
|
|
152
151
|
}));
|
|
153
152
|
}
|
|
154
153
|
else {
|
|
155
|
-
this.setContent(element, this.t(`
|
|
156
|
-
count: count
|
|
157
|
-
type: type
|
|
154
|
+
this.setContent(element, this.t(`{{ count }} ${type}`, {
|
|
155
|
+
count: count
|
|
158
156
|
}));
|
|
159
157
|
}
|
|
160
158
|
}
|
|
@@ -9,9 +9,47 @@ 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
|
+
};
|
|
12
31
|
};
|
|
13
32
|
static get conditionOperatorsSettings(): {
|
|
14
33
|
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
|
+
};
|
|
15
53
|
};
|
|
16
54
|
static savedValueTypes(schema: any): any[];
|
|
17
55
|
templateData: {} | undefined;
|
|
@@ -58,6 +58,7 @@ export default class SelectComponent extends ListComponent {
|
|
|
58
58
|
return SelectComponent.conditionOperatorsSettings;
|
|
59
59
|
}
|
|
60
60
|
static get conditionOperatorsSettings() {
|
|
61
|
+
const numberType = () => ({ type: 'number' });
|
|
61
62
|
return {
|
|
62
63
|
...super.conditionOperatorsSettings,
|
|
63
64
|
valueComponent(classComp) {
|
|
@@ -74,7 +75,18 @@ export default class SelectComponent extends ListComponent {
|
|
|
74
75
|
`;
|
|
75
76
|
}
|
|
76
77
|
return valueComp;
|
|
77
|
-
}
|
|
78
|
+
},
|
|
79
|
+
dataTypeOperators: {
|
|
80
|
+
number: ['lessThan', 'greaterThan', 'lessThanOrEqual', 'greaterThanOrEqual'],
|
|
81
|
+
},
|
|
82
|
+
dataTypeValueComponents: {
|
|
83
|
+
number: {
|
|
84
|
+
lessThan: numberType,
|
|
85
|
+
greaterThan: numberType,
|
|
86
|
+
lessThanOrEqual: numberType,
|
|
87
|
+
greaterThanOrEqual: numberType,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
78
90
|
};
|
|
79
91
|
}
|
|
80
92
|
static savedValueTypes(schema) {
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
widget: string;
|
|
10
|
+
tableView: boolean;
|
|
11
|
+
data: {
|
|
12
|
+
values: {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
dataType: string;
|
|
18
|
+
key: string;
|
|
19
|
+
type: string;
|
|
20
|
+
input: boolean;
|
|
21
|
+
applyMaskOn?: undefined;
|
|
22
|
+
conditional?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
label: string;
|
|
25
|
+
applyMaskOn: string;
|
|
26
|
+
tableView: boolean;
|
|
27
|
+
key: string;
|
|
28
|
+
type: string;
|
|
29
|
+
input: boolean;
|
|
30
|
+
conditional: {
|
|
31
|
+
show: boolean;
|
|
32
|
+
conjunction: string;
|
|
33
|
+
conditions: {
|
|
34
|
+
component: string;
|
|
35
|
+
operator: string;
|
|
36
|
+
value: number;
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
widget?: undefined;
|
|
40
|
+
data?: undefined;
|
|
41
|
+
dataType?: undefined;
|
|
42
|
+
})[];
|
|
43
|
+
}
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'FIO-8072',
|
|
3
|
+
name: 'fio8072',
|
|
4
|
+
path: 'fio8072',
|
|
5
|
+
type: 'form',
|
|
6
|
+
display: 'form',
|
|
7
|
+
components: [
|
|
8
|
+
{
|
|
9
|
+
label: 'Select',
|
|
10
|
+
widget: 'choicesjs',
|
|
11
|
+
tableView: true,
|
|
12
|
+
data: {
|
|
13
|
+
values: [
|
|
14
|
+
{
|
|
15
|
+
label: 'A',
|
|
16
|
+
value: '1',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: 'B',
|
|
20
|
+
value: '2',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'C',
|
|
24
|
+
value: '10',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: 'D',
|
|
28
|
+
value: '1d',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
dataType: 'number',
|
|
33
|
+
key: 'select',
|
|
34
|
+
type: 'select',
|
|
35
|
+
input: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: 'Text Field',
|
|
39
|
+
applyMaskOn: 'change',
|
|
40
|
+
tableView: true,
|
|
41
|
+
key: 'textField',
|
|
42
|
+
type: 'textfield',
|
|
43
|
+
input: true,
|
|
44
|
+
conditional: {
|
|
45
|
+
show: true,
|
|
46
|
+
conjunction: 'all',
|
|
47
|
+
conditions: [
|
|
48
|
+
{
|
|
49
|
+
component: 'select',
|
|
50
|
+
operator: 'lessThan',
|
|
51
|
+
value: 5,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
};
|
|
@@ -21,5 +21,6 @@ import comp21 from './comp21';
|
|
|
21
21
|
import comp22 from './comp22';
|
|
22
22
|
import comp23 from './comp23';
|
|
23
23
|
import comp24 from './comp24';
|
|
24
|
-
|
|
24
|
+
import comp25 from './comp25';
|
|
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 };
|
|
25
26
|
export { multiSelect, multiSelectOptions } from "./comp3";
|
|
@@ -22,4 +22,5 @@ import comp21 from './comp21';
|
|
|
22
22
|
import comp22 from './comp22';
|
|
23
23
|
import comp23 from './comp23';
|
|
24
24
|
import comp24 from './comp24';
|
|
25
|
-
|
|
25
|
+
import comp25 from './comp25';
|
|
26
|
+
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 };
|
|
@@ -71,7 +71,5 @@ export default {
|
|
|
71
71
|
submitButtonAriaLabel: 'Submit Form button. Click to submit the form',
|
|
72
72
|
reCaptchaTokenValidationError: 'ReCAPTCHA: Token validation error',
|
|
73
73
|
reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission',
|
|
74
|
-
apiKey: 'API Key is not unique: {{key}}'
|
|
75
|
-
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
|
76
|
-
typeCount: '{{ count }} {{ type }}'
|
|
74
|
+
apiKey: 'API Key is not unique: {{key}}'
|
|
77
75
|
};
|