@formio/js 5.0.0-dev.5760.bdc64e2 → 5.0.0-dev.5760.f9aca2e
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 +1 -0
- package/dist/formio.form.js +6 -6
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +8 -8
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/day/Day.d.ts +1 -1
- package/lib/cjs/components/day/Day.js +16 -8
- package/lib/cjs/components/file/File.d.ts +1 -1
- package/lib/cjs/components/file/File.js +3 -1
- package/lib/cjs/components/file/editForm/File.edit.display.js +1 -1
- package/lib/cjs/components/radio/Radio.d.ts +2 -18
- package/lib/cjs/components/radio/Radio.js +22 -21
- package/lib/cjs/components/select/Select.js +2 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +0 -22
- package/lib/cjs/components/selectboxes/SelectBoxes.js +12 -9
- package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +0 -6
- package/lib/cjs/components/signature/editForm/Signature.edit.display.js +0 -1
- package/lib/cjs/components/time/Time.js +0 -5
- package/lib/mjs/components/day/Day.d.ts +1 -1
- package/lib/mjs/components/day/Day.js +15 -8
- package/lib/mjs/components/file/File.d.ts +1 -1
- package/lib/mjs/components/file/File.js +3 -1
- package/lib/mjs/components/file/editForm/File.edit.display.js +1 -1
- package/lib/mjs/components/radio/Radio.d.ts +2 -18
- package/lib/mjs/components/radio/Radio.js +25 -24
- package/lib/mjs/components/select/Select.js +2 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +0 -22
- package/lib/mjs/components/selectboxes/SelectBoxes.js +16 -9
- package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +0 -6
- package/lib/mjs/components/signature/editForm/Signature.edit.display.js +0 -1
- package/lib/mjs/components/time/Time.js +0 -11
- package/package.json +1 -1
|
@@ -132,6 +132,6 @@ export default class DayComponent extends Field {
|
|
|
132
132
|
getValueAsString(value: any): string | null;
|
|
133
133
|
focus(field: any): void;
|
|
134
134
|
isPartialDay(value: any): boolean;
|
|
135
|
-
getValidationFormat():
|
|
135
|
+
getValidationFormat(): string;
|
|
136
136
|
}
|
|
137
137
|
import Field from '../_classes/field/Field';
|
|
@@ -565,16 +565,24 @@ class DayComponent extends Field_1.default {
|
|
|
565
565
|
}
|
|
566
566
|
const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
|
|
567
567
|
const values = value.split('/');
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
values[DAY] === '' ||
|
|
573
|
-
values[MONTH] === '' ||
|
|
574
|
-
values[YEAR] === '');
|
|
568
|
+
if (values.length < 3) {
|
|
569
|
+
return true;
|
|
570
|
+
}
|
|
571
|
+
return (values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000');
|
|
575
572
|
}
|
|
576
573
|
getValidationFormat() {
|
|
577
|
-
|
|
574
|
+
var _a, _b, _c, _d, _e, _f;
|
|
575
|
+
let validationFormat = this.dayFirst ? 'DD-MM-YYYY' : 'MM-DD-YYYY';
|
|
576
|
+
if ((_b = (_a = this.fields) === null || _a === void 0 ? void 0 : _a.day) === null || _b === void 0 ? void 0 : _b.hide) {
|
|
577
|
+
validationFormat = validationFormat.replace('DD-', '');
|
|
578
|
+
}
|
|
579
|
+
if ((_d = (_c = this.fields) === null || _c === void 0 ? void 0 : _c.month) === null || _d === void 0 ? void 0 : _d.hide) {
|
|
580
|
+
validationFormat = validationFormat.replace('MM-', '');
|
|
581
|
+
}
|
|
582
|
+
if ((_f = (_e = this.fields) === null || _e === void 0 ? void 0 : _e.year) === null || _f === void 0 ? void 0 : _f.hide) {
|
|
583
|
+
validationFormat = validationFormat.replace('-YYYY', '');
|
|
584
|
+
}
|
|
585
|
+
return validationFormat;
|
|
578
586
|
}
|
|
579
587
|
}
|
|
580
588
|
exports.default = DayComponent;
|
|
@@ -151,7 +151,9 @@ class FileComponent extends Field_1.default {
|
|
|
151
151
|
return Boolean(this.filesToSync.filesToDelete.length || this.filesToSync.filesToUpload.length);
|
|
152
152
|
}
|
|
153
153
|
get autoSync() {
|
|
154
|
-
|
|
154
|
+
// Disable autoSync for now
|
|
155
|
+
return false;
|
|
156
|
+
// return _.get(this, 'component.autoSync', false);
|
|
155
157
|
}
|
|
156
158
|
get columnsSize() {
|
|
157
159
|
const actionsColumn = this.disabled ? 0 : this.autoSync ? 2 : 1;
|
|
@@ -8,26 +8,10 @@ export default class RadioComponent extends ListComponent {
|
|
|
8
8
|
schema: any;
|
|
9
9
|
};
|
|
10
10
|
static get conditionOperatorsSettings(): {
|
|
11
|
-
valueComponent(classComp: any):
|
|
12
|
-
type: string;
|
|
13
|
-
dataSrc: string;
|
|
14
|
-
valueProperty: string;
|
|
15
|
-
dataType: any;
|
|
16
|
-
data: {
|
|
17
|
-
custom(): any;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
11
|
+
valueComponent(classComp: any): any;
|
|
20
12
|
};
|
|
21
13
|
static get serverConditionSettings(): {
|
|
22
|
-
valueComponent(classComp: any):
|
|
23
|
-
type: string;
|
|
24
|
-
dataSrc: string;
|
|
25
|
-
valueProperty: string;
|
|
26
|
-
dataType: any;
|
|
27
|
-
data: {
|
|
28
|
-
custom: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
14
|
+
valueComponent(classComp: any): any;
|
|
31
15
|
};
|
|
32
16
|
static savedValueTypes(schema: any): any[];
|
|
33
17
|
constructor(component: any, options: any, data: any);
|
|
@@ -33,31 +33,22 @@ class RadioComponent extends ListComponent_1.default {
|
|
|
33
33
|
}
|
|
34
34
|
static get conditionOperatorsSettings() {
|
|
35
35
|
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
const isValuesSrc = !classComp.dataSrc || classComp.dataSrc === 'values';
|
|
37
|
+
return isValuesSrc
|
|
38
|
+
? {
|
|
39
|
+
type: 'select',
|
|
40
|
+
dataSrc: 'custom',
|
|
41
|
+
valueProperty: 'value',
|
|
42
|
+
dataType: classComp.dataType || '',
|
|
43
|
+
data: {
|
|
44
|
+
custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`,
|
|
44
45
|
}
|
|
45
|
-
}
|
|
46
|
-
|
|
46
|
+
}
|
|
47
|
+
: Object.assign(Object.assign({}, classComp), { type: 'select' });
|
|
47
48
|
} });
|
|
48
49
|
}
|
|
49
50
|
static get serverConditionSettings() {
|
|
50
|
-
return
|
|
51
|
-
return {
|
|
52
|
-
type: 'select',
|
|
53
|
-
dataSrc: 'custom',
|
|
54
|
-
valueProperty: 'value',
|
|
55
|
-
dataType: classComp.dataType || '',
|
|
56
|
-
data: {
|
|
57
|
-
custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`,
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
} });
|
|
51
|
+
return RadioComponent.conditionOperatorsSettings;
|
|
61
52
|
}
|
|
62
53
|
static savedValueTypes(schema) {
|
|
63
54
|
const { boolean, string, number, object, array } = utils_1.componentValueTypes;
|
|
@@ -264,6 +255,16 @@ class RadioComponent extends ListComponent_1.default {
|
|
|
264
255
|
if (method.toUpperCase() === 'GET') {
|
|
265
256
|
body = null;
|
|
266
257
|
}
|
|
258
|
+
const limit = this.component.limit || 100;
|
|
259
|
+
const skip = this.isScrollLoading ? this.selectOptions.length : 0;
|
|
260
|
+
// Allow for url interpolation.
|
|
261
|
+
url = this.sanitize(this.interpolate(url, {
|
|
262
|
+
formioBase: Formio_1.Formio.getBaseUrl(),
|
|
263
|
+
search,
|
|
264
|
+
limit,
|
|
265
|
+
skip,
|
|
266
|
+
page: Math.abs(Math.floor(skip / limit))
|
|
267
|
+
}), this.shouldSanitizeValue);
|
|
267
268
|
// Set ignoreCache if it is
|
|
268
269
|
options.ignoreCache = this.component.ignoreCache;
|
|
269
270
|
// Make the request.
|
|
@@ -536,13 +536,13 @@ class SelectComponent extends ListComponent_1.default {
|
|
|
536
536
|
skip,
|
|
537
537
|
};
|
|
538
538
|
// Allow for url interpolation.
|
|
539
|
-
url = this.interpolate(url, {
|
|
539
|
+
url = this.sanitize(this.interpolate(url, {
|
|
540
540
|
formioBase: Formio_1.Formio.getBaseUrl(),
|
|
541
541
|
search,
|
|
542
542
|
limit,
|
|
543
543
|
skip,
|
|
544
544
|
page: Math.abs(Math.floor(skip / limit))
|
|
545
|
-
});
|
|
545
|
+
}), this.shouldSanitizeValue);
|
|
546
546
|
// Add search capability.
|
|
547
547
|
if (this.component.searchField && search) {
|
|
548
548
|
const searchValue = Array.isArray(search)
|
|
@@ -1,26 +1,4 @@
|
|
|
1
1
|
export default class SelectBoxesComponent extends RadioComponent {
|
|
2
|
-
static get serverConditionSettings(): {
|
|
3
|
-
valueComponent(classComp: any): {
|
|
4
|
-
type: string;
|
|
5
|
-
dataSrc: string;
|
|
6
|
-
valueProperty: string;
|
|
7
|
-
dataType: string;
|
|
8
|
-
data: {
|
|
9
|
-
custom: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
static get conditionOperatorsSettings(): {
|
|
14
|
-
valueComponent(classComp: any): {
|
|
15
|
-
type: string;
|
|
16
|
-
dataSrc: string;
|
|
17
|
-
valueProperty: string;
|
|
18
|
-
dataType: string;
|
|
19
|
-
data: {
|
|
20
|
-
custom: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
2
|
static savedValueTypes(schema: any): string[];
|
|
25
3
|
constructor(...args: any[]);
|
|
26
4
|
get emptyValue(): any;
|
|
@@ -30,15 +30,18 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
|
30
30
|
}
|
|
31
31
|
static get conditionOperatorsSettings() {
|
|
32
32
|
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
const isValuesSrc = !classComp.dataSrc || classComp.dataSrc === 'values';
|
|
34
|
+
return isValuesSrc
|
|
35
|
+
? {
|
|
36
|
+
type: 'select',
|
|
37
|
+
dataSrc: 'custom',
|
|
38
|
+
valueProperty: 'value',
|
|
39
|
+
dataType: 'string',
|
|
40
|
+
data: {
|
|
41
|
+
custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
: Object.assign(Object.assign({}, classComp), { dataType: 'string', type: 'select' });
|
|
42
45
|
} });
|
|
43
46
|
}
|
|
44
47
|
static savedValueTypes(schema) {
|
|
@@ -7,7 +7,6 @@ declare const _default: ({
|
|
|
7
7
|
placeholder: string;
|
|
8
8
|
weight: number;
|
|
9
9
|
conditional?: undefined;
|
|
10
|
-
customConditional?: undefined;
|
|
11
10
|
ignore?: undefined;
|
|
12
11
|
} | {
|
|
13
12
|
type: string;
|
|
@@ -24,7 +23,6 @@ declare const _default: ({
|
|
|
24
23
|
};
|
|
25
24
|
};
|
|
26
25
|
weight: number;
|
|
27
|
-
customConditional?: undefined;
|
|
28
26
|
ignore?: undefined;
|
|
29
27
|
} | {
|
|
30
28
|
weight: number;
|
|
@@ -32,9 +30,6 @@ declare const _default: ({
|
|
|
32
30
|
label: string;
|
|
33
31
|
tooltip: string;
|
|
34
32
|
key: string;
|
|
35
|
-
customConditional: ({ options }: {
|
|
36
|
-
options: any;
|
|
37
|
-
}) => boolean;
|
|
38
33
|
input: boolean;
|
|
39
34
|
placeholder?: undefined;
|
|
40
35
|
conditional?: undefined;
|
|
@@ -49,6 +44,5 @@ declare const _default: ({
|
|
|
49
44
|
placeholder?: undefined;
|
|
50
45
|
weight?: undefined;
|
|
51
46
|
conditional?: undefined;
|
|
52
|
-
customConditional?: undefined;
|
|
53
47
|
})[];
|
|
54
48
|
export default _default;
|
|
@@ -39,7 +39,6 @@ exports.default = [
|
|
|
39
39
|
label: 'Keep Overlay Aspect Ratio',
|
|
40
40
|
tooltip: 'If checked, the field will have the same aspect ratio as its preview.',
|
|
41
41
|
key: 'keepOverlayRatio',
|
|
42
|
-
customConditional: ({ options }) => { var _a; return (((_a = options === null || options === void 0 ? void 0 : options.editForm) === null || _a === void 0 ? void 0 : _a.display) === 'pdf'); },
|
|
43
42
|
input: true
|
|
44
43
|
},
|
|
45
44
|
{
|
|
@@ -18,11 +18,6 @@ class TimeComponent extends TextField_1.default {
|
|
|
18
18
|
dataFormat: defaultDataFormat,
|
|
19
19
|
}, ...extend);
|
|
20
20
|
}
|
|
21
|
-
static get serverConditionSettings() {
|
|
22
|
-
return Object.assign(Object.assign({}, super.serverConditionSettings), { valueComponent(classComp) {
|
|
23
|
-
return Object.assign(Object.assign({}, classComp), { type: 'time' });
|
|
24
|
-
} });
|
|
25
|
-
}
|
|
26
21
|
constructor(component, options, data) {
|
|
27
22
|
super(component, options, data);
|
|
28
23
|
const { edge: isEdgeBrowser, version: edgeVersion } = (0, utils_1.getBrowserInfo)();
|
|
@@ -132,6 +132,6 @@ export default class DayComponent extends Field {
|
|
|
132
132
|
getValueAsString(value: any): string | null;
|
|
133
133
|
focus(field: any): void;
|
|
134
134
|
isPartialDay(value: any): boolean;
|
|
135
|
-
getValidationFormat():
|
|
135
|
+
getValidationFormat(): string;
|
|
136
136
|
}
|
|
137
137
|
import Field from '../_classes/field/Field';
|
|
@@ -561,15 +561,22 @@ export default class DayComponent extends Field {
|
|
|
561
561
|
}
|
|
562
562
|
const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
|
|
563
563
|
const values = value.split('/');
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
values[DAY] === '' ||
|
|
569
|
-
values[MONTH] === '' ||
|
|
570
|
-
values[YEAR] === '');
|
|
564
|
+
if (values.length < 3) {
|
|
565
|
+
return true;
|
|
566
|
+
}
|
|
567
|
+
return (values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000');
|
|
571
568
|
}
|
|
572
569
|
getValidationFormat() {
|
|
573
|
-
|
|
570
|
+
let validationFormat = this.dayFirst ? 'DD-MM-YYYY' : 'MM-DD-YYYY';
|
|
571
|
+
if (this.fields?.day?.hide) {
|
|
572
|
+
validationFormat = validationFormat.replace('DD-', '');
|
|
573
|
+
}
|
|
574
|
+
if (this.fields?.month?.hide) {
|
|
575
|
+
validationFormat = validationFormat.replace('MM-', '');
|
|
576
|
+
}
|
|
577
|
+
if (this.fields?.year?.hide) {
|
|
578
|
+
validationFormat = validationFormat.replace('-YYYY', '');
|
|
579
|
+
}
|
|
580
|
+
return validationFormat;
|
|
574
581
|
}
|
|
575
582
|
}
|
|
@@ -140,7 +140,9 @@ export default class FileComponent extends Field {
|
|
|
140
140
|
return Boolean(this.filesToSync.filesToDelete.length || this.filesToSync.filesToUpload.length);
|
|
141
141
|
}
|
|
142
142
|
get autoSync() {
|
|
143
|
-
|
|
143
|
+
// Disable autoSync for now
|
|
144
|
+
return false;
|
|
145
|
+
// return _.get(this, 'component.autoSync', false);
|
|
144
146
|
}
|
|
145
147
|
get columnsSize() {
|
|
146
148
|
const actionsColumn = this.disabled ? 0 : this.autoSync ? 2 : 1;
|
|
@@ -8,26 +8,10 @@ export default class RadioComponent extends ListComponent {
|
|
|
8
8
|
schema: any;
|
|
9
9
|
};
|
|
10
10
|
static get conditionOperatorsSettings(): {
|
|
11
|
-
valueComponent(classComp: any):
|
|
12
|
-
type: string;
|
|
13
|
-
dataSrc: string;
|
|
14
|
-
valueProperty: string;
|
|
15
|
-
dataType: any;
|
|
16
|
-
data: {
|
|
17
|
-
custom(): any;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
11
|
+
valueComponent(classComp: any): any;
|
|
20
12
|
};
|
|
21
13
|
static get serverConditionSettings(): {
|
|
22
|
-
valueComponent(classComp: any):
|
|
23
|
-
type: string;
|
|
24
|
-
dataSrc: string;
|
|
25
|
-
valueProperty: string;
|
|
26
|
-
dataType: any;
|
|
27
|
-
data: {
|
|
28
|
-
custom: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
14
|
+
valueComponent(classComp: any): any;
|
|
31
15
|
};
|
|
32
16
|
static savedValueTypes(schema: any): any[];
|
|
33
17
|
constructor(component: any, options: any, data: any);
|
|
@@ -30,35 +30,26 @@ export default class RadioComponent extends ListComponent {
|
|
|
30
30
|
return {
|
|
31
31
|
...super.conditionOperatorsSettings,
|
|
32
32
|
valueComponent(classComp) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
const isValuesSrc = !classComp.dataSrc || classComp.dataSrc === 'values';
|
|
34
|
+
return isValuesSrc
|
|
35
|
+
? {
|
|
36
|
+
type: 'select',
|
|
37
|
+
dataSrc: 'custom',
|
|
38
|
+
valueProperty: 'value',
|
|
39
|
+
dataType: classComp.dataType || '',
|
|
40
|
+
data: {
|
|
41
|
+
custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`,
|
|
41
42
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
43
|
+
}
|
|
44
|
+
: {
|
|
45
|
+
...classComp,
|
|
46
|
+
type: 'select',
|
|
47
|
+
};
|
|
44
48
|
}
|
|
45
49
|
};
|
|
46
50
|
}
|
|
47
51
|
static get serverConditionSettings() {
|
|
48
|
-
return
|
|
49
|
-
...super.serverConditionSettings,
|
|
50
|
-
valueComponent(classComp) {
|
|
51
|
-
return {
|
|
52
|
-
type: 'select',
|
|
53
|
-
dataSrc: 'custom',
|
|
54
|
-
valueProperty: 'value',
|
|
55
|
-
dataType: classComp.dataType || '',
|
|
56
|
-
data: {
|
|
57
|
-
custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`,
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
},
|
|
61
|
-
};
|
|
52
|
+
return RadioComponent.conditionOperatorsSettings;
|
|
62
53
|
}
|
|
63
54
|
static savedValueTypes(schema) {
|
|
64
55
|
const { boolean, string, number, object, array } = componentValueTypes;
|
|
@@ -264,6 +255,16 @@ export default class RadioComponent extends ListComponent {
|
|
|
264
255
|
if (method.toUpperCase() === 'GET') {
|
|
265
256
|
body = null;
|
|
266
257
|
}
|
|
258
|
+
const limit = this.component.limit || 100;
|
|
259
|
+
const skip = this.isScrollLoading ? this.selectOptions.length : 0;
|
|
260
|
+
// Allow for url interpolation.
|
|
261
|
+
url = this.sanitize(this.interpolate(url, {
|
|
262
|
+
formioBase: Formio.getBaseUrl(),
|
|
263
|
+
search,
|
|
264
|
+
limit,
|
|
265
|
+
skip,
|
|
266
|
+
page: Math.abs(Math.floor(skip / limit))
|
|
267
|
+
}), this.shouldSanitizeValue);
|
|
267
268
|
// Set ignoreCache if it is
|
|
268
269
|
options.ignoreCache = this.component.ignoreCache;
|
|
269
270
|
// Make the request.
|
|
@@ -538,13 +538,13 @@ export default class SelectComponent extends ListComponent {
|
|
|
538
538
|
skip,
|
|
539
539
|
};
|
|
540
540
|
// Allow for url interpolation.
|
|
541
|
-
url = this.interpolate(url, {
|
|
541
|
+
url = this.sanitize(this.interpolate(url, {
|
|
542
542
|
formioBase: Formio.getBaseUrl(),
|
|
543
543
|
search,
|
|
544
544
|
limit,
|
|
545
545
|
skip,
|
|
546
546
|
page: Math.abs(Math.floor(skip / limit))
|
|
547
|
-
});
|
|
547
|
+
}), this.shouldSanitizeValue);
|
|
548
548
|
// Add search capability.
|
|
549
549
|
if (this.component.searchField && search) {
|
|
550
550
|
const searchValue = Array.isArray(search)
|
|
@@ -1,26 +1,4 @@
|
|
|
1
1
|
export default class SelectBoxesComponent extends RadioComponent {
|
|
2
|
-
static get serverConditionSettings(): {
|
|
3
|
-
valueComponent(classComp: any): {
|
|
4
|
-
type: string;
|
|
5
|
-
dataSrc: string;
|
|
6
|
-
valueProperty: string;
|
|
7
|
-
dataType: string;
|
|
8
|
-
data: {
|
|
9
|
-
custom: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
static get conditionOperatorsSettings(): {
|
|
14
|
-
valueComponent(classComp: any): {
|
|
15
|
-
type: string;
|
|
16
|
-
dataSrc: string;
|
|
17
|
-
valueProperty: string;
|
|
18
|
-
dataType: string;
|
|
19
|
-
data: {
|
|
20
|
-
custom: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
2
|
static savedValueTypes(schema: any): string[];
|
|
25
3
|
constructor(...args: any[]);
|
|
26
4
|
get emptyValue(): any;
|
|
@@ -27,15 +27,22 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
|
27
27
|
return {
|
|
28
28
|
...super.conditionOperatorsSettings,
|
|
29
29
|
valueComponent(classComp) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
const isValuesSrc = !classComp.dataSrc || classComp.dataSrc === 'values';
|
|
31
|
+
return isValuesSrc
|
|
32
|
+
? {
|
|
33
|
+
type: 'select',
|
|
34
|
+
dataSrc: 'custom',
|
|
35
|
+
valueProperty: 'value',
|
|
36
|
+
dataType: 'string',
|
|
37
|
+
data: {
|
|
38
|
+
custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
: {
|
|
42
|
+
...classComp,
|
|
43
|
+
dataType: 'string',
|
|
44
|
+
type: 'select',
|
|
45
|
+
};
|
|
39
46
|
}
|
|
40
47
|
};
|
|
41
48
|
}
|
|
@@ -7,7 +7,6 @@ declare const _default: ({
|
|
|
7
7
|
placeholder: string;
|
|
8
8
|
weight: number;
|
|
9
9
|
conditional?: undefined;
|
|
10
|
-
customConditional?: undefined;
|
|
11
10
|
ignore?: undefined;
|
|
12
11
|
} | {
|
|
13
12
|
type: string;
|
|
@@ -24,7 +23,6 @@ declare const _default: ({
|
|
|
24
23
|
};
|
|
25
24
|
};
|
|
26
25
|
weight: number;
|
|
27
|
-
customConditional?: undefined;
|
|
28
26
|
ignore?: undefined;
|
|
29
27
|
} | {
|
|
30
28
|
weight: number;
|
|
@@ -32,9 +30,6 @@ declare const _default: ({
|
|
|
32
30
|
label: string;
|
|
33
31
|
tooltip: string;
|
|
34
32
|
key: string;
|
|
35
|
-
customConditional: ({ options }: {
|
|
36
|
-
options: any;
|
|
37
|
-
}) => boolean;
|
|
38
33
|
input: boolean;
|
|
39
34
|
placeholder?: undefined;
|
|
40
35
|
conditional?: undefined;
|
|
@@ -49,6 +44,5 @@ declare const _default: ({
|
|
|
49
44
|
placeholder?: undefined;
|
|
50
45
|
weight?: undefined;
|
|
51
46
|
conditional?: undefined;
|
|
52
|
-
customConditional?: undefined;
|
|
53
47
|
})[];
|
|
54
48
|
export default _default;
|
|
@@ -37,7 +37,6 @@ export default [
|
|
|
37
37
|
label: 'Keep Overlay Aspect Ratio',
|
|
38
38
|
tooltip: 'If checked, the field will have the same aspect ratio as its preview.',
|
|
39
39
|
key: 'keepOverlayRatio',
|
|
40
|
-
customConditional: ({ options }) => (options?.editForm?.display === 'pdf'),
|
|
41
40
|
input: true
|
|
42
41
|
},
|
|
43
42
|
{
|
|
@@ -13,17 +13,6 @@ export default class TimeComponent extends TextFieldComponent {
|
|
|
13
13
|
dataFormat: defaultDataFormat,
|
|
14
14
|
}, ...extend);
|
|
15
15
|
}
|
|
16
|
-
static get serverConditionSettings() {
|
|
17
|
-
return {
|
|
18
|
-
...super.serverConditionSettings,
|
|
19
|
-
valueComponent(classComp) {
|
|
20
|
-
return {
|
|
21
|
-
...classComp,
|
|
22
|
-
type: 'time',
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
16
|
constructor(component, options, data) {
|
|
28
17
|
super(component, options, data);
|
|
29
18
|
const { edge: isEdgeBrowser, version: edgeVersion } = getBrowserInfo();
|