@zohodesk/library-platform 1.1.0-exp.2 → 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 (259) 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 +16 -32
  9. package/es/cc/action-icon/Properties.js +31 -0
  10. package/es/cc/action-location/Properties.js +9 -24
  11. package/es/cc/table-connected/Constants.js +4 -0
  12. package/es/cc/table-connected/Properties.js +11 -57
  13. package/es/cc/table-list/Properties.js +2 -2
  14. package/es/cc/table-list/data-types/Header.js +6 -0
  15. package/es/desk-frameworks/table-connected/frameworks/ListSdkFactory.js +88 -1
  16. package/es/desk-frameworks/table-connected/frameworks/TableConnectedFactory.js +22 -8
  17. package/es/desk-frameworks/table-connected/frameworks/TableConnectedView.js +5 -2
  18. package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +4 -2
  19. package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +1 -0
  20. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +16 -3
  21. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +6 -4
  22. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.js +16 -3
  23. package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon.js +18 -2
  24. package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIconView.js +75 -1
  25. package/es/library/dot/legacy-to-new-arch/table-field-components/lookup-field/frameworks/ui/LookupFieldView.js +7 -6
  26. package/es/platform/client-actions/Readme.md +31 -0
  27. package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/Readme.md +14 -21
  28. package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/ExecuteActionBehaviourUseCase.js +1 -1
  29. package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/InitializeUseCase.js +2 -2
  30. package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/ClientAction.js +12 -4
  31. package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/ClientActionManager.js +9 -9
  32. package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/ClientActions.js +0 -4
  33. package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/EventMapping.js +5 -1
  34. package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/UIComponentMapping.js +7 -3
  35. package/es/platform/{zclient-actions/frameworks/ClientActionBehaviourFactory.js → client-actions/behaviour/zclient-actions/frameworks/ClientActionsBehaviourFactory.js} +1 -1
  36. package/es/platform/client-actions/cc/action-event-mediator/Properties.js +34 -0
  37. package/es/platform/client-actions/cc/dynamic-action-component/Properties.js +51 -0
  38. package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/MountController.js +18 -0
  39. package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/PropertiesChangeController.js +26 -0
  40. package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/UnmountController.js +18 -0
  41. package/es/platform/client-actions/components/action-event-mediator/adapters/gateway/Repository.js +36 -0
  42. package/es/platform/client-actions/components/action-event-mediator/adapters/presenters/Presenter.js +22 -0
  43. package/es/platform/client-actions/components/action-event-mediator/applications/usecases/AbstractUseCase.js +15 -0
  44. package/es/platform/client-actions/components/action-event-mediator/applications/usecases/DestroyUseCase.js +13 -0
  45. package/es/platform/client-actions/components/action-event-mediator/applications/usecases/InitializeUseCase.js +13 -0
  46. package/es/platform/client-actions/components/action-event-mediator/applications/usecases/PropertiesChangeUseCase.js +17 -0
  47. package/es/platform/client-actions/components/action-event-mediator/domain/entities/ActionEventMediatorEntity.js +108 -0
  48. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator.js +13 -0
  49. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediatorView.js +19 -0
  50. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/EventHandlersFactory.js +30 -0
  51. package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponent.js +9 -0
  52. package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponentView.js +34 -0
  53. package/es/platform/client-actions/components/interfaces/ActionViewModel.js +7 -0
  54. package/es/platform/client-actions/components/interfaces/EventMappingViewModel.js +0 -0
  55. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.js +12 -0
  56. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +17 -0
  57. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +30 -0
  58. package/es/platform/client-actions/template-resolver/index.js +44 -0
  59. package/es/platform/client-actions/template-resolver/interfaces/ITemplate.js +1 -0
  60. package/es/platform/client-actions/translators/client-actions-translator/index.js +29 -0
  61. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalEmptyString.js +4 -0
  62. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalEndsWith.js +4 -0
  63. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalEquals.js +4 -0
  64. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalGreaterThan.js +4 -0
  65. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalGreaterThanOrEquals.js +4 -0
  66. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalIn.js +4 -0
  67. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalIsEmpty.js +4 -0
  68. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalIsNotEmpty.js +4 -0
  69. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalLessThan.js +4 -0
  70. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalLessThanOrEquals.js +4 -0
  71. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalLike.js +4 -0
  72. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalNotEquals.js +4 -0
  73. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalNotLike.js +4 -0
  74. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalStartsWith.js +4 -0
  75. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/GetResolvedContextFieldValue.js +8 -0
  76. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/index.js +58 -0
  77. package/es/platform/client-actions/translators/condition-resolver/index.js +33 -0
  78. package/es/platform/client-actions/translators/condition-resolver/pattern-evaluator/PatternValidator.js +86 -0
  79. package/es/platform/client-actions/translators/condition-resolver/pattern-evaluator/index.js +96 -0
  80. package/es/platform/client-actions/translators/context-resolver/index.js +54 -0
  81. package/es/platform/client-actions/translators/interfaces/IContext.js +1 -0
  82. package/es/platform/client-actions/translators/interfaces/IState.js +1 -0
  83. package/es/platform/data-source/dbc/index.js +1 -0
  84. package/es/platform/{data-broker → data-source}/http-template/getAvailableFields.js +5 -5
  85. package/es/platform/{data-broker → data-source}/http-template/getClientActions.js +4 -4
  86. package/es/platform/{data-broker → data-source}/http-template/getSelectedFields.js +5 -5
  87. package/es/platform/{data-broker → data-source}/index.js +2 -2
  88. package/es/platform/{data-broker → data-source}/utils/transformer/CreateCf.js +1 -1
  89. package/es/platform/{zdata-broker/adapters/controllers/DataBrokerExecutorController.js → zdata-source/adapters/controllers/DataSourceExecutorController.js} +1 -1
  90. package/es/platform/{zdata-broker → zdata-source}/adapters/gateways/Repository.js +5 -5
  91. package/es/platform/{zdata-broker → zdata-source}/adapters/presenters/Presenter.js +4 -4
  92. package/es/platform/{zdata-broker/applications/entities-factory/DataBrokerFactory.js → zdata-source/applications/entities-factory/DataSourceFactory.js} +3 -4
  93. package/es/platform/zdata-source/applications/interfaces/InputDependencies.js +1 -0
  94. package/es/platform/zdata-source/applications/interfaces/gateways/IRepository.js +1 -0
  95. package/es/platform/zdata-source/applications/interfaces/gateways/IService.js +0 -0
  96. package/es/platform/zdata-source/applications/interfaces/gateways/State.js +1 -0
  97. package/es/platform/zdata-source/applications/interfaces/input/ExecuteActionInputModel.js +1 -0
  98. package/es/platform/zdata-source/applications/interfaces/input/FailureInputModel.js +1 -0
  99. package/es/platform/zdata-source/applications/interfaces/input/NoContentInputModel.js +1 -0
  100. package/es/platform/zdata-source/applications/interfaces/input/RegisterInputModel.js +1 -0
  101. package/es/platform/zdata-source/applications/interfaces/input/SuccessInputModel.js +1 -0
  102. package/es/platform/zdata-source/applications/interfaces/output/IPresenter.js +1 -0
  103. package/es/platform/{zdata-broker → zdata-source}/applications/usecases/ExecuteActionUseCase.js +3 -3
  104. package/es/platform/{zdata-broker → zdata-source}/applications/usecases/FailureUseCase.js +3 -3
  105. package/es/platform/{zdata-broker → zdata-source}/applications/usecases/NoContentUseCase.js +3 -3
  106. package/es/platform/{zdata-broker → zdata-source}/applications/usecases/SuccessUseCase.js +4 -4
  107. package/es/platform/{zdata-broker/domain/entities/DataBroker.js → zdata-source/domain/entities/DataSource.js} +12 -12
  108. package/es/platform/zdata-source/domain/entities/interfaces/APIDetailsModel.js +1 -0
  109. package/es/platform/zdata-source/domain/entities/interfaces/APITemplateModel.js +1 -0
  110. package/es/platform/zdata-source/domain/entities/interfaces/APITemplatesModel.js +1 -0
  111. package/es/platform/zdata-source/domain/entities/interfaces/BehaviourState.js +1 -0
  112. package/es/platform/zdata-source/domain/entities/interfaces/EventModel.js +1 -0
  113. package/es/platform/zdata-source/domain/entities/interfaces/IAPITemplate.js +1 -0
  114. package/es/platform/zdata-source/domain/entities/interfaces/IAPITemplates.js +1 -0
  115. package/es/platform/zdata-source/domain/entities/interfaces/IDataSource.js +0 -0
  116. package/es/platform/zdata-source/domain/entities/interfaces/ITemplateHelpers.js +1 -0
  117. package/es/platform/zdata-source/domain/entities/interfaces/MetaData.js +1 -0
  118. package/es/platform/{zdata-broker → zdata-source}/frameworks/DataBrokerBehaviourFactory.js +2 -2
  119. package/es/platform/{zdata-broker → zdata-source}/frameworks/EventHandlersFactory.js +7 -12
  120. package/es/platform/zfield/applications/usecases/ExecuteActionUseCase.js +1 -1
  121. package/es/platform/zfield/applications/usecases/InitializeUseCase.js +2 -2
  122. package/es/platform/zfield/applications/usecases/RefetchUseCase.js +1 -1
  123. package/es/platform/zfield/domain/entities/fields-manager/FieldsManager.js +5 -5
  124. package/es/platform/zfield/frameworks/ActionHandlerFactory.js +4 -4
  125. package/es/platform/zlist/adapters/controllers/DeleteSuccessController.js +25 -0
  126. package/es/platform/zlist/adapters/controllers/UpdateSuccessController.js +25 -0
  127. package/es/platform/zlist/adapters/gateways/Repository.js +8 -9
  128. package/es/platform/zlist/adapters/gateways/Service.js +8 -0
  129. package/es/platform/zlist/adapters/presenters/TableTranslator.js +46 -34
  130. package/es/platform/zlist/adapters/presenters/translators/ColumnSizeTranslator.js +2 -2
  131. package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +16 -8
  132. package/es/platform/zlist/adapters/presenters/translators/Header.js +7 -2
  133. package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +4 -2
  134. package/es/platform/zlist/adapters/presenters/translators/Row.js +10 -6
  135. package/es/platform/zlist/adapters/presenters/translators/RowActionTranslator.js +6 -6
  136. package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +7 -5
  137. package/es/platform/zlist/adapters/presenters/translators/actions/ActionsTranslator.js +89 -0
  138. package/es/platform/zlist/adapters/presenters/translators/interfaces/Context.js +1 -0
  139. package/es/platform/zlist/adapters/presenters/translators/interfaces/FieldComponentMapping.js +1 -0
  140. package/es/platform/zlist/applications/entities-factory/ListFactory.js +2 -2
  141. package/es/platform/zlist/applications/usecases/DeleteSuccessUseCase.js +19 -0
  142. package/es/platform/zlist/applications/usecases/UpdateSuccessUseCase.js +19 -0
  143. package/es/platform/zlist/domain/entities/List.js +51 -11
  144. package/es/platform/zlist/frameworks/EventHandlersFactory.js +17 -23
  145. package/es/platform/zrecord/applications/usecases/ExecuteActionUseCase.js +1 -1
  146. package/es/platform/zrecord/applications/usecases/FetchMoreUseCase.js +1 -1
  147. package/es/platform/zrecord/applications/usecases/InitializeUseCase.js +2 -2
  148. package/es/platform/zrecord/applications/usecases/RefetchUseCase.js +1 -1
  149. package/es/platform/zrecord/domain/entities/RecordsManager.js +10 -10
  150. package/package.json +4 -3
  151. package/es/bc/zdata-broker/EventHandlers.js +0 -2
  152. package/es/bc/zdata-broker/Symbols.js +0 -5
  153. package/es/desk-frameworks/table-connected/frameworks/__tests__/TableConnectedFactory.spec.js +0 -453
  154. package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/http-template/getAvailableFields.js +0 -86
  155. package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/http-template/getRecords.js +0 -81
  156. package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/http-template/getSelectedFields.js +0 -32
  157. package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/index.js +0 -11
  158. package/es/platform/zdata-broker/domain/entities/interfaces/MetaData.js +0 -1
  159. /package/es/bc/{zdata-broker → zdata-source}/Properties.js +0 -0
  160. /package/es/{bc → platform/client-actions/bc}/zclient-actions/Constants.js +0 -0
  161. /package/es/{bc → platform/client-actions/bc}/zclient-actions/EventHandlers.js +0 -0
  162. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/AbstractController.js +0 -0
  163. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/ClientActionBehaviourExecutorController.js +0 -0
  164. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/FailureController.js +0 -0
  165. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/FetchStateStopController.js +0 -0
  166. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/MountController.js +0 -0
  167. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/NoContentController.js +0 -0
  168. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/SetClientActionsController.js +0 -0
  169. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/SuccessController.js +0 -0
  170. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/gateways/Repository.js +0 -0
  171. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/gateways/Service.js +0 -0
  172. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/presenters/Presenter.js +0 -0
  173. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/entities-factory/ClientActionFactory.js +0 -0
  174. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/entities-factory/ClientActionManagerFactory.js +0 -0
  175. /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/ClientActionModel.js +0 -0
  176. /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/ComponentPropertiesModel.js +0 -0
  177. /package/es/platform/{data-broker/dbc/index.js → client-actions/behaviour/zclient-actions/applications/interfaces/ConditionFieldModel.js} +0 -0
  178. /package/es/platform/{zclient-actions/applications/interfaces/InputDependencies.js → client-actions/behaviour/zclient-actions/applications/interfaces/ConditionModel.js} +0 -0
  179. /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/EventMappingModel.js +0 -0
  180. /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/IError.js +0 -0
  181. /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/applications/interfaces/InputDependencies.js +0 -0
  182. /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/PayloadValueMappingModel.js +0 -0
  183. /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/PropsMeta.js +0 -0
  184. /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/StrategyMeta.js +0 -0
  185. /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/UIComponentMappingModel.js +0 -0
  186. /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/UserDetailsModel.js +0 -0
  187. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/gateways/IRepository.js +0 -0
  188. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/gateways/IService.js +0 -0
  189. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/gateways/State.js +0 -0
  190. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/ExecuteActionBehaviourInputModel.js +0 -0
  191. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/FailureInputModel.js +0 -0
  192. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/FetchStateStopInputModel.js +0 -0
  193. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/InitializeInputModel.js +0 -0
  194. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/NoContentInputModel.js +0 -0
  195. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/SetClientActionsInputModel.js +0 -0
  196. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/SuccessInputModel.js +0 -0
  197. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/output/IPresenter.js +0 -0
  198. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/AbstractUseCase.js +0 -0
  199. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/FailureUseCase.js +0 -0
  200. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/FetchStateStopUseCase.js +0 -0
  201. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/NoContentUseCase.js +0 -0
  202. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/SetClientActionsUseCase.js +0 -0
  203. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/SuccessUseCase.js +0 -0
  204. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/EventMappings.js +0 -0
  205. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/GetClientActionsStrategy.js +0 -0
  206. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/BehaviourState.js +0 -0
  207. /package/es/platform/{zclient-actions/domain/entities/interfaces/ClientActionsModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionModel.js} +0 -0
  208. /package/es/platform/{zclient-actions/domain/entities/interfaces/EventModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionsModel.js} +0 -0
  209. /package/es/platform/{zclient-actions/domain/entities/interfaces/IAction.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ComponentPropertiesModel.js} +0 -0
  210. /package/es/platform/{zclient-actions/domain/entities/interfaces/IEvent.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ConditionFieldModel.js} +0 -0
  211. /package/es/platform/{zclient-actions/domain/entities/interfaces/SubMeta.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ConditionModel.js} +0 -0
  212. /package/es/platform/{zdata-broker/applications/interfaces/gateways/IRepository.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/EventMappingModel.js} +0 -0
  213. /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/EventModel.js +0 -0
  214. /package/es/platform/{zdata-broker/applications/interfaces/gateways/State.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/IAction.js} +0 -0
  215. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IClientAction.js +0 -0
  216. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IClientActionExecuteStrategy.js +0 -0
  217. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IClientActionManager.js +0 -0
  218. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IClientActions.js +0 -0
  219. /package/es/platform/{zdata-broker/applications/interfaces/input/ExecuteActionInputModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/IError.js} +0 -0
  220. /package/es/platform/{zdata-broker/applications/interfaces/input/FailureInputModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/IEvent.js} +0 -0
  221. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IEventMapping.js +0 -0
  222. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IEventMappings.js +0 -0
  223. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IPayload.js +0 -0
  224. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IUIComponentMapping.js +0 -0
  225. /package/es/platform/{zdata-broker/applications/interfaces/input/NoContentInputModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/PayloadValueMappingModel.js} +0 -0
  226. /package/es/platform/{zdata-broker/applications/interfaces/input/RegisterInputModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/PropsMeta.js} +0 -0
  227. /package/es/platform/{zdata-broker/applications/interfaces/input/SuccessInputModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/State.js} +0 -0
  228. /package/es/platform/{zdata-broker/applications/interfaces/output/IPresenter.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/StrategyMeta.js} +0 -0
  229. /package/es/platform/{zdata-broker/domain/entities/interfaces/APIDetailsModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/SubMeta.js} +0 -0
  230. /package/es/platform/{zdata-broker/domain/entities/interfaces/APITemplateModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/UIComponentMappingModel.js} +0 -0
  231. /package/es/platform/{zdata-broker/domain/entities/interfaces/APITemplatesModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/UserDetailsModel.js} +0 -0
  232. /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/frameworks/ActionsHandlersFactory.js +0 -0
  233. /package/es/platform/{zdata-broker/domain/entities/interfaces/BehaviourState.js → client-actions/components/action-event-mediator/applications/interfaces/UseCaseDependencies.js} +0 -0
  234. /package/es/platform/{zdata-broker/applications/interfaces/gateways/IService.js → client-actions/components/action-event-mediator/applications/interfaces/gateways/IRepository.js} +0 -0
  235. /package/es/platform/{zdata-broker/domain/entities/interfaces/IAPITemplate.js → client-actions/components/action-event-mediator/applications/interfaces/input/PropertiesChangeUseCaseInputModel.js} +0 -0
  236. /package/es/platform/{zdata-broker/domain/entities/interfaces/IDataBroker.js → client-actions/components/action-event-mediator/applications/interfaces/output/IPresenter.js} +0 -0
  237. /package/es/platform/{zdata-broker/domain/entities/interfaces/IAPITemplates.js → client-actions/components/action-event-mediator/domain/entities/interfaces/IActionLocation.js} +0 -0
  238. /package/es/platform/{zdata-broker/domain/entities/interfaces/ITemplateHelpers.js → client-actions/components/action-event-mediator/domain/entities/interfaces/IState.js} +0 -0
  239. /package/es/platform/{zlist/adapters/presenters/translators/interfaces/FieldUiMapping.js → client-actions/components/dynamic-component/domain/entities/interfaces/IState.js} +0 -0
  240. /package/es/platform/{zlist/adapters/presenters/translators/interfaces/PageContext.js → client-actions/components/row-actions-renderer/domain/entities/interfaces/IState.js} +0 -0
  241. /package/es/platform/{data-broker → data-source}/http-template/deleteRecord.js +0 -0
  242. /package/es/platform/{data-broker → data-source}/http-template/deleteRecords.js +0 -0
  243. /package/es/platform/{data-broker → data-source}/http-template/getRecords.js +0 -0
  244. /package/es/platform/{data-broker → data-source}/http-template/updateRecord.js +0 -0
  245. /package/es/platform/{data-broker → data-source}/utils/transformer/Transformer.js +0 -0
  246. /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/AbstractController.js +0 -0
  247. /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/FailureController.js +0 -0
  248. /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/NoContentController.js +0 -0
  249. /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/RegisterController.js +0 -0
  250. /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/SuccessController.js +0 -0
  251. /package/es/platform/{zdata-broker → zdata-source}/adapters/gateways/Service.js +0 -0
  252. /package/es/platform/{zdata-broker → zdata-source}/adapters/gateways/TemplateHelpers.js +0 -0
  253. /package/es/platform/{zdata-broker → zdata-source}/applications/entities-factory/APITemplatesFactory.js +0 -0
  254. /package/es/platform/{zdata-broker → zdata-source}/applications/interfaces/gateways/ITemplateHelpers.js +0 -0
  255. /package/es/platform/{zdata-broker → zdata-source}/applications/usecases/AbstractUseCase.js +0 -0
  256. /package/es/platform/{zdata-broker → zdata-source}/applications/usecases/RegisterUseCase.js +0 -0
  257. /package/es/platform/{zdata-broker → zdata-source}/domain/entities/APITemplate.js +0 -0
  258. /package/es/platform/{zdata-broker → zdata-source}/domain/entities/APITemplates.js +0 -0
  259. /package/es/platform/{zdata-broker → zdata-source}/domain/entities/interfaces/ApiEnum.js +0 -0
package/README.md CHANGED
@@ -21,7 +21,7 @@ import TableConnectedFactory from '@zohodesk/library-platform/TableConnectedFact
21
21
 
22
22
  const myTableComponent = TableConnectedFactory.create({
23
23
  name: 'MyTableComponent',
24
- dataBroker: myDataBroker,
24
+ dataSource: myDataSource,
25
25
  eventHandlers: {
26
26
  onRowSelect: row => {
27
27
  console.log('Selected row:', row);
@@ -69,7 +69,7 @@ const myComponent = ComponentRegistry.get('MyComponent');
69
69
  The `TableConnectedFactory.create` method accepts the following parameters:
70
70
 
71
71
  - **name**: `string` - The name of the component.
72
- - **dataBroker**: `object` - The data broker instance to manage data fetching and manipulation.
72
+ - **dataSource**: `object` - The data broker instance to manage data fetching and manipulation.
73
73
  - **eventHandlers**: `object` - An object containing event handler functions.
74
74
  - **View**: `React.Component` - Custom view component to render the table.
75
75
 
@@ -1,7 +1,7 @@
1
- import { DATA_BROKER_EXECUTE } from "./Constants";
2
- import { DATA_BROKER_FAILURE, DATA_BROKER_SUCCESS } from "./Symbols";
1
+ import { DATA_SOURCE_EXECUTE } from "./Constants";
2
+ import { DATA_SOURCE_FAILURE, DATA_SOURCE_SUCCESS } from "./Symbols";
3
3
  const Actions = [{
4
- type: DATA_BROKER_EXECUTE,
4
+ type: DATA_SOURCE_EXECUTE,
5
5
  payload: {
6
6
  apiName: {
7
7
  name: 'apiName',
@@ -34,7 +34,7 @@ const Actions = [{
34
34
  schema: {
35
35
  type: 'object',
36
36
  properties: {
37
- [DATA_BROKER_SUCCESS]: {
37
+ [DATA_SOURCE_SUCCESS]: {
38
38
  type: 'object',
39
39
  properties: {
40
40
  type: {
@@ -46,7 +46,7 @@ const Actions = [{
46
46
  },
47
47
  required: ['type', 'payload']
48
48
  },
49
- [DATA_BROKER_FAILURE]: {
49
+ [DATA_SOURCE_FAILURE]: {
50
50
  type: 'object',
51
51
  properties: {
52
52
  type: {
@@ -59,7 +59,7 @@ const Actions = [{
59
59
  required: ['type', 'payload']
60
60
  }
61
61
  },
62
- required: [DATA_BROKER_SUCCESS, DATA_BROKER_FAILURE]
62
+ required: [DATA_SOURCE_SUCCESS, DATA_SOURCE_FAILURE]
63
63
  }
64
64
  }
65
65
  }
@@ -1,10 +1,11 @@
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
- export const DATA_BROKER_REGISTER = 'DATA_BROKER#REGISTER';
4
- export const DATA_BROKER_EXECUTE = 'DATA_BROKER#EXECUTE';
5
- export const DATA_BROKER_EXECUTE_SUCCEEDED = 'DATA_BROKER#EXECUTE_SUCCEEDED';
6
- export const DATA_BROKER_EXECUTE_NO_CONTENT_SUCCEEDED = 'DATA_BROKER#EXECUTE_NO_CONTENT_SUCCEEDED';
7
- export const DATA_BROKER_EXECUTE_FAILED = 'DATA_BROKER#EXECUTE_FAILED';
3
+ export const DATA_SOURCE_REGISTER = 'DATA_SOURCE#REGISTER';
4
+ export const DATA_SOURCE_EXECUTE = 'DATA_SOURCE#EXECUTE';
5
+ export const DATA_SOURCE_EXECUTE_SUCCEEDED = 'DATA_SOURCE#EXECUTE_SUCCEEDED';
6
+ export const DATA_SOURCE_EXECUTE_NO_CONTENT_SUCCEEDED = 'DATA_SOURCE#EXECUTE_NO_CONTENT_SUCCEEDED';
7
+ export const DATA_SOURCE_EXECUTE_FAILED = 'DATA_SOURCE#EXECUTE_FAILED'; // REVIEW: This class is not used anywhere in the codebase.
8
+
8
9
  export class DataBrokerActionName {}
9
10
 
10
11
  _defineProperty(DataBrokerActionName, "GET_RECORDS", 'getRecords');
@@ -0,0 +1,2 @@
1
+ import { DATA_SOURCE_EXECUTE, DATA_SOURCE_REGISTER } from "./Constants";
2
+ import { FETCH_FAILED, FETCH_SUCCESS, FETCH_SUCCESS_NO_CONTENT } from "../zhttp/Constants";
@@ -0,0 +1,5 @@
1
+ // Note: We need to properly handle uniqueness, because it is not api response
2
+ export const DATA_SOURCE_SIGNATURE = 'DATA_SOURCE#SIGNATURE';
3
+ export const DATA_SOURCE_FAILURE = 'DATA_SOURCE#FAILURE';
4
+ export const DATA_SOURCE_SUCCESS = 'DATA_SOURCE#SUCCESS';
5
+ export const DATA_SOURCE_NO_CONTENT = 'DATA_SOURCE#NO_CONTENT';
@@ -1,2 +1,2 @@
1
1
  import { FIELD_EXECUTE, FIELD_REFETCH } from "./Constants";
2
- import { DATA_BROKER_EXECUTE_FAILED, DATA_BROKER_EXECUTE_NO_CONTENT_SUCCEEDED, DATA_BROKER_EXECUTE_SUCCEEDED } from "../zdata-broker/Constants";
2
+ import { DATA_SOURCE_EXECUTE_FAILED, DATA_SOURCE_EXECUTE_NO_CONTENT_SUCCEEDED, DATA_SOURCE_EXECUTE_SUCCEEDED } from "../zdata-source/Constants";
@@ -1 +1 @@
1
- import { ZLIST_FETCH_MORE } from "./Constants";
1
+ import { ZLIST_FETCH_MORE, ZLIST_RECORD_DELETE_SUCCEEDED, ZLIST_RECORD_UPDATE_SUCCEEDED } from "./Constants";
@@ -7,50 +7,43 @@ export default {
7
7
  }
8
8
  }
9
9
  },
10
- filter: {
10
+ departmentId: {
11
11
  required: true,
12
12
  typeMetadata: {
13
13
  schema: {
14
- type: 'object',
15
- properties: {
16
- viewId: {
17
- type: 'string'
18
- },
19
- orgId: {
20
- type: 'string'
21
- },
22
- departmentId: {
23
- type: 'string'
24
- }
25
- },
26
- additionalProperties: {
27
- type: 'string'
28
- }
14
+ type: 'string'
29
15
  }
30
16
  }
31
17
  },
32
- pageContext: {
18
+ viewId: {
19
+ required: true,
20
+ typeMetadata: {
21
+ schema: {
22
+ type: 'string'
23
+ }
24
+ }
25
+ },
26
+ context: {
33
27
  required: true,
34
28
  typeMetadata: {
35
29
  schema: {
36
30
  type: 'object',
37
31
  properties: {
38
- orgName: {
32
+ orgId: {
39
33
  type: 'string'
40
34
  },
41
- servicePrefix: {
35
+ orgName: {
42
36
  type: 'string'
43
37
  },
44
38
  departmentName: {
45
39
  type: 'string'
46
40
  },
47
- moduleSanitatedName: {
41
+ servicePrefix: {
48
42
  type: 'string'
49
43
  }
50
44
  },
51
- additionalProperties: {
52
- type: 'string'
53
- }
45
+ required: ['orgId', 'orgName', 'departmentName'],
46
+ additionalProperties: false
54
47
  }
55
48
  }
56
49
  },
@@ -69,14 +62,5 @@ export default {
69
62
  }]
70
63
  }
71
64
  }
72
- },
73
- limit: {
74
- required: false,
75
- defaultValue: 50,
76
- typeMetadata: {
77
- schema: {
78
- type: 'number'
79
- }
80
- }
81
65
  }
82
66
  };
@@ -34,6 +34,37 @@ export default {
34
34
  }
35
35
  }
36
36
  },
37
+ options: {
38
+ // NOTE: This is only a sample for FilterDropdown action component
39
+ required: false,
40
+ defaultValue: [],
41
+ typeMetadata: {
42
+ schema: {
43
+ type: "array",
44
+ items: {
45
+ type: "object",
46
+ properties: {
47
+ label: {
48
+ type: "string"
49
+ },
50
+ value: {
51
+ type: "string"
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ },
58
+ isMultiselectable: {
59
+ // NOTE: This is only a sample for FilterDropdown action component
60
+ required: false,
61
+ defaultValue: false,
62
+ typeMetadata: {
63
+ schema: {
64
+ type: "boolean"
65
+ }
66
+ }
67
+ },
37
68
  isVisible: {
38
69
  required: false,
39
70
  defaultValue: true,
@@ -4,7 +4,10 @@ export const actionsSchema = {
4
4
  items: {
5
5
  type: 'object',
6
6
  properties: {
7
- type: {
7
+ component: {
8
+ type: 'string'
9
+ },
10
+ id: {
8
11
  type: 'string'
9
12
  },
10
13
  properties: {
@@ -16,42 +19,24 @@ export const actionsSchema = {
16
19
  items: {
17
20
  type: 'object',
18
21
  properties: {
19
- action: {
20
- type: 'object',
21
- properties: {
22
- id: {
23
- type: 'string'
24
- },
25
- dispatchType: {
26
- type: 'string'
27
- }
28
- },
29
- required: ['id', 'dispatchType']
22
+ id: {
23
+ type: 'string'
30
24
  },
31
- eventType: {
25
+ sourceEvent: {
32
26
  type: 'string'
33
27
  },
34
28
  payload: {
35
29
  type: 'object'
36
30
  }
37
31
  },
38
- required: ['action', 'payload', 'eventType']
32
+ required: ['sourceEvent', 'id']
39
33
  }
40
34
  }
41
35
  },
42
- required: ['type', 'properties']
36
+ required: ['component', 'properties']
43
37
  }
44
38
  };
45
39
  export default {
46
- type: {
47
- required: false,
48
- typeMetadata: {
49
- schema: {
50
- type: 'string'
51
- }
52
- },
53
- defaultValue: ''
54
- },
55
40
  actions: {
56
41
  required: true,
57
42
  typeMetadata: {
@@ -0,0 +1,4 @@
1
+ export const SMART_TABLE_EVENTS = {
2
+ DELETE_RECORDS_SUCCESS: 'SMART_TABLE#RECORD_DELETED',
3
+ UPDATE_RECORDS_SUCCESS: 'SMART_TABLE#RECORD_UPDATED'
4
+ };
@@ -1,16 +1,23 @@
1
1
  import SelectionConfigSchema from "../../bc/list-selection/Properties";
2
2
  export default {
3
- isFlexibleColumns: {
3
+ preferences: {
4
4
  required: false,
5
- defaultValue: false,
5
+ defaultValue: {
6
+ autoColumnSizing: false
7
+ },
6
8
  typeMetadata: {
7
9
  schema: {
8
- type: 'boolean'
10
+ type: 'object',
11
+ properties: {
12
+ autoColumnSizing: {
13
+ type: 'boolean'
14
+ }
15
+ }
9
16
  }
10
17
  }
11
18
  },
12
19
  ...SelectionConfigSchema,
13
- uiMapping: {
20
+ componentMapping: {
14
21
  required: false,
15
22
  defaultValue: {
16
23
  fields: {},
@@ -40,58 +47,5 @@ export default {
40
47
  type: 'string'
41
48
  }
42
49
  }
43
- },
44
- rowActions: {
45
- required: false,
46
- defaultValue: [],
47
- typeMetadata: {
48
- schema: {
49
- type: 'array',
50
- minItems: 0,
51
- items: {
52
- type: 'object',
53
- properties: {
54
- uiType: {
55
- type: 'string'
56
- },
57
- properties: {
58
- type: 'object'
59
- },
60
- eventMappings: {
61
- type: 'array',
62
- minItems: 0,
63
- items: {
64
- type: 'object',
65
- properties: {
66
- id: {
67
- type: 'string'
68
- },
69
- action: {
70
- type: 'object',
71
- properties: {
72
- id: {
73
- type: 'string'
74
- },
75
- dispatchType: {
76
- type: 'string'
77
- }
78
- },
79
- required: ['id', 'dispatchType']
80
- },
81
- eventType: {
82
- type: 'string'
83
- },
84
- payloadMapping: {
85
- type: 'string'
86
- }
87
- },
88
- required: ['id', 'action', 'payloadMapping', 'eventType']
89
- }
90
- }
91
- },
92
- required: ['uiType', 'properties']
93
- }
94
- }
95
- }
96
50
  }
97
51
  };
@@ -1,7 +1,7 @@
1
1
  import { Alignment, SortedBy, Width } from "./data-types/Header";
2
2
  import RowCursor from "./data-types/RowCursor";
3
3
  import ResizerConfigSchema from "../../bc/table-column-resizer/Properties";
4
- import { actionsSchema } from "../action-location/Properties";
4
+ import { actionsSchema } from "../../platform/client-actions/cc/action-event-mediator/Properties";
5
5
  import PropertiesConverter from "../component/properties/PropertiesConverter";
6
6
  import BooleanProperties from "../fields/boolean/Properties";
7
7
  import CurrencyProperties from "../fields/currency/Properties";
@@ -147,7 +147,7 @@ const TableListProperties = {
147
147
  }]
148
148
  },
149
149
  ActionLocation: {
150
- type: 'object',
150
+ renderComponentType: 'object',
151
151
  properties: {
152
152
  type: {
153
153
  type: 'string'
@@ -18,4 +18,10 @@ export let Alignment = /*#__PURE__*/function (Alignment) {
18
18
  Alignment["Center"] = "center";
19
19
  Alignment["Right"] = "right";
20
20
  return Alignment;
21
+ }({});
22
+ export let AlignmentOfFlex = /*#__PURE__*/function (AlignmentOfFlex) {
23
+ AlignmentOfFlex["left"] = "start";
24
+ AlignmentOfFlex["center"] = "center";
25
+ AlignmentOfFlex["right"] = "end";
26
+ return AlignmentOfFlex;
21
27
  }({});
@@ -1,4 +1,5 @@
1
1
  import { ZLIST_DELETE_RECORD, ZLIST_DELETE_RECORDS, ZLIST_RECORD_UPDATE } from "../../../bc/zlist/Constants";
2
+ import { RECORD_LOCAL_MULTIPLE_DELETE, RECORD_LOCAL_UPDATE } from "../../../bc/zrecord/Constants";
2
3
  /* eslint-disable max-lines-per-function */
3
4
 
4
5
  export default class ListSdkFactory {
@@ -21,25 +22,84 @@ export default class ListSdkFactory {
21
22
  return (_state$behaviours2 = state.behaviours) === null || _state$behaviours2 === void 0 ? void 0 : (_state$behaviours2$zr = _state$behaviours2.zrecord.records) === null || _state$behaviours2$zr === void 0 ? void 0 : _state$behaviours2$zr.find(r => r.id === recordId);
22
23
  },
23
24
 
25
+ getContext(variableName) {
26
+ var _state$properties;
27
+
28
+ const {
29
+ departmentId,
30
+ viewId,
31
+ moduleName
32
+ } = state.properties;
33
+ const {
34
+ servicePrefix,
35
+ ...context
36
+ } = (_state$properties = state.properties) === null || _state$properties === void 0 ? void 0 : _state$properties.context;
37
+ const updatedContext = { ...context,
38
+ departmentId,
39
+ viewId,
40
+ moduleName
41
+ };
42
+ return variableName ? context === null || context === void 0 ? void 0 : context[variableName] : updatedContext;
43
+ },
44
+
24
45
  deleteRecord(recordId) {
46
+ let output = {
47
+ "data": [{
48
+ "id": recordId,
49
+ "Success": true,
50
+ "error": null
51
+ }]
52
+ };
25
53
  dispatch({
26
54
  type: ZLIST_DELETE_RECORD,
27
55
  payload: {
28
56
  recordId
29
57
  }
30
58
  });
59
+ return output;
31
60
  },
32
61
 
62
+ // deleteRecords(recordIds) {
63
+ // dispatch({
64
+ // type: ZLIST_DELETE_RECORDS,
65
+ // payload: {
66
+ // recordIds
67
+ // }
68
+ // });
69
+ // },
33
70
  deleteRecords(recordIds) {
71
+ let shouldFetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
72
+ let output = {
73
+ "data": []
74
+ };
75
+ let DELETE_ACTION = shouldFetch ? ZLIST_DELETE_RECORDS : RECORD_LOCAL_MULTIPLE_DELETE;
34
76
  dispatch({
35
- type: ZLIST_DELETE_RECORDS,
77
+ type: DELETE_ACTION,
36
78
  payload: {
37
79
  recordIds
38
80
  }
39
81
  });
82
+
83
+ for (let recordId of recordIds) {
84
+ let recordUpdateDetail = {
85
+ "id": recordId,
86
+ "Success": true,
87
+ "error": null
88
+ };
89
+ output.data.push(recordUpdateDetail);
90
+ }
91
+
92
+ return output;
40
93
  },
41
94
 
42
95
  updateRecord(recordId, record) {
96
+ let output = {
97
+ "results": [{
98
+ "id": recordId,
99
+ "Success": true,
100
+ "error": null
101
+ }]
102
+ };
43
103
  dispatch({
44
104
  type: ZLIST_RECORD_UPDATE,
45
105
  payload: {
@@ -47,6 +107,33 @@ export default class ListSdkFactory {
47
107
  record
48
108
  }
49
109
  });
110
+ return output;
111
+ },
112
+
113
+ updateRecords(recordsMap) {
114
+ let shouldFetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
115
+ let output = {
116
+ "results": []
117
+ };
118
+ let UPDATE_ACTION = shouldFetch ? ZLIST_RECORD_UPDATE : RECORD_LOCAL_UPDATE;
119
+
120
+ for (let record of recordsMap) {
121
+ dispatch({
122
+ type: UPDATE_ACTION,
123
+ payload: {
124
+ recordId: record.id,
125
+ record: record
126
+ }
127
+ });
128
+ let recordUpdateDetail = {
129
+ "id": record.id,
130
+ "Success": true,
131
+ "error": null
132
+ };
133
+ output.results.push(recordUpdateDetail);
134
+ }
135
+
136
+ return output;
50
137
  }
51
138
 
52
139
  }
@@ -7,28 +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";
12
- import ClientActionBehaviourFactory from "../../../platform/zclient-actions/frameworks/ClientActionBehaviourFactory";
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";
13
13
  export default class TableConnectedFactory {
14
14
  static create(_ref) {
15
+ var _dataSource2;
16
+
15
17
  let {
16
18
  name,
17
- dataBroker = defaultDataBroker,
19
+ dataBroker,
20
+ dataSource,
18
21
  eventHandlers = {},
19
22
  View = TableConnectedView
20
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
+ };
21
35
  return createCustomComponent({
22
36
  name: name,
23
37
  View: View,
24
38
  properties: Properties,
25
39
  eventHandlers: EventHandlersFactory.create(eventHandlers),
26
40
  transformState: TableTranslator.transformState,
27
- behaviours: [ZHttpBehaviourFactory.create(), DataBrokerBehaviourFactory.create(), RecordBehaviourFactory.create(dataBroker.httpTemplates), ClientActionBehaviourFactory.create({
28
- getClientActions: dataBroker.httpTemplates.getClientActions
41
+ behaviours: [ZHttpBehaviourFactory.create(), DataSourceBehaviourFactory.create(), RecordBehaviourFactory.create(_dataSource.httpTemplates), ClientActionsBehaviourFactory.create({
42
+ getClientActions: _dataSource.httpTemplates.getClientActions
29
43
  }), ZFieldBehaviourFactory.create({
30
- availableFields: dataBroker.httpTemplates.getAvailableFields,
31
- selectedFields: dataBroker.httpTemplates.getSelectedFields
44
+ availableFields: _dataSource.httpTemplates.getAvailableFields,
45
+ selectedFields: _dataSource.httpTemplates.getSelectedFields
32
46
  }), ZListBehaviourFactory.create()]
33
47
  });
34
48
  }
@@ -15,14 +15,17 @@ function View(_ref, ref) {
15
15
  emptyStateUiType
16
16
  } = state;
17
17
  const {
18
- isFlexibleColumns,
18
+ preferences,
19
19
  selectionConfig
20
20
  } = properties;
21
+ const {
22
+ autoColumnSizing
23
+ } = preferences || {};
21
24
  return /*#__PURE__*/React.createElement(TableList, {
22
25
  data: data,
23
26
  rowCursor: rowCursor,
24
27
  getRef: ref,
25
- isFlexibleColumns: isFlexibleColumns,
28
+ isFlexibleColumns: autoColumnSizing,
26
29
  rowActionsConfig: rowActionsConfig,
27
30
  isLoading: isLoading,
28
31
  emptyStateUiType: emptyStateUiType,
@@ -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;
@@ -26,6 +26,7 @@ function Header(_ref) {
26
26
  }
27
27
 
28
28
  return /*#__PURE__*/React.createElement(TableHeader, {
29
+ $flag_isColumnsFlexible: isFlexibleColumns,
29
30
  $flag_padding: !isSelectionEnabled
30
31
  }, /*#__PURE__*/React.createElement(TableHeaderRow, null, renderSelectAll(isSelectionEnabled, hasAllSelected, dispatch), renderHeaders(headers, currentlyResizingColumn, isResizerEnabled, isFlexibleColumns, dispatch), renderActionColumn(hasRowActions, rowActionsColumnWidth), renderResizerExtraSpace(isCurrentlyResizing, resizerExtraWidth)));
31
32
  }
@@ -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
 
@@ -19,8 +22,10 @@ function HeaderData(_ref) {
19
22
  text,
20
23
  sortable,
21
24
  width,
22
- alignment
25
+ alignment,
26
+ actions
23
27
  } = header;
28
+ const hasActions = Boolean(actions === null || actions === void 0 ? void 0 : actions.length);
24
29
  return (
25
30
  /*#__PURE__*/
26
31
  // @ts-ignore
@@ -30,7 +35,12 @@ function HeaderData(_ref) {
30
35
  $flag_flexible: isFlexibleColumns,
31
36
  $a11yAttributes_container: {
32
37
  'aria-sort': sortable ? sortedBy : 'none'
33
- }
38
+ },
39
+ $customProps_container: hasActions ? {
40
+ $ui_displayMode: 'flex',
41
+ $ui_alignItems: 'center',
42
+ $ui_justifyContent: AlignmentOfFlex[alignment]
43
+ } : null
34
44
  }, /*#__PURE__*/React.createElement(HeaderText, {
35
45
  id: id,
36
46
  name: name,
@@ -39,7 +49,10 @@ function HeaderData(_ref) {
39
49
  sortedBy: sortedBy,
40
50
  sortTooltip: sortTooltip,
41
51
  dispatch: dispatch
42
- }), /*#__PURE__*/React.createElement(ColumnResizer, {
52
+ }), hasActions ? /*#__PURE__*/React.createElement(ActionEventMediator, {
53
+ actions: actions,
54
+ gap: ActionViewGap.SMALL
55
+ }) : null, /*#__PURE__*/React.createElement(ColumnResizer, {
43
56
  isResizerEnabled: isResizerEnabled,
44
57
  isResizing: isResizing
45
58
  }))