@configuratorware/configurator-frontendgui 1.41.1 → 1.42.1
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 +21 -13
- 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
|
@@ -1,78 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports.imageGalleryReducer = imageGalleryReducer;
|
|
9
6
|
exports["default"] = void 0;
|
|
10
|
-
|
|
7
|
+
exports.imageGalleryReducer = imageGalleryReducer;
|
|
11
8
|
var _findIndex = _interopRequireDefault(require("lodash/findIndex"));
|
|
12
|
-
|
|
13
9
|
var _find = _interopRequireDefault(require("lodash/find"));
|
|
14
|
-
|
|
15
10
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
16
|
-
|
|
17
11
|
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
18
|
-
|
|
19
12
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
20
|
-
|
|
21
13
|
var _Modifiers = require("./Modifiers");
|
|
22
|
-
|
|
23
|
-
var actionTypes =
|
|
24
|
-
|
|
14
|
+
var _Actions = _interopRequireWildcard(require("./Actions"));
|
|
15
|
+
var actionTypes = _Actions;
|
|
25
16
|
var _Modifiers2 = require("../DesignData/Modifiers");
|
|
26
|
-
|
|
27
17
|
var _Selectors = require("./Selectors");
|
|
28
|
-
|
|
29
18
|
var _configuration = require("../../configuration");
|
|
30
|
-
|
|
31
19
|
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); }
|
|
32
|
-
|
|
33
20
|
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; }
|
|
34
|
-
|
|
35
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
36
|
-
|
|
22
|
+
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); }
|
|
37
23
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
38
|
-
|
|
39
24
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
40
|
-
|
|
41
25
|
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); }
|
|
42
|
-
|
|
43
26
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
44
|
-
|
|
45
27
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
46
|
-
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
54
|
-
|
|
28
|
+
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; }
|
|
29
|
+
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; }
|
|
30
|
+
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; }
|
|
31
|
+
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; }
|
|
32
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
33
|
+
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); }
|
|
55
34
|
var updateDerivedImageDataProps = function updateDerivedImageDataProps(imageData) {
|
|
56
35
|
var _imageData$operations = imageData.operations,
|
|
57
|
-
|
|
36
|
+
operations = _imageData$operations === void 0 ? {} : _imageData$operations;
|
|
58
37
|
imageData.imageColorsWereEdited = !!operations.vectorizeOriginalColorsMap && !(0, _isEqual["default"])(operations.vectorizeColorsMap, operations.vectorizeOriginalColorsMap);
|
|
59
38
|
var prevColorPreviewEnabled = imageData.colorPreviewEnabled;
|
|
60
39
|
imageData.colorPreviewEnabled = imageData.colorPreviewRequired || !!Object.keys(operations.vectorizeOriginalColorsMap || {}).length && (0, _Modifiers2.isOneColorAboveThreshold)(operations.vectorizeColorsMap, operations.vectorizeOriginalColorsMap);
|
|
61
|
-
|
|
62
40
|
if (!imageData.colorPreviewEnabled) {
|
|
63
41
|
imageData.displayColorPreview = false;
|
|
64
42
|
} else if (!prevColorPreviewEnabled) {
|
|
65
43
|
imageData.displayColorPreview = (0, _configuration.getConf)('autoPreviewVectorization', true);
|
|
66
44
|
}
|
|
67
|
-
|
|
68
45
|
if (imageData.vectorizedLogoMandatory) {
|
|
69
46
|
imageData.colorPreviewEnabled = false;
|
|
70
47
|
imageData.displayColorPreview = true;
|
|
71
48
|
}
|
|
72
|
-
|
|
73
49
|
return imageData;
|
|
74
50
|
};
|
|
75
|
-
|
|
76
51
|
var initialState = {
|
|
77
52
|
gallery: [],
|
|
78
53
|
tags: [],
|
|
@@ -83,95 +58,76 @@ var initialState = {
|
|
|
83
58
|
lastErrorCode: null,
|
|
84
59
|
mode: null
|
|
85
60
|
};
|
|
86
|
-
|
|
87
61
|
function imageGalleryReducer() {
|
|
88
62
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
89
63
|
var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
90
|
-
|
|
91
64
|
switch (action.type) {
|
|
92
65
|
case actionTypes.RECEIVE_GALLERY:
|
|
93
66
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
94
67
|
gallery: action.data
|
|
95
68
|
});
|
|
96
|
-
|
|
97
69
|
case actionTypes.RECEIVE_GALLERY_TAGS:
|
|
98
70
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
99
71
|
tags: action.data
|
|
100
72
|
});
|
|
101
|
-
|
|
102
73
|
case actionTypes.SELECT_GALLERY_TAG:
|
|
103
74
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
104
75
|
selectedTag: action.tag
|
|
105
76
|
});
|
|
106
|
-
|
|
107
77
|
case actionTypes.SELECT_GALLERY_TAGS:
|
|
108
78
|
{
|
|
109
79
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
110
80
|
selectedTags: action.tags
|
|
111
81
|
});
|
|
112
82
|
}
|
|
113
|
-
|
|
114
83
|
case actionTypes.RECEIVE_IMAGE_UPLOAD_DATA:
|
|
115
84
|
{
|
|
116
85
|
var statusCode = (0, _get["default"])(action, 'response.status');
|
|
117
|
-
|
|
118
86
|
if (statusCode && statusCode !== 200) {
|
|
119
87
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
120
88
|
lastErrorCode: (0, _get["default"])(action, 'data.code', 'unknown_server_error')
|
|
121
89
|
});
|
|
122
90
|
}
|
|
123
|
-
|
|
124
91
|
var imageData = _objectSpread(_objectSpread({}, action.imageData), action.data);
|
|
125
|
-
|
|
126
92
|
var userImages = state.userImages;
|
|
127
93
|
var userImage = (0, _find["default"])(userImages, {
|
|
128
94
|
identifier: imageData.identifier
|
|
129
95
|
}) || state.selectedImage;
|
|
130
|
-
|
|
131
96
|
if (userImage) {
|
|
132
97
|
imageData.identifier = userImage.identifier;
|
|
133
|
-
|
|
134
98
|
if (userImage.originalFileName === imageData.originalFileName) {
|
|
135
99
|
imageData.displayColorPreview = userImage.displayColorPreview;
|
|
136
|
-
|
|
137
100
|
if (!imageData.operations) {
|
|
138
101
|
imageData.operations = (0, _cloneDeep["default"])(userImage.operations);
|
|
139
102
|
}
|
|
140
103
|
}
|
|
141
104
|
}
|
|
142
|
-
|
|
143
105
|
if (!imageData.identifier || action.createCopy) {
|
|
144
106
|
imageData.identifier = (0, _Modifiers.generateImageId)();
|
|
145
107
|
}
|
|
146
|
-
|
|
147
108
|
updateDerivedImageDataProps(imageData);
|
|
148
|
-
|
|
149
109
|
if (action.createCopy && action.immediateCommit) {
|
|
150
110
|
userImages = [].concat(state.userImages);
|
|
151
111
|
userImages.push(imageData);
|
|
152
112
|
}
|
|
153
|
-
|
|
154
113
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
155
114
|
userImages: userImages,
|
|
156
115
|
selectedImage: imageData,
|
|
157
116
|
lastErrorCode: null // clear the error code if succeeded
|
|
158
|
-
|
|
159
117
|
});
|
|
160
118
|
}
|
|
161
119
|
|
|
162
120
|
case actionTypes.COMMIT_CHANGES:
|
|
163
121
|
{
|
|
164
122
|
var count = action.imageUsageInfo.count,
|
|
165
|
-
|
|
123
|
+
compatibilityInfoHash = action.compatibilityInfoHash;
|
|
166
124
|
var selectedImage = state.selectedImage,
|
|
167
|
-
|
|
168
|
-
|
|
125
|
+
mode = state.mode;
|
|
169
126
|
var _userImages = [].concat(state.userImages);
|
|
170
|
-
|
|
171
127
|
var identifier = selectedImage.identifier,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
var currentImage = mode ===
|
|
128
|
+
fileName = selectedImage.fileName,
|
|
129
|
+
operations = selectedImage.operations;
|
|
130
|
+
var currentImage = mode === _Actions.ImageGalleryModes.add ? (0, _find["default"])(_userImages, {
|
|
175
131
|
fileName: fileName,
|
|
176
132
|
operations: operations,
|
|
177
133
|
compatibilityInfoHash: compatibilityInfoHash
|
|
@@ -184,36 +140,30 @@ function imageGalleryReducer() {
|
|
|
184
140
|
operations: operations,
|
|
185
141
|
compatibilityInfoHash: compatibilityInfoHash
|
|
186
142
|
}) || null;
|
|
187
|
-
|
|
188
143
|
if (currentImage) {
|
|
189
|
-
if (mode ===
|
|
144
|
+
if (mode === _Actions.ImageGalleryModes.add) {
|
|
190
145
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
191
146
|
selectedImage: currentImage
|
|
192
147
|
});
|
|
193
148
|
} else {
|
|
194
149
|
var idx = _userImages.indexOf(currentImage);
|
|
195
|
-
|
|
196
150
|
_userImages[idx] = _objectSpread(_objectSpread({}, currentImage), selectedImage);
|
|
197
151
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
198
152
|
userImages: _userImages
|
|
199
153
|
});
|
|
200
154
|
}
|
|
201
155
|
}
|
|
202
|
-
|
|
203
156
|
var newImage = _objectSpread(_objectSpread({}, selectedImage), {}, {
|
|
204
157
|
compatibilityInfoHash: compatibilityInfoHash,
|
|
205
158
|
operations: operations || {},
|
|
206
159
|
identifier: (0, _Modifiers.generateImageId)()
|
|
207
160
|
});
|
|
208
|
-
|
|
209
161
|
_userImages.push(newImage);
|
|
210
|
-
|
|
211
162
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
212
163
|
userImages: _userImages,
|
|
213
164
|
selectedImage: newImage
|
|
214
165
|
});
|
|
215
166
|
}
|
|
216
|
-
|
|
217
167
|
case actionTypes.SET_MODE:
|
|
218
168
|
{
|
|
219
169
|
var _mode = action.mode;
|
|
@@ -221,81 +171,67 @@ function imageGalleryReducer() {
|
|
|
221
171
|
mode: _mode
|
|
222
172
|
});
|
|
223
173
|
}
|
|
224
|
-
|
|
225
174
|
case actionTypes.SET_SELECTED_IMAGE:
|
|
226
175
|
{
|
|
227
176
|
var _imageData = action.imageData,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
177
|
+
_fileName = action.fileName,
|
|
178
|
+
_identifier = action.identifier;
|
|
231
179
|
var _selectedImage = _imageData && updateDerivedImageDataProps(_imageData) || _identifier && (0, _find["default"])(state.userImages, {
|
|
232
180
|
identifier: _identifier
|
|
233
181
|
}) || _fileName && (0, _find["default"])(state.userImages, {
|
|
234
182
|
fileName: _fileName
|
|
235
183
|
}) || null;
|
|
236
|
-
|
|
237
184
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
238
185
|
selectedImage: _selectedImage
|
|
239
186
|
});
|
|
240
187
|
}
|
|
241
|
-
|
|
242
188
|
case actionTypes.ADD_IMAGES_FROM_DESIGN_AREA:
|
|
243
189
|
{
|
|
244
190
|
return action.data ? _objectSpread(_objectSpread({}, state), {}, {
|
|
245
191
|
userImages: [].concat(_toConsumableArray(state.userImages), _toConsumableArray(action.data))
|
|
246
192
|
}) : state;
|
|
247
193
|
}
|
|
248
|
-
|
|
249
194
|
case actionTypes.UPDATE_IMAGE:
|
|
250
195
|
{
|
|
251
196
|
var _userImages2 = state.userImages;
|
|
252
197
|
var designAreas = action.imageUsageInfo.designAreas,
|
|
253
|
-
|
|
254
|
-
|
|
198
|
+
imageDataPatch = action.imageDataPatch;
|
|
255
199
|
var _currentImage = state.selectedImage && state.selectedImage.identifier === action.identifier ? state.selectedImage : (0, _find["default"])(_userImages2, {
|
|
256
200
|
identifier: action.identifier
|
|
257
201
|
});
|
|
202
|
+
var image = _objectSpread(_objectSpread({}, _currentImage), imageDataPatch);
|
|
258
203
|
|
|
259
|
-
|
|
204
|
+
// create new identifier if it's used by multiple areas
|
|
260
205
|
// avoiding unwanted modification of other occurrences
|
|
261
|
-
|
|
262
|
-
|
|
263
206
|
if (designAreas > 1 && (0, _Selectors.isHardModified)(_currentImage, image)) {
|
|
264
207
|
image.identifier = (0, _Modifiers.generateImageId)();
|
|
265
208
|
}
|
|
266
|
-
|
|
267
209
|
updateDerivedImageDataProps(image);
|
|
268
|
-
|
|
269
210
|
var result = _objectSpread({}, state);
|
|
211
|
+
result.selectedImage = image;
|
|
270
212
|
|
|
271
|
-
|
|
213
|
+
// in 'immediate commit' mode the image is directly updated or added
|
|
272
214
|
// so the extra COMMIT_CHANGES action does not have to be performed
|
|
273
|
-
|
|
274
215
|
if (action.immediateCommit) {
|
|
275
216
|
result.userImages = _toConsumableArray(_userImages2);
|
|
276
|
-
|
|
277
217
|
var _idx = (0, _findIndex["default"])(_userImages2, {
|
|
278
218
|
identifier: image.identifier
|
|
279
219
|
});
|
|
280
|
-
|
|
281
220
|
if (_idx !== -1) {
|
|
282
221
|
result.userImages[_idx] = image;
|
|
283
222
|
} else {
|
|
284
223
|
result.userImages.push(image);
|
|
285
224
|
}
|
|
286
225
|
}
|
|
287
|
-
|
|
288
226
|
return result;
|
|
289
227
|
}
|
|
290
|
-
|
|
291
228
|
case actionTypes.ADD_GALLERY_IMAGE_TO_USER_IMAGES:
|
|
292
229
|
{
|
|
293
230
|
var imageUrl = action.imageUrl,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
231
|
+
thumbUrl = action.thumbUrl,
|
|
232
|
+
_fileName2 = action.fileName,
|
|
233
|
+
vectorizeColorsMap = action.vectorizeColorsMap,
|
|
234
|
+
_compatibilityInfoHash = action.compatibilityInfoHash;
|
|
299
235
|
var _image = (0, _Modifiers.createSVGImageData)({
|
|
300
236
|
imageUrl: imageUrl,
|
|
301
237
|
thumbUrl: thumbUrl,
|
|
@@ -304,25 +240,20 @@ function imageGalleryReducer() {
|
|
|
304
240
|
vectorizeColorsMap: vectorizeColorsMap
|
|
305
241
|
}
|
|
306
242
|
});
|
|
307
|
-
|
|
308
243
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
309
244
|
selectedImage: _objectSpread(_objectSpread({}, _image), {}, {
|
|
310
245
|
compatibilityInfoHash: _compatibilityInfoHash
|
|
311
246
|
})
|
|
312
247
|
});
|
|
313
248
|
}
|
|
314
|
-
|
|
315
249
|
case actionTypes.DISMISS_ERROR:
|
|
316
250
|
{
|
|
317
251
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
318
252
|
lastErrorCode: null
|
|
319
253
|
});
|
|
320
254
|
}
|
|
321
|
-
|
|
322
255
|
default:
|
|
323
256
|
return state;
|
|
324
257
|
}
|
|
325
258
|
}
|
|
326
|
-
|
|
327
|
-
var _default = imageGalleryReducer;
|
|
328
|
-
exports["default"] = _default;
|
|
259
|
+
var _default = exports["default"] = imageGalleryReducer;
|
|
@@ -3,68 +3,43 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
6
|
+
exports.showVectorizeImageQuality = exports.isImageReadyToBeAdded = exports.isImageCompatible = exports.isHardModified = exports.isEditableVectorImage = exports.isEditMode = exports.isColorPreviewCompatible = exports.isColorMappingCompatible = exports.isAddMode = exports.getUserImagesByDesignArea = exports.getUserImage = exports.getPreviewUrlFromImageData = exports.getImageUsageInfo = void 0;
|
|
8
7
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
9
|
-
|
|
10
8
|
var _find = _interopRequireDefault(require("lodash/find"));
|
|
11
|
-
|
|
12
9
|
var _isString = _interopRequireDefault(require("lodash/isString"));
|
|
13
|
-
|
|
14
10
|
var _flatten = _interopRequireDefault(require("lodash/flatten"));
|
|
15
|
-
|
|
16
11
|
var _configuration = require("../../configuration");
|
|
17
|
-
|
|
18
12
|
var _Selectors = require("../Configurator/Selectors");
|
|
19
|
-
|
|
20
13
|
var _Reducer = require("../DesignData/Reducer");
|
|
21
|
-
|
|
22
14
|
var _Actions = require("./Actions");
|
|
23
|
-
|
|
24
15
|
var _Selectors2 = require("../DesignArea/Selectors");
|
|
25
|
-
|
|
26
16
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
27
|
-
|
|
28
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
|
-
|
|
30
|
-
var getPreviewUrlFromImageData = function getPreviewUrlFromImageData(preview) {
|
|
18
|
+
var getPreviewUrlFromImageData = exports.getPreviewUrlFromImageData = function getPreviewUrlFromImageData(preview) {
|
|
31
19
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
32
20
|
var previewUrl = (0, _isString["default"])(preview) ? preview : preview.url;
|
|
33
|
-
|
|
34
21
|
if (/^data:image/.test(previewUrl)) {
|
|
35
22
|
return previewUrl;
|
|
36
23
|
}
|
|
37
|
-
|
|
38
24
|
var _options$host = options.host,
|
|
39
|
-
|
|
25
|
+
host = _options$host === void 0 ? (0, _configuration.getConf)('network.host', '') : _options$host;
|
|
40
26
|
return "".concat(host).concat(previewUrl);
|
|
41
27
|
};
|
|
42
|
-
|
|
43
|
-
exports.getPreviewUrlFromImageData = getPreviewUrlFromImageData;
|
|
44
|
-
|
|
45
|
-
var isEditableVectorImage = function isEditableVectorImage(preview) {
|
|
28
|
+
var isEditableVectorImage = exports.isEditableVectorImage = function isEditableVectorImage(preview) {
|
|
46
29
|
return preview && preview.url && (/.svg$/.test(preview.url) || /^data:image\/svg\+xml/.test(preview.url));
|
|
47
30
|
};
|
|
48
|
-
|
|
49
|
-
exports.isEditableVectorImage = isEditableVectorImage;
|
|
50
|
-
|
|
51
|
-
var getUserImage = function getUserImage(state, identifier) {
|
|
31
|
+
var getUserImage = exports.getUserImage = function getUserImage(state, identifier) {
|
|
52
32
|
var userImages = (0, _get["default"])(state, 'imageGallery.userImages', []);
|
|
53
33
|
return (0, _find["default"])(userImages, {
|
|
54
34
|
identifier: identifier
|
|
55
35
|
});
|
|
56
36
|
};
|
|
57
|
-
|
|
58
|
-
exports.getUserImage = getUserImage;
|
|
59
|
-
|
|
60
|
-
var getUserImagesByDesignArea = function getUserImagesByDesignArea(configuratorState) {
|
|
37
|
+
var getUserImagesByDesignArea = exports.getUserImagesByDesignArea = function getUserImagesByDesignArea(configuratorState) {
|
|
61
38
|
var configuration = (0, _Selectors.getConfiguration)(configuratorState);
|
|
62
39
|
var designData = (0, _get["default"])(configuration, 'designdata');
|
|
63
|
-
|
|
64
40
|
if (!designData) {
|
|
65
41
|
return null;
|
|
66
42
|
}
|
|
67
|
-
|
|
68
43
|
return (0, _flatten["default"])(Object.values(designData) // merge the objects into one array
|
|
69
44
|
.filter(function (dd) {
|
|
70
45
|
return !!dd.canvasData;
|
|
@@ -79,7 +54,8 @@ var getUserImagesByDesignArea = function getUserImagesByDesignArea(configuratorS
|
|
|
79
54
|
return object.imageData;
|
|
80
55
|
}) // get the imageData objects from the images
|
|
81
56
|
.filter(function (imageData, idx, arr) {
|
|
82
|
-
return !imageData.isPlaceHolderImage &&
|
|
57
|
+
return !imageData.isPlaceHolderImage &&
|
|
58
|
+
// placeholders are not needed in the list
|
|
83
59
|
// uniq by identifier
|
|
84
60
|
imageData === arr.find(function (_ref) {
|
|
85
61
|
var identifier = _ref.identifier;
|
|
@@ -87,24 +63,19 @@ var getUserImagesByDesignArea = function getUserImagesByDesignArea(configuratorS
|
|
|
87
63
|
});
|
|
88
64
|
});
|
|
89
65
|
};
|
|
90
|
-
|
|
91
|
-
exports.getUserImagesByDesignArea = getUserImagesByDesignArea;
|
|
92
|
-
|
|
93
|
-
var getImageUsageInfo = function getImageUsageInfo(state, imageIdentifier) {
|
|
66
|
+
var getImageUsageInfo = exports.getImageUsageInfo = function getImageUsageInfo(state, imageIdentifier) {
|
|
94
67
|
if (!imageIdentifier) {
|
|
95
68
|
imageIdentifier = (0, _get["default"])(state.imageGallery.selectedImage, 'identifier');
|
|
96
69
|
}
|
|
97
|
-
|
|
98
70
|
if (!imageIdentifier) {
|
|
99
71
|
return {
|
|
100
72
|
count: 0,
|
|
101
73
|
designAreas: 0
|
|
102
74
|
};
|
|
103
75
|
}
|
|
104
|
-
|
|
105
76
|
return Object.values((0, _Reducer.getDesignData)((0, _Selectors.getConfigurator)(state))).reduce(function (_ref2, _ref3) {
|
|
106
77
|
var count = _ref2.count,
|
|
107
|
-
|
|
78
|
+
designAreas = _ref2.designAreas;
|
|
108
79
|
var canvasData = _ref3.canvasData;
|
|
109
80
|
var countPerArea = canvasData && canvasData.objects ? canvasData.objects.filter(function (_ref4) {
|
|
110
81
|
var imageData = _ref4.imageData;
|
|
@@ -119,39 +90,24 @@ var getImageUsageInfo = function getImageUsageInfo(state, imageIdentifier) {
|
|
|
119
90
|
designAreas: 0
|
|
120
91
|
});
|
|
121
92
|
};
|
|
122
|
-
|
|
123
|
-
exports.getImageUsageInfo = getImageUsageInfo;
|
|
124
|
-
|
|
125
|
-
var isEditMode = function isEditMode(state) {
|
|
93
|
+
var isEditMode = exports.isEditMode = function isEditMode(state) {
|
|
126
94
|
return (0, _get["default"])(state, 'imageGallery.mode') === _Actions.ImageGalleryModes.edit;
|
|
127
95
|
};
|
|
128
|
-
|
|
129
|
-
exports.isEditMode = isEditMode;
|
|
130
|
-
|
|
131
|
-
var isAddMode = function isAddMode(state) {
|
|
96
|
+
var isAddMode = exports.isAddMode = function isAddMode(state) {
|
|
132
97
|
return (0, _get["default"])(state, 'imageGallery.mode') === _Actions.ImageGalleryModes.add;
|
|
133
98
|
};
|
|
134
|
-
|
|
135
|
-
exports.isAddMode = isAddMode;
|
|
136
|
-
|
|
137
|
-
var isImageCompatible = function isImageCompatible(state, imageData) {
|
|
99
|
+
var isImageCompatible = exports.isImageCompatible = function isImageCompatible(state, imageData) {
|
|
138
100
|
return (0, _Selectors2.areHashesCompatible)(imageData.compatibilityInfoHash, (0, _Selectors2.getCurrentCompatibilityInfoHash)(state));
|
|
139
101
|
};
|
|
140
|
-
|
|
141
|
-
exports.isImageCompatible = isImageCompatible;
|
|
142
|
-
|
|
143
|
-
var isImageReadyToBeAdded = function isImageReadyToBeAdded(state, imageData) {
|
|
102
|
+
var isImageReadyToBeAdded = exports.isImageReadyToBeAdded = function isImageReadyToBeAdded(state, imageData) {
|
|
144
103
|
return Boolean(imageData && isAddMode(state) && isImageCompatible(state, imageData) && getImageUsageInfo(state, imageData.identifier).count > 0 // make sure it's already added (add it one more time)
|
|
145
104
|
);
|
|
146
105
|
};
|
|
147
106
|
|
|
148
|
-
exports.
|
|
149
|
-
|
|
150
|
-
var isColorMappingCompatible = function isColorMappingCompatible(colorPalettes, vectorizeColorsMap) {
|
|
107
|
+
var isColorMappingCompatible = exports.isColorMappingCompatible = function isColorMappingCompatible(colorPalettes, vectorizeColorsMap) {
|
|
151
108
|
if (!colorPalettes) {
|
|
152
109
|
return false;
|
|
153
110
|
}
|
|
154
|
-
|
|
155
111
|
var colors = Object.values(vectorizeColorsMap);
|
|
156
112
|
return !colors.length || !colors.map(function (_ref5) {
|
|
157
113
|
var identifier = _ref5.identifier;
|
|
@@ -162,12 +118,8 @@ var isColorMappingCompatible = function isColorMappingCompatible(colorPalettes,
|
|
|
162
118
|
});
|
|
163
119
|
});
|
|
164
120
|
};
|
|
165
|
-
|
|
166
|
-
exports.isColorMappingCompatible = isColorMappingCompatible;
|
|
167
|
-
|
|
168
|
-
var showVectorizeImageQuality = function showVectorizeImageQuality(imageToAnalyse) {
|
|
121
|
+
var showVectorizeImageQuality = exports.showVectorizeImageQuality = function showVectorizeImageQuality(imageToAnalyse) {
|
|
169
122
|
var minimumPixelAmount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
170
|
-
|
|
171
123
|
if (imageToAnalyse) {
|
|
172
124
|
var pixelsInTheImage = (0, _get["default"])(imageToAnalyse, 'original.width', 0) * (0, _get["default"])(imageToAnalyse, 'original.height', 0);
|
|
173
125
|
var vectorFormats = ['ai', 'pdf', 'svg', 'eps', 'ps', 'ept'];
|
|
@@ -175,30 +127,20 @@ var showVectorizeImageQuality = function showVectorizeImageQuality(imageToAnalys
|
|
|
175
127
|
var pixelsOfReference = minimumPixelAmount || (0, _configuration.getConf)('vectorizeImageQuality');
|
|
176
128
|
return !hasVectorFormat && pixelsInTheImage < pixelsOfReference;
|
|
177
129
|
}
|
|
178
|
-
|
|
179
130
|
return false;
|
|
180
131
|
};
|
|
181
|
-
|
|
182
|
-
exports.showVectorizeImageQuality = showVectorizeImageQuality;
|
|
183
|
-
|
|
184
|
-
var isHardModified = function isHardModified(originalImageData, newImageData) {
|
|
132
|
+
var isHardModified = exports.isHardModified = function isHardModified(originalImageData, newImageData) {
|
|
185
133
|
return ['operations', 'compatibilityInfoHash'].some(function (prop) {
|
|
186
134
|
return !(0, _isEqual["default"])(originalImageData[prop], newImageData[prop]);
|
|
187
135
|
});
|
|
188
136
|
};
|
|
189
|
-
|
|
190
|
-
exports.isHardModified = isHardModified;
|
|
191
|
-
|
|
192
|
-
var isColorPreviewCompatible = function isColorPreviewCompatible(state, image, designProductionMethodIdentifier) {
|
|
137
|
+
var isColorPreviewCompatible = exports.isColorPreviewCompatible = function isColorPreviewCompatible(state, image, designProductionMethodIdentifier) {
|
|
193
138
|
if (!image) {
|
|
194
139
|
image = state.imageGallery.selectedImage;
|
|
195
140
|
}
|
|
196
|
-
|
|
197
141
|
var designProductionMethod = designProductionMethodIdentifier ? (0, _Selectors2.getDesignProductionMethodByIdentifier)(state, designProductionMethodIdentifier) : (0, _Selectors2.getSelectedDesignProductionMethod)(state);
|
|
198
142
|
var colorPreviewRequired = (0, _Selectors2.designProductionMethodHasEmbroideryVisualizationEffect)(designProductionMethod) || (0, _Selectors2.isVectorizedLogoMandatory)(designProductionMethod);
|
|
199
|
-
var displayColorPreview = image && (!!image.gallery || !!image.displayColorPreview);
|
|
200
|
-
|
|
143
|
+
var displayColorPreview = image && (!!image.gallery || !!image.displayColorPreview);
|
|
144
|
+
// do not let the user to add a raster image if the production method is embroidery
|
|
201
145
|
return !colorPreviewRequired || displayColorPreview || false;
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
exports.isColorPreviewCompatible = isColorPreviewCompatible;
|
|
146
|
+
};
|