@zohodesk/library-platform 1.1.12 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/.DS_Store +0 -0
- 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 +1 -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/LifeCycleEventsEnum.js +1 -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/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/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 +2 -1
- 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/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/.DS_Store +0 -0
- 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/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/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 +2 -1
- package/es/platform/components/smart-action-band/adapters/presenters/ActionBandTranslator.js +132 -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/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/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 +9 -0
- 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 +57 -13
- 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 +26 -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
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import EmptyViewModel from "./EmptyViewModel";
|
|
2
2
|
import * as FieldTranslators from "./fields";
|
|
3
3
|
import ClientActionsTranslator from "../../../../client-actions/translators/client-actions-translator";
|
|
4
|
+
import { isValidFieldVariation } from "./FieldVariations";
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
function getLookupUrlConstructions(_ref) {
|
|
6
|
+
function ColumnTranslator(_ref) {
|
|
7
7
|
let {
|
|
8
8
|
field,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
record,
|
|
10
|
+
fieldComponentMapping,
|
|
11
|
+
fieldActions,
|
|
12
|
+
context,
|
|
13
|
+
preferences,
|
|
14
|
+
instanceName,
|
|
15
|
+
moduleName,
|
|
16
|
+
textOverflowConfig,
|
|
17
|
+
nameFieldsConfig,
|
|
18
|
+
recordReadStatusConfig,
|
|
19
|
+
componentMapping
|
|
11
20
|
} = _ref;
|
|
12
|
-
let {
|
|
13
|
-
orgName,
|
|
14
|
-
departmentName
|
|
15
|
-
} = context;
|
|
16
|
-
let lookupModuleName = field?.lookup?.module?.apiName;
|
|
17
|
-
return `/agent/${orgName}/${departmentName}/${lookupModuleName}/details/${value.id}`;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, textOverflowConfig, moduleName, nameFieldsConfig, recordReadStatusConfig) {
|
|
21
21
|
const {
|
|
22
22
|
isCustomField,
|
|
23
23
|
name,
|
|
@@ -32,7 +32,6 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
32
32
|
__DEVELOPMENT__ && console.warn(`The string format for componentMapping will soon be deprecated. Please update to the new JSON format. REF : ${JSON.stringify(fieldEntry)}`);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
let tempValue = undefined;
|
|
36
35
|
let value = isCustomField ? record.cf?.[name] : record[name];
|
|
37
36
|
const actions = ClientActionsTranslator.transform(fieldActions, instanceName, moduleName, {
|
|
38
37
|
field,
|
|
@@ -43,8 +42,12 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
43
42
|
return EmptyViewModel(name);
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
if (
|
|
47
|
-
field.uiType
|
|
45
|
+
if (field.uiType && !isValidFieldVariation(type, field.uiType)) {
|
|
46
|
+
__DEVELOPMENT__ && console.warn(`The uiType ${field.uiType} is not a valid variation for field type ${type}. Ignoring the uiType.`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (typeof fieldEntry === 'string') {
|
|
50
|
+
field.uiType = fieldEntry;
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
let nameFieldTypes = ['Text'];
|
|
@@ -58,22 +61,9 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
58
61
|
return EmptyViewModel(name);
|
|
59
62
|
}
|
|
60
63
|
|
|
61
|
-
if (field.type == "LookUp") {
|
|
62
|
-
// temp fix for when lookup field don't have value !object
|
|
63
|
-
tempValue = typeof value !== 'object' ? {
|
|
64
|
-
name: value,
|
|
65
|
-
id: value
|
|
66
|
-
} : value;
|
|
67
|
-
tempValue.url = getLookupUrlConstructions({
|
|
68
|
-
field,
|
|
69
|
-
value,
|
|
70
|
-
context
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
64
|
const translatorArgs = {
|
|
75
65
|
field,
|
|
76
|
-
value
|
|
66
|
+
value,
|
|
77
67
|
appendToActionPayload: {
|
|
78
68
|
recordId: record.id
|
|
79
69
|
},
|
|
@@ -96,31 +86,49 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
96
86
|
...fieldTranslator(translatorArgs)
|
|
97
87
|
};
|
|
98
88
|
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (fieldEntry.fieldToUIComponentTranslator) {
|
|
103
|
-
viewModel.value = fieldEntry.fieldToUIComponentTranslator({
|
|
104
|
-
field,
|
|
105
|
-
record,
|
|
106
|
-
context
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (fieldEntry.translator) {
|
|
111
|
-
const newViewModel = fieldEntry.translator({
|
|
89
|
+
if (componentMapping && componentMapping.translator) {
|
|
90
|
+
return { ...viewModel,
|
|
91
|
+
...componentMapping.translator({
|
|
112
92
|
viewModel,
|
|
113
93
|
field,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
94
|
+
record,
|
|
95
|
+
context,
|
|
96
|
+
preferences
|
|
97
|
+
})
|
|
98
|
+
};
|
|
99
|
+
} else {
|
|
100
|
+
//will be deprecated soon
|
|
101
|
+
if (fieldEntry && typeof fieldEntry === 'object') {
|
|
102
|
+
viewModel.type = fieldEntry.UIComponentName;
|
|
103
|
+
|
|
104
|
+
if (fieldEntry.fieldToUIComponentTranslator) {
|
|
105
|
+
viewModel.value = fieldEntry.fieldToUIComponentTranslator({
|
|
106
|
+
field,
|
|
107
|
+
record,
|
|
108
|
+
context
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (fieldEntry.translator) {
|
|
113
|
+
const newViewModel = fieldEntry.translator({
|
|
114
|
+
viewModel: viewModel,
|
|
115
|
+
field,
|
|
116
|
+
record,
|
|
117
|
+
context,
|
|
118
|
+
preferences
|
|
119
|
+
});
|
|
120
|
+
return { ...newViewModel,
|
|
121
|
+
type: fieldEntry.UIComponentName ? fieldEntry.UIComponentName : field.uiType,
|
|
122
|
+
appendToActionPayload: {
|
|
123
|
+
recordId: record.id,
|
|
124
|
+
...newViewModel.appendToActionPayload
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
118
128
|
}
|
|
119
129
|
|
|
120
130
|
return viewModel;
|
|
121
131
|
}
|
|
122
|
-
|
|
123
|
-
return viewModel;
|
|
124
132
|
}
|
|
125
133
|
|
|
126
134
|
export default ColumnTranslator;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import FieldTypes from "../../../../../cc/fields/field/Types";
|
|
2
|
+
const variationsMap = {
|
|
3
|
+
'Boolean': [FieldTypes.CheckboxField, FieldTypes.SwitchField] // 'Date': ['DatePicker', 'DateTimePicker'],
|
|
4
|
+
// 'Text': ['SingleLineText', 'MultiLineText', 'RichText'],
|
|
5
|
+
// Add more field types and their variations as needed
|
|
6
|
+
|
|
7
|
+
};
|
|
8
|
+
export const isValidFieldVariation = (fieldType, uiType) => {
|
|
9
|
+
const validVariations = variationsMap[fieldType];
|
|
10
|
+
return validVariations ? validVariations.includes(uiType) : false;
|
|
11
|
+
};
|
|
12
|
+
/*
|
|
13
|
+
|
|
14
|
+
Smart Table Field UI Variants:
|
|
15
|
+
• Boolean - CheckBox, Switch, Text
|
|
16
|
+
• Lookup - Link, Tag (Chip), LabeledAvatar
|
|
17
|
+
• SingleLine - Text, Link (Name field)
|
|
18
|
+
• MultiPicklist - TagsList, TagsDropdown
|
|
19
|
+
• ColoredMultiPicklist - TagsList
|
|
20
|
+
• ColoredPicklist - ColoredTag
|
|
21
|
+
• URL - Link, Text
|
|
22
|
+
• Email - Email
|
|
23
|
+
• Date, DateTime, Picklist, Currency, Integer, Decimal, Phone, Percentage - Text
|
|
24
|
+
|
|
25
|
+
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Alignment } from "../../../../../cc/table-list/data-types/Header";
|
|
2
2
|
import ClientActionsTranslator from "../../../../client-actions/translators/client-actions-translator";
|
|
3
|
-
import {
|
|
3
|
+
import { SortModelOrder } from "../../../../zlist/domain/entities/interfaces/Properties";
|
|
4
4
|
import { i18NProviderUtils } from '@zohodesk/i18n';
|
|
5
|
+
import { SortOrder } from "../../../../../bc/zlist/Types";
|
|
5
6
|
|
|
6
|
-
function HeaderTranslator(field, actions, context, modifiedWidths,
|
|
7
|
+
function HeaderTranslator(field, actions, context, modifiedWidths, sortConfig, records, instanceName, moduleName) {
|
|
7
8
|
const {
|
|
8
9
|
id,
|
|
9
10
|
name,
|
|
@@ -11,7 +12,7 @@ function HeaderTranslator(field, actions, context, modifiedWidths, sortBy, recor
|
|
|
11
12
|
isSortable
|
|
12
13
|
} = field;
|
|
13
14
|
const newField = { ...field,
|
|
14
|
-
sort: translateSortBy(field.
|
|
15
|
+
sort: translateSortBy(field.name, sortConfig)
|
|
15
16
|
};
|
|
16
17
|
const transformedActions = ClientActionsTranslator.transform(actions, instanceName, moduleName, { ...context,
|
|
17
18
|
field: newField,
|
|
@@ -30,26 +31,33 @@ function HeaderTranslator(field, actions, context, modifiedWidths, sortBy, recor
|
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
export default HeaderTranslator;
|
|
34
|
+
const defaultSortBy = {
|
|
35
|
+
name: '',
|
|
36
|
+
order: SortModelOrder.NONE,
|
|
37
|
+
// FIX: i18n key
|
|
38
|
+
tooltip: 'Click to Sort'
|
|
39
|
+
};
|
|
33
40
|
|
|
34
|
-
function translateSortBy(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
41
|
+
function translateSortBy(name, sortConfig) {
|
|
42
|
+
if (!sortConfig || !name || !sortConfig.fieldName || name !== sortConfig.fieldName) {
|
|
43
|
+
return defaultSortBy;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (sortConfig.order === SortOrder.ASC) {
|
|
47
|
+
return {
|
|
48
|
+
name: sortConfig.fieldName,
|
|
49
|
+
order: SortModelOrder.ASC,
|
|
50
|
+
tooltip: i18NProviderUtils.getI18NValue('support.localization.tooltip.descending')
|
|
51
|
+
};
|
|
52
|
+
}
|
|
38
53
|
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
newSortBy.tooltip = i18NProviderUtils.getI18NValue("support.localization.tooltip.ascending");
|
|
46
|
-
} else if (newSortBy.order === SortOrder.NONE) {
|
|
47
|
-
newSortBy.tooltip = 'Click to Sort';
|
|
48
|
-
}
|
|
49
|
-
} else {
|
|
50
|
-
newSortBy.order = SortOrder.NONE;
|
|
51
|
-
newSortBy.tooltip = 'Click to Sort';
|
|
54
|
+
if (sortConfig.order === SortOrder.DES) {
|
|
55
|
+
return {
|
|
56
|
+
name: sortConfig.fieldName,
|
|
57
|
+
order: SortModelOrder.DES,
|
|
58
|
+
tooltip: i18NProviderUtils.getI18NValue('support.localization.tooltip.ascending')
|
|
59
|
+
};
|
|
52
60
|
}
|
|
53
61
|
|
|
54
|
-
return
|
|
62
|
+
return defaultSortBy;
|
|
55
63
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import HeaderTranslator from "./Header";
|
|
2
2
|
export default class HeadersTranslator {
|
|
3
|
-
constructor(fields, actions, context, modifiedWidths,
|
|
3
|
+
constructor(fields, actions, context, modifiedWidths, sortConfig, records, instanceName, moduleName) {
|
|
4
4
|
this.fields = fields;
|
|
5
5
|
this.actions = actions;
|
|
6
6
|
this.context = context;
|
|
7
7
|
this.modifiedWidths = modifiedWidths;
|
|
8
|
-
this.
|
|
8
|
+
this.sortConfig = sortConfig;
|
|
9
9
|
this.records = records;
|
|
10
10
|
this.instanceName = instanceName;
|
|
11
11
|
this.moduleName = moduleName;
|
|
@@ -17,7 +17,7 @@ export default class HeadersTranslator {
|
|
|
17
17
|
return [];
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
return this.fields.map(field => HeaderTranslator(field, this.actions, this.context, this.modifiedWidths, this.
|
|
20
|
+
return this.fields.map(field => HeaderTranslator(field, this.actions, this.context, this.modifiedWidths, this.sortConfig, this.records, this.instanceName, this.moduleName));
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
pipe(viewModel) {
|
|
@@ -14,14 +14,28 @@ export default function RowTranslator(_ref) {
|
|
|
14
14
|
textOverflowConfig,
|
|
15
15
|
moduleName,
|
|
16
16
|
nameFieldsConfig,
|
|
17
|
-
recordReadStatusConfig
|
|
17
|
+
recordReadStatusConfig,
|
|
18
|
+
componentMapping
|
|
18
19
|
} = _ref;
|
|
19
20
|
const actions = ClientActionsTranslator.transform(rowActions, instanceName, moduleName, { ...context,
|
|
20
21
|
record
|
|
21
22
|
});
|
|
22
23
|
return {
|
|
23
24
|
id: record.id,
|
|
24
|
-
columns: fields.map(field => ColumnTranslator(
|
|
25
|
+
columns: fields.map(field => ColumnTranslator({
|
|
26
|
+
field,
|
|
27
|
+
record,
|
|
28
|
+
fieldComponentMapping,
|
|
29
|
+
fieldActions,
|
|
30
|
+
context,
|
|
31
|
+
preferences,
|
|
32
|
+
instanceName,
|
|
33
|
+
moduleName,
|
|
34
|
+
textOverflowConfig,
|
|
35
|
+
nameFieldsConfig,
|
|
36
|
+
recordReadStatusConfig,
|
|
37
|
+
componentMapping: componentMapping.find(item => item.fieldName === field.name)
|
|
38
|
+
})),
|
|
25
39
|
rowActionLocation: {
|
|
26
40
|
type: rowActionsUiType,
|
|
27
41
|
actions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import RowTranslator from "./Row";
|
|
2
2
|
export default class RowsTranslator {
|
|
3
|
-
constructor(records, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, textOverflowConfig, moduleName, nameFieldsConfig, recordReadStatusConfig) {
|
|
3
|
+
constructor(records, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, textOverflowConfig, moduleName, nameFieldsConfig, recordReadStatusConfig, componentMapping) {
|
|
4
4
|
this.records = records;
|
|
5
5
|
this.fields = fields;
|
|
6
6
|
this.rowActions = rowActions;
|
|
@@ -14,6 +14,7 @@ export default class RowsTranslator {
|
|
|
14
14
|
this.moduleName = moduleName;
|
|
15
15
|
this.nameFieldsConfig = nameFieldsConfig;
|
|
16
16
|
this.recordReadStatusConfig = recordReadStatusConfig;
|
|
17
|
+
this.componentMapping = componentMapping;
|
|
17
18
|
this.pipe = this.pipe.bind(this);
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -23,6 +24,7 @@ export default class RowsTranslator {
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
return this.records.map(record => RowTranslator({
|
|
27
|
+
componentMapping: this.componentMapping,
|
|
26
28
|
record,
|
|
27
29
|
fields: this.fields,
|
|
28
30
|
fieldComponentMapping: this.fieldComponentMapping,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
2
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
3
|
-
import BooleanFieldModel from "../../../../../../cc/fields/boolean/Model";
|
|
4
3
|
|
|
5
4
|
const BooleanFieldTranslator = _ref => {
|
|
6
5
|
let {
|
|
@@ -12,23 +11,99 @@ const BooleanFieldTranslator = _ref => {
|
|
|
12
11
|
} = _ref;
|
|
13
12
|
const {
|
|
14
13
|
uiType,
|
|
15
|
-
name
|
|
14
|
+
name,
|
|
15
|
+
displayLabel
|
|
16
16
|
} = field;
|
|
17
|
+
let newValue = value;
|
|
17
18
|
|
|
18
19
|
if (value === 'true') {
|
|
19
|
-
|
|
20
|
+
newValue = true;
|
|
20
21
|
} else if (value === 'false') {
|
|
21
|
-
|
|
22
|
+
newValue = false;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
switch (uiType) {
|
|
26
|
+
case FieldTypes.TextField:
|
|
27
|
+
return {
|
|
28
|
+
type: FieldTypes.TextField,
|
|
29
|
+
fieldName: name,
|
|
30
|
+
text: value,
|
|
31
|
+
isDotted: textOverflowMode === 'clip',
|
|
32
|
+
weight: isRead ? undefined : 'bold',
|
|
33
|
+
tooltip: value,
|
|
34
|
+
appendToActionPayload,
|
|
35
|
+
isRead,
|
|
36
|
+
textOverflowMode
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
case FieldTypes.HighlightedValueField:
|
|
40
|
+
return {
|
|
41
|
+
type: FieldTypes.HighlightedValueField,
|
|
42
|
+
fieldName: name,
|
|
43
|
+
text: value,
|
|
44
|
+
color: newValue ? 'green' : 'red',
|
|
45
|
+
tooltip: value,
|
|
46
|
+
cursor: 'default',
|
|
47
|
+
appendToActionPayload,
|
|
48
|
+
isRead,
|
|
49
|
+
textOverflowMode
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
case FieldTypes.RadioDropdownField:
|
|
53
|
+
{
|
|
54
|
+
const options = [{
|
|
55
|
+
id: 'true',
|
|
56
|
+
value: 'true',
|
|
57
|
+
secondaryValue: ''
|
|
58
|
+
}, {
|
|
59
|
+
id: 'false',
|
|
60
|
+
value: 'false',
|
|
61
|
+
secondaryValue: ''
|
|
62
|
+
}];
|
|
63
|
+
const highlightedValueColor = newValue ? 'green' : 'red';
|
|
64
|
+
return {
|
|
65
|
+
type: FieldTypes.RadioDropdownField,
|
|
66
|
+
fieldName: name,
|
|
67
|
+
fieldType: 'boolean',
|
|
68
|
+
options,
|
|
69
|
+
color: highlightedValueColor,
|
|
70
|
+
selectedId: value,
|
|
71
|
+
selectedValue: value,
|
|
72
|
+
dropdownHeading: displayLabel,
|
|
73
|
+
isDotted: textOverflowMode === 'clip',
|
|
74
|
+
weight: isRead ? undefined : 'bold',
|
|
75
|
+
hasSearch: false,
|
|
76
|
+
isDisabled: false,
|
|
77
|
+
isReadOnly: false,
|
|
78
|
+
appendToActionPayload,
|
|
79
|
+
isRead,
|
|
80
|
+
textOverflowMode
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
case FieldTypes.SwitchField:
|
|
85
|
+
return {
|
|
86
|
+
type: FieldTypes.SwitchField,
|
|
87
|
+
fieldName: name,
|
|
88
|
+
checked: newValue,
|
|
89
|
+
disabled: false,
|
|
90
|
+
tooltip: '',
|
|
91
|
+
appendToActionPayload,
|
|
92
|
+
isRead,
|
|
93
|
+
textOverflowMode
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
case FieldTypes.CheckboxField:
|
|
97
|
+
default:
|
|
98
|
+
return {
|
|
99
|
+
type: FieldTypes.CheckboxField,
|
|
100
|
+
fieldName: name,
|
|
101
|
+
checked: newValue,
|
|
102
|
+
appendToActionPayload,
|
|
103
|
+
isRead,
|
|
104
|
+
textOverflowMode
|
|
105
|
+
};
|
|
106
|
+
}
|
|
32
107
|
};
|
|
33
108
|
|
|
34
109
|
export default BooleanFieldTranslator;
|
|
@@ -1,7 +1,49 @@
|
|
|
1
1
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
|
-
import CurrencyFieldModel from "../../../../../../cc/fields/currency/Model";
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
function isValidNumber() {
|
|
4
|
+
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
5
|
+
const rejexPattern = new RegExp('^(\\d+\\.?\\d*|\\.\\d+)$');
|
|
6
|
+
const isValidInt = rejexPattern.test(value);
|
|
7
|
+
return isValidInt;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function formatCurrency(_ref) {
|
|
11
|
+
let {
|
|
12
|
+
value,
|
|
13
|
+
locale = 'IN',
|
|
14
|
+
symbol = 'Rs.'
|
|
15
|
+
} = _ref;
|
|
16
|
+
const isValidInt = isValidNumber(value);
|
|
17
|
+
|
|
18
|
+
if (isValidInt && symbol) {
|
|
19
|
+
const currencyArr = new Intl.NumberFormat(`en-${locale}`).formatToParts(value);
|
|
20
|
+
let currencyVal = '';
|
|
21
|
+
currencyArr.map(val => {
|
|
22
|
+
if (val.type == 'group') {
|
|
23
|
+
currencyVal += ',';
|
|
24
|
+
} else if (val.type == 'integer') {
|
|
25
|
+
currencyVal += val.value;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
if (value.indexOf('.') != -1) {
|
|
30
|
+
const fractionVal = value.split(".")[1];
|
|
31
|
+
|
|
32
|
+
for (let i = fractionVal.length - 1; i >= 0; i--) {
|
|
33
|
+
if (fractionVal[i] != 0) {
|
|
34
|
+
currencyVal += `.${fractionVal.slice(0, i + 1)}`;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return `${symbol}${currencyVal}`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const CurrencyFieldTranslator = _ref2 => {
|
|
5
47
|
let {
|
|
6
48
|
field,
|
|
7
49
|
value,
|
|
@@ -10,7 +52,7 @@ const CurrencyFieldTranslator = _ref => {
|
|
|
10
52
|
preferences,
|
|
11
53
|
textOverflowMode,
|
|
12
54
|
isRead
|
|
13
|
-
} =
|
|
55
|
+
} = _ref2;
|
|
14
56
|
const {
|
|
15
57
|
uiType,
|
|
16
58
|
name
|
|
@@ -19,16 +61,29 @@ const CurrencyFieldTranslator = _ref => {
|
|
|
19
61
|
let contextCurrencyLocale = context?.currencyLocale;
|
|
20
62
|
let prefCurrencySymbol = preferences?.fields?.[field.apiName]?.currencySymbol;
|
|
21
63
|
let contextCurrencySymbol = context?.currencySymbol;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
name,
|
|
26
|
-
currencyLocale: prefCurrencyLocale || contextCurrencyLocale,
|
|
27
|
-
currencySymbol: prefCurrencySymbol || contextCurrencySymbol,
|
|
28
|
-
isRead,
|
|
64
|
+
let locale = prefCurrencyLocale || contextCurrencyLocale;
|
|
65
|
+
let symbol = prefCurrencySymbol || contextCurrencySymbol;
|
|
66
|
+
let formatedValue = formatCurrency({
|
|
29
67
|
value,
|
|
30
|
-
|
|
68
|
+
locale,
|
|
69
|
+
symbol
|
|
31
70
|
});
|
|
71
|
+
|
|
72
|
+
switch (uiType) {
|
|
73
|
+
case FieldTypes.TextField:
|
|
74
|
+
default:
|
|
75
|
+
return {
|
|
76
|
+
type: FieldTypes.TextField,
|
|
77
|
+
fieldName: name,
|
|
78
|
+
text: formatedValue,
|
|
79
|
+
isDotted: textOverflowMode === 'clip',
|
|
80
|
+
weight: isRead ? undefined : 'bold',
|
|
81
|
+
tooltip: formatedValue,
|
|
82
|
+
appendToActionPayload,
|
|
83
|
+
isRead,
|
|
84
|
+
textOverflowMode
|
|
85
|
+
};
|
|
86
|
+
}
|
|
32
87
|
};
|
|
33
88
|
|
|
34
89
|
export default CurrencyFieldTranslator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
2
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
3
|
-
import
|
|
3
|
+
import { DateAndTimeFormat } from "../../utils/DateAndTimeFormat";
|
|
4
4
|
|
|
5
5
|
const DateFieldTranslator = _ref => {
|
|
6
6
|
let {
|
|
@@ -8,20 +8,45 @@ const DateFieldTranslator = _ref => {
|
|
|
8
8
|
value,
|
|
9
9
|
appendToActionPayload,
|
|
10
10
|
textOverflowMode,
|
|
11
|
-
isRead
|
|
11
|
+
isRead,
|
|
12
|
+
context
|
|
12
13
|
} = _ref;
|
|
13
14
|
const {
|
|
14
15
|
uiType,
|
|
15
16
|
name
|
|
16
17
|
} = field;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const {
|
|
19
|
+
dateFormat,
|
|
20
|
+
timeFormat,
|
|
21
|
+
delimiter,
|
|
22
|
+
isShortenDateTimeInfo
|
|
23
|
+
} = context.dateTimeFormat; // const appContext = platformSDK.app.getContext();
|
|
24
|
+
// const { dateFormat, timeFormat, delimiter } = appContext.dateTimeFormat;
|
|
25
|
+
|
|
26
|
+
const newDateValue = DateAndTimeFormat({
|
|
27
|
+
dateFormatType: dateFormat,
|
|
28
|
+
timeFormatType: timeFormat,
|
|
29
|
+
delimiter: delimiter,
|
|
22
30
|
value,
|
|
23
|
-
|
|
31
|
+
isDateTimeField: false,
|
|
32
|
+
isShortenDateTimeInfo
|
|
24
33
|
});
|
|
34
|
+
|
|
35
|
+
switch (uiType) {
|
|
36
|
+
case FieldTypes.TextField:
|
|
37
|
+
default:
|
|
38
|
+
return {
|
|
39
|
+
type: FieldTypes.TextField,
|
|
40
|
+
fieldName: name,
|
|
41
|
+
text: newDateValue,
|
|
42
|
+
isDotted: textOverflowMode === 'clip',
|
|
43
|
+
weight: isRead ? undefined : 'bold',
|
|
44
|
+
tooltip: newDateValue,
|
|
45
|
+
appendToActionPayload,
|
|
46
|
+
isRead,
|
|
47
|
+
textOverflowMode
|
|
48
|
+
};
|
|
49
|
+
}
|
|
25
50
|
};
|
|
26
51
|
|
|
27
52
|
export default DateFieldTranslator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
2
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
3
|
-
import
|
|
3
|
+
import { DateAndTimeFormat } from "../../utils/DateAndTimeFormat";
|
|
4
4
|
|
|
5
5
|
const DateTimeFieldTranslator = _ref => {
|
|
6
6
|
let {
|
|
@@ -8,20 +8,45 @@ const DateTimeFieldTranslator = _ref => {
|
|
|
8
8
|
value,
|
|
9
9
|
appendToActionPayload,
|
|
10
10
|
textOverflowMode,
|
|
11
|
-
isRead
|
|
11
|
+
isRead,
|
|
12
|
+
context
|
|
12
13
|
} = _ref;
|
|
13
14
|
const {
|
|
14
15
|
uiType,
|
|
15
16
|
name
|
|
16
17
|
} = field;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const {
|
|
19
|
+
dateFormat,
|
|
20
|
+
timeFormat,
|
|
21
|
+
delimiter,
|
|
22
|
+
isShortenDateTimeInfo
|
|
23
|
+
} = context.dateTimeFormat; // const appContext = platformSDK.app.getContext();
|
|
24
|
+
// const { dateFormat, timeFormat, delimiter } = appContext.dateTimeFormat;
|
|
25
|
+
|
|
26
|
+
const newDateValue = DateAndTimeFormat({
|
|
27
|
+
dateFormatType: dateFormat,
|
|
28
|
+
timeFormatType: timeFormat,
|
|
29
|
+
delimiter: delimiter,
|
|
22
30
|
value,
|
|
23
|
-
|
|
31
|
+
isDateTimeField: true,
|
|
32
|
+
isShortenDateTimeInfo
|
|
24
33
|
});
|
|
34
|
+
|
|
35
|
+
switch (uiType) {
|
|
36
|
+
case FieldTypes.TextField:
|
|
37
|
+
default:
|
|
38
|
+
return {
|
|
39
|
+
type: FieldTypes.TextField,
|
|
40
|
+
fieldName: name,
|
|
41
|
+
text: newDateValue,
|
|
42
|
+
isDotted: textOverflowMode === 'clip',
|
|
43
|
+
weight: isRead ? undefined : 'bold',
|
|
44
|
+
tooltip: newDateValue,
|
|
45
|
+
appendToActionPayload,
|
|
46
|
+
isRead,
|
|
47
|
+
textOverflowMode
|
|
48
|
+
};
|
|
49
|
+
}
|
|
25
50
|
};
|
|
26
51
|
|
|
27
52
|
export default DateTimeFieldTranslator;
|