@formio/js 5.0.0-dev.5720.e861c22 → 5.0.0-dev.5721.5aa8849
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 +12 -0
- package/dist/formio.form.js +30 -20
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +33 -23
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.utils.js +12 -2
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Form.d.ts +2 -2
- package/lib/cjs/Form.js +9 -3
- package/lib/cjs/PDF.js +1 -1
- package/lib/cjs/Webform.js +0 -1
- package/lib/cjs/WebformBuilder.js +2 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.js +2 -1
- package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -1
- package/lib/cjs/components/datagrid/DataGrid.js +0 -8
- package/lib/cjs/components/datamap/DataMap.js +1 -1
- package/lib/cjs/components/day/Day.d.ts +2 -2
- package/lib/cjs/components/day/Day.js +3 -3
- package/lib/cjs/components/editgrid/EditGrid.js +1 -5
- package/lib/cjs/components/file/File.js +4 -0
- package/lib/cjs/components/form/editForm/Form.edit.form.js +1 -1
- package/lib/cjs/components/radio/Radio.js +0 -10
- package/lib/cjs/components/select/Select.d.ts +38 -0
- package/lib/cjs/components/select/Select.js +11 -1
- package/lib/cjs/components/select/fixtures/comp25.d.ts +44 -0
- package/lib/cjs/components/select/fixtures/comp25.js +59 -0
- package/lib/cjs/components/select/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/select/fixtures/index.js +3 -1
- package/lib/cjs/components/time/Time.form.js +2 -2
- package/lib/cjs/templates/Templates.js +1 -1
- package/lib/cjs/translations/en.d.ts +1 -0
- package/lib/cjs/translations/en.js +1 -0
- package/lib/mjs/Form.d.ts +2 -2
- package/lib/mjs/Form.js +9 -3
- package/lib/mjs/PDF.js +1 -1
- package/lib/mjs/Webform.js +0 -1
- package/lib/mjs/WebformBuilder.js +2 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.js +2 -1
- package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -1
- package/lib/mjs/components/datagrid/DataGrid.js +0 -8
- package/lib/mjs/components/datamap/DataMap.js +1 -1
- package/lib/mjs/components/day/Day.d.ts +2 -2
- package/lib/mjs/components/day/Day.js +3 -3
- package/lib/mjs/components/editgrid/EditGrid.js +1 -5
- package/lib/mjs/components/file/File.js +4 -0
- package/lib/mjs/components/form/editForm/Form.edit.form.js +1 -1
- package/lib/mjs/components/radio/Radio.js +0 -10
- package/lib/mjs/components/select/Select.d.ts +38 -0
- package/lib/mjs/components/select/Select.js +14 -2
- package/lib/mjs/components/select/fixtures/comp25.d.ts +44 -0
- package/lib/mjs/components/select/fixtures/comp25.js +57 -0
- package/lib/mjs/components/select/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/select/fixtures/index.js +2 -1
- package/lib/mjs/components/time/Time.form.js +2 -2
- package/lib/mjs/templates/Templates.js +1 -1
- package/lib/mjs/translations/en.d.ts +1 -0
- package/lib/mjs/translations/en.js +1 -0
- package/package.json +3 -3
|
@@ -484,11 +484,7 @@ export default class EditGridComponent extends NestedArrayComponent {
|
|
|
484
484
|
else {
|
|
485
485
|
this.removeClass(this.refs.component, `formio-component-${this.component.type}-row-open`);
|
|
486
486
|
}
|
|
487
|
-
|
|
488
|
-
this.loadRefs(element, {
|
|
489
|
-
messageContainer: 'single-scope',
|
|
490
|
-
});
|
|
491
|
-
return superAttach;
|
|
487
|
+
return super.attach(element);
|
|
492
488
|
}
|
|
493
489
|
flattenRowDataValue(dataValue) {
|
|
494
490
|
const flattened = {};
|
|
@@ -931,6 +931,10 @@ export default class FileComponent extends Field {
|
|
|
931
931
|
: response.type === 'abort'
|
|
932
932
|
? this.t('Request was aborted')
|
|
933
933
|
: response.toString();
|
|
934
|
+
this.emit('fileUploadError', {
|
|
935
|
+
fileToSync,
|
|
936
|
+
response,
|
|
937
|
+
});
|
|
934
938
|
}
|
|
935
939
|
finally {
|
|
936
940
|
delete fileToSync.progress;
|
|
@@ -264,16 +264,6 @@ export default class RadioComponent extends ListComponent {
|
|
|
264
264
|
if (method.toUpperCase() === 'GET') {
|
|
265
265
|
body = null;
|
|
266
266
|
}
|
|
267
|
-
const limit = this.component.limit || 100;
|
|
268
|
-
const skip = this.isScrollLoading ? this.selectOptions.length : 0;
|
|
269
|
-
// Allow for url interpolation.
|
|
270
|
-
url = this.interpolate(this.sanitize(url, this.shouldSanitizeValue), {
|
|
271
|
-
formioBase: Formio.getBaseUrl(),
|
|
272
|
-
search,
|
|
273
|
-
limit,
|
|
274
|
-
skip,
|
|
275
|
-
page: Math.abs(Math.floor(skip / limit))
|
|
276
|
-
});
|
|
277
267
|
// Set ignoreCache if it is
|
|
278
268
|
options.ignoreCache = this.component.ignoreCache;
|
|
279
269
|
// Make the request.
|
|
@@ -9,9 +9,47 @@ export default class SelectComponent extends ListComponent {
|
|
|
9
9
|
};
|
|
10
10
|
static get serverConditionSettings(): {
|
|
11
11
|
valueComponent(classComp: any): any;
|
|
12
|
+
dataTypeOperators: {
|
|
13
|
+
number: string[];
|
|
14
|
+
};
|
|
15
|
+
dataTypeValueComponents: {
|
|
16
|
+
number: {
|
|
17
|
+
lessThan: () => {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
greaterThan: () => {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
lessThanOrEqual: () => {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
greaterThanOrEqual: () => {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
12
31
|
};
|
|
13
32
|
static get conditionOperatorsSettings(): {
|
|
14
33
|
valueComponent(classComp: any): any;
|
|
34
|
+
dataTypeOperators: {
|
|
35
|
+
number: string[];
|
|
36
|
+
};
|
|
37
|
+
dataTypeValueComponents: {
|
|
38
|
+
number: {
|
|
39
|
+
lessThan: () => {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
greaterThan: () => {
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
lessThanOrEqual: () => {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
greaterThanOrEqual: () => {
|
|
49
|
+
type: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
15
53
|
};
|
|
16
54
|
static savedValueTypes(schema: any): any[];
|
|
17
55
|
templateData: {} | undefined;
|
|
@@ -57,6 +57,7 @@ export default class SelectComponent extends ListComponent {
|
|
|
57
57
|
return SelectComponent.conditionOperatorsSettings;
|
|
58
58
|
}
|
|
59
59
|
static get conditionOperatorsSettings() {
|
|
60
|
+
const numberType = () => ({ type: 'number' });
|
|
60
61
|
return {
|
|
61
62
|
...super.conditionOperatorsSettings,
|
|
62
63
|
valueComponent(classComp) {
|
|
@@ -73,7 +74,18 @@ export default class SelectComponent extends ListComponent {
|
|
|
73
74
|
`;
|
|
74
75
|
}
|
|
75
76
|
return valueComp;
|
|
76
|
-
}
|
|
77
|
+
},
|
|
78
|
+
dataTypeOperators: {
|
|
79
|
+
number: ['lessThan', 'greaterThan', 'lessThanOrEqual', 'greaterThanOrEqual'],
|
|
80
|
+
},
|
|
81
|
+
dataTypeValueComponents: {
|
|
82
|
+
number: {
|
|
83
|
+
lessThan: numberType,
|
|
84
|
+
greaterThan: numberType,
|
|
85
|
+
lessThanOrEqual: numberType,
|
|
86
|
+
greaterThanOrEqual: numberType,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
77
89
|
};
|
|
78
90
|
}
|
|
79
91
|
static savedValueTypes(schema) {
|
|
@@ -526,7 +538,7 @@ export default class SelectComponent extends ListComponent {
|
|
|
526
538
|
skip,
|
|
527
539
|
};
|
|
528
540
|
// Allow for url interpolation.
|
|
529
|
-
url = this.interpolate(
|
|
541
|
+
url = this.interpolate(url, {
|
|
530
542
|
formioBase: Formio.getBaseUrl(),
|
|
531
543
|
search,
|
|
532
544
|
limit,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let title: string;
|
|
3
|
+
let name: string;
|
|
4
|
+
let path: string;
|
|
5
|
+
let type: string;
|
|
6
|
+
let display: string;
|
|
7
|
+
let components: ({
|
|
8
|
+
label: string;
|
|
9
|
+
widget: string;
|
|
10
|
+
tableView: boolean;
|
|
11
|
+
data: {
|
|
12
|
+
values: {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
dataType: string;
|
|
18
|
+
key: string;
|
|
19
|
+
type: string;
|
|
20
|
+
input: boolean;
|
|
21
|
+
applyMaskOn?: undefined;
|
|
22
|
+
conditional?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
label: string;
|
|
25
|
+
applyMaskOn: string;
|
|
26
|
+
tableView: boolean;
|
|
27
|
+
key: string;
|
|
28
|
+
type: string;
|
|
29
|
+
input: boolean;
|
|
30
|
+
conditional: {
|
|
31
|
+
show: boolean;
|
|
32
|
+
conjunction: string;
|
|
33
|
+
conditions: {
|
|
34
|
+
component: string;
|
|
35
|
+
operator: string;
|
|
36
|
+
value: number;
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
widget?: undefined;
|
|
40
|
+
data?: undefined;
|
|
41
|
+
dataType?: undefined;
|
|
42
|
+
})[];
|
|
43
|
+
}
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'FIO-8072',
|
|
3
|
+
name: 'fio8072',
|
|
4
|
+
path: 'fio8072',
|
|
5
|
+
type: 'form',
|
|
6
|
+
display: 'form',
|
|
7
|
+
components: [
|
|
8
|
+
{
|
|
9
|
+
label: 'Select',
|
|
10
|
+
widget: 'choicesjs',
|
|
11
|
+
tableView: true,
|
|
12
|
+
data: {
|
|
13
|
+
values: [
|
|
14
|
+
{
|
|
15
|
+
label: 'A',
|
|
16
|
+
value: '1',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: 'B',
|
|
20
|
+
value: '2',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'C',
|
|
24
|
+
value: '10',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: 'D',
|
|
28
|
+
value: '1d',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
dataType: 'number',
|
|
33
|
+
key: 'select',
|
|
34
|
+
type: 'select',
|
|
35
|
+
input: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: 'Text Field',
|
|
39
|
+
applyMaskOn: 'change',
|
|
40
|
+
tableView: true,
|
|
41
|
+
key: 'textField',
|
|
42
|
+
type: 'textfield',
|
|
43
|
+
input: true,
|
|
44
|
+
conditional: {
|
|
45
|
+
show: true,
|
|
46
|
+
conjunction: 'all',
|
|
47
|
+
conditions: [
|
|
48
|
+
{
|
|
49
|
+
component: 'select',
|
|
50
|
+
operator: 'lessThan',
|
|
51
|
+
value: 5,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
};
|
|
@@ -21,5 +21,6 @@ import comp21 from './comp21';
|
|
|
21
21
|
import comp22 from './comp22';
|
|
22
22
|
import comp23 from './comp23';
|
|
23
23
|
import comp24 from './comp24';
|
|
24
|
-
|
|
24
|
+
import comp25 from './comp25';
|
|
25
|
+
export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22, comp23, comp24, comp25 };
|
|
25
26
|
export { multiSelect, multiSelectOptions } from "./comp3";
|
|
@@ -22,4 +22,5 @@ import comp21 from './comp21';
|
|
|
22
22
|
import comp22 from './comp22';
|
|
23
23
|
import comp23 from './comp23';
|
|
24
24
|
import comp24 from './comp24';
|
|
25
|
-
|
|
25
|
+
import comp25 from './comp25';
|
|
26
|
+
export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22, comp23, comp24, comp25 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Components from '../Components';
|
|
2
2
|
import TimeEditData from './editForm/Time.edit.data';
|
|
3
3
|
import TimeEditDisplay from './editForm/Time.edit.display';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import TimeEditDisplay from './editForm/Time.edit.display';
|
|
|
7
7
|
* @returns {import('@formio/core').Component[]} - The edit form components.
|
|
8
8
|
*/
|
|
9
9
|
export default function (...extend) {
|
|
10
|
-
return baseEditForm([
|
|
10
|
+
return Components.baseEditForm([
|
|
11
11
|
{
|
|
12
12
|
key: 'data',
|
|
13
13
|
components: TimeEditData,
|
|
@@ -75,6 +75,7 @@ export default {
|
|
|
75
75
|
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
|
76
76
|
typeCount: '{{ count }} {{ type }}',
|
|
77
77
|
requiredDayField: '{{ field }} is required',
|
|
78
|
+
requiredDayEmpty: '{{ field }} is required',
|
|
78
79
|
requiredMonthField: '{{ field }} is required',
|
|
79
80
|
requiredYearField: '{{ field }} is required'
|
|
80
81
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/js",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.5721.5aa8849",
|
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"bootstrap": "^5.3.3",
|
|
90
90
|
"browser-cookies": "^1.2.0",
|
|
91
91
|
"browser-md5-file": "^1.1.1",
|
|
92
|
-
"compare-versions": "^6.
|
|
92
|
+
"compare-versions": "^6.1.1",
|
|
93
93
|
"core-js": "^3.37.1",
|
|
94
94
|
"dialog-polyfill": "^0.5.6",
|
|
95
95
|
"dom-autoscroller": "^2.3.4",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"idb": "^7.1.1",
|
|
103
103
|
"inputmask": "^5.0.8",
|
|
104
104
|
"ismobilejs": "^1.1.1",
|
|
105
|
-
"json-logic-js": "^2.0.
|
|
105
|
+
"json-logic-js": "^2.0.5",
|
|
106
106
|
"jstimezonedetect": "^1.0.7",
|
|
107
107
|
"jwt-decode": "^3.1.2",
|
|
108
108
|
"lodash": "^4.17.21",
|