@formio/js 5.0.0-rc.95 → 5.0.0-rc.97
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +22 -22
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +22 -22
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +5 -5
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +14 -14
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/Wizard.js +1 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.js +3 -0
- package/lib/cjs/components/form/Form.js +1 -1
- package/lib/cjs/components/radio/Radio.js +4 -3
- package/lib/cjs/components/select/Select.js +2 -2
- package/lib/cjs/components/select/fixtures/comp28.d.ts +93 -0
- package/lib/cjs/components/select/fixtures/comp28.js +61 -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/selectboxes/SelectBoxes.js +12 -0
- package/lib/mjs/Wizard.js +1 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.js +3 -0
- package/lib/mjs/components/form/Form.js +1 -1
- package/lib/mjs/components/radio/Radio.js +4 -3
- package/lib/mjs/components/select/Select.js +2 -2
- package/lib/mjs/components/select/fixtures/comp28.d.ts +93 -0
- package/lib/mjs/components/select/fixtures/comp28.js +59 -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/selectboxes/SelectBoxes.js +13 -1
- package/package.json +2 -2
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
|
22
22
|
|
23
|
-
/*! formiojs v5.0.0-rc.
|
23
|
+
/*! formiojs v5.0.0-rc.97 | https://unpkg.com/formiojs@5.0.0-rc.97/LICENSE.txt */
|
24
24
|
|
25
25
|
/**
|
26
26
|
* @license
|
package/lib/cjs/Wizard.js
CHANGED
@@ -716,7 +716,7 @@ class Wizard extends Webform_1.default {
|
|
716
716
|
else {
|
717
717
|
this.currentPage.components.forEach((comp) => comp.setPristine(false));
|
718
718
|
this.scrollIntoView(this.element, true);
|
719
|
-
return Promise.reject(
|
719
|
+
return Promise.reject(super.showErrors(errors, true));
|
720
720
|
}
|
721
721
|
}
|
722
722
|
validateCurrentPage(flags = {}) {
|
@@ -693,6 +693,9 @@ class NestedComponent extends Field_1.default {
|
|
693
693
|
if (!instance) {
|
694
694
|
return;
|
695
695
|
}
|
696
|
+
if (!instance.component.path) {
|
697
|
+
instance.component.path = component.path;
|
698
|
+
}
|
696
699
|
instance.checkComponentValidity(data, dirty, row, flags, scope.errors);
|
697
700
|
if (instance.processOwnValidation) {
|
698
701
|
scope.noRecurse = true;
|
@@ -476,7 +476,7 @@ class FormComponent extends Component_1.default {
|
|
476
476
|
checkComponentValidity(data, dirty, row, options, errors = []) {
|
477
477
|
options = options || {};
|
478
478
|
const silentCheck = options.silentCheck || false;
|
479
|
-
if (this.subForm) {
|
479
|
+
if (this.subForm && !this.isNestedWizard) {
|
480
480
|
return this.subForm.checkValidity(this.subFormData, dirty, null, silentCheck, errors);
|
481
481
|
}
|
482
482
|
return super.checkComponentValidity(data, dirty, row, options, errors);
|
@@ -302,12 +302,13 @@ class RadioComponent extends ListComponent_1.default {
|
|
302
302
|
.then((response) => {
|
303
303
|
this.loading = false;
|
304
304
|
this.setItems(response);
|
305
|
-
this.optionsLoaded = true;
|
306
|
-
this.redraw();
|
307
305
|
})
|
308
306
|
.catch((err) => {
|
309
|
-
this.optionsLoaded = true;
|
310
307
|
this.handleLoadingError(err);
|
308
|
+
})
|
309
|
+
.finally(() => {
|
310
|
+
this.optionsLoaded = true;
|
311
|
+
this.redraw();
|
311
312
|
});
|
312
313
|
}
|
313
314
|
loadItemsFromMetadata() {
|
@@ -1217,7 +1217,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
1217
1217
|
}
|
1218
1218
|
// Check to see if we need to save off the template data into our metadata.
|
1219
1219
|
const templateValue = this.component.reference && (value === null || value === void 0 ? void 0 : value._id) ? value._id.toString() : value;
|
1220
|
-
const shouldSaveData = !valueIsObject || this.component.reference;
|
1220
|
+
const shouldSaveData = (!valueIsObject || this.component.reference) && !this.inDataTable;
|
1221
1221
|
if (!lodash_1.default.isNil(templateValue) && shouldSaveData && this.templateData && this.templateData[templateValue] && ((_a = this.root) === null || _a === void 0 ? void 0 : _a.submission)) {
|
1222
1222
|
const submission = this.root.submission;
|
1223
1223
|
if (!submission.metadata) {
|
@@ -1240,7 +1240,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
1240
1240
|
}
|
1241
1241
|
lodash_1.default.set(submission.metadata.selectData, this.path, templateData);
|
1242
1242
|
}
|
1243
|
-
if (flags.resetValue && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submission)) {
|
1243
|
+
if (flags.resetValue && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submission) && !this.options.readOnly) {
|
1244
1244
|
const submission = this.root.submission;
|
1245
1245
|
if (!submission.metadata) {
|
1246
1246
|
submission.metadata = {};
|
@@ -0,0 +1,93 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
let _id: string;
|
3
|
+
let title: string;
|
4
|
+
let name: string;
|
5
|
+
let path: string;
|
6
|
+
let type: string;
|
7
|
+
let display: string;
|
8
|
+
let components: ({
|
9
|
+
label: string;
|
10
|
+
applyMaskOn: string;
|
11
|
+
mask: boolean;
|
12
|
+
tableView: boolean;
|
13
|
+
delimiter: boolean;
|
14
|
+
requireDecimal: boolean;
|
15
|
+
inputFormat: string;
|
16
|
+
truncateMultipleSpaces: boolean;
|
17
|
+
validateWhenHidden: boolean;
|
18
|
+
key: string;
|
19
|
+
type: string;
|
20
|
+
input: boolean;
|
21
|
+
widget?: undefined;
|
22
|
+
dataSrc?: undefined;
|
23
|
+
data?: undefined;
|
24
|
+
valueProperty?: undefined;
|
25
|
+
template?: undefined;
|
26
|
+
validate?: undefined;
|
27
|
+
searchField?: undefined;
|
28
|
+
noRefreshOnScroll?: undefined;
|
29
|
+
addResource?: undefined;
|
30
|
+
reference?: undefined;
|
31
|
+
searchThreshold?: undefined;
|
32
|
+
disableOnInvalid?: undefined;
|
33
|
+
} | {
|
34
|
+
label: string;
|
35
|
+
widget: string;
|
36
|
+
tableView: boolean;
|
37
|
+
dataSrc: string;
|
38
|
+
data: {
|
39
|
+
resource: string;
|
40
|
+
};
|
41
|
+
valueProperty: string;
|
42
|
+
template: string;
|
43
|
+
validate: {
|
44
|
+
select: boolean;
|
45
|
+
};
|
46
|
+
validateWhenHidden: boolean;
|
47
|
+
key: string;
|
48
|
+
type: string;
|
49
|
+
searchField: string;
|
50
|
+
noRefreshOnScroll: boolean;
|
51
|
+
addResource: boolean;
|
52
|
+
reference: boolean;
|
53
|
+
input: boolean;
|
54
|
+
searchThreshold: number;
|
55
|
+
applyMaskOn?: undefined;
|
56
|
+
mask?: undefined;
|
57
|
+
delimiter?: undefined;
|
58
|
+
requireDecimal?: undefined;
|
59
|
+
inputFormat?: undefined;
|
60
|
+
truncateMultipleSpaces?: undefined;
|
61
|
+
disableOnInvalid?: undefined;
|
62
|
+
} | {
|
63
|
+
type: string;
|
64
|
+
label: string;
|
65
|
+
key: string;
|
66
|
+
disableOnInvalid: boolean;
|
67
|
+
input: boolean;
|
68
|
+
tableView: boolean;
|
69
|
+
applyMaskOn?: undefined;
|
70
|
+
mask?: undefined;
|
71
|
+
delimiter?: undefined;
|
72
|
+
requireDecimal?: undefined;
|
73
|
+
inputFormat?: undefined;
|
74
|
+
truncateMultipleSpaces?: undefined;
|
75
|
+
validateWhenHidden?: undefined;
|
76
|
+
widget?: undefined;
|
77
|
+
dataSrc?: undefined;
|
78
|
+
data?: undefined;
|
79
|
+
valueProperty?: undefined;
|
80
|
+
template?: undefined;
|
81
|
+
validate?: undefined;
|
82
|
+
searchField?: undefined;
|
83
|
+
noRefreshOnScroll?: undefined;
|
84
|
+
addResource?: undefined;
|
85
|
+
reference?: undefined;
|
86
|
+
searchThreshold?: undefined;
|
87
|
+
})[];
|
88
|
+
let project: string;
|
89
|
+
let created: string;
|
90
|
+
let modified: string;
|
91
|
+
let machineName: string;
|
92
|
+
}
|
93
|
+
export default _default;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = {
|
4
|
+
_id: '672483c1d9abe46bcd70bca4',
|
5
|
+
title: 'yyyyyyy',
|
6
|
+
name: 'yyyyyyy',
|
7
|
+
path: 'yyyyyyy',
|
8
|
+
type: 'form',
|
9
|
+
display: 'form',
|
10
|
+
components: [
|
11
|
+
{
|
12
|
+
label: 'Number',
|
13
|
+
applyMaskOn: 'change',
|
14
|
+
mask: false,
|
15
|
+
tableView: false,
|
16
|
+
delimiter: false,
|
17
|
+
requireDecimal: false,
|
18
|
+
inputFormat: 'plain',
|
19
|
+
truncateMultipleSpaces: false,
|
20
|
+
validateWhenHidden: false,
|
21
|
+
key: 'number',
|
22
|
+
type: 'number',
|
23
|
+
input: true,
|
24
|
+
},
|
25
|
+
{
|
26
|
+
label: 'Select - Resource',
|
27
|
+
widget: 'choicesjs',
|
28
|
+
tableView: true,
|
29
|
+
dataSrc: 'resource',
|
30
|
+
data: {
|
31
|
+
resource: '672482f2d9abe46bcd70a0dc',
|
32
|
+
},
|
33
|
+
valueProperty: 'data.textField',
|
34
|
+
template: '<span>{{ item.data.textField }}</span>',
|
35
|
+
validate: {
|
36
|
+
select: false,
|
37
|
+
},
|
38
|
+
validateWhenHidden: false,
|
39
|
+
key: 'selectResource',
|
40
|
+
type: 'select',
|
41
|
+
searchField: 'data.textField__regex',
|
42
|
+
noRefreshOnScroll: false,
|
43
|
+
addResource: false,
|
44
|
+
reference: false,
|
45
|
+
input: true,
|
46
|
+
searchThreshold: 0.3,
|
47
|
+
},
|
48
|
+
{
|
49
|
+
type: 'button',
|
50
|
+
label: 'Submit',
|
51
|
+
key: 'submit',
|
52
|
+
disableOnInvalid: true,
|
53
|
+
input: true,
|
54
|
+
tableView: false,
|
55
|
+
},
|
56
|
+
],
|
57
|
+
project: '67211a9aa929e4e6ebc2bf77',
|
58
|
+
created: '2024-11-01T07:31:13.647Z',
|
59
|
+
modified: '2024-11-01T12:51:23.213Z',
|
60
|
+
machineName: 'izutenexavvxnws:yyyyyyy',
|
61
|
+
};
|
@@ -24,5 +24,6 @@ import comp24 from './comp24';
|
|
24
24
|
import comp25 from './comp25';
|
25
25
|
import comp26 from './comp26';
|
26
26
|
import comp27 from './comp27';
|
27
|
-
|
27
|
+
import comp28 from './comp28';
|
28
|
+
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, comp26, comp27, comp28 };
|
28
29
|
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.comp27 = exports.comp26 = 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;
|
6
|
+
exports.comp28 = exports.comp27 = exports.comp26 = 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"));
|
@@ -59,3 +59,5 @@ const comp26_1 = __importDefault(require("./comp26"));
|
|
59
59
|
exports.comp26 = comp26_1.default;
|
60
60
|
const comp27_1 = __importDefault(require("./comp27"));
|
61
61
|
exports.comp27 = comp27_1.default;
|
62
|
+
const comp28_1 = __importDefault(require("./comp28"));
|
63
|
+
exports.comp28 = comp28_1.default;
|
@@ -257,6 +257,18 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
257
257
|
}
|
258
258
|
return super.checkComponentValidity(data, dirty, rowData, options, errors);
|
259
259
|
}
|
260
|
+
setCustomValidity(messages, dirty, external) {
|
261
|
+
if (this.options.building && lodash_1.default.find(messages, { ruleName: 'invalidValueProperty' })) {
|
262
|
+
setTimeout(() => {
|
263
|
+
this.root && (0, utils_1.getComponent)(this.root.components, 'valueProperty').setCustomValidity(messages, dirty);
|
264
|
+
}, 0);
|
265
|
+
return super.setCustomValidity(lodash_1.default.filter(messages, (message) => message.ruleName !== 'invalidValueProperty'), dirty, external);
|
266
|
+
}
|
267
|
+
else {
|
268
|
+
return super.setCustomValidity(messages, dirty, external);
|
269
|
+
}
|
270
|
+
;
|
271
|
+
}
|
260
272
|
validateValueAvailability(setting, value) {
|
261
273
|
if (!(0, utils_1.boolValue)(setting) || !value) {
|
262
274
|
return true;
|
package/lib/mjs/Wizard.js
CHANGED
@@ -706,7 +706,7 @@ export default class Wizard extends Webform {
|
|
706
706
|
else {
|
707
707
|
this.currentPage.components.forEach((comp) => comp.setPristine(false));
|
708
708
|
this.scrollIntoView(this.element, true);
|
709
|
-
return Promise.reject(
|
709
|
+
return Promise.reject(super.showErrors(errors, true));
|
710
710
|
}
|
711
711
|
}
|
712
712
|
validateCurrentPage(flags = {}) {
|
@@ -688,6 +688,9 @@ export default class NestedComponent extends Field {
|
|
688
688
|
if (!instance) {
|
689
689
|
return;
|
690
690
|
}
|
691
|
+
if (!instance.component.path) {
|
692
|
+
instance.component.path = component.path;
|
693
|
+
}
|
691
694
|
instance.checkComponentValidity(data, dirty, row, flags, scope.errors);
|
692
695
|
if (instance.processOwnValidation) {
|
693
696
|
scope.noRecurse = true;
|
@@ -470,7 +470,7 @@ export default class FormComponent extends Component {
|
|
470
470
|
checkComponentValidity(data, dirty, row, options, errors = []) {
|
471
471
|
options = options || {};
|
472
472
|
const silentCheck = options.silentCheck || false;
|
473
|
-
if (this.subForm) {
|
473
|
+
if (this.subForm && !this.isNestedWizard) {
|
474
474
|
return this.subForm.checkValidity(this.subFormData, dirty, null, silentCheck, errors);
|
475
475
|
}
|
476
476
|
return super.checkComponentValidity(data, dirty, row, options, errors);
|
@@ -302,12 +302,13 @@ export default class RadioComponent extends ListComponent {
|
|
302
302
|
.then((response) => {
|
303
303
|
this.loading = false;
|
304
304
|
this.setItems(response);
|
305
|
-
this.optionsLoaded = true;
|
306
|
-
this.redraw();
|
307
305
|
})
|
308
306
|
.catch((err) => {
|
309
|
-
this.optionsLoaded = true;
|
310
307
|
this.handleLoadingError(err);
|
308
|
+
})
|
309
|
+
.finally(() => {
|
310
|
+
this.optionsLoaded = true;
|
311
|
+
this.redraw();
|
311
312
|
});
|
312
313
|
}
|
313
314
|
loadItemsFromMetadata() {
|
@@ -1245,7 +1245,7 @@ export default class SelectComponent extends ListComponent {
|
|
1245
1245
|
}
|
1246
1246
|
// Check to see if we need to save off the template data into our metadata.
|
1247
1247
|
const templateValue = this.component.reference && value?._id ? value._id.toString() : value;
|
1248
|
-
const shouldSaveData = !valueIsObject || this.component.reference;
|
1248
|
+
const shouldSaveData = (!valueIsObject || this.component.reference) && !this.inDataTable;
|
1249
1249
|
if (!_.isNil(templateValue) && shouldSaveData && this.templateData && this.templateData[templateValue] && this.root?.submission) {
|
1250
1250
|
const submission = this.root.submission;
|
1251
1251
|
if (!submission.metadata) {
|
@@ -1268,7 +1268,7 @@ export default class SelectComponent extends ListComponent {
|
|
1268
1268
|
}
|
1269
1269
|
_.set(submission.metadata.selectData, this.path, templateData);
|
1270
1270
|
}
|
1271
|
-
if (flags.resetValue && this.root?.submission) {
|
1271
|
+
if (flags.resetValue && this.root?.submission && !this.options.readOnly) {
|
1272
1272
|
const submission = this.root.submission;
|
1273
1273
|
if (!submission.metadata) {
|
1274
1274
|
submission.metadata = {};
|
@@ -0,0 +1,93 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
let _id: string;
|
3
|
+
let title: string;
|
4
|
+
let name: string;
|
5
|
+
let path: string;
|
6
|
+
let type: string;
|
7
|
+
let display: string;
|
8
|
+
let components: ({
|
9
|
+
label: string;
|
10
|
+
applyMaskOn: string;
|
11
|
+
mask: boolean;
|
12
|
+
tableView: boolean;
|
13
|
+
delimiter: boolean;
|
14
|
+
requireDecimal: boolean;
|
15
|
+
inputFormat: string;
|
16
|
+
truncateMultipleSpaces: boolean;
|
17
|
+
validateWhenHidden: boolean;
|
18
|
+
key: string;
|
19
|
+
type: string;
|
20
|
+
input: boolean;
|
21
|
+
widget?: undefined;
|
22
|
+
dataSrc?: undefined;
|
23
|
+
data?: undefined;
|
24
|
+
valueProperty?: undefined;
|
25
|
+
template?: undefined;
|
26
|
+
validate?: undefined;
|
27
|
+
searchField?: undefined;
|
28
|
+
noRefreshOnScroll?: undefined;
|
29
|
+
addResource?: undefined;
|
30
|
+
reference?: undefined;
|
31
|
+
searchThreshold?: undefined;
|
32
|
+
disableOnInvalid?: undefined;
|
33
|
+
} | {
|
34
|
+
label: string;
|
35
|
+
widget: string;
|
36
|
+
tableView: boolean;
|
37
|
+
dataSrc: string;
|
38
|
+
data: {
|
39
|
+
resource: string;
|
40
|
+
};
|
41
|
+
valueProperty: string;
|
42
|
+
template: string;
|
43
|
+
validate: {
|
44
|
+
select: boolean;
|
45
|
+
};
|
46
|
+
validateWhenHidden: boolean;
|
47
|
+
key: string;
|
48
|
+
type: string;
|
49
|
+
searchField: string;
|
50
|
+
noRefreshOnScroll: boolean;
|
51
|
+
addResource: boolean;
|
52
|
+
reference: boolean;
|
53
|
+
input: boolean;
|
54
|
+
searchThreshold: number;
|
55
|
+
applyMaskOn?: undefined;
|
56
|
+
mask?: undefined;
|
57
|
+
delimiter?: undefined;
|
58
|
+
requireDecimal?: undefined;
|
59
|
+
inputFormat?: undefined;
|
60
|
+
truncateMultipleSpaces?: undefined;
|
61
|
+
disableOnInvalid?: undefined;
|
62
|
+
} | {
|
63
|
+
type: string;
|
64
|
+
label: string;
|
65
|
+
key: string;
|
66
|
+
disableOnInvalid: boolean;
|
67
|
+
input: boolean;
|
68
|
+
tableView: boolean;
|
69
|
+
applyMaskOn?: undefined;
|
70
|
+
mask?: undefined;
|
71
|
+
delimiter?: undefined;
|
72
|
+
requireDecimal?: undefined;
|
73
|
+
inputFormat?: undefined;
|
74
|
+
truncateMultipleSpaces?: undefined;
|
75
|
+
validateWhenHidden?: undefined;
|
76
|
+
widget?: undefined;
|
77
|
+
dataSrc?: undefined;
|
78
|
+
data?: undefined;
|
79
|
+
valueProperty?: undefined;
|
80
|
+
template?: undefined;
|
81
|
+
validate?: undefined;
|
82
|
+
searchField?: undefined;
|
83
|
+
noRefreshOnScroll?: undefined;
|
84
|
+
addResource?: undefined;
|
85
|
+
reference?: undefined;
|
86
|
+
searchThreshold?: undefined;
|
87
|
+
})[];
|
88
|
+
let project: string;
|
89
|
+
let created: string;
|
90
|
+
let modified: string;
|
91
|
+
let machineName: string;
|
92
|
+
}
|
93
|
+
export default _default;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
export default {
|
2
|
+
_id: '672483c1d9abe46bcd70bca4',
|
3
|
+
title: 'yyyyyyy',
|
4
|
+
name: 'yyyyyyy',
|
5
|
+
path: 'yyyyyyy',
|
6
|
+
type: 'form',
|
7
|
+
display: 'form',
|
8
|
+
components: [
|
9
|
+
{
|
10
|
+
label: 'Number',
|
11
|
+
applyMaskOn: 'change',
|
12
|
+
mask: false,
|
13
|
+
tableView: false,
|
14
|
+
delimiter: false,
|
15
|
+
requireDecimal: false,
|
16
|
+
inputFormat: 'plain',
|
17
|
+
truncateMultipleSpaces: false,
|
18
|
+
validateWhenHidden: false,
|
19
|
+
key: 'number',
|
20
|
+
type: 'number',
|
21
|
+
input: true,
|
22
|
+
},
|
23
|
+
{
|
24
|
+
label: 'Select - Resource',
|
25
|
+
widget: 'choicesjs',
|
26
|
+
tableView: true,
|
27
|
+
dataSrc: 'resource',
|
28
|
+
data: {
|
29
|
+
resource: '672482f2d9abe46bcd70a0dc',
|
30
|
+
},
|
31
|
+
valueProperty: 'data.textField',
|
32
|
+
template: '<span>{{ item.data.textField }}</span>',
|
33
|
+
validate: {
|
34
|
+
select: false,
|
35
|
+
},
|
36
|
+
validateWhenHidden: false,
|
37
|
+
key: 'selectResource',
|
38
|
+
type: 'select',
|
39
|
+
searchField: 'data.textField__regex',
|
40
|
+
noRefreshOnScroll: false,
|
41
|
+
addResource: false,
|
42
|
+
reference: false,
|
43
|
+
input: true,
|
44
|
+
searchThreshold: 0.3,
|
45
|
+
},
|
46
|
+
{
|
47
|
+
type: 'button',
|
48
|
+
label: 'Submit',
|
49
|
+
key: 'submit',
|
50
|
+
disableOnInvalid: true,
|
51
|
+
input: true,
|
52
|
+
tableView: false,
|
53
|
+
},
|
54
|
+
],
|
55
|
+
project: '67211a9aa929e4e6ebc2bf77',
|
56
|
+
created: '2024-11-01T07:31:13.647Z',
|
57
|
+
modified: '2024-11-01T12:51:23.213Z',
|
58
|
+
machineName: 'izutenexavvxnws:yyyyyyy',
|
59
|
+
};
|
@@ -24,5 +24,6 @@ import comp24 from './comp24';
|
|
24
24
|
import comp25 from './comp25';
|
25
25
|
import comp26 from './comp26';
|
26
26
|
import comp27 from './comp27';
|
27
|
-
|
27
|
+
import comp28 from './comp28';
|
28
|
+
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, comp26, comp27, comp28 };
|
28
29
|
export { multiSelect, multiSelectOptions } from "./comp3";
|
@@ -25,4 +25,5 @@ import comp24 from './comp24';
|
|
25
25
|
import comp25 from './comp25';
|
26
26
|
import comp26 from './comp26';
|
27
27
|
import comp27 from './comp27';
|
28
|
-
|
28
|
+
import comp28 from './comp28';
|
29
|
+
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, comp26, comp27, comp28 };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import _ from 'lodash';
|
2
|
-
import { componentValueTypes, getComponentSavedTypes, boolValue } from '../../utils/utils';
|
2
|
+
import { componentValueTypes, getComponentSavedTypes, boolValue, getComponent } from '../../utils/utils';
|
3
3
|
import RadioComponent from '../radio/Radio';
|
4
4
|
export default class SelectBoxesComponent extends RadioComponent {
|
5
5
|
static schema(...extend) {
|
@@ -258,6 +258,18 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
258
258
|
}
|
259
259
|
return super.checkComponentValidity(data, dirty, rowData, options, errors);
|
260
260
|
}
|
261
|
+
setCustomValidity(messages, dirty, external) {
|
262
|
+
if (this.options.building && _.find(messages, { ruleName: 'invalidValueProperty' })) {
|
263
|
+
setTimeout(() => {
|
264
|
+
this.root && getComponent(this.root.components, 'valueProperty').setCustomValidity(messages, dirty);
|
265
|
+
}, 0);
|
266
|
+
return super.setCustomValidity(_.filter(messages, (message) => message.ruleName !== 'invalidValueProperty'), dirty, external);
|
267
|
+
}
|
268
|
+
else {
|
269
|
+
return super.setCustomValidity(messages, dirty, external);
|
270
|
+
}
|
271
|
+
;
|
272
|
+
}
|
261
273
|
validateValueAvailability(setting, value) {
|
262
274
|
if (!boolValue(setting) || !value) {
|
263
275
|
return true;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@formio/js",
|
3
|
-
"version": "5.0.0-rc.
|
3
|
+
"version": "5.0.0-rc.97",
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
5
5
|
"main": "lib/cjs/index.js",
|
6
6
|
"exports": {
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"dependencies": {
|
82
82
|
"@formio/bootstrap": "3.0.0-rc.41",
|
83
83
|
"@formio/choices.js": "^10.2.1",
|
84
|
-
"@formio/core": "2.3.0-rc.
|
84
|
+
"@formio/core": "2.3.0-rc.21",
|
85
85
|
"@formio/text-mask-addons": "^3.8.0-formio.3",
|
86
86
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
87
87
|
"abortcontroller-polyfill": "^1.7.5",
|