@zohodesk/library-platform 1.1.0-exp.1 → 1.1.0

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 (270) hide show
  1. package/README.md +2 -2
  2. package/es/bc/{zdata-broker → zdata-source}/Actions.js +6 -6
  3. package/es/bc/{zdata-broker → zdata-source}/Constants.js +6 -5
  4. package/es/bc/zdata-source/EventHandlers.js +2 -0
  5. package/es/bc/zdata-source/Symbols.js +5 -0
  6. package/es/bc/zfield/ActionHandlers.js +1 -1
  7. package/es/bc/zlist/EventHandlers.js +1 -1
  8. package/es/bc/zlist/Properties.js +17 -30
  9. package/es/bc/zrecord/Constants.js +3 -1
  10. package/es/cc/action-icon/Properties.js +31 -0
  11. package/es/cc/action-location/Properties.js +9 -24
  12. package/es/cc/table-connected/Constants.js +4 -0
  13. package/es/cc/table-connected/Properties.js +14 -57
  14. package/es/cc/table-list/Properties.js +34 -10
  15. package/es/cc/table-list/data-types/Header.js +14 -7
  16. package/es/cc/table-list/data-types/RowCursor.js +8 -0
  17. package/es/cc/table-list/row/Properties.js +16 -3
  18. package/es/desk-frameworks/table-connected/frameworks/ListSdkFactory.js +88 -1
  19. package/es/desk-frameworks/table-connected/frameworks/TableConnectedFactory.js +23 -6
  20. package/es/desk-frameworks/table-connected/frameworks/TableConnectedView.js +9 -4
  21. package/es/library/behaviours/list-selection/domain/entities/ListItemSelection.js +29 -9
  22. package/es/library/custom-component/domain/entities/Component.js +8 -4
  23. package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +4 -2
  24. package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +16 -6
  25. package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +10 -0
  26. package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +8 -6
  27. package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +9 -7
  28. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/ActionColumn.js +3 -2
  29. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +18 -7
  30. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/Headers.js +0 -4
  31. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/SelectAll.js +4 -4
  32. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Columns.js +2 -6
  33. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +13 -7
  34. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +8 -5
  35. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.js +18 -7
  36. package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon.js +18 -2
  37. package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIconView.js +75 -1
  38. package/es/library/dot/legacy-to-new-arch/table-field-components/lookup-field/frameworks/ui/LookupFieldView.js +7 -6
  39. package/es/platform/client-actions/Readme.md +31 -0
  40. package/es/platform/client-actions/bc/zclient-actions/Constants.js +11 -0
  41. package/es/platform/client-actions/bc/zclient-actions/EventHandlers.js +1 -0
  42. package/es/platform/client-actions/behaviour/zclient-actions/Readme.md +31 -0
  43. package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/ClientActionBehaviourExecutorController.js +27 -0
  44. package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/FailureController.js +28 -0
  45. package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/FetchStateStopController.js +21 -0
  46. package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/MountController.js +25 -0
  47. package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/NoContentController.js +23 -0
  48. package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/SetClientActionsController.js +24 -0
  49. package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/SuccessController.js +28 -0
  50. package/es/platform/client-actions/behaviour/zclient-actions/adapters/gateways/Repository.js +28 -0
  51. package/es/platform/client-actions/behaviour/zclient-actions/adapters/gateways/Service.js +35 -0
  52. package/es/platform/client-actions/behaviour/zclient-actions/adapters/presenters/Presenter.js +24 -0
  53. package/es/platform/client-actions/behaviour/zclient-actions/applications/entities-factory/ClientActionFactory.js +12 -0
  54. package/es/platform/client-actions/behaviour/zclient-actions/applications/entities-factory/ClientActionManagerFactory.js +10 -0
  55. package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/input/SetClientActionsInputModel.js +1 -0
  56. package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/input/SuccessInputModel.js +1 -0
  57. package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/output/IPresenter.js +1 -0
  58. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/ExecuteActionBehaviourUseCase.js +33 -0
  59. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/FailureUseCase.js +22 -0
  60. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/FetchStateStopUseCase.js +25 -0
  61. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/InitializeUseCase.js +17 -0
  62. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/NoContentUseCase.js +27 -0
  63. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/SetClientActionsUseCase.js +21 -0
  64. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/SuccessUseCase.js +22 -0
  65. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientAction.js +65 -0
  66. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActionManager.js +141 -0
  67. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActions.js +50 -0
  68. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/EventMapping.js +36 -0
  69. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/EventMappings.js +15 -0
  70. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/GetClientActionsStrategy.js +44 -0
  71. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/UIComponentMapping.js +41 -0
  72. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/BehaviourState.js +1 -0
  73. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionModel.js +1 -0
  74. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionsModel.js +1 -0
  75. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ComponentPropertiesModel.js +1 -0
  76. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ConditionFieldModel.js +1 -0
  77. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ConditionModel.js +1 -0
  78. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/EventMappingModel.js +1 -0
  79. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/EventModel.js +1 -0
  80. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IAction.js +1 -0
  81. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientActionExecuteStrategy.js +0 -0
  82. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientActionManager.js +0 -0
  83. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientActions.js +0 -0
  84. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IError.js +1 -0
  85. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IEvent.js +1 -0
  86. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IEventMapping.js +0 -0
  87. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IEventMappings.js +0 -0
  88. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IPayload.js +0 -0
  89. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IUIComponentMapping.js +0 -0
  90. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/PayloadValueMappingModel.js +1 -0
  91. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/PropsMeta.js +1 -0
  92. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/State.js +1 -0
  93. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/StrategyMeta.js +1 -0
  94. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/SubMeta.js +1 -0
  95. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/UIComponentMappingModel.js +1 -0
  96. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/UserDetailsModel.js +1 -0
  97. package/es/platform/client-actions/behaviour/zclient-actions/frameworks/ActionsHandlersFactory.js +47 -0
  98. package/es/platform/client-actions/behaviour/zclient-actions/frameworks/ClientActionsBehaviourFactory.js +12 -0
  99. package/es/platform/client-actions/cc/action-event-mediator/Properties.js +34 -0
  100. package/es/platform/client-actions/cc/dynamic-action-component/Properties.js +51 -0
  101. package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/MountController.js +18 -0
  102. package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/PropertiesChangeController.js +26 -0
  103. package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/UnmountController.js +18 -0
  104. package/es/platform/client-actions/components/action-event-mediator/adapters/gateway/Repository.js +36 -0
  105. package/es/platform/client-actions/components/action-event-mediator/adapters/presenters/Presenter.js +22 -0
  106. package/es/platform/client-actions/components/action-event-mediator/applications/interfaces/UseCaseDependencies.js +1 -0
  107. package/es/platform/client-actions/components/action-event-mediator/applications/interfaces/gateways/IRepository.js +0 -0
  108. package/es/platform/client-actions/components/action-event-mediator/applications/interfaces/input/PropertiesChangeUseCaseInputModel.js +1 -0
  109. package/es/platform/client-actions/components/action-event-mediator/applications/interfaces/output/IPresenter.js +0 -0
  110. package/es/platform/client-actions/components/action-event-mediator/applications/usecases/AbstractUseCase.js +15 -0
  111. package/es/platform/client-actions/components/action-event-mediator/applications/usecases/DestroyUseCase.js +13 -0
  112. package/es/platform/client-actions/components/action-event-mediator/applications/usecases/InitializeUseCase.js +13 -0
  113. package/es/platform/client-actions/components/action-event-mediator/applications/usecases/PropertiesChangeUseCase.js +17 -0
  114. package/es/platform/client-actions/components/action-event-mediator/domain/entities/ActionEventMediatorEntity.js +108 -0
  115. package/es/platform/client-actions/components/action-event-mediator/domain/entities/interfaces/IActionLocation.js +1 -0
  116. package/es/platform/client-actions/components/action-event-mediator/domain/entities/interfaces/IState.js +1 -0
  117. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator.js +13 -0
  118. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediatorView.js +19 -0
  119. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/EventHandlersFactory.js +30 -0
  120. package/es/platform/client-actions/components/dynamic-component/domain/entities/interfaces/IState.js +1 -0
  121. package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponent.js +9 -0
  122. package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponentView.js +34 -0
  123. package/es/platform/client-actions/components/interfaces/ActionViewModel.js +7 -0
  124. package/es/platform/client-actions/components/interfaces/EventMappingViewModel.js +0 -0
  125. package/es/platform/client-actions/components/row-actions-renderer/domain/entities/interfaces/IState.js +1 -0
  126. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.js +12 -0
  127. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +17 -0
  128. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +30 -0
  129. package/es/platform/client-actions/template-resolver/index.js +44 -0
  130. package/es/platform/client-actions/template-resolver/interfaces/ITemplate.js +1 -0
  131. package/es/platform/client-actions/translators/client-actions-translator/index.js +29 -0
  132. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalEmptyString.js +4 -0
  133. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalEndsWith.js +4 -0
  134. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalEquals.js +4 -0
  135. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalGreaterThan.js +4 -0
  136. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalGreaterThanOrEquals.js +4 -0
  137. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalIn.js +4 -0
  138. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalIsEmpty.js +4 -0
  139. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalIsNotEmpty.js +4 -0
  140. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalLessThan.js +4 -0
  141. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalLessThanOrEquals.js +4 -0
  142. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalLike.js +4 -0
  143. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalNotEquals.js +4 -0
  144. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalNotLike.js +4 -0
  145. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalStartsWith.js +4 -0
  146. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/GetResolvedContextFieldValue.js +8 -0
  147. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/index.js +58 -0
  148. package/es/platform/client-actions/translators/condition-resolver/index.js +33 -0
  149. package/es/platform/client-actions/translators/condition-resolver/pattern-evaluator/PatternValidator.js +86 -0
  150. package/es/platform/client-actions/translators/condition-resolver/pattern-evaluator/index.js +96 -0
  151. package/es/platform/client-actions/translators/context-resolver/index.js +54 -0
  152. package/es/platform/client-actions/translators/interfaces/IContext.js +1 -0
  153. package/es/platform/client-actions/translators/interfaces/IState.js +1 -0
  154. package/es/platform/data-source/dbc/index.js +1 -0
  155. package/es/platform/{data-broker → data-source}/http-template/deleteRecord.js +1 -1
  156. package/es/platform/{data-broker → data-source}/http-template/deleteRecords.js +1 -1
  157. package/es/platform/{data-broker → data-source}/http-template/getAvailableFields.js +5 -5
  158. package/es/platform/data-source/http-template/getClientActions.js +23 -0
  159. package/es/platform/{data-broker → data-source}/http-template/getRecords.js +1 -1
  160. package/es/platform/{data-broker → data-source}/http-template/getSelectedFields.js +5 -5
  161. package/es/platform/{data-broker → data-source}/http-template/updateRecord.js +1 -1
  162. package/es/platform/{data-broker → data-source}/index.js +5 -5
  163. package/es/platform/{data-broker → data-source}/utils/transformer/CreateCf.js +1 -1
  164. package/es/platform/zdata-source/adapters/controllers/AbstractController.js +8 -0
  165. package/es/platform/{zdata-broker/adapters/controllers/ActionExecutorController.js → zdata-source/adapters/controllers/DataSourceExecutorController.js} +1 -1
  166. package/es/platform/{zdata-broker → zdata-source}/adapters/gateways/Repository.js +5 -5
  167. package/es/platform/{zdata-broker → zdata-source}/adapters/presenters/Presenter.js +4 -4
  168. package/es/platform/{zdata-broker/applications/entities-factory/DataBrokerFactory.js → zdata-source/applications/entities-factory/DataSourceFactory.js} +3 -4
  169. package/es/platform/zdata-source/applications/interfaces/InputDependencies.js +1 -0
  170. package/es/platform/zdata-source/applications/interfaces/gateways/IRepository.js +1 -0
  171. package/es/platform/zdata-source/applications/interfaces/gateways/IService.js +0 -0
  172. package/es/platform/zdata-source/applications/interfaces/gateways/State.js +1 -0
  173. package/es/platform/zdata-source/applications/interfaces/input/ExecuteActionInputModel.js +1 -0
  174. package/es/platform/zdata-source/applications/interfaces/input/FailureInputModel.js +1 -0
  175. package/es/platform/zdata-source/applications/interfaces/input/NoContentInputModel.js +1 -0
  176. package/es/platform/zdata-source/applications/interfaces/input/RegisterInputModel.js +1 -0
  177. package/es/platform/zdata-source/applications/interfaces/input/SuccessInputModel.js +1 -0
  178. package/es/platform/zdata-source/applications/interfaces/output/IPresenter.js +1 -0
  179. package/es/platform/zdata-source/applications/usecases/AbstractUseCase.js +17 -0
  180. package/es/platform/{zdata-broker → zdata-source}/applications/usecases/ExecuteActionUseCase.js +3 -3
  181. package/es/platform/{zdata-broker → zdata-source}/applications/usecases/FailureUseCase.js +3 -3
  182. package/es/platform/{zdata-broker → zdata-source}/applications/usecases/NoContentUseCase.js +3 -3
  183. package/es/platform/{zdata-broker → zdata-source}/applications/usecases/SuccessUseCase.js +4 -4
  184. package/es/platform/{zdata-broker/domain/entities/DataBroker.js → zdata-source/domain/entities/DataSource.js} +12 -12
  185. package/es/platform/zdata-source/domain/entities/interfaces/APIDetailsModel.js +1 -0
  186. package/es/platform/zdata-source/domain/entities/interfaces/APITemplateModel.js +1 -0
  187. package/es/platform/zdata-source/domain/entities/interfaces/APITemplatesModel.js +1 -0
  188. package/es/platform/zdata-source/domain/entities/interfaces/BehaviourState.js +1 -0
  189. package/es/platform/zdata-source/domain/entities/interfaces/EventModel.js +1 -0
  190. package/es/platform/zdata-source/domain/entities/interfaces/IAPITemplate.js +1 -0
  191. package/es/platform/zdata-source/domain/entities/interfaces/IAPITemplates.js +1 -0
  192. package/es/platform/zdata-source/domain/entities/interfaces/IDataSource.js +0 -0
  193. package/es/platform/zdata-source/domain/entities/interfaces/ITemplateHelpers.js +1 -0
  194. package/es/platform/zdata-source/domain/entities/interfaces/MetaData.js +1 -0
  195. package/es/platform/{zdata-broker → zdata-source}/frameworks/DataBrokerBehaviourFactory.js +2 -2
  196. package/es/platform/{zdata-broker → zdata-source}/frameworks/EventHandlersFactory.js +7 -12
  197. package/es/platform/zfield/applications/usecases/ExecuteActionUseCase.js +1 -1
  198. package/es/platform/zfield/applications/usecases/InitializeUseCase.js +2 -2
  199. package/es/platform/zfield/applications/usecases/RefetchUseCase.js +1 -1
  200. package/es/platform/zfield/domain/entities/fields-manager/FieldsManager.js +5 -5
  201. package/es/platform/zfield/frameworks/ActionHandlerFactory.js +4 -4
  202. package/es/platform/zlist/adapters/controllers/DeleteSuccessController.js +25 -0
  203. package/es/platform/zlist/adapters/controllers/UpdateSuccessController.js +25 -0
  204. package/es/platform/zlist/adapters/gateways/Repository.js +9 -8
  205. package/es/platform/zlist/adapters/gateways/Service.js +8 -0
  206. package/es/platform/zlist/adapters/presenters/TableTranslator.js +54 -13
  207. package/es/platform/zlist/adapters/presenters/translators/ColumnAlignmentTranslator.js +11 -0
  208. package/es/platform/zlist/adapters/presenters/translators/ColumnSizeTranslator.js +23 -0
  209. package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +16 -8
  210. package/es/platform/zlist/adapters/presenters/translators/Header.js +10 -4
  211. package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +4 -2
  212. package/es/platform/zlist/adapters/presenters/translators/Row.js +10 -6
  213. package/es/platform/zlist/adapters/presenters/translators/RowActionTranslator.js +6 -6
  214. package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +7 -5
  215. package/es/platform/zlist/adapters/presenters/translators/actions/ActionsTranslator.js +89 -0
  216. package/es/platform/zlist/adapters/presenters/translators/interfaces/Context.js +1 -0
  217. package/es/platform/zlist/adapters/presenters/translators/interfaces/FieldComponentMapping.js +1 -0
  218. package/es/platform/zlist/applications/entities-factory/ListFactory.js +3 -2
  219. package/es/platform/zlist/applications/usecases/DeleteSuccessUseCase.js +19 -0
  220. package/es/platform/zlist/applications/usecases/UpdateSuccessUseCase.js +19 -0
  221. package/es/platform/zlist/domain/entities/List.js +58 -27
  222. package/es/platform/zlist/frameworks/EventHandlersFactory.js +17 -23
  223. package/es/platform/zrecord/applications/usecases/ExecuteActionUseCase.js +1 -1
  224. package/es/platform/zrecord/applications/usecases/FetchMoreUseCase.js +1 -1
  225. package/es/platform/zrecord/applications/usecases/InitializeUseCase.js +2 -2
  226. package/es/platform/zrecord/applications/usecases/RefetchUseCase.js +1 -1
  227. package/es/platform/zrecord/domain/entities/RecordsManager.js +10 -10
  228. package/package.json +24 -22
  229. package/es/bc/zdata-broker/EventHandlers.js +0 -2
  230. package/es/bc/zdata-broker/Symbols.js +0 -5
  231. package/es/platform/data-broker/http-template/getUIActions.js +0 -22
  232. package/es/platform/zdata-broker/domain/entities/interfaces/MetaData.js +0 -1
  233. /package/es/bc/{zdata-broker → zdata-source}/Properties.js +0 -0
  234. /package/es/{platform/data-broker/dbc/index.js → cc/table-list/data-types/RowActionsConfig.js} +0 -0
  235. /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/adapters/controllers/AbstractController.js +0 -0
  236. /package/es/platform/{zdata-broker/applications/interfaces/InputDependencies.js → client-actions/behaviour/zclient-actions/applications/interfaces/ClientActionModel.js} +0 -0
  237. /package/es/platform/{zdata-broker/applications/interfaces/gateways/IRepository.js → client-actions/behaviour/zclient-actions/applications/interfaces/ComponentPropertiesModel.js} +0 -0
  238. /package/es/platform/{zdata-broker/applications/interfaces/gateways/State.js → client-actions/behaviour/zclient-actions/applications/interfaces/ConditionFieldModel.js} +0 -0
  239. /package/es/platform/{zdata-broker/applications/interfaces/input/ExecuteActionInputModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/ConditionModel.js} +0 -0
  240. /package/es/platform/{zdata-broker/applications/interfaces/input/FailureInputModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/EventMappingModel.js} +0 -0
  241. /package/es/platform/{zdata-broker/applications/interfaces/input/NoContentInputModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/IError.js} +0 -0
  242. /package/es/platform/{zdata-broker/applications/interfaces/input/RegisterInputModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/InputDependencies.js} +0 -0
  243. /package/es/platform/{zdata-broker/applications/interfaces/input/SuccessInputModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/PayloadValueMappingModel.js} +0 -0
  244. /package/es/platform/{zdata-broker/applications/interfaces/output/IPresenter.js → client-actions/behaviour/zclient-actions/applications/interfaces/PropsMeta.js} +0 -0
  245. /package/es/platform/{zdata-broker/domain/entities/interfaces/APIDetailsModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/StrategyMeta.js} +0 -0
  246. /package/es/platform/{zdata-broker/domain/entities/interfaces/APITemplateModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/UIComponentMappingModel.js} +0 -0
  247. /package/es/platform/{zdata-broker/domain/entities/interfaces/APITemplatesModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/UserDetailsModel.js} +0 -0
  248. /package/es/platform/{zdata-broker/domain/entities/interfaces/BehaviourState.js → client-actions/behaviour/zclient-actions/applications/interfaces/gateways/IRepository.js} +0 -0
  249. /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/applications/interfaces/gateways/IService.js +0 -0
  250. /package/es/platform/{zdata-broker/domain/entities/interfaces/EventModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/gateways/State.js} +0 -0
  251. /package/es/platform/{zdata-broker/domain/entities/interfaces/IAPITemplate.js → client-actions/behaviour/zclient-actions/applications/interfaces/input/ExecuteActionBehaviourInputModel.js} +0 -0
  252. /package/es/platform/{zdata-broker/domain/entities/interfaces/IAPITemplates.js → client-actions/behaviour/zclient-actions/applications/interfaces/input/FailureInputModel.js} +0 -0
  253. /package/es/platform/{zdata-broker/domain/entities/interfaces/ITemplateHelpers.js → client-actions/behaviour/zclient-actions/applications/interfaces/input/FetchStateStopInputModel.js} +0 -0
  254. /package/es/platform/{zlist/adapters/presenters/translators/interfaces/FieldUiMapping.js → client-actions/behaviour/zclient-actions/applications/interfaces/input/InitializeInputModel.js} +0 -0
  255. /package/es/platform/{zlist/adapters/presenters/translators/interfaces/PageContext.js → client-actions/behaviour/zclient-actions/applications/interfaces/input/NoContentInputModel.js} +0 -0
  256. /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/applications/usecases/AbstractUseCase.js +0 -0
  257. /package/es/platform/{zdata-broker/domain/entities/interfaces/IDataBroker.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientAction.js} +0 -0
  258. /package/es/platform/{data-broker → data-source}/utils/transformer/Transformer.js +0 -0
  259. /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/FailureController.js +0 -0
  260. /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/NoContentController.js +0 -0
  261. /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/RegisterController.js +0 -0
  262. /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/SuccessController.js +0 -0
  263. /package/es/platform/{zdata-broker → zdata-source}/adapters/gateways/Service.js +0 -0
  264. /package/es/platform/{zdata-broker → zdata-source}/adapters/gateways/TemplateHelpers.js +0 -0
  265. /package/es/platform/{zdata-broker → zdata-source}/applications/entities-factory/APITemplatesFactory.js +0 -0
  266. /package/es/platform/{zdata-broker → zdata-source}/applications/interfaces/gateways/ITemplateHelpers.js +0 -0
  267. /package/es/platform/{zdata-broker → zdata-source}/applications/usecases/RegisterUseCase.js +0 -0
  268. /package/es/platform/{zdata-broker → zdata-source}/domain/entities/APITemplate.js +0 -0
  269. /package/es/platform/{zdata-broker → zdata-source}/domain/entities/APITemplates.js +0 -0
  270. /package/es/platform/{zdata-broker → zdata-source}/domain/entities/interfaces/ApiEnum.js +0 -0
@@ -7,25 +7,42 @@ import ZListBehaviourFactory from "../../../platform/zlist/frameworks/ZListBehav
7
7
  import RecordBehaviourFactory from "../../../platform/zrecord/frameworks/RecordBehaviourFactory";
8
8
  import EventHandlersFactory from "./EventHandlersFactory";
9
9
  import TableConnectedView from "./TableConnectedView";
10
- import defaultDataBroker from "../../../platform/data-broker";
11
- import DataBrokerBehaviourFactory from "../../../platform/zdata-broker/frameworks/DataBrokerBehaviourFactory";
10
+ import defaultDataSource from "../../../platform/data-source";
11
+ import DataSourceBehaviourFactory from "../../../platform/zdata-source/frameworks/DataBrokerBehaviourFactory";
12
+ import ClientActionsBehaviourFactory from "../../../platform/client-actions/behaviour/zclient-actions/frameworks/ClientActionsBehaviourFactory";
12
13
  export default class TableConnectedFactory {
13
14
  static create(_ref) {
15
+ var _dataSource2;
16
+
14
17
  let {
15
18
  name,
16
- dataBroker = defaultDataBroker,
19
+ dataBroker,
20
+ dataSource,
17
21
  eventHandlers = {},
18
22
  View = TableConnectedView
19
23
  } = _ref;
24
+
25
+ if (!dataSource) {
26
+ console.warn('Desk Platform Warning: dataBroker is deprecated, use dataSource instead');
27
+ dataSource = dataBroker;
28
+ }
29
+
30
+ const _dataSource = { ...dataSource,
31
+ httpTemplates: { ...defaultDataSource.httpTemplates,
32
+ ...((_dataSource2 = dataSource) === null || _dataSource2 === void 0 ? void 0 : _dataSource2.httpTemplates)
33
+ }
34
+ };
20
35
  return createCustomComponent({
21
36
  name: name,
22
37
  View: View,
23
38
  properties: Properties,
24
39
  eventHandlers: EventHandlersFactory.create(eventHandlers),
25
40
  transformState: TableTranslator.transformState,
26
- behaviours: [ZHttpBehaviourFactory.create(), DataBrokerBehaviourFactory.create(), RecordBehaviourFactory.create(dataBroker.httpTemplates), ZFieldBehaviourFactory.create({
27
- availableFields: dataBroker.httpTemplates.getAvailableFields,
28
- selectedFields: dataBroker.httpTemplates.getSelectedFields
41
+ behaviours: [ZHttpBehaviourFactory.create(), DataSourceBehaviourFactory.create(), RecordBehaviourFactory.create(_dataSource.httpTemplates), ClientActionsBehaviourFactory.create({
42
+ getClientActions: _dataSource.httpTemplates.getClientActions
43
+ }), ZFieldBehaviourFactory.create({
44
+ availableFields: _dataSource.httpTemplates.getAvailableFields,
45
+ selectedFields: _dataSource.httpTemplates.getSelectedFields
29
46
  }), ZListBehaviourFactory.create()]
30
47
  });
31
48
  }
@@ -9,19 +9,24 @@ function View(_ref, ref) {
9
9
  const {
10
10
  isLoading,
11
11
  data = [],
12
- hasRowActions,
12
+ rowActionsConfig,
13
+ rowCursor,
13
14
  properties,
14
15
  emptyStateUiType
15
16
  } = state;
16
17
  const {
17
- isFlexibleColumns,
18
+ preferences,
18
19
  selectionConfig
19
20
  } = properties;
21
+ const {
22
+ autoColumnSizing
23
+ } = preferences || {};
20
24
  return /*#__PURE__*/React.createElement(TableList, {
21
25
  data: data,
26
+ rowCursor: rowCursor,
22
27
  getRef: ref,
23
- isFlexibleColumns: isFlexibleColumns,
24
- hasRowActions: hasRowActions,
28
+ isFlexibleColumns: autoColumnSizing,
29
+ rowActionsConfig: rowActionsConfig,
25
30
  isLoading: isLoading,
26
31
  emptyStateUiType: emptyStateUiType,
27
32
  selectionConfig: selectionConfig
@@ -49,7 +49,9 @@ class ListItemSelection {
49
49
  break;
50
50
  }
51
51
 
52
- this.selectItem(id);
52
+ if (!this.isSelected(id)) {
53
+ this.selectItem(id);
54
+ }
53
55
  }
54
56
  } else {
55
57
  this.selected = [];
@@ -59,23 +61,41 @@ class ListItemSelection {
59
61
  toggleRange(startIndex, endIndex) {
60
62
  const isForward = startIndex < endIndex;
61
63
  const [start, end] = isForward ? [startIndex, endIndex] : [endIndex, startIndex];
62
- let itemsForSelection = this.itemIds.slice(start, end + 1);
63
- itemsForSelection = itemsForSelection.filter(i => !this.isSelected(i));
64
+ const itemsForSelection = this.itemIds.slice(start, end + 1);
65
+ const allSelected = itemsForSelection.every(id => this.isSelected(id));
64
66
  const yetToSelectCount = this.maxSelectionCount - this.selected.length;
67
+ const itemsToSelect = itemsForSelection.filter(id => !this.isSelected(id));
68
+ this.rangeSelection(isForward, itemsForSelection, allSelected, yetToSelectCount, itemsToSelect);
69
+ }
65
70
 
66
- if (itemsForSelection.length > yetToSelectCount) {
71
+ rangeSelection(isForward, itemsForSelection, allSelected, yetToSelectCount, itemsToSelect) {
72
+ if (allSelected) {
67
73
  if (isForward) {
68
- itemsForSelection.splice(yetToSelectCount + 1);
74
+ itemsForSelection.forEach(id => this.deselectItem(id));
69
75
  } else {
70
- itemsForSelection.splice(0, itemsForSelection.length - yetToSelectCount);
76
+ itemsForSelection.reverse().forEach(id => this.deselectItem(id));
77
+ }
78
+ } else {
79
+ if (itemsToSelect.length > yetToSelectCount) {
80
+ if (isForward) {
81
+ itemsToSelect.splice(yetToSelectCount);
82
+ } else {
83
+ itemsToSelect.reverse();
84
+ itemsToSelect.splice(yetToSelectCount);
85
+ itemsToSelect.reverse();
86
+ }
71
87
  }
72
- }
73
88
 
74
- itemsForSelection.forEach(this.getStrategy(this.itemIds.at(endIndex)));
89
+ if (isForward) {
90
+ itemsToSelect.forEach(id => this.selectItem(id));
91
+ } else {
92
+ itemsToSelect.reverse().forEach(id => this.selectItem(id));
93
+ }
94
+ }
75
95
  }
76
96
 
77
97
  toggleUpto(id) {
78
- let lastItem = this.selected.at(-1);
98
+ let lastItem = this.selected.at(-1) || id;
79
99
  let startIndex = this.itemIds.indexOf(lastItem);
80
100
  let endIndex = this.itemIds.indexOf(id);
81
101
  this.toggleRange(startIndex, endIndex);
@@ -99,7 +99,8 @@ export default class Component {
99
99
  }
100
100
 
101
101
  setBehaviours(behaviours) {
102
- this._behaviours = behaviours; //store behaviour properties
102
+ this._behaviours = behaviours;
103
+ /* store behaviour properties */
103
104
 
104
105
  this._behaviours.forEach(behaviour => {
105
106
  behaviour.getProperties().data && behaviour.getProperties().data.forEach(obj => {
@@ -118,7 +119,8 @@ export default class Component {
118
119
 
119
120
  if (isValid) {
120
121
  property.updateValue(newProps[key]);
121
- } // return isValid
122
+ }
123
+ /* return isValid */
122
124
 
123
125
  } else if (this._properties.findProperty(key)) {
124
126
  let property = this._properties.findProperty(key);
@@ -129,12 +131,14 @@ export default class Component {
129
131
 
130
132
  if (isValid) {
131
133
  property.updateValue(newProps[key]);
132
- } // return isValid
134
+ }
135
+ /* return isValid */
133
136
 
134
137
  } else {
135
138
  throw new Error(`props '${key}' not exist `);
136
139
  }
137
- }); // return this._properties.updateAllPropertiesValue(jsonValidator, newProps);
140
+ });
141
+ /* return this._properties.updateAllPropertiesValue(jsonValidator, newProps); */
138
142
 
139
143
  return true;
140
144
  }
@@ -1,5 +1,7 @@
1
- import ActionIcon from "../../../../legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon";
1
+ import ActionIcon, { Button, FilterDropdown } from "../../../../legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon";
2
2
  const ActionComponentMapping = {
3
- 'ActionIcon': ActionIcon
3
+ 'ActionIcon': ActionIcon,
4
+ 'Button': Button,
5
+ 'TableFilterDropdown': FilterDropdown
4
6
  };
5
7
  export default ActionComponentMapping;
@@ -24,7 +24,8 @@ function TableListView(_ref2, _ref) {
24
24
  resizerConfig,
25
25
  selectionConfig,
26
26
  isFlexibleColumns,
27
- hasRowActions,
27
+ rowCursor,
28
+ rowActionsConfig,
28
29
  emptyStateUiType
29
30
  } = state.properties;
30
31
  const {
@@ -35,6 +36,10 @@ function TableListView(_ref2, _ref) {
35
36
  headers,
36
37
  rows
37
38
  } = data;
39
+ const {
40
+ hasActions: hasRowActions,
41
+ columnWidth: rowActionsColumnWidth
42
+ } = rowActionsConfig;
38
43
  const hasRows = rows.length > 0; // TODO: derive from state.properties
39
44
 
40
45
  const isDataEmpty = !hasRows && !isLoading; // TODO: derive from state.properties
@@ -54,14 +59,16 @@ function TableListView(_ref2, _ref) {
54
59
  selection,
55
60
  isFlexibleColumns,
56
61
  hasRowActions,
62
+ rowActionsColumnWidth,
57
63
  dispatch
58
64
  }), renderBody({
59
65
  headers,
60
66
  rows,
61
67
  isFlexibleColumns,
62
68
  selectionConfig,
63
- resizerState,
69
+ rowCursor,
64
70
  hasRowActions,
71
+ rowActionsColumnWidth,
65
72
  hasRows
66
73
  }), /*#__PURE__*/React.createElement(NoData, {
67
74
  isDataEmpty: isDataEmpty,
@@ -81,18 +88,19 @@ function renderHeader(_ref3) {
81
88
  selection,
82
89
  isFlexibleColumns,
83
90
  hasRowActions,
91
+ rowActionsColumnWidth,
84
92
  dispatch
85
93
  } = _ref3;
86
94
  return /*#__PURE__*/React.createElement(Header, {
87
95
  isSelectionEnabled: selectionConfig.isEnabled,
88
96
  hasAllSelected: selection.hasAllSelected,
89
97
  isResizerEnabled: resizerConfig.isEnabled,
90
- resizedColumnsWidth: resizerState.resizedColumnsWidth,
91
98
  currentlyResizingColumn: resizerState.currentlyResizingColumn,
92
99
  isCurrentlyResizing: resizerState.isCurrentlyResizing,
93
100
  resizerExtraWidth: resizerState.extraWidth,
94
101
  isFlexibleColumns: isFlexibleColumns,
95
102
  hasRowActions: hasRowActions,
103
+ rowActionsColumnWidth: rowActionsColumnWidth,
96
104
  headers: headers,
97
105
  dispatch: dispatch
98
106
  });
@@ -104,8 +112,9 @@ function renderBody(_ref4) {
104
112
  rows,
105
113
  isFlexibleColumns,
106
114
  selectionConfig,
107
- resizerState,
115
+ rowCursor,
108
116
  hasRowActions,
117
+ rowActionsColumnWidth,
109
118
  hasRows
110
119
  } = _ref4;
111
120
  return /*#__PURE__*/React.createElement(Body, {
@@ -116,8 +125,9 @@ function renderBody(_ref4) {
116
125
  rows: rows,
117
126
  isFlexibleColumns: isFlexibleColumns,
118
127
  isSelectionEnabled: selectionConfig.isEnabled,
119
- resizedColumnsWidth: resizerState.resizedColumnsWidth,
120
- hasRowActions: hasRowActions
128
+ rowCursor: rowCursor,
129
+ hasRowActions: hasRowActions,
130
+ rowActionsColumnWidth: rowActionsColumnWidth
121
131
  }));
122
132
  }
123
133
 
@@ -28,3 +28,13 @@
28
28
  .actions {
29
29
  gap: var(--zd_size8)
30
30
  }
31
+
32
+ .rowCursor_default {
33
+ cursor: default
34
+ }
35
+ .rowCursor_pointer {
36
+ cursor: pointer
37
+ }
38
+ .rowCursor_not-allowed {
39
+ cursor: not-allowed
40
+ }
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import TableHeader from '@zohodesk-private/desk-components/es/table/TableHeader/TableHeader';
3
+ import TableHeaderRow from '@zohodesk-private/desk-components/es/table/TableHeader/TableHeaderRow';
3
4
  import SelectAll from "./header/SelectAll";
4
5
  import Headers from "./header/Headers";
5
6
  import ActionColumn from "./header/ActionColumn";
@@ -10,12 +11,12 @@ function Header(_ref) {
10
11
  isSelectionEnabled,
11
12
  hasAllSelected,
12
13
  isResizerEnabled,
13
- resizedColumnsWidth,
14
14
  currentlyResizingColumn,
15
15
  isCurrentlyResizing,
16
16
  resizerExtraWidth,
17
17
  isFlexibleColumns,
18
18
  hasRowActions,
19
+ rowActionsColumnWidth,
19
20
  headers,
20
21
  dispatch
21
22
  } = _ref;
@@ -25,8 +26,9 @@ function Header(_ref) {
25
26
  }
26
27
 
27
28
  return /*#__PURE__*/React.createElement(TableHeader, {
29
+ $flag_isColumnsFlexible: isFlexibleColumns,
28
30
  $flag_padding: !isSelectionEnabled
29
- }, renderSelectAll(isSelectionEnabled, hasAllSelected, dispatch), renderHeaders(headers, resizedColumnsWidth, currentlyResizingColumn, isResizerEnabled, isFlexibleColumns, dispatch), renderActionColumn(hasRowActions), renderResizerExtraSpace(isCurrentlyResizing, resizerExtraWidth));
31
+ }, /*#__PURE__*/React.createElement(TableHeaderRow, null, renderSelectAll(isSelectionEnabled, hasAllSelected, dispatch), renderHeaders(headers, currentlyResizingColumn, isResizerEnabled, isFlexibleColumns, dispatch), renderActionColumn(hasRowActions, rowActionsColumnWidth), renderResizerExtraSpace(isCurrentlyResizing, resizerExtraWidth)));
30
32
  }
31
33
 
32
34
  function renderSelectAll(isSelectionEnabled, hasAllSelected, dispatch) {
@@ -37,10 +39,9 @@ function renderSelectAll(isSelectionEnabled, hasAllSelected, dispatch) {
37
39
  });
38
40
  }
39
41
 
40
- function renderHeaders(headers, resizedColumnsWidth, currentlyResizingColumn, isResizerEnabled, isFlexibleColumns, dispatch) {
42
+ function renderHeaders(headers, currentlyResizingColumn, isResizerEnabled, isFlexibleColumns, dispatch) {
41
43
  return /*#__PURE__*/React.createElement(Headers, {
42
44
  headers: headers,
43
- resizedColumnsWidth: resizedColumnsWidth,
44
45
  currentlyResizingColumn: currentlyResizingColumn,
45
46
  isResizerEnabled: isResizerEnabled,
46
47
  isFlexibleColumns: isFlexibleColumns,
@@ -48,9 +49,10 @@ function renderHeaders(headers, resizedColumnsWidth, currentlyResizingColumn, is
48
49
  });
49
50
  }
50
51
 
51
- function renderActionColumn(hasRowActions) {
52
+ function renderActionColumn(hasRowActions, columnWidth) {
52
53
  return /*#__PURE__*/React.createElement(ActionColumn, {
53
- hasRowActions: hasRowActions
54
+ hasRowActions: hasRowActions,
55
+ columnWidth: columnWidth
54
56
  });
55
57
  }
56
58
 
@@ -7,16 +7,17 @@ function Rows(_ref) {
7
7
  rows,
8
8
  isFlexibleColumns,
9
9
  isSelectionEnabled,
10
- resizedColumnsWidth,
11
- hasRowActions
10
+ rowCursor,
11
+ hasRowActions,
12
+ rowActionsColumnWidth
12
13
  } = _ref;
13
14
  return rows.map((row, index) => /*#__PURE__*/React.createElement(Row, {
14
15
  key: index,
15
- ...getRowProps(row, headers, isFlexibleColumns, isSelectionEnabled, resizedColumnsWidth, hasRowActions)
16
+ ...getRowProps(row, headers, isFlexibleColumns, isSelectionEnabled, rowCursor, hasRowActions, rowActionsColumnWidth)
16
17
  }));
17
18
  }
18
19
 
19
- function getRowProps(row, headers, isFlexibleColumns, isSelectionEnabled, resizedColumnsWidth, hasRowActions) {
20
+ function getRowProps(row, headers, isFlexibleColumns, isSelectionEnabled, rowCursor, hasRowActions, rowActionsColumnWidth) {
20
21
  const {
21
22
  id,
22
23
  columns,
@@ -35,14 +36,15 @@ function getRowProps(row, headers, isFlexibleColumns, isSelectionEnabled, resize
35
36
  selectionTooltip,
36
37
  isFlexibleColumns,
37
38
  isSelectionEnabled,
38
- resizedColumnsWidth,
39
- hasActions: hasRowActions
39
+ cursor: rowCursor,
40
+ hasActions: hasRowActions,
41
+ rowActionsColumnWidth
40
42
  };
41
43
  }
42
44
 
43
45
  function getUpdatedColumns(columns, headers) {
44
46
  return columns.map((column, index) => ({
45
- size: headers[index].size,
47
+ width: headers[index].width,
46
48
  field: column,
47
49
  alignment: headers[index].alignment
48
50
  }));
@@ -2,12 +2,13 @@ import React from 'react';
2
2
  import TableHead from '@zohodesk-private/desk-components/es/table/TableHead/TableHead';
3
3
  export default function ActionColumn(_ref) {
4
4
  let {
5
- hasRowActions
5
+ hasRowActions,
6
+ columnWidth
6
7
  } = _ref;
7
8
 
8
9
  if (hasRowActions) {
9
10
  return /*#__PURE__*/React.createElement(TableHead, {
10
- $ui_size: "medium"
11
+ $data_width: columnWidth
11
12
  }, /*#__PURE__*/React.createElement(React.Fragment, null));
12
13
  }
13
14
 
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
2
  import TableHead from '@zohodesk-private/desk-components/es/table/TableHead/TableHead';
3
+ import { AlignmentOfFlex } from "../../../../../../../../cc/table-list/data-types/Header";
4
+ import ActionEventMediator from "../../../../../../../../platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
5
+ import { ActionViewGap } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
3
6
  import HeaderText from "./HeaderText";
4
7
  import ColumnResizer from "./ColumnResizer";
5
8
 
@@ -10,7 +13,6 @@ function HeaderData(_ref) {
10
13
  sortTooltip,
11
14
  isResizing,
12
15
  isResizerEnabled,
13
- resizedWidth,
14
16
  isFlexibleColumns,
15
17
  dispatch
16
18
  } = _ref;
@@ -19,20 +21,26 @@ function HeaderData(_ref) {
19
21
  name,
20
22
  text,
21
23
  sortable,
22
- size,
23
- alignment
24
+ width,
25
+ alignment,
26
+ actions
24
27
  } = header;
28
+ const hasActions = Boolean(actions === null || actions === void 0 ? void 0 : actions.length);
25
29
  return (
26
30
  /*#__PURE__*/
27
31
  // @ts-ignore
28
32
  React.createElement(TableHead, {
29
- $ui_size: size,
30
33
  $ui_align: alignment,
31
- $data_width: resizedWidth,
34
+ $data_width: width,
32
35
  $flag_flexible: isFlexibleColumns,
33
36
  $a11yAttributes_container: {
34
37
  'aria-sort': sortable ? sortedBy : 'none'
35
- }
38
+ },
39
+ $customProps_container: hasActions ? {
40
+ $ui_displayMode: 'flex',
41
+ $ui_alignItems: 'center',
42
+ $ui_justifyContent: AlignmentOfFlex[alignment]
43
+ } : null
36
44
  }, /*#__PURE__*/React.createElement(HeaderText, {
37
45
  id: id,
38
46
  name: name,
@@ -41,7 +49,10 @@ function HeaderData(_ref) {
41
49
  sortedBy: sortedBy,
42
50
  sortTooltip: sortTooltip,
43
51
  dispatch: dispatch
44
- }), /*#__PURE__*/React.createElement(ColumnResizer, {
52
+ }), hasActions ? /*#__PURE__*/React.createElement(ActionEventMediator, {
53
+ actions: actions,
54
+ gap: ActionViewGap.SMALL
55
+ }) : null, /*#__PURE__*/React.createElement(ColumnResizer, {
45
56
  isResizerEnabled: isResizerEnabled,
46
57
  isResizing: isResizing
47
58
  }))
@@ -4,7 +4,6 @@ import HeaderData from "./HeaderData";
4
4
  function Headers(_ref) {
5
5
  let {
6
6
  headers,
7
- resizedColumnsWidth,
8
7
  currentlyResizingColumn,
9
8
  isResizerEnabled,
10
9
  isFlexibleColumns,
@@ -17,12 +16,9 @@ function Headers(_ref) {
17
16
  } = header;
18
17
  let isResizing = currentlyResizingColumn === header.id; // TODO: To be adopted with properties
19
18
 
20
- let resizedWidth = resizedColumnsWidth[header.id]; // TODO: To be adopted with properties
21
-
22
19
  return /*#__PURE__*/React.createElement(HeaderData, {
23
20
  key: index,
24
21
  header: header,
25
- resizedWidth: resizedWidth,
26
22
  sortedBy: sortOrder,
27
23
  sortTooltip: sortTooltip,
28
24
  isResizing: isResizing,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
+ import CheckBox from '@zohodesk/components/es/CheckBox/CheckBox';
2
3
  import TableHeadFirstNode from '@zohodesk-private/desk-components/es/table/TableHeadFirstNode/TableHeadFirstNode';
3
- import TableCheckBox from '@zohodesk-private/desk-components/es/table/TableCheckBox/TableCheckBox';
4
4
  import { TableListConstants } from "../../../../../../../../cc/table-list";
5
5
 
6
6
  function SelectAll(_ref) {
@@ -14,9 +14,9 @@ function SelectAll(_ref) {
14
14
  return null;
15
15
  }
16
16
 
17
- return /*#__PURE__*/React.createElement(TableHeadFirstNode, null, /*#__PURE__*/React.createElement(TableCheckBox, {
18
- $flag_checked: hasAllSelected,
19
- $event_onChange: () => dispatch({
17
+ return /*#__PURE__*/React.createElement(TableHeadFirstNode, null, /*#__PURE__*/React.createElement(CheckBox, {
18
+ checked: hasAllSelected,
19
+ onChange: () => dispatch({
20
20
  type: TableListConstants.TABLE_LIST_TOGGLE_ALL_SELECTION
21
21
  })
22
22
  }));
@@ -3,23 +3,19 @@ import RowData from "./RowData";
3
3
 
4
4
  function Columns(_ref) {
5
5
  let {
6
- resizedColumnsWidth,
7
6
  data,
8
7
  isFlexibleColumns
9
8
  } = _ref;
10
9
  return data.map((column, index) => {
11
10
  const {
12
- size,
11
+ width,
13
12
  alignment,
14
13
  field
15
14
  } = column;
16
- const resizedWidth = resizedColumnsWidth[field.id]; // Will be adopted with properties
17
-
18
15
  return /*#__PURE__*/React.createElement(RowData, {
19
16
  key: index,
20
17
  field: field,
21
- resizedWidth: resizedWidth,
22
- size: size,
18
+ width: width,
23
19
  alignment: alignment,
24
20
  isFlexibleColumns: isFlexibleColumns
25
21
  });
@@ -6,7 +6,9 @@ import RowActions from "./RowActions";
6
6
  import { createCustomComponent } from "../../../../../../../custom-component";
7
7
  import { RowEventHandlersFactory } from "./RowEventHandlersFactory";
8
8
  import TableRowProperties from "../../../../../../../../cc/table-list/row/Properties";
9
- import TableRowConstants from "../../../../../../../../cc/table-list/row/Constants";
9
+ import TableRowConstants from "../../../../../../../../cc/table-list/row/Constants"; // @ts-ignore
10
+
11
+ import style from "../../css/TableList.module.css";
10
12
 
11
13
  function RowView(_ref, ref) {
12
14
  let {
@@ -27,8 +29,9 @@ function RowView(_ref, ref) {
27
29
  columns,
28
30
  rowActionLocation,
29
31
  isFlexibleColumns,
30
- resizedColumnsWidth,
31
- hasActions
32
+ cursor,
33
+ hasActions,
34
+ rowActionsColumnWidth
32
35
  } = state.properties;
33
36
  const {
34
37
  type,
@@ -44,7 +47,10 @@ function RowView(_ref, ref) {
44
47
  payload: {
45
48
  id
46
49
  }
47
- })
50
+ }),
51
+ customStyle: {
52
+ $pointer: style[`rowCursor_${cursor}`]
53
+ }
48
54
  }, renderRowSelection({
49
55
  isSelectionEnabled,
50
56
  id,
@@ -54,10 +60,10 @@ function RowView(_ref, ref) {
54
60
  dispatch
55
61
  }), renderColumns({
56
62
  columns,
57
- resizedColumnsWidth,
58
63
  isFlexibleColumns
59
64
  }), renderRowActions({
60
65
  hasActions,
66
+ columnWidth: rowActionsColumnWidth,
61
67
  type,
62
68
  actions
63
69
  }));
@@ -85,12 +91,10 @@ function renderRowSelection(_ref2) {
85
91
  function renderColumns(_ref3) {
86
92
  let {
87
93
  columns,
88
- resizedColumnsWidth,
89
94
  isFlexibleColumns
90
95
  } = _ref3;
91
96
  return /*#__PURE__*/React.createElement(Columns, {
92
97
  data: columns,
93
- resizedColumnsWidth: resizedColumnsWidth,
94
98
  isFlexibleColumns: isFlexibleColumns
95
99
  });
96
100
  }
@@ -98,11 +102,13 @@ function renderColumns(_ref3) {
98
102
  function renderRowActions(_ref4) {
99
103
  let {
100
104
  hasActions,
105
+ columnWidth,
101
106
  actions,
102
107
  type
103
108
  } = _ref4;
104
109
  return /*#__PURE__*/React.createElement(RowActions, {
105
110
  hasActions: hasActions,
111
+ columnWidth: columnWidth,
106
112
  type: type,
107
113
  actions: actions
108
114
  });
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  import TableAction from '@zohodesk-private/desk-components/es/table/TableAction/TableAction';
3
- import ActionLocation from "../../../../../action-location/frameworks/ui/ActionLocation";
3
+ import ActionEventMediator from "../../../../../../../../platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
4
+ import { ActionViewGap } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
4
5
  export default function RowActions(_ref) {
5
6
  let {
6
7
  hasActions,
8
+ columnWidth,
7
9
  type = '',
8
10
  actions
9
11
  } = _ref;
@@ -11,10 +13,11 @@ export default function RowActions(_ref) {
11
13
  // TODO: Need to fix the defaultValue from properties => CC
12
14
  if (hasActions) {
13
15
  return /*#__PURE__*/React.createElement(TableAction, {
14
- $ui_size: "medium"
15
- }, /*#__PURE__*/React.createElement(ActionLocation, {
16
- type: type,
17
- actions: actions
16
+ $data_width: columnWidth
17
+ }, /*#__PURE__*/React.createElement(ActionEventMediator, {
18
+ actions: actions,
19
+ renderComponentType: type,
20
+ gap: ActionViewGap.MEDIUM
18
21
  }));
19
22
  }
20
23