@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
package/es/desk-frameworks/table-connected/frameworks/__tests__/TableConnectedFactory.spec.js
DELETED
|
@@ -1,453 +0,0 @@
|
|
|
1
|
-
import fetchMock from 'jest-fetch-mock';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { render, screen, waitFor } from '@testing-library/react';
|
|
4
|
-
import '@testing-library/jest-dom';
|
|
5
|
-
import TableConnectedFactory from "../TableConnectedFactory";
|
|
6
|
-
import dataBroker from "./mock/data-broker";
|
|
7
|
-
describe('Table Connected Factory', () => {
|
|
8
|
-
fetchMock.enableMocks();
|
|
9
|
-
it('should mount the component and check the rendering', () => {
|
|
10
|
-
const TableConnected = TableConnectedFactory.create({
|
|
11
|
-
name: 'TableConnected'
|
|
12
|
-
});
|
|
13
|
-
let {
|
|
14
|
-
container
|
|
15
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, null));
|
|
16
|
-
expect(container).toBeInTheDocument();
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
describe('Table header', () => {
|
|
20
|
-
fetchMock.enableMocks();
|
|
21
|
-
it('Number of Columns', async () => {
|
|
22
|
-
const TableConnected = TableConnectedFactory.create({
|
|
23
|
-
name: 'TableConnected',
|
|
24
|
-
dataBroker
|
|
25
|
-
});
|
|
26
|
-
const filter = {
|
|
27
|
-
viewId: '',
|
|
28
|
-
orgId: '',
|
|
29
|
-
departmentId: ''
|
|
30
|
-
};
|
|
31
|
-
let {
|
|
32
|
-
container
|
|
33
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
34
|
-
filter: filter,
|
|
35
|
-
limit: 25
|
|
36
|
-
}));
|
|
37
|
-
await waitFor(() => {
|
|
38
|
-
const rows = container.querySelectorAll('th');
|
|
39
|
-
expect(rows.length).toBe(8);
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
it('Field names', async () => {
|
|
43
|
-
const TableConnected = TableConnectedFactory.create({
|
|
44
|
-
name: 'TableConnected',
|
|
45
|
-
dataBroker
|
|
46
|
-
});
|
|
47
|
-
const filter = {
|
|
48
|
-
viewId: '',
|
|
49
|
-
orgId: '',
|
|
50
|
-
departmentId: ''
|
|
51
|
-
};
|
|
52
|
-
let {
|
|
53
|
-
container
|
|
54
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
55
|
-
filter: filter,
|
|
56
|
-
limit: 25
|
|
57
|
-
}));
|
|
58
|
-
await waitFor(() => {
|
|
59
|
-
const rows = container.querySelectorAll('th');
|
|
60
|
-
const columnName = rows[3];
|
|
61
|
-
expect(columnName.textContent).toBe("Is Admin");
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
it('Field order', async () => {
|
|
65
|
-
const TableConnected = TableConnectedFactory.create({
|
|
66
|
-
name: 'TableConnected',
|
|
67
|
-
dataBroker
|
|
68
|
-
});
|
|
69
|
-
const filter = {
|
|
70
|
-
viewId: '',
|
|
71
|
-
orgId: '',
|
|
72
|
-
departmentId: ''
|
|
73
|
-
};
|
|
74
|
-
let {
|
|
75
|
-
container
|
|
76
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
77
|
-
filter: filter,
|
|
78
|
-
limit: 25
|
|
79
|
-
}));
|
|
80
|
-
await waitFor(() => {
|
|
81
|
-
const rows = container.querySelectorAll('th');
|
|
82
|
-
const rowsText = [];
|
|
83
|
-
rows.forEach(row => {
|
|
84
|
-
rowsText.push(row.textContent);
|
|
85
|
-
});
|
|
86
|
-
const columnOrder = ['ID', 'Name', 'Email', 'Is Admin', 'Created Time', 'Created By', 'Owner', 'URL'];
|
|
87
|
-
expect(rowsText).toStrictEqual(columnOrder);
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
describe('Table body', () => {
|
|
92
|
-
fetchMock.enableMocks();
|
|
93
|
-
it('The Table should have 5 records after fetch', async () => {
|
|
94
|
-
const TableConnected = TableConnectedFactory.create({
|
|
95
|
-
name: 'TableConnected',
|
|
96
|
-
dataBroker
|
|
97
|
-
});
|
|
98
|
-
const filter = {
|
|
99
|
-
viewId: '',
|
|
100
|
-
orgId: '',
|
|
101
|
-
departmentId: ''
|
|
102
|
-
};
|
|
103
|
-
let {
|
|
104
|
-
container
|
|
105
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
106
|
-
filter: filter,
|
|
107
|
-
limit: 5
|
|
108
|
-
}));
|
|
109
|
-
await waitFor(() => {
|
|
110
|
-
var _container$querySelec;
|
|
111
|
-
|
|
112
|
-
const rows = (_container$querySelec = container.querySelector('tbody')) === null || _container$querySelec === void 0 ? void 0 : _container$querySelec.childNodes;
|
|
113
|
-
expect(rows.length).toBe(5);
|
|
114
|
-
});
|
|
115
|
-
}); // fit('The Table should render 5 records on scroll to the end', async () => {
|
|
116
|
-
// const TableConnected = TableConnectedFactory.create({ name: 'TableConnected', dataBroker });
|
|
117
|
-
// const filter = { viewId: '', orgId: '', departmentId: '' };
|
|
118
|
-
// let { container } = render(
|
|
119
|
-
// <div id="tableContainer" style={{ height: '300px', width: '100%' }}>
|
|
120
|
-
// <TableConnected filter={filter} limit={15} />
|
|
121
|
-
// </div>
|
|
122
|
-
// );
|
|
123
|
-
// await waitFor(() => {
|
|
124
|
-
// const rows = container.querySelector('tbody')?.childNodes;
|
|
125
|
-
// expect(rows?.length).toBe(15);
|
|
126
|
-
// });
|
|
127
|
-
// const scrollableElement = container.querySelector('table');
|
|
128
|
-
// if (scrollableElement) {
|
|
129
|
-
// Object.defineProperty(scrollableElement, 'scrollHeight', { value: 2000, writable: true });
|
|
130
|
-
// Object.defineProperty(scrollableElement, 'clientHeight', { value: 300, writable: true });
|
|
131
|
-
// // fireEvent.scroll(scrollableElement, { target: { scrollTop: 2000 } });
|
|
132
|
-
// // fireEvent.scroll(scrollableElement, new Event('scroll'));
|
|
133
|
-
// scrollableElement.scrollTop = 2000;
|
|
134
|
-
// scrollableElement.dispatchEvent(new Event('scroll'));
|
|
135
|
-
// }
|
|
136
|
-
// });
|
|
137
|
-
// });
|
|
138
|
-
});
|
|
139
|
-
describe('Field cases', () => {
|
|
140
|
-
fetchMock.enableMocks();
|
|
141
|
-
it('Field type order', async () => {
|
|
142
|
-
const TableConnected = TableConnectedFactory.create({
|
|
143
|
-
name: 'TableConnected',
|
|
144
|
-
dataBroker
|
|
145
|
-
});
|
|
146
|
-
const uiMapping = {
|
|
147
|
-
fields: {
|
|
148
|
-
"cf_isAdmin": "Switch"
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
const filter = {
|
|
152
|
-
viewId: '',
|
|
153
|
-
orgId: '',
|
|
154
|
-
departmentId: ''
|
|
155
|
-
};
|
|
156
|
-
let {
|
|
157
|
-
container
|
|
158
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
159
|
-
uiMapping: uiMapping,
|
|
160
|
-
filter: filter,
|
|
161
|
-
limit: 1
|
|
162
|
-
}));
|
|
163
|
-
await waitFor(() => {
|
|
164
|
-
const rows = container.querySelectorAll('td');
|
|
165
|
-
const rowsText = [];
|
|
166
|
-
rows.forEach(row => {
|
|
167
|
-
rowsText.push(row.textContent);
|
|
168
|
-
});
|
|
169
|
-
const columnOrder = ['1', 'Record 1', 'odin@asgard@thundermail.com', "", '2025-01-13T07:01:50.686Z', 'ODOdin ', 'GodSpecies', 'https://en.wikipedia.org/wiki/Asgard'];
|
|
170
|
-
expect(rowsText).toStrictEqual(columnOrder);
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
it('Text rendered', async () => {
|
|
174
|
-
const TableConnected = TableConnectedFactory.create({
|
|
175
|
-
name: 'TableConnected',
|
|
176
|
-
dataBroker: dataBroker
|
|
177
|
-
});
|
|
178
|
-
const uiMapping = {
|
|
179
|
-
fields: {
|
|
180
|
-
"cf_isAdmin": "Switch"
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
const filter = {
|
|
184
|
-
viewId: '',
|
|
185
|
-
orgId: '',
|
|
186
|
-
departmentId: ''
|
|
187
|
-
};
|
|
188
|
-
let {
|
|
189
|
-
container
|
|
190
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
191
|
-
uiMapping: uiMapping,
|
|
192
|
-
filter: filter,
|
|
193
|
-
limit: 1
|
|
194
|
-
}));
|
|
195
|
-
await waitFor(() => {
|
|
196
|
-
const rows = container.querySelectorAll('td');
|
|
197
|
-
const rowsText = [];
|
|
198
|
-
rows.forEach(row => {
|
|
199
|
-
rowsText.push(row.textContent);
|
|
200
|
-
});
|
|
201
|
-
const textEle = "ODOdin ";
|
|
202
|
-
expect(rowsText[5]).toStrictEqual(textEle);
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
it('Switch rendered', async () => {
|
|
206
|
-
const TableConnected = TableConnectedFactory.create({
|
|
207
|
-
name: 'TableConnected',
|
|
208
|
-
dataBroker: dataBroker
|
|
209
|
-
});
|
|
210
|
-
const uiMapping = {
|
|
211
|
-
fields: {
|
|
212
|
-
"cf_isAdmin": "Switch"
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
const filter = {
|
|
216
|
-
viewId: '',
|
|
217
|
-
orgId: '',
|
|
218
|
-
departmentId: ''
|
|
219
|
-
};
|
|
220
|
-
let {
|
|
221
|
-
container
|
|
222
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
223
|
-
uiMapping: uiMapping,
|
|
224
|
-
filter: filter,
|
|
225
|
-
limit: 25
|
|
226
|
-
}));
|
|
227
|
-
await waitFor(() => {
|
|
228
|
-
expect(screen.getByText('Is Admin')).toBeInTheDocument();
|
|
229
|
-
const switchField = screen.getAllByRole('switch');
|
|
230
|
-
const firstSwitch = switchField[0];
|
|
231
|
-
expect(firstSwitch).toBeInTheDocument();
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
it('Switch checked', async () => {
|
|
235
|
-
const TableConnected = TableConnectedFactory.create({
|
|
236
|
-
name: 'TableConnected',
|
|
237
|
-
dataBroker: dataBroker
|
|
238
|
-
});
|
|
239
|
-
const uiMapping = {
|
|
240
|
-
fields: {
|
|
241
|
-
"cf_isAdmin": "Switch"
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
const filter = {
|
|
245
|
-
viewId: '',
|
|
246
|
-
orgId: '',
|
|
247
|
-
departmentId: ''
|
|
248
|
-
};
|
|
249
|
-
let {
|
|
250
|
-
container
|
|
251
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
252
|
-
uiMapping: uiMapping,
|
|
253
|
-
filter: filter,
|
|
254
|
-
limit: 25
|
|
255
|
-
}));
|
|
256
|
-
await waitFor(() => {
|
|
257
|
-
expect(screen.getByText('Is Admin')).toBeInTheDocument();
|
|
258
|
-
const switchField = screen.getAllByRole('switch');
|
|
259
|
-
const firstSwitch = switchField[1];
|
|
260
|
-
const isChecked = firstSwitch.getAttribute('aria-checked');
|
|
261
|
-
expect(isChecked).toBe('true');
|
|
262
|
-
});
|
|
263
|
-
});
|
|
264
|
-
it('Switch unchecked', async () => {
|
|
265
|
-
const TableConnected = TableConnectedFactory.create({
|
|
266
|
-
name: 'TableConnected',
|
|
267
|
-
dataBroker: dataBroker
|
|
268
|
-
});
|
|
269
|
-
const uiMapping = {
|
|
270
|
-
fields: {
|
|
271
|
-
"cf_isAdmin": "Switch"
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
const filter = {
|
|
275
|
-
viewId: '',
|
|
276
|
-
orgId: '',
|
|
277
|
-
departmentId: ''
|
|
278
|
-
};
|
|
279
|
-
let {
|
|
280
|
-
container
|
|
281
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
282
|
-
uiMapping: uiMapping,
|
|
283
|
-
filter: filter,
|
|
284
|
-
limit: 25
|
|
285
|
-
}));
|
|
286
|
-
await waitFor(() => {
|
|
287
|
-
expect(screen.getByText('Is Admin')).toBeInTheDocument();
|
|
288
|
-
const switchField = screen.getAllByRole('switch');
|
|
289
|
-
const firstSwitch = switchField[0];
|
|
290
|
-
const isChecked = firstSwitch.getAttribute('aria-checked');
|
|
291
|
-
expect(isChecked).toBe('false');
|
|
292
|
-
});
|
|
293
|
-
});
|
|
294
|
-
it('Checkbox rendered', async () => {
|
|
295
|
-
const TableConnected = TableConnectedFactory.create({
|
|
296
|
-
name: 'TableConnected',
|
|
297
|
-
dataBroker: dataBroker
|
|
298
|
-
});
|
|
299
|
-
const filter = {
|
|
300
|
-
viewId: '',
|
|
301
|
-
orgId: '',
|
|
302
|
-
departmentId: ''
|
|
303
|
-
};
|
|
304
|
-
let {
|
|
305
|
-
container
|
|
306
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
307
|
-
filter: filter,
|
|
308
|
-
limit: 25
|
|
309
|
-
}));
|
|
310
|
-
await waitFor(() => {
|
|
311
|
-
expect(screen.getByText('Is Admin')).toBeInTheDocument();
|
|
312
|
-
const checkboxField = screen.getAllByRole('checkbox');
|
|
313
|
-
const firstCheckbox = checkboxField[0];
|
|
314
|
-
expect(firstCheckbox).toBeInTheDocument();
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
it('Checkbox checked', async () => {
|
|
318
|
-
const TableConnected = TableConnectedFactory.create({
|
|
319
|
-
name: 'TableConnected',
|
|
320
|
-
dataBroker: dataBroker
|
|
321
|
-
});
|
|
322
|
-
const filter = {
|
|
323
|
-
viewId: '',
|
|
324
|
-
orgId: '',
|
|
325
|
-
departmentId: ''
|
|
326
|
-
};
|
|
327
|
-
let {
|
|
328
|
-
container
|
|
329
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
330
|
-
filter: filter,
|
|
331
|
-
limit: 25
|
|
332
|
-
}));
|
|
333
|
-
await waitFor(() => {
|
|
334
|
-
expect(screen.getByText('Is Admin')).toBeInTheDocument();
|
|
335
|
-
const checkboxField = screen.getAllByRole('checkbox');
|
|
336
|
-
const firstCheckbox = checkboxField[1];
|
|
337
|
-
const isChecked = firstCheckbox.checked;
|
|
338
|
-
expect(isChecked).toBe(true);
|
|
339
|
-
});
|
|
340
|
-
});
|
|
341
|
-
it('Checkbox unchecked', async () => {
|
|
342
|
-
const TableConnected = TableConnectedFactory.create({
|
|
343
|
-
name: 'TableConnected',
|
|
344
|
-
dataBroker: dataBroker
|
|
345
|
-
});
|
|
346
|
-
const filter = {
|
|
347
|
-
viewId: '',
|
|
348
|
-
orgId: '',
|
|
349
|
-
departmentId: ''
|
|
350
|
-
};
|
|
351
|
-
let {
|
|
352
|
-
container
|
|
353
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
354
|
-
filter: filter,
|
|
355
|
-
limit: 25
|
|
356
|
-
}));
|
|
357
|
-
await waitFor(() => {
|
|
358
|
-
expect(screen.getByText('Is Admin')).toBeInTheDocument();
|
|
359
|
-
const checkboxField = screen.getAllByRole('checkbox');
|
|
360
|
-
const firstCheckbox = checkboxField[0];
|
|
361
|
-
const isChecked = firstCheckbox.checked;
|
|
362
|
-
expect(isChecked).toBe(false);
|
|
363
|
-
});
|
|
364
|
-
});
|
|
365
|
-
it('Tags rendered', async () => {
|
|
366
|
-
const TableConnected = TableConnectedFactory.create({
|
|
367
|
-
name: 'TableConnected',
|
|
368
|
-
dataBroker: dataBroker
|
|
369
|
-
});
|
|
370
|
-
const filter = {
|
|
371
|
-
viewId: '',
|
|
372
|
-
orgId: '',
|
|
373
|
-
departmentId: ''
|
|
374
|
-
};
|
|
375
|
-
let {
|
|
376
|
-
container
|
|
377
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
378
|
-
filter: filter,
|
|
379
|
-
limit: 25
|
|
380
|
-
}));
|
|
381
|
-
await waitFor(() => {
|
|
382
|
-
expect(screen.getByText('Owner')).toBeInTheDocument();
|
|
383
|
-
const rows = container.querySelectorAll('[data-title="God"]');
|
|
384
|
-
expect(rows[0]).toBeInTheDocument();
|
|
385
|
-
});
|
|
386
|
-
});
|
|
387
|
-
it('Avatar rendered', async () => {
|
|
388
|
-
const TableConnected = TableConnectedFactory.create({
|
|
389
|
-
name: 'TableConnected',
|
|
390
|
-
dataBroker: dataBroker
|
|
391
|
-
});
|
|
392
|
-
const filter = {
|
|
393
|
-
viewId: '',
|
|
394
|
-
orgId: '',
|
|
395
|
-
departmentId: ''
|
|
396
|
-
};
|
|
397
|
-
let {
|
|
398
|
-
container
|
|
399
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
400
|
-
filter: filter,
|
|
401
|
-
limit: 25
|
|
402
|
-
}));
|
|
403
|
-
await waitFor(() => {
|
|
404
|
-
expect(screen.getByText('Created By')).toBeInTheDocument();
|
|
405
|
-
const rows = container.querySelectorAll('[data-title="Odin "]');
|
|
406
|
-
expect(rows[0]).toBeInTheDocument();
|
|
407
|
-
});
|
|
408
|
-
});
|
|
409
|
-
it('Email rendered', async () => {
|
|
410
|
-
const TableConnected = TableConnectedFactory.create({
|
|
411
|
-
name: 'TableConnected',
|
|
412
|
-
dataBroker: dataBroker
|
|
413
|
-
});
|
|
414
|
-
const filter = {
|
|
415
|
-
viewId: '',
|
|
416
|
-
orgId: '',
|
|
417
|
-
departmentId: ''
|
|
418
|
-
};
|
|
419
|
-
let {
|
|
420
|
-
container
|
|
421
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
422
|
-
filter: filter,
|
|
423
|
-
limit: 25
|
|
424
|
-
}));
|
|
425
|
-
await waitFor(() => {
|
|
426
|
-
expect(screen.getByText('Email')).toBeInTheDocument();
|
|
427
|
-
const rows = container.querySelectorAll('[data-title="odin@asgard@thundermail.com"]');
|
|
428
|
-
expect(rows[0]).toBeInTheDocument();
|
|
429
|
-
});
|
|
430
|
-
});
|
|
431
|
-
it('URL rendered', async () => {
|
|
432
|
-
const TableConnected = TableConnectedFactory.create({
|
|
433
|
-
name: 'TableConnected',
|
|
434
|
-
dataBroker: dataBroker
|
|
435
|
-
});
|
|
436
|
-
const filter = {
|
|
437
|
-
viewId: '',
|
|
438
|
-
orgId: '',
|
|
439
|
-
departmentId: ''
|
|
440
|
-
};
|
|
441
|
-
let {
|
|
442
|
-
container
|
|
443
|
-
} = render( /*#__PURE__*/React.createElement(TableConnected, {
|
|
444
|
-
filter: filter,
|
|
445
|
-
limit: 25
|
|
446
|
-
}));
|
|
447
|
-
await waitFor(() => {
|
|
448
|
-
expect(screen.getByText('URL')).toBeInTheDocument();
|
|
449
|
-
const rows = container.querySelectorAll('[data-title="https://en.wikipedia.org/wiki/Asgard"]');
|
|
450
|
-
expect(rows[0]).toBeInTheDocument();
|
|
451
|
-
});
|
|
452
|
-
});
|
|
453
|
-
});
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
let getAvailableFields = {
|
|
2
|
-
name: 'availableFields',
|
|
3
|
-
api: '/api/v1/support-email-address/availableFields',
|
|
4
|
-
getResponse: _ref => {
|
|
5
|
-
let {
|
|
6
|
-
payload,
|
|
7
|
-
params
|
|
8
|
-
} = _ref;
|
|
9
|
-
return {
|
|
10
|
-
fields: availableFields
|
|
11
|
-
};
|
|
12
|
-
},
|
|
13
|
-
parameters: `{
|
|
14
|
-
"departmentId":"{{departmentId}}"
|
|
15
|
-
}`,
|
|
16
|
-
type: 'GET',
|
|
17
|
-
transformer: res => res.fields,
|
|
18
|
-
properties: {
|
|
19
|
-
departmentId: {
|
|
20
|
-
required: true,
|
|
21
|
-
typeMetadata: {
|
|
22
|
-
schema: {
|
|
23
|
-
type: 'string'
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export default getAvailableFields;
|
|
30
|
-
const availableFields = [{
|
|
31
|
-
name: 'id',
|
|
32
|
-
id: 'id',
|
|
33
|
-
isSortable: false,
|
|
34
|
-
displayLabel: 'ID',
|
|
35
|
-
isCustomField: false,
|
|
36
|
-
type: 'Text'
|
|
37
|
-
}, {
|
|
38
|
-
name: 'name',
|
|
39
|
-
id: 'name',
|
|
40
|
-
isSortable: false,
|
|
41
|
-
displayLabel: 'Name',
|
|
42
|
-
isCustomField: false,
|
|
43
|
-
type: 'Text'
|
|
44
|
-
}, {
|
|
45
|
-
name: 'email',
|
|
46
|
-
id: 'email',
|
|
47
|
-
isSortable: false,
|
|
48
|
-
displayLabel: 'Email',
|
|
49
|
-
isCustomField: false,
|
|
50
|
-
type: 'Email'
|
|
51
|
-
}, {
|
|
52
|
-
name: 'cf_isAdmin',
|
|
53
|
-
id: 'cf_isAdmin',
|
|
54
|
-
isSortable: false,
|
|
55
|
-
displayLabel: 'Is Admin',
|
|
56
|
-
isCustomField: true,
|
|
57
|
-
type: 'Boolean'
|
|
58
|
-
}, {
|
|
59
|
-
name: 'createdTime',
|
|
60
|
-
id: 'createdTime',
|
|
61
|
-
isSortable: false,
|
|
62
|
-
displayLabel: 'Created Time',
|
|
63
|
-
isCustomField: false,
|
|
64
|
-
type: 'DateTime'
|
|
65
|
-
}, {
|
|
66
|
-
name: 'createdBy',
|
|
67
|
-
id: 'createdBy',
|
|
68
|
-
isSortable: false,
|
|
69
|
-
displayLabel: 'Created By',
|
|
70
|
-
isCustomField: false,
|
|
71
|
-
type: 'LookUp'
|
|
72
|
-
}, {
|
|
73
|
-
name: 'cf_owner',
|
|
74
|
-
id: 'cf_owner',
|
|
75
|
-
isSortable: false,
|
|
76
|
-
displayLabel: 'Owner',
|
|
77
|
-
isCustomField: false,
|
|
78
|
-
type: 'Multiselect'
|
|
79
|
-
}, {
|
|
80
|
-
name: 'of_url',
|
|
81
|
-
id: 'of_url',
|
|
82
|
-
isSortable: false,
|
|
83
|
-
displayLabel: 'URL',
|
|
84
|
-
isCustomField: false,
|
|
85
|
-
type: 'URL'
|
|
86
|
-
}];
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
const getRecords = {
|
|
2
|
-
name: 'records',
|
|
3
|
-
api: `/supportapi/zd/{{orgName}}/api/v1/supportEmailAddress`,
|
|
4
|
-
parameters: `{
|
|
5
|
-
"departmentId": "{{departmentId}}",
|
|
6
|
-
"from":{{from}},
|
|
7
|
-
"limit":{{limit}}
|
|
8
|
-
}`,
|
|
9
|
-
type: 'GET',
|
|
10
|
-
getResponse: _ref => {
|
|
11
|
-
let {
|
|
12
|
-
payload,
|
|
13
|
-
params
|
|
14
|
-
} = _ref;
|
|
15
|
-
const records = [];
|
|
16
|
-
const start = params.from;
|
|
17
|
-
const end = start + params.limit;
|
|
18
|
-
|
|
19
|
-
for (let i = start; i < end; i++) {
|
|
20
|
-
const date = new Date();
|
|
21
|
-
records.push({
|
|
22
|
-
id: `${i}`,
|
|
23
|
-
name: `Record ${i}`,
|
|
24
|
-
email: 'odin@asgard@thundermail.com',
|
|
25
|
-
cf: {
|
|
26
|
-
cf_isAdmin: i % 2 === 0
|
|
27
|
-
},
|
|
28
|
-
createdTime: "2025-01-13T07:01:50.686Z",
|
|
29
|
-
createdBy: {
|
|
30
|
-
"firstName": "Odin",
|
|
31
|
-
"lastName": ""
|
|
32
|
-
},
|
|
33
|
-
cf_owner: `God;Species`,
|
|
34
|
-
of_url: `https://en.wikipedia.org/wiki/Asgard`
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
params.limit += 10;
|
|
39
|
-
return {
|
|
40
|
-
"data": records
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
transformer: response => response.data,
|
|
44
|
-
properties: {
|
|
45
|
-
orgName: {
|
|
46
|
-
required: false,
|
|
47
|
-
typeMetadata: {
|
|
48
|
-
schema: {
|
|
49
|
-
type: 'string'
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
departmentId: {
|
|
54
|
-
required: false,
|
|
55
|
-
typeMetadata: {
|
|
56
|
-
schema: {
|
|
57
|
-
type: 'string'
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
from: {
|
|
62
|
-
required: false,
|
|
63
|
-
defaultValue: 1,
|
|
64
|
-
typeMetadata: {
|
|
65
|
-
schema: {
|
|
66
|
-
type: 'number'
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
limit: {
|
|
71
|
-
required: false,
|
|
72
|
-
defaultValue: 20,
|
|
73
|
-
typeMetadata: {
|
|
74
|
-
schema: {
|
|
75
|
-
type: 'number'
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
export default getRecords;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
let getSelectedFields = {
|
|
2
|
-
name: 'selectedFields',
|
|
3
|
-
api: '/api/v1/support-email-address/selectedFields',
|
|
4
|
-
parameters: `{
|
|
5
|
-
"departmentId": "{{departmentId}}",
|
|
6
|
-
"module": "{{moduleName}}"
|
|
7
|
-
}`,
|
|
8
|
-
type: 'GET',
|
|
9
|
-
getResponse: _ref => {
|
|
10
|
-
let {
|
|
11
|
-
payload,
|
|
12
|
-
params
|
|
13
|
-
} = _ref;
|
|
14
|
-
const fields = ['id', 'name', 'email', 'cf_isAdmin', 'createdTime', 'createdBy', 'cf_owner', 'of_url'];
|
|
15
|
-
return {
|
|
16
|
-
fields
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
transformer: res => res.fields,
|
|
20
|
-
properties: {
|
|
21
|
-
departmentId: {
|
|
22
|
-
required: true,
|
|
23
|
-
defaultValue: 1,
|
|
24
|
-
typeMetadata: {
|
|
25
|
-
schema: {
|
|
26
|
-
type: 'number'
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
export default getSelectedFields;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import getAvailableFields from "./http-template/getAvailableFields";
|
|
2
|
-
import getRecords from "./http-template/getRecords";
|
|
3
|
-
import getSelectedFields from "./http-template/getSelectedFields";
|
|
4
|
-
const dataBroker = {
|
|
5
|
-
"httpTemplates": {
|
|
6
|
-
getRecords,
|
|
7
|
-
getAvailableFields,
|
|
8
|
-
getSelectedFields
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
export default dataBroker;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import { DATA_BROKER_FAILURE, DATA_BROKER_NO_CONTENT, DATA_BROKER_SUCCESS } from "../../../../../bc/zdata-broker/Symbols";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|