@zohodesk/library-platform 1.0.2 → 1.1.0-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.
- package/es/bc/list-selection/Properties.js +21 -12
- package/es/bc/sort-by/Properties.js +20 -15
- package/es/bc/table-column-resizer/Properties.js +1 -1
- package/es/bc/zclient-actions/Constants.js +11 -0
- package/es/bc/zclient-actions/EventHandlers.js +1 -0
- package/es/bc/zhttp/Properties.js +11 -1
- package/es/bc/zlist/Properties.js +15 -3
- package/es/bc/zrecord/Constants.js +3 -1
- package/es/cc/action-icon/Model.js +6 -2
- package/es/cc/action-icon/Properties.js +18 -0
- package/es/cc/action-location/Properties.js +54 -3
- package/es/cc/component/properties/PropertiesConverter.js +23 -0
- package/es/cc/fields/field/Properties.js +9 -1
- package/es/cc/fields/field/Types.js +16 -16
- package/es/cc/fields/multi-select/Properties.js +1 -1
- package/es/cc/fields/pick-list/Properties.js +1 -1
- package/es/cc/table-connected/Properties.js +52 -45
- package/es/cc/table-list/Properties.js +109 -324
- package/es/cc/table-list/data-types/Header.js +8 -7
- package/es/cc/table-list/data-types/RowCursor.js +8 -0
- package/es/cc/table-list/model/RowModel.js +2 -4
- package/es/cc/table-list/row/Properties.js +15 -10
- package/es/desk-frameworks/table-connected/frameworks/TableConnectedFactory.js +4 -1
- package/es/desk-frameworks/table-connected/frameworks/TableConnectedView.js +14 -13
- package/es/desk-frameworks/table-connected/frameworks/__tests__/TableConnectedFactory.spec.js +453 -0
- package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/http-template/getAvailableFields.js +86 -0
- package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/http-template/getRecords.js +81 -0
- package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/http-template/getSelectedFields.js +32 -0
- package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/index.js +11 -0
- package/es/library/behaviours/list-selection/adapters/gateways/Repository.js +1 -1
- package/es/library/behaviours/list-selection/adapters/gateways/Service.js +5 -5
- package/es/library/behaviours/list-selection/{entities → domain/entities}/ListItemSelection.js +29 -9
- package/es/library/behaviours/sort-by/adapters/gateway/Repository.js +1 -1
- package/es/library/behaviours/sort-by/adapters/gateway/Service.js +1 -1
- package/es/library/behaviours/sort-by/{entities → domain/entities}/SortBy.js +1 -1
- package/es/library/behaviours/sort-by/frameworks/ui/SortByBehaviourFactory.js +2 -2
- package/es/library/behaviours/text-to-field-click/adapters/gateway/Repository.js +1 -1
- package/es/library/behaviours/text-to-field-click/{entities → domain/entities}/FieldEventConverter.js +1 -1
- package/es/library/behaviours/text-to-field-click/frameworks/ui/EventHandlersFactory.js +1 -1
- package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +1 -1
- package/es/library/custom-component/adapters/gateways/service/Service.js +6 -6
- package/es/library/custom-component/{usecases → applications}/entities-factory/BehavioursFactory.js +1 -1
- package/es/library/custom-component/{usecases → applications}/entities-factory/ComponentFactory.js +3 -3
- package/es/library/custom-component/{usecases → applications}/entities-factory/EventHandlersFactory.js +1 -1
- package/es/library/custom-component/{usecases → applications}/entities-factory/PropertiesFactory.js +9 -3
- package/es/library/custom-component/{usecases/interactors → applications/usecases}/UnmountUseCase.js +1 -1
- package/es/library/custom-component/{entities → domain/entities}/Component.js +40 -7
- package/es/library/custom-component/{entities → domain/entities}/DefaultAppendToActionPayload.js +2 -2
- package/es/library/custom-component/{entities → domain/entities}/Properties.js +4 -5
- package/es/library/custom-component/frameworks/ui/__testcases__/CreateCustomComponent.spec.js +106 -0
- package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +5 -0
- package/es/library/dot/components/action-location/frameworks/ui/ActionLocationView.js +8 -29
- package/es/library/dot/components/actions-renderer/frameworks/ui/ActionsRenderer.js +9 -0
- package/es/library/dot/components/actions-renderer/frameworks/ui/ActionsRendererView.js +37 -0
- package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +16 -6
- package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +10 -0
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +7 -6
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +12 -14
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/ActionColumn.js +3 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +7 -7
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/Headers.js +0 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/SelectAll.js +4 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Columns.js +2 -6
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +24 -14
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +5 -1
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.js +2 -4
- package/es/library/dot/legacy-to-new-arch/action-icon/{ActionIcon.js → frameworks/ui/ActionIcon.js} +2 -2
- package/es/library/dot/legacy-to-new-arch/action-icon/{ActionIconView.js → frameworks/ui/ActionIconView.js} +11 -5
- package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/css/ActionIcon.module.css +3 -0
- package/es/library/dot/legacy-to-new-arch/index.js +1 -1
- package/es/platform/data-broker/http-template/deleteRecord.js +1 -1
- package/es/platform/data-broker/http-template/deleteRecords.js +1 -1
- package/es/platform/data-broker/http-template/getAvailableFields.js +1 -1
- package/es/platform/data-broker/http-template/getClientActions.js +23 -0
- package/es/platform/data-broker/http-template/getRecords.js +1 -1
- package/es/platform/data-broker/http-template/getSelectedFields.js +1 -1
- package/es/platform/data-broker/http-template/updateRecord.js +1 -1
- package/es/platform/data-broker/index.js +3 -3
- package/es/platform/zclient-actions/Readme.md +38 -0
- package/es/platform/zclient-actions/adapters/controllers/AbstractController.js +8 -0
- package/es/platform/zclient-actions/adapters/controllers/ClientActionBehaviourExecutorController.js +27 -0
- package/es/platform/zclient-actions/adapters/controllers/FailureController.js +28 -0
- package/es/platform/zclient-actions/adapters/controllers/FetchStateStopController.js +21 -0
- package/es/platform/zclient-actions/adapters/controllers/MountController.js +25 -0
- package/es/platform/zclient-actions/adapters/controllers/NoContentController.js +23 -0
- package/es/platform/zclient-actions/adapters/controllers/SetClientActionsController.js +24 -0
- package/es/platform/zclient-actions/adapters/controllers/SuccessController.js +28 -0
- package/es/platform/zclient-actions/adapters/gateways/Repository.js +28 -0
- package/es/platform/zclient-actions/adapters/gateways/Service.js +35 -0
- package/es/platform/zclient-actions/adapters/presenters/Presenter.js +24 -0
- package/es/platform/zclient-actions/applications/entities-factory/ClientActionFactory.js +12 -0
- package/es/platform/zclient-actions/applications/entities-factory/ClientActionManagerFactory.js +10 -0
- package/es/platform/zclient-actions/applications/usecases/ExecuteActionBehaviourUseCase.js +33 -0
- package/es/platform/zclient-actions/applications/usecases/FailureUseCase.js +22 -0
- package/es/platform/zclient-actions/applications/usecases/FetchStateStopUseCase.js +25 -0
- package/es/platform/zclient-actions/applications/usecases/NoContentUseCase.js +27 -0
- package/es/platform/zclient-actions/applications/usecases/SetClientActionsUseCase.js +21 -0
- package/es/platform/zclient-actions/applications/usecases/SuccessUseCase.js +22 -0
- package/es/platform/zclient-actions/domain/entities/ClientAction.js +57 -0
- package/es/platform/zclient-actions/domain/entities/ClientActionManager.js +141 -0
- package/es/platform/zclient-actions/domain/entities/ClientActions.js +54 -0
- package/es/platform/zclient-actions/domain/entities/EventMapping.js +32 -0
- package/es/platform/zclient-actions/domain/entities/EventMappings.js +15 -0
- package/es/platform/zclient-actions/domain/entities/GetClientActionsStrategy.js +44 -0
- package/es/platform/zclient-actions/domain/entities/UIComponentMapping.js +37 -0
- package/es/platform/zclient-actions/domain/entities/interfaces/IUIComponentMapping.js +0 -0
- package/es/platform/zclient-actions/frameworks/ActionsHandlersFactory.js +47 -0
- package/es/platform/zclient-actions/frameworks/ClientActionBehaviourFactory.js +12 -0
- package/es/platform/zdata-broker/adapters/controllers/{ActionExecutorController.js → DataBrokerExecutorController.js} +1 -1
- package/es/platform/zdata-broker/adapters/gateways/Repository.js +1 -1
- package/es/platform/zdata-broker/adapters/gateways/Service.js +5 -5
- package/es/platform/zdata-broker/adapters/gateways/TemplateHelpers.js +21 -0
- package/es/platform/zdata-broker/{usecases → applications}/entities-factory/APITemplatesFactory.js +2 -2
- package/es/platform/zdata-broker/{usecases → applications}/entities-factory/DataBrokerFactory.js +1 -1
- package/es/platform/zdata-broker/applications/interfaces/gateways/IService.js +0 -0
- package/es/platform/zdata-broker/applications/interfaces/gateways/ITemplateHelpers.js +1 -0
- package/es/platform/zdata-broker/{entities → domain/entities}/DataBroker.js +3 -3
- package/es/platform/zdata-broker/domain/entities/interfaces/IDataBroker.js +0 -0
- package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/MetaData.js +1 -1
- package/es/platform/zdata-broker/frameworks/EventHandlersFactory.js +3 -3
- package/es/platform/zfield/adapters/gateways/Repository.js +1 -1
- package/es/platform/zfield/adapters/gateways/Service.js +6 -6
- package/es/platform/zfield/{usecases → applications}/entities-factory/FieldsManagerBuilder.js +1 -1
- package/es/platform/zfield/applications/interfaces/input/FetchInputModel.js +2 -0
- package/es/platform/zfield/{entities → domain/entities}/fields-manager/AvailableFieldsManager.js +2 -2
- package/es/platform/zfield/{entities → domain/entities}/fields-manager/FieldsManager.js +3 -3
- package/es/platform/zfield/{entities → domain/entities}/fields-manager/SelectedFieldsManager.js +2 -2
- package/es/platform/zfield/{entities → domain/entities}/interfaces/MetaData.js +1 -1
- package/es/platform/zhttp/frameworks/ActionsHandlerFactory.js +1 -1
- package/es/platform/zhttp/frameworks/ZHttpBehaviourFactory.js +2 -1
- package/es/platform/zlist/adapters/gateways/Repository.js +4 -2
- package/es/platform/zlist/adapters/gateways/Service.js +10 -10
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +32 -2
- package/es/platform/zlist/adapters/presenters/translators/ColumnAlignmentTranslator.js +11 -0
- package/es/platform/zlist/adapters/presenters/translators/ColumnSizeTranslator.js +23 -0
- package/es/platform/zlist/adapters/presenters/translators/Header.js +4 -3
- package/es/platform/zlist/adapters/presenters/translators/Row.js +5 -1
- package/es/platform/zlist/adapters/presenters/translators/RowActionTranslator.js +18 -11
- package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +3 -1
- package/es/platform/zlist/applications/entities-factory/ListFactory.js +16 -0
- package/es/platform/zlist/applications/interfaces/gateways/ITransformState.js +0 -0
- package/es/platform/zlist/applications/interfaces/input/SortingInputModel.js +1 -0
- package/es/platform/zlist/{entities → domain/entities}/List.js +15 -24
- package/es/platform/zlist/domain/entities/interfaces/ActionModel.js +1 -0
- package/es/platform/zlist/domain/entities/interfaces/ApiPropsModel.js +1 -0
- package/es/platform/zlist/domain/entities/interfaces/IList.js +1 -0
- package/es/platform/zlist/domain/entities/interfaces/Properties.js +1 -0
- package/es/platform/zlist/domain/entities/interfaces/RecordExecuteAfterMetaData.js +1 -0
- package/es/platform/zrecord/adapters/gateways/Repository.js +1 -1
- package/es/platform/zrecord/adapters/gateways/Service.js +13 -13
- package/es/platform/zrecord/{usecases → applications}/entities-factory/RecordFactory.js +1 -1
- package/es/platform/zrecord/{usecases → applications}/entities-factory/RecordsManagerFactory.js +2 -2
- package/es/platform/zrecord/applications/interfaces/InputDependencies.js +1 -0
- package/es/platform/zrecord/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/platform/zrecord/applications/interfaces/gateways/IService.js +0 -0
- package/es/platform/zrecord/applications/interfaces/gateways/State.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/AppendRecordsInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/DeleteMultipleRecordInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/ExecuteActionInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/FailureInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/FetchMoreInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/FetchStateStopInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/FieldChangeUseCaseInput.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/InitializeInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/NoContentInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/RecordUpdateLocalUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/RefetchInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/SetRecordsInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/SuccessInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/output/IPresenter.js +1 -0
- package/es/platform/zrecord/applications/usecases/AbstractUseCase.js +17 -0
- package/es/platform/zrecord/applications/usecases/InitializeUseCase.js +17 -0
- package/es/platform/zrecord/{entities → domain/entities}/DeleteMultipleRecordStrategy.js +1 -1
- package/es/platform/zrecord/{entities → domain/entities}/DeleteRecordStrategy.js +1 -1
- package/es/platform/zrecord/{entities → domain/entities}/GetRecordsStrategy.js +1 -1
- package/es/platform/zrecord/{entities → domain/entities}/RecordsManager.js +3 -3
- package/es/platform/zrecord/{entities → domain/entities}/UpdateRecordStrategy.js +1 -1
- package/es/platform/zrecord/domain/entities/interfaces/BehaviourState.js +1 -0
- package/es/platform/zrecord/domain/entities/interfaces/EventModel.js +1 -0
- package/es/platform/zrecord/domain/entities/interfaces/ICustomFieldValues.js +1 -0
- package/es/platform/zrecord/domain/entities/interfaces/IRecord.js +0 -0
- package/es/platform/zrecord/domain/entities/interfaces/IRecordExecuteStrategy.js +0 -0
- package/es/platform/zrecord/domain/entities/interfaces/IRecordName.js +1 -0
- package/es/platform/zrecord/domain/entities/interfaces/IRecords.js +0 -0
- package/es/platform/zrecord/domain/entities/interfaces/IRecordsManager.js +0 -0
- package/es/platform/zrecord/domain/entities/interfaces/RecordModel.js +1 -0
- package/es/platform/zrecord/domain/entities/interfaces/RecordsModel.js +1 -0
- package/es/platform/zrecord/domain/entities/interfaces/StrategyMeta.js +1 -0
- package/package.json +28 -21
- package/es/cc/table-list/behaviour-properties/ResizerConfig.js +0 -18
- package/es/cc/table-list/behaviour-properties/SelectionConfig.js +0 -17
- package/es/cc/table-list/behaviour-properties/SortByConfig.js +0 -14
- package/es/cc/table-list/behaviour-properties/index.js +0 -3
- package/es/library/custom-component/entities/__tests__/Action.spec.js +0 -19
- package/es/library/custom-component/entities/__tests__/ActionHandlers.spec.js +0 -15
- package/es/library/custom-component/entities/__tests__/Behaviour.spec.js +0 -52
- package/es/library/custom-component/entities/__tests__/Component.spec.js +0 -109
- package/es/platform/data-broker/http-template/getUIActions.js +0 -22
- package/es/platform/zdata-broker/usecases/interfaces/gateways/ITemplateHelpers.js +0 -1
- package/es/platform/zfield/usecases/interfaces/gateways/ITemplateHelpers.js +0 -1
- package/es/platform/zfield/usecases/interfaces/input/FetchInputModel.js +0 -2
- package/es/platform/zlist/usecases/entities-factory/ListFactory.js +0 -15
- /package/es/{library/behaviours/list-selection/entities/interfaces/IListItemSelection.js → cc/action-location/Action.js} +0 -0
- /package/es/{library/behaviours/list-selection/entities/interfaces/ListSelectionModel.js → cc/action-location/ActionLocation.js} +0 -0
- /package/es/{library/behaviours/list-selection/usecases/interfaces/UseCase.js → cc/table-list/data-types/RowAction.js} +0 -0
- /package/es/{library/behaviours/list-selection/usecases/interfaces/UseCaseDependencies.js → cc/table-list/data-types/RowActionsConfig.js} +0 -0
- /package/es/library/{custom-component/usecases → behaviours/list-selection/applications}/interfaces/UseCase.js +0 -0
- /package/es/library/behaviours/{sort-by/usecases → list-selection/applications}/interfaces/UseCaseDependencies.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/gateways/IRepository.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/gateways/IService.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/input/AllSelectionInputModel.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/input/DestructInputModel.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/input/InitializeInputModel.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/input/RangeSelectionInputModel.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/input/SelectionInputModel.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/output/BehaviourStateModel.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases → applications}/interfaces/output/IPresenter.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/AllItemSelection.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/Destruct.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/Initialize.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/ItemsSelection.js +0 -0
- /package/es/library/behaviours/list-selection/{usecases/interactors → applications/usecases}/RangeSelection.js +0 -0
- /package/es/library/behaviours/{sort-by/entities/interfaces/ISortBy.js → list-selection/domain/entities/interfaces/IListItemSelection.js} +0 -0
- /package/es/library/behaviours/{sort-by/usecases/interfaces/gateways/IRepository.js → list-selection/domain/entities/interfaces/ListSelectionModel.js} +0 -0
- /package/es/library/behaviours/{text-to-field-click/usecases → sort-by/applications}/interfaces/UseCaseDependencies.js +0 -0
- /package/es/library/behaviours/{text-to-field-click/usecases → sort-by/applications}/interfaces/gateways/IRepository.js +0 -0
- /package/es/library/behaviours/sort-by/{usecases → applications}/interfaces/gateways/IService.js +0 -0
- /package/es/library/behaviours/sort-by/{usecases → applications}/interfaces/input/SortByInputModel.js +0 -0
- /package/es/library/behaviours/sort-by/{usecases → applications}/interfaces/output/IPresenter.js +0 -0
- /package/es/library/behaviours/sort-by/{usecases → applications}/interfaces/output/SortByOutputModel.js +0 -0
- /package/es/library/behaviours/sort-by/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
- /package/es/library/behaviours/sort-by/{usecases/interactors → applications/usecases}/SortBy.js +0 -0
- /package/es/{platform/zlist/usecases/interfaces/gateways → library/behaviours/sort-by/domain/entities/interfaces}/ISortBy.js +0 -0
- /package/es/{platform/zlist/usecases → library/behaviours/text-to-field-click/applications}/interfaces/UseCaseDependencies.js +0 -0
- /package/es/library/{custom-component/usecases → behaviours/text-to-field-click/applications}/interfaces/gateways/IRepository.js +0 -0
- /package/es/library/behaviours/text-to-field-click/{usecases → applications}/interfaces/input/ClickUseCaseInputModel.js +0 -0
- /package/es/library/behaviours/text-to-field-click/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
- /package/es/library/behaviours/text-to-field-click/{usecases/interactors → applications/usecases}/ClickUseCase.js +0 -0
- /package/es/library/behaviours/text-to-field-click/{entities → domain/entities}/interfaces/IFieldEventConverter.js +0 -0
- /package/es/library/custom-component/{usecases → applications}/interfaces/InputDependencies.js +0 -0
- /package/es/library/custom-component/{usecases → applications}/interfaces/OutputDependencies.js +0 -0
- /package/es/{platform/zhttp/usecases → library/custom-component/applications}/interfaces/UseCase.js +0 -0
- /package/es/library/custom-component/{usecases → applications}/interfaces/gateways/IEventManager.js +0 -0
- /package/es/library/custom-component/{usecases → applications}/interfaces/gateways/IJSONValidator.js +0 -0
- /package/es/{platform/zdata-broker/usecases → library/custom-component/applications}/interfaces/gateways/IRepository.js +0 -0
- /package/es/library/custom-component/{usecases → applications}/interfaces/gateways/IService.js +0 -0
- /package/es/library/custom-component/{usecases → applications}/interfaces/input/DispatchInputModel.js +0 -0
- /package/es/library/custom-component/{usecases → applications}/interfaces/input/InitailizeInputModel.js +0 -0
- /package/es/library/custom-component/{usecases → applications}/interfaces/input/UpdatePropertiesInputModel.js +0 -0
- /package/es/library/custom-component/{usecases → applications}/interfaces/input/UpdateStateInputModel.js +0 -0
- /package/es/library/custom-component/{usecases → applications}/interfaces/output/OutputBoundary.js +0 -0
- /package/es/library/custom-component/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
- /package/es/library/custom-component/{usecases/interactors → applications/usecases}/DispatchUseCase.js +0 -0
- /package/es/library/custom-component/{usecases/interactors → applications/usecases}/InitializeUseCase.js +0 -0
- /package/es/library/custom-component/{usecases/interactors → applications/usecases}/MountUseCase.js +0 -0
- /package/es/library/custom-component/{usecases/interactors → applications/usecases}/UpdatePropertyUseCase.js +0 -0
- /package/es/library/custom-component/{usecases/interactors → applications/usecases}/UpdateStateUseCase.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/Behaviour.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/EventHandler.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/EventHandlers.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/Events.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/LifeCycleAction.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/Payload.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/Property.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/Schema.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/State.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/Style.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IBehaviour.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IComponent.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IEvent.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IEventHandler.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IEventHandlerHelpers.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IEventHandlers.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IEventWrapper.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/ILifeCycleAction.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IPayload.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IProperties.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IProperty.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/ISchema.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IState.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IStyle.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IUpdateHelper.js +0 -0
- /package/es/library/custom-component/{entities → domain/entities}/interfaces/IValidator.js +0 -0
- /package/es/platform/{zdata-broker/usecases → zclient-actions/applications}/interfaces/InputDependencies.js +0 -0
- /package/es/platform/{zfield/usecases → zclient-actions/applications}/interfaces/gateways/IRepository.js +0 -0
- /package/es/platform/{zdata-broker/usecases → zclient-actions/applications}/interfaces/gateways/IService.js +0 -0
- /package/es/platform/{zdata-broker/usecases → zclient-actions/applications}/interfaces/gateways/State.js +0 -0
- /package/es/platform/{zdata-broker/entities/interfaces/APIDetailsModel.js → zclient-actions/applications/interfaces/input/ExecuteActionBehaviourInputModel.js} +0 -0
- /package/es/platform/{zdata-broker/usecases → zclient-actions/applications}/interfaces/input/FailureInputModel.js +0 -0
- /package/es/platform/{zrecord/usecases → zclient-actions/applications}/interfaces/input/FetchStateStopInputModel.js +0 -0
- /package/es/platform/{zrecord/usecases → zclient-actions/applications}/interfaces/input/InitializeInputModel.js +0 -0
- /package/es/platform/{zdata-broker/usecases → zclient-actions/applications}/interfaces/input/NoContentInputModel.js +0 -0
- /package/es/platform/{zdata-broker/entities/interfaces/APITemplateModel.js → zclient-actions/applications/interfaces/input/SetClientActionsInputModel.js} +0 -0
- /package/es/platform/{zdata-broker/usecases → zclient-actions/applications}/interfaces/input/SuccessInputModel.js +0 -0
- /package/es/platform/{zdata-broker/usecases → zclient-actions/applications}/interfaces/output/IPresenter.js +0 -0
- /package/es/platform/{zdata-broker/usecases/interactors → zclient-actions/applications/usecases}/AbstractUseCase.js +0 -0
- /package/es/platform/{zrecord/usecases/interactors → zclient-actions/applications/usecases}/InitializeUseCase.js +0 -0
- /package/es/platform/{zdata-broker → zclient-actions/domain}/entities/interfaces/BehaviourState.js +0 -0
- /package/es/platform/{zdata-broker/entities/interfaces/APITemplatesModel.js → zclient-actions/domain/entities/interfaces/ClientActionModel.js} +0 -0
- /package/es/platform/{zdata-broker/entities/interfaces/EventModel.js → zclient-actions/domain/entities/interfaces/ClientActionsModel.js} +0 -0
- /package/es/platform/{zdata-broker/entities/interfaces/IAPITemplate.js → zclient-actions/domain/entities/interfaces/ComponentPropertiesModel.js} +0 -0
- /package/es/platform/{zdata-broker/entities/interfaces/IAPITemplates.js → zclient-actions/domain/entities/interfaces/EventMappingModel.js} +0 -0
- /package/es/platform/{zrecord → zclient-actions/domain}/entities/interfaces/EventModel.js +0 -0
- /package/es/platform/{zdata-broker/entities/interfaces/ITemplateHelpers.js → zclient-actions/domain/entities/interfaces/IAction.js} +0 -0
- /package/es/platform/{zdata-broker/entities/interfaces/IDataBroker.js → zclient-actions/domain/entities/interfaces/IClientAction.js} +0 -0
- /package/es/platform/{zlist/usecases/interfaces/gateways/ITransformState.js → zclient-actions/domain/entities/interfaces/IClientActionExecuteStrategy.js} +0 -0
- /package/es/platform/{zrecord/entities/interfaces/IRecord.js → zclient-actions/domain/entities/interfaces/IClientActionManager.js} +0 -0
- /package/es/platform/{zrecord/entities/interfaces/IRecordExecuteStrategy.js → zclient-actions/domain/entities/interfaces/IClientActions.js} +0 -0
- /package/es/platform/{zdata-broker/usecases/interfaces/input/ExecuteActionInputModel.js → zclient-actions/domain/entities/interfaces/IError.js} +0 -0
- /package/es/platform/{zdata-broker/usecases/interfaces/input/RegisterInputModel.js → zclient-actions/domain/entities/interfaces/IEvent.js} +0 -0
- /package/es/platform/{zrecord/entities/interfaces/IRecords.js → zclient-actions/domain/entities/interfaces/IEventMapping.js} +0 -0
- /package/es/platform/{zrecord/entities/interfaces/IRecordsManager.js → zclient-actions/domain/entities/interfaces/IEventMappings.js} +0 -0
- /package/es/platform/{zrecord/usecases/interfaces/gateways/IService.js → zclient-actions/domain/entities/interfaces/IPayload.js} +0 -0
- /package/es/platform/{zfield/entities/interfaces/ActionModel.js → zclient-actions/domain/entities/interfaces/PayloadValueMappingModel.js} +0 -0
- /package/es/platform/{zfield/entities/interfaces/BehaviourState.js → zclient-actions/domain/entities/interfaces/PropsMeta.js} +0 -0
- /package/es/platform/{zrecord → zclient-actions/domain}/entities/interfaces/StrategyMeta.js +0 -0
- /package/es/platform/{zfield/entities/interfaces/FieldModel.js → zclient-actions/domain/entities/interfaces/SubMeta.js} +0 -0
- /package/es/platform/{zfield/entities/interfaces/IField.js → zclient-actions/domain/entities/interfaces/UIComponentMappingModel.js} +0 -0
- /package/es/platform/{zfield/entities/interfaces/IFieldManger.js → zclient-actions/domain/entities/interfaces/UserDetailsModel.js} +0 -0
- /package/es/platform/{zhttp/usecases → zdata-broker/applications}/interfaces/InputDependencies.js +0 -0
- /package/es/platform/{zlist/usecases → zdata-broker/applications}/interfaces/gateways/IRepository.js +0 -0
- /package/es/platform/{zlist/usecases/interfaces → zdata-broker/applications/interfaces/gateways}/State.js +0 -0
- /package/es/platform/{zfield/usecases → zdata-broker/applications}/interfaces/input/ExecuteActionInputModel.js +0 -0
- /package/es/platform/{zrecord/usecases → zdata-broker/applications}/interfaces/input/FailureInputModel.js +0 -0
- /package/es/platform/{zrecord/usecases → zdata-broker/applications}/interfaces/input/NoContentInputModel.js +0 -0
- /package/es/platform/{zfield/usecases/interfaces/UsecaseDependencies.js → zdata-broker/applications/interfaces/input/RegisterInputModel.js} +0 -0
- /package/es/platform/{zrecord/usecases → zdata-broker/applications}/interfaces/input/SuccessInputModel.js +0 -0
- /package/es/platform/{zfield/usecases → zdata-broker/applications}/interfaces/output/IPresenter.js +0 -0
- /package/es/platform/{zrecord/usecases/interactors → zdata-broker/applications/usecases}/AbstractUseCase.js +0 -0
- /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/ExecuteActionUseCase.js +0 -0
- /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/FailureUseCase.js +0 -0
- /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/NoContentUseCase.js +0 -0
- /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/RegisterUseCase.js +0 -0
- /package/es/platform/zdata-broker/{usecases/interactors → applications/usecases}/SuccessUseCase.js +0 -0
- /package/es/platform/zdata-broker/{entities → domain/entities}/APITemplate.js +0 -0
- /package/es/platform/zdata-broker/{entities → domain/entities}/APITemplates.js +0 -0
- /package/es/platform/{zfield/usecases/interfaces/gateways/IRestApi.js → zdata-broker/domain/entities/interfaces/APIDetailsModel.js} +0 -0
- /package/es/platform/{zfield/usecases/interfaces/gateways/IService.js → zdata-broker/domain/entities/interfaces/APITemplateModel.js} +0 -0
- /package/es/platform/{zfield/usecases/interfaces/input/InitialInputModel.js → zdata-broker/domain/entities/interfaces/APITemplatesModel.js} +0 -0
- /package/es/platform/zdata-broker/{entities → domain/entities}/interfaces/ApiEnum.js +0 -0
- /package/es/platform/{zrecord → zdata-broker/domain}/entities/interfaces/BehaviourState.js +0 -0
- /package/es/platform/{zfield/usecases/interfaces/input/InputModel.js → zdata-broker/domain/entities/interfaces/EventModel.js} +0 -0
- /package/es/platform/{zfield/usecases/interfaces/input/RefetchInputModel.js → zdata-broker/domain/entities/interfaces/IAPITemplate.js} +0 -0
- /package/es/platform/{zfield/usecases/interfaces/input/SetValueInputModel.js → zdata-broker/domain/entities/interfaces/IAPITemplates.js} +0 -0
- /package/es/platform/{zhttp/usecases/interfaces/gateway/IFetchGateWay.js → zdata-broker/domain/entities/interfaces/ITemplateHelpers.js} +0 -0
- /package/es/platform/zfield/{usecases → applications}/entities-factory/FieldBuilder.js +0 -0
- /package/es/platform/zfield/{usecases → applications}/entities-factory/FieldFactory.js +0 -0
- /package/es/platform/{zhttp/usecases/interfaces/input/FetchInputModel.js → zfield/applications/interfaces/UsecaseDependencies.js} +0 -0
- /package/es/platform/{zrecord/usecases → zfield/applications}/interfaces/gateways/IRepository.js +0 -0
- /package/es/platform/{zlist/entities/interfaces/ActionModel.js → zfield/applications/interfaces/gateways/IRestApi.js} +0 -0
- /package/es/platform/{zlist/usecases → zfield/applications}/interfaces/gateways/IService.js +0 -0
- /package/es/platform/{zrecord/usecases → zfield/applications}/interfaces/input/ExecuteActionInputModel.js +0 -0
- /package/es/platform/{zlist/entities/interfaces/ApiPropsModel.js → zfield/applications/interfaces/input/InitialInputModel.js} +0 -0
- /package/es/platform/{zlist/entities/interfaces/IList.js → zfield/applications/interfaces/input/InputModel.js} +0 -0
- /package/es/platform/{zrecord/usecases → zfield/applications}/interfaces/input/RefetchInputModel.js +0 -0
- /package/es/platform/{zlist/entities/interfaces/Properties.js → zfield/applications/interfaces/input/SetValueInputModel.js} +0 -0
- /package/es/platform/{zrecord/usecases → zfield/applications}/interfaces/output/IPresenter.js +0 -0
- /package/es/platform/zfield/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
- /package/es/platform/zfield/{usecases/interactors → applications/usecases}/ExecuteActionUseCase.js +0 -0
- /package/es/platform/zfield/{usecases/interactors → applications/usecases}/FetchFailureUseCase.js +0 -0
- /package/es/platform/zfield/{usecases/interactors → applications/usecases}/FetchNoContentUseCase.js +0 -0
- /package/es/platform/zfield/{usecases/interactors → applications/usecases}/FetchSuccessUseCase.js +0 -0
- /package/es/platform/zfield/{usecases/interactors → applications/usecases}/InitializeUseCase.js +0 -0
- /package/es/platform/zfield/{usecases/interactors → applications/usecases}/RefetchUseCase.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/BooleanField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/CurrencyField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/DateField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/DateTimeField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/EmailField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/Field.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/LookupField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/MultiLineField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/MultiSelectField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/PercentageField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/PhoneField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/PickListField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/SingleLineField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/URLField.js +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/index.js +0 -0
- /package/es/platform/{zlist/entities/interfaces/RecordExecuteAfterMetaData.js → zfield/domain/entities/interfaces/ActionModel.js} +0 -0
- /package/es/platform/{zlist/usecases/interfaces/input/DeleteMultipleRecordUseCaseInput.js → zfield/domain/entities/interfaces/BehaviourState.js} +0 -0
- /package/es/platform/zfield/{entities → domain/entities}/interfaces/FieldApiName.js +0 -0
- /package/es/platform/{zlist/usecases/interfaces/input/DeleteSingleRecordUseCaseInput.js → zfield/domain/entities/interfaces/FieldModel.js} +0 -0
- /package/es/platform/{zlist/usecases/interfaces/input/FetchMoreInput.js → zfield/domain/entities/interfaces/IField.js} +0 -0
- /package/es/platform/{zlist/usecases/interfaces/input/FieldChangeUseCaseInput.js → zfield/domain/entities/interfaces/IFieldManger.js} +0 -0
- /package/es/platform/{zrecord/usecases → zhttp/applications}/interfaces/InputDependencies.js +0 -0
- /package/es/platform/{zlist/usecases/interfaces/input/InitializeInput.js → zhttp/applications/interfaces/UseCase.js} +0 -0
- /package/es/platform/{zlist/usecases/interfaces/input/PropertiesChangeUseCaseInput.js → zhttp/applications/interfaces/gateway/IFetchGateWay.js} +0 -0
- /package/es/platform/{zlist/usecases/interfaces/input/RecordExecuteFailedUseCaseInput.js → zhttp/applications/interfaces/input/FetchInputModel.js} +0 -0
- /package/es/platform/zhttp/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
- /package/es/platform/zhttp/{usecases/interactors → applications/usecases}/FetchUseCase.js +0 -0
- /package/es/platform/{zrecord/usecases/interfaces/gateways → zlist/applications/interfaces}/State.js +0 -0
- /package/es/platform/zlist/{usecases/interfaces/input/RecordExecuteSucceededUseCaseInput.js → applications/interfaces/UseCaseDependencies.js} +0 -0
- /package/es/platform/zlist/{usecases/interfaces/input/RecordUpdateUseCaseInput.js → applications/interfaces/gateways/IRepository.js} +0 -0
- /package/es/platform/zlist/{usecases/interfaces/input/SortingInputModel.js → applications/interfaces/gateways/IService.js} +0 -0
- /package/es/platform/{zrecord/entities/interfaces/ICustomFieldValues.js → zlist/applications/interfaces/gateways/ISortBy.js} +0 -0
- /package/es/platform/{zrecord/entities/interfaces/IRecordName.js → zlist/applications/interfaces/input/DeleteMultipleRecordUseCaseInput.js} +0 -0
- /package/es/platform/{zrecord/entities/interfaces/RecordModel.js → zlist/applications/interfaces/input/DeleteSingleRecordUseCaseInput.js} +0 -0
- /package/es/platform/{zrecord/entities/interfaces/RecordsModel.js → zlist/applications/interfaces/input/FetchMoreInput.js} +0 -0
- /package/es/platform/{zrecord/usecases → zlist/applications}/interfaces/input/FieldChangeUseCaseInput.js +0 -0
- /package/es/platform/{zrecord/usecases/interfaces/input/AppendRecordsInputModel.js → zlist/applications/interfaces/input/InitializeInput.js} +0 -0
- /package/es/platform/{zrecord/usecases/interfaces/input/DeleteMultipleRecordInputModel.js → zlist/applications/interfaces/input/PropertiesChangeUseCaseInput.js} +0 -0
- /package/es/platform/{zrecord/usecases/interfaces/input/FetchMoreInputModel.js → zlist/applications/interfaces/input/RecordExecuteFailedUseCaseInput.js} +0 -0
- /package/es/platform/{zrecord/usecases/interfaces/input/RecordUpdateLocalUseCaseInputModel.js → zlist/applications/interfaces/input/RecordExecuteSucceededUseCaseInput.js} +0 -0
- /package/es/platform/{zrecord/usecases/interfaces/input/SetRecordsInputModel.js → zlist/applications/interfaces/input/RecordUpdateUseCaseInput.js} +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/AbstractUseCase.js +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/DeleteMultipleRecordUseCase.js +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/DeleteSingleRecordUseCase.js +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/FetchMoreUseCase.js +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/FieldChangeUseCase.js +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/InitializeUseCase.js +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/PropertiesChangeUseCase.js +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/RecordExecuteFailedUseCase.js +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/RecordExecuteSucceededUseCase.js +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/RecordUpdateUseCase.js +0 -0
- /package/es/platform/zlist/{usecases/interactors → applications/usecases}/SortUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/AppendRecordsUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/DeleteMultipleRecordUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/ExecuteActionUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/FailureUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/FetchMoreUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/FetchStateStopUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/FieldChangeUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/NoContentUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/RecordUpdateLocalUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/RefetchUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/SetRecordsUseCase.js +0 -0
- /package/es/platform/zrecord/{usecases/interactors → applications/usecases}/SuccessUseCase.js +0 -0
- /package/es/platform/zrecord/{entities → domain/entities}/CustomFieldValues.js +0 -0
- /package/es/platform/zrecord/{entities → domain/entities}/Record.js +0 -0
- /package/es/platform/zrecord/{entities → domain/entities}/Records.js +0 -0
- /package/es/platform/zrecord/{entities → domain/entities}/interfaces/ApiEnum.js +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
import EventMapping from "./EventMapping";
|
|
4
|
+
export default class EventMappings {
|
|
5
|
+
constructor(eventMappings) {
|
|
6
|
+
_defineProperty(this, "input", void 0);
|
|
7
|
+
|
|
8
|
+
this.input = eventMappings.map(eventMapping => new EventMapping(eventMapping));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
toArray() {
|
|
12
|
+
return this.input;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CLIENTACTION_EXECUTE_FAILED, CLIENTACTION_EXECUTE_SUCCEEDED, CLIENTACTION_EXECUTE_SUCCEEDED_NO_CONTENT, SET_CLIENTACTIONS } from "../../../../bc/zclient-actions/Constants";
|
|
2
|
+
export default class GetClientActionsStrategy {
|
|
3
|
+
createSuccessEvents(response, metaData) {
|
|
4
|
+
const events = [];
|
|
5
|
+
const clientActions = response;
|
|
6
|
+
events.push({
|
|
7
|
+
type: SET_CLIENTACTIONS,
|
|
8
|
+
payload: {
|
|
9
|
+
clientActions
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
events.push({
|
|
13
|
+
type: CLIENTACTION_EXECUTE_SUCCEEDED,
|
|
14
|
+
payload: {
|
|
15
|
+
clientActions
|
|
16
|
+
},
|
|
17
|
+
metaData
|
|
18
|
+
});
|
|
19
|
+
return events;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
createNoContentEvents(metaData) {
|
|
23
|
+
const events = [];
|
|
24
|
+
events.push({
|
|
25
|
+
type: CLIENTACTION_EXECUTE_SUCCEEDED_NO_CONTENT,
|
|
26
|
+
payload: {},
|
|
27
|
+
metaData
|
|
28
|
+
});
|
|
29
|
+
return events;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
createFailureEvents(error, metaData) {
|
|
33
|
+
const events = [];
|
|
34
|
+
events.push({
|
|
35
|
+
type: CLIENTACTION_EXECUTE_FAILED,
|
|
36
|
+
payload: {
|
|
37
|
+
error
|
|
38
|
+
},
|
|
39
|
+
metaData
|
|
40
|
+
});
|
|
41
|
+
return events;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
import EventMappings from "./EventMappings";
|
|
4
|
+
export default class UIComponentMapping {
|
|
5
|
+
constructor(uiComponentMappingObj) {
|
|
6
|
+
_defineProperty(this, "id", void 0);
|
|
7
|
+
|
|
8
|
+
_defineProperty(this, "name", void 0);
|
|
9
|
+
|
|
10
|
+
_defineProperty(this, "component", void 0);
|
|
11
|
+
|
|
12
|
+
_defineProperty(this, "properties", void 0);
|
|
13
|
+
|
|
14
|
+
_defineProperty(this, "eventMappings", void 0);
|
|
15
|
+
|
|
16
|
+
this.id = uiComponentMappingObj.id;
|
|
17
|
+
this.name = uiComponentMappingObj.name;
|
|
18
|
+
this.component = uiComponentMappingObj.component;
|
|
19
|
+
this.properties = uiComponentMappingObj.properties;
|
|
20
|
+
this.eventMappings = new EventMappings(uiComponentMappingObj.eventMappings);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
toObject() {
|
|
24
|
+
return {
|
|
25
|
+
id: this.id,
|
|
26
|
+
name: this.name,
|
|
27
|
+
component: this.component,
|
|
28
|
+
properties: this.properties,
|
|
29
|
+
eventMappings: this.eventMappings.toArray().map(eventMapping => eventMapping.toObject())
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
getId() {
|
|
34
|
+
return this.id;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import MountController from "../adapters/controllers/MountController";
|
|
2
|
+
import Presenter from "../adapters/presenters/Presenter";
|
|
3
|
+
import Repository from "../adapters/gateways/Repository";
|
|
4
|
+
import Service from "../adapters/gateways/Service";
|
|
5
|
+
import ClientActionBehaviourExecutorController from "../adapters/controllers/ClientActionBehaviourExecutorController";
|
|
6
|
+
import FailureController from "../adapters/controllers/FailureController";
|
|
7
|
+
import SuccessController from "../adapters/controllers/SuccessController";
|
|
8
|
+
import NoContentController from "../adapters/controllers/NoContentController";
|
|
9
|
+
import SetClientActionsController from "../adapters/controllers/SetClientActionsController";
|
|
10
|
+
import FetchStateStopController from "../adapters/controllers/FetchStateStopController";
|
|
11
|
+
import { CLIENTACTION_BEHAVIOUR_EXECUTE, CLIENTACTION_EXECUTE_FAIL_CALLBACK, CLIENTACTION_EXECUTE_FAILED, CLIENTACTION_EXECUTE_SUCCEEDED, CLIENTACTION_EXECUTE_SUCCEEDED_NO_CONTENT, CLIENTACTION_EXECUTE_SUCCESS_CALLBACK, SET_CLIENTACTIONS, CLIENTACTION_EXECUTE_SUCCESS_NO_CONTENT_CALLBACK } from "../../../bc/zclient-actions/Constants";
|
|
12
|
+
export default class ActionsHandlersFactory {
|
|
13
|
+
static getClientActionControllerHandles(service) {
|
|
14
|
+
return {
|
|
15
|
+
executeClientActionBehaviour: new ClientActionBehaviourExecutorController(service).handle,
|
|
16
|
+
failure: new FailureController(service).handle,
|
|
17
|
+
success: new SuccessController(service).handle,
|
|
18
|
+
noContent: new NoContentController(service).handle,
|
|
19
|
+
setClientActions: new SetClientActionsController(service).handle,
|
|
20
|
+
fetchStateStop: new FetchStateStopController(service).handle
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static create(apiDetails) {
|
|
25
|
+
const presenter = new Presenter();
|
|
26
|
+
const repository = new Repository();
|
|
27
|
+
const dependencies = {
|
|
28
|
+
presenter,
|
|
29
|
+
repository
|
|
30
|
+
};
|
|
31
|
+
const service = new Service(dependencies);
|
|
32
|
+
const mountController = new MountController(apiDetails, service);
|
|
33
|
+
const clientActionControllerHandle = ActionsHandlersFactory.getClientActionControllerHandles(service);
|
|
34
|
+
return {
|
|
35
|
+
MOUNT: mountController.handle,
|
|
36
|
+
[CLIENTACTION_BEHAVIOUR_EXECUTE]: clientActionControllerHandle.executeClientActionBehaviour,
|
|
37
|
+
[CLIENTACTION_EXECUTE_FAIL_CALLBACK]: clientActionControllerHandle.failure,
|
|
38
|
+
[CLIENTACTION_EXECUTE_SUCCESS_CALLBACK]: clientActionControllerHandle.success,
|
|
39
|
+
[CLIENTACTION_EXECUTE_SUCCEEDED]: clientActionControllerHandle.fetchStateStop,
|
|
40
|
+
[CLIENTACTION_EXECUTE_FAILED]: clientActionControllerHandle.fetchStateStop,
|
|
41
|
+
[CLIENTACTION_EXECUTE_SUCCEEDED_NO_CONTENT]: clientActionControllerHandle.fetchStateStop,
|
|
42
|
+
[SET_CLIENTACTIONS]: clientActionControllerHandle.setClientActions,
|
|
43
|
+
[CLIENTACTION_EXECUTE_SUCCESS_NO_CONTENT_CALLBACK]: clientActionControllerHandle.noContent
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import ActionsHandlersFactory from "./ActionsHandlersFactory";
|
|
2
|
+
export default class ClientActionBehaviourFactory {
|
|
3
|
+
static create(apiDetails) {
|
|
4
|
+
return {
|
|
5
|
+
name: 'zclientAction',
|
|
6
|
+
eventHandlers: ActionsHandlersFactory.create(apiDetails),
|
|
7
|
+
properties: {},
|
|
8
|
+
setInitialState: () => ({})
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
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 DataBrokerFactory from "../../
|
|
3
|
+
import DataBrokerFactory from "../../applications/entities-factory/DataBrokerFactory";
|
|
4
4
|
export default class Repository {
|
|
5
5
|
constructor() {
|
|
6
6
|
_defineProperty(this, "state", void 0);
|
|
@@ -1,10 +1,10 @@
|
|
|
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 RegisterUseCase from "../../usecases/
|
|
4
|
-
import ExecuteActionUseCase from "../../usecases/
|
|
5
|
-
import FailureUseCase from "../../usecases/
|
|
6
|
-
import SuccessUseCase from "../../usecases/
|
|
7
|
-
import NoContentUseCase from "../../usecases/
|
|
3
|
+
import RegisterUseCase from "../../applications/usecases/RegisterUseCase";
|
|
4
|
+
import ExecuteActionUseCase from "../../applications/usecases/ExecuteActionUseCase";
|
|
5
|
+
import FailureUseCase from "../../applications/usecases/FailureUseCase";
|
|
6
|
+
import SuccessUseCase from "../../applications/usecases/SuccessUseCase";
|
|
7
|
+
import NoContentUseCase from "../../applications/usecases/NoContentUseCase";
|
|
8
8
|
export default class Service {
|
|
9
9
|
constructor(dependencies) {
|
|
10
10
|
_defineProperty(this, "registerUseCase", void 0);
|
|
@@ -17,6 +17,27 @@ export default class TemplateHelpers {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
isOnlyTemplateVariables(inputString) {
|
|
21
|
+
return /^{{(.*?)}}$/.test(inputString);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
replaceTemplateVariablesInObject(properties, replacementObj) {
|
|
25
|
+
const replaced = {};
|
|
26
|
+
Object.entries(properties).forEach(_ref => {
|
|
27
|
+
let [key, value] = _ref;
|
|
28
|
+
|
|
29
|
+
if (typeof value === 'string' && this.isOnlyTemplateVariables(value)) {
|
|
30
|
+
const path = value.replace(/{{(.*?)}}/g, '$1');
|
|
31
|
+
replaced[key] = this.getPathValue(path, replacementObj);
|
|
32
|
+
} else if (typeof value === 'string' && value.includes('{{')) {
|
|
33
|
+
replaced[key] = this.replaceTemplateVariables(value, replacementObj);
|
|
34
|
+
} else {
|
|
35
|
+
replaced[key] = value;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return replaced;
|
|
39
|
+
}
|
|
40
|
+
|
|
20
41
|
objectToQueryString(obj) {
|
|
21
42
|
return Object.keys(obj).map(key => encodeURIComponent(key) + '=' + encodeURIComponent(obj[key])).join('&');
|
|
22
43
|
}
|
package/es/platform/zdata-broker/{usecases → applications}/entities-factory/APITemplatesFactory.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import APITemplate from "../../entities/APITemplate";
|
|
2
|
-
import APITemplates from "../../entities/APITemplates";
|
|
1
|
+
import APITemplate from "../../domain/entities/APITemplate";
|
|
2
|
+
import APITemplates from "../../domain/entities/APITemplates";
|
|
3
3
|
export default class APITemplatesFactory {
|
|
4
4
|
static create(httpTemplates, templateHelpers) {
|
|
5
5
|
const apiTemplatesMap = new Map();
|
package/es/platform/zdata-broker/{usecases → applications}/entities-factory/DataBrokerFactory.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import APITemplatesFactory from "./APITemplatesFactory";
|
|
2
|
-
import DataBroker from "../../entities/DataBroker";
|
|
2
|
+
import DataBroker from "../../domain/entities/DataBroker";
|
|
3
3
|
export default class DataBrokerFactory {
|
|
4
4
|
static create(httpTemplates, templateHelpers) {
|
|
5
5
|
const apiTemplates = APITemplatesFactory.create(httpTemplates, templateHelpers);
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ITemplateHelpers } from "../../../domain/entities/interfaces/ITemplateHelpers";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FETCH } from "
|
|
2
|
-
import { DATA_BROKER_EXECUTE_FAILED, DATA_BROKER_EXECUTE_NO_CONTENT_SUCCEEDED, DATA_BROKER_EXECUTE_SUCCEEDED } from "
|
|
3
|
-
import { DATA_BROKER_FAILURE, DATA_BROKER_NO_CONTENT, DATA_BROKER_SIGNATURE, DATA_BROKER_SUCCESS } from "
|
|
1
|
+
import { FETCH } from "../../../../bc/zhttp/Constants";
|
|
2
|
+
import { DATA_BROKER_EXECUTE_FAILED, DATA_BROKER_EXECUTE_NO_CONTENT_SUCCEEDED, DATA_BROKER_EXECUTE_SUCCEEDED } from "../../../../bc/zdata-broker/Constants";
|
|
3
|
+
import { DATA_BROKER_FAILURE, DATA_BROKER_NO_CONTENT, DATA_BROKER_SIGNATURE, DATA_BROKER_SUCCESS } from "../../../../bc/zdata-broker/Symbols";
|
|
4
4
|
export default class DataBroker {
|
|
5
5
|
constructor(apiTemplates) {
|
|
6
6
|
this.apiTemplates = apiTemplates;
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { DATA_BROKER_FAILURE, DATA_BROKER_NO_CONTENT, DATA_BROKER_SUCCESS } from "
|
|
1
|
+
import { DATA_BROKER_FAILURE, DATA_BROKER_NO_CONTENT, DATA_BROKER_SUCCESS } from "../../../../../bc/zdata-broker/Symbols";
|
|
@@ -3,7 +3,7 @@ import { FETCH_FAILED, FETCH_SUCCESS, FETCH_SUCCESS_NO_CONTENT } from "../../../
|
|
|
3
3
|
import Presenter from "../adapters/presenters/Presenter";
|
|
4
4
|
import Repository from "../adapters/gateways/Repository";
|
|
5
5
|
import RegisterController from "../adapters/controllers/RegisterController";
|
|
6
|
-
import
|
|
6
|
+
import DataBrokerExecutorController from "../adapters/controllers/DataBrokerExecutorController";
|
|
7
7
|
import FailureController from "../adapters/controllers/FailureController";
|
|
8
8
|
import SuccessController from "../adapters/controllers/SuccessController";
|
|
9
9
|
import NoContentController from "../adapters/controllers/NoContentController";
|
|
@@ -26,13 +26,13 @@ export default class EventHandlersFactory {
|
|
|
26
26
|
static create() {
|
|
27
27
|
const service = this.createService();
|
|
28
28
|
const registerController = new RegisterController(service);
|
|
29
|
-
const
|
|
29
|
+
const dataBrokerExecuteController = new DataBrokerExecutorController(service);
|
|
30
30
|
const failureController = new FailureController(service);
|
|
31
31
|
const successController = new SuccessController(service);
|
|
32
32
|
const noContentController = new NoContentController(service);
|
|
33
33
|
return {
|
|
34
34
|
[DATA_BROKER_REGISTER]: registerController.handle,
|
|
35
|
-
[DATA_BROKER_EXECUTE]:
|
|
35
|
+
[DATA_BROKER_EXECUTE]: dataBrokerExecuteController.handle,
|
|
36
36
|
[FETCH_FAILED]: failureController.handle,
|
|
37
37
|
[FETCH_SUCCESS]: successController.handle,
|
|
38
38
|
[FETCH_SUCCESS_NO_CONTENT]: noContentController.handle
|
|
@@ -1,6 +1,6 @@
|
|
|
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 FieldsManagerBuilder from "../../
|
|
3
|
+
import FieldsManagerBuilder from "../../applications/entities-factory/FieldsManagerBuilder";
|
|
4
4
|
|
|
5
5
|
class Repository {
|
|
6
6
|
constructor() {
|
|
@@ -1,11 +1,11 @@
|
|
|
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 ExecuteActionUseCase from "../../usecases/
|
|
4
|
-
import FetchNoContentUseCase from "../../usecases/
|
|
5
|
-
import FetchSuccessUseCase from "../../usecases/
|
|
6
|
-
import RefetchUseCase from "../../usecases/
|
|
7
|
-
import InitializeUseCase from "../../usecases/
|
|
8
|
-
import FetchFailureUseCase from "../../usecases/
|
|
3
|
+
import ExecuteActionUseCase from "../../applications/usecases/ExecuteActionUseCase";
|
|
4
|
+
import FetchNoContentUseCase from "../../applications/usecases/FetchNoContentUseCase";
|
|
5
|
+
import FetchSuccessUseCase from "../../applications/usecases/FetchSuccessUseCase";
|
|
6
|
+
import RefetchUseCase from "../../applications/usecases/RefetchUseCase";
|
|
7
|
+
import InitializeUseCase from "../../applications/usecases/InitializeUseCase";
|
|
8
|
+
import FetchFailureUseCase from "../../applications/usecases/FetchFailureUseCase";
|
|
9
9
|
|
|
10
10
|
class Service {
|
|
11
11
|
constructor(dependencies) {
|
package/es/platform/zfield/{usecases → applications}/entities-factory/FieldsManagerBuilder.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
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 FieldsManager from "../../entities/fields-manager/FieldsManager";
|
|
3
|
+
import FieldsManager from "../../domain/entities/fields-manager/FieldsManager";
|
|
4
4
|
|
|
5
5
|
class FieldsManagerBuilder {
|
|
6
6
|
constructor() {
|
package/es/platform/zfield/{entities → domain/entities}/fields-manager/AvailableFieldsManager.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FETCH } from "
|
|
2
|
-
import { FIELD_FETCH, FIELD_FETCH_FAILURE, FIELD_FETCH_NO_CONTENT, FIELD_FETCH_SUCCESS, FIELD_REFETCH } from "
|
|
1
|
+
import { FETCH } from "../../../../../bc/zhttp/Constants";
|
|
2
|
+
import { FIELD_FETCH, FIELD_FETCH_FAILURE, FIELD_FETCH_NO_CONTENT, FIELD_FETCH_SUCCESS, FIELD_REFETCH } from "../../../../../bc/zfield/Constants";
|
|
3
3
|
|
|
4
4
|
class AvailableFieldsManager {
|
|
5
5
|
constructor(availableFields, isAvailableFieldsFetching) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FIELD_FETCH_FAILURE, FIELD_FETCH_NO_CONTENT, FIELD_FETCH_SUCCESS } from "
|
|
1
|
+
import { FIELD_FETCH_FAILURE, FIELD_FETCH_NO_CONTENT, FIELD_FETCH_SUCCESS } from "../../../../../bc/zfield/Constants";
|
|
2
2
|
import FieldApiName from "../interfaces/FieldApiName";
|
|
3
|
-
import { DATA_BROKER_EXECUTE } from "
|
|
4
|
-
import { DATA_BROKER_SUCCESS } from "
|
|
3
|
+
import { DATA_BROKER_EXECUTE } from "../../../../../bc/zdata-broker/Constants";
|
|
4
|
+
import { DATA_BROKER_SUCCESS } from "../../../../../bc/zdata-broker/Symbols";
|
|
5
5
|
|
|
6
6
|
class FieldManager {
|
|
7
7
|
constructor(fields, selectedFields, isFieldsFetching, isSelectedFieldsFetching) {
|
package/es/platform/zfield/{entities → domain/entities}/fields-manager/SelectedFieldsManager.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FIELD_FETCH, FIELD_FETCH_FAILURE, FIELD_FETCH_NO_CONTENT, FIELD_FETCH_SUCCESS, FIELD_REFETCH } from "
|
|
2
|
-
import { FETCH } from "
|
|
1
|
+
import { FIELD_FETCH, FIELD_FETCH_FAILURE, FIELD_FETCH_NO_CONTENT, FIELD_FETCH_SUCCESS, FIELD_REFETCH } from "../../../../../bc/zfield/Constants";
|
|
2
|
+
import { FETCH } from "../../../../../bc/zhttp/Constants";
|
|
3
3
|
|
|
4
4
|
class SelectedFieldsManager {
|
|
5
5
|
constructor(selectedFields, isSelectedFieldsFetching) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { FIELD_FETCH_FAILURE, FIELD_FETCH_NO_CONTENT, FIELD_FETCH_SUCCESS } from "
|
|
1
|
+
import { FIELD_FETCH_FAILURE, FIELD_FETCH_NO_CONTENT, FIELD_FETCH_SUCCESS } from "../../../../../bc/zfield/Constants";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FETCH } from "../../../bc/zhttp/Constants";
|
|
2
2
|
import FetchController from "../adapters/controllers/FetchController";
|
|
3
|
-
import FetchUseCase from "../usecases/
|
|
3
|
+
import FetchUseCase from "../applications/usecases/FetchUseCase";
|
|
4
4
|
import FetchGateWay from "../adapters/gateway/FetchGateWay";
|
|
5
5
|
|
|
6
6
|
class ActionsHandlersFactory {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import Properties from "../../../bc/zhttp/Properties";
|
|
1
2
|
import ActionsHandlersFactory from "./ActionsHandlerFactory";
|
|
2
3
|
export default class ZHttpBehaviourFactory {
|
|
3
4
|
static create() {
|
|
4
5
|
const behaviour = {
|
|
5
6
|
name: 'zhttp',
|
|
6
|
-
properties:
|
|
7
|
+
properties: Properties,
|
|
7
8
|
setInitialState: () => ({}),
|
|
8
9
|
eventHandlers: ActionsHandlersFactory.create(window.fetch.bind(window))
|
|
9
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
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 ListFactory from "../../
|
|
3
|
+
import ListFactory from "../../applications/entities-factory/ListFactory";
|
|
4
4
|
|
|
5
5
|
class Repository {
|
|
6
6
|
constructor() {
|
|
@@ -16,9 +16,11 @@ class Repository {
|
|
|
16
16
|
limit,
|
|
17
17
|
sortBy,
|
|
18
18
|
filter,
|
|
19
|
-
moduleName
|
|
19
|
+
moduleName,
|
|
20
|
+
pageContext
|
|
20
21
|
} = this.state.properties;
|
|
21
22
|
const list = ListFactory.createList({
|
|
23
|
+
pageContext,
|
|
22
24
|
filter: { ...filter,
|
|
23
25
|
departmentId: filter.departmentId,
|
|
24
26
|
viewId: filter.viewId,
|
|
@@ -1,15 +1,15 @@
|
|
|
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 InitializeUseCase from "../../usecases/
|
|
4
|
-
import PropertiesChangeUseCase from "../../usecases/
|
|
5
|
-
import FetchMoreUseCase from "../../usecases/
|
|
6
|
-
import FieldChangeUseCase from "../../usecases/
|
|
7
|
-
import DeleteMultipleRecordUseCase from "../../usecases/
|
|
8
|
-
import SortUseCase from "../../usecases/
|
|
9
|
-
import RecordUpdateUseCase from "../../usecases/
|
|
10
|
-
import DeleteSingleRecordUseCase from "../../usecases/
|
|
11
|
-
import RecordExecuteSucceededUseCase from "../../usecases/
|
|
12
|
-
import RecordExecuteFailedUseCase from "../../usecases/
|
|
3
|
+
import InitializeUseCase from "../../applications/usecases/InitializeUseCase";
|
|
4
|
+
import PropertiesChangeUseCase from "../../applications/usecases/PropertiesChangeUseCase";
|
|
5
|
+
import FetchMoreUseCase from "../../applications/usecases/FetchMoreUseCase";
|
|
6
|
+
import FieldChangeUseCase from "../../applications/usecases/FieldChangeUseCase";
|
|
7
|
+
import DeleteMultipleRecordUseCase from "../../applications/usecases/DeleteMultipleRecordUseCase";
|
|
8
|
+
import SortUseCase from "../../applications/usecases/SortUseCase";
|
|
9
|
+
import RecordUpdateUseCase from "../../applications/usecases/RecordUpdateUseCase";
|
|
10
|
+
import DeleteSingleRecordUseCase from "../../applications/usecases/DeleteSingleRecordUseCase";
|
|
11
|
+
import RecordExecuteSucceededUseCase from "../../applications/usecases/RecordExecuteSucceededUseCase";
|
|
12
|
+
import RecordExecuteFailedUseCase from "../../applications/usecases/RecordExecuteFailedUseCase";
|
|
13
13
|
|
|
14
14
|
class Service {
|
|
15
15
|
constructor(dependencies) {
|
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
/* eslint-disable max-lines-per-function */
|
|
2
|
+
import { Width as ColumnWidth } from "../../../../cc/table-list/data-types/Header";
|
|
2
3
|
import HeadersTranslator from "./translators/HeadersTranslator";
|
|
3
4
|
import RowsTranslator from "./translators/RowsTranslator";
|
|
4
5
|
import Pipeline from "./utils/Pipeline";
|
|
6
|
+
import RowCursor from "../../../../cc/table-list/data-types/RowCursor";
|
|
7
|
+
import { TableListConstants } from "../../../../cc/table-list";
|
|
5
8
|
|
|
6
9
|
const fallbackToDefault = (value, defaultValue) => [undefined, null].includes(value) ? defaultValue : value;
|
|
7
10
|
|
|
11
|
+
const splitActions = rowActions => {
|
|
12
|
+
const noUiActions = [];
|
|
13
|
+
const newRowActions = [];
|
|
14
|
+
rowActions.forEach(action => {
|
|
15
|
+
if (!action.uiType || action.uiType === 'no-ui') {
|
|
16
|
+
noUiActions.push(action);
|
|
17
|
+
} else {
|
|
18
|
+
newRowActions.push(action);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
noUiActions,
|
|
23
|
+
newRowActions
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
8
27
|
export default class TableTranslator {
|
|
9
28
|
static transformState(state) {
|
|
10
29
|
const {
|
|
@@ -27,6 +46,13 @@ export default class TableTranslator {
|
|
|
27
46
|
} = fallbackToDefault(zrecord, {}); // FIX: zrecord should be available by default
|
|
28
47
|
|
|
29
48
|
const fieldUiMapping = uiMapping.fields;
|
|
49
|
+
const rowActionsUiType = uiMapping.rowActionsComponentName;
|
|
50
|
+
const {
|
|
51
|
+
noUiActions,
|
|
52
|
+
newRowActions
|
|
53
|
+
} = splitActions(rowActions);
|
|
54
|
+
const isRowClickable = noUiActions.some(action => action.eventMapping.some(mapping => mapping.action.dispatchType === TableListConstants.TABLE_LIST_ROW_CLICKED));
|
|
55
|
+
const rowCursor = isRowClickable ? RowCursor.Pointer : RowCursor.Default;
|
|
30
56
|
const {
|
|
31
57
|
fields: availableFields,
|
|
32
58
|
selectedFields,
|
|
@@ -37,13 +63,17 @@ export default class TableTranslator {
|
|
|
37
63
|
const isLoading = !!(isRecordsFetching || isAvailableFieldsFetching || isSelectedFieldsFetching);
|
|
38
64
|
const fields = selectedFields === null || selectedFields === void 0 ? void 0 : selectedFields.map(selectedField => availableFields === null || availableFields === void 0 ? void 0 : availableFields.find(availableField => availableField.name === selectedField)).filter(f => f != undefined);
|
|
39
65
|
const headersTranslator = new HeadersTranslator(fields);
|
|
40
|
-
const rowsTranslator = new RowsTranslator(records, fields,
|
|
66
|
+
const rowsTranslator = new RowsTranslator(records, fields, newRowActions, pageContext, fieldUiMapping, rowActionsUiType);
|
|
41
67
|
const translators = [headersTranslator.getTranslator(), rowsTranslator.getTranslator()]; // TODO: Implement ModuleTableModel, and move data and isLoading to tableViewModel Object
|
|
42
68
|
|
|
43
69
|
return {
|
|
44
70
|
properties,
|
|
45
71
|
behaviours,
|
|
46
|
-
|
|
72
|
+
rowCursor,
|
|
73
|
+
rowActionsConfig: {
|
|
74
|
+
hasActions: Boolean(newRowActions === null || newRowActions === void 0 ? void 0 : newRowActions.length),
|
|
75
|
+
columnWidth: ColumnWidth.XSmall
|
|
76
|
+
},
|
|
47
77
|
isLoading,
|
|
48
78
|
emptyStateUiType: uiMapping.emptyState || '',
|
|
49
79
|
data: Pipeline.run(translators, {})
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Alignment } from "../../../../../cc/table-list/data-types/Header";
|
|
2
|
+
|
|
3
|
+
function ColumnAlignmentTranslator(type) {
|
|
4
|
+
if (type === 'Boolean') {
|
|
5
|
+
return Alignment.Center;
|
|
6
|
+
} else {
|
|
7
|
+
return Alignment.Left;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default ColumnAlignmentTranslator;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Width } from "../../../../../cc/table-list/data-types/Header"; // TODO: Need to get the final column width from the visual team
|
|
2
|
+
|
|
3
|
+
const columnSizeMapping = {
|
|
4
|
+
Multiselect: Width.XXLarge,
|
|
5
|
+
Boolean: Width.Medium,
|
|
6
|
+
Number: Width.Medium,
|
|
7
|
+
Decimal: Width.Medium,
|
|
8
|
+
Currency: Width.Medium,
|
|
9
|
+
Date: Width.Medium,
|
|
10
|
+
Percent: Width.Medium
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function ColumnSizeTranslator(type) {
|
|
14
|
+
const columnSize = columnSizeMapping[type];
|
|
15
|
+
|
|
16
|
+
if (columnSize) {
|
|
17
|
+
return columnSize;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return Width.Large;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default ColumnSizeTranslator;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ColumnSizeTranslator from "./ColumnSizeTranslator";
|
|
2
|
+
import ColumnAlignmentTranslator from "./ColumnAlignmentTranslator";
|
|
2
3
|
|
|
3
4
|
function HeaderTranslator(field) {
|
|
4
5
|
const {
|
|
@@ -13,8 +14,8 @@ function HeaderTranslator(field) {
|
|
|
13
14
|
name: name,
|
|
14
15
|
text: displayLabel,
|
|
15
16
|
sortable: isSortable,
|
|
16
|
-
alignment: type
|
|
17
|
-
|
|
17
|
+
alignment: ColumnAlignmentTranslator(type),
|
|
18
|
+
width: ColumnSizeTranslator(type)
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -5,12 +5,16 @@ export default function RowTranslator(_ref) {
|
|
|
5
5
|
record,
|
|
6
6
|
fields,
|
|
7
7
|
fieldUiMapping,
|
|
8
|
+
rowActionsUiType,
|
|
8
9
|
rowActions,
|
|
9
10
|
pageContext
|
|
10
11
|
} = _ref;
|
|
11
12
|
return {
|
|
12
13
|
id: record.id,
|
|
13
14
|
columns: fields.map(field => ColumnTranslator(field, record, fieldUiMapping)),
|
|
14
|
-
|
|
15
|
+
rowActionLocation: {
|
|
16
|
+
type: rowActionsUiType || '',
|
|
17
|
+
actions: rowActions.map(rowAction => RowActionTranslator(rowAction, record, pageContext))
|
|
18
|
+
}
|
|
15
19
|
};
|
|
16
20
|
}
|
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
import TemplateHelpers from "../../../../zdata-broker/adapters/gateways/TemplateHelpers";
|
|
2
|
+
const templateHelpers = new TemplateHelpers();
|
|
2
3
|
export default function RowActionTranslator(rowAction, record, pageContext) {
|
|
4
|
+
const templateContext = {
|
|
5
|
+
orgName: pageContext.orgName,
|
|
6
|
+
departmentName: pageContext.departmentName,
|
|
7
|
+
moduleSanitatedName: pageContext.moduleSanitatedName,
|
|
8
|
+
record,
|
|
9
|
+
moduleName: pageContext.moduleName,
|
|
10
|
+
recordId: record.id
|
|
11
|
+
};
|
|
12
|
+
const properties = PropertiesTranslator(rowAction.properties, templateContext);
|
|
3
13
|
return {
|
|
4
14
|
type: rowAction.uiType,
|
|
5
|
-
eventMappings: EventMappingTranslator(rowAction.eventMapping,
|
|
6
|
-
properties
|
|
15
|
+
eventMappings: EventMappingTranslator(rowAction.eventMapping, templateContext),
|
|
16
|
+
properties
|
|
7
17
|
};
|
|
8
18
|
}
|
|
9
|
-
const templateHelpers = new TemplateHelpers();
|
|
10
19
|
|
|
11
|
-
function
|
|
20
|
+
function PropertiesTranslator(properties, templateContext) {
|
|
21
|
+
return templateHelpers.replaceTemplateVariablesInObject(properties, templateContext);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function EventMappingTranslator(eventMapping, templateContext) {
|
|
12
25
|
return eventMapping.map(eventMapping => {
|
|
13
26
|
return {
|
|
14
27
|
action: eventMapping.action,
|
|
15
28
|
eventType: eventMapping.eventType,
|
|
16
|
-
payload: JSON.parse(templateHelpers.replaceTemplateVariables(eventMapping.payloadMapping,
|
|
17
|
-
orgName: pageContext.orgName,
|
|
18
|
-
departmentName: pageContext.departmentName,
|
|
19
|
-
moduleSanitatedName: pageContext.moduleSanitatedName,
|
|
20
|
-
moduleName: pageContext.moduleName,
|
|
21
|
-
recordId: record.id
|
|
22
|
-
}))
|
|
29
|
+
payload: JSON.parse(templateHelpers.replaceTemplateVariables(eventMapping.payloadMapping, templateContext))
|
|
23
30
|
};
|
|
24
31
|
});
|
|
25
32
|
}
|