@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
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import TableAction from '@zohodesk-private/desk-components/es/table/TableAction/TableAction';
3
- import ActionLocation from "../../../../../action-location/frameworks/ui/ActionLocation";
3
+ import ActionEventMediator from "../../../../../../../../platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
4
+ import { ActionViewGap } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
4
5
  export default function RowActions(_ref) {
5
6
  let {
6
7
  hasActions,
@@ -13,9 +14,10 @@ export default function RowActions(_ref) {
13
14
  if (hasActions) {
14
15
  return /*#__PURE__*/React.createElement(TableAction, {
15
16
  $data_width: columnWidth
16
- }, /*#__PURE__*/React.createElement(ActionLocation, {
17
- type: type,
18
- actions: actions
17
+ }, /*#__PURE__*/React.createElement(ActionEventMediator, {
18
+ actions: actions,
19
+ renderComponentType: type,
20
+ gap: ActionViewGap.MEDIUM
19
21
  }));
20
22
  }
21
23
 
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
2
  import TableData from '@zohodesk-private/desk-components/es/table/TableData/TableData';
3
+ import ActionEventMediator from "../../../../../../../../platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
4
+ import { ActionViewGap } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
5
+ import { AlignmentOfFlex } from "../../../../../../../../cc/table-list/data-types/Header";
3
6
  import FieldComponent from "../field/FieldComponent";
4
7
  export default function RowData(_ref) {
5
8
  let {
@@ -10,14 +13,24 @@ export default function RowData(_ref) {
10
13
  } = _ref;
11
14
  let {
12
15
  type,
16
+ actions,
13
17
  ...props
14
18
  } = field;
19
+ const hasActions = Boolean(actions === null || actions === void 0 ? void 0 : actions.length);
15
20
  return /*#__PURE__*/React.createElement(TableData, {
16
- $ui_align: alignment,
21
+ $ui_align: hasActions ? null : alignment,
17
22
  $data_width: width,
18
- $flag_flexible: isFlexibleColumns
23
+ $flag_flexible: isFlexibleColumns,
24
+ $customProps_container: hasActions ? {
25
+ $ui_displayMode: 'flex',
26
+ $ui_alignItems: 'center',
27
+ $ui_justifyContent: AlignmentOfFlex[alignment]
28
+ } : null
19
29
  }, /*#__PURE__*/React.createElement(FieldComponent, {
20
30
  type: type,
21
31
  fieldProps: props
22
- }));
32
+ }), hasActions ? /*#__PURE__*/React.createElement(ActionEventMediator, {
33
+ actions: actions,
34
+ gap: ActionViewGap.SMALL
35
+ }) : null);
23
36
  }
@@ -1,6 +1,6 @@
1
1
  import { createCustomComponent } from "../../../../../custom-component";
2
2
  import Properties from "../../../../../../cc/action-icon/Properties";
3
- import ActionIconView from "./ActionIconView";
3
+ import ActionIconView, { ButtonView, FilterDropdownView } from "./ActionIconView";
4
4
  const ActionIcon = createCustomComponent({
5
5
  name: 'ActionIcon',
6
6
  View: ActionIconView,
@@ -8,4 +8,20 @@ const ActionIcon = createCustomComponent({
8
8
  events: [],
9
9
  eventHandlers: {}
10
10
  });
11
- export default ActionIcon;
11
+ export default ActionIcon; // NOTE: This is a sample of Button action component
12
+
13
+ export const Button = createCustomComponent({
14
+ name: 'Button',
15
+ View: ButtonView,
16
+ properties: Properties,
17
+ events: [],
18
+ eventHandlers: {}
19
+ }); // NOTE: This is a sample of FilterDropdown action component
20
+
21
+ export const FilterDropdown = createCustomComponent({
22
+ name: 'FilterDropdown',
23
+ View: FilterDropdownView,
24
+ properties: Properties,
25
+ events: [],
26
+ eventHandlers: {}
27
+ });
@@ -24,7 +24,6 @@ export default function ActionIconView(_ref, ref) {
24
24
  }, /*#__PURE__*/React.createElement(ActionIcon, {
25
25
  $ui_iconName: icon,
26
26
  $ui_hoverVariant: hoverVariant,
27
- $flag_gap: true,
28
27
  $flag_disabled: isDisabled,
29
28
  $i18n_tooltip: label,
30
29
  $event_onClick: !isDisabled ? () => {
@@ -33,4 +32,79 @@ export default function ActionIconView(_ref, ref) {
33
32
  });
34
33
  } : null
35
34
  }));
35
+ } // NOTE: This is a sample of Button action component
36
+
37
+ export function ButtonView(_ref2, ref) {
38
+ let {
39
+ state,
40
+ helpers
41
+ } = _ref2;
42
+ const {
43
+ dispatch
44
+ } = helpers;
45
+ const {
46
+ sourceEvent,
47
+ payload
48
+ } = state.properties.appendToActionPayload.eventMappings[0];
49
+ const {
50
+ value
51
+ } = payload;
52
+ return /*#__PURE__*/React.createElement("span", {
53
+ "data-title": value,
54
+ onClick: () => dispatch({
55
+ type: sourceEvent
56
+ }),
57
+ ref: ref
58
+ }, value);
59
+ return /*#__PURE__*/React.createElement("button", {
60
+ ref: ref,
61
+ onClick: () => {
62
+ dispatch({
63
+ type: sourceEvent
64
+ });
65
+ }
66
+ }, value);
67
+ } // NOTE: This is a sample of FilterDropdown action component
68
+
69
+ export function FilterDropdownView(_ref3, ref) {
70
+ let {
71
+ state,
72
+ helpers
73
+ } = _ref3;
74
+ const {
75
+ dispatch
76
+ } = helpers;
77
+ const {
78
+ options,
79
+ isMultiselectable
80
+ } = state.properties;
81
+ const {
82
+ sourceEvent,
83
+ payload
84
+ } = state.properties.appendToActionPayload.eventMappings[0];
85
+ const {
86
+ fieldName: value
87
+ } = payload;
88
+ return /*#__PURE__*/React.createElement("span", {
89
+ "data-title": value,
90
+ onClick: () => dispatch({
91
+ type: sourceEvent
92
+ }),
93
+ ref: ref
94
+ }, value);
95
+ return /*#__PURE__*/React.createElement("select", {
96
+ "data-title": '',
97
+ ref: ref,
98
+ onChange: e => dispatch({
99
+ type: sourceEvent,
100
+ payload: {
101
+ sourcePayload: {
102
+ selectedValue: e.target.value
103
+ }
104
+ }
105
+ })
106
+ }, options.map((option, index) => /*#__PURE__*/React.createElement("option", {
107
+ key: index,
108
+ value: option.value
109
+ }, option.label)));
36
110
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Avatar } from "../../../..";
2
+ import Tag from '@zohodesk/components/es/Tag/Tag';
3
3
  export function LookupFieldView(_ref, ref) {
4
4
  let {
5
5
  state
@@ -8,11 +8,12 @@ export function LookupFieldView(_ref, ref) {
8
8
  name,
9
9
  photoURL
10
10
  } = state.properties.value;
11
- return /*#__PURE__*/React.createElement(Avatar, {
11
+ return /*#__PURE__*/React.createElement(Tag, {
12
12
  getRef: ref,
13
- name: name,
14
- label: name,
15
- imageSrc: photoURL,
16
- tooltip: ""
13
+ text: name,
14
+ hasAvatar: true,
15
+ initial: name,
16
+ imageURL: photoURL,
17
+ tooltip: name
17
18
  });
18
19
  }
@@ -0,0 +1,31 @@
1
+ This package contains all elements regarding the CLIENT ACTIONS module.
2
+
3
+ The module contains three main parts
4
+
5
+ 1. Behaviour - Contains the behaviours exposed by Client Actions
6
+
7
+ 2. Components - Contains the component exposed by Client Actions
8
+
9
+ 3. Translator - Contains the translators exposed by Client Actions
10
+
11
+ -----------------------------------------------------------------------------
12
+
13
+ 1. Behaviour
14
+ a. ClientActionBehaviour -> This behaviour is used to fetch the required client actions and returns the value to state
15
+
16
+ 2. Components
17
+ a. ActionEventMediator -> The main component that is exposed and need to be used by the components in order to render and execute client actions
18
+ - Inputs : actions, renderComponentType
19
+ - Renders the rendercomponent based on the value (default renders row actions)
20
+
21
+ b. RowActionsRenderer -> This component renders the actions in Row wise.
22
+
23
+ c. DynamicActionComponent -> Renders the action component dynamically
24
+
25
+
26
+ 3. Translators
27
+ a. action-translator -> the main translator the is used to translate the client actions, resolve them and get them in component action object format
28
+
29
+ b. condition-resolver -> Resolved the conditions cases in the client actiosn. Returns only the actions that are passed
30
+
31
+ c. context-resover -> Resolved the context in all keys of client actions.
@@ -1,38 +1,31 @@
1
1
  Client Actions Behaviour
2
2
 
3
-
4
3
  This behaviour will allows your library components to fetch client actions for your users.
5
4
 
6
5
  # Implementation
7
6
 
8
- ClientActionBehaviourFactory.create({ getClientActions: dataBroker.httpTemplates.getClientActions })
7
+ ClientActionsBehaviourFactory.create({ getClientActions: dataSource.httpTemplates.getClientActions })
9
8
 
10
9
  This above class should be implemeted in the behaviour props of your library components
11
10
 
12
- The user needs to passdown the databroker into the behaviour in the format,
11
+ The user needs to passdown the dataSource into the behaviour in the format,
13
12
 
14
13
  1. getClientActions => Client Actions GET data broker template
15
14
 
16
-
17
-
18
15
  # Integration inside component
19
16
 
20
- We need to initialize or mount our behaviour with the component. Refer the eg used in List component below
17
+ We need to initialize or mount our behaviour with the component. Refer the eg used in List component below
21
18
 
22
- private createClientActionsFetchAction(): ActionModel {
23
- const props = this.createApiProps();
24
- return {
25
- type: CLIENTACTION_BEHAVIOUR_EXECUTE,
26
- payload: {
27
- actionName: 'getClientActions',
28
- props,
29
- apiName: 'clientActions'
30
- }
31
- };
32
- }
19
+ private createClientActionsFetchAction(): ActionModel {
20
+ const props = this.createApiProps();
21
+ return {
22
+ type: CLIENTACTION_BEHAVIOUR_EXECUTE,
23
+ payload: {
24
+ actionName: 'getClientActions',
25
+ props,
26
+ apiName: 'clientActions'
27
+ }
28
+ };
29
+ }
33
30
 
34
31
  The function createClientActionsFetchAction is called at Library component mount, which will mount client action behaviour and do the necessary processing.
35
-
36
-
37
-
38
-
@@ -25,7 +25,7 @@ class ExecuteActionBehaviourUseCase extends AbstractUseCase {
25
25
  presenter.updateClientAction(recordManager.toObject());
26
26
  }
27
27
 
28
- dispatch(recordManager.createDataBrokerExecuteEvent(props, actionName, metaData));
28
+ dispatch(recordManager.createDataSourceExecuteEvent(props, actionName, metaData));
29
29
  }
30
30
 
31
31
  }
@@ -1,5 +1,5 @@
1
1
  import AbstractUseCase from "./AbstractUseCase";
2
- import { DATA_BROKER_REGISTER } from "../../../../bc/zdata-broker/Constants";
2
+ import { DATA_SOURCE_REGISTER } from "../../../../../../bc/zdata-source/Constants";
3
3
  export default class InitializeUseCase extends AbstractUseCase {
4
4
  execute(input) {
5
5
  const {
@@ -7,7 +7,7 @@ export default class InitializeUseCase extends AbstractUseCase {
7
7
  dispatch
8
8
  } = input;
9
9
  dispatch({
10
- type: DATA_BROKER_REGISTER,
10
+ type: DATA_SOURCE_REGISTER,
11
11
  payload: {
12
12
  apiTemplates
13
13
  }
@@ -7,7 +7,7 @@ export default class ClientAction {
7
7
 
8
8
  _defineProperty(this, "name", void 0);
9
9
 
10
- _defineProperty(this, "library", void 0);
10
+ _defineProperty(this, "component", void 0);
11
11
 
12
12
  _defineProperty(this, "location", void 0);
13
13
 
@@ -23,9 +23,13 @@ export default class ClientAction {
23
23
 
24
24
  _defineProperty(this, "createdBy", void 0);
25
25
 
26
+ _defineProperty(this, "conditions", void 0);
27
+
28
+ _defineProperty(this, "conditionMeta", void 0);
29
+
26
30
  this.id = clientActionObj.id;
27
31
  this.name = clientActionObj.name;
28
- this.library = clientActionObj.library;
32
+ this.component = clientActionObj.component;
29
33
  this.location = clientActionObj.location;
30
34
  this.uiComponentMapping = new UIComponentMapping(clientActionObj.uiComponentMapping);
31
35
  this.modules = clientActionObj.modules;
@@ -33,20 +37,24 @@ export default class ClientAction {
33
37
  this.createdTime = clientActionObj.createdTime;
34
38
  this.modifiedBy = clientActionObj.modifiedBy;
35
39
  this.createdBy = clientActionObj.createdBy;
40
+ this.conditions = clientActionObj.conditions;
41
+ this.conditionMeta = clientActionObj.conditions;
36
42
  }
37
43
 
38
44
  toObject() {
39
45
  return {
40
46
  id: this.id,
41
47
  name: this.name,
42
- library: this.library,
48
+ component: this.component,
43
49
  location: this.location,
44
50
  uiComponentMapping: this.uiComponentMapping.toObject(),
45
51
  modules: this.modules,
46
52
  modifiedTime: this.modifiedTime,
47
53
  createdTime: this.createdTime,
48
54
  modifiedBy: this.modifiedBy,
49
- createdBy: this.createdBy
55
+ createdBy: this.createdBy,
56
+ conditions: this.conditions,
57
+ conditionsMeta: this.conditionMeta
50
58
  };
51
59
  }
52
60
 
@@ -1,5 +1,5 @@
1
- import { DATA_BROKER_FAILURE, DATA_BROKER_NO_CONTENT, DATA_BROKER_SUCCESS } from "../../../../bc/zdata-broker/Symbols";
2
- import { DATA_BROKER_EXECUTE } from "../../../../bc/zdata-broker/Constants";
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
3
  import { CLIENTACTION_EXECUTE_FAIL_CALLBACK, CLIENTACTION_EXECUTE_SUCCESS_CALLBACK, CLIENTACTION_EXECUTE_SUCCESS_NO_CONTENT_CALLBACK, ClientActionApiActionName } from "../../../../bc/zclient-actions/Constants";
4
4
  import GetClientActionsStrategy from "./GetClientActionsStrategy";
5
5
  const clientActionExecuteStrategiesMap = {
@@ -10,7 +10,7 @@ export default class ClientActionManager {
10
10
  this.clientActions = clientActions;
11
11
  }
12
12
 
13
- createDataBrokerMeta(_ref) {
13
+ createDataSourceMeta(_ref) {
14
14
  let {
15
15
  actionName,
16
16
  successMeta,
@@ -19,15 +19,15 @@ export default class ClientActionManager {
19
19
  } = _ref;
20
20
  return {
21
21
  actionName,
22
- [DATA_BROKER_NO_CONTENT]: successNoContentMeta,
23
- [DATA_BROKER_FAILURE]: failureMeta,
24
- [DATA_BROKER_SUCCESS]: successMeta
22
+ [DATA_SOURCE_NO_CONTENT]: successNoContentMeta,
23
+ [DATA_SOURCE_FAILURE]: failureMeta,
24
+ [DATA_SOURCE_SUCCESS]: successMeta
25
25
  };
26
26
  }
27
27
 
28
- createDataBrokerExecuteEvent(props, actionName, metaData) {
28
+ createDataSourceExecuteEvent(props, actionName, metaData) {
29
29
  return {
30
- type: DATA_BROKER_EXECUTE,
30
+ type: DATA_SOURCE_EXECUTE,
31
31
  payload: {
32
32
  props,
33
33
  actionName
@@ -59,7 +59,7 @@ export default class ClientActionManager {
59
59
  type: CLIENTACTION_EXECUTE_FAIL_CALLBACK,
60
60
  metaData: clientActionExecuteStrategyMeta
61
61
  };
62
- return this.createDataBrokerMeta({
62
+ return this.createDataSourceMeta({
63
63
  actionName,
64
64
  successNoContentMeta,
65
65
  failureMeta,
@@ -20,10 +20,6 @@ export default class ClientActions {
20
20
  this.isFetching = isFetching;
21
21
  }
22
22
 
23
- getIsFetching() {
24
- return this.isFetching;
25
- }
26
-
27
23
  setIsFetching(isFetching) {
28
24
  this.isFetching = isFetching;
29
25
  }
@@ -10,10 +10,13 @@ export default class EventMapping {
10
10
 
11
11
  _defineProperty(this, "payloadValueMapping", void 0);
12
12
 
13
+ _defineProperty(this, "payloadValueMappingMeta", void 0);
14
+
13
15
  this.id = eventMappingObj.id;
14
16
  this.sourceEvent = eventMappingObj.sourceEvent;
15
17
  this.targetEvent = eventMappingObj.targetEvent;
16
18
  this.payloadValueMapping = eventMappingObj.payloadValueMapping;
19
+ this.payloadValueMappingMeta = eventMappingObj.payloadValueMapping;
17
20
  }
18
21
 
19
22
  toObject() {
@@ -21,7 +24,8 @@ export default class EventMapping {
21
24
  id: this.id,
22
25
  sourceEvent: this.sourceEvent,
23
26
  targetEvent: this.targetEvent,
24
- payloadValueMapping: this.payloadValueMapping
27
+ payloadValueMapping: this.payloadValueMapping,
28
+ payloadValueMappingMeta: this.payloadValueMappingMeta
25
29
  };
26
30
  }
27
31
 
@@ -9,14 +9,17 @@ export default class UIComponentMapping {
9
9
 
10
10
  _defineProperty(this, "component", void 0);
11
11
 
12
- _defineProperty(this, "properties", void 0);
12
+ _defineProperty(this, "propertiesValueMapping", void 0);
13
+
14
+ _defineProperty(this, "propertiesValueMappingMeta", void 0);
13
15
 
14
16
  _defineProperty(this, "eventMappings", void 0);
15
17
 
16
18
  this.id = uiComponentMappingObj.id;
17
19
  this.name = uiComponentMappingObj.name;
18
20
  this.component = uiComponentMappingObj.component;
19
- this.properties = uiComponentMappingObj.properties;
21
+ this.propertiesValueMapping = uiComponentMappingObj.propertiesValueMapping;
22
+ this.propertiesValueMappingMeta = uiComponentMappingObj.propertiesValueMapping;
20
23
  this.eventMappings = new EventMappings(uiComponentMappingObj.eventMappings);
21
24
  }
22
25
 
@@ -25,7 +28,8 @@ export default class UIComponentMapping {
25
28
  id: this.id,
26
29
  name: this.name,
27
30
  component: this.component,
28
- properties: this.properties,
31
+ propertiesValueMapping: this.propertiesValueMapping,
32
+ propertiesValueMappingMeta: this.propertiesValueMappingMeta,
29
33
  eventMappings: this.eventMappings.toArray().map(eventMapping => eventMapping.toObject())
30
34
  };
31
35
  }
@@ -1,5 +1,5 @@
1
1
  import ActionsHandlersFactory from "./ActionsHandlersFactory";
2
- export default class ClientActionBehaviourFactory {
2
+ export default class ClientActionsBehaviourFactory {
3
3
  static create(apiDetails) {
4
4
  return {
5
5
  name: 'zclientAction',
@@ -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
+ };
@@ -0,0 +1,51 @@
1
+ export const actionSchema = {
2
+ type: 'object',
3
+ properties: {
4
+ component: {
5
+ type: 'string'
6
+ },
7
+ id: {
8
+ type: 'string'
9
+ },
10
+ properties: {
11
+ type: 'object'
12
+ },
13
+ eventMappings: {
14
+ type: 'array',
15
+ minItems: 0,
16
+ items: {
17
+ type: 'object',
18
+ properties: {
19
+ action: {
20
+ type: 'object',
21
+ properties: {
22
+ event: {
23
+ type: 'string'
24
+ },
25
+ payload: {
26
+ type: 'object'
27
+ }
28
+ },
29
+ required: ['event', 'payload']
30
+ },
31
+ id: {
32
+ type: 'string'
33
+ },
34
+ sourceEvent: {
35
+ type: 'string'
36
+ }
37
+ },
38
+ required: ['sourceEvent', 'id']
39
+ }
40
+ }
41
+ },
42
+ required: ['component', 'properties']
43
+ };
44
+ export default {
45
+ action: {
46
+ required: true,
47
+ typeMetadata: {
48
+ schema: actionSchema
49
+ }
50
+ }
51
+ };
@@ -0,0 +1,18 @@
1
+ export default class MountController {
2
+ constructor(initializeUseCase) {
3
+ this.initializeUseCase = initializeUseCase;
4
+ this.handle = this.handle.bind(this);
5
+ }
6
+
7
+ handle(input) {
8
+ const {
9
+ host,
10
+ dispatch,
11
+ state,
12
+ updateState
13
+ } = input;
14
+ this.initializeUseCase.updateDependencies(host, state, dispatch, updateState);
15
+ this.initializeUseCase.execute();
16
+ }
17
+
18
+ }
@@ -0,0 +1,26 @@
1
+ export default class PropertiesChangeController {
2
+ constructor(propertiesChangeUseCase) {
3
+ this.propertiesChangeUseCase = propertiesChangeUseCase;
4
+ this.handle = this.handle.bind(this);
5
+ }
6
+
7
+ handle(input) {
8
+ const {
9
+ host,
10
+ dispatch,
11
+ state,
12
+ action,
13
+ updateState
14
+ } = input;
15
+ const {
16
+ currentProperties,
17
+ previousProperties
18
+ } = action.payload;
19
+ this.propertiesChangeUseCase.updateDependencies(host, state, dispatch, updateState);
20
+ this.propertiesChangeUseCase.execute({
21
+ currentActions: currentProperties.actions,
22
+ previousActions: previousProperties.actions
23
+ });
24
+ }
25
+
26
+ }
@@ -0,0 +1,18 @@
1
+ export default class UnmountController {
2
+ constructor(destroyUseCase) {
3
+ this.destroyUseCase = destroyUseCase;
4
+ this.handle = this.handle.bind(this);
5
+ }
6
+
7
+ handle(input) {
8
+ const {
9
+ host,
10
+ dispatch,
11
+ state,
12
+ updateState
13
+ } = input;
14
+ this.destroyUseCase.updateDependencies(host, state, dispatch, updateState);
15
+ this.destroyUseCase.execute();
16
+ }
17
+
18
+ }