@zohodesk/library-platform 1.1.12 → 1.2.0-exp.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/es/bc/action-band/Constants.js +4 -0
- package/es/bc/action-band/Properties.js +10 -0
- package/es/bc/action-band/index.js +1 -0
- package/es/bc/app-context/Properties.js +19 -0
- package/es/bc/column-chooser/EventHandlers.js +1 -2
- package/es/bc/float-pagination/ActionHandlers.js +1 -0
- package/es/bc/float-pagination/Constants.js +4 -0
- package/es/bc/float-pagination/Properties.js +18 -0
- package/es/bc/float-pagination/index.js +2 -0
- package/es/bc/index.js +0 -1
- package/es/bc/sdk/ResourceNamesEnum.js +2 -0
- package/es/bc/search/Constants.js +3 -0
- package/es/bc/search/EventHandlers.js +1 -0
- package/es/bc/search/Properties.js +11 -0
- package/es/bc/search/index.js +2 -0
- package/es/bc/search-box/ActionHandlers.js +1 -0
- package/es/bc/search-box/Constants.js +4 -0
- package/es/bc/search-box/Properties.js +18 -0
- package/es/bc/search-box/index.js +2 -0
- package/es/bc/sort-by/ActionHandlers.js +1 -1
- package/es/bc/sort-by/Constants.js +2 -2
- package/es/bc/sort-by/Properties.js +13 -11
- package/es/bc/sort-by/Types.js +10 -0
- package/es/bc/sort-by/types/SortByBehaviourState.js +1 -0
- package/es/bc/zfield/Constants.js +5 -1
- package/es/bc/zform/Properties.js +20 -0
- package/es/bc/zform/Symbol.js +3 -0
- package/es/bc/zlist/Constants.js +0 -1
- package/es/bc/zlist/Types.js +27 -0
- package/es/bc/zrecord/Constants.js +4 -0
- package/es/bc/zrecord/Schemas.js +29 -0
- package/es/bc/zrecord/Types.js +45 -0
- package/es/cc/action-band/Properties.js +120 -0
- package/es/cc/action-band/SdkContract.js +13 -0
- package/es/cc/action-band/constants/Events.js +1 -0
- package/es/cc/action-band/constants/ExternalConstants.js +9 -0
- package/es/cc/action-band/constants/index.js +2 -0
- package/es/cc/action-band/index.js +3 -0
- package/es/cc/action-icon/Properties.js +20 -1
- package/es/cc/checkbox/Properties.js +2 -1
- package/es/cc/component/Dispatch.js +1 -0
- package/es/cc/component/LifeCycleEventsEnum.js +1 -0
- package/es/cc/component/index.js +3 -0
- package/es/cc/email/Properties.js +8 -0
- package/es/cc/fields/currency/Properties.js +9 -0
- package/es/cc/fields/decimal/Properties.js +9 -0
- package/es/cc/fields/email/Properties.js +9 -0
- package/es/cc/fields/field/Types.js +31 -23
- package/es/cc/fields/lookup/Properties.js +10 -26
- package/es/cc/fields/multi-line/Properties.js +1 -0
- package/es/cc/fields/number/Properties.js +10 -1
- package/es/cc/fields/phone/Properties.js +9 -0
- package/es/cc/fields/text/Properties.js +2 -2
- package/es/cc/fields/url/Properties.js +9 -0
- package/es/cc/floating-pagination/Constants.js +6 -0
- package/es/cc/floating-pagination/Events.js +8 -0
- package/es/cc/floating-pagination/Properties.js +56 -0
- package/es/cc/floating-pagination/index.js +3 -0
- package/es/cc/highlighted-value/Properties.js +18 -0
- package/es/cc/link/Properties.js +13 -3
- package/es/cc/list-item/Properties.js +10 -0
- package/es/cc/more-dropdown/Properties.js +4 -0
- package/es/cc/one-unification/Constants.js +24 -0
- package/es/cc/one-unification/unified-navigation/ActionTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/CommonTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/ConfigTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/HandlerTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/Types.js +1 -0
- package/es/cc/one-unification/unified-navigation/UnifiedNavigation.d.js +0 -0
- package/es/cc/one-unification/unified-navigation/index.js +1 -0
- package/es/cc/radio-dropdown/Constants.js +6 -0
- package/es/cc/radio-dropdown/Data.js +1 -0
- package/es/cc/radio-dropdown/Events.js +42 -0
- package/es/cc/radio-dropdown/Properties.js +142 -0
- package/es/cc/radio-dropdown/index.js +4 -0
- package/es/cc/ribbon/Properties.js +59 -0
- package/es/cc/ribbon/index.js +1 -0
- package/es/cc/search/Constants.js +6 -0
- package/es/cc/search/Events.js +17 -0
- package/es/cc/search/Properties.js +11 -0
- package/es/cc/search/index.js +3 -0
- package/es/cc/smart-navigation/Constants.js +8 -0
- package/es/cc/smart-navigation/Events.js +107 -0
- package/es/cc/smart-navigation/Properties.js +87 -0
- package/es/cc/smart-navigation/index.js +4 -0
- package/es/cc/sort-dropdown/Constants.js +7 -0
- package/es/cc/sort-dropdown/Events.js +46 -0
- package/es/cc/sort-dropdown/Properties.js +135 -0
- package/es/cc/sort-dropdown/index.js +3 -0
- package/es/cc/switch/Properties.js +2 -2
- package/es/cc/table-column-chooser/Constants.js +2 -1
- package/es/cc/table-connected/Properties.js +16 -0
- package/es/cc/table-connected/SdkContract.js +46 -0
- package/es/cc/table-connected/constants/Events.js +2 -0
- package/es/cc/table-list/Actions.js +0 -2
- package/es/cc/table-list/Constants.js +1 -1
- package/es/cc/table-list/Events.js +0 -2
- package/es/cc/table-list/Properties.js +35 -38
- package/es/cc/table-list/data-types/FloatPaginationConfig.js +1 -0
- package/es/cc/tag/Constants.js +6 -0
- package/es/cc/tag/Data.js +14 -0
- package/es/cc/tag/EventHandlers.js +1 -0
- package/es/cc/tag/Events.js +26 -0
- package/es/cc/{tags/model/TagModel.js → tag/Model.js} +6 -2
- package/es/cc/tag/Properties.js +104 -0
- package/es/cc/tag/index.js +6 -0
- package/es/cc/tags/Data.js +0 -6
- package/es/cc/tags/model/index.js +1 -1
- package/es/cc/tags-list-dropdown/Constants.js +5 -0
- package/es/cc/tags-list-dropdown/Data.js +1 -0
- package/es/cc/tags-list-dropdown/Events.js +14 -0
- package/es/cc/tags-list-dropdown/Properties.js +96 -0
- package/es/cc/tags-list-dropdown/index.js +4 -0
- package/es/cc/text/Properties.js +100 -0
- package/es/cc/textbox/Properties.js +1 -1
- package/es/index.js +8 -3
- package/es/library/behaviours/action-band/adapters/controllers/AbstractController.js +10 -0
- package/es/library/behaviours/action-band/adapters/controllers/MountController.js +21 -0
- package/es/library/behaviours/action-band/adapters/gateways/Repository.js +24 -0
- package/es/library/behaviours/action-band/adapters/gateways/Service.js +11 -0
- package/es/library/behaviours/action-band/applications/interfaces/State.js +1 -0
- package/es/library/behaviours/action-band/applications/interfaces/UseCaseDependencies.js +1 -0
- package/es/library/behaviours/action-band/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/library/behaviours/action-band/applications/interfaces/gateways/IService.js +1 -0
- package/es/library/behaviours/action-band/applications/interfaces/input/InitializeInput.js +1 -0
- package/es/library/behaviours/action-band/applications/usecases/AbstractUseCase.js +17 -0
- package/es/library/behaviours/action-band/applications/usecases/InitializeUseCase.js +20 -0
- package/es/library/behaviours/action-band/domain/entities/ActionBand.js +95 -0
- package/es/library/behaviours/action-band/domain/entities/interfaces/IActionBand.js +1 -0
- package/es/library/behaviours/action-band/domain/entities/interfaces/IActionModel.js +1 -0
- package/es/library/behaviours/action-band/domain/entities/interfaces/IApiPropsModel.js +1 -0
- package/es/library/behaviours/action-band/domain/entities/interfaces/Properties.js +1 -0
- package/es/library/behaviours/action-band/frameworks/ActionBandBehaviourFactory.js +21 -0
- package/es/library/behaviours/action-band/frameworks/ActionHandlersFactory.js +17 -0
- package/es/library/behaviours/clip-wrap/adapters/controllers/DestructController.js +3 -3
- package/es/library/behaviours/clip-wrap/adapters/controllers/InitializeController.js +3 -3
- package/es/library/behaviours/clip-wrap/adapters/gateway/Service.js +4 -0
- package/es/library/behaviours/clip-wrap/applications/usecases/ClipWrapUpdateUseCase.js +19 -0
- package/es/library/behaviours/float-pagination/adapters/controllers/AbstractController.js +9 -0
- package/es/library/behaviours/float-pagination/adapters/controllers/DestructController.js +18 -0
- package/es/library/behaviours/float-pagination/adapters/controllers/FloatPaginationController.js +25 -0
- package/es/library/behaviours/float-pagination/adapters/controllers/InitializeController.js +18 -0
- package/es/library/behaviours/float-pagination/adapters/controllers/ScrollBottomController.js +23 -0
- package/es/library/behaviours/float-pagination/adapters/controllers/ScrollTopController.js +23 -0
- package/es/library/behaviours/float-pagination/adapters/controllers/UpdateIndexController.js +30 -0
- package/es/library/behaviours/float-pagination/adapters/gateway/Repository.js +27 -0
- package/es/library/behaviours/float-pagination/adapters/gateway/Service.js +20 -0
- package/es/library/behaviours/float-pagination/adapters/presenter/Presenter.js +16 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/UseCaseDependencies.js +1 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/gateways/IService.js +1 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/input/DestructInputModel.js +1 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/input/FloatPaginationInputModel.js +1 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/input/InitializeInputModel.js +1 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/input/ScrollTopInputModel.js +1 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/input/ScrollbottomInputModel.js +1 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/input/UpdateIndexInputModel.js +1 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/output/FloatPaginationOutputModel.js +1 -0
- package/es/library/behaviours/float-pagination/applications/interfaces/output/IPresenter.js +1 -0
- package/es/library/behaviours/float-pagination/applications/usecases/AbstractUseCase.js +17 -0
- package/es/library/behaviours/float-pagination/applications/usecases/DestructUsecase.js +15 -0
- package/es/library/behaviours/float-pagination/applications/usecases/FloatPaginationUseCase.js +31 -0
- package/es/library/behaviours/float-pagination/applications/usecases/InitializeUsecase.js +16 -0
- package/es/library/behaviours/float-pagination/applications/usecases/ScrollBottomUseCase.js +23 -0
- package/es/library/behaviours/float-pagination/applications/usecases/ScrollTopUseCase.js +23 -0
- package/es/library/behaviours/float-pagination/applications/usecases/UpdateIndexUseCase.js +28 -0
- package/es/library/behaviours/float-pagination/domain/entities/FloatPagination.js +28 -0
- package/es/library/behaviours/float-pagination/domain/entities/interfaces/IFloatPagination.js +1 -0
- package/es/library/behaviours/float-pagination/frameworks/ui/ActionsHandlerFactory.js +37 -0
- package/es/library/behaviours/float-pagination/frameworks/ui/FloatPaginationBehaviourFactory.js +21 -0
- package/es/library/behaviours/float-pagination/frameworks/utils.js +70 -0
- package/es/library/behaviours/keyboard-controls/adapters/gateways/Repository.js +2 -1
- package/es/library/behaviours/keyboard-controls/applications/usecases/SpacePress.js +1 -1
- package/es/library/behaviours/keyboard-controls/domain/entities/KeyboardControls.js +6 -1
- package/es/library/behaviours/library-loader/adapters/controllers/LibraryLoaderController.js +17 -0
- package/es/library/behaviours/library-loader/adapters/gateways/LibraryLoaderAdapter.js +29 -0
- package/es/library/behaviours/library-loader/applications/usecases/LoadLibraryUseCase.js +42 -0
- package/es/library/behaviours/library-loader/domain/entities/interfaces/ILibraryLoader.js +1 -0
- package/es/library/behaviours/library-loader/frameworks/LibraryLoaderBehaviour.js +26 -0
- package/es/library/behaviours/list-selection/domain/entities/ListItemSelection.js +21 -18
- package/es/library/behaviours/search/adapters/controllers/AbstractController.js +9 -0
- package/es/library/behaviours/search/adapters/controllers/SearchController.js +26 -0
- package/es/library/behaviours/search/adapters/controllers/UpdatePropertiesController.js +32 -0
- package/es/library/behaviours/search/adapters/gateway/Repository.js +20 -0
- package/es/library/behaviours/search/adapters/gateway/Service.js +12 -0
- package/es/library/behaviours/search/adapters/presenter/Presenter.js +16 -0
- package/es/library/behaviours/search/adapters/presenter/SearchTranslator.js +6 -0
- package/es/library/behaviours/search/applications/interfaces/UseCaseDependencies.js +1 -0
- package/es/library/behaviours/search/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/library/behaviours/search/applications/interfaces/gateways/IService.js +1 -0
- package/es/library/behaviours/search/applications/interfaces/input/SearchInputModel.js +1 -0
- package/es/library/behaviours/search/applications/interfaces/input/UpdatePropertiesInputModel.js +1 -0
- package/es/library/behaviours/search/applications/interfaces/output/IPresenter.js +1 -0
- package/es/library/behaviours/search/applications/interfaces/output/SearchOutputModel.js +1 -0
- package/es/library/behaviours/search/applications/usecases/AbstractUseCase.js +17 -0
- package/es/library/behaviours/search/applications/usecases/SearchUseCase.js +28 -0
- package/es/library/behaviours/search/applications/usecases/UpdatePropertiesUsecase.js +25 -0
- package/es/library/behaviours/search/domain/entities/Search.js +23 -0
- package/es/library/behaviours/search/domain/entities/interfaces/ISearch.js +1 -0
- package/es/library/behaviours/search/frameworks/ui/EventHandlerFactory.js +25 -0
- package/es/library/behaviours/search/frameworks/ui/SearchStringStoreBehaviourFactory.js +26 -0
- package/es/library/behaviours/search-box/adapters/controllers/AbstractController.js +9 -0
- package/es/library/behaviours/search-box/adapters/controllers/ClearSearchController.js +21 -0
- package/es/library/behaviours/search-box/adapters/controllers/SearchController.js +26 -0
- package/es/library/behaviours/search-box/adapters/gateway/Repository.js +28 -0
- package/es/library/behaviours/search-box/adapters/gateway/Service.js +12 -0
- package/es/library/behaviours/search-box/adapters/presenter/Presenter.js +21 -0
- package/es/library/behaviours/search-box/applications/interfaces/UseCaseDependencies.js +1 -0
- package/es/library/behaviours/search-box/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/library/behaviours/search-box/applications/interfaces/gateways/IService.js +1 -0
- package/es/library/behaviours/search-box/applications/interfaces/input/ClearSearchInputModel.js +1 -0
- package/es/library/behaviours/search-box/applications/interfaces/input/SearchInputModel.js +1 -0
- package/es/library/behaviours/search-box/applications/interfaces/output/IPresenter.js +1 -0
- package/es/library/behaviours/search-box/applications/interfaces/output/SearchOutputModel.js +1 -0
- package/es/library/behaviours/search-box/applications/usecases/AbstractUseCase.js +17 -0
- package/es/library/behaviours/search-box/applications/usecases/ClearSearchUseCase.js +24 -0
- package/es/library/behaviours/search-box/applications/usecases/SearchUseCase.js +25 -0
- package/es/library/behaviours/search-box/domain/entities/Search.js +22 -0
- package/es/library/behaviours/search-box/domain/entities/interfaces/ISearch.js +1 -0
- package/es/library/behaviours/search-box/frameworks/ui/ActionsHandlerFactory.js +24 -0
- package/es/library/behaviours/search-box/frameworks/ui/SearchBehaviourFactory.js +26 -0
- package/es/library/behaviours/sort-by/adapters/controllers/{SortBy.js → SortByController.js} +6 -6
- package/es/library/behaviours/sort-by/adapters/gateway/Repository.js +18 -6
- package/es/library/behaviours/sort-by/adapters/gateway/Service.js +2 -2
- package/es/library/behaviours/sort-by/adapters/presenter/Presenter.js +8 -1
- package/es/library/behaviours/sort-by/applications/interfaces/input/UpdateSortByUseCaseInputModel.js +1 -0
- package/es/library/behaviours/sort-by/applications/interfaces/output/SearchOutputModel.js +1 -0
- package/es/library/behaviours/sort-by/applications/usecases/{SortBy.js → SortByUseCase.js} +12 -13
- package/es/library/behaviours/sort-by/applications/usecases/UpdateSortByUseCase.js +25 -0
- package/es/library/behaviours/sort-by/domain/entities/SortBy.js +11 -25
- package/es/library/behaviours/sort-by/frameworks/ui/ActionsHandlerFactory.js +7 -5
- package/es/library/behaviours/sort-by/frameworks/ui/SortByBehaviourFactory.js +17 -7
- package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +9 -3
- package/es/library/custom-component/applications/usecases/DispatchUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/InitializeUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/MountUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/SetRefUseCase.js +7 -0
- package/es/library/custom-component/applications/usecases/UnmountUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/UpdatePropertyUseCase.js +1 -0
- package/es/library/custom-component/domain/entities/Component.js +1 -0
- package/es/library/custom-component/domain/entities/ComponentProperties.js +1 -1
- package/es/library/custom-component/domain/entities/Logger.js +7 -12
- package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +7 -1
- package/es/library/dot/components/form-fields/currency/frameworks/ui/CurrencyView.js +2 -0
- package/es/library/dot/components/form-fields/decimal/frameworks/ui/DecimalView.js +2 -0
- package/es/library/dot/components/form-fields/email/frameworks/ui/Email.js +1 -1
- package/es/library/dot/components/form-fields/email/frameworks/ui/EmailView.js +2 -0
- package/es/library/dot/components/form-fields/number/frameworks/ui/NumberView.js +2 -0
- package/es/library/dot/components/form-fields/phone/frameworks/ui/PhoneView.js +2 -0
- package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextArea.js +1 -1
- package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextAreaView.js +4 -2
- package/es/library/dot/components/form-fields/textbox/frameworks/ui/TextBoxView.js +2 -0
- package/es/library/dot/components/form-fields/url/frameworks/ui/UrlView.js +2 -0
- package/es/library/dot/components/table-list/adapters/controllers/ScrollController.js +2 -2
- package/es/library/dot/components/table-list/adapters/controllers/index.js +0 -2
- package/es/library/dot/components/table-list/frameworks/ui/EventHandlersFactory.js +1 -2
- package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +24 -1
- package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +19 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +1 -1
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +4 -6
- package/es/library/dot/legacy-to-new-arch/action-band-components/search/frameworks/ui/Search.js +41 -0
- package/es/library/dot/legacy-to-new-arch/action-band-components/search/frameworks/ui/SearchTranslator.js +16 -0
- package/es/library/dot/legacy-to-new-arch/action-band-components/search/frameworks/ui/SearchView.js +37 -0
- package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIconView.js +5 -1
- package/es/library/dot/legacy-to-new-arch/email/frameworks/ui/EmailView.js +4 -2
- package/es/library/dot/legacy-to-new-arch/floating-pagination/frameworks/ui/FloatingPagination.js +10 -0
- package/es/library/dot/legacy-to-new-arch/floating-pagination/frameworks/ui/FloatingPaginationView.js +47 -0
- package/es/library/dot/legacy-to-new-arch/highlighted-value/frameworks/ui/HighlightedValueView.js +6 -1
- package/es/library/dot/legacy-to-new-arch/index.js +3 -1
- package/es/library/dot/legacy-to-new-arch/link/frameworks/ui/LinkView.js +4 -2
- package/es/library/dot/legacy-to-new-arch/list-item/frameworks/ui/ListItemView.js +4 -0
- package/es/library/dot/legacy-to-new-arch/radio-dropdown/frameworks/ui/RadioDropdown.js +12 -0
- package/es/library/dot/legacy-to-new-arch/radio-dropdown/frameworks/ui/RadioDropdownView.js +125 -0
- package/es/library/dot/legacy-to-new-arch/radio-dropdown/frameworks/ui/css/RadioDropdown.module.css +23 -0
- package/es/library/dot/legacy-to-new-arch/ribbon/frameworks/ui/Ribbon.js +10 -0
- package/es/library/dot/legacy-to-new-arch/ribbon/frameworks/ui/RibbonView.js +37 -0
- package/es/library/dot/legacy-to-new-arch/sort-dropdown/frameworks/ui/SortDropdown.js +31 -0
- package/es/library/dot/legacy-to-new-arch/sort-dropdown/frameworks/ui/SortDropdownTranslator.js +33 -0
- package/es/library/dot/legacy-to-new-arch/sort-dropdown/frameworks/ui/SortDropdownView.js +83 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/checkbox-field/frameworks/ui/CheckboxField.js +12 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/checkbox-field/frameworks/ui/CheckboxFieldView.js +8 -5
- package/es/library/dot/legacy-to-new-arch/table-field-components/checkbox-field/frameworks/ui/EventHandlersFactory.js +3 -3
- package/es/library/dot/legacy-to-new-arch/table-field-components/email-field/frameworks/ui/EmailField.js +3 -3
- package/es/library/dot/legacy-to-new-arch/table-field-components/email-field/frameworks/ui/EmailFieldView.js +8 -6
- package/es/library/dot/legacy-to-new-arch/table-field-components/highlighted-value-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/highlighted-value-field/frameworks/ui/HighlightedValueField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/highlighted-value-field/frameworks/ui/HighlightedValueFieldView.js +24 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/index.js +22 -5
- package/es/library/dot/legacy-to-new-arch/table-field-components/labeled-avatar-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/labeled-avatar-field/frameworks/ui/LabeledAvatarField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/labeled-avatar-field/frameworks/ui/LabeledAvatarFieldView.js +22 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/link-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/link-field/frameworks/ui/LinkField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/link-field/frameworks/ui/LinkFieldView.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/lookup-field/frameworks/ui/LookupFieldView.js +1 -1
- package/es/library/dot/legacy-to-new-arch/table-field-components/phone-field/frameworks/ui/PhoneFieldView.js +1 -1
- package/es/library/dot/legacy-to-new-arch/table-field-components/radio-dropdown-field/frameworks/ui/EventHandlersFactory.js +46 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/radio-dropdown-field/frameworks/ui/RadioDropdownField.js +49 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/radio-dropdown-field/frameworks/ui/RadioDropdownFieldView.js +43 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/radio-dropdown-field/frameworks/ui/css/RadioDropdownField.module.css +3 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/switch-field/frameworks/ui/EventHandlersFactory.js +3 -3
- package/es/library/dot/legacy-to-new-arch/table-field-components/switch-field/frameworks/ui/SwitchField.js +14 -4
- package/es/library/dot/legacy-to-new-arch/table-field-components/switch-field/frameworks/ui/SwitchFieldView.js +8 -4
- package/es/library/dot/legacy-to-new-arch/table-field-components/tag-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tag-field/frameworks/ui/TagField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tag-field/frameworks/ui/TagFieldView.js +34 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tags-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tags-field/frameworks/ui/TagsField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tags-field/frameworks/ui/TagsFieldView.js +18 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tags-list-dropdown-field/frameworks/ui/TagsListDropdownField.js +44 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tags-list-dropdown-field/frameworks/ui/TagsListDropdownFieldView.js +24 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/text-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/text-field/frameworks/ui/TextField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/text-field/frameworks/ui/TextFieldView.js +40 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/url-field/frameworks/ui/UrlFieldView.js +1 -1
- package/es/library/dot/legacy-to-new-arch/tag/frameworks/ui/Tag.js +11 -0
- package/es/library/dot/legacy-to-new-arch/tag/frameworks/ui/Tag.module.css +8 -0
- package/es/library/dot/legacy-to-new-arch/tag/frameworks/ui/TagView.js +96 -0
- package/es/library/dot/legacy-to-new-arch/tags-list-dropdown/frameworks/ui/TagContractAdapter.js +24 -0
- package/es/library/dot/legacy-to-new-arch/tags-list-dropdown/frameworks/ui/TagsListDropdown.js +12 -0
- package/es/library/dot/legacy-to-new-arch/tags-list-dropdown/frameworks/ui/TagsListDropdownView.js +42 -0
- package/es/library/dot/legacy-to-new-arch/text/frameworks/ui/Text.js +2 -2
- package/es/library/dot/legacy-to-new-arch/text/frameworks/ui/TextView.js +22 -1
- package/es/platform/app-context-behaviour/adapters/controllers/AbstractController.js +9 -0
- package/es/platform/app-context-behaviour/adapters/controllers/UpdatePropertiesController.js +32 -0
- package/es/platform/app-context-behaviour/adapters/gateway/Repository.js +22 -0
- package/es/platform/app-context-behaviour/adapters/gateway/Service.js +10 -0
- package/es/platform/app-context-behaviour/adapters/presenter/Presenter.js +16 -0
- package/es/platform/app-context-behaviour/applications/interfaces/UseCaseDependencies.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/gateways/IService.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/input/UpdatePropertiesInputModel.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/output/BehaviourOutputModel.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/output/IPresenter.js +1 -0
- package/es/platform/app-context-behaviour/applications/usecases/AbstractUseCase.js +17 -0
- package/es/platform/app-context-behaviour/applications/usecases/UpdatePropertiesUsecase.js +25 -0
- package/es/platform/app-context-behaviour/domain/entities/AppContext.js +44 -0
- package/es/platform/app-context-behaviour/domain/entities/interfaces/IAppContext.js +1 -0
- package/es/platform/app-context-behaviour/frameworks/AppContextBehaviourFactory.js +2 -2
- package/es/platform/app-context-behaviour/frameworks/EventHandlerFactory.js +22 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/presenters/FilterUtils.js +11 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/resources/ClientActionsFetchSDK.js +76 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/ClientActionsAPIGatewayParams.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/ClientActionsFetchSDKParams.js +10 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/IClientActionsFetchSDK.js +0 -0
- package/es/platform/client-actions/components/interfaces/ActionViewModel.js +1 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.module.css +4 -0
- package/es/platform/client-scripts/bc/zclient-scripts-execution/Constants.js +2 -4
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/domain/entities/ClientScriptExecutor.js +33 -60
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/resources/ClientScriptsFetchSDK.js +43 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/ClientScriptsAPIGatewayParams.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/ClientScriptsSDKFetchParams.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/IClientScriptsFetchSDK.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/ClientScriptModel.js +5 -1
- package/es/platform/column-chooser/adapters/controllers/ColumnChooserOpenController.js +14 -6
- package/es/platform/column-chooser/adapters/controllers/ColumnChooserUpdateController.js +22 -0
- package/es/platform/column-chooser/adapters/gateways/Repository.js +12 -1
- package/es/platform/column-chooser/adapters/gateways/Service.js +2 -0
- package/es/platform/column-chooser/applications/interfaces/input/ColumnChooserUpdateInput.js +1 -0
- package/es/platform/column-chooser/applications/usecases/ColumnChooserSaveUseCase.js +8 -1
- package/es/platform/column-chooser/applications/usecases/ColumnChooserUpdateUseCase.js +35 -0
- package/es/platform/column-chooser/domain/entities/ColumnChooserImp.js +6 -0
- package/es/platform/column-chooser/frameworks/EventHandlersFactory.js +6 -4
- package/es/platform/components/index.js +3 -1
- package/es/platform/components/smart-action-band/adapters/presenters/ActionBandTranslator.js +135 -0
- package/es/platform/components/smart-action-band/adapters/presenters/translators/interfaces/ActionBandTranslatorState.js +1 -0
- package/es/platform/components/smart-action-band/adapters/presenters/utils/DefaultClientActions.js +179 -0
- package/es/platform/components/smart-action-band/adapters/resources/SmartActionBandResource.js +46 -0
- package/es/platform/components/smart-action-band/applications/interfaces/ISmartActionBandResource.js +1 -0
- package/es/platform/components/smart-action-band/applications/interfaces/State.js +1 -0
- package/es/platform/components/smart-action-band/applications/interfaces/UseCaseDependencies.js +1 -0
- package/es/platform/components/smart-action-band/applications/interfaces/output/IPresenter.js +1 -0
- package/es/platform/components/smart-action-band/applications/usecases/AbstractUseCase.js +18 -0
- package/es/platform/components/smart-action-band/domain/entities/interfaces/Properties.js +1 -0
- package/es/platform/components/smart-action-band/frameworks/EventHandlersFactory.js +147 -0
- package/es/platform/components/smart-action-band/frameworks/SmartActionBand.js +5 -0
- package/es/platform/components/smart-action-band/frameworks/SmartActionBandFactory.js +58 -0
- package/es/platform/components/smart-action-band/frameworks/SmartActionBandSdkFactory.js +24 -0
- package/es/platform/components/smart-action-band/frameworks/SmartActionBandView.js +48 -0
- package/es/platform/components/smart-navigation/adapters/controllers/LoadScriptController.js +0 -0
- package/es/platform/components/smart-navigation/adapters/controllers/UiModelInitializeController.js +0 -0
- package/es/platform/components/smart-navigation/adapters/presenters/OneUnifiedNavigationTranslator.js +248 -0
- package/es/platform/components/smart-navigation/adapters/presenters/Present.js +77 -0
- package/es/platform/components/smart-navigation/adapters/presenters/SampleModel.js +356 -0
- package/es/platform/components/smart-navigation/adapters/resources/SmartNavigationResource.js +96 -0
- package/es/platform/components/smart-navigation/applications/usecases/NavigateModuleUseCase.js +0 -0
- package/es/platform/components/smart-navigation/frameworks/CustomElementRenderer.js +22 -0
- package/es/platform/components/smart-navigation/frameworks/SmartNavigation.js +12 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/OneUnificationEventHandlers.js +156 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/SmartNavigation.js +83 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/SmartNavigation.module.css +3 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/SmartNavigationEventHandlers.js +173 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/UnifiedNavigation.js +48 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/UnifiedNavigationActions.js +144 -0
- package/es/platform/components/table-connected/adapters/controllers/ScrollController.js +29 -8
- package/es/platform/components/table-connected/adapters/controllers/ScrollEndReachedController.js +23 -0
- package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +224 -8
- package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +39 -12
- package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +4 -2
- package/es/platform/components/table-connected/frameworks/TableConnectedFactory.js +7 -1
- package/es/platform/components/table-connected/frameworks/TableConnectedView.js +2 -0
- package/es/platform/data-source/http-template/fetchLookupFields.js +0 -6
- package/es/platform/data-source/http-template/getComponentMapping.js +17 -0
- package/es/platform/data-source/http-template/getPageClientActions.js +23 -0
- package/es/platform/data-source/http-template/getRecords.js +1 -0
- package/es/platform/data-source/http-template/getSingleRecord.js +51 -0
- package/es/platform/data-source/index.js +5 -1
- package/es/platform/data-source/utils/validation-rules/FieldConditions.js +1 -1
- package/es/platform/sdk/frameworks/Sdk.js +7 -0
- package/es/platform/sdk-behaviour/adapters/controllers/InitializeController.js +7 -2
- package/es/platform/sdk-behaviour/applications/usecases/CreateResourceInstanceUseCase.js +10 -1
- package/es/platform/zfield/applications/usecases/FetchSuccessUseCase.js +33 -0
- package/es/platform/zfield/domain/entities/fields-manager/FieldsManager.js +5 -0
- package/es/platform/zform/adapters/controllers/GetInitialRecordSuccessController.js +31 -0
- package/es/platform/zform/adapters/gateway/FormRepository.js +10 -2
- package/es/platform/zform/adapters/gateway/Service.js +2 -0
- package/es/platform/zform/adapters/presenter/FormTranslator.js +27 -15
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +1 -1
- package/es/platform/zform/adapters/presenter/translators/fields/CurrencyFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/DecimalFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/EmailFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/LookUpFieldTranslator.js +11 -7
- package/es/platform/zform/adapters/presenter/translators/fields/NumberFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/PhoneFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/TextAreaFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/TextFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/URLFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/utils/sanitizeHtmlString.js +2 -2
- package/es/platform/zform/applications/interfaces/input/GetInitialRecordSuccessUseCaseInputModel.js +1 -0
- package/es/platform/zform/applications/usecases/GetInitialRecordSuccessUseCase.js +132 -0
- package/es/platform/zform/applications/usecases/InitializeUseCase.js +54 -30
- package/es/platform/zform/applications/usecases/LookupFieldSuccessUseCase.js +5 -0
- package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +12 -11
- package/es/platform/zform/applications/usecases/SubmitValidationCompletedUseCase.js +21 -8
- package/es/platform/zform/domain/ZField.js +7 -5
- package/es/platform/zform/domain/ZForm.js +97 -20
- package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +23 -5
- package/es/platform/zform/frameworks/ui/ZFormBehaviourFactory.js +2 -0
- package/es/platform/zlist/adapters/controllers/RefreshRecordsRequestedController.js +21 -0
- package/es/platform/zlist/adapters/controllers/SortController.js +2 -2
- package/es/platform/zlist/adapters/gateways/Repository.js +6 -11
- package/es/platform/zlist/adapters/gateways/Service.js +2 -0
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +62 -17
- package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +57 -49
- package/es/platform/zlist/adapters/presenters/translators/FieldVariations.js +25 -0
- package/es/platform/zlist/adapters/presenters/translators/Header.js +29 -21
- package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +3 -3
- package/es/platform/zlist/adapters/presenters/translators/Row.js +16 -2
- package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +3 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/BooleanFieldTranslator.js +87 -12
- package/es/platform/zlist/adapters/presenters/translators/fields/CurrencyFieldTranslator.js +66 -11
- package/es/platform/zlist/adapters/presenters/translators/fields/DateFieldTranslator.js +33 -8
- package/es/platform/zlist/adapters/presenters/translators/fields/DateTimeFieldTranslator.js +33 -8
- package/es/platform/zlist/adapters/presenters/translators/fields/DecimalFieldTranslator.js +16 -9
- package/es/platform/zlist/adapters/presenters/translators/fields/EmailFieldTranslator.js +29 -9
- package/es/platform/zlist/adapters/presenters/translators/fields/FormulaFieldTranslator.js +23 -27
- package/es/platform/zlist/adapters/presenters/translators/fields/LookUpFieldTranslator.js +106 -17
- package/es/platform/zlist/adapters/presenters/translators/fields/MultiLineFieldTranslator.js +16 -9
- package/es/platform/zlist/adapters/presenters/translators/fields/MultiSelectFieldTranslator.js +100 -26
- package/es/platform/zlist/adapters/presenters/translators/fields/NumberFieldTranslator.js +16 -9
- package/es/platform/zlist/adapters/presenters/translators/fields/PercentageFieldTranslator.js +16 -9
- package/es/platform/zlist/adapters/presenters/translators/fields/PhoneFieldTranslator.js +32 -9
- package/es/platform/zlist/adapters/presenters/translators/fields/PickListFieldTranslator.js +167 -26
- package/es/platform/zlist/adapters/presenters/translators/fields/SingleLineFieldTranslator.js +16 -9
- package/es/platform/zlist/adapters/presenters/translators/fields/URLFieldTranslator.js +32 -9
- package/es/platform/zlist/adapters/presenters/utils/DateAndTimeFormat.js +25 -0
- package/es/platform/zlist/adapters/presenters/utils/DefaultClientActions.js +7 -4
- package/es/platform/zlist/adapters/presenters/utils/fieldSortLabels.js +38 -0
- package/es/platform/zlist/applications/entities-factory/ListFactory.js +2 -2
- package/es/platform/zlist/applications/interfaces/input/GetSortConfigUseCaseInputModel.js +1 -0
- package/es/platform/zlist/applications/interfaces/input/RefreshRecordsRequestedUseCaseInputModel.js +1 -0
- package/es/platform/zlist/applications/interfaces/input/SetSortConfigUseCaseInputModel.js +1 -0
- package/es/platform/zlist/applications/usecases/GetSortConfigUseCase.js +17 -0
- package/es/platform/zlist/applications/usecases/RecordSuccessCallbackUsecase.js +1 -1
- package/es/platform/zlist/applications/usecases/RefreshRecordsRequestedUseCase.js +17 -0
- package/es/platform/zlist/applications/usecases/SetSortConfigUseCase.js +26 -0
- package/es/platform/zlist/applications/usecases/SortUseCase.js +6 -6
- package/es/platform/zlist/domain/entities/List.js +32 -16
- package/es/platform/zlist/domain/entities/interfaces/Properties.js +5 -5
- package/es/platform/zlist/frameworks/EventHandlersFactory.js +3 -4
- package/es/platform/zlist/frameworks/ZListBehaviourFactory.js +15 -13
- package/es/platform/zrecord/adapters/controllers/FilterRecordLocalController.js +28 -0
- package/es/platform/zrecord/adapters/controllers/UpdateRecordController.js +30 -0
- package/es/platform/zrecord/adapters/gateways/Repository.js +5 -2
- package/es/platform/zrecord/adapters/gateways/Service.js +4 -0
- package/es/platform/zrecord/applications/entities-factory/RecordsManagerFactory.js +2 -2
- package/es/platform/zrecord/applications/interfaces/input/ClearAllFiltersUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/FilterRecordInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/GetFilterConditionUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/GetFilterConfigUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/RefreshRecordsUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/SetFilterUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/UpdateRecordInputModel.js +0 -0
- package/es/platform/zrecord/applications/usecases/ClearAllFiltersUseCase.js +24 -0
- package/es/platform/zrecord/applications/usecases/FilterRecordUseCase.js +21 -0
- package/es/platform/zrecord/applications/usecases/GetFilterConditionUseCase.js +15 -0
- package/es/platform/zrecord/applications/usecases/GetFilterConfigUseCase.js +15 -0
- package/es/platform/zrecord/applications/usecases/RefreshRecordsUseCase.js +14 -0
- package/es/platform/zrecord/applications/usecases/SetFilterUseCase.js +29 -0
- package/es/platform/zrecord/applications/usecases/UpdateRecordUseCase.js +30 -0
- package/es/platform/zrecord/domain/entities/Filter.js +247 -0
- package/es/platform/zrecord/domain/entities/RecordsManager.js +43 -1
- package/es/platform/zrecord/domain/entities/interfaces/IFilter.js +1 -0
- package/es/platform/zrecord/frameworks/ActionsHandlersFactory.js +7 -1
- package/es/platform/zrecord/frameworks/RecordBehaviourFactory.js +11 -1
- package/package.json +27 -28
- package/es/bc/sort-by/SortOrderEnum.js +0 -8
- package/es/library/behaviours/sort-by/frameworks/ui/DemoBehaviour.js +0 -20
- package/es/library/dot/components/table-list/adapters/controllers/SortByController.js +0 -25
- package/es/library/dot/components/table-list/adapters/controllers/SortedController.js +0 -18
- package/es/library/dot/components/table-list/frameworks/ui/handlers/HandleSortClick.js +0 -12
- package/es/platform/components/table-connected/adapters/controllers/ColumnChooserOpenedController.js +0 -28
- package/es/platform/components/table-connected/adapters/controllers/ColumnChooserUpdateController.js +0 -31
- package/es/platform/zlist/adapters/gateways/SortBy.js +0 -38
- package/es/platform/zlist/domain/entities/SortBy.js +0 -58
- /package/es/{library/behaviours/sort-by/applications/interfaces/output/SortByOutputModel.js → bc/float-pagination/types/FloatPaginationBehaviourState.js} +0 -0
- /package/es/{platform/zlist/applications/interfaces/gateways/ISortBy.js → bc/list-selection/Types.js} +0 -0
- /package/es/{platform/zlist/domain/entities/interfaces/ISortBy.js → bc/search-box/types/SearchBehaviourState.js} +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { AbstractResource } from "../../../../sdk/application/interfaces/gateways/AbstractResource";
|
|
2
|
+
import { translateModule } from "../presenters/OneUnifiedNavigationTranslator";
|
|
3
|
+
import { ONE_UNIFICATION } from "../../../../../cc/one-unification/Constants";
|
|
4
|
+
export class SmartNavigationResource extends AbstractResource {
|
|
5
|
+
initialize() {}
|
|
6
|
+
|
|
7
|
+
destroy() {}
|
|
8
|
+
|
|
9
|
+
initializeModel(model) {
|
|
10
|
+
this.validateLibraryLoaded();
|
|
11
|
+
globalThis.ZUnify.UnifiedNavigation.initUIModel(model);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
modifyTab(tabKey, tabData) {
|
|
15
|
+
this.validateLibraryLoaded();
|
|
16
|
+
globalThis.ZUnify.UnifiedNavigation.modifyTab(tabKey, tabData);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
modifyModule(moduleKey, moduleData) {
|
|
20
|
+
this.validateLibraryLoaded();
|
|
21
|
+
globalThis.ZUnify.UnifiedNavigation.modifyModule(moduleKey, moduleData);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
addModule(moduleParentKey, moduleData) {
|
|
25
|
+
this.validateLibraryLoaded();
|
|
26
|
+
const transformedModuleData = moduleData.map(module => translateModule(module));
|
|
27
|
+
globalThis.ZOUnifiedNavLib.addModule(moduleParentKey, transformedModuleData);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
appendModule(moduleData) {
|
|
31
|
+
this.validateLibraryLoaded();
|
|
32
|
+
const transformedModuleData = moduleData.map(module => translateModule(module))[0];
|
|
33
|
+
ZOUnifiedNavLib.addModule('default-tab', transformedModuleData);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
loadModule(moduleKey, moduleData) {
|
|
37
|
+
this.validateLibraryLoaded();
|
|
38
|
+
const transformedModuleData = moduleData.map(module => translateModule(module));
|
|
39
|
+
globalThis.ZUnify.UnifiedNavigation.onLoadComplete({
|
|
40
|
+
key: moduleKey,
|
|
41
|
+
items: transformedModuleData
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
selectModule(moduleKey) {
|
|
46
|
+
this.validateLibraryLoaded();
|
|
47
|
+
globalThis.ZUnify.UnifiedNavigation.selectModule(moduleKey);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
setNotificationCount(key, count) {
|
|
51
|
+
this.validateLibraryLoaded();
|
|
52
|
+
globalThis.ZUnify.UnifiedNavigation.setNotificationCount(key, count);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
pinModule(moduleKey) {
|
|
56
|
+
this.validateLibraryLoaded();
|
|
57
|
+
globalThis.ZUnify.UnifiedNavigation.pinModule(moduleKey);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
favouriteModule(moduleKey) {
|
|
61
|
+
this.validateLibraryLoaded();
|
|
62
|
+
globalThis.ZUnify.UnifiedNavigation.favouriteModule(moduleKey);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
hideModule(moduleKey) {
|
|
66
|
+
this.validateLibraryLoaded();
|
|
67
|
+
globalThis.ZUnify.UnifiedNavigation.hideModule(moduleKey);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
activateFilterOnModule(moduleKey) {
|
|
71
|
+
this.validateLibraryLoaded();
|
|
72
|
+
globalThis.ZUnify.UnifiedNavigation.activateFitlerOnModule(moduleKey);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
changeDepartment(departmentKey) {
|
|
76
|
+
this.validateLibraryLoaded();
|
|
77
|
+
globalThis.ZUnify.UnifiedNavigation.onSwitcherSelectionComplete(ONE_UNIFICATION.ELEMENTS.DEPARTMENT_SWITCHER, departmentKey);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
expandPanel() {
|
|
81
|
+
this.validateLibraryLoaded();
|
|
82
|
+
globalThis.ZUnify.UnifiedNavigation.setCollapsed(false);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
collapsePanel() {
|
|
86
|
+
this.validateLibraryLoaded();
|
|
87
|
+
globalThis.ZUnify.UnifiedNavigation.setCollapsed(true);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
validateLibraryLoaded() {
|
|
91
|
+
if (!globalThis.ZUnify || !globalThis.ZUnify.UnifiedNavigation) {
|
|
92
|
+
throw new Error('Unification library is not loaded yet.');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
}
|
package/es/platform/components/smart-navigation/applications/usecases/NavigateModuleUseCase.js
ADDED
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
|
|
4
|
+
function createButtonElement(config) {
|
|
5
|
+
return /*#__PURE__*/React.createElement('button', {
|
|
6
|
+
onClick: config.onClick
|
|
7
|
+
}, config.label);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function renderIconSlot(iconSlot, buttonConfig) {
|
|
11
|
+
const container = document.getElementById(iconSlot.id);
|
|
12
|
+
|
|
13
|
+
if (!container) {
|
|
14
|
+
__DEVELOPMENT__ && console.warn(`[CustomElementRenderer] DOM node not found for iconSlot.id: "${iconSlot.id}"`);
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (iconSlot.width !== undefined) container.style.width = `${iconSlot.width}px`;
|
|
19
|
+
if (iconSlot.height !== undefined) container.style.height = `${iconSlot.height}px`;
|
|
20
|
+
ReactDOM.render(createButtonElement(buttonConfig), container);
|
|
21
|
+
return () => ReactDOM.unmountComponentAtNode(container);
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const library = 'one-unification';
|
|
3
|
+
|
|
4
|
+
if (library === 'one-unification') {
|
|
5
|
+
import("./one-unification/SmartNavigation").then(module => {
|
|
6
|
+
const SmartNavigation = module.SmartNavigation;
|
|
7
|
+
return SmartNavigation;
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
/*#__PURE__*/
|
|
11
|
+
React.createElement("div", null, "Unsupported library for Smart Navigation");
|
|
12
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { ONE_UNIFICATION } from "../../../../../cc/one-unification/Constants";
|
|
2
|
+
import { UnifiedNavigationActions } from "./UnifiedNavigationActions";
|
|
3
|
+
export class UnifiedNavigationEvent {
|
|
4
|
+
static defineCallBackProxy(dispatch) {
|
|
5
|
+
return {
|
|
6
|
+
get(target, prop, receiver) {
|
|
7
|
+
return function (args) {
|
|
8
|
+
dispatch({
|
|
9
|
+
type: ONE_UNIFICATION.EVENTS.ACTION_TRIGGERED,
|
|
10
|
+
payload: {
|
|
11
|
+
actionMethod: prop,
|
|
12
|
+
data: args
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
if (target[prop] && target[prop] instanceof Function) {
|
|
17
|
+
return target[prop].apply(this, args);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static getConfigJSON() {
|
|
26
|
+
return {
|
|
27
|
+
AccessibilitySettings: {
|
|
28
|
+
darkModeEnabled: true
|
|
29
|
+
},
|
|
30
|
+
AppsMenu: {
|
|
31
|
+
libraryURL: 'https://one-lab.localzoho.com/zd/library.js?app_name=support&org_id=115233295&zaaid=115233993'
|
|
32
|
+
},
|
|
33
|
+
unifiedNavigation: {
|
|
34
|
+
sidePaneSelector: ONE_UNIFICATION.ELEMENTS.SIDE_PANE,
|
|
35
|
+
topBarSelector: ONE_UNIFICATION.ELEMENTS.TOP_BAR,
|
|
36
|
+
appDisplayName: 'Desk',
|
|
37
|
+
appLogo: 'desk-logo',
|
|
38
|
+
appLogoURL: 'https://www.zohowebstatic.com/sites/zweb/images/desk/images/desk-128.png',
|
|
39
|
+
isInCollapsedState: false
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
onScriptLoad(_ref) {
|
|
45
|
+
let {
|
|
46
|
+
action,
|
|
47
|
+
dispatch
|
|
48
|
+
} = _ref;
|
|
49
|
+
const {
|
|
50
|
+
scriptId
|
|
51
|
+
} = action.payload;
|
|
52
|
+
|
|
53
|
+
if (scriptId !== ONE_UNIFICATION.SCRIPT_ID) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
globalThis.onZUnifyLibReady = () => dispatch({
|
|
58
|
+
type: ONE_UNIFICATION.EVENTS.LIBRARY_READY
|
|
59
|
+
}); // moved to App Level
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
globalThis.onZDLibraryReady = () => dispatch({
|
|
63
|
+
type: ONE_UNIFICATION.EVENTS.ZD_LIBRARY_READY
|
|
64
|
+
}); // moved to App Level
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
onZUnifyReady(_ref2) {
|
|
69
|
+
let {
|
|
70
|
+
state,
|
|
71
|
+
dispatch
|
|
72
|
+
} = _ref2;
|
|
73
|
+
const {
|
|
74
|
+
ZUnify,
|
|
75
|
+
ZUnifyImpl
|
|
76
|
+
} = globalThis;
|
|
77
|
+
ZUnify.register(UnifiedNavigationEvent.getConfigJSON());
|
|
78
|
+
UnifiedNavigationEvent.loadNavigationData({
|
|
79
|
+
state,
|
|
80
|
+
dispatch
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
static loadNavigationData(_ref3) {
|
|
85
|
+
let {
|
|
86
|
+
state,
|
|
87
|
+
dispatch
|
|
88
|
+
} = _ref3;
|
|
89
|
+
const {
|
|
90
|
+
ZUnify,
|
|
91
|
+
ZUnifyImpl
|
|
92
|
+
} = globalThis;
|
|
93
|
+
const {
|
|
94
|
+
model
|
|
95
|
+
} = state.properties;
|
|
96
|
+
ZUnify.UnifiedNavigation.initUIModel(model);
|
|
97
|
+
ZUnifyImpl.UnifiedNavigation = new Proxy(ZUnifyImpl.UnifiedNavigation, UnifiedNavigationEvent.defineCallBackProxy(dispatch));
|
|
98
|
+
dispatch({
|
|
99
|
+
type: ONE_UNIFICATION.EVENTS.UNIFIED_NAVIGATION_INITIALIZED,
|
|
100
|
+
payload: {
|
|
101
|
+
model
|
|
102
|
+
}
|
|
103
|
+
}); // ZUnifyImpl.UnifiedNavigation.clickModule = (...args) => console.log('<DK>', 'click module is also working fine', args[0]);
|
|
104
|
+
} // TODO: Yet to implement this method
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
onZDLibraryReady(_ref4) {
|
|
108
|
+
let {
|
|
109
|
+
state,
|
|
110
|
+
dispatch
|
|
111
|
+
} = _ref4;
|
|
112
|
+
globalThis.ZDLibrary.Launcher.init({
|
|
113
|
+
csrfName: 'crmcsrfparam',
|
|
114
|
+
// Product specific csrf value;
|
|
115
|
+
getCsrfValue: function () {
|
|
116
|
+
return ''; //getCSRFCookie(); // Product specific csrf value;
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
onActionTriggered(_ref5) {
|
|
122
|
+
let {
|
|
123
|
+
action,
|
|
124
|
+
state,
|
|
125
|
+
dispatch
|
|
126
|
+
} = _ref5;
|
|
127
|
+
const {
|
|
128
|
+
actionMethod,
|
|
129
|
+
data
|
|
130
|
+
} = action.payload;
|
|
131
|
+
UnifiedNavigationActions.handle(actionMethod, data, dispatch);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
getHandlers() {
|
|
135
|
+
return {
|
|
136
|
+
[ONE_UNIFICATION.EVENTS.LIBRARY_READY]: this.onZUnifyReady,
|
|
137
|
+
[ONE_UNIFICATION.EVENTS.ZD_LIBRARY_READY]: this.onZDLibraryReady,
|
|
138
|
+
[ONE_UNIFICATION.EVENTS.ACTION_TRIGGERED]: this.onActionTriggered,
|
|
139
|
+
// Library Loader moved to App level
|
|
140
|
+
['LIBRARY_LOADER#SUCCESS']: this.onScriptLoad,
|
|
141
|
+
['LIBRARY_LOADER#FAILURE']: _ref6 => {
|
|
142
|
+
let {
|
|
143
|
+
state,
|
|
144
|
+
action,
|
|
145
|
+
dispatch
|
|
146
|
+
} = _ref6;
|
|
147
|
+
const {
|
|
148
|
+
scriptId,
|
|
149
|
+
error
|
|
150
|
+
} = action.payload;
|
|
151
|
+
console.error(`Failed to load library: ${scriptId}, Error: ${error}`);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createCustomComponent } from "../../../../../library/custom-component";
|
|
3
|
+
import { OneUnifiedNavigationTranslator } from "../../adapters/presenters/OneUnifiedNavigationTranslator";
|
|
4
|
+
import { sdkRegistry } from "../../../../sdk/frameworks/SdkRegistry";
|
|
5
|
+
import ResourceNamesEnum from "../../../../../bc/sdk/ResourceNamesEnum";
|
|
6
|
+
import { SmartNavigationResource } from "../../adapters/resources/SmartNavigationResource";
|
|
7
|
+
import { UnifiedNavigation } from "./UnifiedNavigation";
|
|
8
|
+
import { SmartNavigationProperties } from "../../../../../cc/smart-navigation";
|
|
9
|
+
import { SmartNavigationEvent } from "./SmartNavigationEventHandlers";
|
|
10
|
+
sdkRegistry.registerResource({
|
|
11
|
+
resourceName: ResourceNamesEnum.SMART_NAVIGATION,
|
|
12
|
+
resource: SmartNavigationResource
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
function SmartNavigationView(_ref, ref) {
|
|
16
|
+
let {
|
|
17
|
+
state
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/React.createElement(UnifiedNavigation, {
|
|
20
|
+
getRef: ref,
|
|
21
|
+
model: state
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function constructSmartNavigationBehaviours() {
|
|
26
|
+
// const libraryLoaderBehaviour = LibraryLoaderBehaviour(ONE_UNIFICATION.SCRIPT_ID, 'https://static.localzohocdn.com/zunify/zunify.min.js');
|
|
27
|
+
// const sdkBehaviour = SdkBehaviourFactory.create([ResourceNamesEnum.SMART_NAVIGATION]);
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function constructSmartNavigationEventHandlers() {
|
|
32
|
+
// const unifiedNavigationEventHandlers = new UnifiedNavigationEvent().getHandlers();
|
|
33
|
+
const smartNavigation = new SmartNavigationEvent().getHandlers();
|
|
34
|
+
const defaultEventHandlers = {
|
|
35
|
+
'SmartNavigation#MOUNT': () => {
|
|
36
|
+
sdkRegistry.createResourceInstance({
|
|
37
|
+
resourceName: ResourceNamesEnum.SMART_NAVIGATION,
|
|
38
|
+
instanceName: null
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
return { ...defaultEventHandlers,
|
|
43
|
+
...smartNavigation
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const SmartNavigation = createCustomComponent({
|
|
48
|
+
name: 'SmartNavigation',
|
|
49
|
+
View: SmartNavigationView,
|
|
50
|
+
transformState: OneUnifiedNavigationTranslator,
|
|
51
|
+
behaviours: constructSmartNavigationBehaviours(),
|
|
52
|
+
eventHandlers: constructSmartNavigationEventHandlers(),
|
|
53
|
+
properties: SmartNavigationProperties
|
|
54
|
+
});
|
|
55
|
+
export function createSmartNavigation(_ref2) {
|
|
56
|
+
let {
|
|
57
|
+
dataSource
|
|
58
|
+
} = _ref2;
|
|
59
|
+
const {
|
|
60
|
+
getModules,
|
|
61
|
+
getViews,
|
|
62
|
+
getDepartments,
|
|
63
|
+
getClientActions,
|
|
64
|
+
getLayout,
|
|
65
|
+
getOnDemandModules
|
|
66
|
+
} = dataSource;
|
|
67
|
+
return props => {
|
|
68
|
+
const {
|
|
69
|
+
selectedModule,
|
|
70
|
+
iconMap
|
|
71
|
+
} = props;
|
|
72
|
+
return /*#__PURE__*/React.createElement(SmartNavigation, {
|
|
73
|
+
selectedModule: selectedModule,
|
|
74
|
+
modules: getModules(),
|
|
75
|
+
views: getViews(),
|
|
76
|
+
iconMap: iconMap,
|
|
77
|
+
departments: getDepartments(),
|
|
78
|
+
clientActions: getClientActions(),
|
|
79
|
+
overLayModules: getLayout()?.overLayModules || [],
|
|
80
|
+
onDemandModules: getOnDemandModules?.() || []
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { SmartNavigationConstants } from "../../../../../cc/smart-navigation";
|
|
2
|
+
import { SmartNavigationPresenter } from "../../adapters/presenters/Present";
|
|
3
|
+
import { ONE_UNIFICATION } from "../../../../../cc/one-unification/Constants";
|
|
4
|
+
export class SmartNavigationEvent {
|
|
5
|
+
handleModuleClick(_ref) {
|
|
6
|
+
let {
|
|
7
|
+
action,
|
|
8
|
+
state,
|
|
9
|
+
dispatch
|
|
10
|
+
} = _ref;
|
|
11
|
+
const {
|
|
12
|
+
key: moduleApiName,
|
|
13
|
+
content,
|
|
14
|
+
navigationPathKeys
|
|
15
|
+
} = action.payload;
|
|
16
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
17
|
+
const selectedModule = smartNavigationPresenter.findModule(moduleApiName);
|
|
18
|
+
dispatch({
|
|
19
|
+
type: SmartNavigationConstants.MODULE_CHANGE,
|
|
20
|
+
payload: {
|
|
21
|
+
selectedModule,
|
|
22
|
+
moduleParentApiNames: navigationPathKeys
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
handleAdd(_ref2) {
|
|
28
|
+
let {
|
|
29
|
+
action,
|
|
30
|
+
state,
|
|
31
|
+
dispatch
|
|
32
|
+
} = _ref2;
|
|
33
|
+
const {
|
|
34
|
+
key: moduleApiName,
|
|
35
|
+
content,
|
|
36
|
+
coords,
|
|
37
|
+
navigationPathKeys
|
|
38
|
+
} = action.payload;
|
|
39
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
40
|
+
const selectedModuleData = smartNavigationPresenter.findModule(moduleApiName);
|
|
41
|
+
dispatch({
|
|
42
|
+
type: SmartNavigationConstants.MODULE_ADD,
|
|
43
|
+
payload: {
|
|
44
|
+
newLink: selectedModuleData.newLink,
|
|
45
|
+
currentModule: selectedModuleData,
|
|
46
|
+
moduleParentApiNames: navigationPathKeys
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
handleLoadData(_ref3) {
|
|
52
|
+
let {
|
|
53
|
+
action,
|
|
54
|
+
state,
|
|
55
|
+
dispatch
|
|
56
|
+
} = _ref3;
|
|
57
|
+
const {
|
|
58
|
+
data
|
|
59
|
+
} = action.payload;
|
|
60
|
+
const {
|
|
61
|
+
key: moduleApiName
|
|
62
|
+
} = data;
|
|
63
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
64
|
+
const module = smartNavigationPresenter.findModule(moduleApiName);
|
|
65
|
+
dispatch({
|
|
66
|
+
type: SmartNavigationConstants.LOAD_DATA,
|
|
67
|
+
payload: {
|
|
68
|
+
module
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
handleSearch(_ref4) {
|
|
74
|
+
let {
|
|
75
|
+
action,
|
|
76
|
+
state,
|
|
77
|
+
dispatch
|
|
78
|
+
} = _ref4;
|
|
79
|
+
const {
|
|
80
|
+
key: moduleApiName,
|
|
81
|
+
query
|
|
82
|
+
} = action.payload;
|
|
83
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
84
|
+
const currentModule = smartNavigationPresenter.findModule(moduleApiName);
|
|
85
|
+
dispatch({
|
|
86
|
+
type: SmartNavigationConstants.SEARCH,
|
|
87
|
+
payload: {
|
|
88
|
+
currentModule,
|
|
89
|
+
searchValue: query
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
handleNavigationStateChange(_ref5) {
|
|
95
|
+
let {
|
|
96
|
+
action,
|
|
97
|
+
state,
|
|
98
|
+
dispatch
|
|
99
|
+
} = _ref5;
|
|
100
|
+
const {
|
|
101
|
+
isInCollapsedState
|
|
102
|
+
} = action.payload;
|
|
103
|
+
const eventType = isInCollapsedState ? SmartNavigationConstants.NAVIGATION_PANEL_COLLAPSED : SmartNavigationConstants.NAVIGATION_PANEL_EXPANDED;
|
|
104
|
+
dispatch({
|
|
105
|
+
type: eventType
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
handleCustomAction(_ref6) {
|
|
110
|
+
let {
|
|
111
|
+
action,
|
|
112
|
+
state,
|
|
113
|
+
dispatch
|
|
114
|
+
} = _ref6;
|
|
115
|
+
const {
|
|
116
|
+
action: actionName,
|
|
117
|
+
key: moduleApiName,
|
|
118
|
+
content,
|
|
119
|
+
navigationPathKeys: moduleParentApiNames
|
|
120
|
+
} = action.payload;
|
|
121
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
122
|
+
const currentModule = smartNavigationPresenter.findModule(moduleApiName);
|
|
123
|
+
dispatch({
|
|
124
|
+
type: SmartNavigationConstants.CUSTOM_ACTION,
|
|
125
|
+
payload: {
|
|
126
|
+
actionName,
|
|
127
|
+
currentModule,
|
|
128
|
+
moduleParentApiNames
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
handleDepartmentSwitch(_ref7) {
|
|
134
|
+
let {
|
|
135
|
+
action,
|
|
136
|
+
state,
|
|
137
|
+
dispatch
|
|
138
|
+
} = _ref7;
|
|
139
|
+
const {
|
|
140
|
+
id: departmentApiName
|
|
141
|
+
} = action.payload;
|
|
142
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
143
|
+
const currentDepartment = smartNavigationPresenter.findDepartment(departmentApiName);
|
|
144
|
+
dispatch({
|
|
145
|
+
type: SmartNavigationConstants.DEPARTMENT_SWITCH,
|
|
146
|
+
payload: {
|
|
147
|
+
currentDepartment
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
loadSlotComponents(_ref8) {// const { } = state;
|
|
153
|
+
|
|
154
|
+
let {
|
|
155
|
+
state,
|
|
156
|
+
dispatch
|
|
157
|
+
} = _ref8;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
getHandlers() {
|
|
161
|
+
return {
|
|
162
|
+
[ONE_UNIFICATION.EVENTS.ITEM_CHANGE]: this.handleModuleClick,
|
|
163
|
+
[ONE_UNIFICATION.EVENTS.ITEM_ADD]: this.handleAdd,
|
|
164
|
+
[ONE_UNIFICATION.EVENTS.LOAD_DATA]: this.handleLoadData,
|
|
165
|
+
[ONE_UNIFICATION.EVENTS.SEARCH]: this.handleSearch,
|
|
166
|
+
[ONE_UNIFICATION.EVENTS.NAVIGATION_STATE_CHANGE]: this.handleNavigationStateChange,
|
|
167
|
+
[ONE_UNIFICATION.EVENTS.CUSTOM_ACTION]: this.handleCustomAction,
|
|
168
|
+
[ONE_UNIFICATION.EVENTS.DEPARTMENT_SWITCH]: this.handleDepartmentSwitch,
|
|
169
|
+
[ONE_UNIFICATION.EVENTS.UNIFIED_NAVIGATION_INITIALIZED]: this.loadSlotComponents
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
}
|
package/es/platform/components/smart-navigation/frameworks/one-unification/UnifiedNavigation.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ONE_UNIFICATION } from "../../../../../cc/one-unification/Constants";
|
|
3
|
+
import styles from "./SmartNavigation.module.css";
|
|
4
|
+
import { createCustomComponent } from "../../../../../library/custom-component";
|
|
5
|
+
import { LibraryLoaderBehaviour } from "../../../../../library/behaviours/library-loader/frameworks/LibraryLoaderBehaviour";
|
|
6
|
+
import { UnifiedNavigationEvent } from "./OneUnificationEventHandlers";
|
|
7
|
+
|
|
8
|
+
function UnifiedNavigationView(_ref, ref) {
|
|
9
|
+
let {} = _ref;
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
id: ONE_UNIFICATION.ELEMENTS.SIDE_PANE,
|
|
12
|
+
ref: ref,
|
|
13
|
+
className: styles.smartNavigation
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function constructUnifiedNavigationBehaviours() {
|
|
18
|
+
const libraryLoaderBehaviour = LibraryLoaderBehaviour(ONE_UNIFICATION.SCRIPT_ID, 'https://static.localzohocdn.com/zunify/zunify.min.js');
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function constructUnifiedNavigationEventHandlers() {
|
|
23
|
+
const unifiedNavigationEventHandlers = new UnifiedNavigationEvent().getHandlers();
|
|
24
|
+
const defaultEventHandlers = {
|
|
25
|
+
['UnifiedNavigation#MOUNT']: UnifiedNavigationEvent.loadNavigationData
|
|
26
|
+
};
|
|
27
|
+
return { ...defaultEventHandlers,
|
|
28
|
+
...unifiedNavigationEventHandlers
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const UnifiedNavigation = createCustomComponent({
|
|
33
|
+
name: 'UnifiedNavigation',
|
|
34
|
+
View: UnifiedNavigationView,
|
|
35
|
+
properties: {
|
|
36
|
+
model: {
|
|
37
|
+
required: false,
|
|
38
|
+
defaultValue: [],
|
|
39
|
+
typeMetadata: {
|
|
40
|
+
schema: {
|
|
41
|
+
type: 'object'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
behaviours: constructUnifiedNavigationBehaviours(),
|
|
47
|
+
eventHandlers: constructUnifiedNavigationEventHandlers()
|
|
48
|
+
});
|