@configuratorware/configurator-frontendgui 1.28.6 → 1.29.3
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/App/Constant.js +73 -0
- package/App/Error/DevelopmentErrorPage/index.js +74 -0
- package/App/Error/ErrorBoundary.js +98 -0
- package/App/Error/ProductionErrorPage/Style.scss +47 -0
- package/App/Error/ProductionErrorPage/index.js +43 -0
- package/App/Error/ProductionErrorPage/index.story.js +13 -0
- package/App/Error/ProductionErrorPage/res/error_gears.png +0 -0
- package/App/Frame.js +95 -0
- package/App/Modules/Creator/Components/ConfigurationvariantItem/Styles.scss +33 -0
- package/App/Modules/Creator/Components/ConfigurationvariantItem/index.js +118 -0
- package/App/Modules/Creator/Components/ConfigurationvariantSelection/Styles.scss +47 -0
- package/App/Modules/Creator/Components/ConfigurationvariantSelection/index.js +130 -0
- package/App/Modules/Creator/Components/CustomTitleEditor/Styles.scss +43 -0
- package/App/Modules/Creator/Components/CustomTitleEditor/index.js +144 -0
- package/App/Modules/Creator/Components/ExternalVisualization/index.js +140 -0
- package/App/Modules/Creator/Components/FastConfiguration/SelectableRow.js +128 -0
- package/App/Modules/Creator/Components/FastConfiguration/Styles.scss +53 -0
- package/App/Modules/Creator/Components/FastConfiguration/index.js +280 -0
- package/App/Modules/Creator/Components/FastConfigurationRow/Styles.scss +45 -0
- package/App/Modules/Creator/Components/FastConfigurationRow/index.js +78 -0
- package/App/Modules/Creator/Components/FastConfigurationSelect/Styles.scss +35 -0
- package/App/Modules/Creator/Components/FastConfigurationSelect/index.js +251 -0
- package/App/Modules/Creator/Components/FormattedNumber/index.js +45 -0
- package/App/Modules/Creator/Components/FormattedPrice/index.js +57 -0
- package/App/Modules/Creator/Components/FullScreenView/FullScreenView.js +104 -0
- package/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +186 -0
- package/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +182 -0
- package/App/Modules/Creator/Components/Incompatibility/RuleComponent.js +88 -0
- package/App/Modules/Creator/Components/Incompatibility/index.js +253 -0
- package/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +164 -0
- package/App/Modules/Creator/Components/LoginForm/Styles.scss +9 -0
- package/App/Modules/Creator/Components/LoginForm/index.js +129 -0
- package/App/Modules/Creator/Components/Option/index.js +545 -0
- package/App/Modules/Creator/Components/Option/index.story.js +154 -0
- package/App/Modules/Creator/Components/OptionAmount/index.js +236 -0
- package/App/Modules/Creator/Components/OptionGroup/index.js +55 -0
- package/App/Modules/Creator/Components/Optiondetail/ZoomImage/index.js +173 -0
- package/App/Modules/Creator/Components/Optiondetail/index.js +499 -0
- package/App/Modules/Creator/Components/Optiondetail/index.story.js +117 -0
- package/App/Modules/Creator/Components/OptionsList/index.js +193 -0
- package/App/Modules/Creator/Components/Price/Styles.scss +3 -0
- package/App/Modules/Creator/Components/Price/index.js +79 -0
- package/App/Modules/Creator/Components/ProductPart/index.js +187 -0
- package/App/Modules/Creator/Components/ProductPart/index.story.js +88 -0
- package/App/Modules/Creator/Components/ProductPartsList/index.js +153 -0
- package/App/Modules/Creator/Components/ProductPartsList/index.story.js +101 -0
- package/App/Modules/Creator/Components/SavedConfiguration/Styles.scss +19 -0
- package/App/Modules/Creator/Components/SavedConfiguration/index.js +82 -0
- package/App/Modules/Creator/Components/ShareConfiguration/Styles.scss +23 -0
- package/App/Modules/Creator/Components/ShareConfiguration/index.js +224 -0
- package/App/Modules/Creator/Components/StockInformation/index.js +93 -0
- package/App/Modules/Creator/Components/StoreConfigurationForm/Styles.scss +5 -0
- package/App/Modules/Creator/Components/StoreConfigurationForm/index.js +123 -0
- package/App/Modules/Creator/Components/Tools/Styles.scss +44 -0
- package/App/Modules/Creator/Components/Tools/index.js +102 -0
- package/App/Modules/Creator/Components/ValidationResult/Styles.scss +45 -0
- package/App/Modules/Creator/Components/ValidationResult/index.js +165 -0
- package/App/Modules/Creator/Components/index.js +84 -0
- package/App/Modules/Creator/Containers/AmountPrice/index.js +26 -0
- package/App/Modules/Creator/Containers/ConfigurationvariantSelection/index.js +60 -0
- package/App/Modules/Creator/Containers/CustomTitleEditor/index.js +52 -0
- package/App/Modules/Creator/Containers/FastConfiguration/index.js +62 -0
- package/App/Modules/Creator/Containers/FormattedPrice/index.js +31 -0
- package/App/Modules/Creator/Containers/Incompatibility/index.js +40 -0
- package/App/Modules/Creator/Containers/InvalidConfigurationNotice/index.js +89 -0
- package/App/Modules/Creator/Containers/LoadingOverlay/index.js +26 -0
- package/App/Modules/Creator/Containers/Optiondetail/index.js +48 -0
- package/App/Modules/Creator/Containers/OptionsList/index.js +49 -0
- package/App/Modules/Creator/Containers/ProductPart/index.js +26 -0
- package/App/Modules/Creator/Containers/ProductPartsList/index.js +50 -0
- package/App/Modules/Creator/Containers/SavedConfigurationContainer/index.js +25 -0
- package/App/Modules/Creator/Containers/ShareConfiguration/index.js +42 -0
- package/App/Modules/Creator/Containers/StockInformation/index.js +33 -0
- package/App/Modules/Creator/Containers/Tools/index.js +44 -0
- package/App/Modules/Creator/Containers/ValidationResult/index.js +34 -0
- package/App/Modules/Creator/Containers/index.js +175 -0
- package/App/Modules/Creator/CreatorScreen.js +307 -0
- package/App/Modules/Creator/Layouts/DefaultLayout.js +260 -0
- package/App/Modules/Creator/Styles.scss +216 -0
- package/App/Modules/Designer/Components/AddGalleryImage/index.js +234 -0
- package/App/Modules/Designer/Components/AddGalleryImage/index.story.js +94 -0
- package/App/Modules/Designer/Components/AddGalleryImage/index.test.js +151 -0
- package/App/Modules/Designer/Components/AddVisualElement/Styles.scss +0 -0
- package/App/Modules/Designer/Components/AddVisualElement/index.js +278 -0
- package/App/Modules/Designer/Components/AddVisualElement/index.story.js +24 -0
- package/App/Modules/Designer/Components/AddVisualElement/index.test.js +47 -0
- package/App/Modules/Designer/Components/CloseDesignEditor/index.js +130 -0
- package/App/Modules/Designer/Components/CloseGraphicsEditorButton/index.js +54 -0
- package/App/Modules/Designer/Components/ColorPalettes/ColorPalettesSearch.js +175 -0
- package/App/Modules/Designer/Components/ColorPalettes/index.js +814 -0
- package/App/Modules/Designer/Components/ColorPalettes/index.story.js +158 -0
- package/App/Modules/Designer/Components/ColorPalettes/index.test.js +150 -0
- package/App/Modules/Designer/Components/DesignAreaControlbox/Styles.scss +0 -0
- package/App/Modules/Designer/Components/DesignAreaControlbox/index.js +467 -0
- package/App/Modules/Designer/Components/DesignAreaControlbox/index.story.js +272 -0
- package/App/Modules/Designer/Components/DesignAreaControlbox/index.test.js +164 -0
- package/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +162 -0
- package/App/Modules/Designer/Components/DesignerSelectionToolbox/DesignerSelectionToolbox.js +425 -0
- package/App/Modules/Designer/Components/DesignerSelectionToolbox/fontItemUtils.js +48 -0
- package/App/Modules/Designer/Components/Dialog/index.js +125 -0
- package/App/Modules/Designer/Components/EditDesignButton/index.js +128 -0
- package/App/Modules/Designer/Components/FeedbackNotice/index.js +110 -0
- package/App/Modules/Designer/Components/FeedbackNotice/index.test.js +16 -0
- package/App/Modules/Designer/Components/FullScreenView/FullScreenView.js +63 -0
- package/App/Modules/Designer/Components/ImageColorPicker/ImageColorPicker.dev.js +32 -0
- package/App/Modules/Designer/Components/ImageColorPicker/ImageColorPicker.js +430 -0
- package/App/Modules/Designer/Components/ImageColorize/index.js +636 -0
- package/App/Modules/Designer/Components/ImageColorize/index.story.js +73 -0
- package/App/Modules/Designer/Components/ImageControlbox/index.js +302 -0
- package/App/Modules/Designer/Components/ImageEditDialog/ImageThumbnail.js +171 -0
- package/App/Modules/Designer/Components/ImageEditDialog/ImageUpload.js +478 -0
- package/App/Modules/Designer/Components/ImageEditDialog/index.js +716 -0
- package/App/Modules/Designer/Components/ImageEditDialog/res/baseline_colorize_black_24dp.png +0 -0
- package/App/Modules/Designer/Components/ImageEditDialog/res/checkers_tile.png +0 -0
- package/App/Modules/Designer/Components/ImageLibraryFilter/index.js +179 -0
- package/App/Modules/Designer/Components/ImageLibraryThumbnail/Styles.scss +14 -0
- package/App/Modules/Designer/Components/ImageLibraryThumbnail/index.js +165 -0
- package/App/Modules/Designer/Components/ObjectTools/index.js +146 -0
- package/App/Modules/Designer/Components/Select/index.js +171 -0
- package/App/Modules/Designer/Components/TextControlbox/TextFormatIcon.js +48 -0
- package/App/Modules/Designer/Components/TextControlbox/index.js +656 -0
- package/App/Modules/Designer/Components/TextControlbox/index.story.js +109 -0
- package/App/Modules/Designer/Components/TextControlbox/index.test.js +172 -0
- package/App/Modules/Designer/Containers/AddGalleryImage.js +90 -0
- package/App/Modules/Designer/Containers/AddVisualElement.js +166 -0
- package/App/Modules/Designer/Containers/CloseDesignEditor.js +32 -0
- package/App/Modules/Designer/Containers/CloseGraphicsEditorButton.js +32 -0
- package/App/Modules/Designer/Containers/ColorPalettes.js +145 -0
- package/App/Modules/Designer/Containers/DesignAreaControlbox.js +54 -0
- package/App/Modules/Designer/Containers/Designer.js +37 -0
- package/App/Modules/Designer/Containers/DesignerSelectionToolbox.js +116 -0
- package/App/Modules/Designer/Containers/EditDesignButton.js +35 -0
- package/App/Modules/Designer/Containers/ImageEditDialog.js +1130 -0
- package/App/Modules/Designer/Designer.js +231 -0
- package/App/Modules/Designer/DesignerScreen.js +255 -0
- package/App/Modules/Designer/DesignerUI.js +241 -0
- package/App/Modules/Designer/Layouts/DefaultLayout.js +221 -0
- package/App/Modules/Designer/Layouts/Mobile/TwoSideBottomBar.js +50 -0
- package/App/Modules/Designer/Layouts/PopupAreaProvider.js +186 -0
- package/App/Modules/Designer/MultilayerComponents/DesignerClickAwayListener.js +53 -0
- package/App/Modules/Designer/MultilayerComponents/InlineToolboxPortal.js +106 -0
- package/App/Modules/Designer/MultilayerComponents/StandardToolboxPortal.js +64 -0
- package/App/Modules/Designer/Utils/FontFaceRepository.js +82 -0
- package/App/Modules/Designer/Utils/ImageEditUtils.js +104 -0
- package/App/Modules/Designer/Utils/Transformers.js +164 -0
- package/App/Modules/Designer/setupDesigner.js +182 -0
- package/App/Modules/Designer/withActiveCanvas.js +136 -0
- package/App/Modules/Visualization/AlignTargetContainer.js +55 -0
- package/App/Modules/Visualization/CreatorAlignTarget.js +41 -0
- package/App/Modules/Visualization/DefaultVisualizationProvider.js +105 -0
- package/App/Modules/Visualization/DesignerAlignTarget.js +45 -0
- package/App/Modules/Visualization/Utils/getFirstDataURLFromScreenshotsObj.js +20 -0
- package/App/Reducers/Actions.js +297 -0
- package/App/Reducers/ConfigurationMode/Actions.js +21 -0
- package/App/Reducers/ConfigurationMode/Reducer.js +80 -0
- package/App/Reducers/ConfigurationMode/Selectors.js +84 -0
- package/App/Reducers/Configurator/Actions.js +1417 -0
- package/App/Reducers/Configurator/AttributeSelectors.js +32 -0
- package/App/Reducers/Configurator/Modifiers.js +35 -0
- package/App/Reducers/Configurator/Reducer.js +639 -0
- package/App/Reducers/Configurator/Selectors.js +242 -0
- package/App/Reducers/Confirm/Actions.js +84 -0
- package/App/Reducers/Confirm/Reducer.js +30 -0
- package/App/Reducers/DesignArea/Actions.js +76 -0
- package/App/Reducers/DesignArea/DesignElementSelectors.js +114 -0
- package/App/Reducers/DesignArea/MaskSelectors.js +101 -0
- package/App/Reducers/DesignArea/Reducer.js +150 -0
- package/App/Reducers/DesignArea/Selectors.js +1304 -0
- package/App/Reducers/DesignArea/Transformers.js +333 -0
- package/App/Reducers/DesignData/Actions.js +232 -0
- package/App/Reducers/DesignData/Modifiers.js +328 -0
- package/App/Reducers/DesignData/Reducer.js +189 -0
- package/App/Reducers/DesignData/Selectors.js +94 -0
- package/App/Reducers/DesignData/Transformers.js +27 -0
- package/App/Reducers/DesignView/Actions.js +19 -0
- package/App/Reducers/DesignView/Reducer.js +165 -0
- package/App/Reducers/DesignView/Selectors.js +130 -0
- package/App/Reducers/DesignView/Transformers.js +32 -0
- package/App/Reducers/Device/Actions.js +16 -0
- package/App/Reducers/Device/Reducer.js +51 -0
- package/App/Reducers/Fonts/Actions.js +137 -0
- package/App/Reducers/Fonts/Reducer.js +39 -0
- package/App/Reducers/Fonts/Selectors.js +98 -0
- package/App/Reducers/GeneralActions.js +16 -0
- package/App/Reducers/ImageGallery/Actions.js +336 -0
- package/App/Reducers/ImageGallery/Modifiers.js +67 -0
- package/App/Reducers/ImageGallery/Reducer.js +320 -0
- package/App/Reducers/ImageGallery/Selectors.js +206 -0
- package/App/Reducers/Reducer.js +107 -0
- package/App/Reducers/UI/Actions.js +191 -0
- package/App/Reducers/UI/Reducer.js +98 -0
- package/App/Reducers/UI/Selectors.js +32 -0
- package/App/Reducers.js +48 -0
- package/App/Routing.js +168 -0
- package/App/Screens/Configurator/CalculationWidgetScreen.js +84 -0
- package/App/Screens/Configurator/Components/AmountSelection/Styles.scss +17 -0
- package/App/Screens/Configurator/Components/AmountSelection/index.js +170 -0
- package/App/Screens/Configurator/Components/AmountSelection/index.story.js +36 -0
- package/App/Screens/Configurator/Components/CalculationWidget/index.js +652 -0
- package/App/Screens/Configurator/Components/CalculationWidget/index.story.js +154 -0
- package/App/Screens/Configurator/Components/CalculationWidget/index.test.js +142 -0
- package/App/Screens/Configurator/Components/ConfigurationModeSwitch/ConfigurationModeSwitch.js +82 -0
- package/App/Screens/Configurator/Components/ConfigurationModeSwitch/index.js +15 -0
- package/App/Screens/Configurator/Components/Confirm/Styles.scss +0 -0
- package/App/Screens/Configurator/Components/Confirm/index.js +105 -0
- package/App/Screens/Configurator/Components/DesignApproval/index.js +76 -0
- package/App/Screens/Configurator/Components/DesignApproval/index.story.js +27 -0
- package/App/Screens/Configurator/Components/DesignApproval/index.test.js +31 -0
- package/App/Screens/Configurator/Components/Error/index.js +106 -0
- package/App/Screens/Configurator/Components/FallbackVisualization/FallbackVisualization.js +96 -0
- package/App/Screens/Configurator/Components/FileUpload/FileUploadBase.js +1 -0
- package/App/Screens/Configurator/Components/FullScreenView/index.js +304 -0
- package/App/Screens/Configurator/Components/FullScreenView/index.test.js +28 -0
- package/App/Screens/Configurator/Components/ImageLoader/ImageLoader.js +96 -0
- package/App/Screens/Configurator/Components/LandscapeInformation/index.js +75 -0
- package/App/Screens/Configurator/Components/NoVisualization/NoVisualization.js +35 -0
- package/App/Screens/Configurator/Components/PreviewPortal/index.js +249 -0
- package/App/Screens/Configurator/Components/Styles.scss +1 -0
- package/App/Screens/Configurator/Components/Thumbnail/index.js +394 -0
- package/App/Screens/Configurator/Components/Thumbnail/index.test.js +50 -0
- package/App/Screens/Configurator/Components/TotalPrice/TotalPrice.js +57 -0
- package/App/Screens/Configurator/Containers/AmountPrice.js +84 -0
- package/App/Screens/Configurator/Containers/CalculationWidget.js +278 -0
- package/App/Screens/Configurator/Containers/ConfigurationModeSwitch.js +81 -0
- package/App/Screens/Configurator/Containers/Confirm.js +37 -0
- package/App/Screens/Configurator/Containers/DesignApproval.js +129 -0
- package/App/Screens/Configurator/Containers/FallbackVisualization.js +32 -0
- package/App/Screens/Configurator/Containers/FullScreenView.js +47 -0
- package/App/Screens/Configurator/Containers/Thumbnail.js +41 -0
- package/App/Screens/Configurator/Containers/Visualization.js +13 -0
- package/App/Screens/Configurator/DynamicComponents.js +40 -0
- package/App/Screens/Configurator/Screen.js +238 -0
- package/App/Screens/Configurator/ScreenPropTypes.js +45 -0
- package/App/Screens/Configurator/ThemeProvider.js +298 -0
- package/App/Screens/DesignerProductPreview/Constants.js +12 -0
- package/App/Screens/DesignerProductPreview/DesignerProductPreviewManager.js +554 -0
- package/App/Screens/DesignerProductPreview/Screen.js +407 -0
- package/App/Screens.js +42 -0
- package/App/ServiceLocator.js +309 -0
- package/App/Services/AdminareaCommunicationService.js +149 -0
- package/App/Services/AnalyticsService.js +403 -0
- package/App/Services/ConfiguratorService.js +1166 -0
- package/App/Services/DesignDataService.js +3249 -0
- package/App/Services/DesignerService.js +496 -0
- package/App/Services/InteractionService.js +784 -0
- package/App/Services/UIService.js +129 -0
- package/App/Services/VisualizationService.js +844 -0
- package/App/Shared/Components/AcceptDesign/index.js +166 -0
- package/App/Shared/Components/AddToBasket/index.js +194 -0
- package/App/Shared/Components/AddToBasket/index.story.js +47 -0
- package/App/Shared/Components/AlertDialog/index.js +138 -0
- package/App/Shared/Components/AmountInput/Styles.scss +6 -0
- package/App/Shared/Components/AmountInput/index.js +296 -0
- package/App/Shared/Components/AmountInput/index.story.js +29 -0
- package/App/Shared/Components/AmountPrice/index.js +925 -0
- package/App/Shared/Components/AmountPrice/index.story.js +112 -0
- package/App/Shared/Components/AmountPrice/index.test.js +125 -0
- package/App/Shared/Components/Analytics/AnalyticsWrapper.js +49 -0
- package/App/Shared/Components/BulkNames/index.js +319 -0
- package/App/Shared/Components/CallToAction/index.js +220 -0
- package/App/Shared/Components/Header/Header.js +150 -0
- package/App/Shared/Components/Header/index.js +15 -0
- package/App/Shared/Components/Header/index.story.js +143 -0
- package/App/Shared/Components/InformationTag/InformationTag.js +155 -0
- package/App/Shared/Components/LicenseNotice/LicenseNotice.js +148 -0
- package/App/Shared/Components/LicenseNotice/index.js +15 -0
- package/App/Shared/Components/LoadConfiguration/index.js +218 -0
- package/App/Shared/Components/MessageBox/index.js +84 -0
- package/App/Shared/Components/MessageBox/index.story.js +49 -0
- package/App/Shared/Components/Notification/index.js +105 -0
- package/App/Shared/Components/Notification/index.story.js +55 -0
- package/App/Shared/Components/PdfDownload/index.js +150 -0
- package/App/Shared/Components/PlusMinusInput/index.js +118 -0
- package/App/Shared/Components/PriceList/index.js +237 -0
- package/App/Shared/Components/PriceList/index.story.js +114 -0
- package/App/Shared/Components/PriceOverview/index.js +177 -0
- package/App/Shared/Components/PriceOverview/index.story.js +215 -0
- package/App/Shared/Components/ProductVariant/Image.js +75 -0
- package/App/Shared/Components/ProductVariant/Styles.scss +11 -0
- package/App/Shared/Components/ProductVariant/index.js +477 -0
- package/App/Shared/Components/ProductVariant/index.story.js +283 -0
- package/App/Shared/Components/Progress/Progress.js +59 -0
- package/App/Shared/Components/ReceiveOfferForm/index.js +432 -0
- package/App/Shared/Components/ReceiveOfferForm/index.story.js +32 -0
- package/App/Shared/Components/ReceiveOfferForm/index.test.js +36 -0
- package/App/Shared/Components/SaveConfiguration/index.js +286 -0
- package/App/Shared/Components/SendEmail/index.js +103 -0
- package/App/Shared/Components/Stepper/index.js +136 -0
- package/App/Shared/Components/Stepper/index.story.js +38 -0
- package/App/Shared/Components/ToolbarList/index.js +231 -0
- package/App/Shared/Components/ToolbarList/index.story.js +33 -0
- package/App/Shared/Components/VariantChooser/index.js +270 -0
- package/App/Shared/Components/VariantChooser/index.story.js +100 -0
- package/App/Shared/Containers/AlertMessages.js +37 -0
- package/App/Shared/Containers/AmountPrice/AmountPriceAdminareaWrapper.js +40 -0
- package/App/Shared/Containers/AmountPrice/index.js +284 -0
- package/App/Shared/Containers/BulkNames.js +310 -0
- package/App/Shared/Containers/Error.js +37 -0
- package/App/Shared/Containers/GlobalLoader.js +25 -0
- package/App/Shared/Containers/Header/index.js +178 -0
- package/App/Shared/Containers/LicenseNotice/LicenseNotice.js +26 -0
- package/App/Shared/Containers/LicenseNotice/index.js +15 -0
- package/App/Shared/Containers/LoadConfiguration/LoadConfiguration.js +146 -0
- package/App/Shared/Containers/LoadConfiguration/index.js +15 -0
- package/App/Shared/Containers/PdfDownload/index.js +39 -0
- package/App/Shared/Containers/ProductVariant/ProductVariant.js +339 -0
- package/App/Shared/Containers/ProductVariant/index.js +15 -0
- package/App/Shared/Containers/SaveConfiguration.js +49 -0
- package/App/Shared/Containers/SendEmail/SendEmail.js +45 -0
- package/App/Shared/Containers/SendEmail/index.js +15 -0
- package/App/Shared/Providers/DefaultCanvasProvider.js +86 -0
- package/App/Storage.js +17 -0
- package/App/Store.js +87 -0
- package/App/Styles.scss +0 -0
- package/App/Translations.js +88 -0
- package/App/Utils/createMessageInterface.js +65 -0
- package/App/Utils/customClassName.js +12 -0
- package/App/Utils/getContrastText.js +27 -0
- package/App/Utils/getImageUrl.js +32 -0
- package/App/Variables.scss +84 -0
- package/App/configuration.js +421 -0
- package/App/index.js +52 -0
- package/App/initServices.js +67 -0
- package/App/setup.js +22 -0
- package/App/versionInfo.js +8 -0
- package/Framework/Api.js +178 -0
- package/Framework/ComponentContainer.js +165 -0
- package/Framework/Components/Carousel/Styles.scss +85 -0
- package/Framework/Components/Carousel/index.js +322 -0
- package/Framework/Components/Dialog/Style.scss +79 -0
- package/Framework/Components/Dialog/index.js +721 -0
- package/Framework/Components/DialogSelect/Styles.scss +53 -0
- package/Framework/Components/DialogSelect/index.js +331 -0
- package/Framework/Components/Input/index.js +147 -0
- package/Framework/Components/LoadingOverlay/Styles.scss +37 -0
- package/Framework/Components/LoadingOverlay/index.js +33 -0
- package/Framework/Components/Markdown/index.js +62 -0
- package/Framework/Components/Mobile/index.js +33 -0
- package/Framework/CustomError.js +51 -0
- package/Framework/Helpers/TransitionDetect.js +116 -0
- package/Framework/Helpers/isLandscapeMobile.js +14 -0
- package/Framework/Helpers/isMobileDevice.js +17 -0
- package/Framework/Helpers/isMobileSize.js +13 -0
- package/Framework/Mixins.scss +235 -0
- package/Framework/Services/AbstractAdminareaCommunicationService.js +48 -0
- package/Framework/Services/AbstractAsyncService.js +44 -0
- package/Framework/Services/AbstractConfiguratorService.js +47 -0
- package/Framework/Services/AbstractInteractionService.js +50 -0
- package/Framework/Services/AbstractStoreService.js +42 -0
- package/Framework/Services/AbstractUIService.js +53 -0
- package/Framework/Services/AbstractVisualizationService.js +47 -0
- package/Framework/Services/AsyncService.js +93 -0
- package/Framework/Services/StoreService.js +237 -0
- package/Framework/Variables.scss +22 -0
- package/Framework/bindDecorator.js +173 -0
- package/Framework/i18n.js +382 -0
- package/README.md +5 -26
- package/Resources/Icons/MaterialUI/Icons/AddCircle.js +13 -0
- package/Resources/Icons/MaterialUI/Icons/RemoveCircle.js +13 -0
- package/Resources/Icons/MaterialUI/fontFace.scss +37 -0
- package/Resources/Icons/MaterialUI/fonts/MaterialIcons-Regular.eot +0 -0
- package/Resources/Icons/MaterialUI/fonts/MaterialIcons-Regular.svg +2373 -0
- package/Resources/Icons/MaterialUI/fonts/MaterialIcons-Regular.ttf +0 -0
- package/Resources/Icons/MaterialUI/fonts/MaterialIcons-Regular.woff +0 -0
- package/Resources/Icons/MaterialUI/fonts/MaterialIcons-Regular.woff2 +0 -0
- package/Resources/Icons/fonts/ionicons.eot +0 -0
- package/Resources/Icons/fonts/ionicons.svg +2230 -0
- package/Resources/Icons/fonts/ionicons.ttf +0 -0
- package/Resources/Icons/fonts/ionicons.woff +0 -0
- package/Resources/Icons/ionicons.scss +1489 -0
- package/Resources/Icons/ioniconsExtend.scss +1469 -0
- package/Resources/Icons/v4/fontFace.scss +11 -0
- package/Resources/Icons/v4/fonts/ionicons.eot +0 -0
- package/Resources/Icons/v4/fonts/ionicons.svg +2090 -0
- package/Resources/Icons/v4/fonts/ionicons.ttf +0 -0
- package/Resources/Icons/v4/fonts/ionicons.woff +0 -0
- package/Resources/Icons/v4/fonts/ionicons.woff2 +0 -0
- package/Resources/Icons/v4/icons.scss +15 -0
- package/Resources/Icons/v4/iconsExtend.scss +7 -0
- package/Resources/Images/designer_placeholder_logo.svg +1 -0
- package/Resources/Masks/circle.svg +4 -0
- package/Shared/Components/CustomDialog.js +133 -0
- package/Shared/Components/CustomDialogSelect.js +161 -0
- package/Shared/Components/MainButton.js +81 -0
- package/Shared/ErrorTypes/DeferredError.js +51 -0
- package/Shared/HOCs/ResizeDetect/ResizeDetect.dev.js +60 -0
- package/Shared/HOCs/ResizeDetect/ResizeDetect.js +217 -0
- package/Shared/HOCs/getDisplayName.js +10 -0
- package/Shared/HOCs/withFixedChangeHandler.js +46 -0
- package/Shared/PropTypes/ReactComponent.js +13 -0
- package/Shared/Styles/absoluteCenter.js +17 -0
- package/Utils/Array/isIdentical.js +38 -0
- package/Utils/Async/AsyncManager.js +128 -0
- package/Utils/Async/Deferred.js +145 -0
- package/Utils/Async/ObjectLock.js +38 -0
- package/Utils/Decorators/Observable.js +130 -0
- package/Utils/Dev/HOCs/withFilePicker.js +101 -0
- package/Utils/Dev/isDev.js +21 -0
- package/Utils/Events/pointerEvent.js +199 -0
- package/Utils/Events/preventEventDoubling.js +23 -0
- package/Utils/Function/cached.js +64 -0
- package/Utils/Function/createDebounceManager.js +77 -0
- package/Utils/Function/createSelector.js +62 -0
- package/Utils/Function/memoize.js +46 -0
- package/Utils/Function/sendMessage.js +22 -0
- package/Utils/Helper/createSelectionRangeMemo.js +45 -0
- package/Utils/Immutable/set.js +81 -0
- package/Utils/Math/conversions.js +13 -0
- package/Utils/Math/isPositiveNumber.js +12 -0
- package/Utils/Redux/createActionWithGlobalState.js +23 -0
- package/Utils/Styles/combineMediaQueries.js +24 -0
- package/Utils/Styles/createCheckerBoardBackground.js +22 -0
- package/Utils/Test/CallOrderChecker.js +29 -0
- package/Utils/Test/createStoreProvider.js +33 -0
- package/Utils/Test/formDataToJSON.js +20 -0
- package/Utils/Test/mountWithState.js +40 -0
- package/index.js +8 -0
- package/package.json +22 -103
- package/public/translations/de_DE.json +3 -0
- package/public/translations/en_GB.json +3 -0
- package/scripts/cpPublic.js +3 -3
- package/scripts/getDefaultWebpackConfig.js +11 -10
- package/src/App/Error/ProductionErrorPage/Style.scss +1 -1
- package/src/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +116 -0
- package/src/App/Modules/Creator/Components/Incompatibility/index.js +2 -1
- package/src/App/Modules/Creator/Components/Option/index.test.js +1 -1
- package/src/App/Modules/Creator/Components/OptionAmount/index.test.js +1 -1
- package/src/App/Modules/Creator/Components/ProductPart/__snapshots__/index.test.js.snap +33 -10
- package/src/App/Modules/Creator/Components/ProductPart/index.js +5 -1
- package/src/App/Modules/Creator/Components/ProductPart/index.test.js +14 -1
- package/src/App/Modules/Creator/Components/ProductPartsList/index.js +3 -0
- package/src/App/Modules/Creator/Containers/ProductPartsList/index.js +1 -0
- package/src/App/Modules/Designer/Components/AddGalleryImage/index.story.js +1 -1
- package/src/App/Modules/Designer/Components/ColorPalettes/index.test.jsx +1 -1
- package/src/App/Modules/Designer/Components/DesignAreaControlbox/index.js +21 -4
- package/src/App/Modules/Designer/Components/DesignAreaControlbox/index.test.jsx +1 -1
- package/src/App/Modules/Designer/Components/TextControlbox/index.test.jsx +1 -1
- package/src/App/Modules/Designer/Containers/Designer.js +1 -1
- package/src/App/Modules/Designer/DesignerScreen.js +32 -8
- package/src/App/{Screens/Configurator → Modules/Designer}/DesignerUI.js +42 -26
- package/src/App/Modules/Designer/Layouts/DefaultLayout.js +35 -1
- package/src/App/Modules/Designer/MultilayerComponents/DesignerClickAwayListener.js +18 -0
- package/src/App/Modules/Designer/MultilayerComponents/InlineToolboxPortal.js +54 -0
- package/src/App/Modules/Designer/MultilayerComponents/StandardToolboxPortal.js +38 -0
- package/src/App/Reducers/DesignView/Actions.js +1 -2
- package/src/App/Reducers/DesignView/Reducer.js +2 -10
- package/src/App/Reducers/DesignView/__mocks__/designerViewData.js +0 -1
- package/src/App/Reducers/DesignView/__tests__/Reducer.test.js +0 -22
- package/src/App/Reducers/ImageGallery/Actions.js +1 -1
- package/src/App/Screens/Configurator/Components/CalculationWidget/__snapshots__/index.test.jsx.snap +4 -4
- package/src/App/Screens/Configurator/Components/CalculationWidget/index.test.jsx +1 -1
- package/src/App/Screens/Configurator/Components/DesignApproval/index.test.jsx +1 -1
- package/src/App/Screens/Configurator/Components/FullScreenView/__snapshots__/index.test.jsx.snap +1 -1
- package/src/App/Screens/Configurator/Components/FullScreenView/index.js +3 -2
- package/src/App/Screens/Configurator/Components/FullScreenView/index.test.jsx +1 -1
- package/src/App/Screens/Configurator/Components/PreviewPortal/index.js +7 -3
- package/src/App/Screens/Configurator/Containers/AmountPrice.js +1 -1
- package/src/App/Screens/Configurator/Containers/Confirm.js +1 -1
- package/src/App/Screens/Configurator/Containers/FullScreenView.js +1 -0
- package/src/App/Screens/Configurator/Containers/__tests__/Designer.test.js +1 -1
- package/src/App/Screens/Configurator/Screen.js +3 -1
- package/src/App/Screens/DesignerProductPreview/__tests__/__snapshots__/Screen.test.js.snap +1 -1
- package/src/App/Services/ConfiguratorService.js +25 -4
- package/src/App/Services/InteractionService.js +2 -1
- package/src/App/Services/VisualizationService.js +3 -0
- package/src/App/Services/__tests__/DesignDataService.selectViewForComponent.test.js +0 -53
- package/src/App/Shared/Containers/AlertMessages.js +1 -1
- package/src/App/Shared/Containers/AmountPrice/index.test.js +1 -1
- package/src/App/Shared/Containers/Error.js +1 -1
- package/src/App/Shared/Containers/SaveConfiguration.js +1 -1
- package/src/App/Translations.js +1 -1
- package/src/App/Utils/createMessageInterface.js +10 -0
- package/src/App/configuration.js +3 -0
- package/src/Framework/i18n.js +2 -3
- package/babel.config.js +0 -46
- package/public/ConfigurationMessagingDemo.html +0 -55
- package/scripts/cpPath.js +0 -135
- package/scripts/moveLibToPackageRoot.js +0 -40
- package/scripts/rmDir.js +0 -29
- package/scripts/updateLocalPackages.js +0 -68
- package/scripts/utils/process.js +0 -19
- package/tsconfig.json +0 -22
|
@@ -0,0 +1,1417 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setSelectedCalculation = exports.switchSelectedAmount = exports.setComment = exports.deleteSelectedAmounts = exports.setSelectedAmounts = exports.deleteSelectedAmount = exports.clearBulkNames = exports.saveBulkNames = exports.setSelectedAmount = exports.loadDesignerData = exports.receiveDesignerData = exports.loadConfiguration = exports.viewOptionDetails = exports.selectMultipleOptions = exports.selectOption = exports.resolveConflicts = exports.loadInitialOptionclassification = exports.fetchInitialConfiguration = exports.setConflictingSwitchoptionData = exports.setOptionclassificationChecked = exports.setCalculationEnabled = exports.setSelectedVariantIdentifier = exports.setStockInformationOption = exports.setLoadIdentifier = exports.setLoadCode = exports.fetchInspirations = exports.fetchClientData = exports.fetchCodesnippets = exports.fetchConfigurationVariants = exports.validateConfiguration = exports.saveConfiguration = exports.fetchOptionDetails = exports.doCalculation = exports.switchOptions = exports.switchOptionArrays = exports.switchOptionsBasic = exports.fetchOptions = exports.fetchConfigurationByCodeAsync = exports.fetchConfigurationByCode = exports.fetchConfiguration = exports.inspectValidationResults = exports.inspectCheckResults = exports.setCustomTitle = exports.receiveInspirations = exports.receiveClientData = exports.fetchConfigurationForDesignerProductPreview = exports.receiveCodesnippets = exports.receiveConfigurationVariants = exports.receiveValidation = exports.receiveSavedConfiguration = exports.clearOptionDetails = exports.receiveOptionDetails = exports.skipNextAutoResolve = exports.setCalculationAutoResolveEnabled = exports.setCalculationErrorsResolved = exports.invalidateCalculation = exports.receiveCalculation = exports.receiveSwitchoptionsresult = exports.receiveOptions = exports.selectOptionclassification = exports.applyVariantAmountPreSelection = exports.setDefaultSelectedVariantIdentifier = exports.deleteMissingVariants = exports.receiveConfiguration = exports.DELETE_SELECTED_AMOUNTS = exports.SET_SELECTED_AMOUNTS = exports.SET_COMMENT = exports.SET_SELECTED_CALCULATION = exports.DELETE_SELECTED_AMOUNT = exports.CLEAR_BULKNAMES = exports.SAVE_BULKNAMES = exports.SWITCH_SELECTED_AMOUNT = exports.SET_SELECTED_AMOUNT = exports.SET_CONFLICTING_SWITCHOPTION_DATA = exports.SET_OPTIONCLASSIFICATION_CHECKED = exports.SET_CALCULATION_AUTO_RESOLVE_ENABLED = exports.SET_CALCULATION_ERRORS_RESOLVED = exports.SET_CALCULATION_ENABLED = exports.SET_SELECTED_VARIANT_IDENTIFIER = exports.SET_STOCK_INFORMATION_OPTION = exports.SET_LOAD_IDENTIFIER = exports.SET_LOAD_CODE = exports.SET_CUSTOM_TITLE = exports.RECEIVE_INSPIRATIONS = exports.RECEIVE_CLIENT_DATA = exports.RECEIVE_CODESNIPPETS = exports.RECEIVE_CONFIGURATIONVARIANTS = exports.RECEIVE_VALIDATION = exports.RECEIVE_SAVEDCONFIGURATION = exports.RECEIVE_OPTIONDETAILS = exports.INVALIDATE_CALCULATION = exports.RECEIVE_CALCULATION = exports.RECEIVE_SWITCHOPTIONSRESULT = exports.RECEIVE_OPTIONS = exports.SELECT_OPTIONCLASSIFICATION = exports.RECEIVE_DESIGNER_DATA = exports.RECEIVE_CONFIGURATION = void 0;
|
|
7
|
+
|
|
8
|
+
var apiActions = _interopRequireWildcard(require("../Actions"));
|
|
9
|
+
|
|
10
|
+
var _lodash = require("lodash");
|
|
11
|
+
|
|
12
|
+
var _uniq = _interopRequireDefault(require("lodash/uniq"));
|
|
13
|
+
|
|
14
|
+
var _i18n = require("../../../Framework/i18n");
|
|
15
|
+
|
|
16
|
+
var _Api = _interopRequireDefault(require("../../../Framework/Api"));
|
|
17
|
+
|
|
18
|
+
var _createActionWithGlobalState = require("../../../Utils/Redux/createActionWithGlobalState");
|
|
19
|
+
|
|
20
|
+
var _configuration = require("../../configuration");
|
|
21
|
+
|
|
22
|
+
var _ServiceLocator = require("../../ServiceLocator");
|
|
23
|
+
|
|
24
|
+
var _Actions2 = require("../UI/Actions");
|
|
25
|
+
|
|
26
|
+
var _Actions3 = require("../../Reducers/Fonts/Actions");
|
|
27
|
+
|
|
28
|
+
var _Actions4 = require("../../Reducers/ImageGallery/Actions");
|
|
29
|
+
|
|
30
|
+
var _Selectors = require("./Selectors");
|
|
31
|
+
|
|
32
|
+
var _Selectors2 = require("../ConfigurationMode/Selectors");
|
|
33
|
+
|
|
34
|
+
var _Constant = require("../../Constant");
|
|
35
|
+
|
|
36
|
+
var _Selectors3 = require("../Fonts/Selectors");
|
|
37
|
+
|
|
38
|
+
var _Actions5 = require("../Fonts/Actions");
|
|
39
|
+
|
|
40
|
+
var _Modifiers = require("./Modifiers");
|
|
41
|
+
|
|
42
|
+
var _Actions6 = require("../DesignData/Actions");
|
|
43
|
+
|
|
44
|
+
var _Transformers = require("../DesignArea/Transformers");
|
|
45
|
+
|
|
46
|
+
var _Reducer = require("../DesignData/Reducer");
|
|
47
|
+
|
|
48
|
+
var _Actions7 = require("../ConfigurationMode/Actions");
|
|
49
|
+
|
|
50
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
51
|
+
|
|
52
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
53
|
+
|
|
54
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
55
|
+
|
|
56
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
57
|
+
|
|
58
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
59
|
+
|
|
60
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
61
|
+
|
|
62
|
+
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; }
|
|
63
|
+
|
|
64
|
+
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
|
|
65
|
+
|
|
66
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
67
|
+
|
|
68
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
69
|
+
|
|
70
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
71
|
+
|
|
72
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
73
|
+
|
|
74
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
75
|
+
|
|
76
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
77
|
+
|
|
78
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
79
|
+
|
|
80
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
81
|
+
|
|
82
|
+
var RECEIVE_CONFIGURATION = 'RECEIVE_CONFIGURATION';
|
|
83
|
+
exports.RECEIVE_CONFIGURATION = RECEIVE_CONFIGURATION;
|
|
84
|
+
var RECEIVE_DESIGNER_DATA = 'RECEIVE_DESIGNER_DATA';
|
|
85
|
+
exports.RECEIVE_DESIGNER_DATA = RECEIVE_DESIGNER_DATA;
|
|
86
|
+
var SELECT_OPTIONCLASSIFICATION = 'SELECT_OPTIONCLASSIFICATION';
|
|
87
|
+
exports.SELECT_OPTIONCLASSIFICATION = SELECT_OPTIONCLASSIFICATION;
|
|
88
|
+
var RECEIVE_OPTIONS = 'RECEIVE_OPTIONS';
|
|
89
|
+
exports.RECEIVE_OPTIONS = RECEIVE_OPTIONS;
|
|
90
|
+
var RECEIVE_SWITCHOPTIONSRESULT = 'RECEIVE_SWITCHOPTIONSRESULT';
|
|
91
|
+
exports.RECEIVE_SWITCHOPTIONSRESULT = RECEIVE_SWITCHOPTIONSRESULT;
|
|
92
|
+
var RECEIVE_CALCULATION = 'RECEIVE_CALCULATION';
|
|
93
|
+
exports.RECEIVE_CALCULATION = RECEIVE_CALCULATION;
|
|
94
|
+
var INVALIDATE_CALCULATION = 'INVALIDATE_CALCULATION';
|
|
95
|
+
exports.INVALIDATE_CALCULATION = INVALIDATE_CALCULATION;
|
|
96
|
+
var RECEIVE_OPTIONDETAILS = 'RECEIVE_OPTIONDETAILS';
|
|
97
|
+
exports.RECEIVE_OPTIONDETAILS = RECEIVE_OPTIONDETAILS;
|
|
98
|
+
var RECEIVE_SAVEDCONFIGURATION = 'RECEIVE_SAVEDCONFIGURATION';
|
|
99
|
+
exports.RECEIVE_SAVEDCONFIGURATION = RECEIVE_SAVEDCONFIGURATION;
|
|
100
|
+
var RECEIVE_VALIDATION = 'RECEIVE_VALIDATION';
|
|
101
|
+
exports.RECEIVE_VALIDATION = RECEIVE_VALIDATION;
|
|
102
|
+
var RECEIVE_CONFIGURATIONVARIANTS = 'RECEIVE_CONFIGURATIONVARIANTS';
|
|
103
|
+
exports.RECEIVE_CONFIGURATIONVARIANTS = RECEIVE_CONFIGURATIONVARIANTS;
|
|
104
|
+
var RECEIVE_CODESNIPPETS = 'RECEIVE_CODESNIPPETS';
|
|
105
|
+
exports.RECEIVE_CODESNIPPETS = RECEIVE_CODESNIPPETS;
|
|
106
|
+
var RECEIVE_CLIENT_DATA = 'RECEIVE_CLIENT_DATA';
|
|
107
|
+
exports.RECEIVE_CLIENT_DATA = RECEIVE_CLIENT_DATA;
|
|
108
|
+
var RECEIVE_INSPIRATIONS = 'RECEIVE_INSPIRATIONS';
|
|
109
|
+
exports.RECEIVE_INSPIRATIONS = RECEIVE_INSPIRATIONS;
|
|
110
|
+
var SET_CUSTOM_TITLE = 'SET_CUSTOM_TITLE';
|
|
111
|
+
exports.SET_CUSTOM_TITLE = SET_CUSTOM_TITLE;
|
|
112
|
+
var SET_LOAD_CODE = 'SET_LOAD_CODE';
|
|
113
|
+
exports.SET_LOAD_CODE = SET_LOAD_CODE;
|
|
114
|
+
var SET_LOAD_IDENTIFIER = 'SET_LOAD_IDENTIFIER';
|
|
115
|
+
exports.SET_LOAD_IDENTIFIER = SET_LOAD_IDENTIFIER;
|
|
116
|
+
var SET_STOCK_INFORMATION_OPTION = 'SET_STOCK_INFORMATION_OPTION';
|
|
117
|
+
exports.SET_STOCK_INFORMATION_OPTION = SET_STOCK_INFORMATION_OPTION;
|
|
118
|
+
var SET_SELECTED_VARIANT_IDENTIFIER = 'SET_SELECTED_VARIANT_IDENTIFIER';
|
|
119
|
+
exports.SET_SELECTED_VARIANT_IDENTIFIER = SET_SELECTED_VARIANT_IDENTIFIER;
|
|
120
|
+
var SET_CALCULATION_ENABLED = 'SET_CALCULATION_ENABLED';
|
|
121
|
+
exports.SET_CALCULATION_ENABLED = SET_CALCULATION_ENABLED;
|
|
122
|
+
var SET_CALCULATION_ERRORS_RESOLVED = 'SET_CALCULATION_ERRORS_RESOLVED';
|
|
123
|
+
exports.SET_CALCULATION_ERRORS_RESOLVED = SET_CALCULATION_ERRORS_RESOLVED;
|
|
124
|
+
var SET_CALCULATION_AUTO_RESOLVE_ENABLED = 'SET_CALCULATION_AUTO_RESOLVE_ENABLED';
|
|
125
|
+
exports.SET_CALCULATION_AUTO_RESOLVE_ENABLED = SET_CALCULATION_AUTO_RESOLVE_ENABLED;
|
|
126
|
+
var SET_OPTIONCLASSIFICATION_CHECKED = 'SET_OPTIONCLASSIFICATION_CHECKED';
|
|
127
|
+
exports.SET_OPTIONCLASSIFICATION_CHECKED = SET_OPTIONCLASSIFICATION_CHECKED;
|
|
128
|
+
var SET_CONFLICTING_SWITCHOPTION_DATA = 'SET_CONFLICTING_SWITCHOPTION_DATA';
|
|
129
|
+
exports.SET_CONFLICTING_SWITCHOPTION_DATA = SET_CONFLICTING_SWITCHOPTION_DATA;
|
|
130
|
+
var SET_SELECTED_AMOUNT = 'SET_SELECTED_AMOUNT';
|
|
131
|
+
exports.SET_SELECTED_AMOUNT = SET_SELECTED_AMOUNT;
|
|
132
|
+
var SWITCH_SELECTED_AMOUNT = 'SWITCH_SELECTED_AMOUNT';
|
|
133
|
+
exports.SWITCH_SELECTED_AMOUNT = SWITCH_SELECTED_AMOUNT;
|
|
134
|
+
var SAVE_BULKNAMES = 'SAVE_BULKNAMES';
|
|
135
|
+
exports.SAVE_BULKNAMES = SAVE_BULKNAMES;
|
|
136
|
+
var CLEAR_BULKNAMES = 'CLEAR_BULKNAMES';
|
|
137
|
+
exports.CLEAR_BULKNAMES = CLEAR_BULKNAMES;
|
|
138
|
+
var DELETE_SELECTED_AMOUNT = 'DELETE_SELECTED_AMOUNT';
|
|
139
|
+
exports.DELETE_SELECTED_AMOUNT = DELETE_SELECTED_AMOUNT;
|
|
140
|
+
var SET_SELECTED_CALCULATION = 'SET_SELECTED_CALCULATION';
|
|
141
|
+
exports.SET_SELECTED_CALCULATION = SET_SELECTED_CALCULATION;
|
|
142
|
+
var SET_COMMENT = 'SET_COMMENT';
|
|
143
|
+
exports.SET_COMMENT = SET_COMMENT;
|
|
144
|
+
var SET_SELECTED_AMOUNTS = 'SET_SELECTED_AMOUNTS';
|
|
145
|
+
exports.SET_SELECTED_AMOUNTS = SET_SELECTED_AMOUNTS;
|
|
146
|
+
var DELETE_SELECTED_AMOUNTS = 'DELETE_SELECTED_AMOUNTS';
|
|
147
|
+
exports.DELETE_SELECTED_AMOUNTS = DELETE_SELECTED_AMOUNTS;
|
|
148
|
+
|
|
149
|
+
var receiveConfiguration = function receiveConfiguration(json, _ref) {
|
|
150
|
+
var checkValidation = _ref.checkValidation;
|
|
151
|
+
return /*#__PURE__*/function () {
|
|
152
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch, getState) {
|
|
153
|
+
var prevState, selectOptions, action, _getState, configurator, configuration, selectedoptionclassification, loadIdentifier, _getAvailableConfigur, designerEnabled, initialDesignData;
|
|
154
|
+
|
|
155
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
156
|
+
while (1) {
|
|
157
|
+
switch (_context.prev = _context.next) {
|
|
158
|
+
case 0:
|
|
159
|
+
prevState = getState();
|
|
160
|
+
selectOptions = (0, _configuration.getConf)('selectOptions');
|
|
161
|
+
dispatch(setCalculationEnabled(false));
|
|
162
|
+
|
|
163
|
+
if (checkValidation) {
|
|
164
|
+
dispatch(inspectValidationResults(json));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
action = dispatch({
|
|
168
|
+
type: RECEIVE_CONFIGURATION,
|
|
169
|
+
data: (0, _Modifiers.patchViewImages)(json),
|
|
170
|
+
receivedAt: Date.now()
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
if (selectOptions) {
|
|
174
|
+
dispatch(selectMultipleOptions(selectOptions));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
dispatch(inspectCheckResults());
|
|
178
|
+
_getState = getState(), configurator = _getState.configurator;
|
|
179
|
+
configuration = configurator.configuration, selectedoptionclassification = configurator.selectedoptionclassification, loadIdentifier = configurator.loadIdentifier;
|
|
180
|
+
_getAvailableConfigur = (0, _Selectors2.getAvailableConfigurationModes)(getState()), designerEnabled = _getAvailableConfigur.designer;
|
|
181
|
+
|
|
182
|
+
if (configurator.loadCode) {
|
|
183
|
+
dispatch((0, _Actions4.addImagesFromDesignArea)(configurator));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
dispatch(deleteMissingVariants(configurator)); // load first optionclassification if not selected yet
|
|
187
|
+
|
|
188
|
+
if (!selectedoptionclassification.identifier && (0, _configuration.getConf)('showInitialOptionclassification')) {
|
|
189
|
+
dispatch(loadInitialOptionclassification(configuration));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if ((0, _configuration.getConf)('loadInspirations')) {
|
|
193
|
+
dispatch(fetchInspirations(configuration.item.identifier));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
dispatch((0, _Actions2.setVisible)('configurationvariantSelection', false));
|
|
197
|
+
|
|
198
|
+
if (prevState.configurator.configuration.item.identifier && prevState.configurator.configuration.item.identifier !== configuration.item.identifier) {
|
|
199
|
+
dispatch(fetchConfigurationVariants(configuration.item.identifier));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
applyVariantAmountPreSelection(configurator);
|
|
203
|
+
setDefaultSelectedVariantIdentifier((0, _Selectors.getConfigurator)(getState()), loadIdentifier);
|
|
204
|
+
|
|
205
|
+
if (!designerEnabled) {
|
|
206
|
+
_context.next = 26;
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
_context.next = 21;
|
|
211
|
+
return dispatch((0, _Actions3.fetchFonts)());
|
|
212
|
+
|
|
213
|
+
case 21:
|
|
214
|
+
dispatch((0, _Actions5.addCustomFonts)((0, _Selectors3.getUsedCustomFontsInEditor)(getState())));
|
|
215
|
+
_context.next = 24;
|
|
216
|
+
return dispatch(loadDesignerData((0, _Selectors.getConfiguration)((0, _Selectors.getConfigurator)(getState()))));
|
|
217
|
+
|
|
218
|
+
case 24:
|
|
219
|
+
initialDesignData = (0, _Transformers.createInitialDesignDataFromDesignAreas)((0, _lodash.get)(getState(), 'designArea.filteredDesignAreas') || [], (0, _Reducer.getDesignData)((0, _Selectors.getConfigurator)(getState())));
|
|
220
|
+
dispatch((0, _Actions6.setInitialDesignData)(initialDesignData));
|
|
221
|
+
|
|
222
|
+
case 26:
|
|
223
|
+
// enable calculation and trigger it
|
|
224
|
+
dispatch(setCalculationEnabled(true));
|
|
225
|
+
dispatch(invalidateCalculation());
|
|
226
|
+
dispatch(doCalculation((0, _Selectors.getConfiguration)((0, _Selectors.getConfigurator)(getState()))));
|
|
227
|
+
return _context.abrupt("return", action);
|
|
228
|
+
|
|
229
|
+
case 30:
|
|
230
|
+
case "end":
|
|
231
|
+
return _context.stop();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}, _callee);
|
|
235
|
+
}));
|
|
236
|
+
|
|
237
|
+
return function (_x, _x2) {
|
|
238
|
+
return _ref2.apply(this, arguments);
|
|
239
|
+
};
|
|
240
|
+
}();
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
exports.receiveConfiguration = receiveConfiguration;
|
|
244
|
+
|
|
245
|
+
var deleteMissingVariants = function deleteMissingVariants(configurator) {
|
|
246
|
+
return /*#__PURE__*/function () {
|
|
247
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(dispatch) {
|
|
248
|
+
var children, selectedAmounts, item, result, itemGroupChildren, _iterator, _step, itemGroup, flattenendSubChildren, selectedVariant;
|
|
249
|
+
|
|
250
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
251
|
+
while (1) {
|
|
252
|
+
switch (_context2.prev = _context2.next) {
|
|
253
|
+
case 0:
|
|
254
|
+
children = (0, _Selectors.getChildren)(configurator).map(function (variant) {
|
|
255
|
+
return variant.identifier;
|
|
256
|
+
});
|
|
257
|
+
selectedAmounts = (0, _Selectors.getSelectedAmounts)(configurator);
|
|
258
|
+
item = (0, _lodash.get)(configurator, 'configuration.item');
|
|
259
|
+
result = [];
|
|
260
|
+
itemGroupChildren = (0, _lodash.get)(item, 'itemGroup.children', []);
|
|
261
|
+
|
|
262
|
+
if (itemGroupChildren.length > 0) {
|
|
263
|
+
_iterator = _createForOfIteratorHelper(item.itemGroup.children);
|
|
264
|
+
|
|
265
|
+
try {
|
|
266
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
267
|
+
itemGroup = _step.value;
|
|
268
|
+
result.push(Object.values((0, _Selectors.getDeepestChildIdentifiers)(itemGroup)));
|
|
269
|
+
}
|
|
270
|
+
} catch (err) {
|
|
271
|
+
_iterator.e(err);
|
|
272
|
+
} finally {
|
|
273
|
+
_iterator.f();
|
|
274
|
+
}
|
|
275
|
+
} else {
|
|
276
|
+
result.push(item.identifier);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
flattenendSubChildren = (0, _lodash.flatten)(result);
|
|
280
|
+
_context2.t0 = regeneratorRuntime.keys(selectedAmounts);
|
|
281
|
+
|
|
282
|
+
case 8:
|
|
283
|
+
if ((_context2.t1 = _context2.t0()).done) {
|
|
284
|
+
_context2.next = 15;
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
selectedVariant = _context2.t1.value;
|
|
289
|
+
|
|
290
|
+
if (selectedAmounts.hasOwnProperty(selectedVariant)) {
|
|
291
|
+
_context2.next = 12;
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
return _context2.abrupt("continue", 8);
|
|
296
|
+
|
|
297
|
+
case 12:
|
|
298
|
+
if (children.length !== 0 && children.indexOf(selectedVariant) === -1 && flattenendSubChildren.indexOf(selectedVariant) === -1) {
|
|
299
|
+
dispatch(deleteSelectedAmount(selectedVariant));
|
|
300
|
+
dispatch((0, _Actions2.reportError)((0, _i18n.t)('missingVariantError', {
|
|
301
|
+
selectedVariant: selectedVariant
|
|
302
|
+
})));
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
_context2.next = 8;
|
|
306
|
+
break;
|
|
307
|
+
|
|
308
|
+
case 15:
|
|
309
|
+
case "end":
|
|
310
|
+
return _context2.stop();
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}, _callee2);
|
|
314
|
+
}));
|
|
315
|
+
|
|
316
|
+
return function (_x3) {
|
|
317
|
+
return _ref3.apply(this, arguments);
|
|
318
|
+
};
|
|
319
|
+
}();
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
exports.deleteMissingVariants = deleteMissingVariants;
|
|
323
|
+
|
|
324
|
+
var setDefaultSelectedVariantIdentifier = function setDefaultSelectedVariantIdentifier(configurator, loadIdentifier) {
|
|
325
|
+
var variantChildren = (0, _Selectors.getChildren)(configurator).map(function (variant) {
|
|
326
|
+
return variant.itemGroup ? variant.itemGroup.children : variant;
|
|
327
|
+
});
|
|
328
|
+
var children = (0, _uniq["default"])((0, _lodash.flatten)(variantChildren).map(function (child) {
|
|
329
|
+
return child.identifier;
|
|
330
|
+
}));
|
|
331
|
+
var firstSelectedAmountEntry = (0, _lodash.first)(Object.keys((0, _Selectors.getSelectedAmounts)(configurator)));
|
|
332
|
+
var item = (0, _Selectors.getItem)(configurator);
|
|
333
|
+
var selectedVariant = children.length ? children[0] : null;
|
|
334
|
+
|
|
335
|
+
if (children.indexOf(loadIdentifier) !== -1) {
|
|
336
|
+
selectedVariant = loadIdentifier;
|
|
337
|
+
} else if (firstSelectedAmountEntry) {
|
|
338
|
+
selectedVariant = firstSelectedAmountEntry;
|
|
339
|
+
} else {
|
|
340
|
+
selectedVariant = item.identifier;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
_ServiceLocator.Services.configurator.setSelectedVariantIdentifier(selectedVariant);
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
exports.setDefaultSelectedVariantIdentifier = setDefaultSelectedVariantIdentifier;
|
|
347
|
+
|
|
348
|
+
var applyVariantAmountPreSelection = function applyVariantAmountPreSelection(configurator) {
|
|
349
|
+
var designerPreSelection = (0, _configuration.getConf)('designerPreSelection', {});
|
|
350
|
+
var itemAmounts = designerPreSelection.itemAmounts;
|
|
351
|
+
|
|
352
|
+
if (itemAmounts) {
|
|
353
|
+
var children = (0, _Selectors.getChildren)(configurator).map(function (variant) {
|
|
354
|
+
return variant.identifier;
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
for (var preSelectionVariant in itemAmounts) {
|
|
358
|
+
if (!itemAmounts.hasOwnProperty(preSelectionVariant)) {
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
var amount = +itemAmounts[preSelectionVariant];
|
|
363
|
+
|
|
364
|
+
if (children.indexOf(preSelectionVariant) !== -1 && amount > 0) {
|
|
365
|
+
_ServiceLocator.Services.configurator.setSelectedAmount(preSelectionVariant, amount);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
exports.applyVariantAmountPreSelection = applyVariantAmountPreSelection;
|
|
372
|
+
|
|
373
|
+
var selectOptionclassification = function selectOptionclassification(optionclassification) {
|
|
374
|
+
var triggerFetchOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
375
|
+
var showOptionlist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
376
|
+
return function (dispatch, getState) {
|
|
377
|
+
if (getState().ui.visibilityMap.startHere) {
|
|
378
|
+
dispatch((0, _Actions2.setVisible)('startHere', false));
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
var action = dispatch({
|
|
382
|
+
type: SELECT_OPTIONCLASSIFICATION,
|
|
383
|
+
optionclassification: optionclassification
|
|
384
|
+
});
|
|
385
|
+
var configuration = getState().configurator.configuration;
|
|
386
|
+
|
|
387
|
+
if (triggerFetchOptions) {
|
|
388
|
+
_ServiceLocator.Services.analytics.triggerEvent(_Constant.EventTypes['select_component'], optionclassification.identifier);
|
|
389
|
+
|
|
390
|
+
_ServiceLocator.Services.configurator.loadOptions(configuration.item.identifier, optionclassification.identifier, configuration);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
dispatch((0, _Actions2.setVisible)('optionlist', showOptionlist));
|
|
394
|
+
return action;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
exports.selectOptionclassification = selectOptionclassification;
|
|
399
|
+
|
|
400
|
+
var receiveOptions = function receiveOptions(json, extraData) {
|
|
401
|
+
return function (dispatch, getState) {
|
|
402
|
+
// it should wait until the options are loaded for the optionclassification...
|
|
403
|
+
var optionclassification = extraData.optionclassification; // make sure the received option list belongs to the selected optionclassification,
|
|
404
|
+
// it might have changed since the request was sent
|
|
405
|
+
|
|
406
|
+
if (optionclassification === getState().configurator.selectedoptionclassification.identifier) {
|
|
407
|
+
if ((0, _configuration.getConf)('checkOptionclassificationOnSelect')) {
|
|
408
|
+
dispatch(setOptionclassificationChecked(optionclassification));
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return dispatch({
|
|
412
|
+
type: RECEIVE_OPTIONS,
|
|
413
|
+
data: json,
|
|
414
|
+
receivedAt: Date.now()
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
exports.receiveOptions = receiveOptions;
|
|
421
|
+
|
|
422
|
+
var receiveSwitchoptionsresult = function receiveSwitchoptionsresult(json, extraData) {
|
|
423
|
+
return function (dispatch, getState) {
|
|
424
|
+
var switchOptionData = extraData.switchOptionData,
|
|
425
|
+
noCheck = extraData.noCheck,
|
|
426
|
+
setChecked = extraData.setChecked,
|
|
427
|
+
refreshOptions = extraData.refreshOptions;
|
|
428
|
+
var action = dispatch({
|
|
429
|
+
type: RECEIVE_SWITCHOPTIONSRESULT,
|
|
430
|
+
data: (0, _Modifiers.patchViewImages)(json),
|
|
431
|
+
receivedAt: Date.now()
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
var _getState2 = getState(),
|
|
435
|
+
configurator = _getState2.configurator;
|
|
436
|
+
|
|
437
|
+
var configuration = configurator.configuration,
|
|
438
|
+
selectedoptionclassification = configurator.selectedoptionclassification; // if it was sent with noCheck param, there is nothing to do with the check results..
|
|
439
|
+
// it should be a temporary configuration state
|
|
440
|
+
|
|
441
|
+
if (noCheck) {
|
|
442
|
+
return action;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
var checkResultOk = dispatch(inspectCheckResults());
|
|
446
|
+
|
|
447
|
+
if (checkResultOk) {
|
|
448
|
+
if (setChecked) {
|
|
449
|
+
dispatch(setOptionclassificationChecked((0, _lodash.first)(Object.keys(switchOptionData))));
|
|
450
|
+
} // do it only when there is a selected option classification
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
if (refreshOptions && selectedoptionclassification) {
|
|
454
|
+
_ServiceLocator.Services.configurator.loadOptions(configuration.item.identifier, selectedoptionclassification.identifier, configuration);
|
|
455
|
+
}
|
|
456
|
+
} else {
|
|
457
|
+
dispatch(setConflictingSwitchoptionData(switchOptionData));
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
return action;
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
exports.receiveSwitchoptionsresult = receiveSwitchoptionsresult;
|
|
465
|
+
|
|
466
|
+
var receiveCalculation = function receiveCalculation(json) {
|
|
467
|
+
return {
|
|
468
|
+
type: RECEIVE_CALCULATION,
|
|
469
|
+
data: json,
|
|
470
|
+
receivedAt: Date.now()
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
exports.receiveCalculation = receiveCalculation;
|
|
475
|
+
|
|
476
|
+
var invalidateCalculation = function invalidateCalculation() {
|
|
477
|
+
return {
|
|
478
|
+
type: INVALIDATE_CALCULATION
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
exports.invalidateCalculation = invalidateCalculation;
|
|
483
|
+
|
|
484
|
+
var setCalculationErrorsResolved = function setCalculationErrorsResolved() {
|
|
485
|
+
return {
|
|
486
|
+
type: SET_CALCULATION_ERRORS_RESOLVED
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
exports.setCalculationErrorsResolved = setCalculationErrorsResolved;
|
|
491
|
+
|
|
492
|
+
var setCalculationAutoResolveEnabled = function setCalculationAutoResolveEnabled(enabled) {
|
|
493
|
+
return {
|
|
494
|
+
type: SET_CALCULATION_AUTO_RESOLVE_ENABLED,
|
|
495
|
+
enabled: enabled
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
exports.setCalculationAutoResolveEnabled = setCalculationAutoResolveEnabled;
|
|
500
|
+
|
|
501
|
+
var skipNextAutoResolve = function skipNextAutoResolve() {
|
|
502
|
+
return setCalculationAutoResolveEnabled('skipNext');
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
exports.skipNextAutoResolve = skipNextAutoResolve;
|
|
506
|
+
|
|
507
|
+
var receiveOptionDetails = function receiveOptionDetails(json) {
|
|
508
|
+
return function (dispatch) {
|
|
509
|
+
dispatch((0, _Actions2.setVisible)('optionDetails', true));
|
|
510
|
+
return dispatch({
|
|
511
|
+
type: RECEIVE_OPTIONDETAILS,
|
|
512
|
+
data: json,
|
|
513
|
+
receivedAt: Date.now()
|
|
514
|
+
});
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
exports.receiveOptionDetails = receiveOptionDetails;
|
|
519
|
+
|
|
520
|
+
var clearOptionDetails = function clearOptionDetails() {
|
|
521
|
+
return {
|
|
522
|
+
type: RECEIVE_OPTIONDETAILS,
|
|
523
|
+
data: {},
|
|
524
|
+
receivedAt: Date.now()
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
exports.clearOptionDetails = clearOptionDetails;
|
|
529
|
+
|
|
530
|
+
var receiveSavedConfiguration = function receiveSavedConfiguration(json) {
|
|
531
|
+
return {
|
|
532
|
+
type: RECEIVE_SAVEDCONFIGURATION,
|
|
533
|
+
data: (0, _Modifiers.patchViewImages)(json),
|
|
534
|
+
receivedAt: Date.now()
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
exports.receiveSavedConfiguration = receiveSavedConfiguration;
|
|
539
|
+
|
|
540
|
+
var receiveValidation = function receiveValidation(json) {
|
|
541
|
+
return function (dispatch, getState) {
|
|
542
|
+
var action = dispatch({
|
|
543
|
+
type: RECEIVE_VALIDATION,
|
|
544
|
+
data: json,
|
|
545
|
+
receivedAt: Date.now()
|
|
546
|
+
});
|
|
547
|
+
var validationResult = getState().configurator.validation;
|
|
548
|
+
|
|
549
|
+
if ((0, _lodash.isObject)(validationResult) && validationResult.success === false) {
|
|
550
|
+
dispatch((0, _Actions2.setVisible)('validationResult', true));
|
|
551
|
+
throw 'Invalid configuration!';
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
return action;
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
exports.receiveValidation = receiveValidation;
|
|
559
|
+
|
|
560
|
+
var receiveConfigurationVariants = function receiveConfigurationVariants(json) {
|
|
561
|
+
return {
|
|
562
|
+
type: RECEIVE_CONFIGURATIONVARIANTS,
|
|
563
|
+
data: json,
|
|
564
|
+
receivedAt: Date.now()
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
exports.receiveConfigurationVariants = receiveConfigurationVariants;
|
|
569
|
+
|
|
570
|
+
var receiveCodesnippets = function receiveCodesnippets(json) {
|
|
571
|
+
return {
|
|
572
|
+
type: RECEIVE_CODESNIPPETS,
|
|
573
|
+
data: json,
|
|
574
|
+
receivedAt: Date.now()
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
exports.receiveCodesnippets = receiveCodesnippets;
|
|
579
|
+
|
|
580
|
+
var fetchConfigurationForDesignerProductPreview = function fetchConfigurationForDesignerProductPreview() {
|
|
581
|
+
return /*#__PURE__*/function () {
|
|
582
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(dispatch, getState) {
|
|
583
|
+
var itemIdentifier, _getAvailableConfigur2, designerEnabled, initialDesignData;
|
|
584
|
+
|
|
585
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
586
|
+
while (1) {
|
|
587
|
+
switch (_context3.prev = _context3.next) {
|
|
588
|
+
case 0:
|
|
589
|
+
itemIdentifier = getState().configurator.loadIdentifier;
|
|
590
|
+
dispatch(setCalculationEnabled(false));
|
|
591
|
+
_context3.next = 4;
|
|
592
|
+
return dispatch(apiActions.fetchData('configuration/loadbyitemidentifier/' + itemIdentifier, function (json) {
|
|
593
|
+
return {
|
|
594
|
+
type: RECEIVE_CONFIGURATION,
|
|
595
|
+
data: (0, _Modifiers.patchViewImages)(json),
|
|
596
|
+
receivedAt: Date.now()
|
|
597
|
+
};
|
|
598
|
+
}));
|
|
599
|
+
|
|
600
|
+
case 4:
|
|
601
|
+
setDefaultSelectedVariantIdentifier((0, _Selectors.getConfigurator)(getState()), itemIdentifier);
|
|
602
|
+
_getAvailableConfigur2 = (0, _Selectors2.getAvailableConfigurationModes)(getState()), designerEnabled = _getAvailableConfigur2.designer;
|
|
603
|
+
|
|
604
|
+
if (!designerEnabled) {
|
|
605
|
+
_context3.next = 12;
|
|
606
|
+
break;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
dispatch((0, _Actions7.selectConfigurationMode)('designer'));
|
|
610
|
+
_context3.next = 10;
|
|
611
|
+
return dispatch(loadDesignerData((0, _Selectors.getConfiguration)((0, _Selectors.getConfigurator)(getState()))));
|
|
612
|
+
|
|
613
|
+
case 10:
|
|
614
|
+
initialDesignData = (0, _Transformers.createInitialDesignDataFromDesignAreas)((0, _lodash.get)(getState(), 'designArea.filteredDesignAreas') || [], (0, _Reducer.getDesignData)((0, _Selectors.getConfigurator)(getState())));
|
|
615
|
+
dispatch((0, _Actions6.setInitialDesignData)(initialDesignData));
|
|
616
|
+
|
|
617
|
+
case 12:
|
|
618
|
+
case "end":
|
|
619
|
+
return _context3.stop();
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}, _callee3);
|
|
623
|
+
}));
|
|
624
|
+
|
|
625
|
+
return function (_x4, _x5) {
|
|
626
|
+
return _ref4.apply(this, arguments);
|
|
627
|
+
};
|
|
628
|
+
}();
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
exports.fetchConfigurationForDesignerProductPreview = fetchConfigurationForDesignerProductPreview;
|
|
632
|
+
|
|
633
|
+
var receiveClientData = function receiveClientData(json) {
|
|
634
|
+
return function (dispatch, getState) {
|
|
635
|
+
dispatch({
|
|
636
|
+
type: RECEIVE_CLIENT_DATA,
|
|
637
|
+
data: json,
|
|
638
|
+
receivedAt: Date.now()
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
if (json.success === false) {
|
|
642
|
+
return dispatch((0, _Actions2.reportError)((0, _i18n.t)('clientValidationError')));
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
var client = (0, _Selectors.getClient)(getState().configurator);
|
|
646
|
+
|
|
647
|
+
_Api["default"].setChannel(client.channel);
|
|
648
|
+
|
|
649
|
+
var requests = [];
|
|
650
|
+
|
|
651
|
+
if ((0, _Selectors.isDesignerProductPreviewMode)()) {// initial configuration is not needed
|
|
652
|
+
} else {
|
|
653
|
+
requests.push(_ServiceLocator.Services.configurator.loadInitialConfiguration());
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
requests.push(_ServiceLocator.Services.configurator.loadCodeSnippets());
|
|
657
|
+
return Promise.all(requests);
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
exports.receiveClientData = receiveClientData;
|
|
662
|
+
|
|
663
|
+
var receiveInspirations = function receiveInspirations(json) {
|
|
664
|
+
return {
|
|
665
|
+
type: RECEIVE_INSPIRATIONS,
|
|
666
|
+
data: json
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
exports.receiveInspirations = receiveInspirations;
|
|
671
|
+
|
|
672
|
+
var setCustomTitle = function setCustomTitle(title) {
|
|
673
|
+
return {
|
|
674
|
+
type: SET_CUSTOM_TITLE,
|
|
675
|
+
title: title
|
|
676
|
+
};
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
exports.setCustomTitle = setCustomTitle;
|
|
680
|
+
|
|
681
|
+
var inspectCheckResults = function inspectCheckResults() {
|
|
682
|
+
return function (dispatch, getState) {
|
|
683
|
+
var _getState3 = getState(),
|
|
684
|
+
ui = _getState3.ui,
|
|
685
|
+
configurator = _getState3.configurator;
|
|
686
|
+
|
|
687
|
+
var configuration = configurator.configuration;
|
|
688
|
+
|
|
689
|
+
if ((0, _lodash.isObject)(configuration.check_results)) {
|
|
690
|
+
if (configuration.check_results.status) {
|
|
691
|
+
if (ui.visibilityMap.incompatibility) {
|
|
692
|
+
dispatch((0, _Actions2.setVisible)('incompatibility', false));
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
return true;
|
|
696
|
+
} else {
|
|
697
|
+
dispatch((0, _Actions2.setVisible)('incompatibility', true));
|
|
698
|
+
return false;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
return true;
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
exports.inspectCheckResults = inspectCheckResults;
|
|
707
|
+
|
|
708
|
+
var inspectValidationResults = function inspectValidationResults(configuration) {
|
|
709
|
+
return function (dispatch) {
|
|
710
|
+
var validationResult = (0, _lodash.get)(configuration, 'information.validation_result');
|
|
711
|
+
|
|
712
|
+
if ((0, _lodash.isObject)(validationResult) && validationResult.success === false) {
|
|
713
|
+
dispatch((0, _Actions2.setVisible)('validationResult', true));
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
|
|
718
|
+
exports.inspectValidationResults = inspectValidationResults;
|
|
719
|
+
|
|
720
|
+
var fetchConfiguration = function fetchConfiguration(itemidentifier) {
|
|
721
|
+
return apiActions.fetchData('configuration/loadbyitemidentifier/' + itemidentifier, receiveConfiguration);
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
exports.fetchConfiguration = fetchConfiguration;
|
|
725
|
+
|
|
726
|
+
var fetchConfigurationByCode = function fetchConfigurationByCode(code) {
|
|
727
|
+
var checkValidation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
728
|
+
return apiActions.fetchData('configuration/loadbyconfigurationcode/' + code, receiveConfiguration, {
|
|
729
|
+
checkValidation: checkValidation
|
|
730
|
+
});
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
exports.fetchConfigurationByCode = fetchConfigurationByCode;
|
|
734
|
+
|
|
735
|
+
var fetchConfigurationByCodeAsync = function fetchConfigurationByCodeAsync(code) {
|
|
736
|
+
var checkValidation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
737
|
+
return apiActions.fetchDataAsync('configuration/loadbyconfigurationcode/' + code, receiveConfiguration, {
|
|
738
|
+
checkValidation: checkValidation
|
|
739
|
+
});
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
exports.fetchConfigurationByCodeAsync = fetchConfigurationByCodeAsync;
|
|
743
|
+
|
|
744
|
+
var fetchOptions = function fetchOptions(itemidentifier, optionclassification, configuration) {
|
|
745
|
+
return apiActions.postData('options/list/' + itemidentifier + '/' + optionclassification, {
|
|
746
|
+
configuration: configuration
|
|
747
|
+
}, receiveOptions, {}, // config
|
|
748
|
+
{
|
|
749
|
+
optionclassification: optionclassification
|
|
750
|
+
} // extraData
|
|
751
|
+
);
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
exports.fetchOptions = fetchOptions;
|
|
755
|
+
|
|
756
|
+
var switchOptionsBasic = function switchOptionsBasic(configuration, switchedoptions) {
|
|
757
|
+
var noCheck = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
758
|
+
var config = {};
|
|
759
|
+
|
|
760
|
+
if (noCheck) {
|
|
761
|
+
config.params = {
|
|
762
|
+
nocheck: 1
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
return apiActions.postData('configuration/switchoption', {
|
|
767
|
+
configuration: configuration,
|
|
768
|
+
switchedoptions: switchedoptions
|
|
769
|
+
}, function (data) {
|
|
770
|
+
return {
|
|
771
|
+
// dummy receiver
|
|
772
|
+
type: 'RECEIVE_SWITCHOPTIONSRESULT_BASIC',
|
|
773
|
+
data: data
|
|
774
|
+
};
|
|
775
|
+
}, config);
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
exports.switchOptionsBasic = switchOptionsBasic;
|
|
779
|
+
|
|
780
|
+
var switchOptionArrays = function switchOptionArrays(configuration, switchOptionData) {
|
|
781
|
+
var noCheck = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
782
|
+
return function (dispatch) {
|
|
783
|
+
var switchedoptions = {};
|
|
784
|
+
var afterSwitch = [];
|
|
785
|
+
|
|
786
|
+
for (var componentIdentifier in switchOptionData) {
|
|
787
|
+
if ((0, _lodash.isArray)(switchOptionData[componentIdentifier])) {
|
|
788
|
+
var _switchOptionData$com = _toArray(switchOptionData[componentIdentifier]),
|
|
789
|
+
firstOption = _switchOptionData$com[0],
|
|
790
|
+
otherOptions = _switchOptionData$com.slice(1);
|
|
791
|
+
|
|
792
|
+
switchedoptions[componentIdentifier] = firstOption;
|
|
793
|
+
|
|
794
|
+
if (otherOptions.length > 0) {
|
|
795
|
+
var _iterator2 = _createForOfIteratorHelper(otherOptions),
|
|
796
|
+
_step2;
|
|
797
|
+
|
|
798
|
+
try {
|
|
799
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
800
|
+
var optionData = _step2.value;
|
|
801
|
+
afterSwitch.push(_defineProperty({}, componentIdentifier, optionData));
|
|
802
|
+
}
|
|
803
|
+
} catch (err) {
|
|
804
|
+
_iterator2.e(err);
|
|
805
|
+
} finally {
|
|
806
|
+
_iterator2.f();
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
} else {
|
|
810
|
+
switchedoptions[componentIdentifier] = switchOptionData[componentIdentifier];
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
var p = dispatch(switchOptionsBasic(configuration, switchedoptions, noCheck));
|
|
815
|
+
|
|
816
|
+
var _loop = function _loop() {
|
|
817
|
+
var switchOption = _afterSwitch[_i];
|
|
818
|
+
p = p.then(function (action) {
|
|
819
|
+
return dispatch(switchOptionsBasic(action.data, switchOption, noCheck));
|
|
820
|
+
});
|
|
821
|
+
};
|
|
822
|
+
|
|
823
|
+
for (var _i = 0, _afterSwitch = afterSwitch; _i < _afterSwitch.length; _i++) {
|
|
824
|
+
_loop();
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
return p;
|
|
828
|
+
};
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
exports.switchOptionArrays = switchOptionArrays;
|
|
832
|
+
|
|
833
|
+
var switchOptions = function switchOptions(configuration, switchOptionData) {
|
|
834
|
+
var noCheck = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
835
|
+
var refreshOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
836
|
+
var setChecked = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
837
|
+
return function (dispatch) {
|
|
838
|
+
return dispatch(switchOptionArrays(configuration, switchOptionData, noCheck)).then(function (action) {
|
|
839
|
+
var extraData = {
|
|
840
|
+
switchOptionData: switchOptionData,
|
|
841
|
+
noCheck: noCheck,
|
|
842
|
+
refreshOptions: refreshOptions,
|
|
843
|
+
setChecked: setChecked
|
|
844
|
+
};
|
|
845
|
+
return dispatch(receiveSwitchoptionsresult(action.data, extraData));
|
|
846
|
+
});
|
|
847
|
+
};
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
exports.switchOptions = switchOptions;
|
|
851
|
+
|
|
852
|
+
var doCalculation = function doCalculation() {
|
|
853
|
+
return function (dispatch, getState) {
|
|
854
|
+
var configuration = (0, _Selectors.getConfiguration)((0, _Selectors.getConfigurator)(getState()));
|
|
855
|
+
return dispatch(apiActions.postDataAsync('calculation', configuration, receiveCalculation));
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
exports.doCalculation = doCalculation;
|
|
860
|
+
|
|
861
|
+
var fetchOptionDetails = function fetchOptionDetails(optionidentifier, configuration) {
|
|
862
|
+
return apiActions.postData('options/detail/' + optionidentifier, {
|
|
863
|
+
configuration: configuration
|
|
864
|
+
}, receiveOptionDetails);
|
|
865
|
+
};
|
|
866
|
+
|
|
867
|
+
exports.fetchOptionDetails = fetchOptionDetails;
|
|
868
|
+
|
|
869
|
+
var saveConfiguration = function saveConfiguration(configuration, configurationtype) {
|
|
870
|
+
return apiActions.postDataAsync('configurations', {
|
|
871
|
+
configuration: configuration,
|
|
872
|
+
configurationtype: configurationtype
|
|
873
|
+
}, receiveSavedConfiguration);
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
exports.saveConfiguration = saveConfiguration;
|
|
877
|
+
|
|
878
|
+
var validateConfiguration = function validateConfiguration(configuration) {
|
|
879
|
+
return apiActions.postData('configuration/validate', {
|
|
880
|
+
configuration: configuration
|
|
881
|
+
}, receiveValidation);
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
exports.validateConfiguration = validateConfiguration;
|
|
885
|
+
|
|
886
|
+
var fetchConfigurationVariants = function fetchConfigurationVariants(itemidentifier) {
|
|
887
|
+
return apiActions.fetchData('items/getconfigurationvariants/' + itemidentifier, receiveConfigurationVariants);
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
exports.fetchConfigurationVariants = fetchConfigurationVariants;
|
|
891
|
+
|
|
892
|
+
var fetchCodesnippets = function fetchCodesnippets() {
|
|
893
|
+
return apiActions.fetchData('codesnippets/getcurrent', receiveCodesnippets);
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
exports.fetchCodesnippets = fetchCodesnippets;
|
|
897
|
+
|
|
898
|
+
var fetchClientData = function fetchClientData() {
|
|
899
|
+
return apiActions.fetchData('client', receiveClientData);
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
exports.fetchClientData = fetchClientData;
|
|
903
|
+
|
|
904
|
+
var fetchInspirations = function fetchInspirations(itemidentifier) {
|
|
905
|
+
return apiActions.fetchData('inspirations/' + itemidentifier, receiveInspirations);
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
exports.fetchInspirations = fetchInspirations;
|
|
909
|
+
|
|
910
|
+
var setLoadCode = function setLoadCode() {
|
|
911
|
+
var loadCode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
912
|
+
return {
|
|
913
|
+
type: SET_LOAD_CODE,
|
|
914
|
+
loadCode: loadCode
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
exports.setLoadCode = setLoadCode;
|
|
919
|
+
|
|
920
|
+
var setLoadIdentifier = function setLoadIdentifier(loadIdentifier) {
|
|
921
|
+
return {
|
|
922
|
+
type: SET_LOAD_IDENTIFIER,
|
|
923
|
+
loadIdentifier: loadIdentifier
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
exports.setLoadIdentifier = setLoadIdentifier;
|
|
928
|
+
|
|
929
|
+
var setStockInformationOption = function setStockInformationOption(option) {
|
|
930
|
+
return {
|
|
931
|
+
type: SET_STOCK_INFORMATION_OPTION,
|
|
932
|
+
stockInformationOption: option
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
exports.setStockInformationOption = setStockInformationOption;
|
|
937
|
+
|
|
938
|
+
var setSelectedVariantIdentifier = function setSelectedVariantIdentifier(identifier) {
|
|
939
|
+
return {
|
|
940
|
+
type: SET_SELECTED_VARIANT_IDENTIFIER,
|
|
941
|
+
selectedVariantIdentifier: identifier
|
|
942
|
+
};
|
|
943
|
+
};
|
|
944
|
+
|
|
945
|
+
exports.setSelectedVariantIdentifier = setSelectedVariantIdentifier;
|
|
946
|
+
|
|
947
|
+
var setCalculationEnabled = function setCalculationEnabled(enabled) {
|
|
948
|
+
return {
|
|
949
|
+
type: SET_CALCULATION_ENABLED,
|
|
950
|
+
enabled: enabled
|
|
951
|
+
};
|
|
952
|
+
};
|
|
953
|
+
|
|
954
|
+
exports.setCalculationEnabled = setCalculationEnabled;
|
|
955
|
+
|
|
956
|
+
var setOptionclassificationChecked = function setOptionclassificationChecked(optionclassification) {
|
|
957
|
+
return function (dispatch, getState) {
|
|
958
|
+
if (_typeof(optionclassification) !== 'object') {
|
|
959
|
+
optionclassification = find(getState().configurator.configuration.optionclassifications, {
|
|
960
|
+
identifier: optionclassification
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
if (!getState().configurator.checkedOptionclassifications[optionclassification.identifier]) {
|
|
965
|
+
return dispatch({
|
|
966
|
+
type: SET_OPTIONCLASSIFICATION_CHECKED,
|
|
967
|
+
optionclassification: optionclassification
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
exports.setOptionclassificationChecked = setOptionclassificationChecked;
|
|
974
|
+
|
|
975
|
+
var setConflictingSwitchoptionData = function setConflictingSwitchoptionData(switchOptionData) {
|
|
976
|
+
return {
|
|
977
|
+
type: SET_CONFLICTING_SWITCHOPTION_DATA,
|
|
978
|
+
switchOptionData: switchOptionData
|
|
979
|
+
};
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
exports.setConflictingSwitchoptionData = setConflictingSwitchoptionData;
|
|
983
|
+
|
|
984
|
+
var fetchInitialConfiguration = function fetchInitialConfiguration() {
|
|
985
|
+
return function (dispatch, getState) {
|
|
986
|
+
var _getState$configurato = getState().configurator,
|
|
987
|
+
loadCode = _getState$configurato.loadCode,
|
|
988
|
+
loadIdentifier = _getState$configurato.loadIdentifier;
|
|
989
|
+
var defaultLoadIdentifier = (0, _configuration.getConf)('defaultLoadIdentifier');
|
|
990
|
+
|
|
991
|
+
if (loadCode) {
|
|
992
|
+
// Load the configuration by code
|
|
993
|
+
return dispatch(fetchConfigurationByCode(loadCode)).then(function (configuration) {
|
|
994
|
+
if (configuration.error) {
|
|
995
|
+
dispatch((0, _Actions2.reportConfigurationNotFoundError)((0, _i18n.t)('loadConfiguration.error.loadingFailed')));
|
|
996
|
+
} else {
|
|
997
|
+
_ServiceLocator.Services.analytics.triggerEvent(_Constant.EventTypes.load_item, configuration.data.item.identifier);
|
|
998
|
+
}
|
|
999
|
+
});
|
|
1000
|
+
} else if ((0, _configuration.getConf)('loadVariantsFirst')) {
|
|
1001
|
+
// Load variants by identifier
|
|
1002
|
+
dispatch((0, _Actions2.setVisible)('configurationvariantSelection', true));
|
|
1003
|
+
return dispatch(fetchConfigurationVariants(loadIdentifier)).then(function (result) {
|
|
1004
|
+
// if the result contains error just return, do nothing else
|
|
1005
|
+
if (result.error) {
|
|
1006
|
+
return;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
var _getState$configurato2 = getState().configurator,
|
|
1010
|
+
configurationvariants = _getState$configurato2.configurationvariants,
|
|
1011
|
+
loadIdentifier = _getState$configurato2.loadIdentifier; // If there is only one variant or the list is empty, fall back to fetchConfiguration
|
|
1012
|
+
|
|
1013
|
+
if ((0, _lodash.isArray)(configurationvariants)) {
|
|
1014
|
+
if (configurationvariants.length === 0) {
|
|
1015
|
+
// Load the options for the initially selected optionclassification
|
|
1016
|
+
dispatch(fetchConfiguration(loadIdentifier));
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
if (configurationvariants.length === 1) {
|
|
1020
|
+
// There is only one variant in the list, just load it
|
|
1021
|
+
dispatch(fetchConfiguration(configurationvariants[0].identifier));
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
});
|
|
1025
|
+
} else if (loadIdentifier === '__empty__') {
|
|
1026
|
+
return Promise.resolve();
|
|
1027
|
+
} else if (loadIdentifier) {
|
|
1028
|
+
return dispatch(fetchConfiguration(loadIdentifier));
|
|
1029
|
+
} else if (defaultLoadIdentifier) {
|
|
1030
|
+
return dispatch(fetchConfiguration(defaultLoadIdentifier));
|
|
1031
|
+
}
|
|
1032
|
+
};
|
|
1033
|
+
};
|
|
1034
|
+
|
|
1035
|
+
exports.fetchInitialConfiguration = fetchInitialConfiguration;
|
|
1036
|
+
|
|
1037
|
+
var loadInitialOptionclassification = function loadInitialOptionclassification(configuration) {
|
|
1038
|
+
return function (dispatch) {
|
|
1039
|
+
var identifier = configuration.item.identifier;
|
|
1040
|
+
var optionclassification = (0, _lodash.get)(configuration, 'optionclassifications[0]');
|
|
1041
|
+
dispatch(selectOptionclassification(optionclassification));
|
|
1042
|
+
|
|
1043
|
+
_ServiceLocator.Services.configurator.loadOptions(identifier, optionclassification.identifier, configuration);
|
|
1044
|
+
|
|
1045
|
+
dispatch((0, _Actions2.setVisible)('optionlist', true));
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
exports.loadInitialOptionclassification = loadInitialOptionclassification;
|
|
1050
|
+
|
|
1051
|
+
var resolveConflicts = function resolveConflicts() {
|
|
1052
|
+
return function (dispatch, getState) {
|
|
1053
|
+
var _getState4 = getState(),
|
|
1054
|
+
configurator = _getState4.configurator;
|
|
1055
|
+
|
|
1056
|
+
var configuration = configurator.configuration;
|
|
1057
|
+
var incompatibilityCheckResults = configuration.check_results;
|
|
1058
|
+
var p = false;
|
|
1059
|
+
|
|
1060
|
+
if ((0, _lodash.isArray)(incompatibilityCheckResults.check_results)) {
|
|
1061
|
+
dispatch(setCalculationEnabled(false)); // disable calculation while waiting for all options to be switched
|
|
1062
|
+
|
|
1063
|
+
var _iterator3 = _createForOfIteratorHelper(incompatibilityCheckResults.check_results),
|
|
1064
|
+
_step3;
|
|
1065
|
+
|
|
1066
|
+
try {
|
|
1067
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
1068
|
+
var result = _step3.value;
|
|
1069
|
+
|
|
1070
|
+
if (result.status === false) {
|
|
1071
|
+
(function () {
|
|
1072
|
+
// check for data to perform automated option switching
|
|
1073
|
+
var switchOptionsData = (0, _lodash.get)(result, 'data.switchOptions');
|
|
1074
|
+
|
|
1075
|
+
if (switchOptionsData) {
|
|
1076
|
+
if (p) {
|
|
1077
|
+
p = p.then(function (action) {
|
|
1078
|
+
return dispatch(switchOptionArrays(action.data, switchOptionsData, true));
|
|
1079
|
+
});
|
|
1080
|
+
} else {
|
|
1081
|
+
p = dispatch(switchOptionArrays(configuration, switchOptionsData, true));
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
})();
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
} catch (err) {
|
|
1088
|
+
_iterator3.e(err);
|
|
1089
|
+
} finally {
|
|
1090
|
+
_iterator3.f();
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
if (p) {
|
|
1094
|
+
p = p.then(function (action) {
|
|
1095
|
+
// after all conflicts resolved, the desired option can be set
|
|
1096
|
+
var conflictingSwitchOptionData = getState().configurator.conflictingSwitchOptionData;
|
|
1097
|
+
return dispatch(switchOptions(action.data, conflictingSwitchOptionData, false, true, true));
|
|
1098
|
+
}).then(function (action) {
|
|
1099
|
+
if ((0, _lodash.get)(action, 'data.check_results.status') === false) {
|
|
1100
|
+
throw 'There are new conflicts..';
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
var configuration = getState().configurator.configuration; // enable calculation and refresh it
|
|
1104
|
+
|
|
1105
|
+
dispatch(setCalculationEnabled(true));
|
|
1106
|
+
dispatch(invalidateCalculation());
|
|
1107
|
+
dispatch(doCalculation(configuration)); // hide the incompatibility dialog
|
|
1108
|
+
|
|
1109
|
+
dispatch((0, _Actions2.setVisible)('incompatibility', false));
|
|
1110
|
+
return action;
|
|
1111
|
+
})["catch"](function (e) {
|
|
1112
|
+
// eslint-disable-next-line no-console
|
|
1113
|
+
console.warn('Problem when resolving conflicts:', e);
|
|
1114
|
+
});
|
|
1115
|
+
} else {
|
|
1116
|
+
dispatch((0, _Actions2.setVisible)('incompatibility', false));
|
|
1117
|
+
dispatch(setCalculationEnabled(true));
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
return p;
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
exports.resolveConflicts = resolveConflicts;
|
|
1126
|
+
|
|
1127
|
+
var selectOption = function selectOption(option) {
|
|
1128
|
+
var refreshOptionlist = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
1129
|
+
var showOptionDetails = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1130
|
+
var optionclassification = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
1131
|
+
return function (dispatch, getState) {
|
|
1132
|
+
var _getState$configurato3 = getState().configurator,
|
|
1133
|
+
configuration = _getState$configurato3.configuration,
|
|
1134
|
+
selectedoptionclassification = _getState$configurato3.selectedoptionclassification;
|
|
1135
|
+
|
|
1136
|
+
if (!optionclassification) {
|
|
1137
|
+
optionclassification = selectedoptionclassification;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
_ServiceLocator.Services.analytics.triggerEvent(_Constant.EventTypes['switch_option'], {
|
|
1141
|
+
component: optionclassification.identifier,
|
|
1142
|
+
option: option.identifier
|
|
1143
|
+
});
|
|
1144
|
+
|
|
1145
|
+
var switchOptionData = _defineProperty({}, optionclassification.identifier, _objectSpread(_objectSpread({}, option), {}, {
|
|
1146
|
+
amount: isNaN(parseInt(option.amount)) ? 0 : option.amount,
|
|
1147
|
+
check_results: null // it can mess the response, so should remove it.
|
|
1148
|
+
|
|
1149
|
+
}));
|
|
1150
|
+
|
|
1151
|
+
dispatch((0, _Actions2.setVisible)('optionDetails', showOptionDetails));
|
|
1152
|
+
return dispatch(switchOptions(configuration, switchOptionData, false, refreshOptionlist, true));
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1156
|
+
exports.selectOption = selectOption;
|
|
1157
|
+
|
|
1158
|
+
var selectMultipleOptions = function selectMultipleOptions(optionsList) {
|
|
1159
|
+
return function (dispatch, getState) {
|
|
1160
|
+
var configuration = (0, _Selectors.getConfiguration)((0, _Selectors.getConfigurator)(getState()));
|
|
1161
|
+
var switchOptionData = {};
|
|
1162
|
+
|
|
1163
|
+
var _iterator4 = _createForOfIteratorHelper(optionsList),
|
|
1164
|
+
_step4;
|
|
1165
|
+
|
|
1166
|
+
try {
|
|
1167
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
1168
|
+
var component = _step4.value;
|
|
1169
|
+
switchOptionData[component.identifier] = component.selectedoptions.map(function (_ref5) {
|
|
1170
|
+
var identifier = _ref5.identifier,
|
|
1171
|
+
amount = _ref5.amount;
|
|
1172
|
+
return {
|
|
1173
|
+
identifier: identifier,
|
|
1174
|
+
amount: amount || 1,
|
|
1175
|
+
check_results: null
|
|
1176
|
+
};
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
} catch (err) {
|
|
1180
|
+
_iterator4.e(err);
|
|
1181
|
+
} finally {
|
|
1182
|
+
_iterator4.f();
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
return dispatch(switchOptions(configuration, switchOptionData, false, false, true));
|
|
1186
|
+
};
|
|
1187
|
+
};
|
|
1188
|
+
|
|
1189
|
+
exports.selectMultipleOptions = selectMultipleOptions;
|
|
1190
|
+
|
|
1191
|
+
var viewOptionDetails = function viewOptionDetails(option) {
|
|
1192
|
+
return function (dispatch, getState) {
|
|
1193
|
+
if (!option) {
|
|
1194
|
+
return;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
var _getState$configurato4 = getState().configurator,
|
|
1198
|
+
configuration = _getState$configurato4.configuration,
|
|
1199
|
+
optiondetails = _getState$configurato4.optiondetails;
|
|
1200
|
+
|
|
1201
|
+
if (optiondetails.identifier !== option.identifier) {
|
|
1202
|
+
dispatch(fetchOptionDetails(option.identifier, configuration));
|
|
1203
|
+
} else {
|
|
1204
|
+
dispatch((0, _Actions2.setVisible)('optionDetails', true));
|
|
1205
|
+
}
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1209
|
+
exports.viewOptionDetails = viewOptionDetails;
|
|
1210
|
+
|
|
1211
|
+
var loadConfiguration = function loadConfiguration() {
|
|
1212
|
+
return /*#__PURE__*/function () {
|
|
1213
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(dispatch, getState) {
|
|
1214
|
+
var loadCode, action;
|
|
1215
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
1216
|
+
while (1) {
|
|
1217
|
+
switch (_context4.prev = _context4.next) {
|
|
1218
|
+
case 0:
|
|
1219
|
+
loadCode = getState().configurator.loadCode;
|
|
1220
|
+
|
|
1221
|
+
if (loadCode) {
|
|
1222
|
+
_context4.next = 3;
|
|
1223
|
+
break;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
throw new Error((0, _i18n.t)('loadConfiguration.error.emptyCode'));
|
|
1227
|
+
|
|
1228
|
+
case 3:
|
|
1229
|
+
dispatch((0, _Actions2.dismissError)());
|
|
1230
|
+
dispatch((0, _Actions2.setWorkInProgress)('loadConfiguration', true));
|
|
1231
|
+
_context4.prev = 5;
|
|
1232
|
+
_context4.next = 8;
|
|
1233
|
+
return dispatch(fetchConfigurationByCodeAsync(loadCode));
|
|
1234
|
+
|
|
1235
|
+
case 8:
|
|
1236
|
+
action = _context4.sent;
|
|
1237
|
+
dispatch((0, _Actions2.setVisible)('loadConfiguration', false));
|
|
1238
|
+
return _context4.abrupt("return", action);
|
|
1239
|
+
|
|
1240
|
+
case 13:
|
|
1241
|
+
_context4.prev = 13;
|
|
1242
|
+
_context4.t0 = _context4["catch"](5);
|
|
1243
|
+
dispatch((0, _Actions2.dismissError)()); // ignore original REQUEST_ERROR, should be handled by the caller
|
|
1244
|
+
|
|
1245
|
+
throw new Error((0, _i18n.t)('loadConfiguration.error.loadingFailed'));
|
|
1246
|
+
|
|
1247
|
+
case 17:
|
|
1248
|
+
_context4.prev = 17;
|
|
1249
|
+
dispatch((0, _Actions2.setWorkInProgress)('loadConfiguration', false));
|
|
1250
|
+
return _context4.finish(17);
|
|
1251
|
+
|
|
1252
|
+
case 20:
|
|
1253
|
+
case "end":
|
|
1254
|
+
return _context4.stop();
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}, _callee4, null, [[5, 13, 17, 20]]);
|
|
1258
|
+
}));
|
|
1259
|
+
|
|
1260
|
+
return function (_x6, _x7) {
|
|
1261
|
+
return _ref6.apply(this, arguments);
|
|
1262
|
+
};
|
|
1263
|
+
}();
|
|
1264
|
+
};
|
|
1265
|
+
|
|
1266
|
+
exports.loadConfiguration = loadConfiguration;
|
|
1267
|
+
|
|
1268
|
+
var receiveDesignerData = function receiveDesignerData(data) {
|
|
1269
|
+
return (0, _createActionWithGlobalState.createActionWithGlobalState)({
|
|
1270
|
+
type: RECEIVE_DESIGNER_DATA,
|
|
1271
|
+
data: data,
|
|
1272
|
+
receivedAt: Date.now()
|
|
1273
|
+
});
|
|
1274
|
+
};
|
|
1275
|
+
|
|
1276
|
+
exports.receiveDesignerData = receiveDesignerData;
|
|
1277
|
+
|
|
1278
|
+
var loadDesignerData = function loadDesignerData(configuration) {
|
|
1279
|
+
return /*#__PURE__*/function () {
|
|
1280
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(dispatch) {
|
|
1281
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
1282
|
+
while (1) {
|
|
1283
|
+
switch (_context5.prev = _context5.next) {
|
|
1284
|
+
case 0:
|
|
1285
|
+
if (!(!configuration || !configuration.item || !configuration.item.identifier)) {
|
|
1286
|
+
_context5.next = 2;
|
|
1287
|
+
break;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
return _context5.abrupt("return", dispatch((0, _Actions2.reportError)((0, _i18n.t)('loadConfigurationModes.error.missingItemIdentifier'))));
|
|
1291
|
+
|
|
1292
|
+
case 2:
|
|
1293
|
+
dispatch((0, _Actions2.dismissError)());
|
|
1294
|
+
dispatch((0, _Actions2.setWorkInProgress)('loadConfigurationModes', true));
|
|
1295
|
+
_context5.prev = 4;
|
|
1296
|
+
_context5.next = 7;
|
|
1297
|
+
return dispatch(apiActions.postDataAsync('/configurationmodes/designer/getdata', {
|
|
1298
|
+
configuration: configuration
|
|
1299
|
+
}, receiveDesignerData));
|
|
1300
|
+
|
|
1301
|
+
case 7:
|
|
1302
|
+
return _context5.abrupt("return", _context5.sent);
|
|
1303
|
+
|
|
1304
|
+
case 10:
|
|
1305
|
+
_context5.prev = 10;
|
|
1306
|
+
_context5.t0 = _context5["catch"](4);
|
|
1307
|
+
return _context5.abrupt("return", dispatch((0, _Actions2.reportError)((0, _i18n.t)('loadConfigurationModes.error.loadingFailed'))));
|
|
1308
|
+
|
|
1309
|
+
case 13:
|
|
1310
|
+
_context5.prev = 13;
|
|
1311
|
+
dispatch((0, _Actions2.setWorkInProgress)('loadConfigurationModes', false));
|
|
1312
|
+
return _context5.finish(13);
|
|
1313
|
+
|
|
1314
|
+
case 16:
|
|
1315
|
+
case "end":
|
|
1316
|
+
return _context5.stop();
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
}, _callee5, null, [[4, 10, 13, 16]]);
|
|
1320
|
+
}));
|
|
1321
|
+
|
|
1322
|
+
return function (_x8) {
|
|
1323
|
+
return _ref7.apply(this, arguments);
|
|
1324
|
+
};
|
|
1325
|
+
}();
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
exports.loadDesignerData = loadDesignerData;
|
|
1329
|
+
|
|
1330
|
+
var setSelectedAmount = function setSelectedAmount(identifier, amount) {
|
|
1331
|
+
var isUpdatedByUser = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1332
|
+
return {
|
|
1333
|
+
type: SET_SELECTED_AMOUNT,
|
|
1334
|
+
identifier: identifier,
|
|
1335
|
+
amount: amount,
|
|
1336
|
+
isUpdatedByUser: isUpdatedByUser
|
|
1337
|
+
};
|
|
1338
|
+
};
|
|
1339
|
+
|
|
1340
|
+
exports.setSelectedAmount = setSelectedAmount;
|
|
1341
|
+
|
|
1342
|
+
var saveBulkNames = function saveBulkNames(identifier, bulkNamesData) {
|
|
1343
|
+
return {
|
|
1344
|
+
type: SAVE_BULKNAMES,
|
|
1345
|
+
identifier: identifier,
|
|
1346
|
+
bulkNamesData: bulkNamesData
|
|
1347
|
+
};
|
|
1348
|
+
};
|
|
1349
|
+
|
|
1350
|
+
exports.saveBulkNames = saveBulkNames;
|
|
1351
|
+
|
|
1352
|
+
var clearBulkNames = function clearBulkNames() {
|
|
1353
|
+
return {
|
|
1354
|
+
type: CLEAR_BULKNAMES
|
|
1355
|
+
};
|
|
1356
|
+
};
|
|
1357
|
+
|
|
1358
|
+
exports.clearBulkNames = clearBulkNames;
|
|
1359
|
+
|
|
1360
|
+
var deleteSelectedAmount = function deleteSelectedAmount(identifier) {
|
|
1361
|
+
return {
|
|
1362
|
+
type: DELETE_SELECTED_AMOUNT,
|
|
1363
|
+
identifier: identifier
|
|
1364
|
+
};
|
|
1365
|
+
};
|
|
1366
|
+
|
|
1367
|
+
exports.deleteSelectedAmount = deleteSelectedAmount;
|
|
1368
|
+
|
|
1369
|
+
var setSelectedAmounts = function setSelectedAmounts(variant, sizes, isUpdatedByUser) {
|
|
1370
|
+
return {
|
|
1371
|
+
type: SET_SELECTED_AMOUNTS,
|
|
1372
|
+
variant: variant,
|
|
1373
|
+
sizes: sizes,
|
|
1374
|
+
isUpdatedByUser: isUpdatedByUser
|
|
1375
|
+
};
|
|
1376
|
+
};
|
|
1377
|
+
|
|
1378
|
+
exports.setSelectedAmounts = setSelectedAmounts;
|
|
1379
|
+
|
|
1380
|
+
var deleteSelectedAmounts = function deleteSelectedAmounts(variant, sizes) {
|
|
1381
|
+
return {
|
|
1382
|
+
type: DELETE_SELECTED_AMOUNTS,
|
|
1383
|
+
variant: variant,
|
|
1384
|
+
sizes: sizes
|
|
1385
|
+
};
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1388
|
+
exports.deleteSelectedAmounts = deleteSelectedAmounts;
|
|
1389
|
+
|
|
1390
|
+
var setComment = function setComment(comment) {
|
|
1391
|
+
return {
|
|
1392
|
+
type: SET_COMMENT,
|
|
1393
|
+
comment: comment
|
|
1394
|
+
};
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1397
|
+
exports.setComment = setComment;
|
|
1398
|
+
|
|
1399
|
+
var switchSelectedAmount = function switchSelectedAmount(srcIdentifier, dstIdentifier) {
|
|
1400
|
+
return {
|
|
1401
|
+
type: SWITCH_SELECTED_AMOUNT,
|
|
1402
|
+
srcIdentifier: srcIdentifier,
|
|
1403
|
+
dstIdentifier: dstIdentifier
|
|
1404
|
+
};
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
exports.switchSelectedAmount = switchSelectedAmount;
|
|
1408
|
+
|
|
1409
|
+
var setSelectedCalculation = function setSelectedCalculation(identifier, value) {
|
|
1410
|
+
return {
|
|
1411
|
+
type: SET_SELECTED_CALCULATION,
|
|
1412
|
+
identifier: identifier,
|
|
1413
|
+
value: value
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
|
|
1417
|
+
exports.setSelectedCalculation = setSelectedCalculation;
|