@zohodesk/library-platform 1.1.5 → 1.1.6-temp-1
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/es/bc/zform/Properties.js +3 -26
- package/es/cc/action-icon/Properties.js +19 -1
- package/es/cc/button/Constants.js +7 -0
- package/es/cc/button/Events.js +5 -0
- package/es/cc/button/Properties.js +77 -0
- package/es/cc/button/index.js +3 -0
- package/es/cc/fields/field/FormDefaultUIType.js +37 -0
- package/es/cc/form-connected/Properties.js +43 -1
- package/es/cc/index.js +3 -0
- package/es/cc/list-item/Constants.js +7 -0
- package/es/cc/list-item/Events.js +14 -0
- package/es/cc/list-item/Properties.js +131 -0
- package/es/cc/list-item/index.js +3 -0
- package/es/cc/more-dropdown/Constants.js +7 -0
- package/es/cc/more-dropdown/Events.js +14 -0
- package/es/cc/more-dropdown/Properties.js +66 -0
- package/es/cc/more-dropdown/index.js +3 -0
- package/es/cc/section/Properties.js +16 -0
- package/es/cc/switch/Properties.js +2 -2
- package/es/index.js +6 -1
- package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +6 -0
- package/es/library/dot/components/form/adapters/presenter/TransformState.js +25 -1
- package/es/library/dot/components/form/frameworks/ui/DefaultComponentRegister.js +28 -0
- package/es/library/dot/components/form/frameworks/ui/Form.js +2 -0
- package/es/library/dot/components/form/frameworks/ui/FormView.js +41 -26
- package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +8 -4
- package/es/library/dot/components/form/frameworks/ui/sub-components/Sections.js +7 -9
- package/es/library/dot/components/section/frameworks/ui/RenderField.js +19 -0
- package/es/library/dot/components/section/frameworks/ui/Section.js +13 -4
- package/es/library/dot/components/section/frameworks/ui/SectionView.js +7 -26
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +6 -12
- package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIconView.js +10 -1
- package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/css/ActionIconView.module.css +3 -0
- package/es/library/dot/legacy-to-new-arch/button/frameworks/ui/Button.js +12 -0
- package/es/library/dot/legacy-to-new-arch/button/frameworks/ui/ButtonView.js +41 -0
- package/es/library/dot/legacy-to-new-arch/list-item/frameworks/ui/ListItem.js +12 -0
- package/es/library/dot/legacy-to-new-arch/list-item/frameworks/ui/ListItemView.js +122 -0
- package/es/library/dot/legacy-to-new-arch/more-dropdown/frameworks/ui/MoreDropdown.js +12 -0
- package/es/library/dot/legacy-to-new-arch/more-dropdown/frameworks/ui/MoreDropdownView.js +43 -0
- package/es/library/dot/legacy-to-new-arch/switch/frameworks/ui/SwitchView.js +5 -5
- package/es/library/dot/legacy-to-new-arch/table-field-components/switch-field/frameworks/ui/SwitchFieldView.js +0 -1
- package/es/platform/zform/adapters/presenter/FormTranslator.js +32 -45
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +35 -26
- package/es/platform/zform/adapters/presenter/translators/interfaces/ComponentMapping.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/interfaces/FieldContract.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/interfaces/FormTranslatorState.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/interfaces/SectionContract.js +1 -0
- package/es/platform/zform/domain/ZSection.js +6 -0
- package/package.json +18 -16
- package/es/library/dot/components/section/adapters/presenter/TransFormState.js +0 -26
|
@@ -51,37 +51,14 @@ export default {
|
|
|
51
51
|
},
|
|
52
52
|
servicePrefix: {
|
|
53
53
|
type: 'string'
|
|
54
|
+
},
|
|
55
|
+
additionalData: {
|
|
56
|
+
type: 'object'
|
|
54
57
|
}
|
|
55
58
|
},
|
|
56
59
|
required: ['orgName'],
|
|
57
60
|
additionalProperties: false
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
|
-
},
|
|
61
|
-
uiMapping: {
|
|
62
|
-
required: false,
|
|
63
|
-
defaultValue: {
|
|
64
|
-
sections: {},
|
|
65
|
-
fields: {}
|
|
66
|
-
},
|
|
67
|
-
typeMetadata: {
|
|
68
|
-
schema: {
|
|
69
|
-
type: 'object',
|
|
70
|
-
properties: {
|
|
71
|
-
fields: {
|
|
72
|
-
type: 'object',
|
|
73
|
-
additionalProperties: {
|
|
74
|
-
type: 'string'
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
sections: {
|
|
78
|
-
type: 'object',
|
|
79
|
-
additionalProperties: {
|
|
80
|
-
type: 'string'
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
63
|
}
|
|
87
64
|
};
|
|
@@ -21,7 +21,25 @@ export default {
|
|
|
21
21
|
typeMetadata: {
|
|
22
22
|
schema: {
|
|
23
23
|
type: 'string',
|
|
24
|
-
enum: ['primary', 'danger']
|
|
24
|
+
enum: ['primary', 'danger', 'default']
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
iconSize: {
|
|
29
|
+
required: false,
|
|
30
|
+
defaultValue: 16,
|
|
31
|
+
typeMetadata: {
|
|
32
|
+
schema: {
|
|
33
|
+
type: 'number'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
hasPadding: {
|
|
38
|
+
required: false,
|
|
39
|
+
defaultValue: true,
|
|
40
|
+
typeMetadata: {
|
|
41
|
+
schema: {
|
|
42
|
+
type: 'boolean'
|
|
25
43
|
}
|
|
26
44
|
}
|
|
27
45
|
},
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
class ButtonConstants {}
|
|
4
|
+
|
|
5
|
+
_defineProperty(ButtonConstants, "BUTTON_CLICKED", 'BUTTON#CLICKED');
|
|
6
|
+
|
|
7
|
+
export default ButtonConstants;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
text: {
|
|
3
|
+
defaultValue: '',
|
|
4
|
+
required: false,
|
|
5
|
+
typeMetadata: {
|
|
6
|
+
schema: {
|
|
7
|
+
type: 'string'
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
palette: {
|
|
12
|
+
defaultValue: 'primaryFilled',
|
|
13
|
+
required: false,
|
|
14
|
+
typeMetadata: {
|
|
15
|
+
schema: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
enum: ['primary', 'secondary', 'danger', 'success', 'plainPrimary', 'plainSecondary', 'plainDanger', 'plainSuccess', 'primaryFilled', 'secondaryFilled', 'dangerFilled', 'successFilled', 'info', 'tertiaryFilled']
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
defaultValue: 'medium',
|
|
23
|
+
required: false,
|
|
24
|
+
typeMetadata: {
|
|
25
|
+
schema: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
enum: ['small', 'medium', 'large', 'xlarge']
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
isRounded: {
|
|
32
|
+
defaultValue: false,
|
|
33
|
+
required: false,
|
|
34
|
+
typeMetadata: {
|
|
35
|
+
schema: {
|
|
36
|
+
type: 'boolean'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
isDisabled: {
|
|
41
|
+
defaultValue: false,
|
|
42
|
+
required: false,
|
|
43
|
+
typeMetadata: {
|
|
44
|
+
schema: {
|
|
45
|
+
type: 'boolean'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
id: {
|
|
50
|
+
defaultValue: '',
|
|
51
|
+
required: false,
|
|
52
|
+
typeMetadata: {
|
|
53
|
+
schema: {
|
|
54
|
+
type: 'string'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
status: {
|
|
59
|
+
defaultValue: 'none',
|
|
60
|
+
required: false,
|
|
61
|
+
typeMetadata: {
|
|
62
|
+
schema: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
enum: ['loading', 'success', 'none']
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
tooltip: {
|
|
69
|
+
defaultValue: '',
|
|
70
|
+
required: false,
|
|
71
|
+
typeMetadata: {
|
|
72
|
+
schema: {
|
|
73
|
+
type: 'string'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const DefaultFormSectionUIType = 'DefaultFormSection';
|
|
2
|
+
export const fieldTypeToUIType = {
|
|
3
|
+
Text: 'TextBox',
|
|
4
|
+
Textarea: 'TextArea',
|
|
5
|
+
Boolean: 'Checkbox',
|
|
6
|
+
URL: 'Url',
|
|
7
|
+
Picklist: 'PickList',
|
|
8
|
+
AutoNumber: 'TextBox',
|
|
9
|
+
Number: 'Number',
|
|
10
|
+
Decimal: 'Decimal',
|
|
11
|
+
Email: 'Email',
|
|
12
|
+
Phone: 'Phone',
|
|
13
|
+
Currency: 'Currency',
|
|
14
|
+
Percent: 'Percentage',
|
|
15
|
+
Date: 'Date',
|
|
16
|
+
DateTime: 'DateTime',
|
|
17
|
+
Multiselect: 'MultiSelect',
|
|
18
|
+
LookUp: 'TextBox'
|
|
19
|
+
};
|
|
20
|
+
export const ePHIFields = {
|
|
21
|
+
Text: true,
|
|
22
|
+
Textarea: true,
|
|
23
|
+
URL: true,
|
|
24
|
+
Picklist: true,
|
|
25
|
+
Number: true,
|
|
26
|
+
Decimal: true,
|
|
27
|
+
Email: false,
|
|
28
|
+
Phone: true,
|
|
29
|
+
Currency: false,
|
|
30
|
+
Percent: true,
|
|
31
|
+
AutoNumber: false,
|
|
32
|
+
Date: false,
|
|
33
|
+
DateTime: false,
|
|
34
|
+
Multiselect: false,
|
|
35
|
+
Boolean: false,
|
|
36
|
+
LookUp: false
|
|
37
|
+
};
|
|
@@ -1 +1,43 @@
|
|
|
1
|
-
export default {
|
|
1
|
+
export default {
|
|
2
|
+
componentMapping: {
|
|
3
|
+
required: false,
|
|
4
|
+
defaultValue: {
|
|
5
|
+
sections: {},
|
|
6
|
+
loadingState: ''
|
|
7
|
+
},
|
|
8
|
+
typeMetadata: {
|
|
9
|
+
schema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
sections: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
additionalProperties: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
UIComponentName: {
|
|
18
|
+
type: 'string'
|
|
19
|
+
} // translator: { type: 'function' } // Function types are not representable in JSON Schema
|
|
20
|
+
|
|
21
|
+
},
|
|
22
|
+
required: ['UIComponentName']
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
// fields: {
|
|
26
|
+
// type: 'object',
|
|
27
|
+
// additionalProperties: {
|
|
28
|
+
// type: 'object',
|
|
29
|
+
// properties: {
|
|
30
|
+
// UIComponentName: { type: 'string' },
|
|
31
|
+
// translator: { type: 'object' } // Function types are not representable in JSON Schema
|
|
32
|
+
// },
|
|
33
|
+
// required: ['UIComponentName']
|
|
34
|
+
// }
|
|
35
|
+
// },
|
|
36
|
+
loadingState: {
|
|
37
|
+
type: 'string'
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
package/es/cc/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from "./avatar";
|
|
2
|
+
export * from "./button";
|
|
2
3
|
export * from "./checkbox";
|
|
3
4
|
export * from "./email";
|
|
4
5
|
export * from "./highlighted-value";
|
|
5
6
|
export * from "./info-icon";
|
|
6
7
|
export * from "./link";
|
|
8
|
+
export * from "./list-item";
|
|
7
9
|
export * from "./switch";
|
|
8
10
|
export * from "./table-list";
|
|
9
11
|
export * from "./tags";
|
|
@@ -13,4 +15,5 @@ export * from "./empty-state";
|
|
|
13
15
|
export * from "./textbox";
|
|
14
16
|
export * from "./textarea";
|
|
15
17
|
export * from "./table-connected";
|
|
18
|
+
export * from "./section";
|
|
16
19
|
export * from "./fields";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
class ListItemConstants {}
|
|
4
|
+
|
|
5
|
+
_defineProperty(ListItemConstants, "LISTITEM_CLICKED", 'LISTITEM#CLICKED');
|
|
6
|
+
|
|
7
|
+
export default ListItemConstants;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: {
|
|
3
|
+
defaultValue: '',
|
|
4
|
+
required: false,
|
|
5
|
+
typeMetadata: {
|
|
6
|
+
schema: {
|
|
7
|
+
type: 'string'
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
isDisabled: {
|
|
12
|
+
defaultValue: false,
|
|
13
|
+
required: false,
|
|
14
|
+
typeMetadata: {
|
|
15
|
+
schema: {
|
|
16
|
+
type: 'boolean'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
isActive: {
|
|
21
|
+
defaultValue: false,
|
|
22
|
+
required: false,
|
|
23
|
+
typeMetadata: {
|
|
24
|
+
schema: {
|
|
25
|
+
type: 'boolean'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
text: {
|
|
30
|
+
defaultValue: '',
|
|
31
|
+
required: false,
|
|
32
|
+
typeMetadata: {
|
|
33
|
+
schema: {
|
|
34
|
+
type: 'string'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
secondaryText: {
|
|
39
|
+
defaultValue: '',
|
|
40
|
+
required: false,
|
|
41
|
+
typeMetadata: {
|
|
42
|
+
schema: {
|
|
43
|
+
type: 'string'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
defaultValue: 'medium',
|
|
49
|
+
required: false,
|
|
50
|
+
typeMetadata: {
|
|
51
|
+
schema: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
enum: ['small', 'medium', 'large']
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
tooltip: {
|
|
58
|
+
defaultValue: '',
|
|
59
|
+
required: false,
|
|
60
|
+
typeMetadata: {
|
|
61
|
+
schema: {
|
|
62
|
+
type: 'string'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
icon: {
|
|
67
|
+
defaultValue: '',
|
|
68
|
+
required: false,
|
|
69
|
+
typeMetadata: {
|
|
70
|
+
schema: {
|
|
71
|
+
type: 'string'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
iconSize: {
|
|
76
|
+
defaultValue: 14,
|
|
77
|
+
required: false,
|
|
78
|
+
typeMetadata: {
|
|
79
|
+
schema: {
|
|
80
|
+
type: 'number'
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
imgSrc: {
|
|
85
|
+
defaultValue: '',
|
|
86
|
+
required: false,
|
|
87
|
+
typeMetadata: {
|
|
88
|
+
schema: {
|
|
89
|
+
type: 'string'
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
imgName: {
|
|
94
|
+
defaultValue: '',
|
|
95
|
+
required: false,
|
|
96
|
+
typeMetadata: {
|
|
97
|
+
schema: {
|
|
98
|
+
type: 'string'
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
href: {
|
|
103
|
+
defaultValue: '',
|
|
104
|
+
required: false,
|
|
105
|
+
typeMetadata: {
|
|
106
|
+
schema: {
|
|
107
|
+
type: 'string'
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
target: {
|
|
112
|
+
defaultValue: 'self',
|
|
113
|
+
required: false,
|
|
114
|
+
typeMetadata: {
|
|
115
|
+
schema: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
enum: ['self', 'blank', 'parent', 'top']
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
divider: {
|
|
122
|
+
defaultValue: 'none',
|
|
123
|
+
required: false,
|
|
124
|
+
typeMetadata: {
|
|
125
|
+
schema: {
|
|
126
|
+
type: 'string',
|
|
127
|
+
enum: ['none', 'before', 'after']
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
class MoreDropdownConstants {}
|
|
4
|
+
|
|
5
|
+
_defineProperty(MoreDropdownConstants, "MORE_DROPDOWN_OPTION_CLICKED", 'MORE_DROPDOWN#OPTION_CLICKED');
|
|
6
|
+
|
|
7
|
+
export default MoreDropdownConstants;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
heading: {
|
|
3
|
+
defaultValue: '',
|
|
4
|
+
required: false,
|
|
5
|
+
typeMetadata: {
|
|
6
|
+
schema: {
|
|
7
|
+
type: 'string'
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
options: {
|
|
12
|
+
defaultValue: [],
|
|
13
|
+
required: true,
|
|
14
|
+
typeMetadata: {
|
|
15
|
+
schema: {
|
|
16
|
+
type: 'array',
|
|
17
|
+
items: {
|
|
18
|
+
anyOf: [{
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties: {
|
|
21
|
+
id: {
|
|
22
|
+
type: 'string'
|
|
23
|
+
},
|
|
24
|
+
value: {
|
|
25
|
+
type: 'string'
|
|
26
|
+
},
|
|
27
|
+
iconName: {
|
|
28
|
+
type: 'string'
|
|
29
|
+
},
|
|
30
|
+
iconSize: {
|
|
31
|
+
type: 'string'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
required: ['id', 'value']
|
|
35
|
+
}, {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
needDivider: {
|
|
39
|
+
type: 'boolean'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
required: ['needDivider']
|
|
43
|
+
}]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
isDisabled: {
|
|
49
|
+
defaultValue: false,
|
|
50
|
+
required: false,
|
|
51
|
+
typeMetadata: {
|
|
52
|
+
schema: {
|
|
53
|
+
type: 'boolean'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
tooltip: {
|
|
58
|
+
defaultValue: '',
|
|
59
|
+
required: false,
|
|
60
|
+
typeMetadata: {
|
|
61
|
+
schema: {
|
|
62
|
+
type: 'string'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
@@ -33,6 +33,14 @@ export default {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
+
name: {
|
|
37
|
+
required: false,
|
|
38
|
+
typeMetadata: {
|
|
39
|
+
schema: {
|
|
40
|
+
type: 'string'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
36
44
|
description: {
|
|
37
45
|
required: false,
|
|
38
46
|
typeMetadata: {
|
|
@@ -42,6 +50,14 @@ export default {
|
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
52
|
},
|
|
53
|
+
isCollapsed: {
|
|
54
|
+
required: false,
|
|
55
|
+
typeMetadata: {
|
|
56
|
+
schema: {
|
|
57
|
+
type: 'boolean'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
45
61
|
isVisible: {
|
|
46
62
|
required: false,
|
|
47
63
|
typeMetadata: {
|
|
@@ -19,11 +19,11 @@ export default {
|
|
|
19
19
|
},
|
|
20
20
|
size: {
|
|
21
21
|
required: true,
|
|
22
|
-
defaultValue: "
|
|
22
|
+
defaultValue: "medium",
|
|
23
23
|
typeMetadata: {
|
|
24
24
|
schema: {
|
|
25
25
|
type: "string",
|
|
26
|
-
enum: ["small", "medium"]
|
|
26
|
+
enum: ["small", "medium", "large", "xlarge"]
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
},
|
package/es/index.js
CHANGED
|
@@ -10,4 +10,9 @@ export { _Components as Components };
|
|
|
10
10
|
export { platformSDK } from "./platform/sdk/frameworks/Sdk";
|
|
11
11
|
export { sdkRegistry } from "./platform/sdk/frameworks/SdkRegistry";
|
|
12
12
|
export { validations as defaultFieldValidations } from "./library/behaviours/field-validation/frameworks/utils/FormBasicValidationAdaptor";
|
|
13
|
-
export { getClientActionsAdapter, fetchClientActions } from "./platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionsAdapter";
|
|
13
|
+
export { getClientActionsAdapter, fetchClientActions } from "./platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionsAdapter";
|
|
14
|
+
export { renderField } from "./library/dot/components/section/frameworks/ui/RenderField";
|
|
15
|
+
import { FieldSectionEventMappingBehaviourFactory } from "./library/dot/components/section/frameworks/ui/Section";
|
|
16
|
+
export const Behaviours = {
|
|
17
|
+
FieldSectionEventMappingBehaviourFactory
|
|
18
|
+
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import ActionIcon from "../../../../legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon";
|
|
2
|
+
import Button from "../../../../legacy-to-new-arch/button/frameworks/ui/Button"; // import ListItem from '@library/dot/legacy-to-new-arch/list-item/frameworks/ui/ListItem';
|
|
3
|
+
|
|
2
4
|
import TableColumnSort from "../../../../legacy-to-new-arch/table-column-sort/frameworks/ui/TableColumnSort";
|
|
3
5
|
import TableColumnChooser from "../../../../legacy-to-new-arch/table-column-chooser/frameworks/ui/TableColumnChooser";
|
|
4
6
|
import Checkbox from "../../../../legacy-to-new-arch/checkbox/frameworks/ui/Checkbox";
|
|
5
7
|
import TableColumnFilter from "../../../../legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilter";
|
|
8
|
+
import MoreDropdown from "../../../../legacy-to-new-arch/more-dropdown/frameworks/ui/MoreDropdown";
|
|
6
9
|
const ActionComponentMapping = {
|
|
7
10
|
['ActionIcon']: ActionIcon,
|
|
11
|
+
['Button']: Button,
|
|
12
|
+
// ['ListItem']: ListItem,
|
|
13
|
+
['MoreDropdown']: MoreDropdown,
|
|
8
14
|
['TableColumnSort']: TableColumnSort,
|
|
9
15
|
['TableColumnChooser']: TableColumnChooser,
|
|
10
16
|
['TableSelectAll']: Checkbox,
|
|
@@ -34,6 +34,26 @@ function updateFieldValues(_ref) {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
const footerLeftActions = [{
|
|
38
|
+
component: 'Button',
|
|
39
|
+
properties: {
|
|
40
|
+
text: 'Submit',
|
|
41
|
+
palette: 'primaryFilled'
|
|
42
|
+
},
|
|
43
|
+
eventMappings: [{
|
|
44
|
+
payloadValueMapping: {},
|
|
45
|
+
sourceEvent: "BUTTON#CLICKED",
|
|
46
|
+
id: "1234567890",
|
|
47
|
+
targetEvent: "FORM#SUBMIT"
|
|
48
|
+
}]
|
|
49
|
+
}, {
|
|
50
|
+
component: 'Button',
|
|
51
|
+
properties: {
|
|
52
|
+
text: 'Cancel',
|
|
53
|
+
palette: 'secondary'
|
|
54
|
+
},
|
|
55
|
+
eventMappings: []
|
|
56
|
+
}];
|
|
37
57
|
export function TransformState(state) {
|
|
38
58
|
const {
|
|
39
59
|
sections,
|
|
@@ -51,7 +71,11 @@ export function TransformState(state) {
|
|
|
51
71
|
// properties: { ...state.properties, sections: updatedSections }
|
|
52
72
|
viewModel: {
|
|
53
73
|
sections: updatedSections,
|
|
54
|
-
isLoading
|
|
74
|
+
isLoading,
|
|
75
|
+
headerLeftActions: [],
|
|
76
|
+
headerRightActions: [],
|
|
77
|
+
footerLeftActions,
|
|
78
|
+
footerRightActions: []
|
|
55
79
|
}
|
|
56
80
|
};
|
|
57
81
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DefaultFormSectionUIType } from "../../../../../../cc/fields/field/FormDefaultUIType";
|
|
2
|
+
import ComponentRegistry from "../../../../../custom-component/frameworks/ui/ComponentRegistry";
|
|
3
|
+
import { TextArea, TextBox, Email, PickList, Currency, MultiSelect, Url, Percentage, Phone, Number, Decimal, Date, DateTime, Checkbox } from "../../../form-fields";
|
|
4
|
+
import EPHITag from "../../../form-fields/ephi-tag/frameworks/ui/EPHITag";
|
|
5
|
+
import InfoIcon from "../../../form-fields/info-icon/frameworks/ui/InfoIcon";
|
|
6
|
+
import Section from "../../../section/frameworks/ui/Section";
|
|
7
|
+
export function registerDefaultComponents() {
|
|
8
|
+
// Registering components in the ComponentRegistry
|
|
9
|
+
// NOTE: This is a workaround to avoid dynamic imports
|
|
10
|
+
// NOTE: register these components in place
|
|
11
|
+
ComponentRegistry.register('TextBox', TextBox);
|
|
12
|
+
ComponentRegistry.register('TextArea', TextArea);
|
|
13
|
+
ComponentRegistry.register('PickList', PickList);
|
|
14
|
+
ComponentRegistry.register('Email', Email);
|
|
15
|
+
ComponentRegistry.register('Currency', Currency);
|
|
16
|
+
ComponentRegistry.register('MultiSelect', MultiSelect);
|
|
17
|
+
ComponentRegistry.register('Url', Url);
|
|
18
|
+
ComponentRegistry.register('Percentage', Percentage);
|
|
19
|
+
ComponentRegistry.register('Phone', Phone);
|
|
20
|
+
ComponentRegistry.register('Number', Number);
|
|
21
|
+
ComponentRegistry.register('Decimal', Decimal);
|
|
22
|
+
ComponentRegistry.register('Date', Date);
|
|
23
|
+
ComponentRegistry.register('DateTime', DateTime);
|
|
24
|
+
ComponentRegistry.register('Checkbox', Checkbox);
|
|
25
|
+
ComponentRegistry.register('EPHITag', EPHITag);
|
|
26
|
+
ComponentRegistry.register('InfoIcon', InfoIcon);
|
|
27
|
+
ComponentRegistry.register(DefaultFormSectionUIType, Section);
|
|
28
|
+
}
|
|
@@ -3,6 +3,8 @@ import FormProperties from "../../../../../../cc/form/Properties";
|
|
|
3
3
|
import FormView from "./FormView";
|
|
4
4
|
import { TransformState } from "../../adapters/presenter/TransformState";
|
|
5
5
|
import EventHandlersFactory from "./EventHandlerFactory";
|
|
6
|
+
import { registerDefaultComponents } from "./DefaultComponentRegister";
|
|
7
|
+
registerDefaultComponents();
|
|
6
8
|
const Form = createCustomComponent({
|
|
7
9
|
name: 'CustomForm',
|
|
8
10
|
View: FormView,
|