@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
|
@@ -19,6 +19,13 @@ export const platformSDK_old = {
|
|
|
19
19
|
});
|
|
20
20
|
},
|
|
21
21
|
|
|
22
|
+
[ResourceNamesEnum.SMART_ACTION_BAND](instanceName) {
|
|
23
|
+
return sdkRegistry.getResourceInstance({
|
|
24
|
+
resourceName: ResourceNamesEnum.SMART_ACTION_BAND,
|
|
25
|
+
instanceName: instanceName
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
|
|
22
29
|
[ResourceNamesEnum.CLIENT_ACTION](instanceName) {
|
|
23
30
|
return sdkRegistry.getResourceInstance({
|
|
24
31
|
resourceName: ResourceNamesEnum.CLIENT_ACTION,
|
|
@@ -2,7 +2,9 @@ import { AbstractController } from "./AbstractController";
|
|
|
2
2
|
export class InitializeController extends AbstractController {
|
|
3
3
|
handle(_ref) {
|
|
4
4
|
let {
|
|
5
|
-
state
|
|
5
|
+
state,
|
|
6
|
+
dispatch,
|
|
7
|
+
updateState
|
|
6
8
|
} = _ref;
|
|
7
9
|
const {
|
|
8
10
|
service
|
|
@@ -12,7 +14,10 @@ export class InitializeController extends AbstractController {
|
|
|
12
14
|
createResourceInstanceUseCase
|
|
13
15
|
} = service;
|
|
14
16
|
createResourceInstanceUseCase.execute({
|
|
15
|
-
instanceName
|
|
17
|
+
instanceName,
|
|
18
|
+
state,
|
|
19
|
+
dispatch,
|
|
20
|
+
updateState
|
|
16
21
|
});
|
|
17
22
|
}
|
|
18
23
|
|
|
@@ -2,13 +2,22 @@ import AbstractUseCase from "../AbstractUseCase";
|
|
|
2
2
|
export class CreateResourceInstanceUseCase extends AbstractUseCase {
|
|
3
3
|
execute(_ref) {
|
|
4
4
|
let {
|
|
5
|
-
instanceName
|
|
5
|
+
instanceName,
|
|
6
|
+
state,
|
|
7
|
+
dispatch,
|
|
8
|
+
updateState
|
|
6
9
|
} = _ref;
|
|
7
10
|
const {
|
|
8
11
|
repository
|
|
9
12
|
} = this.dependencies;
|
|
10
13
|
const behaviourResourceConnector = repository.getBehaviourResourceConnector();
|
|
11
14
|
behaviourResourceConnector.createResourceInstances(instanceName);
|
|
15
|
+
behaviourResourceConnector.syncStateWithResources({
|
|
16
|
+
instanceName,
|
|
17
|
+
state,
|
|
18
|
+
dispatch,
|
|
19
|
+
updateState
|
|
20
|
+
});
|
|
12
21
|
}
|
|
13
22
|
|
|
14
23
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { DATA_SOURCE_EXECUTE } from "../../../../bc/zdata-source/Constants";
|
|
1
2
|
import AbstractUseCase from "./AbstractUseCase";
|
|
3
|
+
import { DATA_SOURCE_FAILURE, DATA_SOURCE_NO_CONTENT, DATA_SOURCE_SUCCESS } from "../../../../bc/zdata-source/Symbols";
|
|
2
4
|
|
|
3
5
|
class FetchSuccessUseCase extends AbstractUseCase {
|
|
4
6
|
execute(input) {
|
|
@@ -16,6 +18,11 @@ class FetchSuccessUseCase extends AbstractUseCase {
|
|
|
16
18
|
} = metaData;
|
|
17
19
|
const fieldManager = repository.getFieldManager();
|
|
18
20
|
|
|
21
|
+
if (String(apiName) === 'getComponentMapping') {
|
|
22
|
+
fieldManager.setFields(fields, apiName);
|
|
23
|
+
presenter.updateFields(fieldManager.toObject());
|
|
24
|
+
}
|
|
25
|
+
|
|
19
26
|
if (!fieldManager.isFieldFetching(metaData)) {
|
|
20
27
|
return;
|
|
21
28
|
}
|
|
@@ -23,6 +30,32 @@ class FetchSuccessUseCase extends AbstractUseCase {
|
|
|
23
30
|
fieldManager.setFields(fields, apiName);
|
|
24
31
|
fieldManager.stopFetching(apiName);
|
|
25
32
|
presenter.updateFields(fieldManager.toObject());
|
|
33
|
+
dispatch({
|
|
34
|
+
type: DATA_SOURCE_EXECUTE,
|
|
35
|
+
payload: {
|
|
36
|
+
props: {},
|
|
37
|
+
actionName: 'getComponentMapping'
|
|
38
|
+
},
|
|
39
|
+
metaData: {
|
|
40
|
+
actionName: 'getComponentMapping',
|
|
41
|
+
[DATA_SOURCE_SUCCESS]: {
|
|
42
|
+
metaData: {
|
|
43
|
+
apiName: 'getComponentMapping'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
[DATA_SOURCE_NO_CONTENT]: {
|
|
47
|
+
metaData: {
|
|
48
|
+
apiName: 'getComponentMapping'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
[DATA_SOURCE_FAILURE]: {
|
|
52
|
+
metaData: {
|
|
53
|
+
apiName: 'getComponentMapping',
|
|
54
|
+
actionName: 'getComponentMapping'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
26
59
|
dispatch(fieldManager.createSuccessAction(fields, metaData));
|
|
27
60
|
}
|
|
28
61
|
|
|
@@ -5,10 +5,12 @@ import { DATA_SOURCE_FAILURE, DATA_SOURCE_NO_CONTENT, DATA_SOURCE_SUCCESS } from
|
|
|
5
5
|
|
|
6
6
|
class FieldManager {
|
|
7
7
|
constructor(fields, selectedFields, isFieldsFetching, isSelectedFieldsFetching) {
|
|
8
|
+
let componentMapping = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
8
9
|
this.fields = fields;
|
|
9
10
|
this.selectedFields = selectedFields;
|
|
10
11
|
this.isFieldsFetching = isFieldsFetching;
|
|
11
12
|
this.isSelectedFieldsFetching = isSelectedFieldsFetching;
|
|
13
|
+
this.componentMapping = componentMapping;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
createSuccessAction(fields, metaData) {
|
|
@@ -98,11 +100,14 @@ class FieldManager {
|
|
|
98
100
|
this.selectedFields = data;
|
|
99
101
|
} else if (apiName === FieldApiName.UPDATE_SELECTED_FIELDS) {
|
|
100
102
|
this.selectedFields = data;
|
|
103
|
+
} else if (apiName === 'getComponentMapping') {
|
|
104
|
+
this.componentMapping = data;
|
|
101
105
|
}
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
toObject() {
|
|
105
109
|
return {
|
|
110
|
+
componentMapping: this.componentMapping,
|
|
106
111
|
fields: this.fields,
|
|
107
112
|
selectedFields: this.selectedFields,
|
|
108
113
|
isFieldsFetching: this.isFieldsFetching,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import AbstractController from "./AbstractController";
|
|
2
|
+
|
|
3
|
+
class GetInitialRecordSuccessController extends AbstractController {
|
|
4
|
+
handle(event) {
|
|
5
|
+
const {
|
|
6
|
+
getInitialRecordSuccessUseCase
|
|
7
|
+
} = this.service;
|
|
8
|
+
let {
|
|
9
|
+
state,
|
|
10
|
+
updateState,
|
|
11
|
+
action,
|
|
12
|
+
dispatch
|
|
13
|
+
} = event;
|
|
14
|
+
const {
|
|
15
|
+
disableValidationRule,
|
|
16
|
+
disableLayoutRule,
|
|
17
|
+
disableDependencyMapping
|
|
18
|
+
} = state.properties;
|
|
19
|
+
getInitialRecordSuccessUseCase.updateDependency(state, updateState);
|
|
20
|
+
getInitialRecordSuccessUseCase.execute({
|
|
21
|
+
dispatch,
|
|
22
|
+
record: action.payload.response,
|
|
23
|
+
disableValidationRule,
|
|
24
|
+
disableLayoutRule,
|
|
25
|
+
disableDependencyMapping
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default GetInitialRecordSuccessController;
|
|
@@ -13,7 +13,8 @@ class FormRepository {
|
|
|
13
13
|
getFormEntity() {
|
|
14
14
|
const {
|
|
15
15
|
moduleName,
|
|
16
|
-
departmentId
|
|
16
|
+
departmentId,
|
|
17
|
+
recordId
|
|
17
18
|
} = this.state.properties;
|
|
18
19
|
const {
|
|
19
20
|
context
|
|
@@ -25,7 +26,10 @@ class FormRepository {
|
|
|
25
26
|
validationRules = [],
|
|
26
27
|
sections = [],
|
|
27
28
|
layoutRules = [],
|
|
28
|
-
dependencyMappings = []
|
|
29
|
+
dependencyMappings = [],
|
|
30
|
+
layoutId,
|
|
31
|
+
mode,
|
|
32
|
+
initialRecordData
|
|
29
33
|
} = zform;
|
|
30
34
|
let validationRuleEntities = validationRules.map(rule => {
|
|
31
35
|
return new ZValidationRule(rule);
|
|
@@ -59,6 +63,10 @@ class FormRepository {
|
|
|
59
63
|
dependencyMappings: dependencyMappingsEntities,
|
|
60
64
|
layoutRules: layoutRulesEntities,
|
|
61
65
|
context,
|
|
66
|
+
layoutId: layoutId,
|
|
67
|
+
recordId,
|
|
68
|
+
mode,
|
|
69
|
+
initialRecordData,
|
|
62
70
|
isMyFormFetching: zform.isMyFormFetching,
|
|
63
71
|
isDependencyFetching: zform.isDependencyFetching,
|
|
64
72
|
isLayoutRulesFetching: zform.isLayoutRulesFetching,
|
|
@@ -3,6 +3,7 @@ import CreateRecordSuccessUseCase from "../../applications/usecases/CreateRecord
|
|
|
3
3
|
import CreateRecordFailedUseCase from "../../applications/usecases/CreateRecordFailedUseCase";
|
|
4
4
|
import InitializeUseCase from "../../applications/usecases/InitializeUseCase";
|
|
5
5
|
import MyLayoutSuccessUseCase from "../../applications/usecases/MyLayoutSuccessUseCase";
|
|
6
|
+
import GetInitialRecordSuccessUseCase from "../../applications/usecases/GetInitialRecordSuccessUseCase";
|
|
6
7
|
import MyFormSuccessUseCase from "../../applications/usecases/MyFormSuccessUseCase";
|
|
7
8
|
import DependenciesSuccessUseCase from "../../applications/usecases/DependenciesSuccessUseCase";
|
|
8
9
|
import MyFormRequestUseCase from "../../applications/usecases/MyFormRequestUseCase";
|
|
@@ -26,6 +27,7 @@ class Service {
|
|
|
26
27
|
this.formSubmitUseCase = new FormSubmitUseCase(dependencies);
|
|
27
28
|
this.initializeUseCase = new InitializeUseCase(dependencies);
|
|
28
29
|
this.myLayoutSuccessUseCase = new MyLayoutSuccessUseCase(dependencies);
|
|
30
|
+
this.getInitialRecordSuccessUseCase = new GetInitialRecordSuccessUseCase(dependencies);
|
|
29
31
|
this.myFormSuccessUseCase = new MyFormSuccessUseCase(dependencies);
|
|
30
32
|
this.dependenciesSuccessUseCase = new DependenciesSuccessUseCase(dependencies);
|
|
31
33
|
this.myFormRequestUseCase = new MyFormRequestUseCase(dependencies);
|
|
@@ -40,7 +40,16 @@ export default class FormTranslator {
|
|
|
40
40
|
});
|
|
41
41
|
const mappedClientActions = mapper(combinedClientActions || []);
|
|
42
42
|
const transformedClientActions = {};
|
|
43
|
+
const formValues = zform.formValues ? zform.formValues : {
|
|
44
|
+
cf: {}
|
|
45
|
+
};
|
|
46
|
+
const initialRecordData = zform.initialRecordData ? zform.initialRecordData : {
|
|
47
|
+
cf: {}
|
|
48
|
+
};
|
|
43
49
|
const actionContext = { ...context,
|
|
50
|
+
mode: zform.mode,
|
|
51
|
+
formValues,
|
|
52
|
+
record: initialRecordData,
|
|
44
53
|
isSubmitFetching,
|
|
45
54
|
submitStatus: isSubmitFetching ? 'loading' : 'none'
|
|
46
55
|
};
|
|
@@ -21,6 +21,7 @@ const CurrencyFieldTranslator = _ref => {
|
|
|
21
21
|
id: field.id,
|
|
22
22
|
label: field.i18NLabel,
|
|
23
23
|
required: field.isMandatory,
|
|
24
|
+
maxLength: field.maxLength,
|
|
24
25
|
readonly: field.isReadOnly,
|
|
25
26
|
isVisible: field.isVisible,
|
|
26
27
|
currencyLocale: prefCurrencyLocale || contextCurrencyLocale,
|
|
@@ -16,6 +16,7 @@ const DecimalFieldTranslator = _ref => {
|
|
|
16
16
|
label: field.i18NLabel,
|
|
17
17
|
// ePHI: field.isPHI, //field.ePHI,
|
|
18
18
|
required: field.isMandatory,
|
|
19
|
+
maxLength: field.maxLength,
|
|
19
20
|
readonly: field.isReadOnly,
|
|
20
21
|
isVisible: field.isVisible,
|
|
21
22
|
errorMessage: field.errorMessage || ''
|
|
@@ -16,6 +16,7 @@ const EmailFieldTranslator = _ref => {
|
|
|
16
16
|
label: field.i18NLabel,
|
|
17
17
|
// ePHI: field.isPHI, //field.ePHI,
|
|
18
18
|
required: field.isMandatory,
|
|
19
|
+
maxLength: field.maxLength,
|
|
19
20
|
readonly: field.isReadOnly,
|
|
20
21
|
// visibility: field.isVisible,
|
|
21
22
|
isVisible: field.isVisible,
|
|
@@ -6,19 +6,23 @@ const LookUpFieldTranslator = _ref => {
|
|
|
6
6
|
uiConfig
|
|
7
7
|
} = _ref;
|
|
8
8
|
const fieldModified = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
value: field.value || '',
|
|
9
|
+
// Need to check if value is an object or string (ID)
|
|
10
|
+
value: field.value ? field.value instanceof Object ? field.value.id : field.value : '',
|
|
12
11
|
//state.behaviours.zform.values[field.apiName],
|
|
13
12
|
name: field.apiName,
|
|
14
13
|
...fieldPreModified,
|
|
14
|
+
uiConfig: uiConfig,
|
|
15
|
+
type: type,
|
|
16
|
+
fieldType: field.type,
|
|
15
17
|
id: field.id,
|
|
16
18
|
label: field.i18NLabel,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// visibility: field.isVisible,
|
|
19
|
+
apiName: field.apiName,
|
|
20
|
+
errorMessage: field.errorMessage,
|
|
20
21
|
isVisible: field.isVisible,
|
|
21
|
-
|
|
22
|
+
readonly: field.isReadOnly,
|
|
23
|
+
required: field.isMandatory,
|
|
24
|
+
isCustomField: field.isCustomField,
|
|
25
|
+
maxLength: field.maxLength,
|
|
22
26
|
lookup: field.lookup
|
|
23
27
|
};
|
|
24
28
|
return fieldModified;
|
|
@@ -16,6 +16,7 @@ const NumberFieldTranslator = _ref => {
|
|
|
16
16
|
label: field.i18NLabel,
|
|
17
17
|
// ePHI: field.isPHI, //field.ePHI,
|
|
18
18
|
required: field.isMandatory,
|
|
19
|
+
maxLength: field.maxLength,
|
|
19
20
|
readonly: field.isReadOnly,
|
|
20
21
|
// visibility: field.isVisible,
|
|
21
22
|
isVisible: field.isVisible,
|
|
@@ -16,6 +16,7 @@ const PhoneFieldTranslator = _ref => {
|
|
|
16
16
|
label: field.i18NLabel,
|
|
17
17
|
// ePHI: field.isPHI, //field.ePHI,
|
|
18
18
|
required: field.isMandatory,
|
|
19
|
+
maxLength: field.maxLength,
|
|
19
20
|
readonly: field.isReadOnly,
|
|
20
21
|
isVisible: field.isVisible,
|
|
21
22
|
errorMessage: field.errorMessage || ''
|
|
@@ -16,6 +16,7 @@ const TextAreaFieldTranslator = _ref => {
|
|
|
16
16
|
label: field.i18NLabel,
|
|
17
17
|
required: field.isMandatory,
|
|
18
18
|
readonly: field.isReadOnly,
|
|
19
|
+
maxLength: field.maxLength,
|
|
19
20
|
// visibility: field.isVisible,
|
|
20
21
|
isVisible: field.isVisible,
|
|
21
22
|
errorMessage: field.errorMessage || ''
|
|
@@ -17,6 +17,7 @@ const TextFieldTranslator = _ref => {
|
|
|
17
17
|
// ePHI: field.isPHI, //field.ePHI,
|
|
18
18
|
required: field.isMandatory,
|
|
19
19
|
readonly: field.isReadOnly,
|
|
20
|
+
maxLength: field.maxLength,
|
|
20
21
|
// visibility: field.isVisible,
|
|
21
22
|
isVisible: field.isVisible,
|
|
22
23
|
errorMessage: field.errorMessage || ''
|
|
@@ -16,6 +16,7 @@ const URLFieldTranslator = _ref => {
|
|
|
16
16
|
label: field.i18NLabel,
|
|
17
17
|
// ePHI: field.isPHI, //field.ePHI,
|
|
18
18
|
required: field.isMandatory,
|
|
19
|
+
maxLength: field.maxLength,
|
|
19
20
|
readonly: field.isReadOnly,
|
|
20
21
|
// visibility: field.isVisible,
|
|
21
22
|
isVisible: field.isVisible,
|
package/es/platform/zform/applications/interfaces/input/GetInitialRecordSuccessUseCaseInputModel.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
+
import { ZFORM_API_FAILURE, ZFORM_DEPENDENCY_MAPPINGS_SUCCESS, ZFORM_LAYOUT_RULES_SUCCESS, ZFORM_MY_FORM_SUCCESS } from "../../../../bc/zform/Symbol";
|
|
3
|
+
import { DATA_SOURCE_EXECUTE as DATA_BROKER_EXECUTE } from "../../../../bc/zdata-source/Constants";
|
|
4
|
+
import { DATA_SOURCE_SUCCESS, DATA_SOURCE_NO_CONTENT, DATA_SOURCE_FAILURE } from "../../../../bc/zdata-source/Symbols";
|
|
5
|
+
|
|
6
|
+
class GetInitialRecordSuccessUseCase extends AbstractUseCase {
|
|
7
|
+
execute(input) {
|
|
8
|
+
const {
|
|
9
|
+
disableValidationRule,
|
|
10
|
+
disableLayoutRule,
|
|
11
|
+
disableDependencyMapping
|
|
12
|
+
} = input;
|
|
13
|
+
const {
|
|
14
|
+
dispatch,
|
|
15
|
+
record
|
|
16
|
+
} = input;
|
|
17
|
+
const zformEntity = this.dependencies.repository.getFormEntity();
|
|
18
|
+
zformEntity.setInitialRecord(record);
|
|
19
|
+
const context = { ...zformEntity.getContext(),
|
|
20
|
+
layoutId: zformEntity.getLayoutId()
|
|
21
|
+
};
|
|
22
|
+
dispatch({
|
|
23
|
+
type: DATA_BROKER_EXECUTE,
|
|
24
|
+
payload: {
|
|
25
|
+
actionName: "getMyForm",
|
|
26
|
+
props: context
|
|
27
|
+
},
|
|
28
|
+
metaData: {
|
|
29
|
+
actionName: "getMyForm",
|
|
30
|
+
//hack
|
|
31
|
+
initialRecordData: record,
|
|
32
|
+
// Store record data here for later use
|
|
33
|
+
[DATA_SOURCE_NO_CONTENT]: {
|
|
34
|
+
type: ZFORM_MY_FORM_SUCCESS,
|
|
35
|
+
metaData: {
|
|
36
|
+
actionName: "getMyForm",
|
|
37
|
+
initialRecordData: record
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
//hack
|
|
41
|
+
[DATA_SOURCE_FAILURE]: {
|
|
42
|
+
type: ZFORM_API_FAILURE,
|
|
43
|
+
metaData: {
|
|
44
|
+
actionName: 'getMyForm'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
[DATA_SOURCE_SUCCESS]: {
|
|
48
|
+
type: ZFORM_MY_FORM_SUCCESS,
|
|
49
|
+
metaData: {
|
|
50
|
+
actionName: "getMyForm",
|
|
51
|
+
initialRecordData: record
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
if (!disableDependencyMapping) {
|
|
58
|
+
dispatch({
|
|
59
|
+
type: DATA_BROKER_EXECUTE,
|
|
60
|
+
payload: {
|
|
61
|
+
actionName: "getDependencyMappings",
|
|
62
|
+
props: context
|
|
63
|
+
},
|
|
64
|
+
metaData: {
|
|
65
|
+
actionName: "getDependencyMappings",
|
|
66
|
+
//hack
|
|
67
|
+
[DATA_SOURCE_SUCCESS]: {
|
|
68
|
+
type: ZFORM_DEPENDENCY_MAPPINGS_SUCCESS,
|
|
69
|
+
metaData: {
|
|
70
|
+
actionName: "getDependencyMappings"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
[DATA_SOURCE_FAILURE]: {
|
|
74
|
+
type: ZFORM_API_FAILURE,
|
|
75
|
+
metaData: {
|
|
76
|
+
actionName: 'getDependencyMappings'
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
[DATA_SOURCE_NO_CONTENT]: {
|
|
80
|
+
type: ZFORM_DEPENDENCY_MAPPINGS_SUCCESS,
|
|
81
|
+
metaData: {
|
|
82
|
+
actionName: "getDependencyMappings"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
} else {
|
|
88
|
+
zformEntity.setDependencyFetching(false);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (!disableLayoutRule) {
|
|
92
|
+
dispatch({
|
|
93
|
+
type: DATA_BROKER_EXECUTE,
|
|
94
|
+
payload: {
|
|
95
|
+
actionName: "getLayoutRules",
|
|
96
|
+
props: { ...context,
|
|
97
|
+
activeRulesOnly: true
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
metaData: {
|
|
101
|
+
actionName: "getLayoutRules",
|
|
102
|
+
//hack
|
|
103
|
+
[DATA_SOURCE_NO_CONTENT]: {
|
|
104
|
+
type: ZFORM_LAYOUT_RULES_SUCCESS,
|
|
105
|
+
metaData: {
|
|
106
|
+
actionName: "getLayoutRules"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
[DATA_SOURCE_FAILURE]: {
|
|
110
|
+
type: ZFORM_API_FAILURE,
|
|
111
|
+
metaData: {
|
|
112
|
+
actionName: 'getLayoutRules'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
[DATA_SOURCE_SUCCESS]: {
|
|
116
|
+
type: ZFORM_LAYOUT_RULES_SUCCESS,
|
|
117
|
+
metaData: {
|
|
118
|
+
actionName: "getLayoutRules"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
} else {
|
|
124
|
+
zformEntity.setLayoutRulesFetching(false);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
this.dependencies.presenter.updateFormResponse(zformEntity.toObject());
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export default GetInitialRecordSuccessUseCase;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import AbstractUseCase from "./AbstractUseCase";
|
|
2
|
-
import { ZFORM_API_FAILURE, ZFORM_MY_LAYOUTS_SUCCESS } from "../../../../bc/zform/Symbol";
|
|
2
|
+
import { ZFORM_API_FAILURE, ZFORM_INITIAL_RECORD_SUCCESS, ZFORM_MY_LAYOUTS_SUCCESS } from "../../../../bc/zform/Symbol";
|
|
3
3
|
import { DATA_SOURCE_EXECUTE } from "../../../../bc/zdata-source/Constants";
|
|
4
|
-
import { DATA_SOURCE_SUCCESS, DATA_SOURCE_NO_CONTENT, DATA_SOURCE_FAILURE } from "../../../../bc/zdata-source/Symbols";
|
|
5
4
|
import { CLIENTACTION_BEHAVIOUR_EXECUTE } from "../../../client-actions/bc/zclient-actions/Constants";
|
|
6
5
|
import { ZFormApiActionName } from "../../../../bc/zform/Constants";
|
|
7
6
|
import { CLIENTSCRIPT_FETCH } from "../../../client-scripts/bc/zclient-scripts-fetch/Constants";
|
|
7
|
+
import { RecordApiActionName } from "../../../../bc/zrecord/Constants";
|
|
8
|
+
import { ACA_ERROR_OCCURRED, ErrorCodes } from "../../../../cc/component/ErrorStructure";
|
|
8
9
|
|
|
9
10
|
class InitializeUseCase extends AbstractUseCase {
|
|
10
11
|
execute(input) {
|
|
@@ -48,38 +49,61 @@ class InitializeUseCase extends AbstractUseCase {
|
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
52
|
+
if (zformEntity.isEditMode()) {
|
|
53
|
+
const recordId = zformEntity.getRecordId();
|
|
54
|
+
|
|
55
|
+
if (!recordId) {
|
|
56
|
+
const errorStructure = {
|
|
57
|
+
code: ErrorCodes.PROPERTY_VALIDATION_FAILED,
|
|
58
|
+
message: 'Record ID is required for Edit Mode',
|
|
59
|
+
errorDetails: {
|
|
60
|
+
validationResults: [{
|
|
61
|
+
key: 'recordId',
|
|
62
|
+
errors: [{
|
|
63
|
+
message: 'Record ID is required for Edit Mode'
|
|
64
|
+
}],
|
|
65
|
+
value: recordId
|
|
66
|
+
}],
|
|
67
|
+
isBreaking: true
|
|
67
68
|
}
|
|
69
|
+
};
|
|
70
|
+
dispatch({
|
|
71
|
+
type: ACA_ERROR_OCCURRED,
|
|
72
|
+
payload: errorStructure
|
|
73
|
+
});
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
dispatch({
|
|
78
|
+
type: DATA_SOURCE_EXECUTE,
|
|
79
|
+
payload: {
|
|
80
|
+
actionName: RecordApiActionName.GET_SINGLE_RECORD,
|
|
81
|
+
props: context
|
|
68
82
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
metaData: zformEntity.getDataSourceMetaData({
|
|
84
|
+
actionName: RecordApiActionName.GET_SINGLE_RECORD,
|
|
85
|
+
successEvent: ZFORM_INITIAL_RECORD_SUCCESS,
|
|
86
|
+
failureEvent: ZFORM_API_FAILURE
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
} else {
|
|
90
|
+
dispatch({
|
|
91
|
+
type: DATA_SOURCE_EXECUTE,
|
|
92
|
+
payload: {
|
|
93
|
+
actionName: ZFormApiActionName.getMyLayouts,
|
|
94
|
+
props: { ...context,
|
|
95
|
+
from: 1,
|
|
96
|
+
limit: 50
|
|
73
97
|
}
|
|
74
98
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
99
|
+
metaData: zformEntity.getDataSourceMetaData({
|
|
100
|
+
actionName: ZFormApiActionName.getMyLayouts,
|
|
101
|
+
//hack
|
|
102
|
+
successEvent: ZFORM_MY_LAYOUTS_SUCCESS,
|
|
103
|
+
failureEvent: ZFORM_API_FAILURE
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
}
|
|
83
107
|
}
|
|
84
108
|
|
|
85
109
|
}
|
|
@@ -11,6 +11,11 @@ class LookUpFieldSuccessUseCase extends AbstractUseCase {
|
|
|
11
11
|
dispatch,
|
|
12
12
|
fieldMetadataResponse
|
|
13
13
|
} = input;
|
|
14
|
+
|
|
15
|
+
if (!fieldMetadataResponse || !fieldMetadataResponse.data || fieldMetadataResponse.data.length === 0) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
14
19
|
const {
|
|
15
20
|
data
|
|
16
21
|
} = fieldMetadataResponse;
|
|
@@ -21,14 +21,17 @@ class MyFormSuccessUseCase extends AbstractUseCase {
|
|
|
21
21
|
sections
|
|
22
22
|
} = myForm;
|
|
23
23
|
const zFormEntity = repository.getFormEntity();
|
|
24
|
+
const layoutId = zFormEntity.getLayoutId();
|
|
25
|
+
const initialRecord = zFormEntity.getInitialRecord();
|
|
24
26
|
const context = { ...zFormEntity.getContext(),
|
|
25
|
-
layoutId:
|
|
27
|
+
layoutId: layoutId
|
|
26
28
|
};
|
|
27
29
|
const lookupFields = sections.flatMap(section => section.fields.filter(field => field.type === 'LookUp'));
|
|
28
30
|
const sectionEntities = sections.map(section => {
|
|
29
31
|
const fields = section.fields.map(field => {
|
|
32
|
+
const recordValue = initialRecord ? field.isCustomField ? initialRecord.cf[field.apiName] : initialRecord[field.apiName] : undefined;
|
|
30
33
|
const entity = new ZField(field);
|
|
31
|
-
entity.decideDefaultValue();
|
|
34
|
+
entity.decideDefaultValue(recordValue);
|
|
32
35
|
return entity;
|
|
33
36
|
});
|
|
34
37
|
const sectionWithFields = { ...section,
|
|
@@ -63,24 +66,22 @@ class MyFormSuccessUseCase extends AbstractUseCase {
|
|
|
63
66
|
type: DATA_SOURCE_EXECUTE,
|
|
64
67
|
payload: {
|
|
65
68
|
actionName: 'fetchLookupFields',
|
|
66
|
-
props:
|
|
67
|
-
}
|
|
69
|
+
props: context
|
|
68
70
|
},
|
|
69
71
|
metaData: {
|
|
70
72
|
actionName: 'fetchLookupFields',
|
|
71
|
-
//hack
|
|
72
73
|
[DATA_SOURCE_NO_CONTENT]: {
|
|
73
74
|
type: ZFORM_LOOKUP_FIELD_SUCCESS,
|
|
74
75
|
metaData: {
|
|
75
76
|
actionName: 'fetchLookupFields'
|
|
76
77
|
}
|
|
77
78
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
[DATA_SOURCE_FAILURE]: {
|
|
80
|
+
type: ZFORM_API_FAILURE,
|
|
81
|
+
metaData: {
|
|
82
|
+
actionName: 'fetchLookupFields'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
84
85
|
[DATA_SOURCE_SUCCESS]: {
|
|
85
86
|
type: ZFORM_LOOKUP_FIELD_SUCCESS,
|
|
86
87
|
metaData: {
|