@zohodesk/library-platform 1.0.2 → 1.1.0-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 (332) hide show
  1. package/es/bc/list-selection/Properties.js +21 -12
  2. package/es/bc/sort-by/Properties.js +20 -15
  3. package/es/bc/table-column-resizer/Properties.js +1 -1
  4. package/es/bc/zhttp/Properties.js +11 -1
  5. package/es/bc/zlist/Properties.js +12 -3
  6. package/es/cc/action-icon/Model.js +6 -2
  7. package/es/cc/action-icon/Properties.js +18 -0
  8. package/es/cc/action-location/Properties.js +54 -3
  9. package/es/cc/component/properties/PropertiesConverter.js +23 -0
  10. package/es/cc/fields/field/Properties.js +9 -1
  11. package/es/cc/fields/field/Types.js +16 -16
  12. package/es/cc/fields/multi-select/Properties.js +1 -1
  13. package/es/cc/fields/pick-list/Properties.js +1 -1
  14. package/es/cc/table-connected/Properties.js +49 -45
  15. package/es/cc/table-list/Properties.js +79 -318
  16. package/es/cc/table-list/model/RowModel.js +2 -4
  17. package/es/cc/table-list/row/Properties.js +3 -11
  18. package/es/desk-frameworks/table-connected/frameworks/TableConnectedView.js +10 -11
  19. package/es/library/behaviours/list-selection/adapters/gateways/Repository.js +1 -1
  20. package/es/library/behaviours/list-selection/adapters/gateways/Service.js +5 -5
  21. package/es/library/behaviours/sort-by/adapters/gateway/Repository.js +1 -1
  22. package/es/library/behaviours/sort-by/adapters/gateway/Service.js +1 -1
  23. package/es/library/behaviours/sort-by/{entities → domain/entities}/SortBy.js +1 -1
  24. package/es/library/behaviours/sort-by/frameworks/ui/SortByBehaviourFactory.js +2 -2
  25. package/es/library/behaviours/text-to-field-click/adapters/gateway/Repository.js +1 -1
  26. package/es/library/behaviours/text-to-field-click/{entities → domain/entities}/FieldEventConverter.js +1 -1
  27. package/es/library/behaviours/text-to-field-click/frameworks/ui/EventHandlersFactory.js +1 -1
  28. package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +1 -1
  29. package/es/library/custom-component/adapters/gateways/service/Service.js +6 -6
  30. package/es/library/custom-component/{usecases → applications}/entities-factory/BehavioursFactory.js +1 -1
  31. package/es/library/custom-component/{usecases → applications}/entities-factory/ComponentFactory.js +3 -3
  32. package/es/library/custom-component/{usecases → applications}/entities-factory/EventHandlersFactory.js +1 -1
  33. package/es/library/custom-component/{usecases → applications}/entities-factory/PropertiesFactory.js +9 -3
  34. package/es/library/custom-component/{usecases/interactors → applications/usecases}/UnmountUseCase.js +1 -1
  35. package/es/library/custom-component/{entities → domain/entities}/Component.js +36 -7
  36. package/es/library/custom-component/{entities → domain/entities}/DefaultAppendToActionPayload.js +2 -2
  37. package/es/library/custom-component/{entities → domain/entities}/Properties.js +4 -5
  38. package/es/library/custom-component/frameworks/ui/__testcases__/CreateCustomComponent.spec.js +106 -0
  39. package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +5 -0
  40. package/es/library/dot/components/action-location/frameworks/ui/ActionLocationView.js +8 -29
  41. package/es/library/dot/components/actions-renderer/frameworks/ui/ActionsRenderer.js +9 -0
  42. package/es/library/dot/components/actions-renderer/frameworks/ui/ActionsRendererView.js +37 -0
  43. package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +3 -7
  44. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +5 -3
  45. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +11 -7
  46. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +3 -0
  47. package/es/library/dot/legacy-to-new-arch/action-icon/{ActionIcon.js → frameworks/ui/ActionIcon.js} +2 -2
  48. package/es/library/dot/legacy-to-new-arch/action-icon/{ActionIconView.js → frameworks/ui/ActionIconView.js} +11 -5
  49. package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/css/ActionIcon.module.css +3 -0
  50. package/es/library/dot/legacy-to-new-arch/index.js +1 -1
  51. package/es/platform/zdata-broker/adapters/gateways/Repository.js +1 -1
  52. package/es/platform/zdata-broker/adapters/gateways/Service.js +5 -5
  53. package/es/platform/zdata-broker/adapters/gateways/TemplateHelpers.js +21 -0
  54. package/es/platform/zdata-broker/{usecases → applications}/entities-factory/APITemplatesFactory.js +2 -2
  55. package/es/platform/zdata-broker/{usecases → applications}/entities-factory/DataBrokerFactory.js +1 -1
  56. package/es/platform/zdata-broker/applications/interfaces/gateways/ITemplateHelpers.js +1 -0
  57. package/es/platform/zdata-broker/{entities → domain/entities}/DataBroker.js +3 -3
  58. package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/MetaData.js +1 -1
  59. package/es/platform/zfield/adapters/gateways/Repository.js +1 -1
  60. package/es/platform/zfield/adapters/gateways/Service.js +6 -6
  61. package/es/platform/zfield/{usecases → applications}/entities-factory/FieldsManagerBuilder.js +1 -1
  62. package/es/platform/zfield/applications/interfaces/input/FetchInputModel.js +2 -0
  63. package/es/platform/zfield/{entities → domain/entities}/fields-manager/AvailableFieldsManager.js +2 -2
  64. package/es/platform/zfield/{entities → domain/entities}/fields-manager/FieldsManager.js +3 -3
  65. package/es/platform/zfield/{entities → domain/entities}/fields-manager/SelectedFieldsManager.js +2 -2
  66. package/es/platform/zfield/{entities → domain/entities}/interfaces/MetaData.js +1 -1
  67. package/es/platform/zhttp/frameworks/ActionsHandlerFactory.js +1 -1
  68. package/es/platform/zhttp/frameworks/ZHttpBehaviourFactory.js +2 -1
  69. package/es/platform/zlist/adapters/gateways/Repository.js +1 -1
  70. package/es/platform/zlist/adapters/gateways/Service.js +10 -10
  71. package/es/platform/zlist/adapters/presenters/TableTranslator.js +2 -1
  72. package/es/platform/zlist/adapters/presenters/translators/Row.js +5 -1
  73. package/es/platform/zlist/adapters/presenters/translators/RowActionTranslator.js +18 -11
  74. package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +3 -1
  75. package/es/platform/zlist/{usecases → applications}/entities-factory/ListFactory.js +1 -1
  76. package/es/platform/zlist/{entities → domain/entities}/List.js +3 -3
  77. package/es/platform/zrecord/adapters/gateways/Repository.js +1 -1
  78. package/es/platform/zrecord/adapters/gateways/Service.js +13 -13
  79. package/es/platform/zrecord/{usecases → applications}/entities-factory/RecordFactory.js +1 -1
  80. package/es/platform/zrecord/{usecases → applications}/entities-factory/RecordsManagerFactory.js +2 -2
  81. package/es/platform/zrecord/{entities → domain/entities}/DeleteMultipleRecordStrategy.js +1 -1
  82. package/es/platform/zrecord/{entities → domain/entities}/DeleteRecordStrategy.js +1 -1
  83. package/es/platform/zrecord/{entities → domain/entities}/GetRecordsStrategy.js +1 -1
  84. package/es/platform/zrecord/{entities → domain/entities}/RecordsManager.js +3 -3
  85. package/es/platform/zrecord/{entities → domain/entities}/UpdateRecordStrategy.js +1 -1
  86. package/es/platform/zrecord/domain/entities/interfaces/RecordModel.js +1 -0
  87. package/es/platform/zrecord/domain/entities/interfaces/RecordsModel.js +1 -0
  88. package/es/platform/zrecord/domain/entities/interfaces/StrategyMeta.js +1 -0
  89. package/package.json +10 -4
  90. package/es/cc/table-list/behaviour-properties/ResizerConfig.js +0 -18
  91. package/es/cc/table-list/behaviour-properties/SelectionConfig.js +0 -17
  92. package/es/cc/table-list/behaviour-properties/SortByConfig.js +0 -14
  93. package/es/cc/table-list/behaviour-properties/index.js +0 -3
  94. package/es/library/custom-component/entities/__tests__/Action.spec.js +0 -19
  95. package/es/library/custom-component/entities/__tests__/ActionHandlers.spec.js +0 -15
  96. package/es/library/custom-component/entities/__tests__/Behaviour.spec.js +0 -52
  97. package/es/library/custom-component/entities/__tests__/Component.spec.js +0 -109
  98. package/es/platform/zdata-broker/usecases/interfaces/gateways/ITemplateHelpers.js +0 -1
  99. package/es/platform/zfield/usecases/interfaces/gateways/ITemplateHelpers.js +0 -1
  100. package/es/platform/zfield/usecases/interfaces/input/FetchInputModel.js +0 -2
  101. /package/es/{library/behaviours/list-selection/entities/interfaces/IListItemSelection.js → cc/action-location/Action.js} +0 -0
  102. /package/es/{library/behaviours/list-selection/entities/interfaces/ListSelectionModel.js → cc/action-location/ActionLocation.js} +0 -0
  103. /package/es/{library/behaviours/list-selection/usecases/interfaces/UseCase.js → cc/table-list/data-types/RowAction.js} +0 -0
  104. /package/es/library/{custom-component/usecases → behaviours/list-selection/applications}/interfaces/UseCase.js +0 -0
  105. /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/UseCaseDependencies.js +0 -0
  106. /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/gateways/IRepository.js +0 -0
  107. /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/gateways/IService.js +0 -0
  108. /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/input/AllSelectionInputModel.js +0 -0
  109. /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/input/DestructInputModel.js +0 -0
  110. /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/input/InitializeInputModel.js +0 -0
  111. /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/input/RangeSelectionInputModel.js +0 -0
  112. /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/input/SelectionInputModel.js +0 -0
  113. /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/output/BehaviourStateModel.js +0 -0
  114. /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/output/IPresenter.js +0 -0
  115. /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
  116. /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/AllItemSelection.js +0 -0
  117. /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/Destruct.js +0 -0
  118. /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/Initialize.js +0 -0
  119. /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/ItemsSelection.js +0 -0
  120. /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/RangeSelection.js +0 -0
  121. /package/es/library/behaviours/list-selection/{entities → domain/entities}/ListItemSelection.js +0 -0
  122. /package/es/library/behaviours/{sort-by/entities/interfaces/ISortBy.js → list-selection/domain/entities/interfaces/IListItemSelection.js} +0 -0
  123. /package/es/library/behaviours/{sort-by/usecases/interfaces/UseCaseDependencies.js → list-selection/domain/entities/interfaces/ListSelectionModel.js} +0 -0
  124. /package/es/library/behaviours/{text-to-field-click/usecases → sort-by/applications}/interfaces/UseCaseDependencies.js +0 -0
  125. /package/es/library/behaviours/sort-by/{usecases → applications}/interfaces/gateways/IRepository.js +0 -0
  126. /package/es/library/behaviours/sort-by/{usecases → applications}/interfaces/gateways/IService.js +0 -0
  127. /package/es/library/behaviours/sort-by/{usecases → applications}/interfaces/input/SortByInputModel.js +0 -0
  128. /package/es/library/behaviours/sort-by/{usecases → applications}/interfaces/output/IPresenter.js +0 -0
  129. /package/es/library/behaviours/sort-by/{usecases → applications}/interfaces/output/SortByOutputModel.js +0 -0
  130. /package/es/library/behaviours/sort-by/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
  131. /package/es/library/behaviours/sort-by/{usecases/interactors → applications/usecases}/SortBy.js +0 -0
  132. /package/es/{platform/zlist/usecases/interfaces/gateways → library/behaviours/sort-by/domain/entities/interfaces}/ISortBy.js +0 -0
  133. /package/es/{platform/zlist/usecases → library/behaviours/text-to-field-click/applications}/interfaces/UseCaseDependencies.js +0 -0
  134. /package/es/library/behaviours/text-to-field-click/{usecases → applications}/interfaces/gateways/IRepository.js +0 -0
  135. /package/es/library/behaviours/text-to-field-click/{usecases → applications}/interfaces/input/ClickUseCaseInputModel.js +0 -0
  136. /package/es/library/behaviours/text-to-field-click/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
  137. /package/es/library/behaviours/text-to-field-click/{usecases/interactors → applications/usecases}/ClickUseCase.js +0 -0
  138. /package/es/library/behaviours/text-to-field-click/{entities → domain/entities}/interfaces/IFieldEventConverter.js +0 -0
  139. /package/es/library/custom-component/{usecases → applications}/interfaces/InputDependencies.js +0 -0
  140. /package/es/library/custom-component/{usecases → applications}/interfaces/OutputDependencies.js +0 -0
  141. /package/es/{platform/zhttp/usecases → library/custom-component/applications}/interfaces/UseCase.js +0 -0
  142. /package/es/library/custom-component/{usecases → applications}/interfaces/gateways/IEventManager.js +0 -0
  143. /package/es/library/custom-component/{usecases → applications}/interfaces/gateways/IJSONValidator.js +0 -0
  144. /package/es/library/custom-component/{usecases → applications}/interfaces/gateways/IRepository.js +0 -0
  145. /package/es/library/custom-component/{usecases → applications}/interfaces/gateways/IService.js +0 -0
  146. /package/es/library/custom-component/{usecases → applications}/interfaces/input/DispatchInputModel.js +0 -0
  147. /package/es/library/custom-component/{usecases → applications}/interfaces/input/InitailizeInputModel.js +0 -0
  148. /package/es/library/custom-component/{usecases → applications}/interfaces/input/UpdatePropertiesInputModel.js +0 -0
  149. /package/es/library/custom-component/{usecases → applications}/interfaces/input/UpdateStateInputModel.js +0 -0
  150. /package/es/library/custom-component/{usecases → applications}/interfaces/output/OutputBoundary.js +0 -0
  151. /package/es/library/custom-component/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
  152. /package/es/library/custom-component/{usecases/interactors → applications/usecases}/DispatchUseCase.js +0 -0
  153. /package/es/library/custom-component/{usecases/interactors → applications/usecases}/InitializeUseCase.js +0 -0
  154. /package/es/library/custom-component/{usecases/interactors → applications/usecases}/MountUseCase.js +0 -0
  155. /package/es/library/custom-component/{usecases/interactors → applications/usecases}/UpdatePropertyUseCase.js +0 -0
  156. /package/es/library/custom-component/{usecases/interactors → applications/usecases}/UpdateStateUseCase.js +0 -0
  157. /package/es/library/custom-component/{entities → domain/entities}/Behaviour.js +0 -0
  158. /package/es/library/custom-component/{entities → domain/entities}/EventHandler.js +0 -0
  159. /package/es/library/custom-component/{entities → domain/entities}/EventHandlers.js +0 -0
  160. /package/es/library/custom-component/{entities → domain/entities}/Events.js +0 -0
  161. /package/es/library/custom-component/{entities → domain/entities}/LifeCycleAction.js +0 -0
  162. /package/es/library/custom-component/{entities → domain/entities}/Payload.js +0 -0
  163. /package/es/library/custom-component/{entities → domain/entities}/Property.js +0 -0
  164. /package/es/library/custom-component/{entities → domain/entities}/Schema.js +0 -0
  165. /package/es/library/custom-component/{entities → domain/entities}/State.js +0 -0
  166. /package/es/library/custom-component/{entities → domain/entities}/Style.js +0 -0
  167. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IBehaviour.js +0 -0
  168. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IComponent.js +0 -0
  169. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IEvent.js +0 -0
  170. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IEventHandler.js +0 -0
  171. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IEventHandlerHelpers.js +0 -0
  172. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IEventHandlers.js +0 -0
  173. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IEventWrapper.js +0 -0
  174. /package/es/library/custom-component/{entities → domain/entities}/interfaces/ILifeCycleAction.js +0 -0
  175. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IPayload.js +0 -0
  176. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IProperties.js +0 -0
  177. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IProperty.js +0 -0
  178. /package/es/library/custom-component/{entities → domain/entities}/interfaces/ISchema.js +0 -0
  179. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IState.js +0 -0
  180. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IStyle.js +0 -0
  181. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IUpdateHelper.js +0 -0
  182. /package/es/library/custom-component/{entities → domain/entities}/interfaces/IValidator.js +0 -0
  183. /package/es/platform/zdata-broker/{usecases → applications}/interfaces/InputDependencies.js +0 -0
  184. /package/es/platform/zdata-broker/{usecases → applications}/interfaces/gateways/IRepository.js +0 -0
  185. /package/es/platform/zdata-broker/{usecases → applications}/interfaces/gateways/IService.js +0 -0
  186. /package/es/platform/zdata-broker/{usecases → applications}/interfaces/gateways/State.js +0 -0
  187. /package/es/platform/zdata-broker/{usecases → applications}/interfaces/input/ExecuteActionInputModel.js +0 -0
  188. /package/es/platform/zdata-broker/{usecases → applications}/interfaces/input/FailureInputModel.js +0 -0
  189. /package/es/platform/zdata-broker/{usecases → applications}/interfaces/input/NoContentInputModel.js +0 -0
  190. /package/es/platform/zdata-broker/{usecases → applications}/interfaces/input/RegisterInputModel.js +0 -0
  191. /package/es/platform/zdata-broker/{usecases → applications}/interfaces/input/SuccessInputModel.js +0 -0
  192. /package/es/platform/zdata-broker/{usecases → applications}/interfaces/output/IPresenter.js +0 -0
  193. /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
  194. /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/ExecuteActionUseCase.js +0 -0
  195. /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/FailureUseCase.js +0 -0
  196. /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/NoContentUseCase.js +0 -0
  197. /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/RegisterUseCase.js +0 -0
  198. /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/SuccessUseCase.js +0 -0
  199. /package/es/platform/zdata-broker/{entities → domain/entities}/APITemplate.js +0 -0
  200. /package/es/platform/zdata-broker/{entities → domain/entities}/APITemplates.js +0 -0
  201. /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/APIDetailsModel.js +0 -0
  202. /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/APITemplateModel.js +0 -0
  203. /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/APITemplatesModel.js +0 -0
  204. /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/ApiEnum.js +0 -0
  205. /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/BehaviourState.js +0 -0
  206. /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/EventModel.js +0 -0
  207. /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/IAPITemplate.js +0 -0
  208. /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/IAPITemplates.js +0 -0
  209. /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/IDataBroker.js +0 -0
  210. /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/ITemplateHelpers.js +0 -0
  211. /package/es/platform/zfield/{usecases → applications}/entities-factory/FieldBuilder.js +0 -0
  212. /package/es/platform/zfield/{usecases → applications}/entities-factory/FieldFactory.js +0 -0
  213. /package/es/platform/zfield/{usecases → applications}/interfaces/UsecaseDependencies.js +0 -0
  214. /package/es/platform/zfield/{usecases → applications}/interfaces/gateways/IRepository.js +0 -0
  215. /package/es/platform/zfield/{usecases → applications}/interfaces/gateways/IRestApi.js +0 -0
  216. /package/es/platform/zfield/{usecases → applications}/interfaces/gateways/IService.js +0 -0
  217. /package/es/platform/zfield/{usecases → applications}/interfaces/input/ExecuteActionInputModel.js +0 -0
  218. /package/es/platform/zfield/{usecases → applications}/interfaces/input/InitialInputModel.js +0 -0
  219. /package/es/platform/zfield/{usecases → applications}/interfaces/input/InputModel.js +0 -0
  220. /package/es/platform/zfield/{usecases → applications}/interfaces/input/RefetchInputModel.js +0 -0
  221. /package/es/platform/zfield/{usecases → applications}/interfaces/input/SetValueInputModel.js +0 -0
  222. /package/es/platform/zfield/{usecases → applications}/interfaces/output/IPresenter.js +0 -0
  223. /package/es/platform/zfield/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
  224. /package/es/platform/zfield/{usecases/interactors → applications/usecases}/ExecuteActionUseCase.js +0 -0
  225. /package/es/platform/zfield/{usecases/interactors → applications/usecases}/FetchFailureUseCase.js +0 -0
  226. /package/es/platform/zfield/{usecases/interactors → applications/usecases}/FetchNoContentUseCase.js +0 -0
  227. /package/es/platform/zfield/{usecases/interactors → applications/usecases}/FetchSuccessUseCase.js +0 -0
  228. /package/es/platform/zfield/{usecases/interactors → applications/usecases}/InitializeUseCase.js +0 -0
  229. /package/es/platform/zfield/{usecases/interactors → applications/usecases}/RefetchUseCase.js +0 -0
  230. /package/es/platform/zfield/{entities → domain/entities}/BooleanField.js +0 -0
  231. /package/es/platform/zfield/{entities → domain/entities}/CurrencyField.js +0 -0
  232. /package/es/platform/zfield/{entities → domain/entities}/DateField.js +0 -0
  233. /package/es/platform/zfield/{entities → domain/entities}/DateTimeField.js +0 -0
  234. /package/es/platform/zfield/{entities → domain/entities}/EmailField.js +0 -0
  235. /package/es/platform/zfield/{entities → domain/entities}/Field.js +0 -0
  236. /package/es/platform/zfield/{entities → domain/entities}/LookupField.js +0 -0
  237. /package/es/platform/zfield/{entities → domain/entities}/MultiLineField.js +0 -0
  238. /package/es/platform/zfield/{entities → domain/entities}/MultiSelectField.js +0 -0
  239. /package/es/platform/zfield/{entities → domain/entities}/PercentageField.js +0 -0
  240. /package/es/platform/zfield/{entities → domain/entities}/PhoneField.js +0 -0
  241. /package/es/platform/zfield/{entities → domain/entities}/PickListField.js +0 -0
  242. /package/es/platform/zfield/{entities → domain/entities}/SingleLineField.js +0 -0
  243. /package/es/platform/zfield/{entities → domain/entities}/URLField.js +0 -0
  244. /package/es/platform/zfield/{entities → domain/entities}/index.js +0 -0
  245. /package/es/platform/zfield/{entities → domain/entities}/interfaces/ActionModel.js +0 -0
  246. /package/es/platform/zfield/{entities → domain/entities}/interfaces/BehaviourState.js +0 -0
  247. /package/es/platform/zfield/{entities → domain/entities}/interfaces/FieldApiName.js +0 -0
  248. /package/es/platform/zfield/{entities → domain/entities}/interfaces/FieldModel.js +0 -0
  249. /package/es/platform/zfield/{entities → domain/entities}/interfaces/IField.js +0 -0
  250. /package/es/platform/zfield/{entities → domain/entities}/interfaces/IFieldManger.js +0 -0
  251. /package/es/platform/zhttp/{usecases → applications}/interfaces/InputDependencies.js +0 -0
  252. /package/es/platform/zhttp/{usecases/interfaces/gateway/IFetchGateWay.js → applications/interfaces/UseCase.js} +0 -0
  253. /package/es/platform/zhttp/{usecases/interfaces/input/FetchInputModel.js → applications/interfaces/gateway/IFetchGateWay.js} +0 -0
  254. /package/es/platform/{zlist/entities/interfaces/ActionModel.js → zhttp/applications/interfaces/input/FetchInputModel.js} +0 -0
  255. /package/es/platform/zhttp/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
  256. /package/es/platform/zhttp/{usecases/interactors → applications/usecases}/FetchUseCase.js +0 -0
  257. /package/es/platform/zlist/{usecases → applications}/interfaces/State.js +0 -0
  258. /package/es/platform/zlist/{entities/interfaces/ApiPropsModel.js → applications/interfaces/UseCaseDependencies.js} +0 -0
  259. /package/es/platform/zlist/{usecases → applications}/interfaces/gateways/IRepository.js +0 -0
  260. /package/es/platform/zlist/{usecases → applications}/interfaces/gateways/IService.js +0 -0
  261. /package/es/platform/zlist/{entities/interfaces/IList.js → applications/interfaces/gateways/ISortBy.js} +0 -0
  262. /package/es/platform/zlist/{usecases → applications}/interfaces/gateways/ITransformState.js +0 -0
  263. /package/es/platform/zlist/{usecases → applications}/interfaces/input/DeleteMultipleRecordUseCaseInput.js +0 -0
  264. /package/es/platform/zlist/{usecases → applications}/interfaces/input/DeleteSingleRecordUseCaseInput.js +0 -0
  265. /package/es/platform/zlist/{usecases → applications}/interfaces/input/FetchMoreInput.js +0 -0
  266. /package/es/platform/zlist/{usecases → applications}/interfaces/input/FieldChangeUseCaseInput.js +0 -0
  267. /package/es/platform/zlist/{usecases → applications}/interfaces/input/InitializeInput.js +0 -0
  268. /package/es/platform/zlist/{usecases → applications}/interfaces/input/PropertiesChangeUseCaseInput.js +0 -0
  269. /package/es/platform/zlist/{usecases → applications}/interfaces/input/RecordExecuteFailedUseCaseInput.js +0 -0
  270. /package/es/platform/zlist/{usecases → applications}/interfaces/input/RecordExecuteSucceededUseCaseInput.js +0 -0
  271. /package/es/platform/zlist/{usecases → applications}/interfaces/input/RecordUpdateUseCaseInput.js +0 -0
  272. /package/es/platform/zlist/{usecases → applications}/interfaces/input/SortingInputModel.js +0 -0
  273. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
  274. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/DeleteMultipleRecordUseCase.js +0 -0
  275. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/DeleteSingleRecordUseCase.js +0 -0
  276. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/FetchMoreUseCase.js +0 -0
  277. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/FieldChangeUseCase.js +0 -0
  278. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/InitializeUseCase.js +0 -0
  279. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/PropertiesChangeUseCase.js +0 -0
  280. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/RecordExecuteFailedUseCase.js +0 -0
  281. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/RecordExecuteSucceededUseCase.js +0 -0
  282. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/RecordUpdateUseCase.js +0 -0
  283. /package/es/platform/zlist/{usecases/interactors → applications/usecases}/SortUseCase.js +0 -0
  284. /package/es/platform/zlist/{entities/interfaces/Properties.js → domain/entities/interfaces/ActionModel.js} +0 -0
  285. /package/es/platform/zlist/{entities/interfaces/RecordExecuteAfterMetaData.js → domain/entities/interfaces/ApiPropsModel.js} +0 -0
  286. /package/es/platform/{zrecord/entities/interfaces/BehaviourState.js → zlist/domain/entities/interfaces/IList.js} +0 -0
  287. /package/es/platform/{zrecord/entities/interfaces/EventModel.js → zlist/domain/entities/interfaces/Properties.js} +0 -0
  288. /package/es/platform/{zrecord/entities/interfaces/ICustomFieldValues.js → zlist/domain/entities/interfaces/RecordExecuteAfterMetaData.js} +0 -0
  289. /package/es/platform/zrecord/{usecases → applications}/interfaces/InputDependencies.js +0 -0
  290. /package/es/platform/zrecord/{usecases → applications}/interfaces/gateways/IRepository.js +0 -0
  291. /package/es/platform/zrecord/{usecases → applications}/interfaces/gateways/IService.js +0 -0
  292. /package/es/platform/zrecord/{usecases → applications}/interfaces/gateways/State.js +0 -0
  293. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/AppendRecordsInputModel.js +0 -0
  294. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/DeleteMultipleRecordInputModel.js +0 -0
  295. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/ExecuteActionInputModel.js +0 -0
  296. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/FailureInputModel.js +0 -0
  297. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/FetchMoreInputModel.js +0 -0
  298. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/FetchStateStopInputModel.js +0 -0
  299. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/FieldChangeUseCaseInput.js +0 -0
  300. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/InitializeInputModel.js +0 -0
  301. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/NoContentInputModel.js +0 -0
  302. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/RecordUpdateLocalUseCaseInputModel.js +0 -0
  303. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/RefetchInputModel.js +0 -0
  304. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/SetRecordsInputModel.js +0 -0
  305. /package/es/platform/zrecord/{usecases → applications}/interfaces/input/SuccessInputModel.js +0 -0
  306. /package/es/platform/zrecord/{usecases → applications}/interfaces/output/IPresenter.js +0 -0
  307. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
  308. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/AppendRecordsUseCase.js +0 -0
  309. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/DeleteMultipleRecordUseCase.js +0 -0
  310. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/ExecuteActionUseCase.js +0 -0
  311. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/FailureUseCase.js +0 -0
  312. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/FetchMoreUseCase.js +0 -0
  313. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/FetchStateStopUseCase.js +0 -0
  314. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/FieldChangeUseCase.js +0 -0
  315. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/InitializeUseCase.js +0 -0
  316. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/NoContentUseCase.js +0 -0
  317. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/RecordUpdateLocalUseCase.js +0 -0
  318. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/RefetchUseCase.js +0 -0
  319. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/SetRecordsUseCase.js +0 -0
  320. /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/SuccessUseCase.js +0 -0
  321. /package/es/platform/zrecord/{entities → domain/entities}/CustomFieldValues.js +0 -0
  322. /package/es/platform/zrecord/{entities → domain/entities}/Record.js +0 -0
  323. /package/es/platform/zrecord/{entities → domain/entities}/Records.js +0 -0
  324. /package/es/platform/zrecord/{entities → domain/entities}/interfaces/ApiEnum.js +0 -0
  325. /package/es/platform/zrecord/{entities/interfaces/IRecordName.js → domain/entities/interfaces/BehaviourState.js} +0 -0
  326. /package/es/platform/zrecord/{entities/interfaces/RecordModel.js → domain/entities/interfaces/EventModel.js} +0 -0
  327. /package/es/platform/zrecord/{entities/interfaces/RecordsModel.js → domain/entities/interfaces/ICustomFieldValues.js} +0 -0
  328. /package/es/platform/zrecord/{entities → domain/entities}/interfaces/IRecord.js +0 -0
  329. /package/es/platform/zrecord/{entities → domain/entities}/interfaces/IRecordExecuteStrategy.js +0 -0
  330. /package/es/platform/zrecord/{entities/interfaces/StrategyMeta.js → domain/entities/interfaces/IRecordName.js} +0 -0
  331. /package/es/platform/zrecord/{entities → domain/entities}/interfaces/IRecords.js +0 -0
  332. /package/es/platform/zrecord/{entities → domain/entities}/interfaces/IRecordsManager.js +0 -0
@@ -1,4 +1,4 @@
1
- import Behaviour from "../../entities/Behaviour";
1
+ import Behaviour from "../../domain/entities/Behaviour";
2
2
  import EventHandlersFactory from "./EventHandlersFactory";
3
3
  import PropertiesFactory from "./PropertiesFactory";
4
4
  /* eslint-disable max-lines-per-function, @zohodesk/architecturerules/no-returnStatement-rule */
@@ -1,6 +1,6 @@
1
- import Component from "../../entities/Component";
2
- import LifeCycleAction from "../../entities/LifeCycleAction";
3
- import State from "../../entities/State";
1
+ import Component from "../../domain/entities/Component";
2
+ import LifeCycleAction from "../../domain/entities/LifeCycleAction";
3
+ import State from "../../domain/entities/State";
4
4
  import EventHandlersFactory from "./EventHandlersFactory";
5
5
  import BehavioursFactory from "./BehavioursFactory";
6
6
  import PropertiesFactory from "./PropertiesFactory";
@@ -1,4 +1,4 @@
1
- import EventHandlers from "../../entities/EventHandlers";
1
+ import EventHandlers from "../../domain/entities/EventHandlers";
2
2
  export default function EventHandlersFactory(eventHandlers) {
3
3
  let eventHandlerMap = new Map();
4
4
  Object.keys(eventHandlers).forEach(key => {
@@ -1,5 +1,5 @@
1
- import Properties from "../../entities/Properties";
2
- import Property from "../../entities/Property";
1
+ import Properties from "../../domain/entities/Properties";
2
+ import Property from "../../domain/entities/Property";
3
3
  export default function PropertiesFactory(_ref) {
4
4
  let {
5
5
  properties,
@@ -7,7 +7,13 @@ export default function PropertiesFactory(_ref) {
7
7
  } = _ref;
8
8
  let propertyMap = new Map();
9
9
  Object.keys(properties).forEach(key => {
10
- let property = new Property(properties[key]);
10
+ let propertyData = properties[key];
11
+
12
+ if (propertyData.name === undefined) {
13
+ propertyData.name = key;
14
+ }
15
+
16
+ let property = new Property(propertyData);
11
17
  propertyMap.set(key, property);
12
18
  });
13
19
  let propertiesObject = new Properties(propertyMap, componentName);
@@ -12,8 +12,8 @@ class UnmountUsecase extends AbstractUseCase {
12
12
  let unmountAction = component.getUnmountAction();
13
13
 
14
14
  try {
15
- eventManager.unSubscribe(eventHanlders);
16
15
  eventManager.dispatch(unmountAction);
16
+ eventManager.unSubscribe(eventHanlders);
17
17
  repository.clear();
18
18
  } catch (e) {
19
19
  presenter.setError([]);
@@ -28,9 +28,19 @@ export default class Component {
28
28
  this._behavioursProperties = {};
29
29
  }
30
30
 
31
+ getAllBehavioursPropertiesWithValue() {
32
+ let output = {};
33
+ Object.keys(this._behavioursProperties).forEach((value, key) => {
34
+ output[value] = this._behavioursProperties[value].getValue();
35
+ });
36
+ return output;
37
+ }
38
+
31
39
  mergeStateAndProps() {
32
40
  return { ...this._state.getState(),
33
- properties: this._properties.getAllPropertiesValue()
41
+ properties: { ...this._properties.getAllPropertiesValue(),
42
+ ...this.getAllBehavioursPropertiesWithValue()
43
+ }
34
44
  };
35
45
  }
36
46
 
@@ -103,17 +113,30 @@ export default class Component {
103
113
  if (this._behavioursProperties[key]) {
104
114
  let property = this._behavioursProperties[key];
105
115
  let optionalSchema = property.getTypeMetadata().schema;
106
- return this._properties.validateSingleProperty(jsonValidator, key, newProps[key], optionalSchema);
116
+
117
+ let isValid = this._properties.validateSingleProperty(jsonValidator, key, newProps[key], optionalSchema);
118
+
119
+ if (isValid) {
120
+ property.updateValue(newProps[key]);
121
+ } // return isValid
122
+
107
123
  } else if (this._properties.findProperty(key)) {
108
124
  let property = this._properties.findProperty(key);
109
125
 
110
126
  let schema = property.getTypeMetadata().schema;
111
- return this._properties.validateSingleProperty(jsonValidator, key, newProps[key], schema);
127
+
128
+ let isValid = this._properties.validateSingleProperty(jsonValidator, key, newProps[key], schema);
129
+
130
+ if (isValid) {
131
+ property.updateValue(newProps[key]);
132
+ } // return isValid
133
+
112
134
  } else {
113
135
  throw new Error(`props '${key}' not exist `);
114
136
  }
115
- });
116
- return this._properties.updateAllPropertiesValue(jsonValidator, newProps);
137
+ }); // return this._properties.updateAllPropertiesValue(jsonValidator, newProps);
138
+
139
+ return true;
117
140
  }
118
141
 
119
142
  updateState(state) {
@@ -137,10 +160,14 @@ export default class Component {
137
160
 
138
161
  const properties = this._properties.getAllPropertiesValue();
139
162
 
163
+ const behavioursProperties = this.getAllBehavioursPropertiesWithValue();
140
164
  const behaviours = this.getAllBehavioursInitialState();
165
+ let allProperties = { ...properties,
166
+ ...behavioursProperties
167
+ };
141
168
 
142
169
  const initialState = this._stateInitializer({
143
- properties
170
+ properties: allProperties
144
171
  });
145
172
 
146
173
  this.updateState({ ...initialState,
@@ -149,7 +176,9 @@ export default class Component {
149
176
  }
150
177
 
151
178
  getProperties() {
152
- return this._properties.getAllPropertiesValue();
179
+ return { ...this._properties.getAllPropertiesValue(),
180
+ ...this.getAllBehavioursPropertiesWithValue()
181
+ };
153
182
  }
154
183
 
155
184
  getEventHandlersWrapper() {
@@ -1,10 +1,10 @@
1
1
  export default {
2
- name: "appendToActionPayload",
2
+ name: 'appendToActionPayload',
3
3
  required: false,
4
4
  defaultValue: null,
5
5
  typeMetadata: {
6
6
  schema: {
7
- type: "object"
7
+ type: 'object'
8
8
  }
9
9
  }
10
10
  };
@@ -2,7 +2,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
2
2
 
3
3
  import Property from "./Property";
4
4
  import defaultAppendToActionPayload from "./DefaultAppendToActionPayload";
5
- import getRefPropertySchema from "../../../cc/component/properties/getRefPropertySchema";
5
+ import getRefPropertySchema from "../../../../cc/component/properties/getRefPropertySchema";
6
6
  export default class Properties {
7
7
  constructor(properties, componentName) {
8
8
  this.componentName = componentName;
@@ -27,18 +27,17 @@ export default class Properties {
27
27
 
28
28
 
29
29
  updateAllPropertiesValue(validator, propertyValue) {
30
- this.validateProperties(validator, propertyValue);
31
-
30
+ // this.validateProperties(validator, propertyValue);
32
31
  if (!this.isEqual(propertyValue)) {
33
32
  let isChanged = false;
34
33
  Object.keys(propertyValue).forEach(key => {
35
34
  let property = this.findProperty(key);
36
35
 
37
36
  if (property.getValue() == null || property.getValue() == undefined) {
38
- property.updateValue(propertyValue[key]);
37
+ // property.updateValue(propertyValue[key]);
39
38
  isChanged = true;
40
39
  } else if (property.getValue() != propertyValue[key]) {
41
- property.updateValue(propertyValue[key]);
40
+ // property.updateValue(propertyValue[key]);
42
41
  isChanged = true;
43
42
  }
44
43
  });
@@ -0,0 +1,106 @@
1
+ /* eslint-disable react/prop-types */
2
+ import React from 'react';
3
+ import createCustomComponent from "../createCustomComponent";
4
+ import { render, screen } from '@testing-library/react';
5
+ import '@testing-library/jest-dom';
6
+
7
+ let View = (_ref, ref) => {
8
+ let {
9
+ state
10
+ } = _ref;
11
+ return /*#__PURE__*/React.createElement("div", {
12
+ ref: ref,
13
+ "data-testid": "custom-component",
14
+ "data-title": state.properties.title
15
+ }, "Hey");
16
+ };
17
+
18
+ let mockComponentCC = {
19
+ name: 'mockComponent',
20
+ View: View,
21
+ properties: {},
22
+ eventHandlers: {
23
+ "mockComponent#MOUNT": jest.fn(),
24
+ "mockComponent#UN_MOUNT": jest.fn(),
25
+ "mockComponent#UPDATE_PROPERTIES": jest.fn()
26
+ },
27
+ properties: {
28
+ title: {
29
+ name: 'titile',
30
+ defaultValue: 'default',
31
+ typeMetadata: {
32
+ schema: {
33
+ type: 'string'
34
+ }
35
+ }
36
+ }
37
+ },
38
+ behaviour: [{
39
+ name: 'test',
40
+ properties: {},
41
+ setInitialState: () => ({}),
42
+ eventHandlers: {}
43
+ }]
44
+ };
45
+ describe('createCustomComponent integration test', () => {
46
+ // basic rendering test
47
+ it('should mount the component and check the rendering', () => {
48
+ const CustomComponent = createCustomComponent(mockComponentCC);
49
+ let {
50
+ container
51
+ } = render( /*#__PURE__*/React.createElement(CustomComponent, null));
52
+ expect(container).toBeInTheDocument();
53
+ }); // test if the ref is passed to the component
54
+
55
+ it('should pass the ref to the component', () => {
56
+ const CustomComponent = createCustomComponent(mockComponentCC);
57
+ let ref = /*#__PURE__*/React.createRef();
58
+ render( /*#__PURE__*/React.createElement(CustomComponent, {
59
+ ref: ref
60
+ }));
61
+ expect(typeof ref.current).toBe('object');
62
+ });
63
+ it('should pass props to the custom component', () => {
64
+ const CustomComponent = createCustomComponent(mockComponentCC);
65
+ render( /*#__PURE__*/React.createElement(CustomComponent, null));
66
+ const component = screen.getByTestId('custom-component');
67
+ expect(component).toHaveAttribute('data-testid', 'custom-component');
68
+ });
69
+ it('should initialize custom behavior state', () => {
70
+ const CustomComponent = createCustomComponent(mockComponentCC);
71
+ render( /*#__PURE__*/React.createElement(CustomComponent, null));
72
+ const {
73
+ behaviour
74
+ } = mockComponentCC;
75
+ expect(behaviour[0].setInitialState()).toEqual({});
76
+ });
77
+ it('should call the MOUNT event handler on mounting', () => {
78
+ const CustomComponent = createCustomComponent(mockComponentCC);
79
+ render( /*#__PURE__*/React.createElement(CustomComponent, null));
80
+ expect(mockComponentCC.eventHandlers['mockComponent#MOUNT']).toHaveBeenCalled();
81
+ });
82
+ it('should update component when props change and update property event', () => {
83
+ const CustomComponent = createCustomComponent(mockComponentCC);
84
+ const {
85
+ rerender
86
+ } = render( /*#__PURE__*/React.createElement(CustomComponent, {
87
+ title: "Initial Title"
88
+ }));
89
+ let component = screen.getByTestId('custom-component');
90
+ expect(component).toHaveAttribute('data-title', 'Initial Title');
91
+ rerender( /*#__PURE__*/React.createElement(CustomComponent, {
92
+ title: "Updated Title"
93
+ }));
94
+ component = screen.getByTestId('custom-component');
95
+ expect(component).toHaveAttribute('data-title', 'Updated Title');
96
+ expect(mockComponentCC.eventHandlers['mockComponent#UPDATE_PROPERTIES']).toHaveBeenCalled();
97
+ });
98
+ it('should clean up properly on unmount', () => {
99
+ const CustomComponent = createCustomComponent(mockComponentCC);
100
+ const {
101
+ unmount
102
+ } = render( /*#__PURE__*/React.createElement(CustomComponent, null));
103
+ unmount();
104
+ expect(mockComponentCC.eventHandlers['mockComponent#UN_MOUNT']).toHaveBeenCalled();
105
+ });
106
+ });
@@ -0,0 +1,5 @@
1
+ import ActionIcon from "../../../../legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon";
2
+ const ActionComponentMapping = {
3
+ 'ActionIcon': ActionIcon
4
+ };
5
+ export default ActionComponentMapping;
@@ -1,38 +1,17 @@
1
1
  import React from 'react';
2
- import Flex from '@zohodesk/layout/es/Flex/Flex';
3
2
  import ComponentRegistry from "../../../../../custom-component/frameworks/ui/ComponentRegistry";
4
- import ActionIcon from "../../../../legacy-to-new-arch/action-icon/ActionIcon";
5
- const defaultUiMapping = {
6
- ActionIcon: ActionIcon
7
- };
3
+ import ActionsRenderer from "../../../actions-renderer/frameworks/ui/ActionsRenderer";
8
4
  export default function ActionLocationView(_ref, ref) {
9
5
  let {
10
6
  state
11
7
  } = _ref;
12
8
  const {
13
- actions
9
+ actions,
10
+ type
14
11
  } = state.properties;
15
- return /*#__PURE__*/React.createElement(Flex, {
16
- ref: ref,
17
- $flag_fullsize: true,
18
- $ui_displayMode: "flex",
19
- $ui_alignItems: "center",
20
- $ui_justifyContent: "end"
21
- }, actions.map((action, index) => {
22
- const {
23
- type,
24
- properties,
25
- eventMappings
26
- } = action;
27
- /* eslint-disable-next-line @zohodesk/architecturerules/no-defaultProps-rule */
28
-
29
- const ActionUiType = defaultUiMapping[type] || ComponentRegistry.get(type);
30
- return /*#__PURE__*/React.createElement(ActionUiType, {
31
- key: index,
32
- ...properties,
33
- appendToActionPayload: {
34
- eventMappings
35
- }
36
- });
37
- }));
12
+ const ActionsRendererComponent = ComponentRegistry.get(type) || ActionsRenderer;
13
+ return /*#__PURE__*/React.createElement(ActionsRendererComponent, {
14
+ actions: actions,
15
+ getRef: ref
16
+ });
38
17
  }
@@ -0,0 +1,9 @@
1
+ import { createCustomComponent } from "../../../../../custom-component";
2
+ import ActionLocationProperties from "../../../../../../cc/action-location/Properties";
3
+ import ActionsRendererView from "./ActionsRendererView";
4
+ export default createCustomComponent({
5
+ name: 'ActionsRenderer',
6
+ properties: ActionLocationProperties,
7
+ eventHandlers: {},
8
+ View: ActionsRendererView
9
+ });
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import ComponentRegistry from "../../../../../custom-component/frameworks/ui/ComponentRegistry";
3
+ import ActionComponentMapping from "../../../action-location/frameworks/ui/ActionComponentMapping";
4
+ import Flex from '@zohodesk/layout/es/Flex/Flex';
5
+
6
+ function ActionsRendererView(_ref, ref) {
7
+ let {
8
+ state
9
+ } = _ref;
10
+ const {
11
+ actions
12
+ } = state.properties;
13
+ return /*#__PURE__*/React.createElement(Flex, {
14
+ ref: ref,
15
+ $ui_displayMode: "inline",
16
+ $ui_alignItems: "center"
17
+ }, actions.map((action, index) => {
18
+ const {
19
+ type,
20
+ properties,
21
+ eventMappings
22
+ } = action;
23
+ /* eslint-disable-next-line @zohodesk/architecturerules/no-defaultProps-rule */
24
+
25
+ const ActionUiType = ActionComponentMapping[type] || ComponentRegistry.get(type);
26
+ return /*#__PURE__*/React.createElement(ActionUiType, {
27
+ key: index,
28
+ ...properties,
29
+ appendToActionPayload: {
30
+ eventMappings
31
+ }
32
+ });
33
+ }));
34
+ }
35
+
36
+ ;
37
+ export default ActionsRendererView;
@@ -1,7 +1,5 @@
1
1
  import React from 'react';
2
2
  import Row from "./row/Row";
3
- const emptyArray = Object.freeze([]);
4
- const emptyObject = {};
5
3
 
6
4
  function Rows(_ref) {
7
5
  let {
@@ -25,15 +23,13 @@ function getRowProps(row, headers, isFlexibleColumns, isSelectionEnabled, resize
25
23
  isSelected,
26
24
  isSelectable,
27
25
  selectionTooltip,
28
- clickAction,
29
- rowActions
26
+ rowActionLocation
30
27
  } = row;
31
28
  const updatedColumns = getUpdatedColumns(columns, headers);
32
29
  return {
33
30
  id,
34
- columns: updatedColumns || emptyArray,
35
- clickAction: clickAction || emptyObject,
36
- rowActions: rowActions || emptyArray,
31
+ columns: updatedColumns,
32
+ rowActionLocation,
37
33
  isSelected,
38
34
  isSelectable,
39
35
  selectionTooltip,
@@ -29,15 +29,17 @@ function HeaderData(_ref) {
29
29
  $ui_size: size,
30
30
  $ui_align: alignment,
31
31
  $data_width: resizedWidth,
32
- $flag_flexible: isFlexibleColumns
32
+ $flag_flexible: isFlexibleColumns,
33
+ $a11yAttributes_container: {
34
+ 'aria-sort': sortable ? sortedBy : 'none'
35
+ }
33
36
  }, /*#__PURE__*/React.createElement(HeaderText, {
34
37
  id: id,
35
38
  name: name,
36
39
  text: text,
37
40
  sortable: sortable,
38
41
  sortedBy: sortedBy,
39
- sortTooltip: sortTooltip // Yet to be implemented
40
- ,
42
+ sortTooltip: sortTooltip,
41
43
  dispatch: dispatch
42
44
  }), /*#__PURE__*/React.createElement(ColumnResizer, {
43
45
  isResizerEnabled: isResizerEnabled,
@@ -25,11 +25,15 @@ function RowView(_ref, ref) {
25
25
  const {
26
26
  id,
27
27
  columns,
28
- rowActions,
28
+ rowActionLocation,
29
29
  isFlexibleColumns,
30
30
  resizedColumnsWidth,
31
31
  hasActions
32
32
  } = state.properties;
33
+ const {
34
+ type,
35
+ actions
36
+ } = rowActionLocation;
33
37
  return /*#__PURE__*/React.createElement(TableRow, {
34
38
  key: id,
35
39
  ref: ref,
@@ -54,8 +58,8 @@ function RowView(_ref, ref) {
54
58
  isFlexibleColumns
55
59
  }), renderRowActions({
56
60
  hasActions,
57
- rowActions,
58
- dispatch
61
+ type,
62
+ actions
59
63
  }));
60
64
  }
61
65
 
@@ -94,13 +98,13 @@ function renderColumns(_ref3) {
94
98
  function renderRowActions(_ref4) {
95
99
  let {
96
100
  hasActions,
97
- rowActions,
98
- dispatch
101
+ actions,
102
+ type
99
103
  } = _ref4;
100
104
  return /*#__PURE__*/React.createElement(RowActions, {
101
105
  hasActions: hasActions,
102
- actions: rowActions,
103
- dispatch: dispatch
106
+ type: type,
107
+ actions: actions
104
108
  });
105
109
  }
106
110
 
@@ -4,13 +4,16 @@ import ActionLocation from "../../../../../action-location/frameworks/ui/ActionL
4
4
  export default function RowActions(_ref) {
5
5
  let {
6
6
  hasActions,
7
+ type = '',
7
8
  actions
8
9
  } = _ref;
9
10
 
11
+ // TODO: Need to fix the defaultValue from properties => CC
10
12
  if (hasActions) {
11
13
  return /*#__PURE__*/React.createElement(TableAction, {
12
14
  $ui_size: "medium"
13
15
  }, /*#__PURE__*/React.createElement(ActionLocation, {
16
+ type: type,
14
17
  actions: actions
15
18
  }));
16
19
  }
@@ -1,5 +1,5 @@
1
- import { createCustomComponent } from "../../../custom-component";
2
- import Properties from "../../../../cc/action-icon/Properties";
1
+ import { createCustomComponent } from "../../../../../custom-component";
2
+ import Properties from "../../../../../../cc/action-icon/Properties";
3
3
  import ActionIconView from "./ActionIconView";
4
4
  const ActionIcon = createCustomComponent({
5
5
  name: 'ActionIcon',
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import ActionIcon from '@zohodesk-private/desk-components/es/ActionIcon/ActionIcon';
3
- import Constants from "../../../../cc/action-icon/Constants";
3
+ import Constants from "../../../../../../cc/action-icon/Constants"; // @ts-ignore
4
+
5
+ import style from "./css/ActionIcon.module.css";
4
6
  export default function ActionIconView(_ref, ref) {
5
7
  let {
6
8
  state,
@@ -9,22 +11,26 @@ export default function ActionIconView(_ref, ref) {
9
11
  const {
10
12
  icon,
11
13
  label,
12
- hoverVariant
14
+ hoverVariant,
15
+ isDisabled,
16
+ isVisible
13
17
  } = state.properties;
14
18
  const {
15
19
  dispatch
16
20
  } = helpers;
17
21
  return /*#__PURE__*/React.createElement("span", {
18
- ref: ref
22
+ ref: ref,
23
+ className: isVisible ? '' : style.hide
19
24
  }, /*#__PURE__*/React.createElement(ActionIcon, {
20
25
  $ui_iconName: icon,
21
26
  $ui_hoverVariant: hoverVariant,
22
27
  $flag_gap: true,
28
+ $flag_disabled: isDisabled,
23
29
  $i18n_tooltip: label,
24
- $event_onClick: () => {
30
+ $event_onClick: !isDisabled ? () => {
25
31
  dispatch({
26
32
  type: Constants.ACTION_ICON_CLICKED
27
33
  });
28
- }
34
+ } : null
29
35
  }));
30
36
  }
@@ -6,4 +6,4 @@ export { default as Link } from "./link/frameworks/ui/Link";
6
6
  export { default as Switch } from "./switch/frameworks/ui/Switch";
7
7
  export { default as Tags } from "./tags/frameworks/ui/Tags";
8
8
  export { default as Text } from "./text/frameworks/ui/Text";
9
- export { default as ActionIcon } from "./action-icon/ActionIcon";
9
+ export { default as ActionIcon } from "./action-icon/frameworks/ui/ActionIcon";
@@ -1,6 +1,6 @@
1
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
2
 
3
- import DataBrokerFactory from "../../usecases/entities-factory/DataBrokerFactory";
3
+ import DataBrokerFactory from "../../applications/entities-factory/DataBrokerFactory";
4
4
  export default class Repository {
5
5
  constructor() {
6
6
  _defineProperty(this, "state", void 0);
@@ -1,10 +1,10 @@
1
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
2
 
3
- import RegisterUseCase from "../../usecases/interactors/RegisterUseCase";
4
- import ExecuteActionUseCase from "../../usecases/interactors/ExecuteActionUseCase";
5
- import FailureUseCase from "../../usecases/interactors/FailureUseCase";
6
- import SuccessUseCase from "../../usecases/interactors/SuccessUseCase";
7
- import NoContentUseCase from "../../usecases/interactors/NoContentUseCase";
3
+ import RegisterUseCase from "../../applications/usecases/RegisterUseCase";
4
+ import ExecuteActionUseCase from "../../applications/usecases/ExecuteActionUseCase";
5
+ import FailureUseCase from "../../applications/usecases/FailureUseCase";
6
+ import SuccessUseCase from "../../applications/usecases/SuccessUseCase";
7
+ import NoContentUseCase from "../../applications/usecases/NoContentUseCase";
8
8
  export default class Service {
9
9
  constructor(dependencies) {
10
10
  _defineProperty(this, "registerUseCase", void 0);
@@ -17,6 +17,27 @@ export default class TemplateHelpers {
17
17
  });
18
18
  }
19
19
 
20
+ isOnlyTemplateVariables(inputString) {
21
+ return /^{{(.*?)}}$/.test(inputString);
22
+ }
23
+
24
+ replaceTemplateVariablesInObject(properties, replacementObj) {
25
+ const replaced = {};
26
+ Object.entries(properties).forEach(_ref => {
27
+ let [key, value] = _ref;
28
+
29
+ if (typeof value === 'string' && this.isOnlyTemplateVariables(value)) {
30
+ const path = value.replace(/{{(.*?)}}/g, '$1');
31
+ replaced[key] = this.getPathValue(path, replacementObj);
32
+ } else if (typeof value === 'string' && value.includes('{{')) {
33
+ replaced[key] = this.replaceTemplateVariables(value, replacementObj);
34
+ } else {
35
+ replaced[key] = value;
36
+ }
37
+ });
38
+ return replaced;
39
+ }
40
+
20
41
  objectToQueryString(obj) {
21
42
  return Object.keys(obj).map(key => encodeURIComponent(key) + '=' + encodeURIComponent(obj[key])).join('&');
22
43
  }
@@ -1,5 +1,5 @@
1
- import APITemplate from "../../entities/APITemplate";
2
- import APITemplates from "../../entities/APITemplates";
1
+ import APITemplate from "../../domain/entities/APITemplate";
2
+ import APITemplates from "../../domain/entities/APITemplates";
3
3
  export default class APITemplatesFactory {
4
4
  static create(httpTemplates, templateHelpers) {
5
5
  const apiTemplatesMap = new Map();
@@ -1,5 +1,5 @@
1
1
  import APITemplatesFactory from "./APITemplatesFactory";
2
- import DataBroker from "../../entities/DataBroker";
2
+ import DataBroker from "../../domain/entities/DataBroker";
3
3
  export default class DataBrokerFactory {
4
4
  static create(httpTemplates, templateHelpers) {
5
5
  const apiTemplates = APITemplatesFactory.create(httpTemplates, templateHelpers);
@@ -0,0 +1 @@
1
+ export { ITemplateHelpers } from "../../../domain/entities/interfaces/ITemplateHelpers";