@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
@@ -0,0 +1,131 @@
1
+ export default {
2
+ id: {
3
+ defaultValue: '',
4
+ required: false,
5
+ typeMetadata: {
6
+ schema: {
7
+ type: 'string'
8
+ }
9
+ }
10
+ },
11
+ isDisabled: {
12
+ defaultValue: false,
13
+ required: false,
14
+ typeMetadata: {
15
+ schema: {
16
+ type: 'boolean'
17
+ }
18
+ }
19
+ },
20
+ isActive: {
21
+ defaultValue: false,
22
+ required: false,
23
+ typeMetadata: {
24
+ schema: {
25
+ type: 'boolean'
26
+ }
27
+ }
28
+ },
29
+ text: {
30
+ defaultValue: '',
31
+ required: false,
32
+ typeMetadata: {
33
+ schema: {
34
+ type: 'string'
35
+ }
36
+ }
37
+ },
38
+ secondaryText: {
39
+ defaultValue: '',
40
+ required: false,
41
+ typeMetadata: {
42
+ schema: {
43
+ type: 'string'
44
+ }
45
+ }
46
+ },
47
+ size: {
48
+ defaultValue: 'medium',
49
+ required: false,
50
+ typeMetadata: {
51
+ schema: {
52
+ type: 'string',
53
+ enum: ['small', 'medium', 'large']
54
+ }
55
+ }
56
+ },
57
+ tooltip: {
58
+ defaultValue: '',
59
+ required: false,
60
+ typeMetadata: {
61
+ schema: {
62
+ type: 'string'
63
+ }
64
+ }
65
+ },
66
+ icon: {
67
+ defaultValue: '',
68
+ required: false,
69
+ typeMetadata: {
70
+ schema: {
71
+ type: 'string'
72
+ }
73
+ }
74
+ },
75
+ iconSize: {
76
+ defaultValue: 14,
77
+ required: false,
78
+ typeMetadata: {
79
+ schema: {
80
+ type: 'number'
81
+ }
82
+ }
83
+ },
84
+ imgSrc: {
85
+ defaultValue: '',
86
+ required: false,
87
+ typeMetadata: {
88
+ schema: {
89
+ type: 'string'
90
+ }
91
+ }
92
+ },
93
+ imgName: {
94
+ defaultValue: '',
95
+ required: false,
96
+ typeMetadata: {
97
+ schema: {
98
+ type: 'string'
99
+ }
100
+ }
101
+ },
102
+ href: {
103
+ defaultValue: '',
104
+ required: false,
105
+ typeMetadata: {
106
+ schema: {
107
+ type: 'string'
108
+ }
109
+ }
110
+ },
111
+ target: {
112
+ defaultValue: 'self',
113
+ required: false,
114
+ typeMetadata: {
115
+ schema: {
116
+ type: 'string',
117
+ enum: ['self', 'blank', 'parent', 'top']
118
+ }
119
+ }
120
+ },
121
+ divider: {
122
+ defaultValue: 'none',
123
+ required: false,
124
+ typeMetadata: {
125
+ schema: {
126
+ type: 'string',
127
+ enum: ['none', 'before', 'after']
128
+ }
129
+ }
130
+ }
131
+ };
@@ -0,0 +1,3 @@
1
+ export { default as ListItemProperties } from "./Properties";
2
+ export { default as ListItemEvents } from "./Events";
3
+ export { default as ListItemConstants } from "./Constants";
@@ -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 MoreDropdownConstants {}
4
+
5
+ _defineProperty(MoreDropdownConstants, "MORE_DROPDOWN_OPTION_CLICKED", 'MORE_DROPDOWN#OPTION_CLICKED');
6
+
7
+ export default MoreDropdownConstants;
@@ -0,0 +1,14 @@
1
+ import Constants from "./Constants";
2
+ export default [{
3
+ type: Constants.MORE_DROPDOWN_OPTION_CLICKED,
4
+ payload: {
5
+ id: {
6
+ name: 'id',
7
+ typeMetadata: {
8
+ schema: {
9
+ type: 'string'
10
+ }
11
+ }
12
+ }
13
+ }
14
+ }];
@@ -0,0 +1,66 @@
1
+ export default {
2
+ heading: {
3
+ defaultValue: '',
4
+ required: false,
5
+ typeMetadata: {
6
+ schema: {
7
+ type: 'string'
8
+ }
9
+ }
10
+ },
11
+ options: {
12
+ defaultValue: [],
13
+ required: true,
14
+ typeMetadata: {
15
+ schema: {
16
+ type: 'array',
17
+ items: {
18
+ anyOf: [{
19
+ type: 'object',
20
+ properties: {
21
+ id: {
22
+ type: 'string'
23
+ },
24
+ value: {
25
+ type: 'string'
26
+ },
27
+ iconName: {
28
+ type: 'string'
29
+ },
30
+ iconSize: {
31
+ type: 'string'
32
+ }
33
+ },
34
+ required: ['id', 'value']
35
+ }, {
36
+ type: 'object',
37
+ properties: {
38
+ needDivider: {
39
+ type: 'boolean'
40
+ }
41
+ },
42
+ required: ['needDivider']
43
+ }]
44
+ }
45
+ }
46
+ }
47
+ },
48
+ isDisabled: {
49
+ defaultValue: false,
50
+ required: false,
51
+ typeMetadata: {
52
+ schema: {
53
+ type: 'boolean'
54
+ }
55
+ }
56
+ },
57
+ tooltip: {
58
+ defaultValue: '',
59
+ required: false,
60
+ typeMetadata: {
61
+ schema: {
62
+ type: 'string'
63
+ }
64
+ }
65
+ }
66
+ };
@@ -0,0 +1,3 @@
1
+ export { default as MoreDropdownProperties } from "./Properties";
2
+ export { default as MoreDropdownEvents } from "./Events";
3
+ export { default as MoreDropdownConstants } from "./Constants";
@@ -2,6 +2,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
2
2
 
3
3
  class SectionConstants {}
4
4
 
5
+ _defineProperty(SectionConstants, "SECTION_FIELD_FOCUSED", 'SECTION#FIELD_FOCUSED');
6
+
5
7
  _defineProperty(SectionConstants, "SECTION_FIELD_BLURRED", 'SECTION#FIELD_BLURRED');
6
8
 
7
9
  _defineProperty(SectionConstants, "SECTION_FIELD_CHANGED", 'SECTION#FIELD_VALUE_CHANGED');
@@ -1,5 +1,25 @@
1
1
  import SectionConstants from "./Constants";
2
2
  const Events = [{
3
+ type: SectionConstants.SECTION_FIELD_FOCUSED,
4
+ payload: {
5
+ id: {
6
+ name: 'id',
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: SectionConstants.SECTION_FIELD_BLURRED,
4
24
  payload: {
5
25
  id: {
@@ -0,0 +1,32 @@
1
+ export let ErrorCode = /*#__PURE__*/function (ErrorCode) {
2
+ ErrorCode["FETCH_MORE_RECORDS_FAILED"] = "FETCH_MORE_RECORDS_FAILED";
3
+ ErrorCode["INITIAL_AVAILABLE_FIELDS_FETCH_FAILED"] = "INITIAL_AVAILABLE_FIELDS_FETCH_FAILED";
4
+ ErrorCode["INITIAL_CLIENT_ACTIONS_FETCH_FAILED"] = "INITIAL_CLIENT_ACTIONS_FETCH_FAILED";
5
+ ErrorCode["INITIAL_RECORDS_FETCH_FAILED"] = "INITIAL_RECORDS_FETCH_FAILED";
6
+ ErrorCode["INITIAL_SELECTED_FIELDS_FETCH_FAILED"] = "INITIAL_SELECTED_FIELDS_FETCH_FAILED";
7
+ ErrorCode["RECORD_DELETE_FAILED"] = "RECORD_DELETE_FAILED";
8
+ ErrorCode["RECORD_UPDATE_FAILED"] = "RECORD_UPDATE_FAILED";
9
+ return ErrorCode;
10
+ }({}); // Future error event types can be added here as reference
11
+ // export type RecordsUpdateFailedErrorEvent = {
12
+ // type: typeof ERROR_OCCURRED;
13
+ // payload: {
14
+ // code: ErrorCode.RECORD_UPDATE_FAILED;
15
+ // message: string;
16
+ // errorDetails: {
17
+ // recordIds: string[];
18
+ // error: any;
19
+ // };
20
+ // };
21
+ // };
22
+ // export type RecordsDeleteFailedErrorEvent = {
23
+ // type: typeof ERROR_OCCURRED;
24
+ // payload: {
25
+ // code: ErrorCode.RECORD_DELETE_FAILED;
26
+ // message: string;
27
+ // errorDetails: {
28
+ // recordIds: string[];
29
+ // error: any;
30
+ // };
31
+ // };
32
+ // };
@@ -0,0 +1,96 @@
1
+ import { ZListEvents } from "../../bc/zlist";
2
+ import SmartTableEventConstants from "./constants/Events";
3
+ const {
4
+ DELETE_RECORDS_SUCCESS,
5
+ UPDATE_RECORDS_SUCCESS,
6
+ RECORDS_SELECTED,
7
+ RECORDS_DESELECTED,
8
+ SMART_TABLE_ROW_ACTION_TRIGGERED,
9
+ // TODO: need to change in doc SMART_TABLE#ROW_CLICKED
10
+ SELECTION_LIMIT_EXCEEDED
11
+ } = SmartTableEventConstants;
12
+ export default [...ZListEvents, {
13
+ type: DELETE_RECORDS_SUCCESS,
14
+ payload: {
15
+ type: 'object',
16
+ properties: {
17
+ recordIds: {
18
+ type: 'array',
19
+ items: {
20
+ type: 'string'
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }, {
26
+ type: UPDATE_RECORDS_SUCCESS,
27
+ payload: {
28
+ type: 'object',
29
+ properties: {
30
+ recordIds: {
31
+ type: 'array',
32
+ items: {
33
+ type: 'string'
34
+ }
35
+ },
36
+ updatedFields: {
37
+ type: 'object',
38
+ additionalProperties: true
39
+ }
40
+ }
41
+ }
42
+ }, {
43
+ type: RECORDS_SELECTED,
44
+ payload: {
45
+ type: 'object',
46
+ properties: {
47
+ recordIds: {
48
+ type: 'array',
49
+ items: {
50
+ type: 'string'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }, {
56
+ type: RECORDS_DESELECTED,
57
+ payload: {
58
+ type: 'object',
59
+ properties: {
60
+ recordIds: {
61
+ type: 'array',
62
+ items: {
63
+ type: 'string'
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }, {
69
+ type: SMART_TABLE_ROW_ACTION_TRIGGERED,
70
+ payload: {
71
+ type: 'object',
72
+ properties: {
73
+ recordId: {
74
+ type: 'string'
75
+ },
76
+ action: {
77
+ type: 'string'
78
+ },
79
+ data: {
80
+ type: 'object',
81
+ additionalProperties: true
82
+ }
83
+ }
84
+ }
85
+ }, {
86
+ type: SELECTION_LIMIT_EXCEEDED,
87
+ payload: {
88
+ type: 'object',
89
+ properties: {
90
+ maxSelectionAllowed: {
91
+ type: 'number'
92
+ }
93
+ },
94
+ required: ['maxSelectionAllowed']
95
+ }
96
+ }]; // as EventMeta[];
@@ -45,6 +45,22 @@ export default {
45
45
  }
46
46
  }
47
47
  },
48
+ reOrderConfig: {
49
+ required: false,
50
+ defaultValue: {
51
+ isEnabled: false
52
+ },
53
+ typeMetadata: {
54
+ schema: {
55
+ type: 'object',
56
+ properties: {
57
+ isEnabled: {
58
+ type: 'boolean'
59
+ }
60
+ }
61
+ }
62
+ }
63
+ },
48
64
  componentMapping: {
49
65
  required: false,
50
66
  defaultValue: {
@@ -0,0 +1,132 @@
1
+ export const SdkContracts = {
2
+ getRecordInputMeta: {
3
+ type: 'object',
4
+ properties: {
5
+ recordId: {
6
+ type: 'string'
7
+ }
8
+ },
9
+ required: ['recordId']
10
+ },
11
+ createRecordInputMeta: {
12
+ type: 'object',
13
+ properties: {
14
+ data: {
15
+ type: 'object'
16
+ }
17
+ },
18
+ required: ['data']
19
+ },
20
+ getContextInputMeta: {
21
+ type: 'object',
22
+ properties: {
23
+ variableName: {
24
+ type: 'string'
25
+ }
26
+ }
27
+ },
28
+ updateRecordInputMeta: {
29
+ type: 'object',
30
+ properties: {
31
+ shouldFetch: {
32
+ type: 'boolean'
33
+ },
34
+ recordId: {
35
+ type: 'string'
36
+ },
37
+ record: {
38
+ type: 'object'
39
+ }
40
+ },
41
+ required: ['recordId', 'record']
42
+ },
43
+ deleteRecordInputMeta: {
44
+ type: 'object',
45
+ properties: {
46
+ recordId: {
47
+ type: 'string'
48
+ }
49
+ },
50
+ required: ['recordId']
51
+ },
52
+ deleteRecordsInputMeta: {
53
+ type: 'object',
54
+ properties: {
55
+ shouldFetch: {
56
+ type: 'boolean'
57
+ },
58
+ recordIds: {
59
+ type: 'array',
60
+ items: {
61
+ type: 'string'
62
+ },
63
+ minItems: 1,
64
+ uniqueItems: true
65
+ }
66
+ },
67
+ required: ['recordIds']
68
+ },
69
+ updateRecordsInputMeta: {
70
+ type: 'object',
71
+ properties: {
72
+ shouldFetch: {
73
+ type: 'boolean'
74
+ },
75
+ recordsMap: {
76
+ type: 'array',
77
+ items: {
78
+ type: 'object',
79
+ properties: {
80
+ id: {
81
+ type: 'string'
82
+ }
83
+ },
84
+ required: ['id']
85
+ },
86
+ minItems: 1,
87
+ uniqueItems: true
88
+ }
89
+ },
90
+ required: ['recordsMap']
91
+ },
92
+ selectRecordsInputMeta: {
93
+ type: 'object',
94
+ properties: {
95
+ ids: {
96
+ type: 'array',
97
+ items: {
98
+ type: 'string'
99
+ },
100
+ minItems: 1,
101
+ uniqueItems: true
102
+ }
103
+ },
104
+ required: ['ids']
105
+ },
106
+ reOrderRecordInputMeta: {
107
+ type: 'object',
108
+ properties: {
109
+ fromIndex: {
110
+ type: 'number'
111
+ },
112
+ toIndex: {
113
+ type: 'number'
114
+ }
115
+ },
116
+ required: ['fromIndex', 'toIndex']
117
+ },
118
+ deselectRecordsInputMeta: {
119
+ type: 'object',
120
+ properties: {
121
+ ids: {
122
+ type: 'array',
123
+ items: {
124
+ type: 'string'
125
+ },
126
+ minItems: 1,
127
+ uniqueItems: true
128
+ }
129
+ },
130
+ required: ['ids']
131
+ }
132
+ };
@@ -1,3 +1,4 @@
1
+ export const ERROR_OCCURRED = 'SMART_TABLE#ERROR_OCCURRED';
1
2
  export default {
2
3
  DELETE_RECORDS_SUCCESS: 'SMART_TABLE#RECORD_DELETED',
3
4
  UPDATE_RECORDS_SUCCESS: 'SMART_TABLE#RECORD_UPDATED',
@@ -6,6 +7,7 @@ export default {
6
7
  RECORDS_SELECTED: 'SMART_TABLE#RECORDS_SELECTED',
7
8
  RECORDS_DESELECTED: 'SMART_TABLE#RECORDS_DESELECTED',
8
9
  SMART_TABLE_ROW_ACTION_TRIGGERED: 'SMART_TABLE#ROW_ACTION_TRIGGERED',
10
+ ERROR_OCCURRED,
9
11
  SELECTION_LIMIT_EXCEEDED: 'SMART_TABLE#SELECTION_LIMIT_EXCEEDED'
10
12
  };
11
13
  export const SMART_TABLE_SELECTION_TOGGLED = 'SMART_TABLE#SELECTION_TOGGLED';
@@ -1,4 +1,6 @@
1
+ export { ErrorCode as SmartTableErrorCode } from "./ErrorEventType";
1
2
  import * as _SmartTableConstants from "./constants";
2
3
  export { _SmartTableConstants as SmartTableConstants };
3
4
  import * as _SmartTableProperties from "./Properties";
4
- export { _SmartTableProperties as SmartTableProperties };
5
+ export { _SmartTableProperties as SmartTableProperties };
6
+ export { default as SmartTableEventsContracts } from "./Events";
@@ -22,4 +22,8 @@ _defineProperty(Constants, "TABLE_LIST_FIELD_CHANGED", 'TABLE_LIST#FIELD_CHANGED
22
22
 
23
23
  _defineProperty(Constants, "TABLE_LIST_ROW_CLICKED", 'TABLE_LIST#ROW_CLICKED');
24
24
 
25
+ _defineProperty(Constants, "TABLE_LIST_ROW_DRAG_START", 'TABLE_LIST#ROW_DRAG_START');
26
+
27
+ _defineProperty(Constants, "TABLE_LIST_ROW_DRAG_END", 'TABLE_LIST#ROW_DRAG_END');
28
+
25
29
  export default Constants;
@@ -18,6 +18,15 @@ import PickListProperties from "../fields/pick-list/Properties";
18
18
  import TextProperties from "../fields/text/Properties";
19
19
  import UrlProperties from "../fields/url/Properties";
20
20
  const TableListProperties = {
21
+ isReOrderLoading: {
22
+ required: false,
23
+ typeMetadata: {
24
+ schema: {
25
+ type: 'boolean'
26
+ }
27
+ },
28
+ defaultValue: false
29
+ },
21
30
  isLoading: {
22
31
  required: false,
23
32
  typeMetadata: {
@@ -308,6 +317,22 @@ const TableListProperties = {
308
317
  }
309
318
  }
310
319
  },
320
+ reOrderConfig: {
321
+ required: false,
322
+ defaultValue: {
323
+ isEnabled: false
324
+ },
325
+ typeMetadata: {
326
+ schema: {
327
+ type: 'object',
328
+ properties: {
329
+ isEnabled: {
330
+ type: 'boolean'
331
+ }
332
+ }
333
+ }
334
+ }
335
+ },
311
336
  ...SelectionConfigProperties
312
337
  };
313
338
  export default TableListProperties;
@@ -1,6 +1,15 @@
1
1
  import { Width } from "../data-types/Header";
2
2
  import RowCursor from "../data-types/RowCursor";
3
3
  const TableRowProperties = {
4
+ isReorderEnabled: {
5
+ required: false,
6
+ defaultValue: false,
7
+ typeMetadata: {
8
+ schema: {
9
+ type: 'boolean'
10
+ }
11
+ }
12
+ },
4
13
  isSelectionEnabled: {
5
14
  required: false,
6
15
  defaultValue: false,
@@ -119,6 +128,41 @@ const TableRowProperties = {
119
128
  type: 'boolean'
120
129
  }
121
130
  }
131
+ },
132
+ isSorting: {
133
+ required: false,
134
+ defaultValue: false,
135
+ typeMetadata: {
136
+ schema: {
137
+ type: 'boolean'
138
+ }
139
+ }
140
+ },
141
+ isDroppable: {
142
+ required: false,
143
+ defaultValue: false,
144
+ typeMetadata: {
145
+ schema: {
146
+ type: 'boolean'
147
+ }
148
+ }
149
+ },
150
+ dropPosition: {
151
+ required: false,
152
+ typeMetadata: {
153
+ schema: {
154
+ type: "string"
155
+ }
156
+ }
157
+ },
158
+ isReOrderLoading: {
159
+ required: false,
160
+ defaultValue: false,
161
+ typeMetadata: {
162
+ schema: {
163
+ type: 'boolean'
164
+ }
165
+ }
122
166
  }
123
167
  };
124
168
  export default TableRowProperties;
package/es/index.js CHANGED
@@ -2,8 +2,12 @@ import * as _CC from "./cc";
2
2
  export { _CC as CC };
3
3
  import * as _BC from "./bc";
4
4
  export { _BC as BC };
5
- export { TableConnectedFactory } from "./desk-frameworks";
5
+ export { TableConnectedFactory, FormConnectedFactory } from "./platform/components";
6
6
  export { ComponentRegistry, createCustomComponent } from "./library";
7
7
  export { default as TableFieldComponents } from "./library/dot/legacy-to-new-arch/table-field-components";
8
8
  import * as _Components from "./library/dot/legacy-to-new-arch";
9
- export { _Components as Components };
9
+ export { _Components as Components };
10
+ export { platformSDK } from "./platform/sdk/frameworks/Sdk";
11
+ export { sdkRegistry } from "./platform/sdk/frameworks/SdkRegistry";
12
+ export { validations as defaultFieldValidations } from "./library/behaviours/field-validation/frameworks/utils/FormBasicValidationAdaptor";
13
+ export { getClientActionsAdapter, fetchClientActions } from "./platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionsAdapter";