@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
@@ -0,0 +1,17 @@
1
+ import AbstractUseCase from "./AbstractUseCase";
2
+ import { DATA_SOURCE_REGISTER } from "../../../../../../bc/zdata-source/Constants";
3
+ export default class InitializeUseCase extends AbstractUseCase {
4
+ execute(input) {
5
+ const {
6
+ apiTemplates,
7
+ dispatch
8
+ } = input;
9
+ dispatch({
10
+ type: DATA_SOURCE_REGISTER,
11
+ payload: {
12
+ apiTemplates
13
+ }
14
+ });
15
+ }
16
+
17
+ }
@@ -0,0 +1,27 @@
1
+ import AbstractUseCase from "./AbstractUseCase";
2
+
3
+ class NoContentUseCase extends AbstractUseCase {
4
+ execute(input) {
5
+ const {
6
+ presenter,
7
+ repository
8
+ } = this.dependencies;
9
+ const {
10
+ dispatch,
11
+ metaData
12
+ } = input;
13
+ const recordManager = repository.getClientActionsManagerEntity();
14
+
15
+ if (recordManager.isGetClientActionsApi(metaData.actionName)) {
16
+ presenter.updateClientAction(recordManager.toObject());
17
+ }
18
+
19
+ const events = recordManager.createNoContentEvents(metaData);
20
+ events.forEach(event => {
21
+ dispatch(event);
22
+ });
23
+ }
24
+
25
+ }
26
+
27
+ export default NoContentUseCase;
@@ -0,0 +1,21 @@
1
+ import AbstractUseCase from "./AbstractUseCase";
2
+ import ClientActionFactory from "../entities-factory/ClientActionFactory";
3
+
4
+ class SetClientActionsUseCase extends AbstractUseCase {
5
+ execute(input) {
6
+ const {
7
+ presenter,
8
+ repository
9
+ } = this.dependencies;
10
+ const {
11
+ clientActions
12
+ } = input;
13
+ const recordManager = repository.getClientActionsManagerEntity();
14
+ const recordsEntity = ClientActionFactory.createMultipleClientActions(clientActions);
15
+ recordManager.setClientActions(recordsEntity);
16
+ presenter.updateClientAction(recordManager.toObject());
17
+ }
18
+
19
+ }
20
+
21
+ export default SetClientActionsUseCase;
@@ -0,0 +1,22 @@
1
+ import AbstractUseCase from "./AbstractUseCase";
2
+
3
+ class SuccessUseCase extends AbstractUseCase {
4
+ execute(input) {
5
+ const {
6
+ repository
7
+ } = this.dependencies;
8
+ const {
9
+ response,
10
+ metaData,
11
+ dispatch
12
+ } = input;
13
+ const recordManager = repository.getClientActionsManagerEntity();
14
+ const events = recordManager.createSuccessEvents(response, metaData);
15
+ events.forEach(event => {
16
+ dispatch(event);
17
+ });
18
+ }
19
+
20
+ }
21
+
22
+ export default SuccessUseCase;
@@ -0,0 +1,65 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ import UIComponentMapping from "./UIComponentMapping";
4
+ export default class ClientAction {
5
+ constructor(clientActionObj) {
6
+ _defineProperty(this, "id", void 0);
7
+
8
+ _defineProperty(this, "name", void 0);
9
+
10
+ _defineProperty(this, "component", void 0);
11
+
12
+ _defineProperty(this, "location", void 0);
13
+
14
+ _defineProperty(this, "uiComponentMapping", void 0);
15
+
16
+ _defineProperty(this, "modules", void 0);
17
+
18
+ _defineProperty(this, "modifiedTime", void 0);
19
+
20
+ _defineProperty(this, "createdTime", void 0);
21
+
22
+ _defineProperty(this, "modifiedBy", void 0);
23
+
24
+ _defineProperty(this, "createdBy", void 0);
25
+
26
+ _defineProperty(this, "conditions", void 0);
27
+
28
+ _defineProperty(this, "conditionMeta", void 0);
29
+
30
+ this.id = clientActionObj.id;
31
+ this.name = clientActionObj.name;
32
+ this.component = clientActionObj.component;
33
+ this.location = clientActionObj.location;
34
+ this.uiComponentMapping = new UIComponentMapping(clientActionObj.uiComponentMapping);
35
+ this.modules = clientActionObj.modules;
36
+ this.modifiedTime = clientActionObj.modifiedTime;
37
+ this.createdTime = clientActionObj.createdTime;
38
+ this.modifiedBy = clientActionObj.modifiedBy;
39
+ this.createdBy = clientActionObj.createdBy;
40
+ this.conditions = clientActionObj.conditions;
41
+ this.conditionMeta = clientActionObj.conditions;
42
+ }
43
+
44
+ toObject() {
45
+ return {
46
+ id: this.id,
47
+ name: this.name,
48
+ component: this.component,
49
+ location: this.location,
50
+ uiComponentMapping: this.uiComponentMapping.toObject(),
51
+ modules: this.modules,
52
+ modifiedTime: this.modifiedTime,
53
+ createdTime: this.createdTime,
54
+ modifiedBy: this.modifiedBy,
55
+ createdBy: this.createdBy,
56
+ conditions: this.conditions,
57
+ conditionsMeta: this.conditionMeta
58
+ };
59
+ }
60
+
61
+ getId() {
62
+ return this.id;
63
+ }
64
+
65
+ }
@@ -0,0 +1,141 @@
1
+ import { DATA_SOURCE_FAILURE, DATA_SOURCE_NO_CONTENT, DATA_SOURCE_SUCCESS } from "../../../../../../bc/zdata-source/Symbols";
2
+ import { DATA_SOURCE_EXECUTE } from "../../../../../../bc/zdata-source/Constants";
3
+ import { CLIENTACTION_EXECUTE_FAIL_CALLBACK, CLIENTACTION_EXECUTE_SUCCESS_CALLBACK, CLIENTACTION_EXECUTE_SUCCESS_NO_CONTENT_CALLBACK, ClientActionApiActionName } from "../../../../bc/zclient-actions/Constants";
4
+ import GetClientActionsStrategy from "./GetClientActionsStrategy";
5
+ const clientActionExecuteStrategiesMap = {
6
+ [ClientActionApiActionName.GET_CLIENTACTIONS]: new GetClientActionsStrategy()
7
+ };
8
+ export default class ClientActionManager {
9
+ constructor(clientActions) {
10
+ this.clientActions = clientActions;
11
+ }
12
+
13
+ createDataSourceMeta(_ref) {
14
+ let {
15
+ actionName,
16
+ successMeta,
17
+ successNoContentMeta,
18
+ failureMeta
19
+ } = _ref;
20
+ return {
21
+ actionName,
22
+ [DATA_SOURCE_NO_CONTENT]: successNoContentMeta,
23
+ [DATA_SOURCE_FAILURE]: failureMeta,
24
+ [DATA_SOURCE_SUCCESS]: successMeta
25
+ };
26
+ }
27
+
28
+ createDataSourceExecuteEvent(props, actionName, metaData) {
29
+ return {
30
+ type: DATA_SOURCE_EXECUTE,
31
+ payload: {
32
+ props,
33
+ actionName
34
+ },
35
+ metaData
36
+ };
37
+ }
38
+
39
+ createFetchClientActionMeta(actionName, apiName, props) {
40
+ const clientActionExecuteStrategyMeta = {
41
+ actionName,
42
+ apiName,
43
+ props
44
+ };
45
+
46
+ if (this.isGetClientActionsApi(actionName)) {
47
+ clientActionExecuteStrategyMeta.props.from = 1;
48
+ }
49
+
50
+ const successMeta = {
51
+ type: CLIENTACTION_EXECUTE_SUCCESS_CALLBACK,
52
+ metaData: clientActionExecuteStrategyMeta
53
+ };
54
+ const successNoContentMeta = {
55
+ type: CLIENTACTION_EXECUTE_SUCCESS_NO_CONTENT_CALLBACK,
56
+ metaData: clientActionExecuteStrategyMeta
57
+ };
58
+ const failureMeta = {
59
+ type: CLIENTACTION_EXECUTE_FAIL_CALLBACK,
60
+ metaData: clientActionExecuteStrategyMeta
61
+ };
62
+ return this.createDataSourceMeta({
63
+ actionName,
64
+ successNoContentMeta,
65
+ failureMeta,
66
+ successMeta
67
+ });
68
+ }
69
+
70
+ createSuccessEvents(response, metaData) {
71
+ const {
72
+ actionName
73
+ } = metaData;
74
+ const strategy = clientActionExecuteStrategiesMap[actionName];
75
+
76
+ if (strategy) {
77
+ return strategy.createSuccessEvents(response, metaData);
78
+ } else {
79
+ return [];
80
+ }
81
+ }
82
+
83
+ createNoContentEvents(metaData) {
84
+ const {
85
+ actionName
86
+ } = metaData;
87
+ const strategy = clientActionExecuteStrategiesMap[actionName];
88
+
89
+ if (strategy) {
90
+ return strategy.createNoContentEvents(metaData);
91
+ } else {
92
+ return [];
93
+ }
94
+ }
95
+
96
+ createFailureEvents(error, metaData) {
97
+ const {
98
+ actionName
99
+ } = metaData;
100
+ const strategy = clientActionExecuteStrategiesMap[actionName];
101
+
102
+ if (strategy) {
103
+ return strategy.createFailureEvents(error, metaData);
104
+ } else {
105
+ return [];
106
+ }
107
+ }
108
+
109
+ fetchingStarted() {
110
+ this.clientActions.setIsFetching(true);
111
+ }
112
+
113
+ fetchingFinished() {
114
+ this.clientActions.setIsFetching(false);
115
+ }
116
+
117
+ setClientActions(clientActions) {
118
+ this.clientActions.setClientActions(clientActions);
119
+ }
120
+
121
+ isGetClientActionsApi(actionName) {
122
+ return ClientActionApiActionName.GET_CLIENTACTIONS === actionName;
123
+ }
124
+
125
+ isClientActionsFetching() {
126
+ return this.clientActions.isClientActionsFetching();
127
+ }
128
+
129
+ isClientActionApiName(apiName) {
130
+ return apiName === 'clientActions';
131
+ }
132
+
133
+ toObject() {
134
+ const clientActionsObj = this.clientActions.toObject();
135
+ return {
136
+ clientActions: clientActionsObj.data,
137
+ isFetching: clientActionsObj.isFetching
138
+ };
139
+ }
140
+
141
+ }
@@ -0,0 +1,50 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ import ClientAction from "./ClientAction";
4
+ export default class ClientActions {
5
+ constructor(_ref) {
6
+ let {
7
+ data,
8
+ isFetching
9
+ } = _ref;
10
+ let fetchLimit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
11
+
12
+ _defineProperty(this, "clientActions", void 0);
13
+
14
+ _defineProperty(this, "isFetching", void 0);
15
+
16
+ _defineProperty(this, "fetchLimit", void 0);
17
+
18
+ this.clientActions = data.map(obj => new ClientAction(obj));
19
+ this.fetchLimit = fetchLimit;
20
+ this.isFetching = isFetching;
21
+ }
22
+
23
+ setIsFetching(isFetching) {
24
+ this.isFetching = isFetching;
25
+ }
26
+
27
+ setClientActions(clientActions) {
28
+ this.clientActions = clientActions;
29
+ }
30
+
31
+ isClientActionsFetching() {
32
+ return this.isFetching;
33
+ }
34
+
35
+ getClientActionsLength() {
36
+ return this.clientActions.length;
37
+ }
38
+
39
+ getClientAction(id) {
40
+ return this.clientActions.find(clientAction => clientAction.getId() === id) || null;
41
+ }
42
+
43
+ toObject() {
44
+ return {
45
+ data: this.clientActions.map(action => action.toObject()),
46
+ isFetching: this.isFetching
47
+ };
48
+ }
49
+
50
+ }
@@ -0,0 +1,36 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ export default class EventMapping {
4
+ constructor(eventMappingObj) {
5
+ _defineProperty(this, "id", void 0);
6
+
7
+ _defineProperty(this, "sourceEvent", void 0);
8
+
9
+ _defineProperty(this, "targetEvent", void 0);
10
+
11
+ _defineProperty(this, "payloadValueMapping", void 0);
12
+
13
+ _defineProperty(this, "payloadValueMappingMeta", void 0);
14
+
15
+ this.id = eventMappingObj.id;
16
+ this.sourceEvent = eventMappingObj.sourceEvent;
17
+ this.targetEvent = eventMappingObj.targetEvent;
18
+ this.payloadValueMapping = eventMappingObj.payloadValueMapping;
19
+ this.payloadValueMappingMeta = eventMappingObj.payloadValueMapping;
20
+ }
21
+
22
+ toObject() {
23
+ return {
24
+ id: this.id,
25
+ sourceEvent: this.sourceEvent,
26
+ targetEvent: this.targetEvent,
27
+ payloadValueMapping: this.payloadValueMapping,
28
+ payloadValueMappingMeta: this.payloadValueMappingMeta
29
+ };
30
+ }
31
+
32
+ getId() {
33
+ return this.id;
34
+ }
35
+
36
+ }
@@ -0,0 +1,15 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ import EventMapping from "./EventMapping";
4
+ export default class EventMappings {
5
+ constructor(eventMappings) {
6
+ _defineProperty(this, "input", void 0);
7
+
8
+ this.input = eventMappings.map(eventMapping => new EventMapping(eventMapping));
9
+ }
10
+
11
+ toArray() {
12
+ return this.input;
13
+ }
14
+
15
+ }
@@ -0,0 +1,44 @@
1
+ import { CLIENTACTION_EXECUTE_FAILED, CLIENTACTION_EXECUTE_SUCCEEDED, CLIENTACTION_EXECUTE_SUCCEEDED_NO_CONTENT, SET_CLIENTACTIONS } from "../../../../bc/zclient-actions/Constants";
2
+ export default class GetClientActionsStrategy {
3
+ createSuccessEvents(response, metaData) {
4
+ const events = [];
5
+ const clientActions = response;
6
+ events.push({
7
+ type: SET_CLIENTACTIONS,
8
+ payload: {
9
+ clientActions
10
+ }
11
+ });
12
+ events.push({
13
+ type: CLIENTACTION_EXECUTE_SUCCEEDED,
14
+ payload: {
15
+ clientActions
16
+ },
17
+ metaData
18
+ });
19
+ return events;
20
+ }
21
+
22
+ createNoContentEvents(metaData) {
23
+ const events = [];
24
+ events.push({
25
+ type: CLIENTACTION_EXECUTE_SUCCEEDED_NO_CONTENT,
26
+ payload: {},
27
+ metaData
28
+ });
29
+ return events;
30
+ }
31
+
32
+ createFailureEvents(error, metaData) {
33
+ const events = [];
34
+ events.push({
35
+ type: CLIENTACTION_EXECUTE_FAILED,
36
+ payload: {
37
+ error
38
+ },
39
+ metaData
40
+ });
41
+ return events;
42
+ }
43
+
44
+ }
@@ -0,0 +1,41 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ import EventMappings from "./EventMappings";
4
+ export default class UIComponentMapping {
5
+ constructor(uiComponentMappingObj) {
6
+ _defineProperty(this, "id", void 0);
7
+
8
+ _defineProperty(this, "name", void 0);
9
+
10
+ _defineProperty(this, "component", void 0);
11
+
12
+ _defineProperty(this, "propertiesValueMapping", void 0);
13
+
14
+ _defineProperty(this, "propertiesValueMappingMeta", void 0);
15
+
16
+ _defineProperty(this, "eventMappings", void 0);
17
+
18
+ this.id = uiComponentMappingObj.id;
19
+ this.name = uiComponentMappingObj.name;
20
+ this.component = uiComponentMappingObj.component;
21
+ this.propertiesValueMapping = uiComponentMappingObj.propertiesValueMapping;
22
+ this.propertiesValueMappingMeta = uiComponentMappingObj.propertiesValueMapping;
23
+ this.eventMappings = new EventMappings(uiComponentMappingObj.eventMappings);
24
+ }
25
+
26
+ toObject() {
27
+ return {
28
+ id: this.id,
29
+ name: this.name,
30
+ component: this.component,
31
+ propertiesValueMapping: this.propertiesValueMapping,
32
+ propertiesValueMappingMeta: this.propertiesValueMappingMeta,
33
+ eventMappings: this.eventMappings.toArray().map(eventMapping => eventMapping.toObject())
34
+ };
35
+ }
36
+
37
+ getId() {
38
+ return this.id;
39
+ }
40
+
41
+ }
@@ -0,0 +1,47 @@
1
+ import MountController from "../adapters/controllers/MountController";
2
+ import Presenter from "../adapters/presenters/Presenter";
3
+ import Repository from "../adapters/gateways/Repository";
4
+ import Service from "../adapters/gateways/Service";
5
+ import ClientActionBehaviourExecutorController from "../adapters/controllers/ClientActionBehaviourExecutorController";
6
+ import FailureController from "../adapters/controllers/FailureController";
7
+ import SuccessController from "../adapters/controllers/SuccessController";
8
+ import NoContentController from "../adapters/controllers/NoContentController";
9
+ import SetClientActionsController from "../adapters/controllers/SetClientActionsController";
10
+ import FetchStateStopController from "../adapters/controllers/FetchStateStopController";
11
+ import { CLIENTACTION_BEHAVIOUR_EXECUTE, CLIENTACTION_EXECUTE_FAIL_CALLBACK, CLIENTACTION_EXECUTE_FAILED, CLIENTACTION_EXECUTE_SUCCEEDED, CLIENTACTION_EXECUTE_SUCCEEDED_NO_CONTENT, CLIENTACTION_EXECUTE_SUCCESS_CALLBACK, SET_CLIENTACTIONS, CLIENTACTION_EXECUTE_SUCCESS_NO_CONTENT_CALLBACK } from "../../../bc/zclient-actions/Constants";
12
+ export default class ActionsHandlersFactory {
13
+ static getClientActionControllerHandles(service) {
14
+ return {
15
+ executeClientActionBehaviour: new ClientActionBehaviourExecutorController(service).handle,
16
+ failure: new FailureController(service).handle,
17
+ success: new SuccessController(service).handle,
18
+ noContent: new NoContentController(service).handle,
19
+ setClientActions: new SetClientActionsController(service).handle,
20
+ fetchStateStop: new FetchStateStopController(service).handle
21
+ };
22
+ }
23
+
24
+ static create(apiDetails) {
25
+ const presenter = new Presenter();
26
+ const repository = new Repository();
27
+ const dependencies = {
28
+ presenter,
29
+ repository
30
+ };
31
+ const service = new Service(dependencies);
32
+ const mountController = new MountController(apiDetails, service);
33
+ const clientActionControllerHandle = ActionsHandlersFactory.getClientActionControllerHandles(service);
34
+ return {
35
+ MOUNT: mountController.handle,
36
+ [CLIENTACTION_BEHAVIOUR_EXECUTE]: clientActionControllerHandle.executeClientActionBehaviour,
37
+ [CLIENTACTION_EXECUTE_FAIL_CALLBACK]: clientActionControllerHandle.failure,
38
+ [CLIENTACTION_EXECUTE_SUCCESS_CALLBACK]: clientActionControllerHandle.success,
39
+ [CLIENTACTION_EXECUTE_SUCCEEDED]: clientActionControllerHandle.fetchStateStop,
40
+ [CLIENTACTION_EXECUTE_FAILED]: clientActionControllerHandle.fetchStateStop,
41
+ [CLIENTACTION_EXECUTE_SUCCEEDED_NO_CONTENT]: clientActionControllerHandle.fetchStateStop,
42
+ [SET_CLIENTACTIONS]: clientActionControllerHandle.setClientActions,
43
+ [CLIENTACTION_EXECUTE_SUCCESS_NO_CONTENT_CALLBACK]: clientActionControllerHandle.noContent
44
+ };
45
+ }
46
+
47
+ }
@@ -0,0 +1,12 @@
1
+ import ActionsHandlersFactory from "./ActionsHandlersFactory";
2
+ export default class ClientActionsBehaviourFactory {
3
+ static create(apiDetails) {
4
+ return {
5
+ name: 'zclientAction',
6
+ eventHandlers: ActionsHandlersFactory.create(apiDetails),
7
+ properties: {},
8
+ setInitialState: () => ({})
9
+ };
10
+ }
11
+
12
+ }
@@ -0,0 +1,34 @@
1
+ import { ActionViewGap } from "../../components/interfaces/ActionViewModel";
2
+ import { actionSchema } from "../dynamic-action-component/Properties";
3
+ export const actionsSchema = {
4
+ type: 'array',
5
+ minItems: 0,
6
+ items: actionSchema
7
+ };
8
+ export default {
9
+ actions: {
10
+ required: true,
11
+ typeMetadata: {
12
+ schema: actionsSchema
13
+ }
14
+ },
15
+ renderComponentType: {
16
+ required: false,
17
+ typeMetadata: {
18
+ schema: {
19
+ type: 'string'
20
+ }
21
+ },
22
+ defaultValue: ''
23
+ },
24
+ gap: {
25
+ required: false,
26
+ defaultValue: ActionViewGap.NONE,
27
+ typeMetadata: {
28
+ schema: {
29
+ type: 'string',
30
+ enum: Object.values(ActionViewGap)
31
+ }
32
+ }
33
+ }
34
+ };