@zohodesk/library-platform 1.1.0-exp.2 → 1.1.1
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/list-selection/Constants.js +8 -1
- package/es/bc/list-selection/Properties.js +6 -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 +25 -32
- package/es/cc/action-icon/Properties.js +31 -0
- package/es/cc/action-location/Properties.js +9 -24
- package/es/cc/table-connected/Properties.js +11 -57
- package/es/cc/table-connected/constants/Events.js +7 -0
- package/es/cc/table-connected/constants/index.js +1 -0
- package/es/cc/table-connected/index.js +4 -0
- package/es/cc/table-list/Properties.js +44 -2
- package/es/cc/table-list/data-types/Header.js +6 -0
- package/es/desk-frameworks/table-connected/frameworks/EventHandlersFactory.js +33 -1
- package/es/desk-frameworks/table-connected/frameworks/ListSdkFactory.js +118 -2
- package/es/desk-frameworks/table-connected/frameworks/TableConnectedFactory.js +24 -9
- package/es/desk-frameworks/table-connected/frameworks/TableConnectedView.js +7 -2
- package/es/library/behaviours/list-selection/adapters/controllers/AllSelectionController.js +5 -2
- package/es/library/behaviours/list-selection/adapters/controllers/DeselectController.js +26 -0
- package/es/library/behaviours/list-selection/adapters/controllers/RangeSelectionController.js +4 -2
- package/es/library/behaviours/list-selection/adapters/controllers/SelectController.js +26 -0
- package/es/library/behaviours/list-selection/adapters/controllers/SelectionController.js +4 -2
- package/es/library/behaviours/list-selection/adapters/gateways/Repository.js +3 -3
- package/es/library/behaviours/list-selection/adapters/gateways/Service.js +8 -0
- package/es/library/behaviours/list-selection/applications/usecases/AllItemSelection.js +5 -1
- package/es/library/behaviours/list-selection/applications/usecases/Deselect.js +21 -0
- package/es/library/behaviours/list-selection/applications/usecases/ItemsSelection.js +3 -1
- package/es/library/behaviours/list-selection/applications/usecases/RangeSelection.js +3 -1
- package/es/library/behaviours/list-selection/applications/usecases/Select.js +21 -0
- package/es/library/behaviours/list-selection/domain/entities/ListItemSelection.js +86 -28
- package/es/library/behaviours/list-selection/frameworks/ActionHandlerFactory.js +5 -1
- package/es/library/custom-component/domain/entities/{Events.js → Event.js} +12 -3
- package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +4 -2
- package/es/library/dot/components/table-list/adapters/presenters/TableTranslator.js +9 -4
- package/es/library/dot/components/table-list/frameworks/ui/TableList.js +1 -2
- package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +3 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +5 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +16 -3
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/SelectAll.js +2 -1
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +6 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.js +16 -3
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowSelection.js +1 -2
- 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/{zclient-actions → client-actions/behaviour/zclient-actions}/Readme.md +14 -21
- package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/ExecuteActionBehaviourUseCase.js +1 -1
- package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/InitializeUseCase.js +2 -2
- package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/ClientAction.js +12 -4
- package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/ClientActionManager.js +9 -9
- package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/ClientActions.js +0 -4
- package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/EventMapping.js +5 -1
- package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/UIComponentMapping.js +7 -3
- package/es/platform/{zclient-actions/frameworks/ClientActionBehaviourFactory.js → client-actions/behaviour/zclient-actions/frameworks/ClientActionsBehaviourFactory.js} +1 -1
- 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/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/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/getAvailableFields.js +5 -5
- package/es/platform/{data-broker → data-source}/http-template/getClientActions.js +4 -4
- package/es/platform/{data-broker → data-source}/http-template/getSelectedFields.js +5 -5
- package/es/platform/{data-broker → data-source}/index.js +2 -2
- package/es/platform/{data-broker → data-source}/utils/transformer/CreateCf.js +1 -1
- package/es/platform/{zdata-broker/adapters/controllers/DataBrokerExecutorController.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-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 +11 -10
- package/es/platform/zlist/adapters/gateways/Service.js +8 -0
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +47 -34
- package/es/platform/zlist/adapters/presenters/translators/ColumnSizeTranslator.js +2 -2
- package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +16 -8
- package/es/platform/zlist/adapters/presenters/translators/Header.js +7 -2
- 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 -3
- 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 +50 -11
- 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 +4 -3
- package/es/bc/zdata-broker/EventHandlers.js +0 -2
- package/es/bc/zdata-broker/Symbols.js +0 -5
- package/es/desk-frameworks/table-connected/frameworks/__tests__/TableConnectedFactory.spec.js +0 -453
- package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/http-template/getAvailableFields.js +0 -86
- package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/http-template/getRecords.js +0 -81
- package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/http-template/getSelectedFields.js +0 -32
- package/es/desk-frameworks/table-connected/frameworks/__tests__/mock/data-broker/index.js +0 -11
- 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 → library/behaviours/list-selection/applications/interfaces/input/DeselectInputModel.js} +0 -0
- /package/es/{platform/zclient-actions/applications/interfaces/InputDependencies.js → library/behaviours/list-selection/applications/interfaces/input/SelectInputModel.js} +0 -0
- /package/es/{platform/zclient-actions → library/custom-component}/domain/entities/interfaces/EventModel.js +0 -0
- /package/es/{bc → platform/client-actions/bc}/zclient-actions/Constants.js +0 -0
- /package/es/{bc → platform/client-actions/bc}/zclient-actions/EventHandlers.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/AbstractController.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/ClientActionBehaviourExecutorController.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/FailureController.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/FetchStateStopController.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/MountController.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/NoContentController.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/SetClientActionsController.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/controllers/SuccessController.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/gateways/Repository.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/gateways/Service.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/adapters/presenters/Presenter.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/entities-factory/ClientActionFactory.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/entities-factory/ClientActionManagerFactory.js +0 -0
- /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/ClientActionModel.js +0 -0
- /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/ComponentPropertiesModel.js +0 -0
- /package/es/platform/{zclient-actions/applications/interfaces/gateways/IRepository.js → client-actions/behaviour/zclient-actions/applications/interfaces/ConditionFieldModel.js} +0 -0
- /package/es/platform/{zclient-actions/applications/interfaces/gateways/State.js → client-actions/behaviour/zclient-actions/applications/interfaces/ConditionModel.js} +0 -0
- /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/EventMappingModel.js +0 -0
- /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/IError.js +0 -0
- /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/applications/interfaces/InputDependencies.js +0 -0
- /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/PayloadValueMappingModel.js +0 -0
- /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/PropsMeta.js +0 -0
- /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/StrategyMeta.js +0 -0
- /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/UIComponentMappingModel.js +0 -0
- /package/es/platform/{zclient-actions/domain/entities → client-actions/behaviour/zclient-actions/applications}/interfaces/UserDetailsModel.js +0 -0
- /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/applications/interfaces/gateways/IRepository.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/gateways/IService.js +0 -0
- /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/applications/interfaces/gateways/State.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/ExecuteActionBehaviourInputModel.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/FailureInputModel.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/FetchStateStopInputModel.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/InitializeInputModel.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/NoContentInputModel.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/SetClientActionsInputModel.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/input/SuccessInputModel.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/interfaces/output/IPresenter.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/AbstractUseCase.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/FailureUseCase.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/FetchStateStopUseCase.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/NoContentUseCase.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/SetClientActionsUseCase.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/applications/usecases/SuccessUseCase.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/EventMappings.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/GetClientActionsStrategy.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/BehaviourState.js +0 -0
- /package/es/platform/{zclient-actions/domain/entities/interfaces/ClientActionsModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionModel.js} +0 -0
- /package/es/platform/{zclient-actions/domain/entities/interfaces/IAction.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionsModel.js} +0 -0
- /package/es/platform/{zclient-actions/domain/entities/interfaces/IEvent.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ComponentPropertiesModel.js} +0 -0
- /package/es/platform/{zclient-actions/domain/entities/interfaces/SubMeta.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ConditionFieldModel.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/input/ExecuteActionInputModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/ConditionModel.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/input/FailureInputModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/EventMappingModel.js} +0 -0
- /package/es/platform/{zdata-broker → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/EventModel.js +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/input/NoContentInputModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/IAction.js} +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IClientAction.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IClientActionExecuteStrategy.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IClientActionManager.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IClientActions.js +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/input/RegisterInputModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/IError.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/input/SuccessInputModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/IEvent.js} +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IEventMapping.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IEventMappings.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IPayload.js +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/domain/entities/interfaces/IUIComponentMapping.js +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/output/IPresenter.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/PayloadValueMappingModel.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/APIDetailsModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/PropsMeta.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/APITemplateModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/State.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/APITemplatesModel.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/StrategyMeta.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/BehaviourState.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/SubMeta.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/IAPITemplate.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/UIComponentMappingModel.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/IAPITemplates.js → client-actions/behaviour/zclient-actions/domain/entities/interfaces/UserDetailsModel.js} +0 -0
- /package/es/platform/{zclient-actions → client-actions/behaviour/zclient-actions}/frameworks/ActionsHandlersFactory.js +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/ITemplateHelpers.js → client-actions/components/action-event-mediator/applications/interfaces/UseCaseDependencies.js} +0 -0
- /package/es/platform/{zdata-broker/applications/interfaces/gateways/IService.js → client-actions/components/action-event-mediator/applications/interfaces/gateways/IRepository.js} +0 -0
- /package/es/platform/{zlist/adapters/presenters/translators/interfaces/FieldUiMapping.js → client-actions/components/action-event-mediator/applications/interfaces/input/PropertiesChangeUseCaseInputModel.js} +0 -0
- /package/es/platform/{zdata-broker/domain/entities/interfaces/IDataBroker.js → client-actions/components/action-event-mediator/applications/interfaces/output/IPresenter.js} +0 -0
- /package/es/platform/{zlist/adapters/presenters/translators/interfaces/PageContext.js → client-actions/components/action-event-mediator/domain/entities/interfaces/IActionLocation.js} +0 -0
- /package/es/platform/{data-broker → data-source}/http-template/deleteRecord.js +0 -0
- /package/es/platform/{data-broker → data-source}/http-template/deleteRecords.js +0 -0
- /package/es/platform/{data-broker → data-source}/http-template/getRecords.js +0 -0
- /package/es/platform/{data-broker → data-source}/http-template/updateRecord.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/AbstractController.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/AbstractUseCase.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
|
@@ -1,7 +1,9 @@
|
|
|
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
|
-
class
|
|
4
|
-
constructor(type
|
|
3
|
+
class Event {
|
|
4
|
+
constructor(type) {
|
|
5
|
+
let payload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6
|
+
|
|
5
7
|
_defineProperty(this, "type", void 0);
|
|
6
8
|
|
|
7
9
|
_defineProperty(this, "payload", void 0);
|
|
@@ -18,6 +20,13 @@ class Action {
|
|
|
18
20
|
return this.payload;
|
|
19
21
|
}
|
|
20
22
|
|
|
23
|
+
toObject() {
|
|
24
|
+
return {
|
|
25
|
+
type: this.type,
|
|
26
|
+
payload: this.payload
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
21
30
|
}
|
|
22
31
|
|
|
23
|
-
export default
|
|
32
|
+
export default Event;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import ActionIcon from "../../../../legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon";
|
|
1
|
+
import ActionIcon, { Button, FilterDropdown } from "../../../../legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon";
|
|
2
2
|
const ActionComponentMapping = {
|
|
3
|
-
'ActionIcon': ActionIcon
|
|
3
|
+
'ActionIcon': ActionIcon,
|
|
4
|
+
'Button': Button,
|
|
5
|
+
'TableFilterDropdown': FilterDropdown
|
|
4
6
|
};
|
|
5
7
|
export default ActionComponentMapping;
|
|
@@ -4,11 +4,11 @@ class TableTranslator {
|
|
|
4
4
|
|
|
5
5
|
const {
|
|
6
6
|
data,
|
|
7
|
-
selectionConfig
|
|
7
|
+
selectionConfig,
|
|
8
|
+
selection
|
|
8
9
|
} = state.properties;
|
|
9
10
|
const {
|
|
10
|
-
sortBy
|
|
11
|
-
selection
|
|
11
|
+
sortBy
|
|
12
12
|
} = (_state = state) === null || _state === void 0 ? void 0 : _state.behaviours;
|
|
13
13
|
const headers = TableTranslator.translateHeaders(data.headers, sortBy);
|
|
14
14
|
const rows = TableTranslator.translateRows(data.rows, selection, selectionConfig);
|
|
@@ -42,11 +42,16 @@ class TableTranslator {
|
|
|
42
42
|
return { ...row,
|
|
43
43
|
isSelected: selected.includes(row.id),
|
|
44
44
|
isSelectable: selected.includes(row.id) || !hasAllSelected,
|
|
45
|
-
selectionTooltip:
|
|
45
|
+
selectionTooltip: this.getSelectionTooltip(row.id, index, selected, hasAllSelected, selectionConfig)
|
|
46
46
|
};
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
static getSelectionTooltip(id, index, selected, hasAllSelected, selectionConfig) {
|
|
51
|
+
return `Record ${index + 1}`;
|
|
52
|
+
return !selected.includes(id) && hasAllSelected ? selectionConfig.limitExceedAlertMessage : `Record ${index + 1}`;
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
export default TableTranslator;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TableListProperties } from "../../../../../../cc/table-list";
|
|
2
2
|
import { createCustomComponent } from "../../../../../custom-component";
|
|
3
|
-
import ListItemSelectionBehaviourFactory from "../../../../../behaviours/list-selection/frameworks/ListItemSelectionBehaviourFactory";
|
|
4
3
|
import TableTranslator from "../../adapters/presenters/TableTranslator";
|
|
5
4
|
import TableListView from "./TableListView";
|
|
6
5
|
import EventHandlersFactory from "./EventHandlersFactory";
|
|
@@ -12,7 +11,7 @@ const TableList = createCustomComponent({
|
|
|
12
11
|
setInitialState: () => ({}),
|
|
13
12
|
transformState: TableTranslator.translate,
|
|
14
13
|
eventHandlers: EventHandlersFactory.create(),
|
|
15
|
-
behaviours: [
|
|
14
|
+
behaviours: [SortByBehaviourFactory.create(), {
|
|
16
15
|
name: 'resizerState',
|
|
17
16
|
properties: {},
|
|
18
17
|
eventHandlers: {},
|
|
@@ -26,11 +26,11 @@ function TableListView(_ref2, _ref) {
|
|
|
26
26
|
isFlexibleColumns,
|
|
27
27
|
rowCursor,
|
|
28
28
|
rowActionsConfig,
|
|
29
|
+
selection,
|
|
29
30
|
emptyStateUiType
|
|
30
31
|
} = state.properties;
|
|
31
32
|
const {
|
|
32
|
-
resizerState
|
|
33
|
-
selection
|
|
33
|
+
resizerState
|
|
34
34
|
} = state.behaviours;
|
|
35
35
|
const {
|
|
36
36
|
headers,
|
|
@@ -93,6 +93,7 @@ function renderHeader(_ref3) {
|
|
|
93
93
|
} = _ref3;
|
|
94
94
|
return /*#__PURE__*/React.createElement(Header, {
|
|
95
95
|
isSelectionEnabled: selectionConfig.isEnabled,
|
|
96
|
+
isSelectAllEnabled: selectionConfig.isSelectAllEnabled,
|
|
96
97
|
hasAllSelected: selection.hasAllSelected,
|
|
97
98
|
isResizerEnabled: resizerConfig.isEnabled,
|
|
98
99
|
currentlyResizingColumn: resizerState.currentlyResizingColumn,
|
|
@@ -9,6 +9,7 @@ import ResizerExtraSpace from "./header/ResizerExtraSpace";
|
|
|
9
9
|
function Header(_ref) {
|
|
10
10
|
let {
|
|
11
11
|
isSelectionEnabled,
|
|
12
|
+
isSelectAllEnabled,
|
|
12
13
|
hasAllSelected,
|
|
13
14
|
isResizerEnabled,
|
|
14
15
|
currentlyResizingColumn,
|
|
@@ -26,13 +27,15 @@ function Header(_ref) {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
return /*#__PURE__*/React.createElement(TableHeader, {
|
|
30
|
+
$flag_isColumnsFlexible: isFlexibleColumns,
|
|
29
31
|
$flag_padding: !isSelectionEnabled
|
|
30
|
-
}, /*#__PURE__*/React.createElement(TableHeaderRow, null, renderSelectAll(isSelectionEnabled, hasAllSelected, dispatch), renderHeaders(headers, currentlyResizingColumn, isResizerEnabled, isFlexibleColumns, dispatch), renderActionColumn(hasRowActions, rowActionsColumnWidth), renderResizerExtraSpace(isCurrentlyResizing, resizerExtraWidth)));
|
|
32
|
+
}, /*#__PURE__*/React.createElement(TableHeaderRow, null, renderSelectAll(isSelectionEnabled, isSelectAllEnabled, hasAllSelected, dispatch), renderHeaders(headers, currentlyResizingColumn, isResizerEnabled, isFlexibleColumns, dispatch), renderActionColumn(hasRowActions, rowActionsColumnWidth), renderResizerExtraSpace(isCurrentlyResizing, resizerExtraWidth)));
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
function renderSelectAll(isSelectionEnabled, hasAllSelected, dispatch) {
|
|
35
|
+
function renderSelectAll(isSelectionEnabled, isSelectAllEnabled, hasAllSelected, dispatch) {
|
|
34
36
|
return /*#__PURE__*/React.createElement(SelectAll, {
|
|
35
37
|
isSelectionEnabled: isSelectionEnabled,
|
|
38
|
+
isSelectAllEnabled: isSelectAllEnabled,
|
|
36
39
|
hasAllSelected: hasAllSelected,
|
|
37
40
|
dispatch: dispatch
|
|
38
41
|
});
|
package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TableHead from '@zohodesk-private/desk-components/es/table/TableHead/TableHead';
|
|
3
|
+
import { AlignmentOfFlex } from "../../../../../../../../cc/table-list/data-types/Header";
|
|
4
|
+
import ActionEventMediator from "../../../../../../../../platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
|
|
5
|
+
import { ActionViewGap } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
3
6
|
import HeaderText from "./HeaderText";
|
|
4
7
|
import ColumnResizer from "./ColumnResizer";
|
|
5
8
|
|
|
@@ -19,8 +22,10 @@ function HeaderData(_ref) {
|
|
|
19
22
|
text,
|
|
20
23
|
sortable,
|
|
21
24
|
width,
|
|
22
|
-
alignment
|
|
25
|
+
alignment,
|
|
26
|
+
actions
|
|
23
27
|
} = header;
|
|
28
|
+
const hasActions = Boolean(actions === null || actions === void 0 ? void 0 : actions.length);
|
|
24
29
|
return (
|
|
25
30
|
/*#__PURE__*/
|
|
26
31
|
// @ts-ignore
|
|
@@ -30,7 +35,12 @@ function HeaderData(_ref) {
|
|
|
30
35
|
$flag_flexible: isFlexibleColumns,
|
|
31
36
|
$a11yAttributes_container: {
|
|
32
37
|
'aria-sort': sortable ? sortedBy : 'none'
|
|
33
|
-
}
|
|
38
|
+
},
|
|
39
|
+
$customProps_container: hasActions ? {
|
|
40
|
+
$ui_displayMode: 'flex',
|
|
41
|
+
$ui_alignItems: 'center',
|
|
42
|
+
$ui_justifyContent: AlignmentOfFlex[alignment]
|
|
43
|
+
} : null
|
|
34
44
|
}, /*#__PURE__*/React.createElement(HeaderText, {
|
|
35
45
|
id: id,
|
|
36
46
|
name: name,
|
|
@@ -39,7 +49,10 @@ function HeaderData(_ref) {
|
|
|
39
49
|
sortedBy: sortedBy,
|
|
40
50
|
sortTooltip: sortTooltip,
|
|
41
51
|
dispatch: dispatch
|
|
42
|
-
}), /*#__PURE__*/React.createElement(
|
|
52
|
+
}), hasActions ? /*#__PURE__*/React.createElement(ActionEventMediator, {
|
|
53
|
+
actions: actions,
|
|
54
|
+
gap: ActionViewGap.SMALL
|
|
55
|
+
}) : null, /*#__PURE__*/React.createElement(ColumnResizer, {
|
|
43
56
|
isResizerEnabled: isResizerEnabled,
|
|
44
57
|
isResizing: isResizing
|
|
45
58
|
}))
|
package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/SelectAll.js
CHANGED
|
@@ -6,6 +6,7 @@ import { TableListConstants } from "../../../../../../../../cc/table-list";
|
|
|
6
6
|
function SelectAll(_ref) {
|
|
7
7
|
let {
|
|
8
8
|
isSelectionEnabled,
|
|
9
|
+
isSelectAllEnabled,
|
|
9
10
|
hasAllSelected,
|
|
10
11
|
dispatch
|
|
11
12
|
} = _ref;
|
|
@@ -14,7 +15,7 @@ function SelectAll(_ref) {
|
|
|
14
15
|
return null;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
return /*#__PURE__*/React.createElement(TableHeadFirstNode, null, /*#__PURE__*/React.createElement(CheckBox, {
|
|
18
|
+
return /*#__PURE__*/React.createElement(TableHeadFirstNode, null, isSelectAllEnabled && /*#__PURE__*/React.createElement(CheckBox, {
|
|
18
19
|
checked: hasAllSelected,
|
|
19
20
|
onChange: () => dispatch({
|
|
20
21
|
type: TableListConstants.TABLE_LIST_TOGGLE_ALL_SELECTION
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TableAction from '@zohodesk-private/desk-components/es/table/TableAction/TableAction';
|
|
3
|
-
import
|
|
3
|
+
import ActionEventMediator from "../../../../../../../../platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
|
|
4
|
+
import { ActionViewGap } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
4
5
|
export default function RowActions(_ref) {
|
|
5
6
|
let {
|
|
6
7
|
hasActions,
|
|
@@ -13,9 +14,10 @@ export default function RowActions(_ref) {
|
|
|
13
14
|
if (hasActions) {
|
|
14
15
|
return /*#__PURE__*/React.createElement(TableAction, {
|
|
15
16
|
$data_width: columnWidth
|
|
16
|
-
}, /*#__PURE__*/React.createElement(
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
}, /*#__PURE__*/React.createElement(ActionEventMediator, {
|
|
18
|
+
actions: actions,
|
|
19
|
+
renderComponentType: type,
|
|
20
|
+
gap: ActionViewGap.MEDIUM
|
|
19
21
|
}));
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TableData from '@zohodesk-private/desk-components/es/table/TableData/TableData';
|
|
3
|
+
import ActionEventMediator from "../../../../../../../../platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
|
|
4
|
+
import { ActionViewGap } from "../../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
5
|
+
import { AlignmentOfFlex } from "../../../../../../../../cc/table-list/data-types/Header";
|
|
3
6
|
import FieldComponent from "../field/FieldComponent";
|
|
4
7
|
export default function RowData(_ref) {
|
|
5
8
|
let {
|
|
@@ -10,14 +13,24 @@ export default function RowData(_ref) {
|
|
|
10
13
|
} = _ref;
|
|
11
14
|
let {
|
|
12
15
|
type,
|
|
16
|
+
actions,
|
|
13
17
|
...props
|
|
14
18
|
} = field;
|
|
19
|
+
const hasActions = Boolean(actions === null || actions === void 0 ? void 0 : actions.length);
|
|
15
20
|
return /*#__PURE__*/React.createElement(TableData, {
|
|
16
|
-
$ui_align: alignment,
|
|
21
|
+
$ui_align: hasActions ? null : alignment,
|
|
17
22
|
$data_width: width,
|
|
18
|
-
$flag_flexible: isFlexibleColumns
|
|
23
|
+
$flag_flexible: isFlexibleColumns,
|
|
24
|
+
$customProps_container: hasActions ? {
|
|
25
|
+
$ui_displayMode: 'flex',
|
|
26
|
+
$ui_alignItems: 'center',
|
|
27
|
+
$ui_justifyContent: AlignmentOfFlex[alignment]
|
|
28
|
+
} : null
|
|
19
29
|
}, /*#__PURE__*/React.createElement(FieldComponent, {
|
|
20
30
|
type: type,
|
|
21
31
|
fieldProps: props
|
|
22
|
-
})
|
|
32
|
+
}), hasActions ? /*#__PURE__*/React.createElement(ActionEventMediator, {
|
|
33
|
+
actions: actions,
|
|
34
|
+
gap: ActionViewGap.SMALL
|
|
35
|
+
}) : null);
|
|
23
36
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createCustomComponent } from "../../../../../custom-component";
|
|
2
2
|
import Properties from "../../../../../../cc/action-icon/Properties";
|
|
3
|
-
import ActionIconView from "./ActionIconView";
|
|
3
|
+
import ActionIconView, { ButtonView, FilterDropdownView } from "./ActionIconView";
|
|
4
4
|
const ActionIcon = createCustomComponent({
|
|
5
5
|
name: 'ActionIcon',
|
|
6
6
|
View: ActionIconView,
|
|
@@ -8,4 +8,20 @@ const ActionIcon = createCustomComponent({
|
|
|
8
8
|
events: [],
|
|
9
9
|
eventHandlers: {}
|
|
10
10
|
});
|
|
11
|
-
export default ActionIcon;
|
|
11
|
+
export default ActionIcon; // NOTE: This is a sample of Button action component
|
|
12
|
+
|
|
13
|
+
export const Button = createCustomComponent({
|
|
14
|
+
name: 'Button',
|
|
15
|
+
View: ButtonView,
|
|
16
|
+
properties: Properties,
|
|
17
|
+
events: [],
|
|
18
|
+
eventHandlers: {}
|
|
19
|
+
}); // NOTE: This is a sample of FilterDropdown action component
|
|
20
|
+
|
|
21
|
+
export const FilterDropdown = createCustomComponent({
|
|
22
|
+
name: 'FilterDropdown',
|
|
23
|
+
View: FilterDropdownView,
|
|
24
|
+
properties: Properties,
|
|
25
|
+
events: [],
|
|
26
|
+
eventHandlers: {}
|
|
27
|
+
});
|
|
@@ -24,7 +24,6 @@ export default function ActionIconView(_ref, ref) {
|
|
|
24
24
|
}, /*#__PURE__*/React.createElement(ActionIcon, {
|
|
25
25
|
$ui_iconName: icon,
|
|
26
26
|
$ui_hoverVariant: hoverVariant,
|
|
27
|
-
$flag_gap: true,
|
|
28
27
|
$flag_disabled: isDisabled,
|
|
29
28
|
$i18n_tooltip: label,
|
|
30
29
|
$event_onClick: !isDisabled ? () => {
|
|
@@ -33,4 +32,79 @@ export default function ActionIconView(_ref, ref) {
|
|
|
33
32
|
});
|
|
34
33
|
} : null
|
|
35
34
|
}));
|
|
35
|
+
} // NOTE: This is a sample of Button action component
|
|
36
|
+
|
|
37
|
+
export function ButtonView(_ref2, ref) {
|
|
38
|
+
let {
|
|
39
|
+
state,
|
|
40
|
+
helpers
|
|
41
|
+
} = _ref2;
|
|
42
|
+
const {
|
|
43
|
+
dispatch
|
|
44
|
+
} = helpers;
|
|
45
|
+
const {
|
|
46
|
+
sourceEvent,
|
|
47
|
+
payload
|
|
48
|
+
} = state.properties.appendToActionPayload.eventMappings[0];
|
|
49
|
+
const {
|
|
50
|
+
value
|
|
51
|
+
} = payload;
|
|
52
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
53
|
+
"data-title": value,
|
|
54
|
+
onClick: () => dispatch({
|
|
55
|
+
type: sourceEvent
|
|
56
|
+
}),
|
|
57
|
+
ref: ref
|
|
58
|
+
}, value);
|
|
59
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
60
|
+
ref: ref,
|
|
61
|
+
onClick: () => {
|
|
62
|
+
dispatch({
|
|
63
|
+
type: sourceEvent
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}, value);
|
|
67
|
+
} // NOTE: This is a sample of FilterDropdown action component
|
|
68
|
+
|
|
69
|
+
export function FilterDropdownView(_ref3, ref) {
|
|
70
|
+
let {
|
|
71
|
+
state,
|
|
72
|
+
helpers
|
|
73
|
+
} = _ref3;
|
|
74
|
+
const {
|
|
75
|
+
dispatch
|
|
76
|
+
} = helpers;
|
|
77
|
+
const {
|
|
78
|
+
options,
|
|
79
|
+
isMultiselectable
|
|
80
|
+
} = state.properties;
|
|
81
|
+
const {
|
|
82
|
+
sourceEvent,
|
|
83
|
+
payload
|
|
84
|
+
} = state.properties.appendToActionPayload.eventMappings[0];
|
|
85
|
+
const {
|
|
86
|
+
fieldName: value
|
|
87
|
+
} = payload;
|
|
88
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
89
|
+
"data-title": value,
|
|
90
|
+
onClick: () => dispatch({
|
|
91
|
+
type: sourceEvent
|
|
92
|
+
}),
|
|
93
|
+
ref: ref
|
|
94
|
+
}, value);
|
|
95
|
+
return /*#__PURE__*/React.createElement("select", {
|
|
96
|
+
"data-title": '',
|
|
97
|
+
ref: ref,
|
|
98
|
+
onChange: e => dispatch({
|
|
99
|
+
type: sourceEvent,
|
|
100
|
+
payload: {
|
|
101
|
+
sourcePayload: {
|
|
102
|
+
selectedValue: e.target.value
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
}, options.map((option, index) => /*#__PURE__*/React.createElement("option", {
|
|
107
|
+
key: index,
|
|
108
|
+
value: option.value
|
|
109
|
+
}, option.label)));
|
|
36
110
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Tag from '@zohodesk/components/es/Tag/Tag';
|
|
3
3
|
export function LookupFieldView(_ref, ref) {
|
|
4
4
|
let {
|
|
5
5
|
state
|
|
@@ -8,11 +8,12 @@ export function LookupFieldView(_ref, ref) {
|
|
|
8
8
|
name,
|
|
9
9
|
photoURL
|
|
10
10
|
} = state.properties.value;
|
|
11
|
-
return /*#__PURE__*/React.createElement(
|
|
11
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
12
12
|
getRef: ref,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
text: name,
|
|
14
|
+
hasAvatar: true,
|
|
15
|
+
initial: name,
|
|
16
|
+
imageURL: photoURL,
|
|
17
|
+
tooltip: name
|
|
17
18
|
});
|
|
18
19
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
This package contains all elements regarding the CLIENT ACTIONS module.
|
|
2
|
+
|
|
3
|
+
The module contains three main parts
|
|
4
|
+
|
|
5
|
+
1. Behaviour - Contains the behaviours exposed by Client Actions
|
|
6
|
+
|
|
7
|
+
2. Components - Contains the component exposed by Client Actions
|
|
8
|
+
|
|
9
|
+
3. Translator - Contains the translators exposed by Client Actions
|
|
10
|
+
|
|
11
|
+
-----------------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
1. Behaviour
|
|
14
|
+
a. ClientActionBehaviour -> This behaviour is used to fetch the required client actions and returns the value to state
|
|
15
|
+
|
|
16
|
+
2. Components
|
|
17
|
+
a. ActionEventMediator -> The main component that is exposed and need to be used by the components in order to render and execute client actions
|
|
18
|
+
- Inputs : actions, renderComponentType
|
|
19
|
+
- Renders the rendercomponent based on the value (default renders row actions)
|
|
20
|
+
|
|
21
|
+
b. RowActionsRenderer -> This component renders the actions in Row wise.
|
|
22
|
+
|
|
23
|
+
c. DynamicActionComponent -> Renders the action component dynamically
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
3. Translators
|
|
27
|
+
a. action-translator -> the main translator the is used to translate the client actions, resolve them and get them in component action object format
|
|
28
|
+
|
|
29
|
+
b. condition-resolver -> Resolved the conditions cases in the client actiosn. Returns only the actions that are passed
|
|
30
|
+
|
|
31
|
+
c. context-resover -> Resolved the context in all keys of client actions.
|
|
@@ -1,38 +1,31 @@
|
|
|
1
1
|
Client Actions Behaviour
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
This behaviour will allows your library components to fetch client actions for your users.
|
|
5
4
|
|
|
6
5
|
# Implementation
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
ClientActionsBehaviourFactory.create({ getClientActions: dataSource.httpTemplates.getClientActions })
|
|
9
8
|
|
|
10
9
|
This above class should be implemeted in the behaviour props of your library components
|
|
11
10
|
|
|
12
|
-
The user needs to passdown the
|
|
11
|
+
The user needs to passdown the dataSource into the behaviour in the format,
|
|
13
12
|
|
|
14
13
|
1. getClientActions => Client Actions GET data broker template
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
15
|
# Integration inside component
|
|
19
16
|
|
|
20
|
-
We need to initialize or mount our behaviour with the component. Refer the eg used in List component below
|
|
17
|
+
We need to initialize or mount our behaviour with the component. Refer the eg used in List component below
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
private createClientActionsFetchAction(): ActionModel {
|
|
20
|
+
const props = this.createApiProps();
|
|
21
|
+
return {
|
|
22
|
+
type: CLIENTACTION_BEHAVIOUR_EXECUTE,
|
|
23
|
+
payload: {
|
|
24
|
+
actionName: 'getClientActions',
|
|
25
|
+
props,
|
|
26
|
+
apiName: 'clientActions'
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
33
30
|
|
|
34
31
|
The function createClientActionsFetchAction is called at Library component mount, which will mount client action behaviour and do the necessary processing.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
@@ -25,7 +25,7 @@ class ExecuteActionBehaviourUseCase extends AbstractUseCase {
|
|
|
25
25
|
presenter.updateClientAction(recordManager.toObject());
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
dispatch(recordManager.
|
|
28
|
+
dispatch(recordManager.createDataSourceExecuteEvent(props, actionName, metaData));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
-
import {
|
|
2
|
+
import { DATA_SOURCE_REGISTER } from "../../../../../../bc/zdata-source/Constants";
|
|
3
3
|
export default class InitializeUseCase extends AbstractUseCase {
|
|
4
4
|
execute(input) {
|
|
5
5
|
const {
|
|
@@ -7,7 +7,7 @@ export default class InitializeUseCase extends AbstractUseCase {
|
|
|
7
7
|
dispatch
|
|
8
8
|
} = input;
|
|
9
9
|
dispatch({
|
|
10
|
-
type:
|
|
10
|
+
type: DATA_SOURCE_REGISTER,
|
|
11
11
|
payload: {
|
|
12
12
|
apiTemplates
|
|
13
13
|
}
|
|
@@ -7,7 +7,7 @@ export default class ClientAction {
|
|
|
7
7
|
|
|
8
8
|
_defineProperty(this, "name", void 0);
|
|
9
9
|
|
|
10
|
-
_defineProperty(this, "
|
|
10
|
+
_defineProperty(this, "component", void 0);
|
|
11
11
|
|
|
12
12
|
_defineProperty(this, "location", void 0);
|
|
13
13
|
|
|
@@ -23,9 +23,13 @@ export default class ClientAction {
|
|
|
23
23
|
|
|
24
24
|
_defineProperty(this, "createdBy", void 0);
|
|
25
25
|
|
|
26
|
+
_defineProperty(this, "conditions", void 0);
|
|
27
|
+
|
|
28
|
+
_defineProperty(this, "conditionMeta", void 0);
|
|
29
|
+
|
|
26
30
|
this.id = clientActionObj.id;
|
|
27
31
|
this.name = clientActionObj.name;
|
|
28
|
-
this.
|
|
32
|
+
this.component = clientActionObj.component;
|
|
29
33
|
this.location = clientActionObj.location;
|
|
30
34
|
this.uiComponentMapping = new UIComponentMapping(clientActionObj.uiComponentMapping);
|
|
31
35
|
this.modules = clientActionObj.modules;
|
|
@@ -33,20 +37,24 @@ export default class ClientAction {
|
|
|
33
37
|
this.createdTime = clientActionObj.createdTime;
|
|
34
38
|
this.modifiedBy = clientActionObj.modifiedBy;
|
|
35
39
|
this.createdBy = clientActionObj.createdBy;
|
|
40
|
+
this.conditions = clientActionObj.conditions;
|
|
41
|
+
this.conditionMeta = clientActionObj.conditions;
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
toObject() {
|
|
39
45
|
return {
|
|
40
46
|
id: this.id,
|
|
41
47
|
name: this.name,
|
|
42
|
-
|
|
48
|
+
component: this.component,
|
|
43
49
|
location: this.location,
|
|
44
50
|
uiComponentMapping: this.uiComponentMapping.toObject(),
|
|
45
51
|
modules: this.modules,
|
|
46
52
|
modifiedTime: this.modifiedTime,
|
|
47
53
|
createdTime: this.createdTime,
|
|
48
54
|
modifiedBy: this.modifiedBy,
|
|
49
|
-
createdBy: this.createdBy
|
|
55
|
+
createdBy: this.createdBy,
|
|
56
|
+
conditions: this.conditions,
|
|
57
|
+
conditionsMeta: this.conditionMeta
|
|
50
58
|
};
|
|
51
59
|
}
|
|
52
60
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DATA_SOURCE_FAILURE, DATA_SOURCE_NO_CONTENT, DATA_SOURCE_SUCCESS } from "../../../../../../bc/zdata-source/Symbols";
|
|
2
|
+
import { DATA_SOURCE_EXECUTE } from "../../../../../../bc/zdata-source/Constants";
|
|
3
3
|
import { CLIENTACTION_EXECUTE_FAIL_CALLBACK, CLIENTACTION_EXECUTE_SUCCESS_CALLBACK, CLIENTACTION_EXECUTE_SUCCESS_NO_CONTENT_CALLBACK, ClientActionApiActionName } from "../../../../bc/zclient-actions/Constants";
|
|
4
4
|
import GetClientActionsStrategy from "./GetClientActionsStrategy";
|
|
5
5
|
const clientActionExecuteStrategiesMap = {
|
|
@@ -10,7 +10,7 @@ export default class ClientActionManager {
|
|
|
10
10
|
this.clientActions = clientActions;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
createDataSourceMeta(_ref) {
|
|
14
14
|
let {
|
|
15
15
|
actionName,
|
|
16
16
|
successMeta,
|
|
@@ -19,15 +19,15 @@ export default class ClientActionManager {
|
|
|
19
19
|
} = _ref;
|
|
20
20
|
return {
|
|
21
21
|
actionName,
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
22
|
+
[DATA_SOURCE_NO_CONTENT]: successNoContentMeta,
|
|
23
|
+
[DATA_SOURCE_FAILURE]: failureMeta,
|
|
24
|
+
[DATA_SOURCE_SUCCESS]: successMeta
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
createDataSourceExecuteEvent(props, actionName, metaData) {
|
|
29
29
|
return {
|
|
30
|
-
type:
|
|
30
|
+
type: DATA_SOURCE_EXECUTE,
|
|
31
31
|
payload: {
|
|
32
32
|
props,
|
|
33
33
|
actionName
|
|
@@ -59,7 +59,7 @@ export default class ClientActionManager {
|
|
|
59
59
|
type: CLIENTACTION_EXECUTE_FAIL_CALLBACK,
|
|
60
60
|
metaData: clientActionExecuteStrategyMeta
|
|
61
61
|
};
|
|
62
|
-
return this.
|
|
62
|
+
return this.createDataSourceMeta({
|
|
63
63
|
actionName,
|
|
64
64
|
successNoContentMeta,
|
|
65
65
|
failureMeta,
|
|
@@ -10,10 +10,13 @@ export default class EventMapping {
|
|
|
10
10
|
|
|
11
11
|
_defineProperty(this, "payloadValueMapping", void 0);
|
|
12
12
|
|
|
13
|
+
_defineProperty(this, "payloadValueMappingMeta", void 0);
|
|
14
|
+
|
|
13
15
|
this.id = eventMappingObj.id;
|
|
14
16
|
this.sourceEvent = eventMappingObj.sourceEvent;
|
|
15
17
|
this.targetEvent = eventMappingObj.targetEvent;
|
|
16
18
|
this.payloadValueMapping = eventMappingObj.payloadValueMapping;
|
|
19
|
+
this.payloadValueMappingMeta = eventMappingObj.payloadValueMapping;
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
toObject() {
|
|
@@ -21,7 +24,8 @@ export default class EventMapping {
|
|
|
21
24
|
id: this.id,
|
|
22
25
|
sourceEvent: this.sourceEvent,
|
|
23
26
|
targetEvent: this.targetEvent,
|
|
24
|
-
payloadValueMapping: this.payloadValueMapping
|
|
27
|
+
payloadValueMapping: this.payloadValueMapping,
|
|
28
|
+
payloadValueMappingMeta: this.payloadValueMappingMeta
|
|
25
29
|
};
|
|
26
30
|
}
|
|
27
31
|
|