@zohodesk/library-platform 1.1.0-exp.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/es/bc/{zdata-broker → zdata-source}/Actions.js +6 -6
- package/es/bc/{zdata-broker → zdata-source}/Constants.js +6 -5
- package/es/bc/zdata-source/EventHandlers.js +2 -0
- package/es/bc/zdata-source/Symbols.js +5 -0
- package/es/bc/zfield/ActionHandlers.js +1 -1
- package/es/bc/zlist/EventHandlers.js +1 -1
- package/es/bc/zlist/Properties.js +17 -30
- package/es/bc/zrecord/Constants.js +3 -1
- package/es/cc/action-icon/Properties.js +31 -0
- package/es/cc/action-location/Properties.js +9 -24
- package/es/cc/table-connected/Constants.js +4 -0
- package/es/cc/table-connected/Properties.js +14 -57
- package/es/cc/table-list/Properties.js +34 -10
- package/es/cc/table-list/data-types/Header.js +14 -7
- package/es/cc/table-list/data-types/RowCursor.js +8 -0
- package/es/cc/table-list/row/Properties.js +16 -3
- package/es/desk-frameworks/table-connected/frameworks/ListSdkFactory.js +88 -1
- package/es/desk-frameworks/table-connected/frameworks/TableConnectedFactory.js +23 -6
- package/es/desk-frameworks/table-connected/frameworks/TableConnectedView.js +9 -4
- package/es/library/behaviours/list-selection/domain/entities/ListItemSelection.js +29 -9
- package/es/library/custom-component/domain/entities/Component.js +8 -4
- package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +4 -2
- 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 +8 -6
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +9 -7
- 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 +18 -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 +13 -7
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +8 -5
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.js +18 -7
- package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon.js +18 -2
- package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIconView.js +75 -1
- package/es/library/dot/legacy-to-new-arch/table-field-components/lookup-field/frameworks/ui/LookupFieldView.js +7 -6
- package/es/platform/client-actions/Readme.md +31 -0
- package/es/platform/client-actions/bc/zclient-actions/Constants.js +11 -0
- package/es/platform/client-actions/bc/zclient-actions/EventHandlers.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/Readme.md +31 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/ClientActionBehaviourExecutorController.js +27 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/FailureController.js +28 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/FetchStateStopController.js +21 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/MountController.js +25 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/NoContentController.js +23 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/SetClientActionsController.js +24 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/SuccessController.js +28 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/gateways/Repository.js +28 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/gateways/Service.js +35 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/presenters/Presenter.js +24 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/entities-factory/ClientActionFactory.js +12 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/entities-factory/ClientActionManagerFactory.js +10 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/input/SetClientActionsInputModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/input/SuccessInputModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/output/IPresenter.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/ExecuteActionBehaviourUseCase.js +33 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/FailureUseCase.js +22 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/FetchStateStopUseCase.js +25 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/InitializeUseCase.js +17 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/NoContentUseCase.js +27 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/SetClientActionsUseCase.js +21 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/SuccessUseCase.js +22 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientAction.js +65 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActionManager.js +141 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActions.js +50 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/EventMapping.js +36 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/EventMappings.js +15 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/GetClientActionsStrategy.js +44 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/UIComponentMapping.js +41 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/BehaviourState.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionsModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ComponentPropertiesModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ConditionFieldModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ConditionModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/EventMappingModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/EventModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IAction.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientActionExecuteStrategy.js +0 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientActionManager.js +0 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientActions.js +0 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IError.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IEvent.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IEventMapping.js +0 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IEventMappings.js +0 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IPayload.js +0 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IUIComponentMapping.js +0 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/PayloadValueMappingModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/PropsMeta.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/State.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/StrategyMeta.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/SubMeta.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/UIComponentMappingModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/UserDetailsModel.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/frameworks/ActionsHandlersFactory.js +47 -0
- package/es/platform/client-actions/behaviour/zclient-actions/frameworks/ClientActionsBehaviourFactory.js +12 -0
- package/es/platform/client-actions/cc/action-event-mediator/Properties.js +34 -0
- package/es/platform/client-actions/cc/dynamic-action-component/Properties.js +51 -0
- package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/MountController.js +18 -0
- package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/PropertiesChangeController.js +26 -0
- package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/UnmountController.js +18 -0
- package/es/platform/client-actions/components/action-event-mediator/adapters/gateway/Repository.js +36 -0
- package/es/platform/client-actions/components/action-event-mediator/adapters/presenters/Presenter.js +22 -0
- package/es/platform/client-actions/components/action-event-mediator/applications/interfaces/UseCaseDependencies.js +1 -0
- package/es/platform/client-actions/components/action-event-mediator/applications/interfaces/gateways/IRepository.js +0 -0
- package/es/platform/client-actions/components/action-event-mediator/applications/interfaces/input/PropertiesChangeUseCaseInputModel.js +1 -0
- package/es/platform/client-actions/components/action-event-mediator/applications/interfaces/output/IPresenter.js +0 -0
- package/es/platform/client-actions/components/action-event-mediator/applications/usecases/AbstractUseCase.js +15 -0
- package/es/platform/client-actions/components/action-event-mediator/applications/usecases/DestroyUseCase.js +13 -0
- package/es/platform/client-actions/components/action-event-mediator/applications/usecases/InitializeUseCase.js +13 -0
- package/es/platform/client-actions/components/action-event-mediator/applications/usecases/PropertiesChangeUseCase.js +17 -0
- package/es/platform/client-actions/components/action-event-mediator/domain/entities/ActionEventMediatorEntity.js +108 -0
- package/es/platform/client-actions/components/action-event-mediator/domain/entities/interfaces/IActionLocation.js +1 -0
- package/es/platform/client-actions/components/action-event-mediator/domain/entities/interfaces/IState.js +1 -0
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator.js +13 -0
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediatorView.js +19 -0
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/EventHandlersFactory.js +30 -0
- package/es/platform/client-actions/components/dynamic-component/domain/entities/interfaces/IState.js +1 -0
- package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponent.js +9 -0
- package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponentView.js +34 -0
- package/es/platform/client-actions/components/interfaces/ActionViewModel.js +7 -0
- package/es/platform/client-actions/components/interfaces/EventMappingViewModel.js +0 -0
- package/es/platform/client-actions/components/row-actions-renderer/domain/entities/interfaces/IState.js +1 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.js +12 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +17 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +30 -0
- package/es/platform/client-actions/template-resolver/index.js +44 -0
- package/es/platform/client-actions/template-resolver/interfaces/ITemplate.js +1 -0
- package/es/platform/client-actions/translators/client-actions-translator/index.js +29 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalEmptyString.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalEndsWith.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalEquals.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalGreaterThan.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalGreaterThanOrEquals.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalIn.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalIsEmpty.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalIsNotEmpty.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalLessThan.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalLessThanOrEquals.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalLike.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalNotEquals.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalNotLike.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/EvalStartsWith.js +4 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/GetResolvedContextFieldValue.js +8 -0
- package/es/platform/client-actions/translators/condition-resolver/field-evaluators/index.js +58 -0
- package/es/platform/client-actions/translators/condition-resolver/index.js +33 -0
- package/es/platform/client-actions/translators/condition-resolver/pattern-evaluator/PatternValidator.js +86 -0
- package/es/platform/client-actions/translators/condition-resolver/pattern-evaluator/index.js +96 -0
- package/es/platform/client-actions/translators/context-resolver/index.js +54 -0
- package/es/platform/client-actions/translators/interfaces/IContext.js +1 -0
- package/es/platform/client-actions/translators/interfaces/IState.js +1 -0
- package/es/platform/data-source/dbc/index.js +1 -0
- package/es/platform/{data-broker → data-source}/http-template/deleteRecord.js +1 -1
- package/es/platform/{data-broker → data-source}/http-template/deleteRecords.js +1 -1
- package/es/platform/{data-broker → data-source}/http-template/getAvailableFields.js +5 -5
- package/es/platform/data-source/http-template/getClientActions.js +23 -0
- package/es/platform/{data-broker → data-source}/http-template/getRecords.js +1 -1
- package/es/platform/{data-broker → data-source}/http-template/getSelectedFields.js +5 -5
- package/es/platform/{data-broker → data-source}/http-template/updateRecord.js +1 -1
- package/es/platform/{data-broker → data-source}/index.js +5 -5
- package/es/platform/{data-broker → data-source}/utils/transformer/CreateCf.js +1 -1
- package/es/platform/zdata-source/adapters/controllers/AbstractController.js +8 -0
- package/es/platform/{zdata-broker/adapters/controllers/ActionExecutorController.js → zdata-source/adapters/controllers/DataSourceExecutorController.js} +1 -1
- package/es/platform/{zdata-broker → zdata-source}/adapters/gateways/Repository.js +5 -5
- package/es/platform/{zdata-broker → zdata-source}/adapters/presenters/Presenter.js +4 -4
- package/es/platform/{zdata-broker/applications/entities-factory/DataBrokerFactory.js → zdata-source/applications/entities-factory/DataSourceFactory.js} +3 -4
- package/es/platform/zdata-source/applications/interfaces/InputDependencies.js +1 -0
- package/es/platform/zdata-source/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/platform/zdata-source/applications/interfaces/gateways/IService.js +0 -0
- package/es/platform/zdata-source/applications/interfaces/gateways/State.js +1 -0
- package/es/platform/zdata-source/applications/interfaces/input/ExecuteActionInputModel.js +1 -0
- package/es/platform/zdata-source/applications/interfaces/input/FailureInputModel.js +1 -0
- package/es/platform/zdata-source/applications/interfaces/input/NoContentInputModel.js +1 -0
- package/es/platform/zdata-source/applications/interfaces/input/RegisterInputModel.js +1 -0
- package/es/platform/zdata-source/applications/interfaces/input/SuccessInputModel.js +1 -0
- package/es/platform/zdata-source/applications/interfaces/output/IPresenter.js +1 -0
- package/es/platform/zdata-source/applications/usecases/AbstractUseCase.js +17 -0
- package/es/platform/{zdata-broker → zdata-source}/applications/usecases/ExecuteActionUseCase.js +3 -3
- package/es/platform/{zdata-broker → zdata-source}/applications/usecases/FailureUseCase.js +3 -3
- package/es/platform/{zdata-broker → zdata-source}/applications/usecases/NoContentUseCase.js +3 -3
- package/es/platform/{zdata-broker → zdata-source}/applications/usecases/SuccessUseCase.js +4 -4
- package/es/platform/{zdata-broker/domain/entities/DataBroker.js → zdata-source/domain/entities/DataSource.js} +12 -12
- package/es/platform/zdata-source/domain/entities/interfaces/APIDetailsModel.js +1 -0
- package/es/platform/zdata-source/domain/entities/interfaces/APITemplateModel.js +1 -0
- package/es/platform/zdata-source/domain/entities/interfaces/APITemplatesModel.js +1 -0
- package/es/platform/zdata-source/domain/entities/interfaces/BehaviourState.js +1 -0
- package/es/platform/zdata-source/domain/entities/interfaces/EventModel.js +1 -0
- package/es/platform/zdata-source/domain/entities/interfaces/IAPITemplate.js +1 -0
- package/es/platform/zdata-source/domain/entities/interfaces/IAPITemplates.js +1 -0
- package/es/platform/zdata-source/domain/entities/interfaces/IDataSource.js +0 -0
- package/es/platform/zdata-source/domain/entities/interfaces/ITemplateHelpers.js +1 -0
- package/es/platform/zdata-source/domain/entities/interfaces/MetaData.js +1 -0
- package/es/platform/{zdata-broker → zdata-source}/frameworks/DataBrokerBehaviourFactory.js +2 -2
- package/es/platform/{zdata-broker → zdata-source}/frameworks/EventHandlersFactory.js +7 -12
- package/es/platform/zfield/applications/usecases/ExecuteActionUseCase.js +1 -1
- package/es/platform/zfield/applications/usecases/InitializeUseCase.js +2 -2
- package/es/platform/zfield/applications/usecases/RefetchUseCase.js +1 -1
- package/es/platform/zfield/domain/entities/fields-manager/FieldsManager.js +5 -5
- package/es/platform/zfield/frameworks/ActionHandlerFactory.js +4 -4
- package/es/platform/zlist/adapters/controllers/DeleteSuccessController.js +25 -0
- package/es/platform/zlist/adapters/controllers/UpdateSuccessController.js +25 -0
- package/es/platform/zlist/adapters/gateways/Repository.js +9 -8
- package/es/platform/zlist/adapters/gateways/Service.js +8 -0
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +54 -13
- 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/ColumnTranslator.js +16 -8
- package/es/platform/zlist/adapters/presenters/translators/Header.js +10 -4
- package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +4 -2
- package/es/platform/zlist/adapters/presenters/translators/Row.js +10 -6
- package/es/platform/zlist/adapters/presenters/translators/RowActionTranslator.js +6 -6
- package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +7 -5
- package/es/platform/zlist/adapters/presenters/translators/actions/ActionsTranslator.js +89 -0
- package/es/platform/zlist/adapters/presenters/translators/interfaces/Context.js +1 -0
- package/es/platform/zlist/adapters/presenters/translators/interfaces/FieldComponentMapping.js +1 -0
- package/es/platform/zlist/applications/entities-factory/ListFactory.js +3 -2
- package/es/platform/zlist/applications/usecases/DeleteSuccessUseCase.js +19 -0
- package/es/platform/zlist/applications/usecases/UpdateSuccessUseCase.js +19 -0
- package/es/platform/zlist/domain/entities/List.js +58 -27
- package/es/platform/zlist/frameworks/EventHandlersFactory.js +17 -23
- package/es/platform/zrecord/applications/usecases/ExecuteActionUseCase.js +1 -1
- package/es/platform/zrecord/applications/usecases/FetchMoreUseCase.js +1 -1
- package/es/platform/zrecord/applications/usecases/InitializeUseCase.js +2 -2
- package/es/platform/zrecord/applications/usecases/RefetchUseCase.js +1 -1
- package/es/platform/zrecord/domain/entities/RecordsManager.js +10 -10
- package/package.json +24 -22
- package/es/bc/zdata-broker/EventHandlers.js +0 -2
- package/es/bc/zdata-broker/Symbols.js +0 -5
- package/es/platform/data-broker/http-template/getUIActions.js +0 -22
- package/es/platform/zdata-broker/domain/entities/interfaces/MetaData.js +0 -1
- /package/es/bc/{zdata-broker → zdata-source}/Properties.js +0 -0
- /package/es/{platform/data-broker/dbc/index.js → cc/table-list/data-types/RowActionsConfig.js} +0 -0
- /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/adapters/controllers/AbstractController.js +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/InputDependencies.js → client-actions/behaviour/zclient-actions/applications/interfaces/ClientActionModel.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/gateways/IRepository.js → client-actions/behaviour/zclient-actions/applications/interfaces/ComponentPropertiesModel.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/gateways/State.js → client-actions/behaviour/zclient-actions/applications/interfaces/ConditionFieldModel.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/input/ExecuteActionInputModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/ConditionModel.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/input/FailureInputModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/EventMappingModel.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/input/NoContentInputModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/IError.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/input/RegisterInputModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/InputDependencies.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/input/SuccessInputModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/PayloadValueMappingModel.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/output/IPresenter.js → client-actions/behaviour/zclient-actions/applications/interfaces/PropsMeta.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/APIDetailsModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/StrategyMeta.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/APITemplateModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/UIComponentMappingModel.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/APITemplatesModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/UserDetailsModel.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/BehaviourState.js → client-actions/behaviour/zclient-actions/applications/interfaces/gateways/IRepository.js} +0 -0
- /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/applications/interfaces/gateways/IService.js +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/EventModel.js → client-actions/behaviour/zclient-actions/applications/interfaces/gateways/State.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/IAPITemplate.js → client-actions/behaviour/zclient-actions/applications/interfaces/input/ExecuteActionBehaviourInputModel.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/IAPITemplates.js → client-actions/behaviour/zclient-actions/applications/interfaces/input/FailureInputModel.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/ITemplateHelpers.js → client-actions/behaviour/zclient-actions/applications/interfaces/input/FetchStateStopInputModel.js} +0 -0
- /package/es/platform/{zlist/adapters/presenters/translators/interfaces/FieldUiMapping.js → client-actions/behaviour/zclient-actions/applications/interfaces/input/InitializeInputModel.js} +0 -0
- /package/es/platform/{zlist/adapters/presenters/translators/interfaces/PageContext.js → client-actions/behaviour/zclient-actions/applications/interfaces/input/NoContentInputModel.js} +0 -0
- /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/applications/usecases/AbstractUseCase.js +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/IDataBroker.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientAction.js} +0 -0
- /package/es/platform/{data-broker → data-source}/utils/transformer/Transformer.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/FailureController.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/NoContentController.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/RegisterController.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/adapters/controllers/SuccessController.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/adapters/gateways/Service.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/adapters/gateways/TemplateHelpers.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/applications/entities-factory/APITemplatesFactory.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/applications/interfaces/gateways/ITemplateHelpers.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/applications/usecases/RegisterUseCase.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/domain/entities/APITemplate.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/domain/entities/APITemplates.js +0 -0
- /package/es/platform/{zdata-broker → zdata-source}/domain/entities/interfaces/ApiEnum.js +0 -0
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ import TableConnectedFactory from '@zohodesk/library-platform/TableConnectedFact
|
|
|
21
21
|
|
|
22
22
|
const myTableComponent = TableConnectedFactory.create({
|
|
23
23
|
name: 'MyTableComponent',
|
|
24
|
-
|
|
24
|
+
dataSource: myDataSource,
|
|
25
25
|
eventHandlers: {
|
|
26
26
|
onRowSelect: row => {
|
|
27
27
|
console.log('Selected row:', row);
|
|
@@ -69,7 +69,7 @@ const myComponent = ComponentRegistry.get('MyComponent');
|
|
|
69
69
|
The `TableConnectedFactory.create` method accepts the following parameters:
|
|
70
70
|
|
|
71
71
|
- **name**: `string` - The name of the component.
|
|
72
|
-
- **
|
|
72
|
+
- **dataSource**: `object` - The data broker instance to manage data fetching and manipulation.
|
|
73
73
|
- **eventHandlers**: `object` - An object containing event handler functions.
|
|
74
74
|
- **View**: `React.Component` - Custom view component to render the table.
|
|
75
75
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DATA_SOURCE_EXECUTE } from "./Constants";
|
|
2
|
+
import { DATA_SOURCE_FAILURE, DATA_SOURCE_SUCCESS } from "./Symbols";
|
|
3
3
|
const Actions = [{
|
|
4
|
-
type:
|
|
4
|
+
type: DATA_SOURCE_EXECUTE,
|
|
5
5
|
payload: {
|
|
6
6
|
apiName: {
|
|
7
7
|
name: 'apiName',
|
|
@@ -34,7 +34,7 @@ const Actions = [{
|
|
|
34
34
|
schema: {
|
|
35
35
|
type: 'object',
|
|
36
36
|
properties: {
|
|
37
|
-
[
|
|
37
|
+
[DATA_SOURCE_SUCCESS]: {
|
|
38
38
|
type: 'object',
|
|
39
39
|
properties: {
|
|
40
40
|
type: {
|
|
@@ -46,7 +46,7 @@ const Actions = [{
|
|
|
46
46
|
},
|
|
47
47
|
required: ['type', 'payload']
|
|
48
48
|
},
|
|
49
|
-
[
|
|
49
|
+
[DATA_SOURCE_FAILURE]: {
|
|
50
50
|
type: 'object',
|
|
51
51
|
properties: {
|
|
52
52
|
type: {
|
|
@@ -59,7 +59,7 @@ const Actions = [{
|
|
|
59
59
|
required: ['type', 'payload']
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
required: [
|
|
62
|
+
required: [DATA_SOURCE_SUCCESS, DATA_SOURCE_FAILURE]
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -1,10 +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
|
-
export const
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
3
|
+
export const DATA_SOURCE_REGISTER = 'DATA_SOURCE#REGISTER';
|
|
4
|
+
export const DATA_SOURCE_EXECUTE = 'DATA_SOURCE#EXECUTE';
|
|
5
|
+
export const DATA_SOURCE_EXECUTE_SUCCEEDED = 'DATA_SOURCE#EXECUTE_SUCCEEDED';
|
|
6
|
+
export const DATA_SOURCE_EXECUTE_NO_CONTENT_SUCCEEDED = 'DATA_SOURCE#EXECUTE_NO_CONTENT_SUCCEEDED';
|
|
7
|
+
export const DATA_SOURCE_EXECUTE_FAILED = 'DATA_SOURCE#EXECUTE_FAILED'; // REVIEW: This class is not used anywhere in the codebase.
|
|
8
|
+
|
|
8
9
|
export class DataBrokerActionName {}
|
|
9
10
|
|
|
10
11
|
_defineProperty(DataBrokerActionName, "GET_RECORDS", 'getRecords');
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Note: We need to properly handle uniqueness, because it is not api response
|
|
2
|
+
export const DATA_SOURCE_SIGNATURE = 'DATA_SOURCE#SIGNATURE';
|
|
3
|
+
export const DATA_SOURCE_FAILURE = 'DATA_SOURCE#FAILURE';
|
|
4
|
+
export const DATA_SOURCE_SUCCESS = 'DATA_SOURCE#SUCCESS';
|
|
5
|
+
export const DATA_SOURCE_NO_CONTENT = 'DATA_SOURCE#NO_CONTENT';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FIELD_EXECUTE, FIELD_REFETCH } from "./Constants";
|
|
2
|
-
import {
|
|
2
|
+
import { DATA_SOURCE_EXECUTE_FAILED, DATA_SOURCE_EXECUTE_NO_CONTENT_SUCCEEDED, DATA_SOURCE_EXECUTE_SUCCEEDED } from "../zdata-source/Constants";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { ZLIST_FETCH_MORE } from "./Constants";
|
|
1
|
+
import { ZLIST_FETCH_MORE, ZLIST_RECORD_DELETE_SUCCEEDED, ZLIST_RECORD_UPDATE_SUCCEEDED } from "./Constants";
|
|
@@ -7,47 +7,43 @@ export default {
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
departmentId: {
|
|
11
11
|
required: true,
|
|
12
12
|
typeMetadata: {
|
|
13
13
|
schema: {
|
|
14
|
-
type: '
|
|
15
|
-
properties: {
|
|
16
|
-
viewId: {
|
|
17
|
-
type: 'string'
|
|
18
|
-
},
|
|
19
|
-
orgId: {
|
|
20
|
-
type: 'string'
|
|
21
|
-
},
|
|
22
|
-
departmentId: {
|
|
23
|
-
type: 'string'
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
additionalProperties: {
|
|
27
|
-
type: 'string'
|
|
28
|
-
}
|
|
14
|
+
type: 'string'
|
|
29
15
|
}
|
|
30
16
|
}
|
|
31
17
|
},
|
|
32
|
-
|
|
18
|
+
viewId: {
|
|
19
|
+
required: true,
|
|
20
|
+
typeMetadata: {
|
|
21
|
+
schema: {
|
|
22
|
+
type: 'string'
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
context: {
|
|
33
27
|
required: true,
|
|
34
28
|
typeMetadata: {
|
|
35
29
|
schema: {
|
|
36
30
|
type: 'object',
|
|
37
31
|
properties: {
|
|
32
|
+
orgId: {
|
|
33
|
+
type: 'string'
|
|
34
|
+
},
|
|
38
35
|
orgName: {
|
|
39
36
|
type: 'string'
|
|
40
37
|
},
|
|
41
38
|
departmentName: {
|
|
42
39
|
type: 'string'
|
|
43
40
|
},
|
|
44
|
-
|
|
41
|
+
servicePrefix: {
|
|
45
42
|
type: 'string'
|
|
46
43
|
}
|
|
47
44
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
45
|
+
required: ['orgId', 'orgName', 'departmentName'],
|
|
46
|
+
additionalProperties: false
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
49
|
},
|
|
@@ -66,14 +62,5 @@ export default {
|
|
|
66
62
|
}]
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
|
-
},
|
|
70
|
-
limit: {
|
|
71
|
-
required: false,
|
|
72
|
-
defaultValue: 50,
|
|
73
|
-
typeMetadata: {
|
|
74
|
-
schema: {
|
|
75
|
-
type: 'number'
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
65
|
}
|
|
79
66
|
};
|
|
@@ -22,4 +22,6 @@ _defineProperty(RecordApiActionName, "DELETE_RECORDS", 'deleteRecords');
|
|
|
22
22
|
|
|
23
23
|
_defineProperty(RecordApiActionName, "DELETE_RECORD", 'deleteRecord');
|
|
24
24
|
|
|
25
|
-
_defineProperty(RecordApiActionName, "UPDATE_RECORD", 'updateRecord');
|
|
25
|
+
_defineProperty(RecordApiActionName, "UPDATE_RECORD", 'updateRecord');
|
|
26
|
+
|
|
27
|
+
_defineProperty(RecordApiActionName, "GET_CLIENTACTIONS", 'getClientActions');
|
|
@@ -34,6 +34,37 @@ export default {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
+
options: {
|
|
38
|
+
// NOTE: This is only a sample for FilterDropdown action component
|
|
39
|
+
required: false,
|
|
40
|
+
defaultValue: [],
|
|
41
|
+
typeMetadata: {
|
|
42
|
+
schema: {
|
|
43
|
+
type: "array",
|
|
44
|
+
items: {
|
|
45
|
+
type: "object",
|
|
46
|
+
properties: {
|
|
47
|
+
label: {
|
|
48
|
+
type: "string"
|
|
49
|
+
},
|
|
50
|
+
value: {
|
|
51
|
+
type: "string"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
isMultiselectable: {
|
|
59
|
+
// NOTE: This is only a sample for FilterDropdown action component
|
|
60
|
+
required: false,
|
|
61
|
+
defaultValue: false,
|
|
62
|
+
typeMetadata: {
|
|
63
|
+
schema: {
|
|
64
|
+
type: "boolean"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
37
68
|
isVisible: {
|
|
38
69
|
required: false,
|
|
39
70
|
defaultValue: true,
|
|
@@ -4,7 +4,10 @@ export const actionsSchema = {
|
|
|
4
4
|
items: {
|
|
5
5
|
type: 'object',
|
|
6
6
|
properties: {
|
|
7
|
-
|
|
7
|
+
component: {
|
|
8
|
+
type: 'string'
|
|
9
|
+
},
|
|
10
|
+
id: {
|
|
8
11
|
type: 'string'
|
|
9
12
|
},
|
|
10
13
|
properties: {
|
|
@@ -16,42 +19,24 @@ export const actionsSchema = {
|
|
|
16
19
|
items: {
|
|
17
20
|
type: 'object',
|
|
18
21
|
properties: {
|
|
19
|
-
|
|
20
|
-
type: '
|
|
21
|
-
properties: {
|
|
22
|
-
id: {
|
|
23
|
-
type: 'string'
|
|
24
|
-
},
|
|
25
|
-
dispatchType: {
|
|
26
|
-
type: 'string'
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
required: ['id', 'dispatchType']
|
|
22
|
+
id: {
|
|
23
|
+
type: 'string'
|
|
30
24
|
},
|
|
31
|
-
|
|
25
|
+
sourceEvent: {
|
|
32
26
|
type: 'string'
|
|
33
27
|
},
|
|
34
28
|
payload: {
|
|
35
29
|
type: 'object'
|
|
36
30
|
}
|
|
37
31
|
},
|
|
38
|
-
required: ['
|
|
32
|
+
required: ['sourceEvent', 'id']
|
|
39
33
|
}
|
|
40
34
|
}
|
|
41
35
|
},
|
|
42
|
-
required: ['
|
|
36
|
+
required: ['component', 'properties']
|
|
43
37
|
}
|
|
44
38
|
};
|
|
45
39
|
export default {
|
|
46
|
-
type: {
|
|
47
|
-
required: false,
|
|
48
|
-
typeMetadata: {
|
|
49
|
-
schema: {
|
|
50
|
-
type: 'string'
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
defaultValue: ''
|
|
54
|
-
},
|
|
55
40
|
actions: {
|
|
56
41
|
required: true,
|
|
57
42
|
typeMetadata: {
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import SelectionConfigSchema from "../../bc/list-selection/Properties";
|
|
2
2
|
export default {
|
|
3
|
-
|
|
3
|
+
preferences: {
|
|
4
4
|
required: false,
|
|
5
|
-
defaultValue:
|
|
5
|
+
defaultValue: {
|
|
6
|
+
autoColumnSizing: false
|
|
7
|
+
},
|
|
6
8
|
typeMetadata: {
|
|
7
9
|
schema: {
|
|
8
|
-
type: '
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
autoColumnSizing: {
|
|
13
|
+
type: 'boolean'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
9
16
|
}
|
|
10
17
|
}
|
|
11
18
|
},
|
|
12
19
|
...SelectionConfigSchema,
|
|
13
|
-
|
|
20
|
+
componentMapping: {
|
|
14
21
|
required: false,
|
|
15
22
|
defaultValue: {
|
|
16
23
|
fields: {},
|
|
@@ -23,6 +30,9 @@ export default {
|
|
|
23
30
|
fields: {
|
|
24
31
|
type: 'object'
|
|
25
32
|
},
|
|
33
|
+
rowActionsComponentName: {
|
|
34
|
+
type: 'string'
|
|
35
|
+
},
|
|
26
36
|
emptyState: {
|
|
27
37
|
type: 'string'
|
|
28
38
|
}
|
|
@@ -37,58 +47,5 @@ export default {
|
|
|
37
47
|
type: 'string'
|
|
38
48
|
}
|
|
39
49
|
}
|
|
40
|
-
},
|
|
41
|
-
rowActions: {
|
|
42
|
-
required: false,
|
|
43
|
-
defaultValue: [],
|
|
44
|
-
typeMetadata: {
|
|
45
|
-
schema: {
|
|
46
|
-
type: 'array',
|
|
47
|
-
minItems: 0,
|
|
48
|
-
items: {
|
|
49
|
-
type: 'object',
|
|
50
|
-
properties: {
|
|
51
|
-
uiType: {
|
|
52
|
-
type: 'string'
|
|
53
|
-
},
|
|
54
|
-
properties: {
|
|
55
|
-
type: 'object'
|
|
56
|
-
},
|
|
57
|
-
eventMappings: {
|
|
58
|
-
type: 'array',
|
|
59
|
-
minItems: 0,
|
|
60
|
-
items: {
|
|
61
|
-
type: 'object',
|
|
62
|
-
properties: {
|
|
63
|
-
id: {
|
|
64
|
-
type: 'string'
|
|
65
|
-
},
|
|
66
|
-
action: {
|
|
67
|
-
type: 'object',
|
|
68
|
-
properties: {
|
|
69
|
-
id: {
|
|
70
|
-
type: 'string'
|
|
71
|
-
},
|
|
72
|
-
dispatchType: {
|
|
73
|
-
type: 'string'
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
required: ['id', 'dispatchType']
|
|
77
|
-
},
|
|
78
|
-
eventType: {
|
|
79
|
-
type: 'string'
|
|
80
|
-
},
|
|
81
|
-
payloadMapping: {
|
|
82
|
-
type: 'string'
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
required: ['id', 'action', 'payloadMapping', 'eventType']
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
required: ['uiType', 'properties']
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
50
|
}
|
|
94
51
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { Alignment, SortedBy, Width } from "./data-types/Header";
|
|
2
|
+
import RowCursor from "./data-types/RowCursor";
|
|
1
3
|
import ResizerConfigSchema from "../../bc/table-column-resizer/Properties";
|
|
2
|
-
import { actionsSchema } from "
|
|
4
|
+
import { actionsSchema } from "../../platform/client-actions/cc/action-event-mediator/Properties";
|
|
3
5
|
import PropertiesConverter from "../component/properties/PropertiesConverter";
|
|
4
6
|
import BooleanProperties from "../fields/boolean/Properties";
|
|
5
7
|
import CurrencyProperties from "../fields/currency/Properties";
|
|
@@ -34,12 +36,24 @@ const TableListProperties = {
|
|
|
34
36
|
},
|
|
35
37
|
defaultValue: ''
|
|
36
38
|
},
|
|
37
|
-
|
|
39
|
+
rowActionsConfig: {
|
|
38
40
|
required: false,
|
|
39
|
-
defaultValue:
|
|
41
|
+
defaultValue: {
|
|
42
|
+
hasActions: false,
|
|
43
|
+
columnWidth: Width.XSmall
|
|
44
|
+
},
|
|
40
45
|
typeMetadata: {
|
|
41
46
|
schema: {
|
|
42
|
-
type: '
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
hasActions: {
|
|
50
|
+
type: 'boolean'
|
|
51
|
+
},
|
|
52
|
+
columnWidth: {
|
|
53
|
+
type: 'number',
|
|
54
|
+
enum: Object.values(Width)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
43
57
|
}
|
|
44
58
|
}
|
|
45
59
|
},
|
|
@@ -52,6 +66,16 @@ const TableListProperties = {
|
|
|
52
66
|
}
|
|
53
67
|
}
|
|
54
68
|
},
|
|
69
|
+
rowCursor: {
|
|
70
|
+
required: false,
|
|
71
|
+
defaultValue: 'pointer',
|
|
72
|
+
typeMetadata: {
|
|
73
|
+
schema: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
enum: Object.values(RowCursor)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
55
79
|
resizerConfig: {
|
|
56
80
|
required: false,
|
|
57
81
|
defaultValue: {
|
|
@@ -86,20 +110,20 @@ const TableListProperties = {
|
|
|
86
110
|
text: {
|
|
87
111
|
type: 'string'
|
|
88
112
|
},
|
|
89
|
-
|
|
90
|
-
type: '
|
|
91
|
-
enum:
|
|
113
|
+
width: {
|
|
114
|
+
type: 'number',
|
|
115
|
+
enum: Object.values(Width)
|
|
92
116
|
},
|
|
93
117
|
alignment: {
|
|
94
118
|
type: 'string',
|
|
95
|
-
enum:
|
|
119
|
+
enum: Object.values(Alignment)
|
|
96
120
|
},
|
|
97
121
|
sortable: {
|
|
98
122
|
type: 'boolean'
|
|
99
123
|
},
|
|
100
124
|
sortOrder: {
|
|
101
125
|
type: 'string',
|
|
102
|
-
enum:
|
|
126
|
+
enum: Object.values(SortedBy)
|
|
103
127
|
},
|
|
104
128
|
sortTooltip: {
|
|
105
129
|
type: 'string'
|
|
@@ -123,7 +147,7 @@ const TableListProperties = {
|
|
|
123
147
|
}]
|
|
124
148
|
},
|
|
125
149
|
ActionLocation: {
|
|
126
|
-
|
|
150
|
+
renderComponentType: 'object',
|
|
127
151
|
properties: {
|
|
128
152
|
type: {
|
|
129
153
|
type: 'string'
|
|
@@ -4,17 +4,24 @@ export let SortedBy = /*#__PURE__*/function (SortedBy) {
|
|
|
4
4
|
SortedBy["Descending"] = "descending";
|
|
5
5
|
return SortedBy;
|
|
6
6
|
}({});
|
|
7
|
-
export let
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
export let Width = /*#__PURE__*/function (Width) {
|
|
8
|
+
Width[Width["XSmall"] = 120] = "XSmall";
|
|
9
|
+
Width[Width["Small"] = 160] = "Small";
|
|
10
|
+
Width[Width["Medium"] = 200] = "Medium";
|
|
11
|
+
Width[Width["Large"] = 240] = "Large";
|
|
12
|
+
Width[Width["XLarge"] = 280] = "XLarge";
|
|
13
|
+
Width[Width["XXLarge"] = 320] = "XXLarge";
|
|
14
|
+
return Width;
|
|
14
15
|
}({});
|
|
15
16
|
export let Alignment = /*#__PURE__*/function (Alignment) {
|
|
16
17
|
Alignment["Left"] = "left";
|
|
17
18
|
Alignment["Center"] = "center";
|
|
18
19
|
Alignment["Right"] = "right";
|
|
19
20
|
return Alignment;
|
|
21
|
+
}({});
|
|
22
|
+
export let AlignmentOfFlex = /*#__PURE__*/function (AlignmentOfFlex) {
|
|
23
|
+
AlignmentOfFlex["left"] = "start";
|
|
24
|
+
AlignmentOfFlex["center"] = "center";
|
|
25
|
+
AlignmentOfFlex["right"] = "end";
|
|
26
|
+
return AlignmentOfFlex;
|
|
20
27
|
}({});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Width } from "../data-types/Header";
|
|
2
|
+
import RowCursor from "../data-types/RowCursor";
|
|
1
3
|
const TableRowProperties = {
|
|
2
4
|
isSelectionEnabled: {
|
|
3
5
|
required: false,
|
|
@@ -53,6 +55,16 @@ const TableRowProperties = {
|
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
},
|
|
58
|
+
cursor: {
|
|
59
|
+
required: false,
|
|
60
|
+
defaultValue: 'pointer',
|
|
61
|
+
typeMetadata: {
|
|
62
|
+
schema: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
enum: Object.values(RowCursor)
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
56
68
|
rowActionLocation: {
|
|
57
69
|
required: false,
|
|
58
70
|
defaultValue: {},
|
|
@@ -71,12 +83,13 @@ const TableRowProperties = {
|
|
|
71
83
|
}
|
|
72
84
|
}
|
|
73
85
|
},
|
|
74
|
-
|
|
86
|
+
rowActionsColumnWidth: {
|
|
75
87
|
required: false,
|
|
76
|
-
defaultValue:
|
|
88
|
+
defaultValue: Width.XSmall,
|
|
77
89
|
typeMetadata: {
|
|
78
90
|
schema: {
|
|
79
|
-
type: '
|
|
91
|
+
type: 'number',
|
|
92
|
+
enum: Object.values(Width)
|
|
80
93
|
}
|
|
81
94
|
}
|
|
82
95
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ZLIST_DELETE_RECORD, ZLIST_DELETE_RECORDS, ZLIST_RECORD_UPDATE } from "../../../bc/zlist/Constants";
|
|
2
|
+
import { RECORD_LOCAL_MULTIPLE_DELETE, RECORD_LOCAL_UPDATE } from "../../../bc/zrecord/Constants";
|
|
2
3
|
/* eslint-disable max-lines-per-function */
|
|
3
4
|
|
|
4
5
|
export default class ListSdkFactory {
|
|
@@ -21,25 +22,84 @@ export default class ListSdkFactory {
|
|
|
21
22
|
return (_state$behaviours2 = state.behaviours) === null || _state$behaviours2 === void 0 ? void 0 : (_state$behaviours2$zr = _state$behaviours2.zrecord.records) === null || _state$behaviours2$zr === void 0 ? void 0 : _state$behaviours2$zr.find(r => r.id === recordId);
|
|
22
23
|
},
|
|
23
24
|
|
|
25
|
+
getContext(variableName) {
|
|
26
|
+
var _state$properties;
|
|
27
|
+
|
|
28
|
+
const {
|
|
29
|
+
departmentId,
|
|
30
|
+
viewId,
|
|
31
|
+
moduleName
|
|
32
|
+
} = state.properties;
|
|
33
|
+
const {
|
|
34
|
+
servicePrefix,
|
|
35
|
+
...context
|
|
36
|
+
} = (_state$properties = state.properties) === null || _state$properties === void 0 ? void 0 : _state$properties.context;
|
|
37
|
+
const updatedContext = { ...context,
|
|
38
|
+
departmentId,
|
|
39
|
+
viewId,
|
|
40
|
+
moduleName
|
|
41
|
+
};
|
|
42
|
+
return variableName ? context === null || context === void 0 ? void 0 : context[variableName] : updatedContext;
|
|
43
|
+
},
|
|
44
|
+
|
|
24
45
|
deleteRecord(recordId) {
|
|
46
|
+
let output = {
|
|
47
|
+
"data": [{
|
|
48
|
+
"id": recordId,
|
|
49
|
+
"Success": true,
|
|
50
|
+
"error": null
|
|
51
|
+
}]
|
|
52
|
+
};
|
|
25
53
|
dispatch({
|
|
26
54
|
type: ZLIST_DELETE_RECORD,
|
|
27
55
|
payload: {
|
|
28
56
|
recordId
|
|
29
57
|
}
|
|
30
58
|
});
|
|
59
|
+
return output;
|
|
31
60
|
},
|
|
32
61
|
|
|
62
|
+
// deleteRecords(recordIds) {
|
|
63
|
+
// dispatch({
|
|
64
|
+
// type: ZLIST_DELETE_RECORDS,
|
|
65
|
+
// payload: {
|
|
66
|
+
// recordIds
|
|
67
|
+
// }
|
|
68
|
+
// });
|
|
69
|
+
// },
|
|
33
70
|
deleteRecords(recordIds) {
|
|
71
|
+
let shouldFetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
72
|
+
let output = {
|
|
73
|
+
"data": []
|
|
74
|
+
};
|
|
75
|
+
let DELETE_ACTION = shouldFetch ? ZLIST_DELETE_RECORDS : RECORD_LOCAL_MULTIPLE_DELETE;
|
|
34
76
|
dispatch({
|
|
35
|
-
type:
|
|
77
|
+
type: DELETE_ACTION,
|
|
36
78
|
payload: {
|
|
37
79
|
recordIds
|
|
38
80
|
}
|
|
39
81
|
});
|
|
82
|
+
|
|
83
|
+
for (let recordId of recordIds) {
|
|
84
|
+
let recordUpdateDetail = {
|
|
85
|
+
"id": recordId,
|
|
86
|
+
"Success": true,
|
|
87
|
+
"error": null
|
|
88
|
+
};
|
|
89
|
+
output.data.push(recordUpdateDetail);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return output;
|
|
40
93
|
},
|
|
41
94
|
|
|
42
95
|
updateRecord(recordId, record) {
|
|
96
|
+
let output = {
|
|
97
|
+
"results": [{
|
|
98
|
+
"id": recordId,
|
|
99
|
+
"Success": true,
|
|
100
|
+
"error": null
|
|
101
|
+
}]
|
|
102
|
+
};
|
|
43
103
|
dispatch({
|
|
44
104
|
type: ZLIST_RECORD_UPDATE,
|
|
45
105
|
payload: {
|
|
@@ -47,6 +107,33 @@ export default class ListSdkFactory {
|
|
|
47
107
|
record
|
|
48
108
|
}
|
|
49
109
|
});
|
|
110
|
+
return output;
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
updateRecords(recordsMap) {
|
|
114
|
+
let shouldFetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
115
|
+
let output = {
|
|
116
|
+
"results": []
|
|
117
|
+
};
|
|
118
|
+
let UPDATE_ACTION = shouldFetch ? ZLIST_RECORD_UPDATE : RECORD_LOCAL_UPDATE;
|
|
119
|
+
|
|
120
|
+
for (let record of recordsMap) {
|
|
121
|
+
dispatch({
|
|
122
|
+
type: UPDATE_ACTION,
|
|
123
|
+
payload: {
|
|
124
|
+
recordId: record.id,
|
|
125
|
+
record: record
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
let recordUpdateDetail = {
|
|
129
|
+
"id": record.id,
|
|
130
|
+
"Success": true,
|
|
131
|
+
"error": null
|
|
132
|
+
};
|
|
133
|
+
output.results.push(recordUpdateDetail);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return output;
|
|
50
137
|
}
|
|
51
138
|
|
|
52
139
|
}
|