@formio/js 5.0.0-dev.5780.6637ffb → 5.0.0-dev.5780.ceada4a
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 +7 -7
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +7 -7
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.utils.js +1 -1
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Webform.js +1 -1
- package/lib/cjs/components/_classes/component/Component.d.ts +1 -1
- package/lib/cjs/components/_classes/component/Component.js +5 -4
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +0 -1
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +43 -25
- package/lib/cjs/components/address/Address.d.ts +6 -0
- package/lib/cjs/components/address/Address.js +7 -1
- 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/cjs/components/tags/Tags.js +3 -3
- package/lib/cjs/utils/utils.d.ts +1 -1
- package/lib/cjs/utils/utils.js +1 -13
- package/lib/mjs/Webform.js +1 -1
- package/lib/mjs/components/_classes/component/Component.d.ts +1 -1
- package/lib/mjs/components/_classes/component/Component.js +2 -1
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +0 -1
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +43 -25
- package/lib/mjs/components/address/Address.d.ts +6 -0
- package/lib/mjs/components/address/Address.js +10 -1
- 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/lib/mjs/components/tags/Tags.js +3 -3
- package/lib/mjs/utils/utils.d.ts +1 -1
- package/lib/mjs/utils/utils.js +1 -2
- package/package.json +1 -1
package/lib/cjs/Webform.js
CHANGED
|
@@ -1248,7 +1248,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
1248
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), { noValidate:
|
|
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.
|
|
@@ -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();
|
|
@@ -6,12 +6,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const Field_1 = __importDefault(require("../field/Field"));
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
8
|
class Multivalue extends Field_1.default {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Normalize values coming into updateValue.
|
|
11
|
+
* @param {*} value - The value to normalize before setting.
|
|
12
|
+
* @returns {*} - The normalized value.
|
|
13
|
+
*/
|
|
14
|
+
normalizeValue(value) {
|
|
15
|
+
if (this.component.multiple) {
|
|
16
|
+
if (Array.isArray(value)) {
|
|
17
|
+
if (value.length === 0) {
|
|
18
|
+
return [this.emptyValue];
|
|
19
|
+
}
|
|
20
|
+
if (this.component.storeas === 'array') {
|
|
21
|
+
return super.normalizeValue([value]);
|
|
22
|
+
}
|
|
23
|
+
return super.normalizeValue(value);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return super.normalizeValue(value == null ? [this.emptyValue] : [value]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
if (Array.isArray(value) && this.component.storeas !== 'array') {
|
|
31
|
+
if (this.component.storeas === 'string') {
|
|
32
|
+
return super.normalizeValue(value.join(this.delimiter || ''));
|
|
33
|
+
}
|
|
34
|
+
return super.normalizeValue(value[0] || this.emptyValue);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return super.normalizeValue(value);
|
|
38
|
+
}
|
|
13
39
|
}
|
|
14
|
-
|
|
40
|
+
}
|
|
41
|
+
get dataValue() {
|
|
42
|
+
return super.dataValue;
|
|
15
43
|
}
|
|
16
44
|
set dataValue(value) {
|
|
17
45
|
super.dataValue = value;
|
|
@@ -31,30 +59,20 @@ class Multivalue extends Field_1.default {
|
|
|
31
59
|
get addAnother() {
|
|
32
60
|
return this.t(this.component.addAnother || 'Add Another');
|
|
33
61
|
}
|
|
34
|
-
useWrapper() {
|
|
35
|
-
return this.component.hasOwnProperty('multiple') && this.component.multiple;
|
|
36
|
-
}
|
|
37
62
|
/**
|
|
38
63
|
* @returns {Field} - The created field.
|
|
39
64
|
*/
|
|
40
65
|
render() {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
// If multiple value field.
|
|
53
|
-
return super.render(this.renderTemplate('multiValueTable', {
|
|
54
|
-
rows: dataValue.map(this.renderRow.bind(this)).join(''),
|
|
55
|
-
disabled: this.disabled,
|
|
56
|
-
addAnother: this.addAnother,
|
|
57
|
-
}));
|
|
66
|
+
let dataValue = this.normalizeValue(this.dataValue);
|
|
67
|
+
return this.component.hasOwnProperty('multiple') && this.component.multiple
|
|
68
|
+
? super.render(this.renderTemplate('multiValueTable', {
|
|
69
|
+
rows: dataValue.map(this.renderRow.bind(this)).join(''),
|
|
70
|
+
disabled: this.disabled,
|
|
71
|
+
addAnother: this.addAnother,
|
|
72
|
+
}))
|
|
73
|
+
: super.render(`<div ${this._referenceAttributeName}="element">
|
|
74
|
+
${this.renderElement(this.component.type !== 'hidden' ? dataValue : '')}
|
|
75
|
+
</div>`);
|
|
58
76
|
}
|
|
59
77
|
renderElement() {
|
|
60
78
|
return '';
|
|
@@ -11,6 +11,12 @@ export default class AddressComponent extends ContainerComponent {
|
|
|
11
11
|
weight: number;
|
|
12
12
|
schema: any;
|
|
13
13
|
};
|
|
14
|
+
static get serverConditionSettings(): {
|
|
15
|
+
operators: string[];
|
|
16
|
+
};
|
|
17
|
+
static get conditionOperatorsSettings(): {
|
|
18
|
+
operators: string[];
|
|
19
|
+
};
|
|
14
20
|
static get modeSwitcherRef(): string;
|
|
15
21
|
static get removeValueIconRef(): string;
|
|
16
22
|
static get searchInputRef(): string;
|
|
@@ -97,6 +97,12 @@ class AddressComponent extends Container_1.default {
|
|
|
97
97
|
schema: AddressComponent.schema(),
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
+
static get serverConditionSettings() {
|
|
101
|
+
return AddressComponent.conditionOperatorsSettings;
|
|
102
|
+
}
|
|
103
|
+
static get conditionOperatorsSettings() {
|
|
104
|
+
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: ['isEmpty', 'isNotEmpty'] });
|
|
105
|
+
}
|
|
100
106
|
mergeSchema(component = {}) {
|
|
101
107
|
let { defaultSchema } = this;
|
|
102
108
|
if (component.components) {
|
|
@@ -188,7 +194,7 @@ class AddressComponent extends Container_1.default {
|
|
|
188
194
|
return (this.manualModeEnabled && this.dataValue) ? this.dataValue.address : this.dataValue;
|
|
189
195
|
}
|
|
190
196
|
set address(value) {
|
|
191
|
-
if (this.manualModeEnabled && !this.isMultiple) {
|
|
197
|
+
if (this.manualModeEnabled && !this.isMultiple && !lodash_1.default.isEqual(value, this.emptyValue)) {
|
|
192
198
|
this.dataValue.address = value;
|
|
193
199
|
}
|
|
194
200
|
else {
|
|
@@ -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;
|
|
@@ -118,12 +118,12 @@ class TagsComponent extends Input_1.default {
|
|
|
118
118
|
}
|
|
119
119
|
normalizeValue(value) {
|
|
120
120
|
if (this.component.storeas === 'string' && Array.isArray(value)) {
|
|
121
|
-
return value.join(this.delimiter);
|
|
121
|
+
return super.normalizeValue(value.join(this.delimiter));
|
|
122
122
|
}
|
|
123
123
|
else if (this.component.storeas === 'array' && typeof value === 'string') {
|
|
124
|
-
return value.split(this.delimiter).filter(result => result);
|
|
124
|
+
return super.normalizeValue(value.split(this.delimiter).filter(result => result));
|
|
125
125
|
}
|
|
126
|
-
return value;
|
|
126
|
+
return super.normalizeValue(value);
|
|
127
127
|
}
|
|
128
128
|
setValue(value, flags = {}) {
|
|
129
129
|
const changed = super.setValue(value, flags);
|
package/lib/cjs/utils/utils.d.ts
CHANGED
|
@@ -523,4 +523,4 @@ import jsonLogic from 'json-logic-js';
|
|
|
523
523
|
import ConditionOperators from './conditionOperators';
|
|
524
524
|
import { Evaluator } from './Evaluator';
|
|
525
525
|
export const interpolate: typeof Evaluator.interpolate;
|
|
526
|
-
export { jsonLogic, ConditionOperators, Evaluator, _ };
|
|
526
|
+
export { jsonLogic, ConditionOperators, moment, Evaluator, _ };
|
package/lib/cjs/utils/utils.js
CHANGED
|
@@ -11,21 +11,9 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
11
11
|
if (k2 === undefined) k2 = k;
|
|
12
12
|
o[k2] = m[k];
|
|
13
13
|
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
14
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
15
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
16
|
};
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
17
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
31
19
|
};
|
|
@@ -37,6 +25,7 @@ exports._ = lodash_1.default;
|
|
|
37
25
|
const json_logic_js_1 = __importDefault(require("json-logic-js"));
|
|
38
26
|
exports.jsonLogic = json_logic_js_1.default;
|
|
39
27
|
const moment_timezone_1 = __importDefault(require("moment-timezone/moment-timezone"));
|
|
28
|
+
exports.moment = moment_timezone_1.default;
|
|
40
29
|
const jstimezonedetect_1 = __importDefault(require("jstimezonedetect"));
|
|
41
30
|
const operators_1 = require("./jsonlogic/operators");
|
|
42
31
|
const dompurify_1 = __importDefault(require("dompurify"));
|
|
@@ -62,7 +51,6 @@ json_logic_js_1.default.add_operation('relativeMinDate', (relativeMinDate) => {
|
|
|
62
51
|
json_logic_js_1.default.add_operation('relativeMaxDate', (relativeMaxDate) => {
|
|
63
52
|
return (0, moment_timezone_1.default)().add(relativeMaxDate, 'days').toISOString();
|
|
64
53
|
});
|
|
65
|
-
exports.moment = __importStar(require("moment-timezone/moment-timezone"));
|
|
66
54
|
/**
|
|
67
55
|
* Sets the path to the component and parent schema.
|
|
68
56
|
* @param {import('@formio/core').Component} component - The component to set the path for.
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -1252,7 +1252,7 @@ export default class Webform extends NestedDataComponent {
|
|
|
1252
1252
|
const errors = shouldValidate
|
|
1253
1253
|
? this.validate(value.data, {
|
|
1254
1254
|
...flags,
|
|
1255
|
-
noValidate:
|
|
1255
|
+
noValidate: false,
|
|
1256
1256
|
process: 'change'
|
|
1257
1257
|
})
|
|
1258
1258
|
: [];
|
|
@@ -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.
|