@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.
Files changed (526) hide show
  1. package/App/Constant.js +2 -3
  2. package/App/Error/DevelopmentErrorPage/index.js +4 -19
  3. package/App/Error/ErrorBoundary.js +13 -43
  4. package/App/Error/ProductionErrorPage/index.js +2 -11
  5. package/App/Error/ProductionErrorPage/index.story.js +0 -4
  6. package/App/Frame.js +10 -43
  7. package/App/Modules/Creator/Components/ConfigurationvariantItem/index.js +15 -58
  8. package/App/Modules/Creator/Components/ConfigurationvariantSelection/index.js +20 -60
  9. package/App/Modules/Creator/Components/CustomTitleEditor/index.js +15 -64
  10. package/App/Modules/Creator/Components/ExternalVisualization/index.js +19 -47
  11. package/App/Modules/Creator/Components/FastConfiguration/SelectableRow.js +10 -37
  12. package/App/Modules/Creator/Components/FastConfiguration/index.js +37 -101
  13. package/App/Modules/Creator/Components/FastConfigurationRow/index.js +12 -38
  14. package/App/Modules/Creator/Components/FastConfigurationSelect/index.js +29 -85
  15. package/App/Modules/Creator/Components/FormattedNumber/index.js +1 -17
  16. package/App/Modules/Creator/Components/FormattedPrice/index.js +1 -19
  17. package/App/Modules/Creator/Components/FullScreenView/FullScreenView.js +17 -36
  18. package/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +24 -61
  19. package/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +24 -60
  20. package/App/Modules/Creator/Components/Incompatibility/RuleComponent.js +12 -45
  21. package/App/Modules/Creator/Components/Incompatibility/index.js +28 -89
  22. package/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +14 -53
  23. package/App/Modules/Creator/Components/LoginForm/index.js +14 -52
  24. package/App/Modules/Creator/Components/Option/index.js +53 -155
  25. package/App/Modules/Creator/Components/Option/index.story.js +6 -17
  26. package/App/Modules/Creator/Components/OptionAmount/index.js +33 -74
  27. package/App/Modules/Creator/Components/OptionGroup/index.js +10 -23
  28. package/App/Modules/Creator/Components/Optiondetail/ZoomImage/index.js +26 -68
  29. package/App/Modules/Creator/Components/Optiondetail/index.js +44 -129
  30. package/App/Modules/Creator/Components/Optiondetail/index.story.js +11 -72
  31. package/App/Modules/Creator/Components/Optiondetail/index.test.mocks.js +56 -0
  32. package/App/Modules/Creator/Components/OptionsList/index.js +31 -81
  33. package/App/Modules/Creator/Components/Price/index.js +12 -40
  34. package/App/Modules/Creator/Components/ProductPart/index.js +14 -46
  35. package/App/Modules/Creator/Components/ProductPart/index.story.js +6 -17
  36. package/App/Modules/Creator/Components/ProductPartsList/index.js +25 -68
  37. package/App/Modules/Creator/Components/ProductPartsList/index.story.js +6 -21
  38. package/App/Modules/Creator/Components/SavedConfiguration/index.js +13 -45
  39. package/App/Modules/Creator/Components/ShareConfiguration/index.js +31 -90
  40. package/App/Modules/Creator/Components/StockInformation/index.js +13 -44
  41. package/App/Modules/Creator/Components/StoreConfigurationForm/index.js +15 -52
  42. package/App/Modules/Creator/Components/Tools/index.js +11 -45
  43. package/App/Modules/Creator/Components/ValidationResult/index.js +16 -62
  44. package/App/Modules/Creator/Components/index.js +2 -29
  45. package/App/Modules/Creator/Containers/AmountPrice/index.js +3 -12
  46. package/App/Modules/Creator/Containers/ConfigurationvariantSelection/index.js +5 -19
  47. package/App/Modules/Creator/Containers/CustomTitleEditor/index.js +4 -19
  48. package/App/Modules/Creator/Containers/FastConfiguration/index.js +6 -20
  49. package/App/Modules/Creator/Containers/FormattedPrice/index.js +4 -13
  50. package/App/Modules/Creator/Containers/Incompatibility/index.js +2 -12
  51. package/App/Modules/Creator/Containers/InvalidConfigurationNotice/index.js +8 -31
  52. package/App/Modules/Creator/Containers/LoadingOverlay/index.js +2 -9
  53. package/App/Modules/Creator/Containers/Optiondetail/index.js +7 -18
  54. package/App/Modules/Creator/Containers/OptionsList/index.js +3 -15
  55. package/App/Modules/Creator/Containers/ProductPart/index.js +1 -9
  56. package/App/Modules/Creator/Containers/ProductPartsList/index.js +3 -16
  57. package/App/Modules/Creator/Containers/SavedConfigurationContainer/index.js +1 -8
  58. package/App/Modules/Creator/Containers/ShareConfiguration/index.js +2 -10
  59. package/App/Modules/Creator/Containers/StockInformation/index.js +2 -10
  60. package/App/Modules/Creator/Containers/Tools/index.js +1 -10
  61. package/App/Modules/Creator/Containers/ValidationResult/index.js +2 -10
  62. package/App/Modules/Creator/Containers/index.js +42 -64
  63. package/App/Modules/Creator/CreatorScreen.js +45 -121
  64. package/App/Modules/Creator/Layouts/DefaultLayout.js +21 -50
  65. package/App/Modules/Designer/Components/AddGalleryImage/index.js +31 -92
  66. package/App/Modules/Designer/Components/AddGalleryImage/index.story.js +9 -22
  67. package/App/Modules/Designer/Components/AddGalleryImage/index.test.js +13 -35
  68. package/App/Modules/Designer/Components/AddVisualElement/index.js +30 -86
  69. package/App/Modules/Designer/Components/AddVisualElement/index.story.js +0 -5
  70. package/App/Modules/Designer/Components/AddVisualElement/index.test.js +12 -15
  71. package/App/Modules/Designer/Components/CloseDesignEditor/index.js +18 -51
  72. package/App/Modules/Designer/Components/CloseGraphicsEditorButton/index.js +7 -17
  73. package/App/Modules/Designer/Components/ColorPalettes/ColorPalettesSearch.js +20 -57
  74. package/App/Modules/Designer/Components/ColorPalettes/index.js +62 -178
  75. package/App/Modules/Designer/Components/ColorPalettes/index.story.js +0 -8
  76. package/App/Modules/Designer/Components/ColorPalettes/index.test.js +7 -11
  77. package/App/Modules/Designer/Components/DesignAreaControlbox/index.js +35 -108
  78. package/App/Modules/Designer/Components/DesignAreaControlbox/index.story.js +0 -8
  79. package/App/Modules/Designer/Components/DesignAreaControlbox/index.test.js +15 -23
  80. package/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +18 -51
  81. package/App/Modules/Designer/Components/DesignerSelectionToolbox/DesignerSelectionToolbox.js +53 -150
  82. package/App/Modules/Designer/Components/DesignerSelectionToolbox/fontItemUtils.js +10 -20
  83. package/App/Modules/Designer/Components/Dialog/index.js +21 -63
  84. package/App/Modules/Designer/Components/EditDesignButton/index.js +20 -43
  85. package/App/Modules/Designer/Components/FeedbackNotice/index.js +17 -53
  86. package/App/Modules/Designer/Components/FeedbackNotice/index.test.js +0 -4
  87. package/App/Modules/Designer/Components/FullScreenView/FullScreenView.js +6 -14
  88. package/App/Modules/Designer/Components/ImageColorPicker/ImageColorPicker.dev.js +5 -14
  89. package/App/Modules/Designer/Components/ImageColorPicker/ImageColorPicker.js +42 -137
  90. package/App/Modules/Designer/Components/ImageColorize/index.js +54 -177
  91. package/App/Modules/Designer/Components/ImageColorize/index.story.js +2 -6
  92. package/App/Modules/Designer/Components/ImageControlbox/index.js +27 -90
  93. package/App/Modules/Designer/Components/ImageEditDialog/ImageThumbnail.js +26 -71
  94. package/App/Modules/Designer/Components/ImageEditDialog/ImageUpload.js +138 -170
  95. package/App/Modules/Designer/Components/ImageEditDialog/index.js +55 -168
  96. package/App/Modules/Designer/Components/ImageLibraryFilter/index.js +20 -61
  97. package/App/Modules/Designer/Components/ImageLibraryThumbnail/index.js +24 -66
  98. package/App/Modules/Designer/Components/ObjectTools/index.js +18 -56
  99. package/App/Modules/Designer/Components/Select/index.js +21 -65
  100. package/App/Modules/Designer/Components/TextControlbox/TextFormatIcon.js +5 -20
  101. package/App/Modules/Designer/Components/TextControlbox/index.js +58 -176
  102. package/App/Modules/Designer/Components/TextControlbox/index.story.js +0 -10
  103. package/App/Modules/Designer/Components/TextControlbox/index.test.js +34 -41
  104. package/App/Modules/Designer/Containers/AddGalleryImage.js +8 -24
  105. package/App/Modules/Designer/Containers/AddVisualElement.js +28 -87
  106. package/App/Modules/Designer/Containers/CloseDesignEditor.js +1 -10
  107. package/App/Modules/Designer/Containers/CloseGraphicsEditorButton.js +1 -10
  108. package/App/Modules/Designer/Containers/ColorPalettes.js +22 -61
  109. package/App/Modules/Designer/Containers/DesignAreaControlbox.js +5 -17
  110. package/App/Modules/Designer/Containers/Designer.js +1 -10
  111. package/App/Modules/Designer/Containers/DesignerSelectionToolbox.js +7 -30
  112. package/App/Modules/Designer/Containers/EditDesignButton.js +1 -11
  113. package/App/Modules/Designer/Containers/ImageEditDialog.js +400 -658
  114. package/App/Modules/Designer/Designer.js +28 -84
  115. package/App/Modules/Designer/DesignerScreen.js +45 -100
  116. package/App/Modules/Designer/DesignerUI.js +31 -87
  117. package/App/Modules/Designer/Layouts/DefaultLayout.js +20 -45
  118. package/App/Modules/Designer/Layouts/Mobile/TwoSideBottomBar.js +4 -16
  119. package/App/Modules/Designer/Layouts/PopupAreaProvider.js +20 -67
  120. package/App/Modules/Designer/MultilayerComponents/DesignerClickAwayListener.js +5 -23
  121. package/App/Modules/Designer/MultilayerComponents/InlineToolboxPortal.js +19 -52
  122. package/App/Modules/Designer/MultilayerComponents/StandardToolboxPortal.js +9 -25
  123. package/App/Modules/Designer/Utils/FontFaceRepository.js +8 -30
  124. package/App/Modules/Designer/Utils/ImageEditUtils.js +14 -38
  125. package/App/Modules/Designer/Utils/SvgFixers.js +8 -26
  126. package/App/Modules/Designer/Utils/Transformers.js +54 -112
  127. package/App/Modules/Designer/setupDesigner.js +50 -72
  128. package/App/Modules/Designer/withActiveCanvas.js +22 -70
  129. package/App/Modules/Visualization/AlignTargetContainer.js +8 -19
  130. package/App/Modules/Visualization/CreatorAlignTarget.js +9 -20
  131. package/App/Modules/Visualization/DefaultVisualizationProvider.js +18 -50
  132. package/App/Modules/Visualization/DesignerAlignTarget.js +7 -13
  133. package/App/Modules/Visualization/Utils/getFirstDataURLFromScreenshotsObj.js +0 -3
  134. package/App/Reducers/Actions.js +81 -145
  135. package/App/Reducers/ConfigurationMode/Actions.js +4 -9
  136. package/App/Reducers/ConfigurationMode/Reducer.js +6 -23
  137. package/App/Reducers/ConfigurationMode/Selectors.js +22 -41
  138. package/App/Reducers/Configurator/Actions.js +386 -760
  139. package/App/Reducers/Configurator/AttributeSelectors.js +5 -17
  140. package/App/Reducers/Configurator/Modifiers.js +8 -15
  141. package/App/Reducers/Configurator/Reducer.js +107 -202
  142. package/App/Reducers/Configurator/Selectors.js +46 -119
  143. package/App/Reducers/Confirm/Actions.js +28 -49
  144. package/App/Reducers/Confirm/Reducer.js +1 -9
  145. package/App/Reducers/DesignArea/Actions.js +8 -29
  146. package/App/Reducers/DesignArea/DesignElementSelectors.js +18 -41
  147. package/App/Reducers/DesignArea/MaskSelectors.js +12 -35
  148. package/App/Reducers/DesignArea/Reducer.js +8 -40
  149. package/App/Reducers/DesignArea/Selectors.js +148 -413
  150. package/App/Reducers/DesignArea/Transformers.js +22 -87
  151. package/App/Reducers/DesignData/Actions.js +31 -93
  152. package/App/Reducers/DesignData/Modifiers.js +34 -114
  153. package/App/Reducers/DesignData/Reducer.js +9 -38
  154. package/App/Reducers/DesignData/Selectors.js +17 -50
  155. package/App/Reducers/DesignData/Transformers.js +2 -6
  156. package/App/Reducers/DesignView/Actions.js +3 -7
  157. package/App/Reducers/DesignView/Reducer.js +13 -47
  158. package/App/Reducers/DesignView/Selectors.js +17 -49
  159. package/App/Reducers/DesignView/Transformers.js +0 -3
  160. package/App/Reducers/Device/Actions.js +3 -7
  161. package/App/Reducers/Device/Reducer.js +9 -16
  162. package/App/Reducers/Fonts/Actions.js +12 -45
  163. package/App/Reducers/Fonts/Reducer.js +2 -11
  164. package/App/Reducers/Fonts/Selectors.js +9 -25
  165. package/App/Reducers/GeneralActions.js +3 -7
  166. package/App/Reducers/ImageGallery/Actions.js +97 -189
  167. package/App/Reducers/ImageGallery/Modifiers.js +13 -24
  168. package/App/Reducers/ImageGallery/Reducer.js +29 -98
  169. package/App/Reducers/ImageGallery/Selectors.js +21 -79
  170. package/App/Reducers/Reducer.js +10 -26
  171. package/App/Reducers/UI/Actions.js +73 -113
  172. package/App/Reducers/UI/Reducer.js +17 -26
  173. package/App/Reducers/UI/Selectors.js +3 -12
  174. package/App/Reducers.js +7 -21
  175. package/App/Routing.js +30 -107
  176. package/App/Screens/Configurator/CalculationWidgetScreen.js +10 -39
  177. package/App/Screens/Configurator/Components/AmountSelection/index.js +25 -77
  178. package/App/Screens/Configurator/Components/AmountSelection/index.story.js +0 -8
  179. package/App/Screens/Configurator/Components/CalculationWidget/index.js +53 -154
  180. package/App/Screens/Configurator/Components/CalculationWidget/index.story.js +6 -19
  181. package/App/Screens/Configurator/Components/CalculationWidget/index.test.js +39 -38
  182. package/App/Screens/Configurator/Components/ConfigurationModeSwitch/ConfigurationModeSwitch.js +7 -30
  183. package/App/Screens/Configurator/Components/ConfigurationModeSwitch/index.js +0 -2
  184. package/App/Screens/Configurator/Components/Confirm/index.js +13 -50
  185. package/App/Screens/Configurator/Components/Error/index.js +11 -48
  186. package/App/Screens/Configurator/Components/FallbackVisualization/FallbackVisualization.js +13 -25
  187. package/App/Screens/Configurator/Components/FullScreenView/index.js +37 -116
  188. package/App/Screens/Configurator/Components/FullScreenView/index.test.js +1 -4
  189. package/App/Screens/Configurator/Components/ImageLoader/ImageLoader.js +11 -42
  190. package/App/Screens/Configurator/Components/ItemTile/ItemTile.js +89 -33
  191. package/App/Screens/Configurator/Components/LandscapeInformation/index.js +3 -19
  192. package/App/Screens/Configurator/Components/NoVisualization/NoVisualization.js +3 -11
  193. package/App/Screens/Configurator/Components/PreviewPortal/index.js +29 -81
  194. package/App/Screens/Configurator/Components/Thumbnail/index.js +36 -102
  195. package/App/Screens/Configurator/Components/Thumbnail/index.test.js +0 -4
  196. package/App/Screens/Configurator/Components/TotalPrice/TotalPrice.js +9 -24
  197. package/App/Screens/Configurator/Containers/AmountPrice.js +12 -36
  198. package/App/Screens/Configurator/Containers/CalculationWidget.js +24 -85
  199. package/App/Screens/Configurator/Containers/ConfigurationModeSwitch.js +22 -43
  200. package/App/Screens/Configurator/Containers/Confirm.js +1 -10
  201. package/App/Screens/Configurator/Containers/FallbackVisualization.js +1 -11
  202. package/App/Screens/Configurator/Containers/FullScreenView.js +1 -14
  203. package/App/Screens/Configurator/Containers/Thumbnail.js +1 -13
  204. package/App/Screens/Configurator/Containers/Visualization.js +1 -5
  205. package/App/Screens/Configurator/DynamicComponents.js +8 -22
  206. package/App/Screens/Configurator/Screen.js +31 -70
  207. package/App/Screens/Configurator/ScreenPropTypes.js +2 -6
  208. package/App/Screens/Configurator/ThemeProvider.js +8 -42
  209. package/App/Screens/DesignerProductPreview/Constants.js +4 -7
  210. package/App/Screens/DesignerProductPreview/DesignerProductPreviewManager.js +204 -289
  211. package/App/Screens/DesignerProductPreview/Screen.js +58 -139
  212. package/App/Screens/ItemOverview.js +156 -191
  213. package/App/Screens.js +12 -20
  214. package/App/ServiceLocator.js +26 -51
  215. package/App/Services/AdminareaCommunicationService.js +33 -69
  216. package/App/Services/AnalyticsService.js +13 -40
  217. package/App/Services/ConfiguratorService.js +381 -567
  218. package/App/Services/DesignDataService.js +1448 -2001
  219. package/App/Services/DesignerService.js +290 -350
  220. package/App/Services/InteractionService.js +349 -502
  221. package/App/Services/UIService.js +12 -39
  222. package/App/Services/VisualizationService.js +246 -336
  223. package/App/Shared/Components/AcceptDesign/index.js +27 -70
  224. package/App/Shared/Components/AcceptPrivacy/index.js +21 -58
  225. package/App/Shared/Components/AddToBasket/index.js +31 -81
  226. package/App/Shared/Components/AddToBasket/index.story.js +0 -9
  227. package/App/Shared/Components/AlertDialog/index.js +15 -57
  228. package/App/Shared/Components/AmountInput/index.js +34 -107
  229. package/App/Shared/Components/AmountInput/index.story.js +0 -6
  230. package/App/Shared/Components/AmountPrice/index.js +220 -382
  231. package/App/Shared/Components/AmountPrice/index.story.js +1 -10
  232. package/App/Shared/Components/AmountPrice/index.test.js +6 -12
  233. package/App/Shared/Components/Analytics/AnalyticsWrapper.js +9 -21
  234. package/App/Shared/Components/BulkNames/index.js +28 -92
  235. package/App/Shared/Components/CallToAction/index.js +18 -42
  236. package/App/Shared/Components/ConfigurationOverview/index.js +14 -47
  237. package/App/Shared/Components/Header/Header.js +18 -46
  238. package/App/Shared/Components/Header/index.js +0 -2
  239. package/App/Shared/Components/Header/index.story.js +0 -13
  240. package/App/Shared/Components/InformationTag/InformationTag.js +20 -55
  241. package/App/Shared/Components/LicenseNotice/LicenseNotice.js +20 -54
  242. package/App/Shared/Components/LicenseNotice/index.js +0 -2
  243. package/App/Shared/Components/LoadConfiguration/index.js +47 -82
  244. package/App/Shared/Components/MessageBox/index.js +2 -19
  245. package/App/Shared/Components/MessageBox/index.story.js +0 -7
  246. package/App/Shared/Components/Notification/index.js +18 -53
  247. package/App/Shared/Components/Notification/index.story.js +0 -4
  248. package/App/Shared/Components/PdfDownload/index.js +19 -59
  249. package/App/Shared/Components/PlusMinusInput/index.js +13 -37
  250. package/App/Shared/Components/PriceList/index.js +27 -78
  251. package/App/Shared/Components/PriceList/index.story.js +6 -15
  252. package/App/Shared/Components/PriceOverview/index.js +29 -74
  253. package/App/Shared/Components/PriceOverview/index.story.js +1 -18
  254. package/App/Shared/Components/ProductVariant/Image.js +13 -35
  255. package/App/Shared/Components/ProductVariant/index.js +34 -123
  256. package/App/Shared/Components/ProductVariant/index.story.js +9 -22
  257. package/App/Shared/Components/Progress/Progress.js +6 -15
  258. package/App/Shared/Components/ReceiveOfferForm/index.js +26 -80
  259. package/App/Shared/Components/ReceiveOfferForm/index.story.js +0 -6
  260. package/App/Shared/Components/ReceiveOfferForm/index.test.js +1 -6
  261. package/App/Shared/Components/SaveConfiguration/index.js +26 -83
  262. package/App/Shared/Components/SendEmail/index.js +8 -30
  263. package/App/Shared/Components/Stepper/index.js +19 -56
  264. package/App/Shared/Components/Stepper/index.story.js +0 -5
  265. package/App/Shared/Components/ToolbarList/index.js +23 -69
  266. package/App/Shared/Components/ToolbarList/index.story.js +0 -4
  267. package/App/Shared/Components/VariantChooser/index.js +25 -68
  268. package/App/Shared/Components/VariantChooser/index.story.js +0 -13
  269. package/App/Shared/Containers/AlertMessages.js +1 -11
  270. package/App/Shared/Containers/AmountPrice/AmountPriceAdminareaWrapper.js +4 -17
  271. package/App/Shared/Containers/AmountPrice/index.js +29 -74
  272. package/App/Shared/Containers/BulkNames.js +26 -117
  273. package/App/Shared/Containers/Error.js +1 -11
  274. package/App/Shared/Containers/GlobalLoader.js +1 -9
  275. package/App/Shared/Containers/Header/index.js +22 -57
  276. package/App/Shared/Containers/LicenseNotice/LicenseNotice.js +2 -9
  277. package/App/Shared/Containers/LicenseNotice/index.js +0 -2
  278. package/App/Shared/Containers/LoadConfiguration/LoadConfiguration.js +36 -79
  279. package/App/Shared/Containers/LoadConfiguration/index.js +0 -2
  280. package/App/Shared/Containers/PdfDownload/index.js +2 -11
  281. package/App/Shared/Containers/ProductVariant/ProductVariant.js +59 -144
  282. package/App/Shared/Containers/ProductVariant/index.js +0 -2
  283. package/App/Shared/Containers/SaveConfiguration.js +3 -14
  284. package/App/Shared/Containers/SendEmail/SendEmail.js +3 -15
  285. package/App/Shared/Containers/SendEmail/index.js +0 -2
  286. package/App/Shared/Providers/DefaultCanvasProvider.js +5 -25
  287. package/App/Storage.js +3 -7
  288. package/App/Store.js +17 -38
  289. package/App/Translations.js +29 -43
  290. package/App/Utils/Request/lazyFetch.js +29 -45
  291. package/App/Utils/Request/pathParams.js +2 -7
  292. package/App/Utils/createMessageInterface.js +10 -21
  293. package/App/Utils/customClassName.js +0 -2
  294. package/App/Utils/getContrastText.js +5 -7
  295. package/App/Utils/getImageUrl.js +0 -8
  296. package/App/configuration.js +74 -104
  297. package/App/index.js +7 -29
  298. package/App/initServices.js +9 -32
  299. package/App/setup.js +2 -6
  300. package/Framework/Api.js +19 -41
  301. package/Framework/ComponentContainer.js +28 -76
  302. package/Framework/Components/Carousel/index.js +40 -104
  303. package/Framework/Components/Dialog/index.js +101 -237
  304. package/Framework/Components/DialogSelect/index.js +38 -132
  305. package/Framework/Components/Input/index.js +16 -58
  306. package/Framework/Components/LoadingOverlay/index.js +1 -12
  307. package/Framework/Components/Markdown/index.js +5 -26
  308. package/Framework/Components/Mobile/index.js +5 -13
  309. package/Framework/CustomError.js +13 -29
  310. package/Framework/Helpers/TransitionDetect.js +10 -29
  311. package/Framework/Helpers/isLandscapeMobile.js +0 -3
  312. package/Framework/Helpers/isMobileDevice.js +3 -8
  313. package/Framework/Helpers/isMobileSize.js +1 -4
  314. package/Framework/Services/AbstractAdminareaCommunicationService.js +8 -15
  315. package/Framework/Services/AbstractAsyncService.js +7 -14
  316. package/Framework/Services/AbstractConfiguratorService.js +9 -15
  317. package/Framework/Services/AbstractInteractionService.js +7 -14
  318. package/Framework/Services/AbstractStoreService.js +9 -15
  319. package/Framework/Services/AbstractUIService.js +7 -14
  320. package/Framework/Services/AbstractVisualizationService.js +7 -14
  321. package/Framework/Services/AsyncService.js +11 -33
  322. package/Framework/Services/StoreService.js +43 -92
  323. package/Framework/bindDecorator.js +24 -54
  324. package/Framework/i18n.js +57 -142
  325. package/Resources/Icons/MaterialUI/Icons/AddCircle.js +1 -5
  326. package/Resources/Icons/MaterialUI/Icons/RemoveCircle.js +1 -5
  327. package/Shared/Components/CustomDialog.js +21 -36
  328. package/Shared/Components/CustomDialogSelect.js +17 -47
  329. package/Shared/Components/MainButton.js +14 -33
  330. package/Shared/ErrorTypes/DeferredError.js +13 -31
  331. package/Shared/HOCs/ResizeDetect/ResizeDetect.dev.js +9 -18
  332. package/Shared/HOCs/ResizeDetect/ResizeDetect.js +28 -87
  333. package/Shared/HOCs/getDisplayName.js +0 -1
  334. package/Shared/HOCs/withFixedChangeHandler.js +11 -25
  335. package/Shared/PropTypes/ReactComponent.js +1 -5
  336. package/Shared/Styles/absoluteCenter.js +2 -5
  337. package/Utils/Array/isIdentical.js +3 -12
  338. package/Utils/Async/AsyncManager.js +51 -75
  339. package/Utils/Async/Deferred.js +12 -40
  340. package/Utils/Async/ObjectLock.js +3 -7
  341. package/Utils/Decorators/Observable.js +17 -34
  342. package/Utils/Dev/HOCs/withFilePicker.js +13 -41
  343. package/Utils/Dev/isDev.js +0 -2
  344. package/Utils/Events/pointerEvent.js +14 -47
  345. package/Utils/Events/preventEventDoubling.js +2 -7
  346. package/Utils/Function/cached.js +1 -9
  347. package/Utils/Function/createDebounceManager.js +3 -18
  348. package/Utils/Function/createSelector.js +7 -18
  349. package/Utils/Function/memoize.js +3 -12
  350. package/Utils/Function/sendMessage.js +3 -8
  351. package/Utils/Helper/createSelectionRangeMemo.js +4 -12
  352. package/Utils/Immutable/set.js +12 -35
  353. package/Utils/Math/conversions.js +2 -5
  354. package/Utils/Math/isPositiveNumber.js +2 -5
  355. package/Utils/Redux/createActionWithGlobalState.js +8 -11
  356. package/Utils/Styles/combineMediaQueries.js +2 -6
  357. package/Utils/Styles/createCheckerBoardBackground.js +5 -6
  358. package/Utils/Test/CallOrderChecker.js +0 -3
  359. package/Utils/Test/createStoreProvider.js +1 -7
  360. package/Utils/Test/formDataToJSON.js +0 -1
  361. package/Utils/Test/mountWithState.js +3 -9
  362. package/index.js +2 -2
  363. package/package.json +36 -33
  364. package/public/translations/de_DE.json +3 -27
  365. package/public/translations/en_GB.json +2 -26
  366. package/scripts/getDefaultWebpackConfig.js +21 -13
  367. package/src/App/Error/ProductionErrorPage/index.js +1 -1
  368. package/src/App/Modules/Creator/Components/ConfigurationvariantItem/index.js +3 -4
  369. package/src/App/Modules/Creator/Components/ConfigurationvariantSelection/index.js +2 -1
  370. package/src/App/Modules/Creator/Components/FastConfiguration/SelectableRow.js +1 -1
  371. package/src/App/Modules/Creator/Components/FastConfiguration/index.js +6 -5
  372. package/src/App/Modules/Creator/Components/FastConfigurationSelect/index.js +8 -6
  373. package/src/App/Modules/Creator/Components/FullScreenView/FullScreenView.js +3 -1
  374. package/src/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +2 -2
  375. package/src/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +2 -2
  376. package/src/App/Modules/Creator/Components/Incompatibility/index.js +2 -2
  377. package/src/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +1 -1
  378. package/src/App/Modules/Creator/Components/Option/__snapshots__/index.test.js.snap +0 -13
  379. package/src/App/Modules/Creator/Components/Option/index.js +9 -6
  380. package/src/App/Modules/Creator/Components/Option/index.test.js +1 -1
  381. package/src/App/Modules/Creator/Components/OptionAmount/index.js +2 -1
  382. package/src/App/Modules/Creator/Components/OptionAmount/index.test.js +1 -1
  383. package/src/App/Modules/Creator/Components/Optiondetail/ZoomImage/index.js +1 -1
  384. package/src/App/Modules/Creator/Components/Optiondetail/index.js +9 -7
  385. package/src/App/Modules/Creator/Components/Optiondetail/index.story.js +1 -48
  386. package/src/App/Modules/Creator/Components/Optiondetail/index.test.js +1 -1
  387. package/src/App/Modules/Creator/Components/Optiondetail/index.test.mocks.js +49 -0
  388. package/src/App/Modules/Creator/Components/OptionsList/index.js +3 -2
  389. package/src/App/Modules/Creator/Components/ProductPart/index.test.js +1 -1
  390. package/src/App/Modules/Creator/Components/ProductPartsList/index.js +1 -1
  391. package/src/App/Modules/Creator/Components/SavedConfiguration/index.js +3 -3
  392. package/src/App/Modules/Creator/Components/StoreConfigurationForm/index.js +2 -2
  393. package/src/App/Modules/Creator/Containers/CustomTitleEditor/index.js +1 -1
  394. package/src/App/Modules/Creator/Containers/FastConfiguration/index.js +1 -1
  395. package/src/App/Modules/Creator/Containers/FormattedPrice/index.js +1 -1
  396. package/src/App/Modules/Creator/Containers/InvalidConfigurationNotice/index.js +1 -1
  397. package/src/App/Modules/Creator/Containers/Optiondetail/index.js +1 -1
  398. package/src/App/Modules/Designer/Components/AddGalleryImage/__snapshots__/index.test.jsx.snap +0 -8
  399. package/src/App/Modules/Designer/Components/AddGalleryImage/index.js +4 -4
  400. package/src/App/Modules/Designer/Components/AddGalleryImage/index.test.jsx +0 -27
  401. package/src/App/Modules/Designer/Components/AddVisualElement/index.js +6 -6
  402. package/src/App/Modules/Designer/Components/AddVisualElement/index.test.jsx +3 -2
  403. package/src/App/Modules/Designer/Components/CloseDesignEditor/index.js +3 -3
  404. package/src/App/Modules/Designer/Components/ColorPalettes/ColorPalettesSearch.js +6 -6
  405. package/src/App/Modules/Designer/Components/ColorPalettes/index.js +14 -14
  406. package/src/App/Modules/Designer/Components/ColorPalettes/index.test.jsx +1 -1
  407. package/src/App/Modules/Designer/Components/DesignAreaControlbox/index.js +8 -8
  408. package/src/App/Modules/Designer/Components/DesignAreaControlbox/index.test.jsx +1 -1
  409. package/src/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +5 -5
  410. package/src/App/Modules/Designer/Components/DesignerSelectionToolbox/DesignerSelectionToolbox.js +2 -2
  411. package/src/App/Modules/Designer/Components/Dialog/index.js +1 -1
  412. package/src/App/Modules/Designer/Components/EditDesignButton/index.js +3 -2
  413. package/src/App/Modules/Designer/Components/FeedbackNotice/index.js +3 -3
  414. package/src/App/Modules/Designer/Components/ImageColorize/index.js +1 -1
  415. package/src/App/Modules/Designer/Components/ImageControlbox/index.js +6 -6
  416. package/src/App/Modules/Designer/Components/ImageEditDialog/ImageUpload.js +32 -6
  417. package/src/App/Modules/Designer/Components/ImageEditDialog/index.js +16 -12
  418. package/src/App/Modules/Designer/Components/ImageLibraryFilter/index.js +6 -6
  419. package/src/App/Modules/Designer/Components/ImageLibraryThumbnail/index.js +11 -7
  420. package/src/App/Modules/Designer/Components/ObjectTools/index.js +2 -2
  421. package/src/App/Modules/Designer/Components/Select/index.js +3 -3
  422. package/src/App/Modules/Designer/Components/TextControlbox/TextFormatIcon.js +1 -1
  423. package/src/App/Modules/Designer/Components/TextControlbox/index.js +11 -11
  424. package/src/App/Modules/Designer/Components/TextControlbox/index.test.jsx +3 -2
  425. package/src/App/Modules/Designer/Containers/AddGalleryImage.js +1 -1
  426. package/src/App/Modules/Designer/Designer.js +1 -1
  427. package/src/App/Modules/Designer/DesignerUI.js +7 -2
  428. package/src/App/Modules/Designer/Layouts/Mobile/TwoSideBottomBar.js +1 -1
  429. package/src/App/Modules/Designer/Layouts/PopupAreaProvider.js +1 -1
  430. package/src/App/Modules/Designer/MultilayerComponents/DesignerClickAwayListener.js +1 -1
  431. package/src/App/Modules/Designer/MultilayerComponents/InlineToolboxPortal.js +1 -1
  432. package/src/App/Modules/Designer/MultilayerComponents/StandardToolboxPortal.js +1 -1
  433. package/src/App/Modules/Designer/setupDesigner.js +22 -19
  434. package/src/App/Modules/Visualization/AlignTargetContainer.js +1 -1
  435. package/src/App/Modules/Visualization/CreatorAlignTarget.js +1 -1
  436. package/src/App/Modules/Visualization/DefaultVisualizationProvider.js +7 -2
  437. package/src/App/Modules/Visualization/DesignerAlignTarget.js +1 -1
  438. package/src/App/Reducers/Actions.js +5 -5
  439. package/src/App/Reducers/ConfigurationMode/Selectors.js +6 -0
  440. package/src/App/Reducers/Configurator/Actions.js +8 -1
  441. package/src/App/Reducers/Configurator/Reducer.js +27 -21
  442. package/src/App/Reducers/Configurator/Selectors.js +4 -1
  443. package/src/App/Reducers/DesignArea/Selectors.js +10 -0
  444. package/src/App/Reducers/Reducer.js +4 -3
  445. package/src/App/Reducers/UI/Actions.js +15 -1
  446. package/src/App/Reducers/UI/Reducer.js +20 -0
  447. package/src/App/Routing.js +12 -29
  448. package/src/App/Screens/Configurator/CalculationWidgetScreen.js +1 -4
  449. package/src/App/Screens/Configurator/Components/AmountSelection/index.js +4 -4
  450. package/src/App/Screens/Configurator/Components/CalculationWidget/index.js +3 -3
  451. package/src/App/Screens/Configurator/Components/CalculationWidget/index.test.jsx +5 -2
  452. package/src/App/Screens/Configurator/Components/ConfigurationModeSwitch/ConfigurationModeSwitch.js +1 -1
  453. package/src/App/Screens/Configurator/Components/FallbackVisualization/FallbackVisualization.js +1 -1
  454. package/src/App/Screens/Configurator/Components/FullScreenView/index.js +4 -4
  455. package/src/App/Screens/Configurator/Components/ItemTile/ItemTile.js +55 -17
  456. package/src/App/Screens/Configurator/Components/LandscapeInformation/index.js +1 -1
  457. package/src/App/Screens/Configurator/Components/NoVisualization/NoVisualization.js +1 -1
  458. package/src/App/Screens/Configurator/Components/PreviewPortal/index.js +7 -5
  459. package/src/App/Screens/Configurator/Components/Thumbnail/index.js +5 -4
  460. package/src/App/Screens/Configurator/Components/TotalPrice/TotalPrice.js +3 -3
  461. package/src/App/Screens/Configurator/Containers/AmountPrice.js +1 -1
  462. package/src/App/Screens/Configurator/Containers/__tests__/CalculationWidget.test.js +4 -1
  463. package/src/App/Screens/Configurator/Screen.js +13 -5
  464. package/src/App/Screens/Configurator/__tests__/Screen.test.js +6 -0
  465. package/src/App/Screens/DesignerProductPreview/Screen.js +2 -3
  466. package/src/App/Screens/DesignerProductPreview/__tests__/__snapshots__/Screen.test.js.snap +11 -11
  467. package/src/App/Screens/ItemOverview.js +74 -57
  468. package/src/App/Screens.js +1 -1
  469. package/src/App/Services/AnalyticsService.js +2 -1
  470. package/src/App/Services/DesignDataService.js +53 -7
  471. package/src/App/Services/DesignerService.js +22 -13
  472. package/src/App/Services/UIService.js +1 -1
  473. package/src/App/Services/VisualizationService.js +41 -2
  474. package/src/App/Services/__tests__/DesignDataService.test.js +1 -0
  475. package/src/App/Shared/Components/AcceptDesign/index.js +7 -6
  476. package/src/App/Shared/Components/AcceptPrivacy/index.js +4 -3
  477. package/src/App/Shared/Components/AddToBasket/index.js +4 -4
  478. package/src/App/Shared/Components/AmountInput/index.js +1 -1
  479. package/src/App/Shared/Components/AmountPrice/__snapshots__/index.test.jsx.snap +0 -125
  480. package/src/App/Shared/Components/AmountPrice/index.js +40 -17
  481. package/src/App/Shared/Components/AmountPrice/index.test.jsx +1 -1
  482. package/src/App/Shared/Components/Analytics/AnalyticsWrapper.test.js +2 -1
  483. package/src/App/Shared/Components/BulkNames/index.js +3 -3
  484. package/src/App/Shared/Components/CallToAction/__snapshots__/index.test.js.snap +4 -4
  485. package/src/App/Shared/Components/CallToAction/index.js +3 -3
  486. package/src/App/Shared/Components/CallToAction/index.test.js +1 -1
  487. package/src/App/Shared/Components/ConfigurationOverview/index.js +1 -1
  488. package/src/App/Shared/Components/Header/Header.js +3 -3
  489. package/src/App/Shared/Components/InformationTag/InformationTag.js +4 -2
  490. package/src/App/Shared/Components/LicenseNotice/LicenseNotice.js +3 -1
  491. package/src/App/Shared/Components/LoadConfiguration/index.js +27 -13
  492. package/src/App/Shared/Components/Notification/index.js +3 -3
  493. package/src/App/Shared/Components/PdfDownload/index.js +3 -3
  494. package/src/App/Shared/Components/PlusMinusInput/index.js +4 -4
  495. package/src/App/Shared/Components/PriceList/index.js +9 -9
  496. package/src/App/Shared/Components/PriceList/index.test.js +2 -2
  497. package/src/App/Shared/Components/PriceOverview/index.js +4 -4
  498. package/src/App/Shared/Components/PriceOverview/index.story.js +1 -1
  499. package/src/App/Shared/Components/ProductVariant/Image.js +1 -1
  500. package/src/App/Shared/Components/ProductVariant/index.js +5 -5
  501. package/src/App/Shared/Components/Progress/Progress.js +3 -3
  502. package/src/App/Shared/Components/ReceiveOfferForm/index.js +4 -4
  503. package/src/App/Shared/Components/SaveConfiguration/index.js +3 -3
  504. package/src/App/Shared/Components/SendEmail/index.js +3 -3
  505. package/src/App/Shared/Components/Stepper/index.js +4 -4
  506. package/src/App/Shared/Components/ToolbarList/index.js +6 -6
  507. package/src/App/Shared/Components/VariantChooser/index.js +7 -7
  508. package/src/App/Shared/Containers/AmountPrice/index.js +7 -1
  509. package/src/App/Shared/Containers/SaveConfiguration.js +1 -1
  510. package/src/App/Utils/Request/lazyFetch.js +2 -3
  511. package/src/App/configuration.js +20 -15
  512. package/src/App/index.js +2 -2
  513. package/src/Framework/Api.js +3 -3
  514. package/src/Framework/Components/Carousel/index.js +2 -2
  515. package/src/Framework/Components/Dialog/index.js +13 -10
  516. package/src/Framework/Components/DialogSelect/index.js +6 -5
  517. package/src/Framework/i18n.js +15 -8
  518. package/src/Shared/Components/CustomDialog.js +2 -1
  519. package/src/Shared/Components/CustomDialogSelect.js +2 -2
  520. package/src/Shared/Components/MainButton.js +2 -2
  521. package/src/Shared/Components/__tests__/index.test.jsx +6 -1
  522. package/src/Shared/HOCs/ResizeDetect/ResizeDetect.dev.js +1 -1
  523. package/src/Utils/Decorators/Observable.js +1 -0
  524. package/src/Utils/Test/mountWithState.js +1 -1
  525. package/App/Modules/Designer/Components/ImageEditDialog/res/checkers_tile.png +0 -0
  526. 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.setOptionInputText = exports.setSelectedCalculation = exports.switchSelectedAmount = exports.setComment = exports.deleteSelectedAmounts = exports.setSelectedAmounts = exports.deleteSelectedAmount = exports.clearBulkNames = exports.saveBulkNames = exports.setSelectedAmount = exports.loadDesignerData = exports.receiveDesignerData = exports.loadConfiguration = exports.viewOptionDetails = exports.selectMultipleOptions = exports.applyOptionInputText = exports.selectOption = exports.resolveConflicts = exports.loadInitialOptionclassification = exports.fetchInitialConfiguration = exports.setConflictingSwitchoptionData = exports.setOptionclassificationChecked = exports.setCalculationEnabled = exports.setSelectedVariantIdentifier = exports.setStockInformationOption = exports.setLoadIdentifier = exports.setLoadCode = exports.fetchInspirations = exports.fetchClientData = exports.fetchCodesnippets = exports.fetchConfigurationVariants = exports.validateConfiguration = exports.saveConfiguration = exports.fetchOptionDetails = exports.doCalculation = exports.switchOptions = exports.switchOptionsBasic = exports.fetchOptions = exports.fetchConfigurationByCodeAsync = exports.fetchConfigurationByCode = exports.fetchConfiguration = exports.inspectValidationResults = exports.inspectCheckResults = exports.setCustomTitle = exports.receiveInspirations = exports.receiveClientData = exports.fetchConfigurationForDesignerProductPreview = exports.receiveCodesnippets = exports.receiveConfigurationVariants = exports.receiveValidation = exports.receiveSavedConfiguration = exports.clearOptionDetails = exports.receiveOptionDetails = exports.skipNextAutoResolve = exports.setCalculationAutoResolveEnabled = exports.setCalculationErrorsResolved = exports.invalidateCalculation = exports.receiveCalculation = exports.receiveSwitchoptionsresult = exports.receiveOptions = exports.selectOptionclassification = exports.applyVariantAmountPreSelection = exports.setDefaultSelectedVariantIdentifier = exports.deleteMissingVariants = exports.receiveConfiguration = exports.DELETE_SELECTED_AMOUNTS = exports.SET_SELECTED_AMOUNTS = exports.SET_COMMENT = exports.SET_SELECTED_CALCULATION = exports.DELETE_SELECTED_AMOUNT = exports.CLEAR_BULKNAMES = exports.SAVE_BULKNAMES = exports.SWITCH_SELECTED_AMOUNT = exports.RESET_OPTION_INPUT_TEXTS = exports.SET_OPTION_INPUT_TEXT = exports.SET_SELECTED_AMOUNT = exports.SET_CONFLICTING_SWITCHOPTION_DATA = exports.SET_OPTIONCLASSIFICATION_CHECKED = exports.SET_CALCULATION_AUTO_RESOLVE_ENABLED = exports.SET_CALCULATION_ERRORS_RESOLVED = exports.SET_CALCULATION_ENABLED = exports.SET_SELECTED_VARIANT_IDENTIFIER = exports.SET_STOCK_INFORMATION_OPTION = exports.SET_LOAD_IDENTIFIER = exports.SET_LOAD_CODE = exports.SET_CUSTOM_TITLE = exports.RECEIVE_INSPIRATIONS = exports.RECEIVE_CLIENT_DATA = exports.RECEIVE_CODESNIPPETS = exports.RECEIVE_CONFIGURATIONVARIANTS = exports.RECEIVE_VALIDATION = exports.RECEIVE_SAVEDCONFIGURATION = exports.RECEIVE_OPTIONDETAILS = exports.INVALIDATE_CALCULATION = exports.RECEIVE_CALCULATION = exports.RECEIVE_SWITCHOPTIONSRESULT = exports.RECEIVE_OPTIONS = exports.SELECT_OPTIONCLASSIFICATION = exports.RECEIVE_DESIGNER_DATA = exports.RECEIVE_CONFIGURATION = void 0;
7
- exports.resetOptionInputTexts = void 0;
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 _lodash = require("lodash");
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
60
-
61
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
62
-
63
- 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; }
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 _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; }
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 RECEIVE_CONFIGURATION = 'RECEIVE_CONFIGURATION';
78
- exports.RECEIVE_CONFIGURATION = RECEIVE_CONFIGURATION;
79
- var RECEIVE_DESIGNER_DATA = 'RECEIVE_DESIGNER_DATA';
80
- exports.RECEIVE_DESIGNER_DATA = RECEIVE_DESIGNER_DATA;
81
- var SELECT_OPTIONCLASSIFICATION = 'SELECT_OPTIONCLASSIFICATION';
82
- exports.SELECT_OPTIONCLASSIFICATION = SELECT_OPTIONCLASSIFICATION;
83
- var RECEIVE_OPTIONS = 'RECEIVE_OPTIONS';
84
- exports.RECEIVE_OPTIONS = RECEIVE_OPTIONS;
85
- var RECEIVE_SWITCHOPTIONSRESULT = 'RECEIVE_SWITCHOPTIONSRESULT';
86
- exports.RECEIVE_SWITCHOPTIONSRESULT = RECEIVE_SWITCHOPTIONSRESULT;
87
- var RECEIVE_CALCULATION = 'RECEIVE_CALCULATION';
88
- exports.RECEIVE_CALCULATION = RECEIVE_CALCULATION;
89
- var INVALIDATE_CALCULATION = 'INVALIDATE_CALCULATION';
90
- exports.INVALIDATE_CALCULATION = INVALIDATE_CALCULATION;
91
- var RECEIVE_OPTIONDETAILS = 'RECEIVE_OPTIONDETAILS';
92
- exports.RECEIVE_OPTIONDETAILS = RECEIVE_OPTIONDETAILS;
93
- var RECEIVE_SAVEDCONFIGURATION = 'RECEIVE_SAVEDCONFIGURATION';
94
- exports.RECEIVE_SAVEDCONFIGURATION = RECEIVE_SAVEDCONFIGURATION;
95
- var RECEIVE_VALIDATION = 'RECEIVE_VALIDATION';
96
- exports.RECEIVE_VALIDATION = RECEIVE_VALIDATION;
97
- var RECEIVE_CONFIGURATIONVARIANTS = 'RECEIVE_CONFIGURATIONVARIANTS';
98
- exports.RECEIVE_CONFIGURATIONVARIANTS = RECEIVE_CONFIGURATIONVARIANTS;
99
- var RECEIVE_CODESNIPPETS = 'RECEIVE_CODESNIPPETS';
100
- exports.RECEIVE_CODESNIPPETS = RECEIVE_CODESNIPPETS;
101
- var RECEIVE_CLIENT_DATA = 'RECEIVE_CLIENT_DATA';
102
- exports.RECEIVE_CLIENT_DATA = RECEIVE_CLIENT_DATA;
103
- var RECEIVE_INSPIRATIONS = 'RECEIVE_INSPIRATIONS';
104
- exports.RECEIVE_INSPIRATIONS = RECEIVE_INSPIRATIONS;
105
- var SET_CUSTOM_TITLE = 'SET_CUSTOM_TITLE';
106
- exports.SET_CUSTOM_TITLE = SET_CUSTOM_TITLE;
107
- var SET_LOAD_CODE = 'SET_LOAD_CODE';
108
- exports.SET_LOAD_CODE = SET_LOAD_CODE;
109
- var SET_LOAD_IDENTIFIER = 'SET_LOAD_IDENTIFIER';
110
- exports.SET_LOAD_IDENTIFIER = SET_LOAD_IDENTIFIER;
111
- var SET_STOCK_INFORMATION_OPTION = 'SET_STOCK_INFORMATION_OPTION';
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__*/regeneratorRuntime.mark(function _callee(dispatch, getState) {
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
- return regeneratorRuntime.wrap(function _callee$(_context) {
155
- while (1) {
156
- switch (_context.prev = _context.next) {
157
- case 0:
158
- prevState = getState();
159
- selectOptions = (0, _configuration.getConf)('selectOptions');
160
- dispatch(setCalculationEnabled(false));
161
-
162
- if (checkValidation) {
163
- dispatch(inspectValidationResults(json));
164
- }
165
-
166
- action = dispatch({
167
- type: RECEIVE_CONFIGURATION,
168
- data: (0, _Modifiers.patchViewImages)(json),
169
- receivedAt: Date.now()
170
- });
171
-
172
- if (selectOptions) {
173
- dispatch(selectMultipleOptions(selectOptions));
174
- }
175
-
176
- dispatch(inspectCheckResults());
177
- _getState = getState(), configurator = _getState.configurator;
178
- configuration = configurator.configuration, selectedoptionclassification = configurator.selectedoptionclassification, loadIdentifier = configurator.loadIdentifier;
179
- _getAvailableConfigur = (0, _Selectors2.getAvailableConfigurationModes)(getState()), designerEnabled = _getAvailableConfigur.designer;
180
-
181
- if (configurator.loadCode) {
182
- dispatch((0, _Actions4.addImagesFromDesignArea)(configurator));
183
- }
184
-
185
- dispatch(deleteMissingVariants(configurator)); // load first optionclassification if not selected yet
186
-
187
- if (!selectedoptionclassification.identifier && (0, _configuration.getConf)('showInitialOptionclassification')) {
188
- dispatch(loadInitialOptionclassification(configuration));
189
- }
190
-
191
- if ((0, _configuration.getConf)('loadInspirations')) {
192
- dispatch(fetchInspirations(configuration.item.identifier));
193
- }
194
-
195
- dispatch((0, _Actions2.setVisible)('configurationvariantSelection', false));
196
-
197
- if (prevState.configurator.configuration.item.identifier && prevState.configurator.configuration.item.identifier !== configuration.item.identifier) {
198
- dispatch(fetchConfigurationVariants(configuration.item.identifier));
199
- }
200
-
201
- applyVariantAmountPreSelection(configurator);
202
- setDefaultSelectedVariantIdentifier((0, _Selectors.getConfigurator)(getState()), loadIdentifier);
203
-
204
- if (!designerEnabled) {
205
- _context.next = 26;
206
- break;
207
- }
208
-
209
- _context.next = 21;
210
- return dispatch((0, _Actions3.fetchFonts)());
211
-
212
- case 21:
213
- dispatch((0, _Actions5.addCustomFonts)((0, _Selectors3.getUsedCustomFontsInEditor)(getState())));
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__*/regeneratorRuntime.mark(function _callee2(dispatch) {
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
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
250
- while (1) {
251
- switch (_context2.prev = _context2.next) {
252
- case 0:
253
- children = (0, _Selectors.getChildren)(configurator).map(function (variant) {
254
- return variant.identifier;
255
- });
256
- selectedAmounts = (0, _Selectors.getSelectedAmounts)(configurator);
257
- item = (0, _lodash.get)(configurator, 'configuration.item');
258
- result = [];
259
- itemGroupChildren = (0, _lodash.get)(item, 'itemGroup.children', []);
260
-
261
- if (itemGroupChildren.length > 0) {
262
- _iterator = _createForOfIteratorHelper(item.itemGroup.children);
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
- } else {
275
- result.push(item.identifier);
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
- _context2.next = 8;
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
- case 15:
308
- case "end":
309
- return _context2.stop();
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, _lodash.flatten)(variantChildren).map(function (child) {
224
+ var children = (0, _uniq["default"])((0, _flatten["default"])(variantChildren).map(function (child) {
328
225
  return child.identifier;
329
226
  }));
330
- var firstSelectedAmountEntry = (0, _lodash.first)(Object.keys((0, _Selectors.getSelectedAmounts)(configurator)));
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; // make sure the received option list belongs to the selected 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
- noCheck = extraData.noCheck,
425
- setChecked = extraData.setChecked,
426
- refreshOptions = extraData.refreshOptions;
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
- configurator = _getState2.configurator;
435
-
308
+ configurator = _getState2.configurator;
436
309
  var configuration = configurator.configuration,
437
- selectedoptionclassification = configurator.selectedoptionclassification; // if it was sent with noCheck param, there is nothing to do with the check results..
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, _lodash.first)(Object.keys(switchOptionData))));
449
- } // do it only when there is a selected option classification
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__*/regeneratorRuntime.mark(function _callee3(dispatch, getState) {
413
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(dispatch, getState) {
582
414
  var itemIdentifier, _getAvailableConfigur2, designerEnabled, initialDesignData;
583
-
584
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
585
- while (1) {
586
- switch (_context3.prev = _context3.next) {
587
- case 0:
588
- itemIdentifier = getState().configurator.loadIdentifier;
589
- dispatch(setCalculationEnabled(false));
590
- _context3.next = 4;
591
- return dispatch(apiActions.fetchData('configuration/loadbyitemidentifier/' + itemIdentifier, function (json) {
592
- return {
593
- type: RECEIVE_CONFIGURATION,
594
- data: (0, _Modifiers.patchViewImages)(json),
595
- receivedAt: Date.now()
596
- };
597
- }));
598
-
599
- case 4:
600
- setDefaultSelectedVariantIdentifier((0, _Selectors.getConfigurator)(getState()), itemIdentifier);
601
- _getAvailableConfigur2 = (0, _Selectors2.getAvailableConfigurationModes)(getState()), designerEnabled = _getAvailableConfigur2.designer;
602
-
603
- if (!designerEnabled) {
604
- _context3.next = 12;
605
- break;
606
- }
607
-
608
- dispatch((0, _Actions7.selectConfigurationMode)('designer'));
609
- _context3.next = 10;
610
- return dispatch(loadDesignerData((0, _Selectors.getConfiguration)((0, _Selectors.getConfigurator)(getState()))));
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
- if ((0, _Selectors.isDesignerProductPreviewMode)()) {// initial configuration is not needed
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
- ui = _getState3.ui,
684
- configurator = _getState3.configurator;
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, _lodash.get)(configuration, 'information.validation_result');
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, {}, // config
532
+ }, receiveOptions, {},
533
+ // config
747
534
  {
748
535
  optionclassification: optionclassification
749
536
  } // extraData
750
537
  );
751
538
  };
752
539
 
753
- exports.fetchOptions = fetchOptions;
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
- loadCode = _getState$configurato.loadCode,
934
- loadIdentifier = _getState$configurato.loadIdentifier;
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
- configurationvariants = _getState$configurato2.configurationvariants,
957
- loadIdentifier = _getState$configurato2.loadIdentifier; // If there is only one variant or the list is empty, fall back to fetchConfiguration
688
+ configurationvariants = _getState$configurato2.configurationvariants,
689
+ loadIdentifier = _getState$configurato2.loadIdentifier;
958
690
 
959
- if ((0, _lodash.isArray)(configurationvariants)) {
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, _lodash.get)(configuration, 'optionclassifications[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
- configurator = _getState4.configurator;
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
- _step2;
1011
-
731
+ _step2;
1012
732
  try {
1013
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
733
+ var _loop = function _loop() {
1014
734
  var result = _step2.value;
1015
-
1016
735
  if (result.status === false) {
1017
- (function () {
1018
- // check for data to perform automated option switching
1019
- var switchOptionsData = (0, _lodash.get)(result, 'data.switchOptions');
1020
-
1021
- if (switchOptionsData) {
1022
- if (p) {
1023
- p = p.then(function (action) {
1024
- return dispatch(switchOptionsBasic(action.data, switchOptionsData, true));
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, _lodash.get)(action, 'data.check_results.status') === false) {
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
- var configuration = getState().configurator.configuration; // enable calculation and refresh it
1050
-
768
+ // enable calculation and refresh it
1051
769
  dispatch(setCalculationEnabled(true));
1052
770
  dispatch(invalidateCalculation());
1053
- dispatch(doCalculation(configuration)); // hide the incompatibility dialog
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
- configuration = _getState$configurato3.configuration,
1080
- selectedoptionclassification = _getState$configurato3.selectedoptionclassification;
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
- configuration = _getState$configurato4.configuration,
1110
- optionInputTexts = _getState$configurato4.optionInputTexts;
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
- _step3;
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, _lodash.get)((0, _find["default"])(optionInputTexts, ['optionIdentifier', selectedOption.identifier]), 'inputText', null);
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
- _step4;
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
- amount = _ref5.amount;
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
- configuration = _getState$configurato5.configuration,
1188
- optiondetails = _getState$configurato5.optiondetails;
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__*/regeneratorRuntime.mark(function _callee4(dispatch, getState) {
889
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(dispatch, getState) {
1203
890
  var loadCode, action;
1204
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
1205
- while (1) {
1206
- switch (_context4.prev = _context4.next) {
1207
- case 0:
1208
- loadCode = getState().configurator.loadCode;
1209
-
1210
- if (loadCode) {
1211
- _context4.next = 3;
1212
- break;
1213
- }
1214
-
1215
- throw new Error((0, _i18n.t)('loadConfiguration.error.emptyCode'));
1216
-
1217
- case 3:
1218
- dispatch((0, _Actions2.dismissError)());
1219
- dispatch((0, _Actions2.setWorkInProgress)('loadConfiguration', true));
1220
- _context4.prev = 5;
1221
- _context4.next = 8;
1222
- return dispatch(fetchConfigurationByCodeAsync(loadCode));
1223
-
1224
- case 8:
1225
- action = _context4.sent;
1226
- dispatch((0, _Actions2.setVisible)('loadConfiguration', false));
1227
- return _context4.abrupt("return", action);
1228
-
1229
- case 13:
1230
- _context4.prev = 13;
1231
- _context4.t0 = _context4["catch"](5);
1232
- dispatch((0, _Actions2.dismissError)()); // ignore original REQUEST_ERROR, should be handled by the caller
1233
-
1234
- throw new Error((0, _i18n.t)('loadConfiguration.error.loadingFailed'));
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__*/regeneratorRuntime.mark(function _callee5(dispatch) {
1270
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
1271
- while (1) {
1272
- switch (_context5.prev = _context5.next) {
1273
- case 0:
1274
- if (!(!configuration || !configuration.item || !configuration.item.identifier)) {
1275
- _context5.next = 2;
1276
- break;
1277
- }
1278
-
1279
- return _context5.abrupt("return", dispatch((0, _Actions2.reportError)((0, _i18n.t)('loadConfigurationModes.error.missingItemIdentifier'))));
1280
-
1281
- case 2:
1282
- dispatch((0, _Actions2.dismissError)());
1283
- dispatch((0, _Actions2.setWorkInProgress)('loadConfigurationModes', true));
1284
- _context5.prev = 4;
1285
- _context5.next = 7;
1286
- return dispatch(apiActions.postDataAsync('/configurationmodes/designer/getdata', {
1287
- configuration: configuration
1288
- }, receiveDesignerData));
1289
-
1290
- case 7:
1291
- return _context5.abrupt("return", _context5.sent);
1292
-
1293
- case 10:
1294
- _context5.prev = 10;
1295
- _context5.t0 = _context5["catch"](4);
1296
- return _context5.abrupt("return", dispatch((0, _Actions2.reportError)((0, _i18n.t)('loadConfigurationModes.error.loadingFailed'))));
1297
-
1298
- case 13:
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
+ };