@formio/js 5.0.0-dev.5704.492ccdf → 5.0.0-dev.5704.50db01f
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 +47 -0
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.form.js +55 -131
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +2 -0
- package/dist/formio.full.js +61 -41
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +2 -0
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +25 -5
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +2 -0
- package/lib/cjs/CDN.d.ts +1 -0
- package/lib/cjs/CDN.js +2 -2
- package/lib/cjs/Form.d.ts +2 -2
- package/lib/cjs/Form.js +11 -5
- package/lib/cjs/PDF.js +1 -1
- package/lib/cjs/PDFBuilder.js +2 -1
- package/lib/cjs/Webform.js +3 -6
- package/lib/cjs/WebformBuilder.js +13 -3
- package/lib/cjs/Wizard.js +1 -1
- package/lib/cjs/components/_classes/component/Component.d.ts +2 -1
- package/lib/cjs/components/_classes/component/Component.js +25 -6
- 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/_classes/nested/NestedComponent.d.ts +2 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.js +5 -1
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +3 -0
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +56 -29
- package/lib/cjs/components/address/Address.d.ts +6 -0
- package/lib/cjs/components/address/Address.js +7 -1
- package/lib/cjs/components/currency/Currency.d.ts +2 -0
- package/lib/cjs/components/datagrid/DataGrid.d.ts +2 -1
- package/lib/cjs/components/datagrid/DataGrid.js +40 -35
- package/lib/cjs/components/datagrid/fixtures/comp11.d.ts +50 -0
- package/lib/cjs/components/datagrid/fixtures/comp11.js +55 -0
- package/lib/cjs/components/datagrid/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/datagrid/fixtures/index.js +3 -1
- package/lib/cjs/components/datamap/DataMap.js +2 -2
- package/lib/cjs/components/day/Day.d.ts +3 -4
- package/lib/cjs/components/day/Day.js +31 -10
- package/lib/cjs/components/editgrid/EditGrid.js +14 -6
- package/lib/cjs/components/editgrid/fixtures/comp-test-events.d.ts +54 -0
- package/lib/cjs/components/editgrid/fixtures/comp-test-events.js +54 -0
- package/lib/cjs/components/editgrid/fixtures/comp16.d.ts +52 -0
- package/lib/cjs/components/editgrid/fixtures/comp16.js +71 -0
- package/lib/cjs/components/editgrid/fixtures/comp17.d.ts +80 -0
- package/lib/cjs/components/editgrid/fixtures/comp17.js +99 -0
- package/lib/cjs/components/editgrid/fixtures/index.d.ts +10 -7
- package/lib/cjs/components/editgrid/fixtures/index.js +7 -1
- package/lib/cjs/components/file/File.d.ts +2 -2
- package/lib/cjs/components/file/File.js +13 -2
- package/lib/cjs/components/file/editForm/File.edit.display.js +1 -1
- package/lib/cjs/components/form/editForm/Form.edit.form.js +1 -1
- package/lib/cjs/components/form/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/form/fixtures/index.js +3 -1
- package/lib/cjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
- package/lib/cjs/components/form/fixtures/nestedWizardForm.js +765 -0
- package/lib/cjs/components/number/Number.d.ts +17 -2
- package/lib/cjs/components/number/Number.js +26 -6
- package/lib/cjs/components/number/fixtures/comp10.d.ts +18 -0
- package/lib/cjs/components/number/fixtures/comp10.js +21 -0
- package/lib/cjs/components/number/fixtures/comp9.d.ts +18 -0
- package/lib/cjs/components/number/fixtures/comp9.js +21 -0
- package/lib/cjs/components/number/fixtures/index.d.ts +3 -1
- package/lib/cjs/components/number/fixtures/index.js +5 -1
- package/lib/cjs/components/panel/Panel.d.ts +1 -0
- package/lib/cjs/components/panel/Panel.js +1 -0
- package/lib/cjs/components/radio/Radio.d.ts +2 -18
- package/lib/cjs/components/radio/Radio.js +29 -27
- package/lib/cjs/components/radio/fixtures/comp12.d.ts +29 -0
- package/lib/cjs/components/radio/fixtures/comp12.js +36 -0
- package/lib/cjs/components/radio/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/radio/fixtures/index.js +3 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +6 -0
- package/lib/cjs/components/recaptcha/ReCaptcha.js +6 -0
- package/lib/cjs/components/select/Select.d.ts +38 -0
- package/lib/cjs/components/select/Select.js +13 -3
- package/lib/cjs/components/select/fixtures/comp25.d.ts +59 -0
- package/lib/cjs/components/select/fixtures/comp25.js +66 -0
- 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 +3 -1
- package/lib/cjs/components/select/fixtures/index.js +5 -1
- 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/tags/Tags.js +3 -3
- package/lib/cjs/components/time/Time.d.ts +2 -2
- package/lib/cjs/components/time/Time.form.js +2 -2
- package/lib/cjs/components/time/Time.js +3 -7
- package/lib/cjs/components/time/fixtures/comp4.d.ts +166 -0
- package/lib/cjs/components/time/fixtures/comp4.js +171 -0
- package/lib/cjs/components/time/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/time/fixtures/index.js +3 -1
- 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/cjs/utils/utils.d.ts +9 -1
- package/lib/cjs/utils/utils.js +14 -13
- package/lib/mjs/CDN.d.ts +1 -0
- package/lib/mjs/CDN.js +2 -2
- package/lib/mjs/Form.d.ts +2 -2
- package/lib/mjs/Form.js +11 -5
- package/lib/mjs/PDF.js +1 -1
- package/lib/mjs/PDFBuilder.js +1 -1
- package/lib/mjs/Webform.js +7 -6
- package/lib/mjs/WebformBuilder.js +12 -3
- package/lib/mjs/Wizard.js +1 -1
- package/lib/mjs/components/_classes/component/Component.d.ts +2 -1
- package/lib/mjs/components/_classes/component/Component.js +11 -3
- 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/_classes/nested/NestedComponent.d.ts +2 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.js +5 -1
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +3 -0
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +57 -29
- package/lib/mjs/components/address/Address.d.ts +6 -0
- package/lib/mjs/components/address/Address.js +10 -1
- package/lib/mjs/components/currency/Currency.d.ts +2 -0
- package/lib/mjs/components/datagrid/DataGrid.d.ts +2 -1
- package/lib/mjs/components/datagrid/DataGrid.js +39 -34
- package/lib/mjs/components/datagrid/fixtures/comp11.d.ts +50 -0
- package/lib/mjs/components/datagrid/fixtures/comp11.js +53 -0
- package/lib/mjs/components/datagrid/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/datagrid/fixtures/index.js +2 -1
- package/lib/mjs/components/datamap/DataMap.js +2 -2
- package/lib/mjs/components/day/Day.d.ts +3 -4
- package/lib/mjs/components/day/Day.js +30 -10
- package/lib/mjs/components/editgrid/EditGrid.js +14 -6
- package/lib/mjs/components/editgrid/fixtures/comp-test-events.d.ts +54 -0
- package/lib/mjs/components/editgrid/fixtures/comp-test-events.js +52 -0
- package/lib/mjs/components/editgrid/fixtures/comp16.d.ts +52 -0
- package/lib/mjs/components/editgrid/fixtures/comp16.js +69 -0
- package/lib/mjs/components/editgrid/fixtures/comp17.d.ts +80 -0
- package/lib/mjs/components/editgrid/fixtures/comp17.js +97 -0
- package/lib/mjs/components/editgrid/fixtures/index.d.ts +10 -7
- package/lib/mjs/components/editgrid/fixtures/index.js +4 -1
- package/lib/mjs/components/file/File.d.ts +2 -2
- package/lib/mjs/components/file/File.js +13 -2
- package/lib/mjs/components/file/editForm/File.edit.display.js +1 -1
- package/lib/mjs/components/form/editForm/Form.edit.form.js +1 -1
- package/lib/mjs/components/form/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/form/fixtures/index.js +2 -1
- package/lib/mjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
- package/lib/mjs/components/form/fixtures/nestedWizardForm.js +763 -0
- package/lib/mjs/components/number/Number.d.ts +17 -2
- package/lib/mjs/components/number/Number.js +25 -5
- package/lib/mjs/components/number/fixtures/comp10.d.ts +18 -0
- package/lib/mjs/components/number/fixtures/comp10.js +19 -0
- package/lib/mjs/components/number/fixtures/comp9.d.ts +18 -0
- package/lib/mjs/components/number/fixtures/comp9.js +19 -0
- package/lib/mjs/components/number/fixtures/index.d.ts +3 -1
- package/lib/mjs/components/number/fixtures/index.js +3 -1
- package/lib/mjs/components/panel/Panel.d.ts +1 -0
- package/lib/mjs/components/panel/Panel.js +1 -0
- package/lib/mjs/components/radio/Radio.d.ts +2 -18
- package/lib/mjs/components/radio/Radio.js +32 -30
- package/lib/mjs/components/radio/fixtures/comp12.d.ts +29 -0
- package/lib/mjs/components/radio/fixtures/comp12.js +34 -0
- package/lib/mjs/components/radio/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/radio/fixtures/index.js +2 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +6 -0
- package/lib/mjs/components/recaptcha/ReCaptcha.js +9 -0
- package/lib/mjs/components/select/Select.d.ts +38 -0
- package/lib/mjs/components/select/Select.js +16 -4
- package/lib/mjs/components/select/fixtures/comp25.d.ts +59 -0
- package/lib/mjs/components/select/fixtures/comp25.js +64 -0
- 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 +3 -1
- package/lib/mjs/components/select/fixtures/index.js +3 -1
- 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/tags/Tags.js +3 -3
- package/lib/mjs/components/time/Time.d.ts +2 -2
- package/lib/mjs/components/time/Time.form.js +2 -2
- package/lib/mjs/components/time/Time.js +3 -13
- package/lib/mjs/components/time/fixtures/comp4.d.ts +166 -0
- package/lib/mjs/components/time/fixtures/comp4.js +169 -0
- package/lib/mjs/components/time/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/time/fixtures/index.js +2 -1
- 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/lib/mjs/utils/utils.d.ts +9 -1
- package/lib/mjs/utils/utils.js +14 -2
- package/package.json +4 -4
|
@@ -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,7 @@ 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
|
+
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 };
|
|
25
27
|
export { multiSelect, multiSelectOptions } from "./comp3";
|
|
@@ -22,4 +22,6 @@ 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
|
+
import comp26 from './comp26';
|
|
27
|
+
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 };
|
|
@@ -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
|
{
|
|
@@ -116,12 +116,12 @@ export default class TagsComponent extends Input {
|
|
|
116
116
|
}
|
|
117
117
|
normalizeValue(value) {
|
|
118
118
|
if (this.component.storeas === 'string' && Array.isArray(value)) {
|
|
119
|
-
return value.join(this.delimiter);
|
|
119
|
+
return super.normalizeValue(value.join(this.delimiter));
|
|
120
120
|
}
|
|
121
121
|
else if (this.component.storeas === 'array' && typeof value === 'string') {
|
|
122
|
-
return value.split(this.delimiter).filter(result => result);
|
|
122
|
+
return super.normalizeValue(value.split(this.delimiter).filter(result => result));
|
|
123
123
|
}
|
|
124
|
-
return value;
|
|
124
|
+
return super.normalizeValue(value);
|
|
125
125
|
}
|
|
126
126
|
setValue(value, flags = {}) {
|
|
127
127
|
const changed = super.setValue(value, flags);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export default class TimeComponent extends TextFieldComponent {
|
|
2
|
-
rawData:
|
|
2
|
+
rawData: any;
|
|
3
3
|
get dataFormat(): any;
|
|
4
4
|
get skipMaskValidation(): boolean;
|
|
5
5
|
isNotCompleteInput(value: any): any;
|
|
6
6
|
removeValue(index: any): void;
|
|
7
7
|
resetRawData(index: any): void;
|
|
8
8
|
setRawValue(value: any, index: any): void;
|
|
9
|
-
getRawValue(index: any):
|
|
9
|
+
getRawValue(index: any): any;
|
|
10
10
|
getValueAt(index: any): any;
|
|
11
11
|
setValueAt(index: any, value: any): void;
|
|
12
12
|
getStringAsValue(view: any): any;
|
|
@@ -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,
|
|
@@ -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();
|
|
@@ -31,7 +20,8 @@ export default class TimeComponent extends TextFieldComponent {
|
|
|
31
20
|
this.component.inputType = isEdgeBrowser && edgeVersion <= 18
|
|
32
21
|
? 'text'
|
|
33
22
|
: (this.component.inputType || 'time');
|
|
34
|
-
|
|
23
|
+
// If default value is given then the raw data needs to be set
|
|
24
|
+
this.rawData = this.component.multiple ? [] : this.getValueAsString(this.defaultValue) || this.emptyValue;
|
|
35
25
|
}
|
|
36
26
|
static get builderInfo() {
|
|
37
27
|
return {
|
|
@@ -62,7 +52,7 @@ export default class TimeComponent extends TextFieldComponent {
|
|
|
62
52
|
return value;
|
|
63
53
|
}
|
|
64
54
|
get validationValue() {
|
|
65
|
-
if (Array.isArray(this.rawData) && !this.rawData.length || !this.rawData) {
|
|
55
|
+
if ((Array.isArray(this.rawData) && !this.rawData.length) || !this.rawData) {
|
|
66
56
|
return this.dataValue;
|
|
67
57
|
}
|
|
68
58
|
return this.rawData;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let type: string;
|
|
3
|
+
let display: string;
|
|
4
|
+
let components: {
|
|
5
|
+
title: string;
|
|
6
|
+
breadcrumbClickable: boolean;
|
|
7
|
+
buttonSettings: {
|
|
8
|
+
previous: boolean;
|
|
9
|
+
cancel: boolean;
|
|
10
|
+
next: boolean;
|
|
11
|
+
};
|
|
12
|
+
navigateOnEnter: boolean;
|
|
13
|
+
saveOnEnter: boolean;
|
|
14
|
+
scrollToTop: boolean;
|
|
15
|
+
collapsible: boolean;
|
|
16
|
+
key: string;
|
|
17
|
+
type: string;
|
|
18
|
+
label: string;
|
|
19
|
+
components: {
|
|
20
|
+
label: string;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
alwaysEnabled: boolean;
|
|
23
|
+
tableView: boolean;
|
|
24
|
+
defaultValue: string;
|
|
25
|
+
key: string;
|
|
26
|
+
type: string;
|
|
27
|
+
input: boolean;
|
|
28
|
+
inputMask: string;
|
|
29
|
+
hideOnChildrenHidden: boolean;
|
|
30
|
+
id: string;
|
|
31
|
+
placeholder: string;
|
|
32
|
+
prefix: string;
|
|
33
|
+
customClass: string;
|
|
34
|
+
suffix: string;
|
|
35
|
+
multiple: boolean;
|
|
36
|
+
protected: boolean;
|
|
37
|
+
unique: boolean;
|
|
38
|
+
persistent: boolean;
|
|
39
|
+
hidden: boolean;
|
|
40
|
+
clearOnHide: boolean;
|
|
41
|
+
refreshOn: string;
|
|
42
|
+
redrawOn: string;
|
|
43
|
+
modalEdit: boolean;
|
|
44
|
+
dataGridLabel: boolean;
|
|
45
|
+
labelPosition: string;
|
|
46
|
+
description: string;
|
|
47
|
+
errorLabel: string;
|
|
48
|
+
tooltip: string;
|
|
49
|
+
hideLabel: boolean;
|
|
50
|
+
tabindex: string;
|
|
51
|
+
autofocus: boolean;
|
|
52
|
+
dbIndex: boolean;
|
|
53
|
+
customDefaultValue: string;
|
|
54
|
+
calculateValue: string;
|
|
55
|
+
calculateServer: boolean;
|
|
56
|
+
widget: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
attributes: {};
|
|
60
|
+
validateOn: string;
|
|
61
|
+
validate: {
|
|
62
|
+
required: boolean;
|
|
63
|
+
custom: string;
|
|
64
|
+
customPrivate: boolean;
|
|
65
|
+
strictDateValidation: boolean;
|
|
66
|
+
multiple: boolean;
|
|
67
|
+
unique: boolean;
|
|
68
|
+
minLength: string;
|
|
69
|
+
maxLength: string;
|
|
70
|
+
pattern: string;
|
|
71
|
+
};
|
|
72
|
+
conditional: {
|
|
73
|
+
show: null;
|
|
74
|
+
when: null;
|
|
75
|
+
eq: string;
|
|
76
|
+
};
|
|
77
|
+
overlay: {
|
|
78
|
+
style: string;
|
|
79
|
+
left: string;
|
|
80
|
+
top: string;
|
|
81
|
+
width: string;
|
|
82
|
+
height: string;
|
|
83
|
+
};
|
|
84
|
+
allowCalculateOverride: boolean;
|
|
85
|
+
encrypted: boolean;
|
|
86
|
+
showCharCount: boolean;
|
|
87
|
+
showWordCount: boolean;
|
|
88
|
+
properties: {};
|
|
89
|
+
allowMultipleMasks: boolean;
|
|
90
|
+
addons: never[];
|
|
91
|
+
mask: boolean;
|
|
92
|
+
inputType: string;
|
|
93
|
+
inputFormat: string;
|
|
94
|
+
displayMask: string;
|
|
95
|
+
spellcheck: boolean;
|
|
96
|
+
truncateMultipleSpaces: boolean;
|
|
97
|
+
format: string;
|
|
98
|
+
dataFormat: string;
|
|
99
|
+
}[];
|
|
100
|
+
input: boolean;
|
|
101
|
+
tableView: boolean;
|
|
102
|
+
id: string;
|
|
103
|
+
placeholder: string;
|
|
104
|
+
prefix: string;
|
|
105
|
+
customClass: string;
|
|
106
|
+
suffix: string;
|
|
107
|
+
multiple: boolean;
|
|
108
|
+
defaultValue: null;
|
|
109
|
+
protected: boolean;
|
|
110
|
+
unique: boolean;
|
|
111
|
+
persistent: boolean;
|
|
112
|
+
hidden: boolean;
|
|
113
|
+
clearOnHide: boolean;
|
|
114
|
+
refreshOn: string;
|
|
115
|
+
redrawOn: string;
|
|
116
|
+
modalEdit: boolean;
|
|
117
|
+
dataGridLabel: boolean;
|
|
118
|
+
labelPosition: string;
|
|
119
|
+
description: string;
|
|
120
|
+
errorLabel: string;
|
|
121
|
+
tooltip: string;
|
|
122
|
+
hideLabel: boolean;
|
|
123
|
+
tabindex: string;
|
|
124
|
+
disabled: boolean;
|
|
125
|
+
autofocus: boolean;
|
|
126
|
+
dbIndex: boolean;
|
|
127
|
+
customDefaultValue: string;
|
|
128
|
+
calculateValue: string;
|
|
129
|
+
calculateServer: boolean;
|
|
130
|
+
widget: null;
|
|
131
|
+
attributes: {};
|
|
132
|
+
validateOn: string;
|
|
133
|
+
validate: {
|
|
134
|
+
required: boolean;
|
|
135
|
+
custom: string;
|
|
136
|
+
customPrivate: boolean;
|
|
137
|
+
strictDateValidation: boolean;
|
|
138
|
+
multiple: boolean;
|
|
139
|
+
unique: boolean;
|
|
140
|
+
};
|
|
141
|
+
conditional: {
|
|
142
|
+
show: null;
|
|
143
|
+
when: null;
|
|
144
|
+
eq: string;
|
|
145
|
+
};
|
|
146
|
+
overlay: {
|
|
147
|
+
style: string;
|
|
148
|
+
left: string;
|
|
149
|
+
top: string;
|
|
150
|
+
width: string;
|
|
151
|
+
height: string;
|
|
152
|
+
};
|
|
153
|
+
allowCalculateOverride: boolean;
|
|
154
|
+
encrypted: boolean;
|
|
155
|
+
showCharCount: boolean;
|
|
156
|
+
showWordCount: boolean;
|
|
157
|
+
properties: {};
|
|
158
|
+
allowMultipleMasks: boolean;
|
|
159
|
+
addons: never[];
|
|
160
|
+
tree: boolean;
|
|
161
|
+
lazyLoad: boolean;
|
|
162
|
+
theme: string;
|
|
163
|
+
breadcrumb: string;
|
|
164
|
+
}[];
|
|
165
|
+
}
|
|
166
|
+
export default _default;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"type": "form",
|
|
3
|
+
"display": "wizard",
|
|
4
|
+
"components": [
|
|
5
|
+
{
|
|
6
|
+
"title": "Page 1",
|
|
7
|
+
"breadcrumbClickable": true,
|
|
8
|
+
"buttonSettings": {
|
|
9
|
+
"previous": true,
|
|
10
|
+
"cancel": true,
|
|
11
|
+
"next": true
|
|
12
|
+
},
|
|
13
|
+
"navigateOnEnter": false,
|
|
14
|
+
"saveOnEnter": false,
|
|
15
|
+
"scrollToTop": false,
|
|
16
|
+
"collapsible": false,
|
|
17
|
+
"key": "page1",
|
|
18
|
+
"type": "panel",
|
|
19
|
+
"label": "Page 1",
|
|
20
|
+
"components": [
|
|
21
|
+
{
|
|
22
|
+
"label": "Time",
|
|
23
|
+
"disabled": true,
|
|
24
|
+
"alwaysEnabled": false,
|
|
25
|
+
"tableView": true,
|
|
26
|
+
"defaultValue": "03:03 PM",
|
|
27
|
+
"key": "time1",
|
|
28
|
+
"type": "time",
|
|
29
|
+
"input": true,
|
|
30
|
+
"inputMask": "99:99",
|
|
31
|
+
"hideOnChildrenHidden": false,
|
|
32
|
+
"id": "efw9yyq",
|
|
33
|
+
"placeholder": "",
|
|
34
|
+
"prefix": "",
|
|
35
|
+
"customClass": "",
|
|
36
|
+
"suffix": "",
|
|
37
|
+
"multiple": false,
|
|
38
|
+
"protected": false,
|
|
39
|
+
"unique": false,
|
|
40
|
+
"persistent": true,
|
|
41
|
+
"hidden": false,
|
|
42
|
+
"clearOnHide": true,
|
|
43
|
+
"refreshOn": "",
|
|
44
|
+
"redrawOn": "",
|
|
45
|
+
"modalEdit": false,
|
|
46
|
+
"dataGridLabel": false,
|
|
47
|
+
"labelPosition": "top",
|
|
48
|
+
"description": "",
|
|
49
|
+
"errorLabel": "",
|
|
50
|
+
"tooltip": "",
|
|
51
|
+
"hideLabel": false,
|
|
52
|
+
"tabindex": "",
|
|
53
|
+
"autofocus": false,
|
|
54
|
+
"dbIndex": false,
|
|
55
|
+
"customDefaultValue": "",
|
|
56
|
+
"calculateValue": "",
|
|
57
|
+
"calculateServer": false,
|
|
58
|
+
"widget": {
|
|
59
|
+
"type": "input"
|
|
60
|
+
},
|
|
61
|
+
"attributes": {},
|
|
62
|
+
"validateOn": "change",
|
|
63
|
+
"validate": {
|
|
64
|
+
"required": false,
|
|
65
|
+
"custom": "",
|
|
66
|
+
"customPrivate": false,
|
|
67
|
+
"strictDateValidation": false,
|
|
68
|
+
"multiple": false,
|
|
69
|
+
"unique": false,
|
|
70
|
+
"minLength": "",
|
|
71
|
+
"maxLength": "",
|
|
72
|
+
"pattern": ""
|
|
73
|
+
},
|
|
74
|
+
"conditional": {
|
|
75
|
+
"show": null,
|
|
76
|
+
"when": null,
|
|
77
|
+
"eq": ""
|
|
78
|
+
},
|
|
79
|
+
"overlay": {
|
|
80
|
+
"style": "",
|
|
81
|
+
"left": "",
|
|
82
|
+
"top": "",
|
|
83
|
+
"width": "",
|
|
84
|
+
"height": ""
|
|
85
|
+
},
|
|
86
|
+
"allowCalculateOverride": false,
|
|
87
|
+
"encrypted": false,
|
|
88
|
+
"showCharCount": false,
|
|
89
|
+
"showWordCount": false,
|
|
90
|
+
"properties": {},
|
|
91
|
+
"allowMultipleMasks": false,
|
|
92
|
+
"addons": [],
|
|
93
|
+
"mask": false,
|
|
94
|
+
"inputType": "time",
|
|
95
|
+
"inputFormat": "plain",
|
|
96
|
+
"displayMask": "",
|
|
97
|
+
"spellcheck": true,
|
|
98
|
+
"truncateMultipleSpaces": false,
|
|
99
|
+
"format": "HH:mm",
|
|
100
|
+
"dataFormat": "HH:mm:ss"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"input": false,
|
|
104
|
+
"tableView": false,
|
|
105
|
+
"id": "e7vej1d",
|
|
106
|
+
"placeholder": "",
|
|
107
|
+
"prefix": "",
|
|
108
|
+
"customClass": "",
|
|
109
|
+
"suffix": "",
|
|
110
|
+
"multiple": false,
|
|
111
|
+
"defaultValue": null,
|
|
112
|
+
"protected": false,
|
|
113
|
+
"unique": false,
|
|
114
|
+
"persistent": false,
|
|
115
|
+
"hidden": false,
|
|
116
|
+
"clearOnHide": false,
|
|
117
|
+
"refreshOn": "",
|
|
118
|
+
"redrawOn": "",
|
|
119
|
+
"modalEdit": false,
|
|
120
|
+
"dataGridLabel": false,
|
|
121
|
+
"labelPosition": "top",
|
|
122
|
+
"description": "",
|
|
123
|
+
"errorLabel": "",
|
|
124
|
+
"tooltip": "",
|
|
125
|
+
"hideLabel": false,
|
|
126
|
+
"tabindex": "",
|
|
127
|
+
"disabled": false,
|
|
128
|
+
"autofocus": false,
|
|
129
|
+
"dbIndex": false,
|
|
130
|
+
"customDefaultValue": "",
|
|
131
|
+
"calculateValue": "",
|
|
132
|
+
"calculateServer": false,
|
|
133
|
+
"widget": null,
|
|
134
|
+
"attributes": {},
|
|
135
|
+
"validateOn": "change",
|
|
136
|
+
"validate": {
|
|
137
|
+
"required": false,
|
|
138
|
+
"custom": "",
|
|
139
|
+
"customPrivate": false,
|
|
140
|
+
"strictDateValidation": false,
|
|
141
|
+
"multiple": false,
|
|
142
|
+
"unique": false
|
|
143
|
+
},
|
|
144
|
+
"conditional": {
|
|
145
|
+
"show": null,
|
|
146
|
+
"when": null,
|
|
147
|
+
"eq": ""
|
|
148
|
+
},
|
|
149
|
+
"overlay": {
|
|
150
|
+
"style": "",
|
|
151
|
+
"left": "",
|
|
152
|
+
"top": "",
|
|
153
|
+
"width": "",
|
|
154
|
+
"height": ""
|
|
155
|
+
},
|
|
156
|
+
"allowCalculateOverride": false,
|
|
157
|
+
"encrypted": false,
|
|
158
|
+
"showCharCount": false,
|
|
159
|
+
"showWordCount": false,
|
|
160
|
+
"properties": {},
|
|
161
|
+
"allowMultipleMasks": false,
|
|
162
|
+
"addons": [],
|
|
163
|
+
"tree": false,
|
|
164
|
+
"lazyLoad": false,
|
|
165
|
+
"theme": "default",
|
|
166
|
+
"breadcrumb": "default"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import comp1 from './comp1';
|
|
2
2
|
import comp2 from './comp2';
|
|
3
3
|
import comp3 from './comp3';
|
|
4
|
+
import comp4 from './comp4';
|
|
4
5
|
import timeForm from './timeForm';
|
|
5
6
|
import timeForm2 from './timeForm2';
|
|
6
|
-
export { comp1, comp2, comp3, timeForm, timeForm2 };
|
|
7
|
+
export { comp1, comp2, comp3, comp4, timeForm, timeForm2 };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import comp1 from './comp1';
|
|
2
2
|
import comp2 from './comp2';
|
|
3
3
|
import comp3 from './comp3';
|
|
4
|
+
import comp4 from './comp4';
|
|
4
5
|
import timeForm from './timeForm';
|
|
5
6
|
import timeForm2 from './timeForm2';
|
|
6
|
-
export { comp1, comp2, comp3, timeForm, timeForm2 };
|
|
7
|
+
export { comp1, comp2, comp3, comp4, timeForm, timeForm2 };
|