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