@zohodesk/library-platform 1.1.9 → 1.1.10-exp.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/bc/app-context/Constants.js +0 -0
- package/es/bc/app-context/Event.js +1 -0
- package/es/bc/app-context/EventHandlers.js +0 -0
- package/es/bc/app-context/Properties.js +68 -0
- package/es/bc/sdk/ResourceNamesEnum.js +1 -0
- package/es/bc/zdata-source/Constants.js +6 -11
- package/es/bc/zform/Constants.js +11 -1
- package/es/bc/zform/Properties.js +29 -27
- package/es/bc/zform/Symbol.js +2 -3
- package/es/bc/zlist/Properties.js +0 -45
- package/es/bc/zrecord/Constants.js +11 -19
- package/es/cc/action-icon/Constants.js +3 -5
- package/es/cc/action-location/Constants.js +5 -9
- package/es/cc/avatar/Constants.js +3 -5
- package/es/cc/breadcrumb/Constants.js +3 -5
- package/es/cc/button/Constants.js +3 -5
- package/es/cc/checkbox/Constants.js +5 -9
- package/es/cc/component/ErrorStructure.js +9 -0
- package/es/cc/date/Constants.js +5 -9
- package/es/cc/email/Constants.js +3 -5
- package/es/cc/error-state/ErrorTypes.js +11 -0
- package/es/cc/error-state/Properties.js +31 -0
- package/es/cc/error-state/index.js +2 -0
- package/es/cc/fields/currency/Model.js +2 -0
- package/es/cc/fields/currency/Properties.js +2 -1
- package/es/cc/fields/field/Constants.js +9 -13
- package/es/cc/fields/field/FormDefaultUIType.js +1 -1
- package/es/cc/fields/field/Properties.js +14 -8
- package/es/cc/fields/lookup/Properties.js +34 -1
- package/es/cc/form/Constants.js +6 -11
- package/es/cc/form/Properties.js +8 -0
- package/es/cc/form-connected/ExternalConstants.js +14 -0
- package/es/cc/form-connected/Properties.js +21 -13
- package/es/cc/form-connected/index.js +1 -1
- package/es/cc/highlighted-value/Constants.js +3 -5
- package/es/cc/icon-button/Constants.js +3 -5
- package/es/cc/link/Constants.js +3 -5
- package/es/cc/list-item/Constants.js +3 -5
- package/es/cc/more-dropdown/Constants.js +3 -5
- package/es/cc/multi-select/Constants.js +5 -9
- package/es/cc/section/Constants.js +5 -9
- package/es/cc/select/Constants.js +6 -11
- package/es/cc/switch/Constants.js +3 -5
- package/es/cc/switch/Properties.js +2 -2
- package/es/cc/table-column-filter/Constants.js +5 -9
- package/es/cc/table-connected/Events.js +1 -1
- package/es/cc/table-connected/Properties.js +6 -0
- package/es/cc/table-connected/SdkContract.js +14 -0
- package/es/cc/table-connected/constants/Events.js +3 -9
- package/es/cc/table-connected/constants/ExternalConstants.js +9 -0
- package/es/cc/table-connected/constants/index.js +2 -1
- package/es/cc/table-list/Constants.js +14 -27
- package/es/cc/table-list/model/index.js +5 -9
- package/es/cc/table-list/row/Constants.js +5 -9
- package/es/cc/table-list/row/Properties.js +8 -0
- package/es/cc/tags/Constants.js +3 -5
- package/es/cc/tags/model/index.js +4 -7
- package/es/cc/text/Constants.js +3 -5
- package/es/cc/textarea/Constants.js +5 -9
- package/es/cc/textarea/Properties.js +11 -0
- package/es/cc/textbox/Constants.js +6 -11
- package/es/index.js +26 -5
- package/es/library/analytics/Analytics.js +36 -0
- package/es/library/analytics/AnalyticsContract.js +13 -0
- package/es/library/analytics/index.js +2 -0
- package/es/library/behaviours/field-focus/frameworks/ui/EventHandlersFactory.js +1 -3
- package/es/library/behaviours/keyboard-controls/adapters/gateways/KeyboardHandler.js +0 -4
- package/es/library/behaviours/keyboard-controls/adapters/gateways/Repository.js +2 -10
- package/es/library/behaviours/keyboard-controls/adapters/gateways/Service.js +0 -14
- package/es/library/behaviours/keyboard-controls/adapters/presenters/Presenter.js +2 -11
- package/es/library/behaviours/list-selection/adapters/gateways/Repository.js +2 -8
- package/es/library/behaviours/list-selection/adapters/gateways/Service.js +0 -16
- package/es/library/behaviours/list-selection/adapters/presenters/Presenter.js +0 -8
- package/es/library/behaviours/local-storage/adapters/gateways/LocalStorageRepository.js +0 -6
- package/es/library/behaviours/local-storage/adapters/gateways/Service.js +0 -4
- package/es/library/behaviours/local-storage/adapters/presenters/Presenter.js +0 -8
- package/es/library/behaviours/local-storage/domain/entities/Storage.js +0 -4
- package/es/library/behaviours/sort-by/adapters/gateway/Repository.js +0 -6
- package/es/library/behaviours/sort-by/adapters/gateway/Service.js +0 -4
- package/es/library/behaviours/sort-by/adapters/presenter/Presenter.js +0 -8
- package/es/library/behaviours/table-column-resizer/adapters/gateways/Repository.js +0 -6
- package/es/library/behaviours/table-column-resizer/adapters/gateways/Service.js +0 -10
- package/es/library/behaviours/table-column-resizer/adapters/gateways/TableElementService.js +0 -8
- package/es/library/behaviours/table-column-resizer/adapters/presenters/AutoScroll.js +0 -12
- package/es/library/behaviours/table-column-resizer/adapters/presenters/Presenter.js +0 -8
- package/es/library/behaviours/table-column-resizer/domain/entities/ColumnResizer.js +0 -12
- package/es/library/behaviours/table-column-resizer/domain/entities/Mouse.js +0 -6
- package/es/library/behaviours/table-column-resizer/domain/entities/ResizeColumnCalculator.js +0 -12
- package/es/library/behaviours/table-column-resizer/domain/entities/ResizerAutoScrollCalculator.js +0 -6
- package/es/library/behaviours/table-column-resizer/domain/entities/ResizingColumn.js +0 -13
- package/es/library/behaviours/table-column-resizer/domain/entities/Table.js +0 -11
- package/es/library/behaviours/text-to-field-click/adapters/gateway/Repository.js +0 -6
- package/es/library/custom-component/adapters/controllers/Controller.js +9 -0
- package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +6 -7
- package/es/library/custom-component/adapters/gateways/repository/Repository.js +1 -5
- package/es/library/custom-component/adapters/gateways/service/Service.js +2 -14
- package/es/library/custom-component/adapters/presenters/Presenter.js +0 -5
- package/es/library/custom-component/applications/entities-factory/ComponentFactory.js +12 -9
- package/es/library/custom-component/applications/usecases/DispatchUseCase.js +28 -5
- package/es/library/custom-component/applications/usecases/InitializeUseCase.js +5 -4
- package/es/library/custom-component/applications/usecases/MountUseCase.js +10 -6
- package/es/library/custom-component/applications/usecases/SetRefUseCase.js +31 -0
- package/es/library/custom-component/applications/usecases/UnmountUseCase.js +6 -5
- package/es/library/custom-component/applications/usecases/UpdatePropertyUseCase.js +23 -18
- package/es/library/custom-component/applications/usecases/UpdateStateUseCase.js +4 -3
- package/es/library/custom-component/domain/entities/Behaviour.js +4 -11
- package/es/library/custom-component/domain/entities/Component.js +81 -99
- package/es/library/custom-component/domain/entities/ComponentProperties.js +120 -0
- package/es/library/custom-component/domain/entities/Event.js +0 -7
- package/es/library/custom-component/domain/entities/EventHandler.js +0 -6
- package/es/library/custom-component/domain/entities/LifeCycleAction.js +0 -10
- package/es/library/custom-component/domain/entities/Logger.js +93 -0
- package/es/library/custom-component/domain/entities/Payload.js +0 -6
- package/es/library/custom-component/domain/entities/Properties.js +10 -142
- package/es/library/custom-component/domain/entities/Property.js +29 -13
- package/es/library/custom-component/domain/entities/Schema.js +1 -5
- package/es/library/custom-component/domain/entities/State.js +0 -4
- package/es/library/custom-component/domain/entities/Style.js +0 -14
- package/es/library/custom-component/domain/entities/interfaces/IComponentProperties.js +0 -0
- package/es/library/custom-component/frameworks/json-schema-validator/Validator.js +129 -31
- package/es/library/custom-component/frameworks/ui/ComponentRegistry.js +3 -7
- package/es/library/custom-component/frameworks/ui/CreateCustomComponent.js +30 -34
- package/es/library/custom-component/frameworks/ui/CreateSlotComponent.js +4 -2
- package/es/library/custom-component/frameworks/ui/CustomComponentFactory.js +1 -1
- package/es/library/custom-component/frameworks/ui/DependencyFactory.js +1 -2
- package/es/library/dot/components/action-location/adapters/gateway/Repository.js +0 -8
- package/es/library/dot/components/action-location/adapters/presenters/Presenter.js +0 -8
- package/es/library/dot/components/action-location/entities/ActionLocationEntity.js +2 -6
- package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +2 -1
- package/es/library/dot/components/actions-renderer/frameworks/ui/ActionsRendererView.js +6 -4
- package/es/library/dot/components/form/adapters/presenter/TransformState.js +3 -1
- package/es/library/dot/components/form/frameworks/ui/DefaultComponentRegister.js +12 -3
- package/es/library/dot/components/form/frameworks/ui/Form.js +2 -0
- package/es/library/dot/components/form/frameworks/ui/FormFallbackView.js +23 -0
- package/es/library/dot/components/form/frameworks/ui/FormView.js +9 -3
- package/es/library/dot/components/form/frameworks/ui/__test__/Form.test.js +14 -20
- package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +13 -16
- package/es/library/dot/components/form/frameworks/ui/sub-components/Footer.js +7 -4
- package/es/library/dot/components/form/frameworks/ui/sub-components/Header.js +7 -4
- package/es/library/dot/components/form/frameworks/ui/sub-components/SectionsWithRightPanelLayout.js +1 -2
- package/es/library/dot/components/form-fields/checkbox/frameworks/ui/CheckboxView.js +1 -3
- package/es/library/dot/components/form-fields/currency/frameworks/ui/Currency.js +3 -3
- package/es/library/dot/components/form-fields/currency/frameworks/ui/CurrencyView.js +15 -3
- package/es/library/dot/components/form-fields/currency/frameworks/ui/EventHandlerFactory.js +8 -0
- package/es/library/dot/components/form-fields/field/__test__/common.js +18 -16
- package/es/library/dot/components/form-fields/field/css/FieldItem.module.css +2 -2
- package/es/library/dot/components/form-fields/index.js +2 -1
- package/es/library/dot/components/form-fields/lookup/frameworks/ui/EventHandlerFactory.js +70 -0
- package/es/library/dot/components/form-fields/lookup/frameworks/ui/Lookup.js +13 -0
- package/es/library/dot/components/form-fields/lookup/frameworks/ui/LookupView.js +51 -0
- package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextAreaView.js +4 -2
- package/es/library/dot/components/section/frameworks/ui/RenderField.js +5 -4
- package/es/library/dot/components/section/frameworks/ui/SectionView.js +12 -3
- package/es/library/dot/components/section/frameworks/ui/css/Section.module.css +3 -0
- package/es/library/dot/components/table-list/adapters/controllers/KeyboardRowClickController.js +2 -2
- package/es/library/dot/components/table-list/adapters/controllers/KeyboardRowSelectController.js +1 -1
- package/es/library/dot/components/table-list/adapters/presenters/TableTranslator.js +1 -1
- package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +14 -7
- package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +16 -15
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/ErrorState.js +4 -7
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Header.js +9 -6
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/Rows.js +11 -9
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/field/FieldComponent.js +1 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +7 -5
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/Headers.js +4 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/MassAction.js +6 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Columns.js +4 -2
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/Row.js +14 -7
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowActions.js +5 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowData.js +6 -4
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/row/RowSelection.js +32 -7
- package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/css/Breadcrumb.module.css +4 -4
- package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/sub-components/BreadcrumbItem.js +1 -1
- package/es/library/dot/legacy-to-new-arch/button/frameworks/ui/ButtonView.js +3 -3
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/DateView.js +10 -5
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/css/DateView.module.css +3 -0
- package/es/library/dot/legacy-to-new-arch/error-state/frameworks/ui/ErrorState.js +10 -0
- package/es/library/dot/legacy-to-new-arch/error-state/frameworks/ui/ErrorStateView.js +68 -0
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/LabelView.js +6 -8
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/css/Label.module.css +5 -7
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/MultiSelectView.js +14 -4
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/css/MultiSelectView.module.css +37 -0
- package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/SelectView.js +2 -2
- package/es/library/dot/legacy-to-new-arch/switch/frameworks/ui/SwitchView.js +5 -5
- package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilterView.js +5 -3
- package/es/library/dot/legacy-to-new-arch/table-field-components/currency-field/frameworks/ui/CurrencyFieldView.js +10 -2
- package/es/library/dot/legacy-to-new-arch/table-field-components/index.js +1 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/switch-field/frameworks/ui/SwitchFieldView.js +0 -1
- package/es/library/dot/legacy-to-new-arch/text/frameworks/ui/TextView.js +1 -1
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/TextAreaView.js +22 -4
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/css/TextAreaView.module.css +40 -0
- package/es/library/dot/legacy-to-new-arch/textbox/frameworks/ui/TextBoxView.js +2 -2
- package/es/library/slot/frameworks/ui/ConvertSlotToComponent.js +5 -4
- package/es/library/translator-common/adapters/presenter/formatCurrency.js +42 -0
- package/es/library/translator-common/index.js +2 -1
- package/es/platform/app-context-behaviour/frameworks/AppContextBehaviourFactory.js +31 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/controllers/MountController.js +15 -18
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/gateways/Repository.js +0 -6
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/gateways/Service.js +0 -16
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/presenters/Presenter.js +0 -8
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/resources/ClientActionResource.js +2 -4
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/GetClientActionLocationUseCase.js +1 -1
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/GetClientActionUIComponentPropertiesUseCase.js +1 -1
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/GetClientActionsUseCase.js +1 -1
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/SetClientActionsUseCase.js +6 -1
- package/es/platform/client-actions/behaviour/zclient-actions/applications/usecases/UpdateClientActionUIComponentPropertiesUseCase.js +1 -1
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientAction.js +0 -26
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActionManager.js +58 -19
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/ClientActions.js +8 -17
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/EventMapping.js +0 -12
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/EventMappings.js +0 -4
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/UIComponentMapping.js +0 -14
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/ClientActionResponse.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/domain/entities/interfaces/IClientActionFetchResponse.js +0 -0
- package/es/platform/client-actions/behaviour/zclient-actions/frameworks/sdk/ClientActionsSDKFactory.js +2 -2
- package/es/platform/client-actions/cc/action-event-mediator/Properties.js +75 -3
- package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/MountController.js +1 -1
- package/es/platform/client-actions/components/action-event-mediator/adapters/controllers/PropertiesChangeController.js +2 -2
- package/es/platform/client-actions/components/action-event-mediator/adapters/gateway/Repository.js +2 -10
- package/es/platform/client-actions/components/action-event-mediator/adapters/presenters/Presenter.js +0 -8
- package/es/platform/client-actions/components/action-event-mediator/applications/usecases/InitializeUseCase.js +15 -1
- package/es/platform/client-actions/components/action-event-mediator/applications/usecases/PropertiesChangeUseCase.js +3 -3
- package/es/platform/client-actions/components/action-event-mediator/domain/entities/ActionEventMediatorEntity.js +43 -34
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator.js +3 -1
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediatorView.js +31 -14
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/ClientActionsAdapter.js +2 -48
- package/es/platform/client-actions/components/action-event-mediator/frameworks/ui/EventHandlersFactory.js +3 -11
- package/es/platform/client-actions/components/interfaces/ActionViewModel.js +1 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRenderer.js +12 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/AdaptiveRowActions/AdaptiveRowActionsRendererView.js +42 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/MoreActions/MoreActionsRenderer.js +10 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/MoreActions/MoreActionsRendererView.js +79 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/{RowActionsRenderer.js → RowActions/RowActionsRenderer.js} +3 -3
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.module.css +19 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRendererView.js +37 -0
- package/es/platform/client-actions/translators/client-actions-translator/index.js +14 -2
- package/es/platform/client-actions/translators/condition-resolver/index.js +6 -1
- package/es/platform/client-scripts/bc/zclient-scripts-execution/Constants.js +11 -0
- package/es/platform/client-scripts/bc/zclient-scripts-execution/EventHandlers.js +1 -0
- package/es/platform/client-scripts/bc/zclient-scripts-fetch/Constants.js +11 -0
- package/es/platform/client-scripts/bc/zclient-scripts-fetch/EventHandlers.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/controllers/AbstractController.js +8 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/controllers/ClientScriptExecutionController.js +10 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/controllers/SetClientScriptsMappingController.js +10 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/gateways/Repository.js +24 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/gateways/Service.js +9 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/adapters/presenters/Presenter.js +21 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/interfaces/InputDependencies.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/interfaces/gateways/IService.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/interfaces/output/IPresenter.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/usecases/AbstractUseCase.js +15 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/usecases/ExecuteClientScriptsUseCase.js +23 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/applications/usecases/SetClientScriptsMappingUseCase.js +16 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/domain/entities/ClientScriptExecutor.js +142 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/domain/entities/State.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/domain/entities/types/ClientScriptExectionTypeDefintions.js +7 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/frameworks/ClientScriptsExecutionBehaviourFactory.js +12 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/frameworks/ClientScriptsExecutionHandlersFactory.js +30 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-execution/frameworks/ClientScriptsUtils.js +25 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/AbstractController.js +8 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsController.js +27 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsFailureController.js +28 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsNoContentController.js +23 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsStopController.js +21 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/FetchClientScriptsSuccessController.js +28 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/MountController.js +22 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/controllers/SetClientScriptsController.js +24 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/gateways/Repository.js +22 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/gateways/Service.js +19 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/presenters/Presenter.js +16 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/entities-factory/ClientScriptsFactory.js +11 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/entities-factory/ClientScriptsManagerFactory.js +10 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/InputDependencies.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/gateways/IService.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/output/IPresenter.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/AbstractUseCase.js +17 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptUseCase.js +33 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsFailureUseCase.js +22 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsNoContentUseCase.js +27 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsStopUseCase.js +25 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/FetchClientScriptsSuccessUseCase.js +22 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/InitializeUseCase.js +17 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/usecases/SetClientScriptsUseCase.js +21 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/ClientScript.js +24 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/ClientScripts.js +41 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/GetClientScriptsStrategy.js +44 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/State.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/ClientScriptEventMappingState.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/ClientScriptModel.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/ClientScriptsModel.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/IClientScript.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/IClientScripts.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/domain/entities/interfaces/IEvent.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/frameworks/ClientScriptsBehaviourFactory.js +12 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/frameworks/ClientScriptsHandlersFactory.js +47 -0
- package/es/platform/client-scripts/cc/zclient-scripts-execution/clientScriptsSchema.js +15 -0
- package/es/platform/column-chooser/adapters/gateways/Repository.js +0 -6
- package/es/platform/column-chooser/adapters/gateways/Service.js +0 -14
- package/es/platform/column-chooser/adapters/presenters/Presenter.js +0 -8
- package/es/platform/column-chooser/domain/entities/SelectEntityImp.js +0 -5
- package/es/platform/components/app/adapters/resources/AppResource.js +25 -0
- package/es/platform/components/form-connected/adapters/resources/SmartFormResources.js +20 -4
- package/es/platform/components/form-connected/frameworks/EventHandlersFactory.js +5 -4
- package/es/platform/components/form-connected/frameworks/FormConnectedFactory.js +8 -2
- package/es/platform/components/form-connected/frameworks/FormConnectedView.js +4 -2
- package/es/platform/components/form-connected/frameworks/FormSdkFactory.js +6 -4
- package/es/platform/components/table-connected/adapters/controllers/ColumnChooserUpdateController.js +7 -1
- package/es/platform/components/table-connected/adapters/controllers/ResizeFinishController.js +3 -5
- package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +52 -4
- package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +222 -8
- package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +6 -4
- package/es/platform/components/table-connected/frameworks/TableConnectedFactory.js +7 -3
- package/es/platform/data-source/http-template/fetchLookupFields.js +24 -0
- package/es/platform/data-source/http-template/getClientScripts.js +23 -0
- package/es/platform/data-source/http-template/{fetchDependencyMappings.js → getDependencyMappings.js} +3 -3
- package/es/platform/data-source/http-template/{fetchLayoutRules.js → getLayoutRules.js} +3 -3
- package/es/platform/data-source/http-template/{fetchMyForm.js → getMyForm.js} +3 -3
- package/es/platform/data-source/http-template/{fetchMyFormLayout.js → getMyLayout.js} +3 -3
- package/es/platform/data-source/http-template/{fetchValidationRules.js → getValidationRules.js} +3 -3
- package/es/platform/data-source/http-template/updateSelectedFields.js +1 -1
- package/es/platform/data-source/index.js +15 -10
- package/es/platform/data-source/utils/validation-rules/TransFormValidationRules.js +7 -1
- package/es/platform/sdk/adapters/gateways/Repository.js +5 -9
- package/es/platform/sdk/adapters/gateways/Service.js +2 -12
- package/es/platform/sdk/adapters/presenters/Presenter.js +0 -6
- package/es/platform/sdk/application/interfaces/gateways/AbstractResource.js +0 -6
- package/es/platform/sdk/application/usecases/GetResourcesUseCase.js +12 -0
- package/es/platform/sdk/domain/entities/ResourceManager.js +24 -20
- package/es/platform/sdk/frameworks/Sdk.js +23 -2
- package/es/platform/sdk/frameworks/SdkRegistry.js +11 -8
- package/es/platform/sdk-behaviour/adapters/controllers/AbstractController.js +0 -4
- package/es/platform/sdk-behaviour/adapters/gateways/Repository.js +0 -8
- package/es/platform/sdk-behaviour/adapters/gateways/ResourceManagerGateWay.js +0 -6
- package/es/platform/sdk-behaviour/adapters/gateways/Service.js +0 -8
- package/es/platform/zdata-source/adapters/controllers/FailureController.js +26 -29
- package/es/platform/zdata-source/adapters/controllers/NoContentController.js +21 -24
- package/es/platform/zdata-source/adapters/controllers/RegisterController.js +17 -20
- package/es/platform/zdata-source/adapters/controllers/SuccessController.js +26 -29
- package/es/platform/zdata-source/adapters/gateways/Repository.js +0 -6
- package/es/platform/zdata-source/adapters/gateways/Service.js +0 -12
- package/es/platform/zdata-source/adapters/presenters/Presenter.js +1 -9
- package/es/platform/zdata-source/domain/entities/APITemplate.js +3 -17
- package/es/platform/zfield/adapters/gateways/Repository.js +0 -6
- package/es/platform/zfield/adapters/gateways/Service.js +0 -14
- package/es/platform/zfield/adapters/presenters/Presenter.js +0 -8
- package/es/platform/zfield/applications/entities-factory/FieldBuilder.js +0 -30
- package/es/platform/zfield/applications/entities-factory/FieldsManagerBuilder.js +0 -12
- package/es/platform/zfield/domain/entities/fields-manager/FieldsManager.js +6 -1
- package/es/platform/zform/adapters/controllers/ApiFailureController.js +31 -0
- package/es/platform/zform/adapters/controllers/CreateRecordFailedController.js +21 -0
- package/es/platform/zform/adapters/controllers/CreateRecordSuccessController.js +21 -0
- package/es/platform/zform/adapters/controllers/IntializeController.js +4 -2
- package/es/platform/zform/adapters/controllers/LookupFieldController.js +23 -0
- package/es/platform/zform/adapters/controllers/MyLayoutSuccessController.js +4 -2
- package/es/platform/zform/adapters/controllers/SubmitValidationCompletedController.js +5 -1
- package/es/platform/zform/adapters/gateway/FormRepository.js +6 -8
- package/es/platform/zform/adapters/gateway/Service.js +8 -36
- package/es/platform/zform/adapters/presenter/FormPresenter.js +0 -8
- package/es/platform/zform/adapters/presenter/FormTranslator.js +33 -22
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +53 -37
- package/es/platform/zform/adapters/presenter/translators/fields/CurrencyFieldTranslator.js +9 -1
- package/es/platform/zform/adapters/presenter/translators/fields/LookUpFieldTranslator.js +2 -1
- package/es/platform/zform/adapters/presenter/utils/DefaultClientActions.js +83 -73
- package/es/platform/zform/adapters/presenter/utils/sanitizeHtmlString.js +11 -0
- package/es/platform/zform/applications/interfaces/input/ApiFailureInputModel.js +1 -0
- package/es/platform/zform/applications/interfaces/input/CreateRecordFailedUseCaseInputModel.js +1 -0
- package/es/platform/zform/applications/interfaces/input/CreateRecordSuccessUseCaseInputModel.js +1 -0
- package/es/platform/zform/applications/interfaces/input/GetIsFieldValueChangedUseCaseInput.js +1 -0
- package/es/platform/zform/applications/interfaces/input/LookUpFieldSuccessUseCaseInputModel.js +1 -0
- package/es/platform/zform/applications/usecases/ApiFailureUseCase.js +30 -0
- package/es/platform/zform/applications/usecases/CreateRecordFailedUseCase.js +25 -0
- package/es/platform/zform/applications/usecases/CreateRecordSuccessUseCase.js +25 -0
- package/es/platform/zform/applications/usecases/FormSubmitUseCase.js +4 -1
- package/es/platform/zform/applications/usecases/GetFieldValueUseCase.js +1 -1
- package/es/platform/zform/applications/usecases/GetIsFieldValueChanged.js +35 -0
- package/es/platform/zform/applications/usecases/InitializeUseCase.js +54 -26
- package/es/platform/zform/applications/usecases/LookupFieldSuccessUseCase.js +33 -0
- package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +41 -7
- package/es/platform/zform/applications/usecases/MyLayoutSuccessUseCase.js +61 -37
- package/es/platform/zform/applications/usecases/SubmitValidationCompletedUseCase.js +14 -8
- package/es/platform/zform/domain/ZDependencyMapping.js +0 -17
- package/es/platform/zform/domain/ZField.js +16 -59
- package/es/platform/zform/domain/ZForm.js +74 -42
- package/es/platform/zform/domain/ZLayout.js +0 -14
- package/es/platform/zform/domain/ZLayoutRule.js +0 -31
- package/es/platform/zform/domain/ZSection.js +0 -19
- package/es/platform/zform/domain/ZValidationRule.js +0 -28
- package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +26 -28
- package/es/platform/zform/frameworks/ui/ZFormBehaviourFactory.js +1 -0
- package/es/platform/zform/frameworks/validation-rules/Validator.js +4 -8
- package/es/platform/zhttp/adapters/controllers/FetchController.js +5 -1
- package/es/platform/zlist/adapters/gateways/Repository.js +4 -8
- package/es/platform/zlist/adapters/gateways/Service.js +0 -33
- package/es/platform/zlist/adapters/presenters/Presenters.js +0 -8
- package/es/platform/zlist/adapters/presenters/SelectionTranslator.js +7 -6
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +19 -12
- package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +33 -26
- package/es/platform/zlist/adapters/presenters/translators/Header.js +5 -6
- package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +4 -2
- package/es/platform/zlist/adapters/presenters/translators/Row.js +6 -3
- package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +8 -2
- package/es/platform/zlist/adapters/presenters/translators/actions/ActionsTranslator.js +4 -15
- package/es/platform/zlist/adapters/presenters/translators/fields/CurrencyFieldTranslator.js +7 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/FormulaFieldTranslator.js +7 -2
- package/es/platform/zlist/adapters/presenters/utils/DefaultClientActions.js +1 -1
- package/es/platform/zlist/adapters/presenters/utils/calculateFieldWidths.js +1 -3
- package/es/platform/zlist/applications/usecases/DeleteMultipleRecordUseCase.js +1 -3
- package/es/platform/zlist/applications/usecases/DeleteSingleRecordUseCase.js +1 -3
- package/es/platform/zlist/applications/usecases/GetContextUseCase.js +1 -1
- package/es/platform/zlist/applications/usecases/RecordSuccessCallbackUsecase.js +1 -3
- package/es/platform/zlist/applications/usecases/RecordUpdateUseCase.js +1 -3
- package/es/platform/zlist/applications/usecases/UpdateMultipleRecordUseCase.js +1 -3
- package/es/platform/zlist/domain/entities/List.js +20 -5
- package/es/platform/zrecord/adapters/controllers/AppendRecordsController.js +20 -23
- package/es/platform/zrecord/adapters/controllers/DeleteMultipleRecordLocalController.js +20 -23
- package/es/platform/zrecord/adapters/controllers/FailureController.js +26 -29
- package/es/platform/zrecord/adapters/controllers/FetchStateStopController.js +17 -20
- package/es/platform/zrecord/adapters/controllers/MountController.js +15 -18
- package/es/platform/zrecord/adapters/controllers/NoContentController.js +21 -24
- package/es/platform/zrecord/adapters/controllers/RefetchController.js +26 -29
- package/es/platform/zrecord/adapters/controllers/SetRecordsController.js +24 -27
- package/es/platform/zrecord/adapters/controllers/SuccessController.js +26 -29
- package/es/platform/zrecord/adapters/gateways/Repository.js +0 -6
- package/es/platform/zrecord/adapters/gateways/Service.js +0 -30
- package/es/platform/zrecord/adapters/presenters/Presenter.js +0 -8
- package/es/platform/zrecord/applications/usecases/GetMultipleRecordUseCase.js +1 -1
- package/es/platform/zrecord/applications/usecases/GetSingleRecordUseCase.js +1 -1
- package/es/platform/zrecord/domain/entities/CustomFieldValues.js +0 -4
- package/es/platform/zrecord/domain/entities/Record.js +0 -22
- package/es/platform/zrecord/domain/entities/Records.js +0 -11
- package/package.json +28 -29
- package/es/cc/form-connected/Constants.js +0 -21
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/LabelAction.js +0 -9
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/LabelActionView.js +0 -38
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/sub-components/ui/css/LabelAction.module.css +0 -4
- package/es/platform/client-actions/cc/dynamic-action-component/Properties.js +0 -51
- package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponent.js +0 -9
- package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponentView.js +0 -36
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +0 -15
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +0 -33
- package/es/platform/zlist/adapters/presenters/translators/ColumnAlignmentTranslator.js +0 -11
- /package/es/{platform/client-actions/components/dynamic-component/domain/entities/interfaces/IState.js → library/custom-component/applications/interfaces/input/SetRefInputModel.js} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
3
1
|
import React, { forwardRef } from 'react';
|
|
4
2
|
import DependencyFactory from "./DependencyFactory";
|
|
5
3
|
import Compare from "./Compare";
|
|
6
4
|
import { generateSlotChildren } from "./CreateSlotComponent";
|
|
5
|
+
import { ACA_ERROR_OCCURRED } from "../../../../cc/component/ErrorStructure";
|
|
7
6
|
|
|
8
7
|
function discardChildren(props) {
|
|
9
8
|
const newObject = { ...props
|
|
@@ -19,30 +18,6 @@ const createCustomComponent = input => {
|
|
|
19
18
|
class Component extends React.Component {
|
|
20
19
|
constructor(props) {
|
|
21
20
|
super(props);
|
|
22
|
-
|
|
23
|
-
_defineProperty(this, "controller", void 0);
|
|
24
|
-
|
|
25
|
-
_defineProperty(this, "elementRef", void 0);
|
|
26
|
-
|
|
27
|
-
_defineProperty(this, "state", void 0);
|
|
28
|
-
|
|
29
|
-
_defineProperty(this, "presenter", void 0);
|
|
30
|
-
|
|
31
|
-
_defineProperty(this, "eventManager", void 0);
|
|
32
|
-
|
|
33
|
-
_defineProperty(this, "View", void 0);
|
|
34
|
-
|
|
35
|
-
_defineProperty(this, "helpers", void 0);
|
|
36
|
-
|
|
37
|
-
_defineProperty(this, "setRef", element => {
|
|
38
|
-
const {
|
|
39
|
-
setElement
|
|
40
|
-
} = this.eventManager;
|
|
41
|
-
setElement.bind(this.eventManager)(element);
|
|
42
|
-
this.eventManager.setElement(element);
|
|
43
|
-
this.props.getRef && this.props.getRef(element);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
21
|
this.state = null;
|
|
47
22
|
let {
|
|
48
23
|
controller,
|
|
@@ -84,6 +59,13 @@ const createCustomComponent = input => {
|
|
|
84
59
|
|
|
85
60
|
componentDidMount() {
|
|
86
61
|
this.controller.mount();
|
|
62
|
+
|
|
63
|
+
if (this.state.error) {
|
|
64
|
+
this.helpers.dispatch({
|
|
65
|
+
type: ACA_ERROR_OCCURRED,
|
|
66
|
+
payload: this.state.error
|
|
67
|
+
});
|
|
68
|
+
}
|
|
87
69
|
}
|
|
88
70
|
|
|
89
71
|
shouldComponentUpdate(nextProps, nextState) {
|
|
@@ -102,22 +84,36 @@ const createCustomComponent = input => {
|
|
|
102
84
|
this.controller.updateProperties(discardChildren(nextProps));
|
|
103
85
|
}
|
|
104
86
|
|
|
105
|
-
componentDidUpdate() {
|
|
87
|
+
componentDidUpdate(prevProps, prevState) {
|
|
88
|
+
if (!Compare.deepEqual(prevState.error, this.state.error)) {
|
|
89
|
+
this.helpers.dispatch({
|
|
90
|
+
type: ACA_ERROR_OCCURRED,
|
|
91
|
+
payload: this.state.error
|
|
92
|
+
});
|
|
93
|
+
} // this.controller.updateProperties(this.props);
|
|
94
|
+
|
|
106
95
|
}
|
|
107
96
|
|
|
97
|
+
setRef = element => {
|
|
98
|
+
this.controller.setElement(element);
|
|
99
|
+
this.props.getRef && this.props.getRef(element);
|
|
100
|
+
};
|
|
101
|
+
|
|
108
102
|
render() {
|
|
109
|
-
|
|
110
|
-
|
|
103
|
+
const View = this.View;
|
|
104
|
+
const {
|
|
111
105
|
slots,
|
|
112
106
|
children
|
|
113
107
|
} = this.props;
|
|
108
|
+
const {
|
|
109
|
+
error
|
|
110
|
+
} = this.state;
|
|
114
111
|
|
|
115
|
-
if (
|
|
112
|
+
if (error) {
|
|
116
113
|
if (__TEST__) {
|
|
117
|
-
throw
|
|
114
|
+
throw error;
|
|
118
115
|
}
|
|
119
116
|
|
|
120
|
-
console.log(this.state.error);
|
|
121
117
|
const {
|
|
122
118
|
FallbackView
|
|
123
119
|
} = input;
|
|
@@ -125,12 +121,12 @@ const createCustomComponent = input => {
|
|
|
125
121
|
if (FallbackView) {
|
|
126
122
|
return /*#__PURE__*/React.createElement(FallbackView, {
|
|
127
123
|
ref: this.setRef,
|
|
128
|
-
error:
|
|
124
|
+
error: error
|
|
129
125
|
});
|
|
130
126
|
}
|
|
131
127
|
|
|
132
128
|
return /*#__PURE__*/React.createElement("div", {
|
|
133
|
-
ref:
|
|
129
|
+
ref: this.setRef
|
|
134
130
|
}, "error");
|
|
135
131
|
} else {
|
|
136
132
|
return /*#__PURE__*/React.createElement(View, {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
import React, { Children } from "react";
|
|
2
4
|
import ComponentRegistry from "./ComponentRegistry";
|
|
3
5
|
|
|
@@ -58,9 +60,9 @@ export function generateSlotChildren() {
|
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
if (View) {
|
|
61
|
-
slotChildren[name].push( /*#__PURE__*/React.createElement(View, {
|
|
63
|
+
slotChildren[name].push( /*#__PURE__*/React.createElement(View, _extends({}, finalisedProps, {
|
|
62
64
|
key: `${name}_${elementName}_${index}`
|
|
63
|
-
}, childProps.children));
|
|
65
|
+
}), childProps.children));
|
|
64
66
|
}
|
|
65
67
|
});
|
|
66
68
|
});
|
|
@@ -40,7 +40,7 @@ function Component(props) {
|
|
|
40
40
|
}, [props]);
|
|
41
41
|
const View = /*#__PURE__*/forwardRef(input.View);
|
|
42
42
|
|
|
43
|
-
if (state
|
|
43
|
+
if (state?.error) {
|
|
44
44
|
console.log(state.error);
|
|
45
45
|
return /*#__PURE__*/React.createElement("div", null, "error");
|
|
46
46
|
} else {
|
|
@@ -19,8 +19,7 @@ class DependencyFactory {
|
|
|
19
19
|
repository,
|
|
20
20
|
presenter,
|
|
21
21
|
eventManager,
|
|
22
|
-
jsonValidator: Validator.validate
|
|
23
|
-
schemaValidator: Validator.validatePropsAgainstSchema
|
|
22
|
+
jsonValidator: Validator.validate
|
|
24
23
|
});
|
|
25
24
|
const controller = new Controller(service);
|
|
26
25
|
return {
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
3
1
|
import ActionLocationEntity from "../../entities/ActionLocationEntity";
|
|
4
2
|
export default class Repository {
|
|
5
3
|
constructor() {
|
|
6
|
-
_defineProperty(this, "element", void 0);
|
|
7
|
-
|
|
8
|
-
_defineProperty(this, "dispatch", void 0);
|
|
9
|
-
|
|
10
|
-
_defineProperty(this, "state", void 0);
|
|
11
|
-
|
|
12
4
|
this.element = null;
|
|
13
5
|
}
|
|
14
6
|
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
3
1
|
export default class Presenter {
|
|
4
|
-
constructor() {
|
|
5
|
-
_defineProperty(this, "updateState", void 0);
|
|
6
|
-
|
|
7
|
-
_defineProperty(this, "state", void 0);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
2
|
updateDependencies(state, updateState) {
|
|
11
3
|
this.updateState = updateState;
|
|
12
4
|
this.state = state;
|
|
@@ -40,18 +40,14 @@ export default class ActionLocationEntity {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
listen(eventName) {
|
|
43
|
-
var _this$element;
|
|
44
|
-
|
|
45
43
|
const handler = this.createEventHandlers(eventName);
|
|
46
44
|
this.handlers[eventName] = handler;
|
|
47
|
-
|
|
45
|
+
this.element?.addEventListener(eventName, handler);
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
unListen(eventName) {
|
|
51
|
-
var _this$element2;
|
|
52
|
-
|
|
53
49
|
const handler = this.handlers[eventName];
|
|
54
|
-
|
|
50
|
+
this.element?.removeEventListener(eventName, handler);
|
|
55
51
|
this.handlers[eventName] = undefined;
|
|
56
52
|
}
|
|
57
53
|
|
|
@@ -9,10 +9,11 @@ import MoreDropdown from "../../../../legacy-to-new-arch/more-dropdown/framework
|
|
|
9
9
|
import Breadcrumb from "../../../../legacy-to-new-arch/breadcrumb/frameworks/ui/Breadcrumb";
|
|
10
10
|
import IconButton from "../../../../legacy-to-new-arch/icon-button/frameworks/ui/IconButton";
|
|
11
11
|
import HighlightedValue from "../../../../legacy-to-new-arch/highlighted-value/frameworks/ui/HighlightedValue";
|
|
12
|
+
import ListItem from "../../../../legacy-to-new-arch/list-item/frameworks/ui/ListItem";
|
|
12
13
|
const ActionComponentMapping = {
|
|
13
14
|
['ActionIcon']: ActionIcon,
|
|
14
15
|
['Button']: Button,
|
|
15
|
-
|
|
16
|
+
['ListItem']: ListItem,
|
|
16
17
|
['MoreDropdown']: MoreDropdown,
|
|
17
18
|
['TableColumnSort']: TableColumnSort,
|
|
18
19
|
['TableColumnChooser']: TableColumnChooser,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import ComponentRegistry from "../../../../../custom-component/frameworks/ui/ComponentRegistry";
|
|
3
5
|
import ActionComponentMapping from "../../../action-location/frameworks/ui/ActionComponentMapping";
|
|
@@ -23,13 +25,13 @@ function ActionsRendererView(_ref, ref) {
|
|
|
23
25
|
/* eslint-disable-next-line @zohodesk/architecturerules/no-defaultProps-rule */
|
|
24
26
|
|
|
25
27
|
const ActionUiType = ActionComponentMapping[type] || ComponentRegistry.get(type);
|
|
26
|
-
return /*#__PURE__*/React.createElement(ActionUiType, {
|
|
27
|
-
key: index
|
|
28
|
-
|
|
28
|
+
return /*#__PURE__*/React.createElement(ActionUiType, _extends({
|
|
29
|
+
key: index
|
|
30
|
+
}, properties, {
|
|
29
31
|
appendToActionPayload: {
|
|
30
32
|
eventMappings
|
|
31
33
|
}
|
|
32
|
-
});
|
|
34
|
+
}));
|
|
33
35
|
}));
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -46,7 +46,8 @@ export function TransformState(state) {
|
|
|
46
46
|
headerRightActions,
|
|
47
47
|
footerLeftActions,
|
|
48
48
|
footerRightActions,
|
|
49
|
-
rightPanel
|
|
49
|
+
rightPanel,
|
|
50
|
+
clientScripts
|
|
50
51
|
} = state.properties; // const { values, errorMessages } = state.behaviours.form;
|
|
51
52
|
|
|
52
53
|
const updatedSections = updateFieldValues({
|
|
@@ -65,6 +66,7 @@ export function TransformState(state) {
|
|
|
65
66
|
headerRightActions,
|
|
66
67
|
footerLeftActions,
|
|
67
68
|
footerRightActions,
|
|
69
|
+
clientScripts,
|
|
68
70
|
rightPanel
|
|
69
71
|
}
|
|
70
72
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { DefaultFormSectionUIType } from "../../../../../../cc/fields/field/FormDefaultUIType";
|
|
2
2
|
import ComponentRegistry from "../../../../../custom-component/frameworks/ui/ComponentRegistry";
|
|
3
|
-
import { TextArea, TextBox, Email, PickList, Currency, MultiSelect, Url, Percentage, Phone, Number, Decimal, Date, DateTime, Checkbox } from "../../../form-fields";
|
|
3
|
+
import { TextArea, TextBox, Email, PickList, Currency, MultiSelect, Url, Percentage, Phone, Number, Decimal, Date, DateTime, Checkbox, LookUp } from "../../../form-fields";
|
|
4
4
|
import Section from "../../../section/frameworks/ui/Section";
|
|
5
|
+
import ActionIcon from "../../../../legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon";
|
|
6
|
+
import Button from "../../../../legacy-to-new-arch/button/frameworks/ui/Button";
|
|
7
|
+
import SwitchField from "../../../../legacy-to-new-arch/table-field-components/switch-field/frameworks/ui/SwitchField";
|
|
5
8
|
export function registerDefaultComponents() {
|
|
6
9
|
// Registering components in the ComponentRegistry
|
|
7
10
|
// NOTE: This is a workaround to avoid dynamic imports
|
|
@@ -19,6 +22,12 @@ export function registerDefaultComponents() {
|
|
|
19
22
|
ComponentRegistry.register('Decimal', Decimal);
|
|
20
23
|
ComponentRegistry.register('Date', Date);
|
|
21
24
|
ComponentRegistry.register('DateTime', DateTime);
|
|
22
|
-
ComponentRegistry.register('Checkbox', Checkbox);
|
|
23
|
-
|
|
25
|
+
ComponentRegistry.register('Checkbox', Checkbox); // ComponentRegistry.register('Switch', Checkbox);
|
|
26
|
+
|
|
27
|
+
ComponentRegistry.register('LookUp', LookUp);
|
|
28
|
+
ComponentRegistry.register(DefaultFormSectionUIType, Section); // Add more components as needed
|
|
29
|
+
|
|
30
|
+
ComponentRegistry.register('Switch', SwitchField);
|
|
31
|
+
ComponentRegistry.register('Button', Button);
|
|
32
|
+
ComponentRegistry.register('ActionIcon', ActionIcon);
|
|
24
33
|
}
|
|
@@ -4,10 +4,12 @@ import FormView from "./FormView";
|
|
|
4
4
|
import { TransformState } from "../../adapters/presenter/TransformState";
|
|
5
5
|
import EventHandlersFactory from "./EventHandlerFactory";
|
|
6
6
|
import { registerDefaultComponents } from "./DefaultComponentRegister";
|
|
7
|
+
import FormFallbackView from "./FormFallbackView";
|
|
7
8
|
registerDefaultComponents();
|
|
8
9
|
const Form = createCustomComponent({
|
|
9
10
|
name: 'CustomForm',
|
|
10
11
|
View: FormView,
|
|
12
|
+
FallbackView: FormFallbackView,
|
|
11
13
|
properties: FormProperties,
|
|
12
14
|
transformState: TransformState,
|
|
13
15
|
eventHandlers: EventHandlersFactory.create(),
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ErrorState from "../../../../legacy-to-new-arch/error-state/frameworks/ui/ErrorState";
|
|
3
|
+
import { ErrorCodes } from "../../../../../../cc/component/ErrorStructure";
|
|
4
|
+
import ErrorTypes from "../../../../../../cc/error-state/ErrorTypes";
|
|
5
|
+
|
|
6
|
+
function FormFallbackView(_ref, ref) {
|
|
7
|
+
let {
|
|
8
|
+
error
|
|
9
|
+
} = _ref;
|
|
10
|
+
const map = {
|
|
11
|
+
[ErrorCodes.API_FAILED]: ErrorTypes.UrlNotFound,
|
|
12
|
+
[ErrorCodes.PROPERTY_VALIDATION_FAILED]: ErrorTypes.OopsSomethingMiss,
|
|
13
|
+
[ErrorCodes.EVENT_HANDLER_FAILED]: ErrorTypes.Inconvenience,
|
|
14
|
+
[ErrorCodes.UNKNOWN_ERROR]: ErrorTypes.Inconvenience
|
|
15
|
+
};
|
|
16
|
+
const errorType = map[error.code] === undefined ? ErrorTypes.Inconvenience : map[error.code];
|
|
17
|
+
return /*#__PURE__*/React.createElement(ErrorState, {
|
|
18
|
+
type: errorType,
|
|
19
|
+
getRef: ref
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default /*#__PURE__*/React.forwardRef(FormFallbackView);
|
|
@@ -17,18 +17,23 @@ function FormView(_ref, ref) {
|
|
|
17
17
|
footerLeftActions,
|
|
18
18
|
footerRightActions,
|
|
19
19
|
isHeaderEnabled,
|
|
20
|
-
isFooterEnabled
|
|
20
|
+
isFooterEnabled,
|
|
21
|
+
clientScripts
|
|
21
22
|
} = state.viewModel;
|
|
22
23
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
23
24
|
$ui_tagName: "form",
|
|
24
25
|
$ui_displayMode: "flex",
|
|
25
26
|
$ui_direction: "column",
|
|
26
27
|
$flag_fullsize: true,
|
|
28
|
+
$a11yAttributes_container: {
|
|
29
|
+
role: 'form'
|
|
30
|
+
},
|
|
27
31
|
ref: ref
|
|
28
32
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
29
33
|
hasHeader: isHeaderEnabled,
|
|
30
34
|
headerLeftActions: headerLeftActions,
|
|
31
|
-
headerRightActions: headerRightActions
|
|
35
|
+
headerRightActions: headerRightActions,
|
|
36
|
+
clientScripts: clientScripts
|
|
32
37
|
}), /*#__PURE__*/React.createElement(MiddleSection, {
|
|
33
38
|
sections: sections,
|
|
34
39
|
isLoading: isLoading,
|
|
@@ -36,7 +41,8 @@ function FormView(_ref, ref) {
|
|
|
36
41
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
37
42
|
hasFooter: isFooterEnabled,
|
|
38
43
|
footerLeftActions: footerLeftActions,
|
|
39
|
-
footerRightActions: footerRightActions
|
|
44
|
+
footerRightActions: footerRightActions,
|
|
45
|
+
clientScripts: clientScripts
|
|
40
46
|
}));
|
|
41
47
|
}
|
|
42
48
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { render, cleanup } from '@testing-library/react';
|
|
3
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
@@ -24,8 +26,7 @@ describe('Form Sections', () => {
|
|
|
24
26
|
test('Sections are vertically aligned', () => {
|
|
25
27
|
const {
|
|
26
28
|
getByText
|
|
27
|
-
} = render( /*#__PURE__*/React.createElement(Form,
|
|
28
|
-
}));
|
|
29
|
+
} = render( /*#__PURE__*/React.createElement(Form, formProperties));
|
|
29
30
|
expect(getByText('User Details')).toBeInTheDocument();
|
|
30
31
|
expect(getByText('Address Information')).toBeInTheDocument();
|
|
31
32
|
});
|
|
@@ -42,24 +43,21 @@ describe('Form Sections', () => {
|
|
|
42
43
|
const {
|
|
43
44
|
getByText,
|
|
44
45
|
queryByText
|
|
45
|
-
} = render( /*#__PURE__*/React.createElement(Form,
|
|
46
|
-
}));
|
|
46
|
+
} = render( /*#__PURE__*/React.createElement(Form, singleSectionProperties));
|
|
47
47
|
expect(getByText('User Details')).toBeInTheDocument();
|
|
48
48
|
expect(queryByText('Address Information')).not.toBeInTheDocument();
|
|
49
49
|
});
|
|
50
50
|
test('Multiple sections in a layout', () => {
|
|
51
51
|
const {
|
|
52
52
|
getByText
|
|
53
|
-
} = render( /*#__PURE__*/React.createElement(Form,
|
|
54
|
-
}));
|
|
53
|
+
} = render( /*#__PURE__*/React.createElement(Form, formProperties));
|
|
55
54
|
expect(getByText('User Details')).toBeInTheDocument();
|
|
56
55
|
expect(getByText('Address Information')).toBeInTheDocument();
|
|
57
56
|
});
|
|
58
57
|
test('Maintain section order during rendering', () => {
|
|
59
58
|
const {
|
|
60
59
|
getAllByText
|
|
61
|
-
} = render( /*#__PURE__*/React.createElement(Form,
|
|
62
|
-
}));
|
|
60
|
+
} = render( /*#__PURE__*/React.createElement(Form, formProperties));
|
|
63
61
|
const sections = getAllByText(/Details|Information/);
|
|
64
62
|
expect(sections[0]).toHaveTextContent('User Details');
|
|
65
63
|
expect(sections[1]).toHaveTextContent('Address Information');
|
|
@@ -68,8 +66,7 @@ describe('Form Sections', () => {
|
|
|
68
66
|
const {
|
|
69
67
|
getAllByText,
|
|
70
68
|
rerender
|
|
71
|
-
} = render( /*#__PURE__*/React.createElement(Form,
|
|
72
|
-
}));
|
|
69
|
+
} = render( /*#__PURE__*/React.createElement(Form, formProperties));
|
|
73
70
|
const sections = getAllByText(/Details|Information/);
|
|
74
71
|
expect(sections[0]).toHaveTextContent('User Details');
|
|
75
72
|
expect(sections[1]).toHaveTextContent('Address Information');
|
|
@@ -94,8 +91,7 @@ describe('Form Sections', () => {
|
|
|
94
91
|
isVisible: true
|
|
95
92
|
}]
|
|
96
93
|
};
|
|
97
|
-
rerender( /*#__PURE__*/React.createElement(Form,
|
|
98
|
-
}));
|
|
94
|
+
rerender( /*#__PURE__*/React.createElement(Form, updatedProperties));
|
|
99
95
|
const updatedSections = getAllByText(/Details|Summary|Information/);
|
|
100
96
|
expect(updatedSections[0]).toHaveTextContent('User Details');
|
|
101
97
|
expect(updatedSections[1]).toHaveTextContent('Order Summary');
|
|
@@ -107,8 +103,7 @@ describe('Form Sections', () => {
|
|
|
107
103
|
getByText,
|
|
108
104
|
queryByText,
|
|
109
105
|
rerender
|
|
110
|
-
} = render( /*#__PURE__*/React.createElement(Form,
|
|
111
|
-
}));
|
|
106
|
+
} = render( /*#__PURE__*/React.createElement(Form, formProperties));
|
|
112
107
|
const sections = getAllByText(/Details|Information/);
|
|
113
108
|
expect(sections[0]).toHaveTextContent('User Details');
|
|
114
109
|
expect(sections[1]).toHaveTextContent('Address Information');
|
|
@@ -121,8 +116,7 @@ describe('Form Sections', () => {
|
|
|
121
116
|
isVisible: true
|
|
122
117
|
}]
|
|
123
118
|
};
|
|
124
|
-
rerender( /*#__PURE__*/React.createElement(Form,
|
|
125
|
-
}));
|
|
119
|
+
rerender( /*#__PURE__*/React.createElement(Form, updatedProperties));
|
|
126
120
|
expect(getByText('User Details')).toBeInTheDocument();
|
|
127
121
|
expect(queryByText('Address Information')).not.toBeInTheDocument();
|
|
128
122
|
}); // Loading tests
|
|
@@ -130,17 +124,17 @@ describe('Form Sections', () => {
|
|
|
130
124
|
test('Display loading indicator during form loading', () => {
|
|
131
125
|
const {
|
|
132
126
|
getByText
|
|
133
|
-
} = render( /*#__PURE__*/React.createElement(Form, {
|
|
127
|
+
} = render( /*#__PURE__*/React.createElement(Form, _extends({}, formProperties, {
|
|
134
128
|
isLoading: true
|
|
135
|
-
}));
|
|
129
|
+
})));
|
|
136
130
|
expect(getByText('Loading...')).toBeInTheDocument();
|
|
137
131
|
});
|
|
138
132
|
test('No loading indicator when form is not loading', () => {
|
|
139
133
|
const {
|
|
140
134
|
queryByText
|
|
141
|
-
} = render( /*#__PURE__*/React.createElement(Form, {
|
|
135
|
+
} = render( /*#__PURE__*/React.createElement(Form, _extends({}, formProperties, {
|
|
142
136
|
isLoading: false
|
|
143
|
-
}));
|
|
137
|
+
})));
|
|
144
138
|
expect(queryByText('Loading...')).not.toBeInTheDocument();
|
|
145
139
|
});
|
|
146
140
|
});
|
|
@@ -3,20 +3,17 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.field {
|
|
6
|
-
margin-top:
|
|
6
|
+
margin-top: 5px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.multiSelectField {
|
|
10
|
-
margin-top:
|
|
10
|
+
margin-top: 2px
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.checkboxField {
|
|
14
14
|
composes: dInflex alignFstart from '~@zohodesk/components/es/common/common.module.css';
|
|
15
|
-
max-width: 100
|
|
16
|
-
gap:
|
|
17
|
-
}
|
|
18
|
-
.checkboxWrapper {
|
|
19
|
-
margin-top: var(--zd_size3)
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
gap: 8px
|
|
20
17
|
}
|
|
21
18
|
|
|
22
19
|
.cursor_pointer {
|
|
@@ -30,36 +27,36 @@
|
|
|
30
27
|
}
|
|
31
28
|
|
|
32
29
|
[dir=ltr] .footer {
|
|
33
|
-
padding-right:
|
|
30
|
+
padding-right: 32px
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
[dir=rtl] .footer {
|
|
37
|
-
padding-left:
|
|
34
|
+
padding-left: 32px
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
/* Sections layout */
|
|
41
38
|
|
|
42
39
|
.sectionsWrapper {
|
|
43
|
-
padding-bottom:
|
|
40
|
+
padding-bottom: 8px
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
.sectionsLayout, .sectionsTwoLayout {
|
|
47
|
-
margin: 0 auto
|
|
44
|
+
margin: 0 auto
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
.sectionsLayout {
|
|
51
|
-
max-width: var(--local-form-layout-max-width,
|
|
48
|
+
max-width: var(--local-form-layout-max-width, 1080px)
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
.sectionsTwoLayout {
|
|
55
|
-
column-gap:
|
|
56
|
-
max-width: var(--local-form-layout-max-width,
|
|
52
|
+
column-gap: 8px;
|
|
53
|
+
max-width: var(--local-form-layout-max-width, 1210px)
|
|
57
54
|
}
|
|
58
55
|
|
|
59
56
|
.rightPanel {
|
|
60
57
|
height: var(--local-form-right-panel-height, 100%);
|
|
61
58
|
position: -webkit-sticky;
|
|
62
59
|
position: sticky;
|
|
63
|
-
top: 0
|
|
64
|
-
padding:
|
|
60
|
+
top: 0;
|
|
61
|
+
padding: 8px 0
|
|
65
62
|
}
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import FormAction, { LeftSide, RightSide } from '@zohodesk/dot/es/FormAction/FormAction';
|
|
3
|
-
import ActionEventMediator from "../../../../../../../platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
|
|
4
3
|
import { ActionViewGap } from "../../../../../../../platform/client-actions/components/interfaces/ActionViewModel"; // @ts-ignore
|
|
5
4
|
|
|
6
5
|
import style from "../css/Form.module.css";
|
|
6
|
+
import { RowActionsRenderer } from "../../../../../../../index";
|
|
7
7
|
export default function Footer(_ref) {
|
|
8
8
|
let {
|
|
9
9
|
hasFooter,
|
|
10
10
|
footerLeftActions,
|
|
11
|
-
footerRightActions
|
|
11
|
+
footerRightActions,
|
|
12
|
+
clientScripts
|
|
12
13
|
} = _ref;
|
|
13
14
|
if (!hasFooter) return null;
|
|
14
15
|
return /*#__PURE__*/React.createElement(FormAction, {
|
|
15
16
|
size: "small",
|
|
16
17
|
paddingLeftSize: "xmedium",
|
|
17
18
|
paddingRightClass: style.footer
|
|
18
|
-
}, /*#__PURE__*/React.createElement(LeftSide, null, footerLeftActions.length > 0 && /*#__PURE__*/React.createElement(
|
|
19
|
+
}, /*#__PURE__*/React.createElement(LeftSide, null, footerLeftActions.length > 0 && /*#__PURE__*/React.createElement(RowActionsRenderer, {
|
|
19
20
|
testId: "formFooter_leftActions",
|
|
20
21
|
actions: footerLeftActions,
|
|
22
|
+
clientScripts: clientScripts,
|
|
21
23
|
gap: ActionViewGap.LARGE
|
|
22
|
-
})), /*#__PURE__*/React.createElement(RightSide, null, footerRightActions.length > 0 && /*#__PURE__*/React.createElement(
|
|
24
|
+
})), /*#__PURE__*/React.createElement(RightSide, null, footerRightActions.length > 0 && /*#__PURE__*/React.createElement(RowActionsRenderer, {
|
|
23
25
|
testId: "formFooter_rightActions",
|
|
24
26
|
actions: footerRightActions,
|
|
27
|
+
clientScripts: clientScripts,
|
|
25
28
|
gap: ActionViewGap.LARGE
|
|
26
29
|
})));
|
|
27
30
|
}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import FormHeader from '@zohodesk-private/desk-components/es/setup/SetupHeader/SetupHeader';
|
|
3
|
-
import ActionEventMediator from "../../../../../../../platform/client-actions/components/action-event-mediator/frameworks/ui/ActionEventMediator";
|
|
4
3
|
import { ActionViewGap } from "../../../../../../../platform/client-actions/components/interfaces/ActionViewModel";
|
|
4
|
+
import RowActionsRenderer from "../../../../../../../platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer";
|
|
5
5
|
export default function Header(_ref) {
|
|
6
6
|
let {
|
|
7
7
|
hasHeader,
|
|
8
8
|
headerLeftActions,
|
|
9
|
-
headerRightActions
|
|
9
|
+
headerRightActions,
|
|
10
|
+
clientScripts
|
|
10
11
|
} = _ref;
|
|
11
12
|
if (!hasHeader) return null;
|
|
12
13
|
return /*#__PURE__*/React.createElement(FormHeader, {
|
|
13
14
|
customId: "formHeader",
|
|
14
15
|
testId: "formHeader",
|
|
15
|
-
$render_leftElement: headerLeftActions.length > 0 ? /*#__PURE__*/React.createElement(
|
|
16
|
+
$render_leftElement: headerLeftActions.length > 0 ? /*#__PURE__*/React.createElement(RowActionsRenderer, {
|
|
16
17
|
actions: headerLeftActions,
|
|
18
|
+
clientScripts: clientScripts,
|
|
17
19
|
gap: ActionViewGap.MEDIUM
|
|
18
20
|
}) : null,
|
|
19
|
-
$render_rightElement: headerRightActions.length > 0 ? /*#__PURE__*/React.createElement(
|
|
21
|
+
$render_rightElement: headerRightActions.length > 0 ? /*#__PURE__*/React.createElement(RowActionsRenderer, {
|
|
20
22
|
actions: headerRightActions,
|
|
23
|
+
clientScripts: clientScripts,
|
|
21
24
|
gap: ActionViewGap.MEDIUM
|
|
22
25
|
}) : null
|
|
23
26
|
});
|
package/es/library/dot/components/form/frameworks/ui/sub-components/SectionsWithRightPanelLayout.js
CHANGED
|
@@ -25,8 +25,7 @@ export default function SectionsWithRightPanelLayout(_ref) {
|
|
|
25
25
|
}, children), /*#__PURE__*/React.createElement(Flex, {
|
|
26
26
|
$flag_shrink: false,
|
|
27
27
|
$ui_className: style.rightPanel
|
|
28
|
-
}, /*#__PURE__*/React.createElement(RightPanelComponent,
|
|
29
|
-
})));
|
|
28
|
+
}, /*#__PURE__*/React.createElement(RightPanelComponent, properties)));
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
function updateRightPanelHeight(ref) {
|
|
@@ -64,15 +64,13 @@ function CheckboxView(_ref2, ref) {
|
|
|
64
64
|
type: CheckboxConstants.CHECKBOX_TOGGLED
|
|
65
65
|
})
|
|
66
66
|
} : undefined
|
|
67
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
68
|
-
className: style.checkboxWrapper
|
|
69
67
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
70
68
|
id: id,
|
|
71
69
|
checked: value,
|
|
72
70
|
required: required,
|
|
73
71
|
disabled: disabled,
|
|
74
72
|
readonly: readonly
|
|
75
|
-
})
|
|
73
|
+
}), /*#__PURE__*/React.createElement(Label, {
|
|
76
74
|
for: id,
|
|
77
75
|
label: label,
|
|
78
76
|
actions: labelActions,
|
|
@@ -3,12 +3,12 @@ import { CurrencyFieldProperties } from "../../../../../../../cc/fields";
|
|
|
3
3
|
import CurrencyView from "./CurrencyView";
|
|
4
4
|
import EventHandlersFactory from "./EventHandlerFactory";
|
|
5
5
|
import FocusFieldBehaviourFactory from "../../../../../../behaviours/field-focus/frameworks/ui/FocusFieldBehaviourFactory";
|
|
6
|
-
let
|
|
7
|
-
name: "
|
|
6
|
+
let Currency = createCustomComponent({
|
|
7
|
+
name: "FormCurrencyField",
|
|
8
8
|
View: CurrencyView,
|
|
9
9
|
properties: CurrencyFieldProperties,
|
|
10
10
|
events: [],
|
|
11
11
|
eventHandlers: EventHandlersFactory.create(),
|
|
12
12
|
behaviours: [FocusFieldBehaviourFactory.create()]
|
|
13
13
|
});
|
|
14
|
-
export default
|
|
14
|
+
export default Currency;
|