@zohodesk/library-platform 1.1.8-exp.2 → 1.1.9-alpha.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 (200) hide show
  1. package/es/bc/zdata-source/Constants.js +6 -11
  2. package/es/bc/zrecord/Constants.js +10 -19
  3. package/es/cc/action-icon/Constants.js +3 -5
  4. package/es/cc/action-location/Constants.js +5 -9
  5. package/es/cc/avatar/Constants.js +3 -5
  6. package/es/cc/breadcrumb/Constants.js +3 -5
  7. package/es/cc/button/Constants.js +3 -5
  8. package/es/cc/checkbox/Constants.js +5 -9
  9. package/es/cc/date/Constants.js +5 -9
  10. package/es/cc/email/Constants.js +3 -5
  11. package/es/cc/fields/field/Constants.js +9 -13
  12. package/es/cc/form/Constants.js +6 -11
  13. package/es/cc/form-connected/Constants.js +10 -19
  14. package/es/cc/highlighted-value/Constants.js +3 -5
  15. package/es/cc/icon-button/Constants.js +3 -5
  16. package/es/cc/link/Constants.js +3 -5
  17. package/es/cc/list-item/Constants.js +3 -5
  18. package/es/cc/more-dropdown/Constants.js +3 -5
  19. package/es/cc/multi-select/Constants.js +5 -9
  20. package/es/cc/section/Constants.js +5 -9
  21. package/es/cc/select/Constants.js +6 -11
  22. package/es/cc/switch/Constants.js +3 -5
  23. package/es/cc/table-column-filter/Constants.js +5 -9
  24. package/es/cc/table-list/Constants.js +14 -27
  25. package/es/cc/table-list/model/index.js +5 -9
  26. package/es/cc/table-list/row/Constants.js +5 -9
  27. package/es/cc/tags/Constants.js +3 -5
  28. package/es/cc/tags/model/index.js +4 -7
  29. package/es/cc/text/Constants.js +3 -5
  30. package/es/cc/textarea/Constants.js +5 -9
  31. package/es/cc/textbox/Constants.js +6 -11
  32. package/es/library/behaviours/field-focus/frameworks/ui/EventHandlersFactory.js +1 -3
  33. package/es/library/behaviours/keyboard-controls/adapters/gateways/KeyboardHandler.js +0 -4
  34. package/es/library/behaviours/keyboard-controls/adapters/gateways/Repository.js +2 -10
  35. package/es/library/behaviours/keyboard-controls/adapters/gateways/Service.js +0 -14
  36. package/es/library/behaviours/keyboard-controls/adapters/presenters/Presenter.js +2 -11
  37. package/es/library/behaviours/list-selection/adapters/gateways/Repository.js +2 -8
  38. package/es/library/behaviours/list-selection/adapters/gateways/Service.js +0 -16
  39. package/es/library/behaviours/list-selection/adapters/presenters/Presenter.js +0 -8
  40. package/es/library/behaviours/local-storage/adapters/gateways/LocalStorageRepository.js +0 -6
  41. package/es/library/behaviours/local-storage/adapters/gateways/Service.js +0 -4
  42. package/es/library/behaviours/local-storage/adapters/presenters/Presenter.js +0 -8
  43. package/es/library/behaviours/local-storage/domain/entities/Storage.js +0 -4
  44. package/es/library/behaviours/sort-by/adapters/gateway/Repository.js +0 -6
  45. package/es/library/behaviours/sort-by/adapters/gateway/Service.js +0 -4
  46. package/es/library/behaviours/sort-by/adapters/presenter/Presenter.js +0 -8
  47. package/es/library/behaviours/table-column-resizer/adapters/gateways/Repository.js +0 -6
  48. package/es/library/behaviours/table-column-resizer/adapters/gateways/Service.js +0 -10
  49. package/es/library/behaviours/table-column-resizer/adapters/gateways/TableElementService.js +0 -8
  50. package/es/library/behaviours/table-column-resizer/adapters/presenters/AutoScroll.js +0 -12
  51. package/es/library/behaviours/table-column-resizer/adapters/presenters/Presenter.js +0 -8
  52. package/es/library/behaviours/table-column-resizer/domain/entities/ColumnResizer.js +0 -12
  53. package/es/library/behaviours/table-column-resizer/domain/entities/Mouse.js +0 -6
  54. package/es/library/behaviours/table-column-resizer/domain/entities/ResizeColumnCalculator.js +0 -12
  55. package/es/library/behaviours/table-column-resizer/domain/entities/ResizerAutoScrollCalculator.js +0 -6
  56. package/es/library/behaviours/table-column-resizer/domain/entities/ResizingColumn.js +0 -13
  57. package/es/library/behaviours/table-column-resizer/domain/entities/Table.js +0 -11
  58. package/es/library/behaviours/text-to-field-click/adapters/gateway/Repository.js +0 -6
  59. package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +2 -7
  60. package/es/library/custom-component/adapters/gateways/repository/Repository.js +1 -5
  61. package/es/library/custom-component/adapters/gateways/service/Service.js +0 -14
  62. package/es/library/custom-component/adapters/presenters/Presenter.js +0 -5
  63. package/es/library/custom-component/domain/entities/Behaviour.js +0 -11
  64. package/es/library/custom-component/domain/entities/Component.js +0 -24
  65. package/es/library/custom-component/domain/entities/Event.js +0 -7
  66. package/es/library/custom-component/domain/entities/EventHandler.js +0 -6
  67. package/es/library/custom-component/domain/entities/LifeCycleAction.js +0 -10
  68. package/es/library/custom-component/domain/entities/Payload.js +0 -6
  69. package/es/library/custom-component/domain/entities/Properties.js +0 -5
  70. package/es/library/custom-component/domain/entities/Property.js +0 -13
  71. package/es/library/custom-component/domain/entities/Schema.js +1 -5
  72. package/es/library/custom-component/domain/entities/State.js +0 -4
  73. package/es/library/custom-component/domain/entities/Style.js +0 -14
  74. package/es/library/custom-component/frameworks/ui/ComponentRegistry.js +3 -7
  75. package/es/library/custom-component/frameworks/ui/CreateCustomComponent.js +9 -26
  76. package/es/library/custom-component/frameworks/ui/CreateSlotComponent.js +4 -2
  77. package/es/library/custom-component/frameworks/ui/CustomComponentFactory.js +1 -1
  78. package/es/library/dot/components/action-location/adapters/gateway/Repository.js +0 -8
  79. package/es/library/dot/components/action-location/adapters/presenters/Presenter.js +0 -8
  80. package/es/library/dot/components/action-location/entities/ActionLocationEntity.js +2 -6
  81. package/es/library/dot/components/actions-renderer/frameworks/ui/ActionsRendererView.js +6 -4
  82. package/es/library/dot/components/form/frameworks/ui/__test__/Form.test.js +14 -20
  83. package/es/library/dot/components/form/frameworks/ui/sub-components/SectionsWithRightPanelLayout.js +1 -2
  84. package/es/library/dot/components/form-fields/field/__test__/common.js +18 -16
  85. package/es/library/dot/components/section/frameworks/ui/RenderField.js +5 -4
  86. package/es/library/dot/components/table-list/adapters/controllers/KeyboardRowClickController.js +1 -1
  87. package/es/library/dot/components/table-list/adapters/controllers/KeyboardRowSelectController.js +1 -1
  88. package/es/library/dot/components/table-list/adapters/presenters/TableTranslator.js +1 -1
  89. package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +6 -6
  90. package/es/library/dot/components/table-list/frameworks/ui/sub-components/field/FieldComponent.js +1 -2
  91. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +1 -1
  92. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.js +1 -1
  93. package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/DateView.js +1 -1
  94. package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/MultiSelectView.js +2 -2
  95. package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/SelectView.js +1 -1
  96. package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilterView.js +5 -3
  97. package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/TextAreaView.js +2 -2
  98. package/es/library/dot/legacy-to-new-arch/textbox/frameworks/ui/TextBoxView.js +1 -1
  99. package/es/library/slot/frameworks/ui/ConvertSlotToComponent.js +5 -4
  100. package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/MountController.js +15 -18
  101. package/es/platform/client-actions/behaviour/zclient-actions/adapters/gateways/Repository.js +0 -6
  102. package/es/platform/client-actions/behaviour/zclient-actions/adapters/gateways/Service.js +0 -16
  103. package/es/platform/client-actions/behaviour/zclient-actions/adapters/presenters/Presenter.js +0 -8
  104. package/es/platform/client-actions/behaviour/zclient-actions/adapters/resources/ClientActionResource.js +2 -4
  105. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/GetClientActionLocationUseCase.js +1 -1
  106. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/GetClientActionUIComponentPropertiesUseCase.js +1 -1
  107. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/GetClientActionsUseCase.js +1 -1
  108. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/UpdateClientActionUIComponentPropertiesUseCase.js +1 -1
  109. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientAction.js +0 -26
  110. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActions.js +0 -9
  111. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/EventMapping.js +0 -12
  112. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/EventMappings.js +0 -4
  113. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/UIComponentMapping.js +0 -14
  114. package/es/platform/client-actions/components/action-event-mediator/adapters/gateway/Repository.js +0 -8
  115. package/es/platform/client-actions/components/action-event-mediator/adapters/presenters/Presenter.js +0 -8
  116. package/es/platform/client-actions/components/action-event-mediator/domain/entities/ActionEventMediatorEntity.js +2 -10
  117. package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponentView.js +6 -4
  118. package/es/platform/column-chooser/adapters/gateways/Repository.js +0 -6
  119. package/es/platform/column-chooser/adapters/gateways/Service.js +0 -14
  120. package/es/platform/column-chooser/adapters/presenters/Presenter.js +0 -8
  121. package/es/platform/column-chooser/domain/entities/SelectEntityImp.js +0 -5
  122. package/es/platform/components/app/adapters/resources/AppResource.js +2 -0
  123. package/es/platform/components/form-connected/adapters/resources/SmartFormResources.js +2 -4
  124. package/es/platform/components/form-connected/frameworks/FormConnectedFactory.js +1 -1
  125. package/es/platform/components/table-connected/adapters/controllers/ResizeFinishController.js +3 -5
  126. package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +2 -4
  127. package/es/platform/components/table-connected/frameworks/TableConnectedFactory.js +1 -1
  128. package/es/platform/sdk/adapters/gateways/Repository.js +5 -9
  129. package/es/platform/sdk/adapters/gateways/Service.js +0 -14
  130. package/es/platform/sdk/adapters/presenters/Presenter.js +0 -6
  131. package/es/platform/sdk/application/interfaces/gateways/AbstractResource.js +0 -6
  132. package/es/platform/sdk/domain/entities/ResourceManager.js +3 -9
  133. package/es/platform/sdk/frameworks/Sdk.js +11 -1
  134. package/es/platform/sdk/frameworks/SdkRegistry.js +2 -8
  135. package/es/platform/sdk-behaviour/adapters/controllers/AbstractController.js +0 -4
  136. package/es/platform/sdk-behaviour/adapters/gateways/Repository.js +0 -8
  137. package/es/platform/sdk-behaviour/adapters/gateways/ResourceManagerGateWay.js +0 -6
  138. package/es/platform/sdk-behaviour/adapters/gateways/Service.js +0 -8
  139. package/es/platform/zdata-source/adapters/controllers/FailureController.js +26 -29
  140. package/es/platform/zdata-source/adapters/controllers/NoContentController.js +21 -24
  141. package/es/platform/zdata-source/adapters/controllers/RegisterController.js +17 -20
  142. package/es/platform/zdata-source/adapters/controllers/SuccessController.js +26 -29
  143. package/es/platform/zdata-source/adapters/gateways/Repository.js +0 -6
  144. package/es/platform/zdata-source/adapters/gateways/Service.js +0 -12
  145. package/es/platform/zdata-source/adapters/presenters/Presenter.js +1 -9
  146. package/es/platform/zdata-source/domain/entities/APITemplate.js +0 -16
  147. package/es/platform/zfield/adapters/gateways/Repository.js +0 -6
  148. package/es/platform/zfield/adapters/gateways/Service.js +0 -14
  149. package/es/platform/zfield/adapters/presenters/Presenter.js +0 -8
  150. package/es/platform/zfield/applications/entities-factory/FieldBuilder.js +0 -30
  151. package/es/platform/zfield/applications/entities-factory/FieldsManagerBuilder.js +0 -12
  152. package/es/platform/zform/adapters/gateway/FormRepository.js +0 -6
  153. package/es/platform/zform/adapters/gateway/Service.js +0 -38
  154. package/es/platform/zform/adapters/presenter/FormPresenter.js +0 -8
  155. package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +43 -34
  156. package/es/platform/zform/adapters/presenter/utils/DefaultClientActions.js +22 -15
  157. package/es/platform/zform/applications/usecases/GetFieldValueUseCase.js +1 -1
  158. package/es/platform/zform/applications/usecases/LookupFieldSuccessUseCase.js +1 -8
  159. package/es/platform/zform/applications/usecases/MyLayoutSuccessUseCase.js +1 -1
  160. package/es/platform/zform/domain/ZDependencyMapping.js +0 -17
  161. package/es/platform/zform/domain/ZField.js +0 -53
  162. package/es/platform/zform/domain/ZForm.js +1 -42
  163. package/es/platform/zform/domain/ZLayout.js +0 -14
  164. package/es/platform/zform/domain/ZLayoutRule.js +0 -31
  165. package/es/platform/zform/domain/ZSection.js +0 -19
  166. package/es/platform/zform/domain/ZValidationRule.js +0 -28
  167. package/es/platform/zform/frameworks/validation-rules/Validator.js +4 -8
  168. package/es/platform/zlist/adapters/gateways/Repository.js +0 -6
  169. package/es/platform/zlist/adapters/gateways/Service.js +0 -33
  170. package/es/platform/zlist/adapters/presenters/Presenters.js +0 -8
  171. package/es/platform/zlist/adapters/presenters/SelectionTranslator.js +1 -3
  172. package/es/platform/zlist/adapters/presenters/TableTranslator.js +4 -6
  173. package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +2 -6
  174. package/es/platform/zlist/adapters/presenters/translators/actions/ActionsTranslator.js +4 -15
  175. package/es/platform/zlist/adapters/presenters/utils/calculateFieldWidths.js +1 -3
  176. package/es/platform/zlist/applications/usecases/DeleteMultipleRecordUseCase.js +1 -3
  177. package/es/platform/zlist/applications/usecases/DeleteSingleRecordUseCase.js +1 -3
  178. package/es/platform/zlist/applications/usecases/GetContextUseCase.js +1 -1
  179. package/es/platform/zlist/applications/usecases/RecordSuccessCallbackUsecase.js +1 -3
  180. package/es/platform/zlist/applications/usecases/RecordUpdateUseCase.js +1 -3
  181. package/es/platform/zlist/applications/usecases/UpdateMultipleRecordUseCase.js +1 -3
  182. package/es/platform/zlist/domain/entities/List.js +1 -1
  183. package/es/platform/zrecord/adapters/controllers/AppendRecordsController.js +20 -23
  184. package/es/platform/zrecord/adapters/controllers/DeleteMultipleRecordLocalController.js +20 -23
  185. package/es/platform/zrecord/adapters/controllers/FailureController.js +26 -29
  186. package/es/platform/zrecord/adapters/controllers/FetchStateStopController.js +17 -20
  187. package/es/platform/zrecord/adapters/controllers/MountController.js +15 -18
  188. package/es/platform/zrecord/adapters/controllers/NoContentController.js +21 -24
  189. package/es/platform/zrecord/adapters/controllers/RefetchController.js +26 -29
  190. package/es/platform/zrecord/adapters/controllers/SetRecordsController.js +24 -27
  191. package/es/platform/zrecord/adapters/controllers/SuccessController.js +26 -29
  192. package/es/platform/zrecord/adapters/gateways/Repository.js +0 -6
  193. package/es/platform/zrecord/adapters/gateways/Service.js +0 -30
  194. package/es/platform/zrecord/adapters/presenters/Presenter.js +0 -8
  195. package/es/platform/zrecord/applications/usecases/GetMultipleRecordUseCase.js +1 -1
  196. package/es/platform/zrecord/applications/usecases/GetSingleRecordUseCase.js +1 -1
  197. package/es/platform/zrecord/domain/entities/CustomFieldValues.js +0 -4
  198. package/es/platform/zrecord/domain/entities/Record.js +0 -22
  199. package/es/platform/zrecord/domain/entities/Records.js +0 -11
  200. package/package.json +10 -14
@@ -1,10 +1,9 @@
1
1
  import { DefaultFormSectionUIType, fieldTypeToUIType } from "../../../../../cc/fields/field/FormDefaultUIType";
2
2
  import * as FieldTranslators from "./fields";
3
3
  import ClientActionsTranslator from "../../../../client-actions/translators/client-actions-translator";
4
+ import { getDefaultFieldEphiActionTemplate, getDefaultFieldInfoActionTemplate } from "../utils/DefaultClientActions";
4
5
 
5
6
  function SectionTranslator(_ref) {
6
- var _componentMapping$sec;
7
-
8
7
  let {
9
8
  section,
10
9
  componentMapping,
@@ -13,7 +12,7 @@ function SectionTranslator(_ref) {
13
12
  focusedFieldName,
14
13
  preferences
15
14
  } = _ref;
16
- const mapping = componentMapping === null || componentMapping === void 0 ? void 0 : (_componentMapping$sec = componentMapping.sections) === null || _componentMapping$sec === void 0 ? void 0 : _componentMapping$sec[section.name];
15
+ const mapping = componentMapping?.sections?.[section.name];
17
16
 
18
17
  const sectionVisibility = section => {
19
18
  let allFieldHidden = section.fields.every(field => !field.isVisible);
@@ -21,7 +20,7 @@ function SectionTranslator(_ref) {
21
20
  };
22
21
 
23
22
  const defaultViewModel = {
24
- type: mapping !== null && mapping !== void 0 && mapping.UIComponentName ? mapping.UIComponentName : DefaultFormSectionUIType,
23
+ type: mapping?.UIComponentName ? mapping.UIComponentName : DefaultFormSectionUIType,
25
24
  id: section.id + '',
26
25
  name: section.name,
27
26
  title: section.i18NLabel,
@@ -29,55 +28,65 @@ function SectionTranslator(_ref) {
29
28
  isCollapsed: section.isCollapsed,
30
29
  isVisible: section.isVisible && sectionVisibility(section),
31
30
  fields: section.fields.map(field => {
32
- var _componentMapping$fie, _preferences$fields;
33
-
34
31
  const fieldTranslator = FieldTranslators[field.type];
35
32
  const {
36
33
  UIComponentName,
37
34
  translator
38
- } = (componentMapping === null || componentMapping === void 0 ? void 0 : (_componentMapping$fie = componentMapping.fields) === null || _componentMapping$fie === void 0 ? void 0 : _componentMapping$fie[field.apiName]) || {};
35
+ } = componentMapping?.fields?.[field.apiName] || {};
39
36
  const type = UIComponentName || fieldTypeToUIType[field.type];
40
- const uiConfig = (preferences === null || preferences === void 0 ? void 0 : (_preferences$fields = preferences.fields) === null || _preferences$fields === void 0 ? void 0 : _preferences$fields[field.apiName]) || {
37
+ const uiConfig = preferences?.fields?.[field.apiName] || {
41
38
  size: 'small',
42
39
  breakRow: false
43
40
  };
44
- const transformedActions = {
41
+
42
+ const createEmptyActions = () => ({
45
43
  fieldLabelActions: [],
46
44
  fieldActions: []
47
- }; // Transform client actions
48
-
49
- Object.entries(fieldLevelActions).forEach(_ref2 => {
50
- let [key, value] = _ref2;
51
- let transformedAction = ClientActionsTranslator.transform(value, { ...context,
52
- ...field
53
- });
54
- transformedActions[key] = transformedAction;
55
- }); // Initialize fieldPreModified
45
+ }); // Create Action via Template
56
46
 
57
- const fieldPreModified = {};
58
- fieldPreModified['labelActions'] = [];
59
- fieldPreModified['actions'] = []; // Assigning fieldLabelActions to labelActions
60
47
 
61
- let labelActions = transformedActions.fieldLabelActions || []; // Ephi check
48
+ const defaultActions = createEmptyActions();
49
+ const ephiFields = ['Decimal', 'Email', 'Number', 'Percent', 'Phone', 'Text', 'URL'];
62
50
 
63
- if (field.isPHI === false) {
64
- labelActions = labelActions.filter(item => item.component !== "HighlightedValue");
65
- } // Info Icon check
51
+ if (field.toolTip && field.toolTipType === 'icon') {
52
+ defaultActions.fieldLabelActions.push(getDefaultFieldInfoActionTemplate({
53
+ label: field.toolTip,
54
+ fieldName: field.apiName
55
+ }));
56
+ } // console.log(field.type, field.toolTipType, field.toolTipType === 'icon', getDefaultFieldInfoActionTemplate({ label: field.toolTip, fieldName: field.apiName }));
66
57
 
67
58
 
68
- if (field.toolTip && field.toolTipType !== "icon" || !field.toolTipType) {
69
- labelActions = labelActions.filter(item => item.properties.label !== "Default Info Icon");
70
- } // Final labelActions to fieldPreModified
59
+ if (field.isPHI === true && ephiFields.includes(field.type)) {
60
+ defaultActions.fieldLabelActions.push(getDefaultFieldEphiActionTemplate({
61
+ fieldName: field.apiName
62
+ }));
63
+ } // Transform Default client actions
71
64
 
72
65
 
73
- fieldPreModified['labelActions'] = labelActions; // Final fieldActions to fieldPreModified
66
+ const transformedDefaultActions = createEmptyActions();
67
+ Object.entries(defaultActions).forEach(_ref2 => {
68
+ let [key, value] = _ref2;
69
+ let transformedDefaultAction = ClientActionsTranslator.transform(value, { ...context,
70
+ ...field
71
+ });
72
+ transformedDefaultActions[key] = transformedDefaultAction;
73
+ }); // Transform client actions
74
74
 
75
- if (field.type !== "Boolean") {
76
- fieldPreModified['actions'] = transformedActions.fieldActions;
77
- } // Placeholder check
75
+ const transformedActions = createEmptyActions();
76
+ Object.entries(fieldLevelActions).forEach(_ref3 => {
77
+ let [key, value] = _ref3;
78
+ let transformedAction = ClientActionsTranslator.transform(value, { ...context,
79
+ ...field
80
+ });
81
+ transformedActions[key] = transformedAction;
82
+ }); // Initialize fieldPreModified
78
83
 
84
+ const fieldPreModified = {};
85
+ fieldPreModified['labelActions'] = transformedDefaultActions.fieldLabelActions.concat(transformedActions.fieldLabelActions);
86
+ fieldPreModified['actions'] = transformedDefaultActions.fieldActions.concat(transformedActions.fieldActions);
87
+ const noPlaceHolderSupport = ['Boolean', 'Date', 'DateTime']; // Placeholder check
79
88
 
80
- if (field.toolTip && field.toolTipType === "placeholder") {
89
+ if (field.toolTip && field.toolTipType === "placeholder" && !noPlaceHolderSupport.includes(field.type)) {
81
90
  fieldPreModified["placeholder"] = field.toolTip;
82
91
  }
83
92
 
@@ -95,7 +104,7 @@ function SectionTranslator(_ref) {
95
104
  })
96
105
  };
97
106
 
98
- if (mapping !== null && mapping !== void 0 && mapping.translator) {
107
+ if (mapping?.translator) {
99
108
  return mapping.translator({
100
109
  section: defaultViewModel,
101
110
  context
@@ -7,22 +7,22 @@ export default function DefaultFormClientActions(props) {
7
7
  } = props;
8
8
  const finalClientActions = [];
9
9
 
10
- if (submitConfig !== null && submitConfig !== void 0 && submitConfig.isEnabled) {
10
+ if (submitConfig?.isEnabled) {
11
11
  finalClientActions.push(getDefaultFormAction({
12
12
  type: 'submit',
13
13
  ...submitConfig
14
14
  }));
15
15
  }
16
16
 
17
- if (cancelConfig !== null && cancelConfig !== void 0 && cancelConfig.isEnabled) {
17
+ if (cancelConfig?.isEnabled) {
18
18
  finalClientActions.push(getDefaultFormAction({
19
19
  type: 'cancel',
20
20
  ...cancelConfig
21
21
  }));
22
- }
22
+ } // finalClientActions.push(getDefaultFieldInfoAction());
23
+ // finalClientActions.push(getDefaultFieldEphiAction());
24
+
23
25
 
24
- finalClientActions.push(getDefaultFieldInfoAction());
25
- finalClientActions.push(getDefaultFieldEphiAction());
26
26
  return [...finalClientActions, ...clientActions];
27
27
  }
28
28
 
@@ -61,16 +61,21 @@ function getDefaultFormAction(_ref) {
61
61
  };
62
62
  }
63
63
 
64
- function getDefaultFieldInfoAction() {
64
+ export function getDefaultFieldInfoActionTemplate(props) {
65
+ const {
66
+ label,
67
+ fieldName
68
+ } = props;
65
69
  return {
66
70
  uiComponentMapping: {
67
71
  component: 'ActionIcon',
68
72
  name: 'Info Icon',
69
73
  id: '4000000081003',
70
74
  propertiesValueMapping: {
71
- hoverVariant: 'primary',
72
- icon: 'ZD-information',
73
- label: 'Default Info Icon'
75
+ hoverVariant: 'default',
76
+ icon: 'ZD-GN-info',
77
+ hasPadding: false,
78
+ label: label || 'Default Info Icon'
74
79
  },
75
80
  eventMappings: [{
76
81
  payloadValueMapping: {},
@@ -80,8 +85,8 @@ function getDefaultFieldInfoAction() {
80
85
  conditions: {
81
86
  fields: [{
82
87
  fieldName: '{{@context.apiName}}',
83
- condition: 'in',
84
- value: ['gadget_name', 'gadget_description', 'cf_total_qa_issues', 'cf_is_pm_reviewed_1', 'cf_related_gadget', 'priority', 'cf_tested_by', 'cf_security_dri', 'cf_git_merge_request_url', 'release_deadline', 'cf_tentative_eta', 'cf_mutation_coverage', 'cf_support_phone', 'cf_test_coverage_score', 'cf_budget_allocation', 'cf_brand_owner', 'cf_brand_launch_date', 'cf_marketing_channel']
88
+ condition: 'is',
89
+ value: [fieldName]
85
90
  }],
86
91
  pattern: '1'
87
92
  },
@@ -94,8 +99,10 @@ function getDefaultFieldInfoAction() {
94
99
  modules: ['static_module']
95
100
  };
96
101
  }
97
-
98
- function getDefaultFieldEphiAction() {
102
+ export function getDefaultFieldEphiActionTemplate(props) {
103
+ const {
104
+ fieldName
105
+ } = props;
99
106
  return {
100
107
  uiComponentMapping: {
101
108
  component: 'HighlightedValue',
@@ -114,8 +121,8 @@ function getDefaultFieldEphiAction() {
114
121
  conditions: {
115
122
  fields: [{
116
123
  fieldName: '{{@context.apiName}}',
117
- condition: 'in',
118
- value: ['gadget_name', 'cf_total_qa_issues', 'cf_security_dri', 'cf_git_merge_request_url', 'cf_mutation_coverage', 'cf_support_phone', 'cf_test_coverage_score', 'cf_brand_owner']
124
+ condition: 'is',
125
+ value: [fieldName]
119
126
  }],
120
127
  pattern: '1'
121
128
  },
@@ -15,7 +15,7 @@ class GetFieldValueUseCase extends AbstractUseCase {
15
15
  let fieldValue = zformEntitiy.getFieldValue(fieldName);
16
16
  let zform = zformEntitiy.toObject();
17
17
  presenter.updateFormResponse(zform);
18
- callback === null || callback === void 0 ? void 0 : callback(fieldValue);
18
+ callback?.(fieldValue);
19
19
  }
20
20
 
21
21
  }
@@ -1,14 +1,6 @@
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
1
  import AbstractUseCase from "./AbstractUseCase";
4
2
 
5
3
  class LookUpFieldSuccessUseCase extends AbstractUseCase {
6
- constructor() {
7
- super(...arguments);
8
-
9
- _defineProperty(this, "getSelectedFieldLookup", (currentData, LookupField) => currentData.apiName === LookupField);
10
- }
11
-
12
4
  execute(input) {
13
5
  const {
14
6
  repository,
@@ -30,6 +22,7 @@ class LookUpFieldSuccessUseCase extends AbstractUseCase {
30
22
  presenter.updateFormResponse(zform);
31
23
  }
32
24
 
25
+ getSelectedFieldLookup = (currentData, LookupField) => currentData.apiName === LookupField;
33
26
  }
34
27
 
35
28
  function hasMatchingApiName(listA, listB) {
@@ -17,7 +17,7 @@ class MyLayoutSuccessUseCase extends AbstractUseCase {
17
17
  let layoutObject = layouts.find(layout => layout.isDefaultLayout == true); // dispatch({type:ZFORM_MY_FORM_REQUEST,payload:{isFetching:true}})
18
18
 
19
19
  const zformEntity = this.dependencies.repository.getFormEntity();
20
- zformEntity.setLayoutId(layoutObject === null || layoutObject === void 0 ? void 0 : layoutObject.id);
20
+ zformEntity.setLayoutId(layoutObject?.id);
21
21
  const context = { ...zformEntity.getContext(),
22
22
  layoutId: zformEntity.getLayoutId()
23
23
  };
@@ -1,5 +1,3 @@
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
1
  export default class ZDependencyMapping {
4
2
  constructor(_ref) {
5
3
  let {
@@ -11,21 +9,6 @@ export default class ZDependencyMapping {
11
9
  parent,
12
10
  child
13
11
  } = _ref;
14
-
15
- _defineProperty(this, "parentId", void 0);
16
-
17
- _defineProperty(this, "childId", void 0);
18
-
19
- _defineProperty(this, "mappings", void 0);
20
-
21
- _defineProperty(this, "layoutId", void 0);
22
-
23
- _defineProperty(this, "id", void 0);
24
-
25
- _defineProperty(this, "parent", void 0);
26
-
27
- _defineProperty(this, "child", void 0);
28
-
29
12
  this.parentId = parentId;
30
13
  this.childId = childId;
31
14
  this.mappings = mappings;
@@ -1,5 +1,3 @@
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
1
  export default class ZField {
4
2
  constructor(_ref) {
5
3
  let {
@@ -28,57 +26,6 @@ export default class ZField {
28
26
  subType,
29
27
  lookup
30
28
  } = _ref;
31
-
32
- _defineProperty(this, "displayLabel", void 0);
33
-
34
- _defineProperty(this, "apiName", void 0);
35
-
36
- _defineProperty(this, "isCustomField", void 0);
37
-
38
- _defineProperty(this, "i18NLabel", void 0);
39
-
40
- _defineProperty(this, "isSystemMandatory", void 0);
41
-
42
- _defineProperty(this, "type", void 0);
43
-
44
- _defineProperty(this, "isReadOnly", void 0);
45
-
46
- _defineProperty(this, "name", void 0);
47
-
48
- _defineProperty(this, "isEncryptedField", void 0);
49
-
50
- _defineProperty(this, "id", void 0);
51
-
52
- _defineProperty(this, "isRemovable", void 0);
53
-
54
- _defineProperty(this, "maxLength", void 0);
55
-
56
- _defineProperty(this, "isMandatory", void 0);
57
-
58
- _defineProperty(this, "value", void 0);
59
-
60
- _defineProperty(this, "errorMessage", void 0);
61
-
62
- _defineProperty(this, "isVisible", void 0);
63
-
64
- _defineProperty(this, "decimalPlaces", void 0);
65
-
66
- _defineProperty(this, "pickListValues", void 0);
67
-
68
- _defineProperty(this, "defaultPickListValues", void 0);
69
-
70
- _defineProperty(this, "subType", void 0);
71
-
72
- _defineProperty(this, "toolTip", void 0);
73
-
74
- _defineProperty(this, "toolTipType", void 0);
75
-
76
- _defineProperty(this, "defaultValue", void 0);
77
-
78
- _defineProperty(this, "isPHI", void 0);
79
-
80
- _defineProperty(this, "lookup", void 0);
81
-
82
29
  this.displayLabel = displayLabel;
83
30
  this.apiName = apiName;
84
31
  this.isCustomField = isCustomField;
@@ -1,5 +1,3 @@
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
1
  export default class ZForm {
4
2
  /*hack*/
5
3
 
@@ -29,45 +27,6 @@ export default class ZForm {
29
27
  /*hack end*/
30
28
 
31
29
  } = _ref;
32
-
33
- _defineProperty(this, "modifiedTime", void 0);
34
-
35
- _defineProperty(this, "isStandardLayout", void 0);
36
-
37
- _defineProperty(this, "hasLogo", void 0);
38
-
39
- _defineProperty(this, "departmentId", void 0);
40
-
41
- _defineProperty(this, "module", void 0);
42
-
43
- _defineProperty(this, "layoutDisplayName", void 0);
44
-
45
- _defineProperty(this, "layoutDesc", void 0);
46
-
47
- _defineProperty(this, "isDefaultLayout", void 0);
48
-
49
- _defineProperty(this, "sections", void 0);
50
-
51
- _defineProperty(this, "validationRules", void 0);
52
-
53
- _defineProperty(this, "layoutRules", void 0);
54
-
55
- _defineProperty(this, "dependencyMappings", void 0);
56
-
57
- _defineProperty(this, "context", void 0);
58
-
59
- _defineProperty(this, "focusedFieldName", void 0);
60
-
61
- _defineProperty(this, "layoutId", void 0);
62
-
63
- _defineProperty(this, "isMyFormFetching", void 0);
64
-
65
- _defineProperty(this, "isDependencyFetching", void 0);
66
-
67
- _defineProperty(this, "isLayoutRulesFetching", void 0);
68
-
69
- _defineProperty(this, "isValidationRulesFetching", void 0);
70
-
71
30
  this.modifiedTime = modifiedTime;
72
31
  this.isStandardLayout = isStandardLayout;
73
32
  this.hasLogo = hasLogo;
@@ -366,7 +325,7 @@ export default class ZForm {
366
325
 
367
326
  getFieldValidateRules(fieldName, eventName) {
368
327
  const validationRules = this.validationRules.map(vr => vr.toObject());
369
- return validationRules.filter(vr => vr.fieldName === fieldName).filter(vr => vr.fieldConditions.every(condition => eventName ? condition !== null && condition !== void 0 && condition.executeOn ? condition.executeOn.includes(eventName) : false : true));
328
+ return validationRules.filter(vr => vr.fieldName === fieldName).filter(vr => vr.fieldConditions.every(condition => eventName ? condition?.executeOn ? condition.executeOn.includes(eventName) : false : true));
370
329
  }
371
330
 
372
331
  executeLayoutRules(layoutRuleHelper) {
@@ -1,19 +1,5 @@
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
1
  export default class ZLayout {
4
2
  constructor(departmentId, id, isDefaultLayout, isStandardLayout, layoutName, module) {
5
- _defineProperty(this, "departmentId", void 0);
6
-
7
- _defineProperty(this, "id", void 0);
8
-
9
- _defineProperty(this, "isDefaultLayout", void 0);
10
-
11
- _defineProperty(this, "isStandardLayout", void 0);
12
-
13
- _defineProperty(this, "layoutName", void 0);
14
-
15
- _defineProperty(this, "module", void 0);
16
-
17
3
  this.departmentId = departmentId;
18
4
  this.id = id;
19
5
  this.isDefaultLayout = isDefaultLayout;
@@ -1,5 +1,3 @@
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
1
  // ZLayoutRule Entity
4
2
  export default class ZLayoutRule {
5
3
  constructor(_ref) {
@@ -19,35 +17,6 @@ export default class ZLayoutRule {
19
17
  id,
20
18
  status
21
19
  } = _ref;
22
-
23
- _defineProperty(this, "displayLabel", void 0);
24
-
25
- _defineProperty(this, "fieldConditions", void 0);
26
-
27
- _defineProperty(this, "modifiedTime", void 0);
28
-
29
- _defineProperty(this, "fieldName", void 0);
30
-
31
- _defineProperty(this, "description", void 0);
32
-
33
- _defineProperty(this, "systemGenerated", void 0);
34
-
35
- _defineProperty(this, "layoutId", void 0);
36
-
37
- _defineProperty(this, "executeInHelpCentre", void 0);
38
-
39
- _defineProperty(this, "createdBy", void 0);
40
-
41
- _defineProperty(this, "name", void 0);
42
-
43
- _defineProperty(this, "createdTime", void 0);
44
-
45
- _defineProperty(this, "modifiedBy", void 0);
46
-
47
- _defineProperty(this, "id", void 0);
48
-
49
- _defineProperty(this, "status", void 0);
50
-
51
20
  this.displayLabel = displayLabel;
52
21
  this.fieldConditions = fieldConditions;
53
22
  this.modifiedTime = modifiedTime;
@@ -1,5 +1,3 @@
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
1
  export default class ZSection {
4
2
  // Optional field for description
5
3
  // private visibility:boolean;
@@ -15,23 +13,6 @@ export default class ZSection {
15
13
  // visibility
16
14
  isVisible
17
15
  } = _ref;
18
-
19
- _defineProperty(this, "name", void 0);
20
-
21
- _defineProperty(this, "i18NLabel", void 0);
22
-
23
- _defineProperty(this, "isCustomSection", void 0);
24
-
25
- _defineProperty(this, "description", void 0);
26
-
27
- _defineProperty(this, "isCollapsed", void 0);
28
-
29
- _defineProperty(this, "id", void 0);
30
-
31
- _defineProperty(this, "fields", void 0);
32
-
33
- _defineProperty(this, "isVisible", void 0);
34
-
35
16
  this.name = name;
36
17
  this.i18NLabel = i18NLabel;
37
18
  this.isCustomSection = isCustomSection;
@@ -1,33 +1,5 @@
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
1
  export default class ZValidationRule {
4
2
  constructor(validationRuleData) {
5
- _defineProperty(this, "displayLabel", void 0);
6
-
7
- _defineProperty(this, "fieldConditions", void 0);
8
-
9
- _defineProperty(this, "modifiedTime", void 0);
10
-
11
- _defineProperty(this, "fieldName", void 0);
12
-
13
- _defineProperty(this, "executeInHelpCentre", void 0);
14
-
15
- _defineProperty(this, "createdBy", void 0);
16
-
17
- _defineProperty(this, "createdTime", void 0);
18
-
19
- _defineProperty(this, "modifiedBy", void 0);
20
-
21
- _defineProperty(this, "id", void 0);
22
-
23
- _defineProperty(this, "systemGenerated", void 0);
24
-
25
- _defineProperty(this, "layoutId", void 0);
26
-
27
- _defineProperty(this, "status", void 0);
28
-
29
- _defineProperty(this, "isActive", void 0);
30
-
31
3
  this.displayLabel = validationRuleData.displayLabel;
32
4
  this.fieldConditions = validationRuleData.fieldConditions;
33
5
  this.modifiedTime = validationRuleData.modifiedTime;
@@ -1,12 +1,10 @@
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
1
  import getValidationRuleActionsData from "./validationRules";
4
2
  import * as defaultCustomValidators from "./DefaultCustomValidators"; //need to move to gateway in adapter
5
3
 
6
4
  export default class Validator {
7
- constructor() {
8
- _defineProperty(this, "customValidators", defaultCustomValidators);
9
- }
5
+ customValidators = defaultCustomValidators;
6
+
7
+ constructor() {}
10
8
 
11
9
  init(state) {
12
10
  this.customValidators = { ...defaultCustomValidators,
@@ -38,9 +36,7 @@ export default class Validator {
38
36
 
39
37
  function handleResult(result) {
40
38
  if (result && result.type === 'fail') {
41
- var _result$action;
42
-
43
- const errorMessage = typeof result.message === 'string' ? result.message : (_result$action = result.action) === null || _result$action === void 0 ? void 0 : _result$action.message;
39
+ const errorMessage = typeof result.message === 'string' ? result.message : result.action?.message;
44
40
  return {
45
41
  fieldName,
46
42
  actions: {
@@ -1,14 +1,8 @@
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
1
  import ListErrorState from "../../domain/entities/ListErrorState";
4
2
  import ListFactory from "../../applications/entities-factory/ListFactory";
5
3
  import SortBy from "../../domain/entities/SortBy";
6
4
 
7
5
  class Repository {
8
- constructor() {
9
- _defineProperty(this, "state", void 0);
10
- }
11
-
12
6
  init(state) {
13
7
  this.state = state;
14
8
  }
@@ -1,5 +1,3 @@
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
1
  import InitializeUseCase from "../../applications/usecases/InitializeUseCase";
4
2
  import PropertiesChangeUseCase from "../../applications/usecases/PropertiesChangeUseCase";
5
3
  import FetchMoreUseCase from "../../applications/usecases/FetchMoreUseCase";
@@ -19,37 +17,6 @@ import ReOrderFailedUseCase from "../../applications/usecases/ReOrderFailedUseCa
19
17
  class Service {
20
18
  constructor(dependencies) {
21
19
  this.dependencies = dependencies;
22
-
23
- _defineProperty(this, "initializeUseCase", void 0);
24
-
25
- _defineProperty(this, "propertiesChangeUseCase", void 0);
26
-
27
- _defineProperty(this, "fieldChangeUseCase", void 0);
28
-
29
- _defineProperty(this, "fetchMoreUseCase", void 0);
30
-
31
- _defineProperty(this, "deleteMultipleRecordUseCase", void 0);
32
-
33
- _defineProperty(this, "deleteSingleRecordUseCase", void 0);
34
-
35
- _defineProperty(this, "recordExecuteSucceededUseCase", void 0);
36
-
37
- _defineProperty(this, "recordSuccessCallbackUseCase", void 0);
38
-
39
- _defineProperty(this, "recordExecuteFailedUseCase", void 0);
40
-
41
- _defineProperty(this, "sortUseCase", void 0);
42
-
43
- _defineProperty(this, "recordUpdateUseCase", void 0);
44
-
45
- _defineProperty(this, "updateSuccessUseCase", void 0);
46
-
47
- _defineProperty(this, "deleteSuccessUseCase", void 0);
48
-
49
- _defineProperty(this, "reOrderUseCase", void 0);
50
-
51
- _defineProperty(this, "reOrderFailedUseCase", void 0);
52
-
53
20
  this.initializeUseCase = new InitializeUseCase(this.dependencies);
54
21
  this.propertiesChangeUseCase = new PropertiesChangeUseCase(this.dependencies);
55
22
  this.fetchMoreUseCase = new FetchMoreUseCase(this.dependencies);
@@ -1,12 +1,4 @@
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
1
  class Presenter {
4
- constructor() {
5
- _defineProperty(this, "updateState", void 0);
6
-
7
- _defineProperty(this, "state", void 0);
8
- }
9
-
10
2
  updateDependencies(state, updateState) {
11
3
  this.updateState = updateState;
12
4
  this.state = state;
@@ -52,8 +52,6 @@ function generateClientActions(selectionConfig, columnChooserConfig, hasAllSelec
52
52
  }
53
53
 
54
54
  function getColumnChooserProps(columnChooser) {
55
- var _context$modules, _context$modules$find;
56
-
57
55
  let availableFields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
58
56
  let context = arguments.length > 2 ? arguments[2] : undefined;
59
57
  let moduleName = arguments.length > 3 ? arguments[3] : undefined;
@@ -64,7 +62,7 @@ function getColumnChooserProps(columnChooser) {
64
62
  isMaxSelectionReached
65
63
  } = columnChooser;
66
64
  const fieldMap = mapFieldsToObject(availableFields);
67
- const disabledFieldName = (_context$modules = context.modules) === null || _context$modules === void 0 ? void 0 : (_context$modules$find = _context$modules.find(module => module.apiKey === moduleName)) === null || _context$modules$find === void 0 ? void 0 : _context$modules$find.nameField;
65
+ const disabledFieldName = context.modules?.find(module => module.apiKey === moduleName)?.nameField;
68
66
  const columnChooserOptions = fieldsOrder.map(fieldName => getOption(fieldMap[fieldName], !!selected[fieldName], disabledFieldName === fieldName));
69
67
  return {
70
68
  options: columnChooserOptions,