@formio/js 5.0.0-dev.5794.12ca15f → 5.0.0-dev.5798.beb3cc0
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 +562 -570
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +0 -10
- package/dist/formio.full.js +562 -570
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +0 -10
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +50 -48
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +4 -4
- package/lib/cjs/Webform.js +2 -2
- package/lib/cjs/components/_classes/component/Component.d.ts +1 -1
- package/lib/cjs/components/_classes/component/Component.js +7 -6
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +8 -0
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +12 -10
- package/lib/cjs/components/day/Day.d.ts +0 -1
- package/lib/cjs/components/editgrid/fixtures/index.d.ts +7 -7
- package/lib/cjs/components/editgrid/fixtures/index.js +1 -1
- package/lib/cjs/components/select/Select.js +1 -1
- package/lib/cjs/components/select/fixtures/comp25.d.ts +43 -28
- package/lib/cjs/components/select/fixtures/comp25.js +56 -49
- package/lib/cjs/components/select/fixtures/comp26.d.ts +44 -0
- package/lib/cjs/components/select/fixtures/comp26.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/mjs/Webform.js +6 -2
- package/lib/mjs/components/_classes/component/Component.d.ts +1 -1
- package/lib/mjs/components/_classes/component/Component.js +4 -3
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +8 -0
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +12 -10
- package/lib/mjs/components/day/Day.d.ts +0 -1
- package/lib/mjs/components/editgrid/fixtures/index.d.ts +7 -7
- package/lib/mjs/components/editgrid/fixtures/index.js +1 -1
- package/lib/mjs/components/select/Select.js +1 -1
- package/lib/mjs/components/select/fixtures/comp25.d.ts +43 -28
- package/lib/mjs/components/select/fixtures/comp25.js +56 -49
- package/lib/mjs/components/select/fixtures/comp26.d.ts +44 -0
- package/lib/mjs/components/select/fixtures/comp26.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/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* dist/inputmask
|
|
3
3
|
* https://github.com/RobinHerbots/Inputmask
|
|
4
|
-
* Copyright (c) 2010 -
|
|
4
|
+
* Copyright (c) 2010 - 2024 Robin Herbots
|
|
5
5
|
* Licensed under the MIT license
|
|
6
|
-
* Version: 5.0.
|
|
6
|
+
* Version: 5.0.9
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/*!
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
* MIT licensed
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
/*! @license DOMPurify 3.1.5 | (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.5/LICENSE */
|
|
22
|
-
|
|
23
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 */
|
|
24
22
|
|
|
25
23
|
/*! formiojs v5.0.0-rc.59 | https://unpkg.com/formiojs@5.0.0-rc.59/LICENSE.txt */
|
|
26
24
|
|
|
25
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
26
|
+
|
|
27
27
|
/**
|
|
28
28
|
* @license
|
|
29
29
|
* Lodash <https://lodash.com/>
|
package/lib/cjs/Webform.js
CHANGED
|
@@ -1245,10 +1245,10 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
this.checkData(value.data, flags);
|
|
1247
1247
|
const shouldValidate = !flags.noValidate ||
|
|
1248
|
-
flags.
|
|
1248
|
+
flags.fromIframe ||
|
|
1249
1249
|
(flags.fromSubmission && this.rootPristine && this.pristine && flags.changed);
|
|
1250
1250
|
const errors = shouldValidate
|
|
1251
|
-
? this.validate(value.data, Object.assign(Object.assign({}, flags), { process:
|
|
1251
|
+
? this.validate(value.data, Object.assign(Object.assign({}, flags), { noValidate: false, process: 'change' }))
|
|
1252
1252
|
: [];
|
|
1253
1253
|
value.isValid = errors.length === 0;
|
|
1254
1254
|
this.loading = false;
|
|
@@ -1076,7 +1076,7 @@ declare class Component extends Element {
|
|
|
1076
1076
|
elementInfo(): any;
|
|
1077
1077
|
autofocus(): void;
|
|
1078
1078
|
scrollIntoView(element?: any): void;
|
|
1079
|
-
focus(index
|
|
1079
|
+
focus(index: any): void;
|
|
1080
1080
|
/**
|
|
1081
1081
|
* Get `Formio` instance for working with files
|
|
1082
1082
|
* @returns {import('@formio/core').Formio} - The Formio instance file service.
|
|
@@ -3024,7 +3024,7 @@ class Component extends Element_1.default {
|
|
|
3024
3024
|
this.parent.childErrors.push(...errors);
|
|
3025
3025
|
}
|
|
3026
3026
|
else {
|
|
3027
|
-
lodash_1.default.remove(this.parent.childErrors, (err) => err.component.key === this.component.key);
|
|
3027
|
+
lodash_1.default.remove(this.parent.childErrors, (err) => { var _a, _b; return (((_a = err === null || err === void 0 ? void 0 : err.component) === null || _a === void 0 ? void 0 : _a.key) || ((_b = err === null || err === void 0 ? void 0 : err.context) === null || _b === void 0 ? void 0 : _b.key)) === this.component.key; });
|
|
3028
3028
|
}
|
|
3029
3029
|
}
|
|
3030
3030
|
this.showValidationErrors(errors, data, row, flags);
|
|
@@ -3040,7 +3040,7 @@ class Component extends Element_1.default {
|
|
|
3040
3040
|
this.parent.childErrors.push(...errors);
|
|
3041
3041
|
}
|
|
3042
3042
|
else {
|
|
3043
|
-
lodash_1.default.remove(this.parent.childErrors, (err) => err.component.key === this.component.key);
|
|
3043
|
+
lodash_1.default.remove(this.parent.childErrors, (err) => { var _a, _b; return (((_a = err === null || err === void 0 ? void 0 : err.component) === null || _a === void 0 ? void 0 : _a.key) || ((_b = err === null || err === void 0 ? void 0 : err.context) === null || _b === void 0 ? void 0 : _b.key)) === this.component.key; });
|
|
3044
3044
|
}
|
|
3045
3045
|
}
|
|
3046
3046
|
return errors.length === 0;
|
|
@@ -3463,14 +3463,15 @@ class Component extends Element_1.default {
|
|
|
3463
3463
|
const { left, top } = element.getBoundingClientRect();
|
|
3464
3464
|
window.scrollTo(left + window.scrollX, top + window.scrollY);
|
|
3465
3465
|
}
|
|
3466
|
-
focus(index
|
|
3467
|
-
var _a, _b;
|
|
3466
|
+
focus(index) {
|
|
3467
|
+
var _a, _b, _c;
|
|
3468
3468
|
if ('beforeFocus' in this.parent) {
|
|
3469
3469
|
this.parent.beforeFocus(this);
|
|
3470
3470
|
}
|
|
3471
|
-
|
|
3471
|
+
index = index || ((_a = this.refs.input) === null || _a === void 0 ? void 0 : _a.length) - 1;
|
|
3472
|
+
if ((_b = this.refs.input) === null || _b === void 0 ? void 0 : _b.length) {
|
|
3472
3473
|
const focusingInput = this.refs.input[index];
|
|
3473
|
-
if (((
|
|
3474
|
+
if (((_c = this.component.widget) === null || _c === void 0 ? void 0 : _c.type) === 'calendar') {
|
|
3474
3475
|
const sibling = focusingInput.nextSibling;
|
|
3475
3476
|
if (sibling) {
|
|
3476
3477
|
sibling.focus();
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export default class Multivalue extends Field {
|
|
2
|
+
/**
|
|
3
|
+
* Normalize values coming into updateValue.
|
|
4
|
+
* @param {*} value - The value to normalize before setting.
|
|
5
|
+
* @param {Object} flags - Flags to use when normalizing the value.
|
|
6
|
+
* @param {*} emptyValue - The empty value for the field.
|
|
7
|
+
* @returns {*} - The normalized value.
|
|
8
|
+
*/
|
|
9
|
+
normalizeValue(value: any, flags?: Object, emptyValue?: any): any;
|
|
2
10
|
get addAnother(): string;
|
|
3
11
|
/**
|
|
4
12
|
* @returns {Field} - The created field.
|
|
@@ -9,37 +9,39 @@ class Multivalue extends Field_1.default {
|
|
|
9
9
|
/**
|
|
10
10
|
* Normalize values coming into updateValue.
|
|
11
11
|
* @param {*} value - The value to normalize before setting.
|
|
12
|
+
* @param {Object} flags - Flags to use when normalizing the value.
|
|
13
|
+
* @param {*} emptyValue - The empty value for the field.
|
|
12
14
|
* @returns {*} - The normalized value.
|
|
13
15
|
*/
|
|
14
|
-
normalizeValue(value) {
|
|
16
|
+
normalizeValue(value, flags = {}, emptyValue = this.emptyValue) {
|
|
15
17
|
if (this.component.multiple) {
|
|
16
18
|
if (Array.isArray(value)) {
|
|
17
19
|
if (value.length === 0) {
|
|
18
|
-
return [
|
|
20
|
+
return [emptyValue];
|
|
19
21
|
}
|
|
20
22
|
if (this.component.storeas === 'array') {
|
|
21
|
-
return super.normalizeValue([value]);
|
|
23
|
+
return super.normalizeValue([value], flags);
|
|
22
24
|
}
|
|
23
|
-
return super.normalizeValue(value);
|
|
25
|
+
return super.normalizeValue(value, flags);
|
|
24
26
|
}
|
|
25
27
|
else {
|
|
26
|
-
return super.normalizeValue(value == null ? [
|
|
28
|
+
return super.normalizeValue(value == null ? [emptyValue] : [value], flags);
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
else {
|
|
30
|
-
if (Array.isArray(value) &&
|
|
32
|
+
if (Array.isArray(value) && !Array.isArray(emptyValue)) {
|
|
31
33
|
if (this.component.storeas === 'string') {
|
|
32
|
-
return super.normalizeValue(value.join(this.delimiter || ''));
|
|
34
|
+
return super.normalizeValue(value.join(this.delimiter || ''), flags);
|
|
33
35
|
}
|
|
34
|
-
return super.normalizeValue(value[0] ||
|
|
36
|
+
return super.normalizeValue(value[0] || emptyValue, flags);
|
|
35
37
|
}
|
|
36
38
|
else {
|
|
37
|
-
return super.normalizeValue(value);
|
|
39
|
+
return super.normalizeValue(value, flags);
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
get dataValue() {
|
|
42
|
-
return super.dataValue;
|
|
44
|
+
return this.normalizeValue(super.dataValue);
|
|
43
45
|
}
|
|
44
46
|
set dataValue(value) {
|
|
45
47
|
super.dataValue = value;
|
|
@@ -130,7 +130,6 @@ export default class DayComponent extends Field {
|
|
|
130
130
|
* @returns {string|null} - The string value of the date.
|
|
131
131
|
*/
|
|
132
132
|
getValueAsString(value: any): string | null;
|
|
133
|
-
focus(field: any): void;
|
|
134
133
|
isPartialDay(value: any): boolean;
|
|
135
134
|
getValidationFormat(): string;
|
|
136
135
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import comp1 from './comp1';
|
|
2
2
|
import comp2 from './comp2';
|
|
3
3
|
import comp3 from './comp3';
|
|
4
|
-
import comp10 from './comp10';
|
|
5
|
-
import comp11 from './comp11';
|
|
6
|
-
import comp12 from './comp12';
|
|
7
|
-
import comp13 from './comp13';
|
|
8
|
-
import comp14 from './comp14';
|
|
9
|
-
import comp15 from './comp15';
|
|
10
4
|
import comp4 from './comp4';
|
|
11
5
|
import comp5 from './comp5';
|
|
12
6
|
import comp6 from './comp6';
|
|
13
7
|
import comp7 from './comp7';
|
|
14
8
|
import comp8 from './comp8';
|
|
15
9
|
import comp9 from './comp9';
|
|
10
|
+
import comp10 from './comp10';
|
|
11
|
+
import comp11 from './comp11';
|
|
12
|
+
import comp12 from './comp12';
|
|
13
|
+
import comp13 from './comp13';
|
|
14
|
+
import comp14 from './comp14';
|
|
15
|
+
import comp15 from './comp15';
|
|
16
16
|
import comp16 from './comp16';
|
|
17
17
|
import comp17 from './comp17';
|
|
18
18
|
import compOpenWhenEmpty from './comp-openWhenEmpty';
|
|
19
19
|
import withOpenWhenEmptyAndConditions from './comp-with-conditions-and-openWhenEmpty';
|
|
20
20
|
import compWithCustomDefaultValue from './comp-with-custom-default-value';
|
|
21
21
|
import compTestEvents from './comp-test-events';
|
|
22
|
-
export { comp1, comp2, comp3,
|
|
22
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
|
|
@@ -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.compTestEvents = exports.compWithCustomDefaultValue = exports.withOpenWhenEmptyAndConditions = exports.compOpenWhenEmpty = exports.comp17 = exports.comp16 = exports.
|
|
6
|
+
exports.compTestEvents = exports.compWithCustomDefaultValue = exports.withOpenWhenEmptyAndConditions = exports.compOpenWhenEmpty = 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.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"));
|
|
@@ -1567,8 +1567,8 @@ class SelectComponent extends ListComponent_1.default {
|
|
|
1567
1567
|
super.detach();
|
|
1568
1568
|
}
|
|
1569
1569
|
focus() {
|
|
1570
|
+
super.focus.call(this);
|
|
1570
1571
|
if (this.focusableElement) {
|
|
1571
|
-
super.focus.call(this);
|
|
1572
1572
|
this.focusableElement.focus();
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
@@ -1,44 +1,59 @@
|
|
|
1
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
2
|
let components: ({
|
|
8
3
|
label: string;
|
|
9
|
-
widget: string;
|
|
10
4
|
tableView: boolean;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
label: string;
|
|
14
|
-
value: string;
|
|
15
|
-
}[];
|
|
16
|
-
};
|
|
17
|
-
dataType: string;
|
|
5
|
+
modal: boolean;
|
|
6
|
+
rowDrafts: boolean;
|
|
18
7
|
key: string;
|
|
19
8
|
type: string;
|
|
9
|
+
displayAsTable: boolean;
|
|
20
10
|
input: boolean;
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
components: ({
|
|
12
|
+
label: string;
|
|
13
|
+
widget: string;
|
|
14
|
+
tableView: boolean;
|
|
15
|
+
data: {
|
|
16
|
+
values: {
|
|
17
|
+
label: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
validate: {
|
|
22
|
+
required: boolean;
|
|
23
|
+
};
|
|
24
|
+
key: string;
|
|
25
|
+
type: string;
|
|
26
|
+
input: boolean;
|
|
27
|
+
applyMaskOn?: undefined;
|
|
28
|
+
validateWhenHidden?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
label: string;
|
|
31
|
+
applyMaskOn: string;
|
|
32
|
+
tableView: boolean;
|
|
33
|
+
validate: {
|
|
34
|
+
required: boolean;
|
|
35
|
+
};
|
|
36
|
+
validateWhenHidden: boolean;
|
|
37
|
+
key: string;
|
|
38
|
+
type: string;
|
|
39
|
+
input: boolean;
|
|
40
|
+
widget?: undefined;
|
|
41
|
+
data?: undefined;
|
|
42
|
+
})[];
|
|
43
|
+
showValidations?: undefined;
|
|
44
|
+
saveOnEnter?: undefined;
|
|
23
45
|
} | {
|
|
24
46
|
label: string;
|
|
25
|
-
|
|
47
|
+
showValidations: boolean;
|
|
26
48
|
tableView: boolean;
|
|
27
49
|
key: string;
|
|
28
50
|
type: string;
|
|
29
51
|
input: boolean;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
operator: string;
|
|
36
|
-
value: number;
|
|
37
|
-
}[];
|
|
38
|
-
};
|
|
39
|
-
widget?: undefined;
|
|
40
|
-
data?: undefined;
|
|
41
|
-
dataType?: undefined;
|
|
52
|
+
saveOnEnter: boolean;
|
|
53
|
+
modal?: undefined;
|
|
54
|
+
rowDrafts?: undefined;
|
|
55
|
+
displayAsTable?: undefined;
|
|
56
|
+
components?: undefined;
|
|
42
57
|
})[];
|
|
43
58
|
}
|
|
44
59
|
export default _default;
|
|
@@ -1,59 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
|
-
|
|
5
|
-
name: 'fio8072',
|
|
6
|
-
path: 'fio8072',
|
|
7
|
-
type: 'form',
|
|
8
|
-
display: 'form',
|
|
9
|
-
components: [
|
|
4
|
+
"components": [
|
|
10
5
|
{
|
|
11
|
-
label:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
"label": "Edit Grid",
|
|
7
|
+
"tableView": false,
|
|
8
|
+
"modal": true,
|
|
9
|
+
"rowDrafts": true,
|
|
10
|
+
"key": "editGrid",
|
|
11
|
+
"type": "editgrid",
|
|
12
|
+
"displayAsTable": false,
|
|
13
|
+
"input": true,
|
|
14
|
+
"components": [
|
|
15
|
+
{
|
|
16
|
+
"label": "Select",
|
|
17
|
+
"widget": "choicesjs",
|
|
18
|
+
"tableView": true,
|
|
19
|
+
"data": {
|
|
20
|
+
"values": [
|
|
21
|
+
{
|
|
22
|
+
"label": "a",
|
|
23
|
+
"value": "a"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"label": "b",
|
|
27
|
+
"value": "b"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"label": "c",
|
|
31
|
+
"value": "c"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
19
34
|
},
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
value: '2',
|
|
35
|
+
"validate": {
|
|
36
|
+
"required": true
|
|
23
37
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
38
|
+
"key": "select",
|
|
39
|
+
"type": "select",
|
|
40
|
+
"input": true
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"label": "Text Field",
|
|
44
|
+
"applyMaskOn": "change",
|
|
45
|
+
"tableView": true,
|
|
46
|
+
"validate": {
|
|
47
|
+
"required": true
|
|
27
48
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
dataType: 'number',
|
|
35
|
-
key: 'select',
|
|
36
|
-
type: 'select',
|
|
37
|
-
input: true,
|
|
49
|
+
"validateWhenHidden": false,
|
|
50
|
+
"key": "textField",
|
|
51
|
+
"type": "textfield",
|
|
52
|
+
"input": true
|
|
53
|
+
}
|
|
54
|
+
]
|
|
38
55
|
},
|
|
39
56
|
{
|
|
40
|
-
label:
|
|
41
|
-
|
|
42
|
-
tableView:
|
|
43
|
-
key:
|
|
44
|
-
type:
|
|
45
|
-
input: true,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
conditions: [
|
|
50
|
-
{
|
|
51
|
-
component: 'select',
|
|
52
|
-
operator: 'lessThan',
|
|
53
|
-
value: 5,
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
],
|
|
57
|
+
"label": "Submit",
|
|
58
|
+
"showValidations": false,
|
|
59
|
+
"tableView": false,
|
|
60
|
+
"key": "submit",
|
|
61
|
+
"type": "button",
|
|
62
|
+
"input": true,
|
|
63
|
+
"saveOnEnter": false
|
|
64
|
+
}
|
|
65
|
+
]
|
|
59
66
|
};
|
|
@@ -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
|
+
};
|
|
@@ -22,5 +22,6 @@ import comp22 from './comp22';
|
|
|
22
22
|
import comp23 from './comp23';
|
|
23
23
|
import comp24 from './comp24';
|
|
24
24
|
import comp25 from './comp25';
|
|
25
|
-
|
|
25
|
+
import comp26 from './comp26';
|
|
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, comp26 };
|
|
26
27
|
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.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.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"));
|
|
@@ -55,3 +55,5 @@ const comp24_1 = __importDefault(require("./comp24"));
|
|
|
55
55
|
exports.comp24 = comp24_1.default;
|
|
56
56
|
const comp25_1 = __importDefault(require("./comp25"));
|
|
57
57
|
exports.comp25 = comp25_1.default;
|
|
58
|
+
const comp26_1 = __importDefault(require("./comp26"));
|
|
59
|
+
exports.comp26 = comp26_1.default;
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -1247,10 +1247,14 @@ export default class Webform extends NestedDataComponent {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
this.checkData(value.data, flags);
|
|
1249
1249
|
const shouldValidate = !flags.noValidate ||
|
|
1250
|
-
flags.
|
|
1250
|
+
flags.fromIframe ||
|
|
1251
1251
|
(flags.fromSubmission && this.rootPristine && this.pristine && flags.changed);
|
|
1252
1252
|
const errors = shouldValidate
|
|
1253
|
-
? this.validate(value.data, {
|
|
1253
|
+
? this.validate(value.data, {
|
|
1254
|
+
...flags,
|
|
1255
|
+
noValidate: false,
|
|
1256
|
+
process: 'change'
|
|
1257
|
+
})
|
|
1254
1258
|
: [];
|
|
1255
1259
|
value.isValid = errors.length === 0;
|
|
1256
1260
|
this.loading = false;
|
|
@@ -1076,7 +1076,7 @@ declare class Component extends Element {
|
|
|
1076
1076
|
elementInfo(): any;
|
|
1077
1077
|
autofocus(): void;
|
|
1078
1078
|
scrollIntoView(element?: any): void;
|
|
1079
|
-
focus(index
|
|
1079
|
+
focus(index: any): void;
|
|
1080
1080
|
/**
|
|
1081
1081
|
* Get `Formio` instance for working with files
|
|
1082
1082
|
* @returns {import('@formio/core').Formio} - The Formio instance file service.
|
|
@@ -2988,7 +2988,7 @@ export default class Component extends Element {
|
|
|
2988
2988
|
this.parent.childErrors.push(...errors);
|
|
2989
2989
|
}
|
|
2990
2990
|
else {
|
|
2991
|
-
_.remove(this.parent.childErrors, (err) => err
|
|
2991
|
+
_.remove(this.parent.childErrors, (err) => (err?.component?.key || err?.context?.key) === this.component.key);
|
|
2992
2992
|
}
|
|
2993
2993
|
}
|
|
2994
2994
|
this.showValidationErrors(errors, data, row, flags);
|
|
@@ -3004,7 +3004,7 @@ export default class Component extends Element {
|
|
|
3004
3004
|
this.parent.childErrors.push(...errors);
|
|
3005
3005
|
}
|
|
3006
3006
|
else {
|
|
3007
|
-
_.remove(this.parent.childErrors, (err) => err
|
|
3007
|
+
_.remove(this.parent.childErrors, (err) => (err?.component?.key || err?.context?.key) === this.component.key);
|
|
3008
3008
|
}
|
|
3009
3009
|
}
|
|
3010
3010
|
return errors.length === 0;
|
|
@@ -3425,10 +3425,11 @@ export default class Component extends Element {
|
|
|
3425
3425
|
const { left, top } = element.getBoundingClientRect();
|
|
3426
3426
|
window.scrollTo(left + window.scrollX, top + window.scrollY);
|
|
3427
3427
|
}
|
|
3428
|
-
focus(index
|
|
3428
|
+
focus(index) {
|
|
3429
3429
|
if ('beforeFocus' in this.parent) {
|
|
3430
3430
|
this.parent.beforeFocus(this);
|
|
3431
3431
|
}
|
|
3432
|
+
index = index || this.refs.input?.length - 1;
|
|
3432
3433
|
if (this.refs.input?.length) {
|
|
3433
3434
|
const focusingInput = this.refs.input[index];
|
|
3434
3435
|
if (this.component.widget?.type === 'calendar') {
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export default class Multivalue extends Field {
|
|
2
|
+
/**
|
|
3
|
+
* Normalize values coming into updateValue.
|
|
4
|
+
* @param {*} value - The value to normalize before setting.
|
|
5
|
+
* @param {Object} flags - Flags to use when normalizing the value.
|
|
6
|
+
* @param {*} emptyValue - The empty value for the field.
|
|
7
|
+
* @returns {*} - The normalized value.
|
|
8
|
+
*/
|
|
9
|
+
normalizeValue(value: any, flags?: Object, emptyValue?: any): any;
|
|
2
10
|
get addAnother(): string;
|
|
3
11
|
/**
|
|
4
12
|
* @returns {Field} - The created field.
|