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