@zohodesk/library-platform 1.1.3 → 1.1.6

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 (261) hide show
  1. package/README.md +3 -3
  2. package/es/bc/sdk/EventHandlers.js +1 -0
  3. package/es/bc/sdk/Properties.js +10 -0
  4. package/es/bc/sdk/ResourceNamesEnum.js +6 -0
  5. package/es/bc/zform/Symbol.js +1 -0
  6. package/es/bc/zhttp/Errors.js +14 -0
  7. package/es/bc/zhttp/index.js +3 -1
  8. package/es/bc/zlist/Constants.js +8 -1
  9. package/es/bc/zlist/Events.js +140 -0
  10. package/es/bc/zlist/index.js +2 -1
  11. package/es/bc/zrecord/Constants.js +3 -1
  12. package/es/cc/action-icon/Properties.js +19 -1
  13. package/es/cc/action-location/Constants.js +5 -3
  14. package/es/cc/architecture/LifeCycleActionEnum.js +2 -8
  15. package/es/cc/button/Constants.js +7 -0
  16. package/es/cc/button/Events.js +5 -0
  17. package/es/cc/button/Properties.js +77 -0
  18. package/es/cc/button/index.js +3 -0
  19. package/es/cc/component/FallbackView.js +1 -0
  20. package/es/cc/component/LifeCycleEventsEnum.js +9 -0
  21. package/es/cc/fields/currency/Model.js +2 -0
  22. package/es/cc/fields/field/Properties.js +1 -1
  23. package/es/cc/fields/formula/Model.js +5 -0
  24. package/es/cc/form/Constants.js +2 -0
  25. package/es/cc/form/Events.js +20 -0
  26. package/es/cc/form-connected/Constants.js +13 -0
  27. package/es/cc/index.js +3 -0
  28. package/es/cc/link/Properties.js +0 -1
  29. package/es/cc/list-item/Constants.js +7 -0
  30. package/es/cc/list-item/Events.js +14 -0
  31. package/es/cc/list-item/Properties.js +131 -0
  32. package/es/cc/list-item/index.js +3 -0
  33. package/es/cc/more-dropdown/Constants.js +7 -0
  34. package/es/cc/more-dropdown/Events.js +14 -0
  35. package/es/cc/more-dropdown/Properties.js +66 -0
  36. package/es/cc/more-dropdown/index.js +3 -0
  37. package/es/cc/section/Constants.js +2 -0
  38. package/es/cc/section/Events.js +20 -0
  39. package/es/cc/table-connected/ErrorEventType.js +32 -0
  40. package/es/cc/table-connected/Events.js +96 -0
  41. package/es/cc/table-connected/Properties.js +16 -0
  42. package/es/cc/table-connected/SdkContract.js +132 -0
  43. package/es/cc/table-connected/constants/Events.js +2 -0
  44. package/es/cc/table-connected/index.js +3 -1
  45. package/es/cc/table-list/Constants.js +4 -0
  46. package/es/cc/table-list/Properties.js +25 -0
  47. package/es/cc/table-list/row/Properties.js +44 -0
  48. package/es/index.js +6 -2
  49. package/es/library/behaviours/keyboard-controls/applications/usecases/DestructUsecase.js +5 -2
  50. package/es/library/behaviours/list-selection/frameworks/ActionHandlerFactory.js +4 -3
  51. package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +116 -4
  52. package/es/library/custom-component/applications/entities-factory/BehavioursFactory.js +18 -16
  53. package/es/library/custom-component/applications/interfaces/gateways/ISchemaValidator.js +1 -0
  54. package/es/library/custom-component/applications/usecases/InitializeUseCase.js +3 -2
  55. package/es/library/custom-component/applications/usecases/UpdatePropertyUseCase.js +6 -2
  56. package/es/library/custom-component/applications/usecases/UpdateStateUseCase.js +5 -1
  57. package/es/library/custom-component/domain/entities/Component.js +20 -3
  58. package/es/library/custom-component/domain/entities/LifeCycleAction.js +14 -3
  59. package/es/library/custom-component/domain/entities/Properties.js +19 -1
  60. package/es/library/custom-component/frameworks/json-schema-validator/Validator.js +36 -1
  61. package/es/library/custom-component/frameworks/ui/CreateCustomComponent.js +23 -11
  62. package/es/library/custom-component/frameworks/ui/DependencyFactory.js +4 -3
  63. package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +6 -0
  64. package/es/library/dot/components/action-location/frameworks/ui/EventHandlersFactory.js +1 -1
  65. package/es/library/dot/components/form/frameworks/ui/EventHandlerFactory.js +23 -3
  66. package/es/library/dot/components/form/frameworks/ui/FormView.js +6 -3
  67. package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +4 -0
  68. package/es/library/dot/components/form-fields/checkbox/frameworks/ui/CheckboxView.js +1 -0
  69. package/es/library/dot/components/form-fields/currency/frameworks/ui/CurrencyView.js +1 -0
  70. package/es/library/dot/components/form-fields/date/frameworks/ui/DateView.js +1 -0
  71. package/es/library/dot/components/form-fields/datetime/frameworks/ui/DateTimeView.js +1 -0
  72. package/es/library/dot/components/form-fields/decimal/frameworks/ui/DecimalView.js +1 -0
  73. package/es/library/dot/components/form-fields/email/frameworks/ui/EmailView.js +1 -0
  74. package/es/library/dot/components/form-fields/multi-select/frameworks/ui/MultiSelectView.js +1 -0
  75. package/es/library/dot/components/form-fields/number/frameworks/ui/NumberView.js +1 -0
  76. package/es/library/dot/components/form-fields/percentage/frameworks/ui/PercentageView.js +1 -0
  77. package/es/library/dot/components/form-fields/phone/frameworks/ui/PhoneView.js +1 -0
  78. package/es/library/dot/components/form-fields/pick-list/frameworks/ui/PickListView.js +1 -0
  79. package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextAreaView.js +1 -0
  80. package/es/library/dot/components/form-fields/textbox/frameworks/ui/TextBoxView.js +1 -0
  81. package/es/library/dot/components/form-fields/url/frameworks/ui/UrlView.js +1 -0
  82. package/es/library/dot/components/section/frameworks/ui/EventHandlerFactory.js +26 -3
  83. package/es/library/dot/components/table-list/frameworks/hooks/useDropIndicator.js +8 -0
  84. package/es/library/dot/components/table-list/frameworks/hooks/useRowData.js +15 -0
  85. package/es/library/dot/components/table-list/frameworks/hooks/useTableRowReorder.js +105 -0
  86. package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +85 -15
  87. package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +240 -1
  88. package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +28 -4
  89. package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +25 -9
  90. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/MassAction.js +11 -2
  91. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +50 -8
  92. package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowSelection.js +7 -1
  93. package/es/library/dot/components/table-list/frameworks/utils/getHeaderClasses.js +37 -0
  94. package/es/library/dot/components/table-list/frameworks/utils/getTableListClassName.js +37 -0
  95. package/es/library/dot/components/table-list/frameworks/utils/reOrder.js +90 -0
  96. package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIconView.js +10 -1
  97. package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/css/ActionIconView.module.css +3 -0
  98. package/es/library/dot/legacy-to-new-arch/button/frameworks/ui/Button.js +12 -0
  99. package/es/library/dot/legacy-to-new-arch/button/frameworks/ui/ButtonView.js +41 -0
  100. package/es/library/dot/legacy-to-new-arch/list-item/frameworks/ui/ListItem.js +12 -0
  101. package/es/library/dot/legacy-to-new-arch/list-item/frameworks/ui/ListItemView.js +122 -0
  102. package/es/library/dot/legacy-to-new-arch/more-dropdown/frameworks/ui/MoreDropdown.js +12 -0
  103. package/es/library/dot/legacy-to-new-arch/more-dropdown/frameworks/ui/MoreDropdownView.js +43 -0
  104. package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilterView.js +8 -4
  105. package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/TextAreaView.js +1 -1
  106. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionsAdapter.js +96 -0
  107. package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/EventHandlersFactory.js +12 -3
  108. package/es/platform/client-actions/template-resolver/index.js +1 -0
  109. package/es/platform/client-actions/translators/client-actions-translator/index.js +5 -2
  110. package/es/platform/client-actions/translators/condition-resolver/field-evaluators/GetResolvedContextFieldValue.js +3 -2
  111. package/es/platform/client-actions/translators/context-resolver/index.js +7 -10
  112. package/es/platform/components/form-connected/frameworks/EventHandlersFactory.js +91 -0
  113. package/es/platform/components/form-connected/frameworks/FormConnectedFactory.js +33 -0
  114. package/es/{desk-frameworks → platform/components}/form-connected/frameworks/FormConnectedView.js +1 -1
  115. package/es/{desk-frameworks → platform/components}/form-connected/frameworks/FormSdkFactory.js +3 -14
  116. package/es/platform/components/table-connected/adapters/controllers/ColumnChooserOpenedController.js +28 -0
  117. package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ColumnChooserUpdateController.js +5 -5
  118. package/es/platform/components/table-connected/adapters/controllers/ReOrderFinishController.js +21 -0
  119. package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ResizeByMouseController.js +1 -1
  120. package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ResizeEndController.js +1 -1
  121. package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ResizeFinishController.js +1 -1
  122. package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ResizeStartController.js +2 -2
  123. package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/ScrollController.js +1 -1
  124. package/es/platform/components/table-connected/adapters/resources/ErrorPrinter.js +20 -0
  125. package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +326 -0
  126. package/es/platform/components/table-connected/application/interfaces/ISmartTableResource.js +1 -0
  127. package/es/platform/components/table-connected/frameworks/ErrorEventHandlersFactory.js +126 -0
  128. package/es/{desk-frameworks → platform/components}/table-connected/frameworks/EventHandlersFactory.js +58 -17
  129. package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +57 -0
  130. package/es/platform/components/table-connected/frameworks/TableConnectedFactory.js +78 -0
  131. package/es/{desk-frameworks → platform/components}/table-connected/frameworks/TableConnectedView.js +10 -4
  132. package/es/platform/data-source/http-template/reOrderRecord.js +44 -0
  133. package/es/platform/data-source/index.js +2 -0
  134. package/es/platform/sdk/adapters/gateways/Repository.js +31 -0
  135. package/es/platform/sdk/adapters/gateways/Service.js +27 -0
  136. package/es/platform/sdk/adapters/presenters/Presenter.js +16 -0
  137. package/es/platform/sdk/application/interfaces/UsecaseDependencies.js +1 -0
  138. package/es/platform/sdk/application/interfaces/gateways/AbstractResource.js +13 -0
  139. package/es/platform/sdk/application/interfaces/gateways/IRepository.js +1 -0
  140. package/es/platform/sdk/application/interfaces/gateways/ISdkManager.js +1 -0
  141. package/es/platform/sdk/application/interfaces/gateways/IService.js +1 -0
  142. package/es/platform/sdk/application/interfaces/input/CreateResourceInstanceUseCaseInputModel.js +1 -0
  143. package/es/platform/sdk/application/interfaces/input/DestructResourceInstanceUseCaseInputModel.js +1 -0
  144. package/es/platform/sdk/application/interfaces/input/GetResourceInstanceUseCaseInputModel.js +1 -0
  145. package/es/platform/sdk/application/interfaces/input/RegisterResourceInputModel.js +1 -0
  146. package/es/platform/sdk/application/interfaces/input/SyncStateWithResourceInputModel.js +1 -0
  147. package/es/platform/sdk/application/interfaces/output/ISdkPresenter.js +3 -0
  148. package/es/platform/sdk/application/usecases/AbstractUseCase.js +16 -0
  149. package/es/platform/sdk/application/usecases/CreateResourceInstanceUseCase.js +16 -0
  150. package/es/platform/sdk/application/usecases/DestructResourceInstanceUseCase.js +16 -0
  151. package/es/platform/sdk/application/usecases/GetResourceInstanceUseCase.js +17 -0
  152. package/es/platform/sdk/application/usecases/RegisterResourceUseCase.js +16 -0
  153. package/es/platform/sdk/application/usecases/SyncStateWithResourceUseCase.js +25 -0
  154. package/es/platform/sdk/domain/entities/ResourceManager.js +95 -0
  155. package/es/platform/sdk/domain/entities/interfaces/IResourceManager.js +1 -0
  156. package/es/platform/sdk/domain/entities/interfaces/ResourceManagerRestoreModel.js +1 -0
  157. package/es/platform/sdk/domain/entities/interfaces/SdkResource.js +1 -0
  158. package/es/platform/sdk/domain/entities/interfaces/SdkResourceDependencies.js +1 -0
  159. package/es/platform/sdk/domain/entities/interfaces/StateInterface.js +1 -0
  160. package/es/platform/sdk/frameworks/Sdk.js +11 -0
  161. package/es/platform/sdk/frameworks/SdkRegistry.js +72 -0
  162. package/es/platform/sdk-behaviour/adapters/controllers/AbstractController.js +11 -0
  163. package/es/platform/sdk-behaviour/adapters/controllers/DestructController.js +19 -0
  164. package/es/platform/sdk-behaviour/adapters/controllers/InitializeController.js +19 -0
  165. package/es/platform/sdk-behaviour/adapters/controllers/SyncStateWithResourceController.js +24 -0
  166. package/es/platform/sdk-behaviour/adapters/gateways/Repository.js +25 -0
  167. package/es/platform/sdk-behaviour/adapters/gateways/ResourceManagerGateWay.js +43 -0
  168. package/es/platform/sdk-behaviour/adapters/gateways/Service.js +19 -0
  169. package/es/platform/sdk-behaviour/applications/AbstractUseCase.js +6 -0
  170. package/es/platform/sdk-behaviour/applications/interfaces/UsecaseDependencies.js +1 -0
  171. package/es/platform/sdk-behaviour/applications/interfaces/gateways/IRepository.js +1 -0
  172. package/es/platform/sdk-behaviour/applications/interfaces/gateways/IResourceManagerGateWay.js +3 -0
  173. package/es/platform/sdk-behaviour/applications/interfaces/gateways/IService.js +1 -0
  174. package/es/platform/sdk-behaviour/applications/interfaces/input/CreateResourceInstanceUseCaseInputModel.js +1 -0
  175. package/es/platform/sdk-behaviour/applications/interfaces/input/DestructResourceInstanceUseCaseInputModel.js +1 -0
  176. package/es/platform/sdk-behaviour/applications/interfaces/input/SyncStateWithResourceUseCaseInputModel.js +1 -0
  177. package/es/platform/sdk-behaviour/applications/usecases/CreateResourceInstanceUseCase.js +14 -0
  178. package/es/platform/sdk-behaviour/applications/usecases/DestructResourceInstanceUseCase.js +14 -0
  179. package/es/platform/sdk-behaviour/applications/usecases/SyncStateWithResourceUseCase.js +22 -0
  180. package/es/platform/sdk-behaviour/domain/entities/BehaviourResourceConnector.js +49 -0
  181. package/es/platform/sdk-behaviour/domain/entities/interfaces/IBehaviourResourceConnector.js +1 -0
  182. package/es/platform/sdk-behaviour/domain/entities/interfaces/IResourceManagerProxy.js +2 -0
  183. package/es/platform/sdk-behaviour/frameworks/EventHandlerFactory.js +29 -0
  184. package/es/platform/sdk-behaviour/frameworks/SdkBehaviourFactory.js +16 -0
  185. package/es/platform/zdata-source/domain/entities/DataSource.js +18 -12
  186. package/es/platform/zfield/domain/entities/fields-manager/FieldsManager.js +7 -1
  187. package/es/platform/zform/adapters/controllers/FieldValueChangeController.js +10 -3
  188. package/es/platform/zform/adapters/presenter/FormTranslator.js +6 -127
  189. package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +32 -0
  190. package/es/platform/zform/adapters/presenter/translators/fields/BooleanFieldTranslator.js +20 -0
  191. package/es/platform/zform/adapters/presenter/translators/fields/CurrencyFieldTranslator.js +29 -0
  192. package/es/platform/zform/adapters/presenter/translators/fields/DateFieldTranslator.js +20 -0
  193. package/es/platform/zform/adapters/presenter/translators/fields/DateTimeFieldTranslator.js +21 -0
  194. package/es/platform/zform/adapters/presenter/translators/fields/DecimalFieldTranslator.js +29 -0
  195. package/es/platform/zform/adapters/presenter/translators/fields/EmailFieldTranslator.js +30 -0
  196. package/es/platform/zform/adapters/presenter/translators/fields/LookUpFieldTranslator.js +30 -0
  197. package/es/platform/zform/adapters/presenter/translators/fields/MultiselectFieldTranslator.js +29 -0
  198. package/es/platform/zform/adapters/presenter/translators/fields/NumberFieldTranslator.js +30 -0
  199. package/es/platform/zform/adapters/presenter/translators/fields/PercentageFieldTranslator.js +30 -0
  200. package/es/platform/zform/adapters/presenter/translators/fields/PhoneFieldTranslator.js +29 -0
  201. package/es/platform/zform/adapters/presenter/translators/fields/PicklistFieldTranslator.js +29 -0
  202. package/es/platform/zform/adapters/presenter/translators/fields/TextAreaFieldTranslator.js +30 -0
  203. package/es/platform/zform/adapters/presenter/translators/fields/TextFieldTranslator.js +27 -0
  204. package/es/platform/zform/adapters/presenter/translators/fields/URLFieldTranslator.js +30 -0
  205. package/es/platform/zform/adapters/presenter/translators/fields/index.js +15 -0
  206. package/es/platform/zform/applications/usecases/FieldValueChangeRequestUseCase.js +13 -1
  207. package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +3 -1
  208. package/es/platform/zform/domain/ZField.js +61 -16
  209. package/es/platform/zform/domain/ZSection.js +20 -7
  210. package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +10 -4
  211. package/es/platform/zhttp/applications/usecases/FetchUseCase.js +111 -66
  212. package/es/platform/zlist/adapters/controllers/FieldExecuteFailedController.js +25 -0
  213. package/es/platform/zlist/adapters/controllers/ReOrderController.js +25 -0
  214. package/es/platform/zlist/adapters/controllers/ReOrderFailedController.js +26 -0
  215. package/es/platform/zlist/adapters/gateways/Repository.js +12 -2
  216. package/es/platform/zlist/adapters/gateways/Service.js +8 -0
  217. package/es/platform/zlist/adapters/presenters/SelectionTranslator.js +3 -1
  218. package/es/platform/zlist/adapters/presenters/TableTranslator.js +19 -5
  219. package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +11 -12
  220. package/es/platform/zlist/adapters/presenters/translators/EmptyViewModel.js +2 -1
  221. package/es/platform/zlist/adapters/presenters/translators/Header.js +8 -4
  222. package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +3 -2
  223. package/es/platform/zlist/adapters/presenters/translators/ResizerStateTranslator.js +7 -3
  224. package/es/platform/zlist/adapters/presenters/translators/fields/CurrencyFieldTranslator.js +1 -0
  225. package/es/platform/zlist/adapters/presenters/translators/fields/FormulaFieldTranslator.js +3 -0
  226. package/es/platform/zlist/adapters/presenters/utils/DefaultClientActions.js +1 -1
  227. package/es/platform/zlist/applications/entities-factory/ListFactory.js +3 -2
  228. package/es/platform/zlist/applications/interfaces/input/GetContextUseCaseInput.js +1 -0
  229. package/es/platform/zlist/applications/interfaces/input/ReOrderRecordUseCaseInput.js +1 -0
  230. package/es/platform/zlist/applications/interfaces/input/UpdateMultipleRecordUseCaseInput.js +1 -0
  231. package/es/platform/zlist/applications/usecases/DeleteMultipleRecordUseCase.js +23 -2
  232. package/es/platform/zlist/applications/usecases/DeleteSingleRecordUseCase.js +9 -0
  233. package/es/platform/zlist/applications/usecases/FetchMoreUseCase.js +1 -1
  234. package/es/platform/zlist/applications/usecases/GetContextUseCase.js +18 -0
  235. package/es/platform/zlist/applications/usecases/ReOrderFailedUseCase.js +22 -0
  236. package/es/platform/zlist/applications/usecases/ReOrderUseCase.js +25 -0
  237. package/es/platform/zlist/applications/usecases/RecordExecuteFailedUseCase.js +3 -2
  238. package/es/platform/zlist/applications/usecases/RecordSuccessCallbackUsecase.js +24 -3
  239. package/es/platform/zlist/applications/usecases/RecordUpdateUseCase.js +9 -0
  240. package/es/platform/zlist/applications/usecases/UpdateMultipleRecordUseCase.js +34 -0
  241. package/es/platform/zlist/domain/entities/List.js +73 -48
  242. package/es/platform/zlist/domain/entities/ListErrorState.js +167 -0
  243. package/es/platform/zlist/frameworks/EventHandlersFactory.js +16 -6
  244. package/es/platform/zlist/frameworks/ZListBehaviourFactory.js +6 -0
  245. package/es/platform/zrecord/applications/interfaces/input/GetMultipleRecordUsecaseInputModel.js +1 -0
  246. package/es/platform/zrecord/applications/interfaces/input/GetSingleRecordUseCaseInputModel.js +1 -0
  247. package/es/platform/zrecord/applications/usecases/GetMultipleRecordUseCase.js +16 -0
  248. package/es/platform/zrecord/applications/usecases/GetSingleRecordUseCase.js +17 -0
  249. package/es/platform/zrecord/domain/entities/GetReOrderRecordsStrategy.js +40 -0
  250. package/es/platform/zrecord/domain/entities/Records.js +9 -4
  251. package/es/platform/zrecord/domain/entities/RecordsManager.js +11 -1
  252. package/package.json +10 -8
  253. package/es/desk-frameworks/form-connected/frameworks/EventHandlersFactory.js +0 -24
  254. package/es/desk-frameworks/form-connected/frameworks/FormConnectedFactory.js +0 -33
  255. package/es/desk-frameworks/table-connected/adapters/controllers/ColumnChooserOpenedController.js +0 -36
  256. package/es/desk-frameworks/table-connected/frameworks/ListSdkFactory.js +0 -172
  257. package/es/desk-frameworks/table-connected/frameworks/TableConnectedFactory.js +0 -56
  258. /package/es/{desk-frameworks → platform/components}/form-connected/frameworks/FormConnected.js +0 -0
  259. /package/es/{desk-frameworks → platform/components}/index.js +0 -0
  260. /package/es/{desk-frameworks → platform/components}/table-connected/adapters/controllers/AbstractController.js +0 -0
  261. /package/es/{desk-frameworks → platform/components}/table-connected/frameworks/TableConnected.js +0 -0
package/README.md CHANGED
@@ -17,7 +17,7 @@ npm install @zohodesk/library-platform
17
17
  To create a Table Connected component, you can use the `TableConnectedFactory`. Here is a simple example:
18
18
 
19
19
  ```javascript
20
- import TableConnectedFactory from '@zohodesk/library-platform/TableConnectedFactory';
20
+ import {TableConnectedFactory} from '@zohodesk/library-platform';
21
21
 
22
22
  const myTableComponent = TableConnectedFactory.create({
23
23
  name: 'MyTableComponent',
@@ -37,7 +37,7 @@ You can create custom components using the `createCustomComponent` function. Thi
37
37
  #### Example
38
38
 
39
39
  ```javascript
40
- import createCustomComponent from '@zohodesk/library-platform/createCustomComponent';
40
+ import {createCustomComponent} from '@zohodesk/library-platform';
41
41
 
42
42
  const MyCustomComponent = createCustomComponent({
43
43
  name: 'MyCustomComponent',
@@ -55,7 +55,7 @@ The `ComponentRegistry` class is a singleton that allows you to register and ret
55
55
  #### Example
56
56
 
57
57
  ```javascript
58
- import ComponentRegistry from '@zohodesk/library-platform/ComponentRegistry';
58
+ import {ComponentRegistry} from '@zohodesk/library-platform';
59
59
 
60
60
  // Register a component
61
61
  ComponentRegistry.register('MyComponent', myComponentInstance);
@@ -0,0 +1 @@
1
+ import LifeCycleEvents from "../../cc/component/LifeCycleEventsEnum";
@@ -0,0 +1,10 @@
1
+ export default {
2
+ instanceName: {
3
+ required: true,
4
+ typeMetadata: {
5
+ schema: {
6
+ type: 'string'
7
+ }
8
+ }
9
+ }
10
+ };
@@ -0,0 +1,6 @@
1
+ var ResourceNamesEnum = /*#__PURE__*/function (ResourceNamesEnum) {
2
+ ResourceNamesEnum["SMART_TABLE"] = "smartTable";
3
+ return ResourceNamesEnum;
4
+ }(ResourceNamesEnum || {});
5
+
6
+ export default ResourceNamesEnum;
@@ -14,6 +14,7 @@ export const ZFORM_LAYOUT_RULES_REQUEST = 'ZFORM#LAYOUT_RULES_REQUEST';
14
14
  export const ZFORM_LAYOUT_RULES_SUCCESS = 'ZFORM#LAYOUT_RULES_SUCCESS';
15
15
  export const ZFORM_LAYOUT_RULES_FAILURE = 'ZFORM#LAYOUT_RULES_FAILURE';
16
16
  export const ZFORM_FIELD_VALUE_CHANGE_REQUEST = 'ZFORM#FIELD_VALUE_CHANGE_REQUEST';
17
+ export const ZFORM_FIELD_VALUE_CHANGED = 'ZFORM#FIELD_VALUE_CHANGED';
17
18
  export const ZFORM_SET_FIELD_ERROR_MESSAGE = 'ZFORM#SET_FIELD_ERROR_MESSAGE';
18
19
  export const ZFORM_VALIDATE_FIELD_REQUEST = 'ZFORM#VALIDATE_FIELD_REQUEST';
19
20
  export const ZFORM_SUBMIT = 'ZFORM#SUBMIT_REQUEST';
@@ -0,0 +1,14 @@
1
+ export let ZHttpErrorSource = /*#__PURE__*/function (ZHttpErrorSource) {
2
+ ZHttpErrorSource["GetResponse"] = "getResponse";
3
+ ZHttpErrorSource["Fetch"] = "fetch";
4
+ return ZHttpErrorSource;
5
+ }({});
6
+ export let ZHttpErrorCode = /*#__PURE__*/function (ZHttpErrorCode) {
7
+ ZHttpErrorCode["UnknownError"] = "UnknownError";
8
+ ZHttpErrorCode["NotFound"] = "NotFound";
9
+ ZHttpErrorCode["InternalServerError"] = "InternalServerError";
10
+ ZHttpErrorCode["ServiceUnavailable"] = "ServiceUnavailable";
11
+ ZHttpErrorCode["NetworkError"] = "NetworkError";
12
+ ZHttpErrorCode["ApiError"] = "ApiError";
13
+ return ZHttpErrorCode;
14
+ }({});
@@ -1,2 +1,4 @@
1
1
  import * as _ZHttpConstants from "./Constants";
2
- export { _ZHttpConstants as ZHttpConstants };
2
+ export { _ZHttpConstants as ZHttpConstants };
3
+ import * as _ZHttpErrors from "./Errors";
4
+ export { _ZHttpErrors as ZHttpErrors };
@@ -7,4 +7,11 @@ export const ZLIST_FETCH_SORTED = 'ZLIST#FETCH_SORTED';
7
7
  export const ZLIST_RECORD_UPDATE_SUCCEEDED = 'ZLIST#RECORD_UPDATE_SUCCEEDED';
8
8
  export const ZLIST_RECORD_UPDATE_FAILED = 'ZLIST#RECORD_UPDATE_FAILED';
9
9
  export const ZLIST_RECORD_DELETE_SUCCEEDED = 'ZLIST#RECORD_DELETE_SUCCEEDED';
10
- export const ZLIST_RECORD_DELETE_FAILED = 'ZLIST#RECORD_DELETE_FAILED';
10
+ export const ZLIST_RECORD_DELETE_FAILED = 'ZLIST#RECORD_DELETE_FAILED';
11
+ export const ZLIST_RECORD_REORDER = 'ZLIST#RECORD_REORDER';
12
+ export const ZLIST_RECORD_REORDER_FAILED = 'ZLIST#RECORD_REORDER_FAILED';
13
+ export const ZLIST_INITIAL_AVAILABLE_FIELDS_FETCH_FAILED = 'ZLIST#INITIAL_AVAILABLE_FIELDS_FETCH_FAILED';
14
+ export const ZLIST_INITIAL_SELECTED_FIELDS_FETCH_FAILED = 'ZLIST#INITIAL_SELECTED_FIELDS_FETCH_FAILED';
15
+ export const ZLIST_INITIAL_RECORDS_FETCH_FAILED = 'ZLIST#INITIAL_RECORDS_FETCH_FAILED';
16
+ export const ZLIST_INITIAL_CLIENT_ACTIONS_FETCH_FAILED = 'ZLIST#INITIAL_CLIENT_ACTIONS_FETCH_FAILED';
17
+ export const ZLIST_FETCH_MORE_RECORDS_FAILED = 'ZLIST#FETCH_MORE_RECORDS_FAILED';
@@ -0,0 +1,140 @@
1
+ import { ZLIST_FETCH_MORE_RECORDS_FAILED, ZLIST_INITIAL_AVAILABLE_FIELDS_FETCH_FAILED, ZLIST_INITIAL_CLIENT_ACTIONS_FETCH_FAILED, ZLIST_INITIAL_RECORDS_FETCH_FAILED, ZLIST_INITIAL_SELECTED_FIELDS_FETCH_FAILED, ZLIST_RECORD_DELETE_FAILED, ZLIST_RECORD_UPDATE_FAILED } from "./Constants";
2
+ export default [{
3
+ type: ZLIST_INITIAL_AVAILABLE_FIELDS_FETCH_FAILED,
4
+ payload: {
5
+ type: 'object',
6
+ properties: {
7
+ error: {
8
+ type: 'object',
9
+ properties: {
10
+ message: {
11
+ type: 'string'
12
+ },
13
+ code: {
14
+ type: 'string'
15
+ }
16
+ }
17
+ }
18
+ }
19
+ }
20
+ }, {
21
+ type: ZLIST_INITIAL_SELECTED_FIELDS_FETCH_FAILED,
22
+ payload: {
23
+ type: 'object',
24
+ properties: {
25
+ error: {
26
+ type: 'object',
27
+ properties: {
28
+ message: {
29
+ type: 'string'
30
+ },
31
+ code: {
32
+ type: 'string'
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }, {
39
+ type: ZLIST_INITIAL_RECORDS_FETCH_FAILED,
40
+ payload: {
41
+ type: 'object',
42
+ properties: {
43
+ error: {
44
+ type: 'object',
45
+ properties: {
46
+ message: {
47
+ type: 'string'
48
+ },
49
+ code: {
50
+ type: 'string'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }, {
57
+ type: ZLIST_INITIAL_CLIENT_ACTIONS_FETCH_FAILED,
58
+ payload: {
59
+ type: 'object',
60
+ properties: {
61
+ error: {
62
+ type: 'object',
63
+ properties: {
64
+ message: {
65
+ type: 'string'
66
+ },
67
+ code: {
68
+ type: 'string'
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }, {
75
+ type: ZLIST_FETCH_MORE_RECORDS_FAILED,
76
+ payload: {
77
+ type: 'object',
78
+ properties: {
79
+ from: {
80
+ type: 'number'
81
+ },
82
+ limit: {
83
+ type: 'number'
84
+ },
85
+ error: {
86
+ type: 'object',
87
+ properties: {
88
+ message: {
89
+ type: 'string'
90
+ },
91
+ code: {
92
+ type: 'string'
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }, {
99
+ type: ZLIST_RECORD_UPDATE_FAILED,
100
+ payload: {
101
+ type: 'object',
102
+ properties: {
103
+ recordId: {
104
+ type: 'string'
105
+ },
106
+ error: {
107
+ type: 'object',
108
+ properties: {
109
+ message: {
110
+ type: 'string'
111
+ },
112
+ code: {
113
+ type: 'string'
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }, {
120
+ type: ZLIST_RECORD_DELETE_FAILED,
121
+ payload: {
122
+ type: 'object',
123
+ properties: {
124
+ recordId: {
125
+ type: 'string'
126
+ },
127
+ error: {
128
+ type: 'object',
129
+ properties: {
130
+ message: {
131
+ type: 'string'
132
+ },
133
+ code: {
134
+ type: 'string'
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }]; // as EventMeta[];
@@ -1,2 +1,3 @@
1
1
  import * as _ZListConstants from "./Constants";
2
- export { _ZListConstants as ZListConstants };
2
+ export { _ZListConstants as ZListConstants };
3
+ export { default as ZListEvents } from "./Events";
@@ -27,4 +27,6 @@ _defineProperty(RecordApiActionName, "UPDATE_RECORD", 'updateRecord');
27
27
 
28
28
  _defineProperty(RecordApiActionName, "GET_CLIENTACTIONS", 'getClientActions');
29
29
 
30
- _defineProperty(RecordApiActionName, "CREATE_RECORD", 'createRecord');
30
+ _defineProperty(RecordApiActionName, "CREATE_RECORD", 'createRecord');
31
+
32
+ _defineProperty(RecordApiActionName, "GET_REORDERRECORD", 'reorderRecord');
@@ -21,7 +21,25 @@ export default {
21
21
  typeMetadata: {
22
22
  schema: {
23
23
  type: 'string',
24
- enum: ['primary', 'danger']
24
+ enum: ['primary', 'danger', 'default']
25
+ }
26
+ }
27
+ },
28
+ iconSize: {
29
+ required: false,
30
+ defaultValue: 16,
31
+ typeMetadata: {
32
+ schema: {
33
+ type: 'number'
34
+ }
35
+ }
36
+ },
37
+ hasPadding: {
38
+ required: false,
39
+ defaultValue: true,
40
+ typeMetadata: {
41
+ schema: {
42
+ type: 'boolean'
25
43
  }
26
44
  }
27
45
  },
@@ -1,11 +1,13 @@
1
1
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
 
3
+ import LifeCycleEvents from "../component/LifeCycleEventsEnum";
4
+
3
5
  class ActionLocationConstants {}
4
6
 
5
- _defineProperty(ActionLocationConstants, "MOUNT", 'ActionLocation#MOUNT');
7
+ _defineProperty(ActionLocationConstants, "MOUNT", `ActionLocation#${LifeCycleEvents.MOUNT}`);
6
8
 
7
- _defineProperty(ActionLocationConstants, "UPDATE_PROPERTIES", 'ActionLocation#UPDATE_PROPERTIES');
9
+ _defineProperty(ActionLocationConstants, "UPDATE_PROPERTIES", `ActionLocation#${LifeCycleEvents.UPDATE_PROPERTIES}`);
8
10
 
9
- _defineProperty(ActionLocationConstants, "UNMOUNT", 'ActionLocation#UNMOUNT');
11
+ _defineProperty(ActionLocationConstants, "UN_MOUNT", `ActionLocation#${LifeCycleEvents.UN_MOUNT}`);
10
12
 
11
13
  export default ActionLocationConstants;
@@ -1,8 +1,2 @@
1
- var LifeCycleAction = /*#__PURE__*/function (LifeCycleAction) {
2
- LifeCycleAction["MOUNT"] = "MOUNT";
3
- LifeCycleAction["UN_MOUNT"] = "UN_MOUNT";
4
- LifeCycleAction["UPDATE_PROPERTIES"] = "UPDATE_PROPERTIES";
5
- return LifeCycleAction;
6
- }(LifeCycleAction || {});
7
-
8
- export default LifeCycleAction;
1
+ import LifeCycleEvents from "../component/LifeCycleEventsEnum";
2
+ export default LifeCycleEvents;
@@ -0,0 +1,7 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ class ButtonConstants {}
4
+
5
+ _defineProperty(ButtonConstants, "BUTTON_CLICKED", 'BUTTON#CLICKED');
6
+
7
+ export default ButtonConstants;
@@ -0,0 +1,5 @@
1
+ import Constants from "./Constants";
2
+ export default [{
3
+ type: Constants.BUTTON_CLICKED,
4
+ payload: {}
5
+ }];
@@ -0,0 +1,77 @@
1
+ export default {
2
+ text: {
3
+ defaultValue: '',
4
+ required: false,
5
+ typeMetadata: {
6
+ schema: {
7
+ type: 'string'
8
+ }
9
+ }
10
+ },
11
+ palette: {
12
+ defaultValue: 'primaryFilled',
13
+ required: false,
14
+ typeMetadata: {
15
+ schema: {
16
+ type: 'string',
17
+ enum: ['primary', 'secondary', 'danger', 'success', 'plainPrimary', 'plainSecondary', 'plainDanger', 'plainSuccess', 'primaryFilled', 'secondaryFilled', 'dangerFilled', 'successFilled', 'info', 'tertiaryFilled']
18
+ }
19
+ }
20
+ },
21
+ size: {
22
+ defaultValue: 'medium',
23
+ required: false,
24
+ typeMetadata: {
25
+ schema: {
26
+ type: 'string',
27
+ enum: ['small', 'medium', 'large', 'xlarge']
28
+ }
29
+ }
30
+ },
31
+ isRounded: {
32
+ defaultValue: false,
33
+ required: false,
34
+ typeMetadata: {
35
+ schema: {
36
+ type: 'boolean'
37
+ }
38
+ }
39
+ },
40
+ isDisabled: {
41
+ defaultValue: false,
42
+ required: false,
43
+ typeMetadata: {
44
+ schema: {
45
+ type: 'boolean'
46
+ }
47
+ }
48
+ },
49
+ id: {
50
+ defaultValue: '',
51
+ required: false,
52
+ typeMetadata: {
53
+ schema: {
54
+ type: 'string'
55
+ }
56
+ }
57
+ },
58
+ status: {
59
+ defaultValue: 'none',
60
+ required: false,
61
+ typeMetadata: {
62
+ schema: {
63
+ type: 'string',
64
+ enum: ['loading', 'success', 'none']
65
+ }
66
+ }
67
+ },
68
+ tooltip: {
69
+ defaultValue: '',
70
+ required: false,
71
+ typeMetadata: {
72
+ schema: {
73
+ type: 'string'
74
+ }
75
+ }
76
+ }
77
+ };
@@ -0,0 +1,3 @@
1
+ export { default as ButtonProperties } from "./Properties";
2
+ export { default as ButtonEvents } from "./Events";
3
+ export { default as ButtonConstants } from "./Constants";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ var LifeCycleEvents = /*#__PURE__*/function (LifeCycleEvents) {
2
+ LifeCycleEvents["MOUNT"] = "MOUNT";
3
+ LifeCycleEvents["STATE_UPDATED"] = "STATE_UPDATED";
4
+ LifeCycleEvents["UN_MOUNT"] = "UN_MOUNT";
5
+ LifeCycleEvents["UPDATE_PROPERTIES"] = "UPDATE_PROPERTIES";
6
+ return LifeCycleEvents;
7
+ }(LifeCycleEvents || {});
8
+
9
+ export default LifeCycleEvents;
@@ -1,12 +1,14 @@
1
1
  export default function CurrencyFieldModel(_ref) {
2
2
  let {
3
3
  name,
4
+ currencyLocale,
4
5
  value,
5
6
  uiType,
6
7
  appendToActionPayload
7
8
  } = _ref;
8
9
  return {
9
10
  name,
11
+ currencyLocale,
10
12
  appendToActionPayload,
11
13
  type: uiType,
12
14
  value
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  type: {
3
- required: true,
3
+ required: false,
4
4
  typeMetadata: {
5
5
  schema: {
6
6
  anyOf: [// {
@@ -1,12 +1,17 @@
1
+ import FieldTypes from "../field/Types";
1
2
  export default function FormulaFieldModel(_ref) {
2
3
  let {
3
4
  name,
5
+ currencyLocale,
4
6
  value,
5
7
  uiType,
6
8
  appendToActionPayload
7
9
  } = _ref;
8
10
  return {
9
11
  name,
12
+ ...(uiType === FieldTypes.CurrencyField ? {
13
+ currencyLocale
14
+ } : {}),
10
15
  appendToActionPayload,
11
16
  type: uiType,
12
17
  value
@@ -2,6 +2,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
2
2
 
3
3
  class FormConstants {}
4
4
 
5
+ _defineProperty(FormConstants, "FORM_FIELD_FOCUSED", 'FORM#FIELD_FOCUSED');
6
+
5
7
  _defineProperty(FormConstants, "FORM_FIELD_BLURRED", 'FORM#FIELD_BLURRED');
6
8
 
7
9
  _defineProperty(FormConstants, "FORM_FIELD_VALUE_CHANGE_REQUEST", 'FORM#FIELD_VALUE_CHANGE_REQUEST');
@@ -1,5 +1,25 @@
1
1
  import FormConstants from "./Constants";
2
2
  const Events = [{
3
+ type: FormConstants.FORM_FIELD_FOCUSED,
4
+ payload: {
5
+ sectionId: {
6
+ name: 'sectionId',
7
+ typeMetadata: {
8
+ schema: {
9
+ type: 'string'
10
+ }
11
+ }
12
+ },
13
+ fieldName: {
14
+ name: 'fieldName',
15
+ typeMetadata: {
16
+ schema: {
17
+ type: 'string'
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }, {
3
23
  type: FormConstants.FORM_FIELD_BLURRED,
4
24
  payload: {
5
25
  sectionId: {
@@ -0,0 +1,13 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ class SmartFormConstants {}
4
+
5
+ _defineProperty(SmartFormConstants, "SMART_FORM_FIELD_FOCUSED", 'SMART_FORM#FIELD_FOCUSED');
6
+
7
+ _defineProperty(SmartFormConstants, "SMART_FORM_FIELD_BLURRED", 'SMART_FORM#FIELD_BLURRED');
8
+
9
+ _defineProperty(SmartFormConstants, "SMART_FORM_FIELD_VALUE_CHANGED", 'SMART_FORM#FIELD_VALUE_CHANGED');
10
+
11
+ _defineProperty(SmartFormConstants, "SMART_FORM_SUBMIT", 'SMART_FORM#SUBMIT');
12
+
13
+ export default SmartFormConstants;
package/es/cc/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  export * from "./avatar";
2
+ export * from "./button";
2
3
  export * from "./checkbox";
3
4
  export * from "./email";
4
5
  export * from "./highlighted-value";
5
6
  export * from "./info-icon";
6
7
  export * from "./link";
8
+ export * from "./list-item";
7
9
  export * from "./switch";
8
10
  export * from "./table-list";
9
11
  export * from "./tags";
@@ -12,4 +14,5 @@ export * from "./action-icon";
12
14
  export * from "./empty-state";
13
15
  export * from "./textbox";
14
16
  export * from "./textarea";
17
+ export * from "./table-connected";
15
18
  export * from "./fields";
@@ -27,7 +27,6 @@ export default {
27
27
  }
28
28
  },
29
29
  opensNewTab: {
30
- required: true,
31
30
  defaultValue: false,
32
31
  typeMetadata: {
33
32
  schema: {
@@ -0,0 +1,7 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ class ListItemConstants {}
4
+
5
+ _defineProperty(ListItemConstants, "LISTITEM_CLICKED", 'LISTITEM#CLICKED');
6
+
7
+ export default ListItemConstants;
@@ -0,0 +1,14 @@
1
+ import Constants from "./Constants";
2
+ export default [{
3
+ type: Constants.LISTITEM_CLICKED,
4
+ payload: {
5
+ id: {
6
+ name: 'id',
7
+ typeMetadata: {
8
+ schema: {
9
+ type: 'string'
10
+ }
11
+ }
12
+ }
13
+ }
14
+ }];