@zohodesk/library-platform 1.1.6-temp-1 → 1.1.7-exp.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.
Files changed (85) hide show
  1. package/es/bc/sdk/ResourceNamesEnum.js +1 -0
  2. package/es/bc/zform/Symbol.js +2 -0
  3. package/es/cc/breadcrumb/Constants.js +7 -0
  4. package/es/cc/breadcrumb/Events.js +14 -0
  5. package/es/cc/breadcrumb/Properties.js +35 -0
  6. package/es/cc/breadcrumb/index.js +3 -0
  7. package/es/cc/fields/index.js +2 -1
  8. package/es/cc/form/Properties.js +54 -0
  9. package/es/cc/form-connected/Constants.js +8 -0
  10. package/es/cc/form-connected/Properties.js +52 -0
  11. package/es/cc/form-connected/SdkContract.js +159 -0
  12. package/es/cc/icon-button/Constants.js +7 -0
  13. package/es/cc/icon-button/Events.js +5 -0
  14. package/es/cc/icon-button/Properties.js +86 -0
  15. package/es/cc/icon-button/index.js +3 -0
  16. package/es/cc/section/Properties.js +9 -0
  17. package/es/cc/switch/Properties.js +2 -2
  18. package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +2 -2
  19. package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +5 -1
  20. package/es/library/dot/components/form/adapters/presenter/TransformState.js +64 -21
  21. package/es/library/dot/components/form/frameworks/ui/FormView.js +11 -5
  22. package/es/library/dot/components/form/frameworks/ui/sub-components/Sections.js +4 -2
  23. package/es/library/dot/components/section/frameworks/ui/SectionView.js +3 -5
  24. package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +72 -40
  25. package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +1 -1
  26. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +2 -2
  27. package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/Breadcrumb.js +12 -0
  28. package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/BreadcrumbView.js +47 -0
  29. package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/css/Breadcrumb.module.css +19 -0
  30. package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/sub-components/BreadcrumbItem.js +58 -0
  31. package/es/library/dot/legacy-to-new-arch/icon-button/frameworks/ui/IconButton.js +12 -0
  32. package/es/library/dot/legacy-to-new-arch/icon-button/frameworks/ui/IconButtonView.js +43 -0
  33. package/es/library/dot/legacy-to-new-arch/switch/frameworks/ui/SwitchView.js +5 -5
  34. package/es/library/dot/legacy-to-new-arch/table-field-components/switch-field/frameworks/ui/SwitchFieldView.js +1 -0
  35. package/es/platform/client-actions/cc/action-event-mediator/Properties.js +9 -0
  36. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediatorView.js +3 -1
  37. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +4 -0
  38. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +5 -2
  39. package/es/platform/components/form-connected/adapters/resources/SmartFormResources.js +210 -0
  40. package/es/platform/components/form-connected/application/interfaces/ISmartFormResources.js +1 -0
  41. package/es/platform/components/form-connected/frameworks/EventHandlersFactory.js +16 -8
  42. package/es/platform/components/form-connected/frameworks/FormConnectedFactory.js +27 -3
  43. package/es/platform/components/form-connected/frameworks/FormConnectedView.js +14 -2
  44. package/es/platform/components/form-connected/frameworks/FormSdkFactory.js +33 -13
  45. package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +0 -52
  46. package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +4 -1
  47. package/es/platform/page/index.js +46 -0
  48. package/es/platform/sdk/adapters/gateways/Service.js +4 -0
  49. package/es/platform/sdk/application/interfaces/gateways/AbstractResource.js +52 -1
  50. package/es/platform/sdk/application/usecases/GetResourcesUseCase.js +15 -0
  51. package/es/platform/sdk/domain/entities/ResourceManager.js +4 -0
  52. package/es/platform/sdk/frameworks/Sdk.js +7 -0
  53. package/es/platform/sdk/frameworks/SdkRegistry.js +9 -0
  54. package/es/platform/zform/adapters/presenter/FormTranslator.js +60 -3
  55. package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +13 -3
  56. package/es/platform/zform/adapters/presenter/utils/DefaultClientActions.js +59 -0
  57. package/es/platform/zform/applications/interfaces/input/DeleteFieldUseCaseInput.js +1 -0
  58. package/es/platform/zform/applications/interfaces/input/GetFieldValueUseCaseInput.js +1 -0
  59. package/es/platform/zform/applications/interfaces/input/HideFieldUseCaseInput.js +1 -0
  60. package/es/platform/zform/applications/interfaces/input/HideSectionUseCaseInput.js +1 -0
  61. package/es/platform/zform/applications/interfaces/input/InsertFieldUseCaseInput.js +1 -0
  62. package/es/platform/zform/applications/interfaces/input/SetFieldValueUseCaseInput.js +1 -0
  63. package/es/platform/zform/applications/interfaces/input/SetFieldsValuesUseCaseInput.js +1 -0
  64. package/es/platform/zform/applications/interfaces/input/ShowFieldUseCaseInput.js +1 -0
  65. package/es/platform/zform/applications/interfaces/input/ShowSectionUseCaseInput.js +1 -0
  66. package/es/platform/zform/applications/interfaces/input/SubmitUseCaseInput.js +1 -0
  67. package/es/platform/zform/applications/interfaces/input/UpdateFieldUseCaseInput.js +1 -0
  68. package/es/platform/zform/applications/usecases/DeleteFieldUseCase.js +22 -0
  69. package/es/platform/zform/applications/usecases/GetFieldValueUseCase.js +23 -0
  70. package/es/platform/zform/applications/usecases/HideFieldUseCase.js +19 -0
  71. package/es/platform/zform/applications/usecases/HideSectionUseCase.js +19 -0
  72. package/es/platform/zform/applications/usecases/InitializeUseCase.js +16 -0
  73. package/es/platform/zform/applications/usecases/InsertFieldUseCase.js +28 -0
  74. package/es/platform/zform/applications/usecases/SetFieldValueUseCase.js +44 -0
  75. package/es/platform/zform/applications/usecases/SetFieldsValuesUseCase.js +51 -0
  76. package/es/platform/zform/applications/usecases/ShowFieldUseCase.js +19 -0
  77. package/es/platform/zform/applications/usecases/ShowSectionUseCase.js +19 -0
  78. package/es/platform/zform/applications/usecases/SubmitUseCase.js +29 -0
  79. package/es/platform/zform/applications/usecases/UpdateFieldUseCase.js +22 -0
  80. package/es/platform/zform/domain/ZField.js +14 -0
  81. package/es/platform/zform/domain/ZForm.js +85 -3
  82. package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +37 -15
  83. package/es/platform/zrecord/adapters/controllers/CreateRecordController.js +5 -1
  84. package/es/platform/zrecord/applications/usecases/CreateRecordUseCase.js +5 -3
  85. package/package.json +18 -19
@@ -1,5 +1,6 @@
1
1
  var ResourceNamesEnum = /*#__PURE__*/function (ResourceNamesEnum) {
2
2
  ResourceNamesEnum["SMART_TABLE"] = "smartTable";
3
+ ResourceNamesEnum["SMART_FORM"] = "smartForm";
3
4
  return ResourceNamesEnum;
4
5
  }(ResourceNamesEnum || {});
5
6
 
@@ -18,8 +18,10 @@ export const ZFORM_FIELD_VALUE_CHANGED = 'ZFORM#FIELD_VALUE_CHANGED';
18
18
  export const ZFORM_SET_FIELD_ERROR_MESSAGE = 'ZFORM#SET_FIELD_ERROR_MESSAGE';
19
19
  export const ZFORM_VALIDATE_FIELD_REQUEST = 'ZFORM#VALIDATE_FIELD_REQUEST';
20
20
  export const ZFORM_SUBMIT = 'ZFORM#SUBMIT_REQUEST';
21
+ export const ZFORM_CANCEL = 'ZFORM#CANCEL_REQUEST';
21
22
  export const ZFORM_VALIDATION_ERROR = 'ZFORM#VALIDATION_ERROR';
22
23
  export const ZFORM_VALIDATION_SUCCESS = 'ZFORM#VALIDATION_SUCCESS';
23
24
  export const ZFORM_VALIDATE_SUBMIT_FIELD_HAS_ERROR_MESSAGE = 'ZFORM#VALIDATE_SUBMIT_FIELD_HAS_ERROR_MESSAGE';
24
25
  export const ZFORM_SUBMIT_SUCCESS = 'ZFORM#SUBMIT_SUCCESS';
26
+ export const ZFORM_SUBMIT_FAILURE = 'ZFORM#SUBMIT_FAILURE';
25
27
  export const ZFORM_ERROR = 'ZFORM#ERROR';
@@ -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 BreadcrumbConstants {}
4
+
5
+ _defineProperty(BreadcrumbConstants, "BREADCRUMB_ITEM_CLICKED", 'BREADCRUMB#ITEM_CLICKED');
6
+
7
+ export default BreadcrumbConstants;
@@ -0,0 +1,14 @@
1
+ import Constants from "./Constants";
2
+ export default [{
3
+ type: Constants.BREADCRUMB_ITEM_CLICKED,
4
+ payload: {
5
+ id: {
6
+ name: 'id',
7
+ typeMetadata: {
8
+ schema: {
9
+ type: 'string'
10
+ }
11
+ }
12
+ }
13
+ }
14
+ }];
@@ -0,0 +1,35 @@
1
+ export default {
2
+ items: {
3
+ defaultValue: [],
4
+ required: true,
5
+ typeMetadata: {
6
+ schema: {
7
+ type: 'array',
8
+ items: {
9
+ type: 'object',
10
+ properties: {
11
+ id: {
12
+ type: 'string'
13
+ },
14
+ text: {
15
+ type: 'string'
16
+ },
17
+ isLink: {
18
+ type: 'boolean'
19
+ },
20
+ iconName: {
21
+ type: 'string'
22
+ },
23
+ iconSize: {
24
+ type: 'string'
25
+ },
26
+ isActive: {
27
+ type: 'boolean'
28
+ }
29
+ }
30
+ },
31
+ required: ['id', 'text']
32
+ }
33
+ }
34
+ }
35
+ };
@@ -0,0 +1,3 @@
1
+ export { default as BreadcrumbProperties } from "./Properties";
2
+ export { default as BreadcrumbEvents } from "./Events";
3
+ export { default as BreadcrumbConstants } from "./Constants";
@@ -17,4 +17,5 @@ export { default as ColouredPickListFieldProperties } from "./coloured-pick-list
17
17
  export { default as TextFieldProperties } from "./text/Properties";
18
18
  export { default as UrlFieldProperties } from "./url/Properties";
19
19
  export { default as FormulaFieldProperties } from "./formula/Properties";
20
- export { default as FieldTypes } from "./field/Types";
20
+ export { default as FieldTypes } from "./field/Types";
21
+ export { default as FieldConstants } from "./field/Constants";
@@ -1,6 +1,60 @@
1
1
  import PropertiesConverter from "../component/properties/PropertiesConverter";
2
2
  import SectionProperties from "../section/Properties";
3
3
  export default {
4
+ isHeaderEnabled: {
5
+ required: false,
6
+ defaultValue: true,
7
+ typeMetadata: {
8
+ schema: {
9
+ type: 'boolean'
10
+ }
11
+ }
12
+ },
13
+ isFooterEnabled: {
14
+ required: false,
15
+ defaultValue: true,
16
+ typeMetadata: {
17
+ schema: {
18
+ type: 'boolean'
19
+ }
20
+ }
21
+ },
22
+ headerLeftActions: {
23
+ required: false,
24
+ defaultValue: [],
25
+ typeMetadata: {
26
+ schema: {
27
+ type: 'array'
28
+ }
29
+ }
30
+ },
31
+ headerRightActions: {
32
+ required: false,
33
+ defaultValue: [],
34
+ typeMetadata: {
35
+ schema: {
36
+ type: 'array'
37
+ }
38
+ }
39
+ },
40
+ footerLeftActions: {
41
+ required: false,
42
+ defaultValue: [],
43
+ typeMetadata: {
44
+ schema: {
45
+ type: 'array'
46
+ }
47
+ }
48
+ },
49
+ footerRightActions: {
50
+ required: false,
51
+ defaultValue: [],
52
+ typeMetadata: {
53
+ schema: {
54
+ type: 'array'
55
+ }
56
+ }
57
+ },
4
58
  sections: {
5
59
  required: false,
6
60
  typeMetadata: {
@@ -10,4 +10,12 @@ _defineProperty(SmartFormConstants, "SMART_FORM_FIELD_VALUE_CHANGED", 'SMART_FOR
10
10
 
11
11
  _defineProperty(SmartFormConstants, "SMART_FORM_SUBMIT", 'SMART_FORM#SUBMIT');
12
12
 
13
+ _defineProperty(SmartFormConstants, "SMART_FORM_SUBMIT_CLICKED", 'SMART_FORM#SUBMIT_CLICKED');
14
+
15
+ _defineProperty(SmartFormConstants, "SMART_FORM_CANCEL_CLICKED", 'SMART_FORM#CANCEL_CLICKED');
16
+
17
+ _defineProperty(SmartFormConstants, "SMART_FORM_SUBMIT_SUCCESS", 'SMART_FORM#SUBMIT_SUCCESS');
18
+
19
+ _defineProperty(SmartFormConstants, "SMART_FORM_SUBMIT_FAILURE", 'SMART_FORM#SUBMIT_FAILED');
20
+
13
21
  export default SmartFormConstants;
@@ -1,4 +1,56 @@
1
1
  export default {
2
+ isHeaderEnabled: {
3
+ required: false,
4
+ defaultValue: true,
5
+ typeMetadata: {
6
+ schema: {
7
+ type: 'boolean'
8
+ }
9
+ }
10
+ },
11
+ isFooterEnabled: {
12
+ required: false,
13
+ defaultValue: true,
14
+ typeMetadata: {
15
+ schema: {
16
+ type: 'boolean'
17
+ }
18
+ }
19
+ },
20
+ submitConfig: {
21
+ required: false,
22
+ typeMetadata: {
23
+ schema: {
24
+ type: 'object',
25
+ properties: {
26
+ text: {
27
+ type: 'string'
28
+ },
29
+ isEnabled: {
30
+ type: 'boolean'
31
+ }
32
+ },
33
+ required: ['text', 'isEnabled']
34
+ }
35
+ }
36
+ },
37
+ cancelConfig: {
38
+ required: false,
39
+ typeMetadata: {
40
+ schema: {
41
+ type: 'object',
42
+ properties: {
43
+ text: {
44
+ type: 'string'
45
+ },
46
+ isEnabled: {
47
+ type: 'boolean'
48
+ }
49
+ },
50
+ required: ['text', 'isEnabled']
51
+ }
52
+ }
53
+ },
2
54
  componentMapping: {
3
55
  required: false,
4
56
  defaultValue: {
@@ -0,0 +1,159 @@
1
+ export const SdkContracts = {
2
+ hideSectionInputMeta: {
3
+ type: 'object',
4
+ properties: {
5
+ sectionName: {
6
+ type: 'string',
7
+ minLength: 1
8
+ }
9
+ },
10
+ required: ['sectionName']
11
+ },
12
+ showSectionInputMeta: {
13
+ type: 'object',
14
+ properties: {
15
+ sectionName: {
16
+ type: 'string',
17
+ minLength: 1
18
+ }
19
+ },
20
+ required: ['sectionName']
21
+ },
22
+ hideFieldInputMeta: {
23
+ type: 'object',
24
+ properties: {
25
+ fieldName: {
26
+ type: 'string',
27
+ minLength: 1
28
+ }
29
+ },
30
+ required: ['fieldName']
31
+ },
32
+ showFieldInputMeta: {
33
+ type: 'object',
34
+ properties: {
35
+ fieldName: {
36
+ type: 'string',
37
+ minLength: 1
38
+ }
39
+ },
40
+ required: ['fieldName']
41
+ },
42
+ setFieldValueInputMeta: {
43
+ type: 'object',
44
+ properties: {
45
+ fieldName: {
46
+ type: 'string',
47
+ minLength: 1
48
+ },
49
+ newValue: {}
50
+ },
51
+ required: ['fieldName', 'newValue']
52
+ },
53
+ setFieldsValueInputMeta: {
54
+ type: 'object',
55
+ properties: {
56
+ fieldsValuesObj: {
57
+ type: 'object'
58
+ }
59
+ },
60
+ required: ['fieldsValuesObj']
61
+ },
62
+ insertFieldInputMeta: {
63
+ type: 'object',
64
+ properties: {
65
+ sectionName: {
66
+ type: 'string',
67
+ minLength: 1
68
+ },
69
+ fieldsObj: {
70
+ type: 'object'
71
+ },
72
+ fieldIndex: {
73
+ type: 'number'
74
+ }
75
+ },
76
+ required: ['sectionName', 'fieldsObj', 'fieldIndex']
77
+ },
78
+ deleteFieldInputMeta: {
79
+ type: 'object',
80
+ properties: {
81
+ fieldName: {
82
+ type: 'string',
83
+ minLength: 1
84
+ }
85
+ },
86
+ required: ['fieldName']
87
+ },
88
+ updateFieldInputMeta: {
89
+ properties: {
90
+ fieldName: {
91
+ type: 'string',
92
+ minLength: 1
93
+ },
94
+ fieldProperties: {
95
+ type: 'object',
96
+ properties: {
97
+ displayLabel: {
98
+ type: 'string'
99
+ },
100
+ i18NLabel: {
101
+ type: 'string'
102
+ },
103
+ isReadOnly: {
104
+ type: 'boolean'
105
+ },
106
+ maxLength: {
107
+ type: 'number'
108
+ },
109
+ isMandatory: {
110
+ type: 'boolean'
111
+ },
112
+ value: {},
113
+ // You can specify a more detailed type if known
114
+ errorMessage: {
115
+ type: 'string'
116
+ },
117
+ isVisible: {
118
+ type: 'boolean'
119
+ },
120
+ pickListValues: {
121
+ type: 'array',
122
+ items: {
123
+ type: 'object',
124
+ properties: {
125
+ value: {
126
+ type: 'string'
127
+ }
128
+ }
129
+ }
130
+ },
131
+ defaultPickListValues: {
132
+ type: 'array',
133
+ items: {
134
+ type: 'object',
135
+ properties: {
136
+ value: {
137
+ type: 'string'
138
+ }
139
+ }
140
+ }
141
+ },
142
+ toolTip: {
143
+ type: 'string'
144
+ }
145
+ }
146
+ }
147
+ }
148
+ },
149
+ getFieldValueInputMeta: {
150
+ type: 'object',
151
+ properties: {
152
+ fieldName: {
153
+ type: 'string',
154
+ minLength: 1
155
+ }
156
+ },
157
+ required: ['fieldName']
158
+ }
159
+ };
@@ -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 IconButtonConstants {}
4
+
5
+ _defineProperty(IconButtonConstants, "ICON_BUTTON_CLICKED", 'ICON_BUTTON#CLICKED');
6
+
7
+ export default IconButtonConstants;
@@ -0,0 +1,5 @@
1
+ import Constants from "./Constants";
2
+ export default [{
3
+ type: Constants.ICON_BUTTON_CLICKED,
4
+ payload: {}
5
+ }];
@@ -0,0 +1,86 @@
1
+ export default {
2
+ palette: {
3
+ defaultValue: 'default',
4
+ required: false,
5
+ typeMetadata: {
6
+ schema: {
7
+ type: 'string',
8
+ enum: ['primary', 'primaryFilled', 'default']
9
+ }
10
+ }
11
+ },
12
+ iconSize: {
13
+ defaultValue: '14',
14
+ required: false,
15
+ typeMetadata: {
16
+ schema: {
17
+ type: 'string'
18
+ }
19
+ }
20
+ },
21
+ size: {
22
+ defaultValue: 'large',
23
+ required: false,
24
+ typeMetadata: {
25
+ schema: {
26
+ type: 'string',
27
+ enum: ['xsmall', 'small', 'medium', 'large', 'xlarge']
28
+ }
29
+ }
30
+ },
31
+ iconName: {
32
+ defaultValue: '',
33
+ required: false,
34
+ typeMetadata: {
35
+ schema: {
36
+ type: 'string'
37
+ }
38
+ }
39
+ },
40
+ isActive: {
41
+ defaultValue: false,
42
+ required: false,
43
+ typeMetadata: {
44
+ schema: {
45
+ type: 'boolean'
46
+ }
47
+ }
48
+ },
49
+ isDisabled: {
50
+ defaultValue: false,
51
+ required: false,
52
+ typeMetadata: {
53
+ schema: {
54
+ type: 'boolean'
55
+ }
56
+ }
57
+ },
58
+ hoverType: {
59
+ defaultValue: 'default',
60
+ required: false,
61
+ typeMetadata: {
62
+ schema: {
63
+ type: 'string',
64
+ enum: ['default', 'border', 'bg']
65
+ }
66
+ }
67
+ },
68
+ title: {
69
+ defaultValue: '',
70
+ required: false,
71
+ typeMetadata: {
72
+ schema: {
73
+ type: 'string'
74
+ }
75
+ }
76
+ },
77
+ isBold: {
78
+ defaultValue: false,
79
+ required: false,
80
+ typeMetadata: {
81
+ schema: {
82
+ type: 'boolean'
83
+ }
84
+ }
85
+ }
86
+ };
@@ -0,0 +1,3 @@
1
+ export { default as IconButtonProperties } from "./Properties";
2
+ export { default as IconButtonEvents } from "./Events";
3
+ export { default as IconButtonConstants } from "./Constants";
@@ -74,6 +74,15 @@ export default {
74
74
  }
75
75
  }
76
76
  },
77
+ additionalDetails: {
78
+ required: false,
79
+ defaultValue: {},
80
+ typeMetadata: {
81
+ schema: {
82
+ type: 'object'
83
+ }
84
+ }
85
+ },
77
86
  fields: {
78
87
  required: false,
79
88
  typeMetadata: {
@@ -19,11 +19,11 @@ export default {
19
19
  },
20
20
  size: {
21
21
  required: true,
22
- defaultValue: "medium",
22
+ defaultValue: "small",
23
23
  typeMetadata: {
24
24
  schema: {
25
25
  type: "string",
26
- enum: ["small", "medium", "large", "xlarge"]
26
+ enum: ["small", "medium"]
27
27
  }
28
28
  }
29
29
  },
@@ -150,7 +150,7 @@ class EventManager {
150
150
  }
151
151
  }
152
152
 
153
- dispatchEvent(event) {
153
+ dispatchEvent(event, rootElement) {
154
154
  let {
155
155
  payload,
156
156
  metaData,
@@ -162,7 +162,7 @@ class EventManager {
162
162
  return;
163
163
  }
164
164
 
165
- this._element && this._element.dispatchEvent(new CustomEvent(type, {
165
+ rootElement && rootElement.dispatchEvent(new CustomEvent(type, {
166
166
  bubbles: true,
167
167
  detail: {
168
168
  payload,
@@ -6,6 +6,8 @@ import TableColumnChooser from "../../../../legacy-to-new-arch/table-column-choo
6
6
  import Checkbox from "../../../../legacy-to-new-arch/checkbox/frameworks/ui/Checkbox";
7
7
  import TableColumnFilter from "../../../../legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilter";
8
8
  import MoreDropdown from "../../../../legacy-to-new-arch/more-dropdown/frameworks/ui/MoreDropdown";
9
+ import Breadcrumb from "../../../../legacy-to-new-arch/breadcrumb/frameworks/ui/Breadcrumb";
10
+ import IconButton from "../../../../legacy-to-new-arch/icon-button/frameworks/ui/IconButton";
9
11
  const ActionComponentMapping = {
10
12
  ['ActionIcon']: ActionIcon,
11
13
  ['Button']: Button,
@@ -14,6 +16,8 @@ const ActionComponentMapping = {
14
16
  ['TableColumnSort']: TableColumnSort,
15
17
  ['TableColumnChooser']: TableColumnChooser,
16
18
  ['TableSelectAll']: Checkbox,
17
- ['TableColumnFilter']: TableColumnFilter
19
+ ['TableColumnFilter']: TableColumnFilter,
20
+ ['Breadcrumb']: Breadcrumb,
21
+ ['IconButton']: IconButton
18
22
  };
19
23
  export default ActionComponentMapping;
@@ -32,34 +32,75 @@ function updateFieldValues(_ref) {
32
32
  fields
33
33
  };
34
34
  });
35
- }
35
+ } // const footerLeftActions = [{
36
+ // component: 'Button',
37
+ // location: 'footer_left_actions',
38
+ // properties: {
39
+ // text: 'Submit',
40
+ // palette: 'primaryFilled'
41
+ // },
42
+ // eventMappings: [
43
+ // {
44
+ // payloadValueMapping: {},
45
+ // sourceEvent: "BUTTON#CLICKED",
46
+ // id: "1234567890",
47
+ // targetEvent: "FORM#SUBMIT"
48
+ // }
49
+ // ]
50
+ // },
51
+ // {
52
+ // component: 'Button',
53
+ // location: 'footer_left_actions',
54
+ // properties: {
55
+ // text: 'Cancel',
56
+ // palette: 'secondary'
57
+ // },
58
+ // eventMappings: []
59
+ // }];
36
60
 
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',
61
+
62
+ const headerLeftActions = [{
63
+ component: 'Breadcrumb',
51
64
  properties: {
52
- text: 'Cancel',
53
- palette: 'secondary'
65
+ items: [{
66
+ id: 'customization',
67
+ text: 'Customization',
68
+ isLink: true
69
+ }, {
70
+ id: 'buttons',
71
+ text: 'Buttons',
72
+ isLink: true
73
+ }, {
74
+ id: 'new-button',
75
+ text: 'New Button',
76
+ isActive: true
77
+ }, {
78
+ id: 'kakarot',
79
+ text: 'Kakarot',
80
+ iconName: 'ZD-GN-department'
81
+ }]
54
82
  },
55
83
  eventMappings: []
56
84
  }];
85
+ const headerRightActions = [{
86
+ component: 'IconButton',
87
+ properties: {
88
+ iconName: 'ZD-GN-infoStroke',
89
+ title: 'Help'
90
+ }
91
+ }];
57
92
  export function TransformState(state) {
58
93
  const {
59
94
  sections,
60
95
  isLoading,
61
96
  values,
62
- errorMessages
97
+ errorMessages,
98
+ isHeaderEnabled,
99
+ isFooterEnabled,
100
+ headerLeftActions,
101
+ headerRightActions,
102
+ footerLeftActions,
103
+ footerRightActions
63
104
  } = state.properties; // const { values, errorMessages } = state.behaviours.form;
64
105
 
65
106
  const updatedSections = updateFieldValues({
@@ -70,12 +111,14 @@ export function TransformState(state) {
70
111
  return { ...state,
71
112
  // properties: { ...state.properties, sections: updatedSections }
72
113
  viewModel: {
114
+ isHeaderEnabled,
115
+ isFooterEnabled,
73
116
  sections: updatedSections,
74
117
  isLoading,
75
- headerLeftActions: [],
76
- headerRightActions: [],
118
+ headerLeftActions,
119
+ headerRightActions,
77
120
  footerLeftActions,
78
- footerRightActions: []
121
+ footerRightActions
79
122
  }
80
123
  };
81
124
  }