@zohodesk/library-platform 1.1.10-exp.1 → 1.1.10-exp.2

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 (227) hide show
  1. package/es/bc/app-context/Properties.js +12 -2
  2. package/es/bc/sdk/ResourceNamesEnum.js +1 -0
  3. package/es/bc/zform/Constants.js +11 -1
  4. package/es/bc/zform/Properties.js +29 -33
  5. package/es/bc/zform/Symbol.js +1 -3
  6. package/es/bc/zlist/Properties.js +0 -51
  7. package/es/bc/zrecord/Constants.js +1 -0
  8. package/es/cc/fields/currency/Properties.js +2 -1
  9. package/es/cc/fields/field/Properties.js +14 -8
  10. package/es/cc/fields/lookup/Properties.js +34 -1
  11. package/es/cc/fields/text/Properties.js +0 -9
  12. package/es/cc/form/Properties.js +8 -0
  13. package/es/cc/form-connected/ExternalConstants.js +3 -0
  14. package/es/cc/form-connected/Properties.js +19 -11
  15. package/es/cc/table-connected/SdkContract.js +14 -0
  16. package/es/cc/table-connected/constants/Events.js +2 -1
  17. package/es/cc/table-list/row/Properties.js +8 -0
  18. package/es/index.js +13 -3
  19. package/es/library/analytics/Analytics.js +36 -0
  20. package/es/library/analytics/AnalyticsContract.js +13 -0
  21. package/es/library/analytics/index.js +2 -0
  22. package/es/library/custom-component/adapters/controllers/Controller.js +9 -0
  23. package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +4 -0
  24. package/es/library/custom-component/adapters/gateways/service/Service.js +2 -0
  25. package/es/library/custom-component/applications/entities-factory/ComponentFactory.js +12 -9
  26. package/es/library/custom-component/applications/usecases/DispatchUseCase.js +28 -5
  27. package/es/library/custom-component/applications/usecases/InitializeUseCase.js +5 -4
  28. package/es/library/custom-component/applications/usecases/MountUseCase.js +10 -6
  29. package/es/library/custom-component/applications/usecases/UnmountUseCase.js +6 -5
  30. package/es/library/custom-component/applications/usecases/UpdatePropertyUseCase.js +23 -18
  31. package/es/library/custom-component/applications/usecases/UpdateStateUseCase.js +4 -3
  32. package/es/library/custom-component/domain/entities/Behaviour.js +4 -0
  33. package/es/library/custom-component/domain/entities/Component.js +89 -83
  34. package/es/library/custom-component/domain/entities/Properties.js +10 -137
  35. package/es/library/custom-component/domain/entities/Property.js +29 -0
  36. package/es/library/custom-component/frameworks/json-schema-validator/Validator.js +65 -28
  37. package/es/library/custom-component/frameworks/ui/CreateCustomComponent.js +26 -13
  38. package/es/library/custom-component/frameworks/ui/DependencyFactory.js +1 -2
  39. package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +2 -1
  40. package/es/library/dot/components/form/adapters/presenter/TransformState.js +3 -1
  41. package/es/library/dot/components/form/frameworks/ui/DefaultComponentRegister.js +10 -2
  42. package/es/library/dot/components/form/frameworks/ui/Form.js +2 -0
  43. package/es/library/dot/components/form/frameworks/ui/FormView.js +8 -4
  44. package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +13 -13
  45. package/es/library/dot/components/form/frameworks/ui/sub-components/Footer.js +7 -4
  46. package/es/library/dot/components/form/frameworks/ui/sub-components/Header.js +7 -4
  47. package/es/library/dot/components/form-fields/currency/frameworks/ui/Currency.js +3 -3
  48. package/es/library/dot/components/form-fields/field/css/FieldItem.module.css +2 -2
  49. package/es/library/dot/components/form-fields/lookup/frameworks/ui/Lookup.js +1 -1
  50. package/es/library/dot/components/section/frameworks/ui/SectionView.js +12 -4
  51. package/es/library/dot/components/section/frameworks/ui/css/Section.module.css +3 -0
  52. package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +14 -7
  53. package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +15 -15
  54. package/es/library/dot/components/table-list/frameworks/ui/sub-components/ErrorState.js +4 -7
  55. package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +9 -6
  56. package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +6 -4
  57. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +6 -4
  58. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/Headers.js +4 -2
  59. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/MassAction.js +6 -4
  60. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Columns.js +4 -2
  61. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +14 -7
  62. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +5 -4
  63. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.js +5 -3
  64. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowSelection.js +32 -7
  65. package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/css/Breadcrumb.module.css +4 -4
  66. package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/sub-components/BreadcrumbItem.js +1 -1
  67. package/es/library/dot/legacy-to-new-arch/button/frameworks/ui/ButtonView.js +2 -2
  68. package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/DateView.js +4 -4
  69. package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/css/DateView.module.css +1 -1
  70. package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/LabelView.js +2 -2
  71. package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/css/Label.module.css +4 -4
  72. package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/MultiSelectView.js +2 -2
  73. package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/css/MultiSelectView.module.css +9 -9
  74. package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/SelectView.js +2 -2
  75. package/es/library/dot/legacy-to-new-arch/table-field-components/index.js +1 -0
  76. package/es/library/dot/legacy-to-new-arch/text/frameworks/ui/TextView.js +1 -1
  77. package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/TextAreaView.js +2 -2
  78. package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/css/TextAreaView.module.css +9 -9
  79. package/es/library/dot/legacy-to-new-arch/textbox/frameworks/ui/TextBoxView.js +2 -2
  80. package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/SetClientActionsUseCase.js +6 -1
  81. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActionManager.js +58 -19
  82. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActions.js +8 -8
  83. package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientActionFetchResponse.js +0 -0
  84. package/es/platform/client-actions/cc/action-event-mediator/Properties.js +75 -3
  85. package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/MountController.js +1 -1
  86. package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/PropertiesChangeController.js +2 -2
  87. package/es/platform/client-actions/components/action-event-mediator/adapters/gateway/Repository.js +2 -2
  88. package/es/platform/client-actions/components/action-event-mediator/applications/usecases/InitializeUseCase.js +15 -1
  89. package/es/platform/client-actions/components/action-event-mediator/applications/usecases/PropertiesChangeUseCase.js +3 -3
  90. package/es/platform/client-actions/components/action-event-mediator/domain/entities/ActionEventMediatorEntity.js +41 -24
  91. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator.js +3 -1
  92. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediatorView.js +31 -14
  93. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionsAdapter.js +2 -48
  94. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/EventHandlersFactory.js +3 -11
  95. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRenderer.js +12 -0
  96. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRendererView.js +42 -0
  97. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/MoreActions/MoreActionsRenderer.js +10 -0
  98. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/MoreActions/MoreActionsRendererView.js +79 -0
  99. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/{RowActionsRenderer.js → RowActions/RowActionsRenderer.js} +3 -3
  100. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.module.css +19 -0
  101. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRendererView.js +37 -0
  102. package/es/platform/client-actions/translators/client-actions-translator/index.js +14 -2
  103. package/es/platform/client-actions/translators/condition-resolver/index.js +6 -1
  104. package/es/platform/client-scripts/bc/zclient-scripts-execution/Constants.js +11 -0
  105. package/es/platform/client-scripts/bc/zclient-scripts-execution/EventHandlers.js +1 -0
  106. package/es/platform/client-scripts/bc/zclient-scripts-fetch/Constants.js +11 -0
  107. package/es/platform/client-scripts/bc/zclient-scripts-fetch/EventHandlers.js +1 -0
  108. package/es/platform/{app-context-behaviour → client-scripts/behaviour/zclient-scripts-execution}/adapters/controllers/AbstractController.js +2 -1
  109. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/controllers/ClientScriptExecutionController.js +10 -0
  110. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/controllers/SetClientScriptsMappingController.js +10 -0
  111. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/gateways/Repository.js +24 -0
  112. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/gateways/Service.js +9 -0
  113. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/presenters/Presenter.js +21 -0
  114. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/interfaces/gateways/IService.js +0 -0
  115. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/usecases/AbstractUseCase.js +15 -0
  116. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/usecases/ExecuteClientScriptsUseCase.js +23 -0
  117. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/usecases/SetClientScriptsMappingUseCase.js +16 -0
  118. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/domain/entities/ClientScriptExecutor.js +142 -0
  119. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/domain/entities/types/ClientScriptExectionTypeDefintions.js +7 -0
  120. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/frameworks/ClientScriptsExecutionBehaviourFactory.js +12 -0
  121. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/frameworks/ClientScriptsExecutionHandlersFactory.js +30 -0
  122. package/es/platform/client-scripts/behaviour/zclient-scripts-execution/frameworks/ClientScriptsUtils.js +25 -0
  123. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/AbstractController.js +8 -0
  124. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsController.js +27 -0
  125. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsFailureController.js +28 -0
  126. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsNoContentController.js +23 -0
  127. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsStopController.js +21 -0
  128. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsSuccessController.js +28 -0
  129. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/MountController.js +22 -0
  130. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/SetClientScriptsController.js +24 -0
  131. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/gateways/Repository.js +22 -0
  132. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/gateways/Service.js +19 -0
  133. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/presenters/Presenter.js +16 -0
  134. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/entities-factory/ClientScriptsFactory.js +11 -0
  135. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/entities-factory/ClientScriptsManagerFactory.js +10 -0
  136. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/gateways/IService.js +0 -0
  137. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/AbstractUseCase.js +17 -0
  138. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptUseCase.js +33 -0
  139. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsFailureUseCase.js +22 -0
  140. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsNoContentUseCase.js +27 -0
  141. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsStopUseCase.js +25 -0
  142. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsSuccessUseCase.js +22 -0
  143. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/InitializeUseCase.js +17 -0
  144. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/SetClientScriptsUseCase.js +21 -0
  145. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/ClientScript.js +24 -0
  146. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/ClientScripts.js +41 -0
  147. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/GetClientScriptsStrategy.js +44 -0
  148. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/ClientScriptEventMappingState.js +1 -0
  149. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/ClientScriptModel.js +1 -0
  150. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/ClientScriptsModel.js +1 -0
  151. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/IClientScript.js +0 -0
  152. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/IClientScripts.js +0 -0
  153. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/IEvent.js +1 -0
  154. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/frameworks/ClientScriptsBehaviourFactory.js +12 -0
  155. package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/frameworks/ClientScriptsHandlersFactory.js +47 -0
  156. package/es/platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema.js +15 -0
  157. package/es/platform/components/app/adapters/resources/AppResource.js +13 -3
  158. package/es/platform/components/form-connected/frameworks/FormConnectedFactory.js +7 -1
  159. package/es/platform/components/form-connected/frameworks/FormConnectedView.js +4 -2
  160. package/es/platform/components/table-connected/adapters/controllers/ColumnChooserUpdateController.js +7 -1
  161. package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +50 -0
  162. package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +216 -2
  163. package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +4 -2
  164. package/es/platform/components/table-connected/frameworks/TableConnectedFactory.js +6 -2
  165. package/es/platform/data-source/http-template/getClientScripts.js +23 -0
  166. package/es/platform/data-source/http-template/updateSelectedFields.js +1 -1
  167. package/es/platform/data-source/index.js +14 -11
  168. package/es/platform/data-source/utils/validation-rules/TransFormValidationRules.js +1 -0
  169. package/es/platform/sdk/frameworks/Sdk.js +1 -1
  170. package/es/platform/zdata-source/domain/entities/APITemplate.js +2 -1
  171. package/es/platform/zfield/domain/entities/fields-manager/FieldsManager.js +6 -1
  172. package/es/platform/zform/adapters/controllers/IntializeController.js +4 -2
  173. package/es/platform/zform/adapters/controllers/MyLayoutSuccessController.js +4 -2
  174. package/es/platform/zform/adapters/controllers/SubmitValidationCompletedController.js +5 -1
  175. package/es/platform/zform/adapters/gateway/FormRepository.js +4 -2
  176. package/es/platform/zform/adapters/gateway/Service.js +2 -0
  177. package/es/platform/zform/adapters/presenter/FormTranslator.js +21 -15
  178. package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +5 -3
  179. package/es/platform/zform/applications/usecases/InitializeUseCase.js +54 -26
  180. package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +7 -7
  181. package/es/platform/zform/applications/usecases/MyLayoutSuccessUseCase.js +60 -36
  182. package/es/platform/zform/applications/usecases/SubmitValidationCompletedUseCase.js +12 -8
  183. package/es/platform/zform/domain/ZForm.js +65 -0
  184. package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +11 -2
  185. package/es/platform/zhttp/adapters/controllers/FetchController.js +5 -1
  186. package/es/platform/zlist/adapters/gateways/Repository.js +4 -2
  187. package/es/platform/zlist/adapters/presenters/SelectionTranslator.js +6 -3
  188. package/es/platform/zlist/adapters/presenters/TableTranslator.js +15 -6
  189. package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +30 -19
  190. package/es/platform/zlist/adapters/presenters/translators/Header.js +5 -6
  191. package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +4 -2
  192. package/es/platform/zlist/adapters/presenters/translators/Row.js +5 -3
  193. package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +6 -2
  194. package/es/platform/zlist/adapters/presenters/utils/DefaultClientActions.js +1 -1
  195. package/es/platform/zlist/domain/entities/List.js +17 -2
  196. package/package.json +3 -3
  197. package/es/cc/form-connected/Constants.js +0 -12
  198. package/es/library/custom-component/applications/usecases/MountUseCase copy.js +0 -28
  199. package/es/platform/app-context-behaviour/adapters/controllers/InitializeController.js +0 -19
  200. package/es/platform/app-context-behaviour/adapters/gateways/Service.js +0 -7
  201. package/es/platform/app-context-behaviour/adapters/presenters/Presenter.js +0 -18
  202. package/es/platform/app-context-behaviour/adapters/resources/AppResource.js +0 -25
  203. package/es/platform/app-context-behaviour/applications/AbstractUseCase.js +0 -6
  204. package/es/platform/app-context-behaviour/applications/usecases/InitializeUseCase.js +0 -15
  205. package/es/platform/app-context-behaviour/frameworks/EventHandlerFactory.js +0 -25
  206. package/es/platform/client-actions/cc/dynamic-action-component/Properties.js +0 -51
  207. package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponent.js +0 -9
  208. package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponentView.js +0 -38
  209. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +0 -19
  210. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +0 -33
  211. package/es/platform/components/form-connected/frameworks/FallbackView.js +0 -23
  212. package/es/platform/components/form-connected/frameworks/FormFallbackView.js +0 -23
  213. package/es/platform/data-source/http-template/fetchDependencyMappings.js +0 -18
  214. package/es/platform/data-source/http-template/fetchLayoutRules.js +0 -29
  215. package/es/platform/data-source/http-template/fetchMyForm.js +0 -19
  216. package/es/platform/data-source/http-template/fetchMyFormLayout.js +0 -43
  217. package/es/platform/data-source/http-template/fetchValidationRules.js +0 -30
  218. package/es/platform/zlist/adapters/presenters/translators/ColumnAlignmentTranslator.js +0 -11
  219. /package/es/platform/{app-context-behaviour/applications/interfaces/UsecaseDependencies.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionResponse.js} +0 -0
  220. /package/es/platform/{app-context-behaviour/applications/interfaces/gateways/IService.js → client-scripts/behaviour/zclient-scripts-execution/applications/interfaces/InputDependencies.js} +0 -0
  221. /package/es/platform/{app-context-behaviour/applications/interfaces/input/InitializeUseCaseInputModel.js → client-scripts/behaviour/zclient-scripts-execution/applications/interfaces/gateways/IRepository.js} +0 -0
  222. /package/es/platform/{app-context-behaviour → client-scripts/behaviour/zclient-scripts-execution}/applications/interfaces/output/IPresenter.js +0 -0
  223. /package/es/platform/{app-context-behaviour/applications/interfaces/output/BehaviourState.js → client-scripts/behaviour/zclient-scripts-execution/domain/entities/State.js} +0 -0
  224. /package/es/platform/{app-context-behaviour/applications/interfaces/resources/ApiHeaderContract.js → client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/InputDependencies.js} +0 -0
  225. /package/es/platform/{app-context-behaviour/applications/interfaces/resources/ContextContract.js → client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/gateways/IRepository.js} +0 -0
  226. /package/es/platform/{app-context-behaviour/applications/interfaces/resources/IAppResource.js → client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/output/IPresenter.js} +0 -0
  227. /package/es/platform/{client-actions/components/dynamic-component/domain/entities/interfaces/IState.js → client-scripts/behaviour/zclient-scripts-fetch/domain/entities/State.js} +0 -0
@@ -5,7 +5,8 @@ import { ZFORM_ERROR, ZFORM_VALIDATION_SUCCESS, ZFORM_SUBMIT_VALIDATION_FAILURE
5
5
  class SubmitValidationCompletedUseCase extends AbstractUseCase {
6
6
  execute(params) {
7
7
  const {
8
- dispatch
8
+ dispatch,
9
+ disableCreateRecord
9
10
  } = params;
10
11
  const {
11
12
  repository,
@@ -49,13 +50,16 @@ class SubmitValidationCompletedUseCase extends AbstractUseCase {
49
50
  record
50
51
  }
51
52
  });
52
- dispatch({
53
- type: CREATE_RECORD,
54
- payload: {
55
- record,
56
- moduleName
57
- }
58
- });
53
+
54
+ if (!disableCreateRecord) {
55
+ dispatch({
56
+ type: CREATE_RECORD,
57
+ payload: {
58
+ record,
59
+ moduleName
60
+ }
61
+ });
62
+ }
59
63
  }
60
64
  }
61
65
 
@@ -1,3 +1,6 @@
1
+ import { ErrorCodes } from "../../../cc/component/ErrorStructure";
2
+ import { ZFormApiActionName } from "../../../bc/zform/Constants";
3
+ import { ZHttpErrorCode } from "../../../bc/zhttp/Errors";
1
4
  export default class ZForm {
2
5
  /*hack*/
3
6
 
@@ -130,6 +133,68 @@ export default class ZForm {
130
133
  this.isSubmitFetching = isSubmitFetching;
131
134
  }
132
135
 
136
+ stopLoadingAndDecideIsBreaking(actionName) {
137
+ let isBreaking = false; // Set error state based on the failed action
138
+
139
+ switch (actionName) {
140
+ case ZFormApiActionName.getMyForm:
141
+ this.setMyFormFetching(false);
142
+ isBreaking = true;
143
+ break;
144
+
145
+ case ZFormApiActionName.getMyLayouts:
146
+ // this.setMyLayoutsFetching(false);
147
+ // isBreaking = true;
148
+ break;
149
+
150
+ case ZFormApiActionName.getValidationRules:
151
+ // isBreaking = true;
152
+ this.setValidationRulesFetching(false);
153
+ break;
154
+
155
+ case ZFormApiActionName.getLayoutRules:
156
+ // isBreaking = true;
157
+ this.setLayoutRulesFetching(false);
158
+ break;
159
+
160
+ case ZFormApiActionName.getDependencyMappings:
161
+ // isBreaking = true;
162
+ this.setDependencyFetching(false);
163
+ break;
164
+
165
+ default:
166
+ break;
167
+ }
168
+
169
+ return isBreaking;
170
+ }
171
+
172
+ constructApiErrorEvent(error, actionName, isBreaking) {
173
+ console.log('Error in action: ', actionName, error);
174
+
175
+ if (error.code === ZHttpErrorCode.ApiError) {
176
+ return {
177
+ code: ErrorCodes.API_FAILED,
178
+ message: 'Api call failed for action: ' + actionName,
179
+ errorDetails: {
180
+ isBreaking,
181
+ originalError: error,
182
+ actionName
183
+ }
184
+ };
185
+ }
186
+
187
+ return {
188
+ code: ErrorCodes.UNKNOWN_ERROR,
189
+ message: 'Api call failed for action: ' + actionName,
190
+ errorDetails: {
191
+ isBreaking,
192
+ originalError: error,
193
+ actionName
194
+ }
195
+ };
196
+ }
197
+
133
198
  getSectionId(_ref2) {
134
199
  let {
135
200
  fieldName,
@@ -7,7 +7,7 @@ import FormPresenter from "../../adapters/presenter/FormPresenter";
7
7
  import Service from "../../adapters/gateway/Service";
8
8
  import LifeCycleEvents from "../../../../cc/component/LifeCycleEventsEnum";
9
9
  import InitializeController from "../../adapters/controllers/IntializeController";
10
- import { ZFORM_DEPENDENCY_MAPPINGS_REQUEST, ZFORM_DEPENDENCY_MAPPINGS_SUCCESS, ZFORM_FIELD_VALUE_CHANGE_REQUEST, ZFORM_MY_FORM_REQUEST, ZFORM_MY_FORM_SUCCESS, ZFORM_MY_LAYOUTS_SUCCESS, ZFORM_SET_FIELD_ERROR_MESSAGE, ZFORM_SUBMIT_VALIDATION_COMPLETED, ZFORM_VALIDATE_FIELD_REQUEST, ZFORM_VALIDATION_RULES_REQUEST, ZFORM_VALIDATION_RULES_SUCCESS, ZFORM_VALIDATION_RULES_EXECUTION_RESULT, ZFORM_LOOKUP_FIELD_SUCCESS } from "../../../../bc/zform/Symbol";
10
+ import { ZFORM_DEPENDENCY_MAPPINGS_REQUEST, ZFORM_DEPENDENCY_MAPPINGS_SUCCESS, ZFORM_FIELD_VALUE_CHANGE_REQUEST, ZFORM_MY_FORM_REQUEST, ZFORM_MY_FORM_SUCCESS, ZFORM_MY_LAYOUTS_SUCCESS, ZFORM_SET_FIELD_ERROR_MESSAGE, ZFORM_SUBMIT_VALIDATION_COMPLETED, ZFORM_API_FAILURE, ZFORM_VALIDATE_FIELD_REQUEST, ZFORM_VALIDATION_RULES_REQUEST, ZFORM_VALIDATION_RULES_SUCCESS, ZFORM_VALIDATION_RULES_EXECUTION_RESULT, ZFORM_LOOKUP_FIELD_SUCCESS } from "../../../../bc/zform/Symbol";
11
11
  import LookupFieldController from "../../adapters/controllers/LookupFieldController";
12
12
  import MyLayoutSuccessController from "../../adapters/controllers/MyLayoutSuccessController";
13
13
  import MyFormSuccessController from "../../adapters/controllers/MyFromSuccessController";
@@ -30,6 +30,7 @@ import SmartFormConstants from "../../../../cc/form-connected/ExternalConstants"
30
30
  import FieldBlurController from "../../adapters/controllers/FieldBlurController";
31
31
  import SubmitValidationCompletedController from "../../adapters/controllers/SubmitValidationCompletedController";
32
32
  import ValidationRulesExecutionResultController from "../../adapters/controllers/ValidationRulesExecutionResultController";
33
+ import ApiFailureController from "../../adapters/controllers/ApiFailureController";
33
34
 
34
35
  class EventHandlersFactory {
35
36
  static create() {
@@ -63,6 +64,7 @@ class EventHandlersFactory {
63
64
  const fieldBlurController = new FieldBlurController(service);
64
65
  const submitValidationCompletedController = new SubmitValidationCompletedController(service);
65
66
  const validationRulesExecutionResultController = new ValidationRulesExecutionResultController(service);
67
+ const apiFailureController = new ApiFailureController(service);
66
68
  return {
67
69
  [LifeCycleEvents.MOUNT]: initializeController.handle,
68
70
  [ZFORM_MY_LAYOUTS_SUCCESS]: myLayoutSuccessController.handle,
@@ -76,6 +78,7 @@ class EventHandlersFactory {
76
78
  [ZFORM_LAYOUT_RULES_SUCCESS]: layoutRulesSuccessController.handle,
77
79
  [ZFORM_VALIDATION_RULES_REQUEST]: validationRulesRequestController.handle,
78
80
  [ZFORM_VALIDATION_RULES_SUCCESS]: validationRulesSuccessController.handle,
81
+ [ZFORM_API_FAILURE]: apiFailureController.handle,
79
82
  [ZFORM_FIELD_VALUE_CHANGE_REQUEST]: fieldValueChangeController.handle,
80
83
  [ZFORM_SET_FIELD_ERROR_MESSAGE]: setFieldErrorMessageController.handle,
81
84
  [ZFORM_VALIDATE_FIELD_REQUEST]: validateFieldRequestController.handle,
@@ -86,8 +89,14 @@ class EventHandlersFactory {
86
89
  action,
87
90
  dispatch
88
91
  } = _ref;
92
+ const {
93
+ metaData,
94
+ payload
95
+ } = action;
89
96
  dispatch({
90
- type: ZFORM_SUBMIT
97
+ type: ZFORM_SUBMIT,
98
+ metaData,
99
+ payload
91
100
  });
92
101
  },
93
102
  [FormConstants.FORM_FIELD_BLURRED]: fieldBlurController.handle,
@@ -16,13 +16,17 @@ class FetchController {
16
16
  metaData
17
17
  } = action;
18
18
  const {
19
- headers
19
+ headers: headersFromProps
20
20
  } = state.properties;
21
+ const {
22
+ headers: headersFromContext
23
+ } = state.behaviours.appContext;
21
24
  const {
22
25
  url,
23
26
  method,
24
27
  getResponse
25
28
  } = payload;
29
+ const headers = headersFromProps ? headersFromProps : headersFromContext;
26
30
  this.fetchUseCase.execute({
27
31
  url,
28
32
  method,
@@ -12,9 +12,11 @@ class Repository {
12
12
  departmentId,
13
13
  viewId,
14
14
  moduleName,
15
- query,
16
- context
15
+ query
17
16
  } = this.state.properties;
17
+ const {
18
+ context
19
+ } = this.state.behaviours.appContext;
18
20
  const {
19
21
  sortBy,
20
22
  errorState,
@@ -12,9 +12,12 @@ export default function SelectionTranslator(state) {
12
12
  const {
13
13
  columnChooserConfig,
14
14
  selectionConfig,
15
- context,
16
- moduleName
15
+ moduleName,
16
+ instanceName
17
17
  } = properties;
18
+ const {
19
+ context
20
+ } = state.behaviours.appContext;
18
21
  const {
19
22
  zfield,
20
23
  selection,
@@ -27,7 +30,7 @@ export default function SelectionTranslator(state) {
27
30
  const availableFields = zfield.fields;
28
31
  const columnChooserProps = getColumnChooserProps(columnChooser, availableFields, context, moduleName);
29
32
  const clientActions = generateClientActions(selectionConfig, columnChooserConfig, hasAllSelected, columnChooserProps);
30
- const contextAppliedActions = ClientActionsTranslator.transform(clientActions, context);
33
+ const contextAppliedActions = ClientActionsTranslator.transform(clientActions, instanceName, moduleName, context);
31
34
  return {
32
35
  selected,
33
36
  hasAllSelected,
@@ -24,9 +24,12 @@ export default class TableTranslator {
24
24
  } = state;
25
25
  const {
26
26
  componentMapping,
27
- context,
28
- reOrderConfig
27
+ reOrderConfig,
28
+ instanceName
29
29
  } = properties;
30
+ const {
31
+ context
32
+ } = behaviours.appContext;
30
33
  const {
31
34
  localStorage: localStorageBehaviour,
32
35
  columnResizer,
@@ -43,7 +46,8 @@ export default class TableTranslator {
43
46
  zlist,
44
47
  zrecord,
45
48
  zfield,
46
- zclientAction
49
+ zclientAction,
50
+ zclientScriptsEventMapping
47
51
  } = fallbackToDefault(behaviours, {}); // FIX: behaviours should be available by default
48
52
 
49
53
  const {
@@ -66,6 +70,10 @@ export default class TableTranslator {
66
70
  isFetching: isClientActionsFetching
67
71
  } = fallbackToDefault(zclientAction, {}); // FIX: zclientAction should be available by defaultlt
68
72
 
73
+ const {
74
+ clientScripts,
75
+ isFetching: isClientScriptsFetching
76
+ } = fallbackToDefault(zclientScriptsEventMapping, {});
69
77
  const fieldComponentMapping = fallbackToDefault(componentMapping.fields, {});
70
78
  const rowActionsUiType = componentMapping.rowActionsComponentName;
71
79
  const {
@@ -99,12 +107,13 @@ export default class TableTranslator {
99
107
  const localStorageFieldWidths = fallbackToDefault(localStorageBehaviour?.[moduleName]?.[viewId]?.modifiedWidths, EMPTY_OBJECT);
100
108
  const modifiedWidths = calculateFieldWidths(fields, localStorageFieldWidths, preferences);
101
109
  const recordsForDisplay = isRecordsShouldBeEmptied ? EMPTY_ARRAY : records;
102
- const headersTranslator = new HeadersTranslator(fields, headerActions, context, modifiedWidths, sortBy, records);
103
- const rowsTranslator = new RowsTranslator(recordsForDisplay, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions); // const actionTranslator = new ClientActionsTranslator(clientActions, records, fields, pageContext);
110
+ const headersTranslator = new HeadersTranslator(fields, headerActions, context, modifiedWidths, sortBy, records, instanceName, moduleName);
111
+ const rowsTranslator = new RowsTranslator(recordsForDisplay, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, moduleName); // const actionTranslator = new ClientActionsTranslator(clientActions, records, fields, pageContext);
104
112
  // const translators = [headersTranslator.getTranslator(), rowsTranslator.getTranslator(), actionTranslator.getTranslator()];
105
113
 
106
114
  const translators = [headersTranslator.getTranslator(), rowsTranslator.getTranslator()];
107
- const data = Pipeline.run(translators, {}); // TODO: Implement ModuleTableModel, and move data and isLoading to tableViewModel Object
115
+ let data = Pipeline.run(translators, {});
116
+ data.clientScripts = clientScripts; // TODO: Implement ModuleTableModel, and move data and isLoading to tableViewModel Object
108
117
 
109
118
  return {
110
119
  properties,
@@ -17,7 +17,7 @@ function getLookupUrlConstructions(_ref) {
17
17
  return `/agent/${orgName}/${departmentName}/${lookupModuleName}/details/${value.id}`;
18
18
  }
19
19
 
20
- function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences) {
20
+ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, moduleName) {
21
21
  const {
22
22
  isCustomField,
23
23
  name,
@@ -32,7 +32,7 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
32
32
 
33
33
  let tempValue = undefined;
34
34
  let value = isCustomField ? record.cf?.[name] : record[name];
35
- const actions = ClientActionsTranslator.transform(fieldActions, {
35
+ const actions = ClientActionsTranslator.transform(fieldActions, instanceName, moduleName, {
36
36
  field,
37
37
  record
38
38
  });
@@ -71,28 +71,39 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
71
71
  finalValue = fieldToUiValue;
72
72
  }
73
73
 
74
- if (fieldEntry && typeof fieldEntry === 'object') {
75
- let data = {
76
- actions,
77
- ...fieldTranslator(field, tempValue ? tempValue : finalValue, {
78
- recordId: record.id
79
- }, context, preferences)
80
- };
81
- data.value = fieldEntry.fieldToUIComponentTranslator({
82
- field,
83
- record,
84
- context
85
- });
86
- data.type = fieldEntry.UIComponentName;
87
- return data;
88
- }
89
-
90
- return {
74
+ finalValue = tempValue ? tempValue : finalValue;
75
+ const viewModel = {
91
76
  actions,
92
77
  ...fieldTranslator(field, finalValue, {
93
78
  recordId: record.id
94
79
  }, context, preferences)
95
80
  };
81
+
82
+ if (fieldEntry && typeof fieldEntry === 'object') {
83
+ viewModel.type = fieldEntry.UIComponentName;
84
+
85
+ if (fieldEntry.fieldToUIComponentTranslator) {
86
+ viewModel.value = fieldEntry.fieldToUIComponentTranslator({
87
+ field,
88
+ record,
89
+ context
90
+ });
91
+ }
92
+
93
+ if (fieldEntry.translator) {
94
+ const newViewModel = fieldEntry.translator({
95
+ viewModel,
96
+ field,
97
+ context
98
+ });
99
+ newViewModel.type = fieldEntry.UIComponentName;
100
+ return newViewModel;
101
+ }
102
+
103
+ return viewModel;
104
+ }
105
+
106
+ return viewModel;
96
107
  }
97
108
 
98
109
  export default ColumnTranslator;
@@ -1,20 +1,19 @@
1
- import ColumnAlignmentTranslator from "./ColumnAlignmentTranslator";
1
+ import { Alignment } from "../../../../../cc/table-list/data-types/Header";
2
2
  import ClientActionsTranslator from "../../../../client-actions/translators/client-actions-translator";
3
3
  import { SortOrder } from "../../../../zlist/domain/entities/interfaces/Properties";
4
4
  import { i18NProviderUtils } from '@zohodesk/i18n';
5
5
 
6
- function HeaderTranslator(field, actions, context, modifiedWidths, sortBy, records) {
6
+ function HeaderTranslator(field, actions, context, modifiedWidths, sortBy, records, instanceName, moduleName) {
7
7
  const {
8
8
  id,
9
9
  name,
10
10
  displayLabel,
11
- isSortable,
12
- type
11
+ isSortable
13
12
  } = field;
14
13
  const newField = { ...field,
15
14
  sort: translateSortBy(field.id, sortBy)
16
15
  };
17
- const transformedActions = ClientActionsTranslator.transform(actions, { ...context,
16
+ const transformedActions = ClientActionsTranslator.transform(actions, instanceName, moduleName, { ...context,
18
17
  field: newField,
19
18
  recordsLength: records.length.toString()
20
19
  });
@@ -24,7 +23,7 @@ function HeaderTranslator(field, actions, context, modifiedWidths, sortBy, recor
24
23
  name: name,
25
24
  text: displayLabel,
26
25
  sortable: isSortable,
27
- alignment: ColumnAlignmentTranslator(type),
26
+ alignment: Alignment.Left,
28
27
  width,
29
28
  actions: transformedActions
30
29
  };
@@ -1,12 +1,14 @@
1
1
  import HeaderTranslator from "./Header";
2
2
  export default class HeadersTranslator {
3
- constructor(fields, actions, context, modifiedWidths, sortBy, records) {
3
+ constructor(fields, actions, context, modifiedWidths, sortBy, records, instanceName, moduleName) {
4
4
  this.fields = fields;
5
5
  this.actions = actions;
6
6
  this.context = context;
7
7
  this.modifiedWidths = modifiedWidths;
8
8
  this.sortBy = sortBy;
9
9
  this.records = records;
10
+ this.instanceName = instanceName;
11
+ this.moduleName = moduleName;
10
12
  this.pipe = this.pipe.bind(this);
11
13
  }
12
14
 
@@ -15,7 +17,7 @@ export default class HeadersTranslator {
15
17
  return [];
16
18
  }
17
19
 
18
- return this.fields.map(field => HeaderTranslator(field, this.actions, this.context, this.modifiedWidths, this.sortBy, this.records));
20
+ return this.fields.map(field => HeaderTranslator(field, this.actions, this.context, this.modifiedWidths, this.sortBy, this.records, this.instanceName, this.moduleName));
19
21
  }
20
22
 
21
23
  pipe(viewModel) {
@@ -9,14 +9,16 @@ export default function RowTranslator(_ref) {
9
9
  rowActions,
10
10
  fieldActions,
11
11
  context,
12
- preferences
12
+ preferences,
13
+ instanceName,
14
+ moduleName
13
15
  } = _ref;
14
- const actions = ClientActionsTranslator.transform(rowActions, { ...context,
16
+ const actions = ClientActionsTranslator.transform(rowActions, instanceName, moduleName, { ...context,
15
17
  record
16
18
  });
17
19
  return {
18
20
  id: record.id,
19
- columns: fields.map(field => ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences)),
21
+ columns: fields.map(field => ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, moduleName)),
20
22
  rowActionLocation: {
21
23
  type: rowActionsUiType,
22
24
  actions
@@ -1,6 +1,6 @@
1
1
  import RowTranslator from "./Row";
2
2
  export default class RowsTranslator {
3
- constructor(records, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions) {
3
+ constructor(records, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, moduleName) {
4
4
  this.records = records;
5
5
  this.fields = fields;
6
6
  this.rowActions = rowActions;
@@ -9,6 +9,8 @@ export default class RowsTranslator {
9
9
  this.fieldComponentMapping = fieldComponentMapping;
10
10
  this.rowActionsUiType = rowActionsUiType;
11
11
  this.fieldActions = fieldActions;
12
+ this.instanceName = instanceName;
13
+ this.moduleName = moduleName;
12
14
  this.pipe = this.pipe.bind(this);
13
15
  }
14
16
 
@@ -25,7 +27,9 @@ export default class RowsTranslator {
25
27
  rowActions: this.rowActions,
26
28
  fieldActions: this.fieldActions,
27
29
  context: this.context,
28
- preferences: this.preferences
30
+ preferences: this.preferences,
31
+ instanceName: this.instanceName,
32
+ moduleName: this.moduleName
29
33
  }));
30
34
  }
31
35
 
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable max-lines-per-function */
2
- import ClientAction from "../../../../client-actions/behaviour/zclient-actions/domain/entities/ClientAction";
3
2
  import { TableListConstants } from "../../../../../cc/table-list";
4
3
  import { CheckboxConstants } from "../../../../../cc/checkbox";
4
+ import ClientAction from "../../../../client-actions/behaviour/zclient-actions/domain/entities/ClientAction";
5
5
  const CHECKBOX_TOGGLED = CheckboxConstants.CHECKBOX_TOGGLED;
6
6
  const TABLE_LIST_TOGGLE_ALL_SELECTION = TableListConstants.TABLE_LIST_TOGGLE_ALL_SELECTION;
7
7
 
@@ -1,9 +1,10 @@
1
1
  import { RECORD_EXECUTE, RECORD_FETCH_MORE, RECORD_REFETCH, RecordApiActionName } from "../../../../bc/zrecord/Constants";
2
2
  import { FIELD_EXECUTE, FIELD_REFETCH } from "../../../../bc/zfield/Constants";
3
- import { CLIENT_ACTION_TABLE_LIST_COMPONENT_NAME, ZLIST_RECORD_DELETE_SUCCEEDED, ZLIST_RECORD_UPDATE_SUCCEEDED } from "../../../../bc/zlist/Constants";
4
3
  import { CLIENTACTION_BEHAVIOUR_EXECUTE } from "../../../client-actions/bc/zclient-actions/Constants";
4
+ import { CLIENT_ACTION_TABLE_LIST_COMPONENT_NAME, ZLIST_RECORD_DELETE_SUCCEEDED, ZLIST_RECORD_UPDATE_SUCCEEDED } from "../../../../bc/zlist/Constants";
5
5
  import { SmartTableConstants } from "../../../../cc/table-connected";
6
6
  import SortBy from "./SortBy";
7
+ import { CLIENTSCRIPT_FETCH } from "../../../client-scripts/bc/zclient-scripts-fetch/Constants";
7
8
 
8
9
  class List {
9
10
  constructor(limit, sortBy, query, context, isReOrderLoading, errorState) {
@@ -75,7 +76,7 @@ class List {
75
76
  }
76
77
 
77
78
  getInitialMountFetchActions() {
78
- return [this.createRecordsFetchAction(), this.createAvailableFieldsFetchAction(), this.createSelectedFieldsFetchAction(), this.createClientActionsFetchAction()];
79
+ return [this.createRecordsFetchAction(), this.createAvailableFieldsFetchAction(), this.createSelectedFieldsFetchAction(), this.createClientActionsFetchAction(), this.createClientScriptsFetchAction()];
79
80
  }
80
81
 
81
82
  shallowDiff(obj1, obj2) {
@@ -333,6 +334,20 @@ class List {
333
334
  };
334
335
  }
335
336
 
337
+ createClientScriptsFetchAction() {
338
+ const props = this.createApiProps();
339
+ props.components = 'TableList';
340
+ props.modules = props.moduleName;
341
+ return {
342
+ type: CLIENTSCRIPT_FETCH,
343
+ payload: {
344
+ actionName: 'getClientScripts',
345
+ props,
346
+ apiName: 'clientScripts'
347
+ }
348
+ };
349
+ }
350
+
336
351
  createRecordsRefetchAction(triggerer) {
337
352
  const props = this.createApiProps();
338
353
  const metaData = triggerer === 'sortBy' && {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/library-platform",
3
- "version": "1.1.10-exp.1",
3
+ "version": "1.1.10-exp.2",
4
4
  "description": "",
5
5
  "main": "es/index.js",
6
6
  "files": [
@@ -42,7 +42,7 @@
42
42
  "@typescript-eslint/parser": "^7.11.0",
43
43
  "@zoho/SecurityJS": "7.2.4",
44
44
  "@zohodesk-private/css-variable-migrator": "^1.0.8",
45
- "@zohodesk-private/desk-components": "1.0.0-temp-57.1",
45
+ "@zohodesk-private/desk-components": "1.3.13",
46
46
  "@zohodesk-private/dot-registry": "0.0.2",
47
47
  "@zohodesk-private/node-plugins": "1.1.9",
48
48
  "@zohodesk/a11y": "2.3.6",
@@ -77,7 +77,7 @@
77
77
  "typescript": "4.9.5"
78
78
  },
79
79
  "peerDependencies": {
80
- "@zohodesk-private/desk-components": "1.0.0-temp-57.1",
80
+ "@zohodesk-private/desk-components": "1.3.13",
81
81
  "@zohodesk-private/dot-registry": "0.0.2",
82
82
  "@zohodesk/a11y": "2.3.6",
83
83
  "@zohodesk/components": "1.4.5",
@@ -1,12 +0,0 @@
1
- class SmartFormConstants {
2
- static SMART_FORM_FIELD_FOCUSED = 'SMART_FORM#FIELD_FOCUSED';
3
- static SMART_FORM_FIELD_BLURRED = 'SMART_FORM#FIELD_BLURRED';
4
- static SMART_FORM_FIELD_VALUE_CHANGED = 'SMART_FORM#FIELD_VALUE_CHANGED';
5
- static SMART_FORM_SUBMIT = 'SMART_FORM#SUBMIT';
6
- static SMART_FORM_SUBMIT_CLICKED = 'SMART_FORM#SUBMIT_CLICKED';
7
- static SMART_FORM_CANCEL_CLICKED = 'SMART_FORM#CANCEL_CLICKED';
8
- static SMART_FORM_SUBMIT_SUCCESS = 'SMART_FORM#SUBMIT_SUCCESS';
9
- static SMART_FORM_SUBMIT_FAILURE = 'SMART_FORM#SUBMIT_FAILED';
10
- }
11
-
12
- export default SmartFormConstants;
@@ -1,28 +0,0 @@
1
- import AbstractUseCase from "./AbstractUseCase";
2
-
3
- class MountUsecase extends AbstractUseCase {
4
- execute() {
5
- const {
6
- repository,
7
- presenter,
8
- eventManager
9
- } = this.dependencies;
10
- const component = repository.getComponent();
11
- const mountAction = component.getMountAction();
12
- const eventHandlers = component.getEventHandlersWrapper();
13
-
14
- try {
15
- eventManager.subscribe(eventHandlers);
16
-
17
- if (!component.hasBreakingError()) {
18
- eventManager.dispatch(mountAction);
19
- }
20
- } catch (e) {
21
- component.setError(e);
22
- presenter.setError(e);
23
- }
24
- }
25
-
26
- }
27
-
28
- export default MountUsecase;
@@ -1,19 +0,0 @@
1
- import { AbstractController } from "./AbstractController";
2
- export class InitializeController extends AbstractController {
3
- handle(_ref) {
4
- let {
5
- state
6
- } = _ref;
7
- const {
8
- service
9
- } = this;
10
- const context = state.properties.context;
11
- const {
12
- initializeUseCase
13
- } = service;
14
- initializeUseCase.execute({
15
- context
16
- });
17
- }
18
-
19
- }
@@ -1,7 +0,0 @@
1
- import { InitializeUseCase } from "../../applications/usecases/InitializeUseCase";
2
- export class Service {
3
- constructor(dependencies) {
4
- this.initializeUseCase = new InitializeUseCase(dependencies);
5
- }
6
-
7
- }
@@ -1,18 +0,0 @@
1
- // import { State } from '../gateways/State';
2
- class Presenter {
3
- updateDependencies(state, updateState) {
4
- this.state = state;
5
- this.updateState = updateState;
6
- }
7
-
8
- updateView(view) {
9
- this.updateState({ ...this.state,
10
- behaviours: { ...this.state.behaviours,
11
- appContext: view
12
- }
13
- });
14
- }
15
-
16
- }
17
-
18
- export default Presenter;
@@ -1,25 +0,0 @@
1
- import { AbstractResource } from "../../../sdk/application/interfaces/gateways/AbstractResource";
2
-
3
- /** Sample Implementation of AppResource */
4
- export class AppResource extends AbstractResource {
5
- initialize() {}
6
-
7
- destroy() {}
8
-
9
- initializeContext(context) {
10
- this.context = context;
11
- }
12
-
13
- initializeApiHeader(headers) {
14
- this.headers = headers;
15
- }
16
-
17
- getContext() {
18
- return this.context;
19
- }
20
-
21
- getApiHeader() {
22
- return this.headers;
23
- }
24
-
25
- }
@@ -1,6 +0,0 @@
1
- export default class AbstractUseCase {
2
- constructor(dependencies) {
3
- this.dependencies = dependencies;
4
- }
5
-
6
- }