kitchen-simulator 1.1.1-test.47 → 1.1.1-test.49

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 (359) hide show
  1. package/lib/KitchenConfiguratorApp.js +3 -0
  2. package/package.json +15 -16
  3. package/es/@history.js +0 -2
  4. package/es/AppContext.js +0 -3
  5. package/es/KitchenConfigurator.js +0 -645
  6. package/es/KitchenConfiguratorApp.js +0 -478
  7. package/es/actions/area-actions.js +0 -14
  8. package/es/actions/export.js +0 -23
  9. package/es/actions/groups-actions.js +0 -89
  10. package/es/actions/holes-actions.js +0 -119
  11. package/es/actions/items-actions.js +0 -313
  12. package/es/actions/lines-actions.js +0 -81
  13. package/es/actions/project-actions.js +0 -281
  14. package/es/actions/scene-actions.js +0 -33
  15. package/es/actions/vertices-actions.js +0 -27
  16. package/es/actions/viewer2d-actions.js +0 -58
  17. package/es/actions/viewer3d-actions.js +0 -23
  18. package/es/catalog/areas/area/planner-element.js +0 -40
  19. package/es/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
  20. package/es/catalog/areas/area/textures/grass.jpg +0 -0
  21. package/es/catalog/areas/area/textures/parquet.jpg +0 -0
  22. package/es/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
  23. package/es/catalog/areas/area/textures/tile1.jpg +0 -0
  24. package/es/catalog/catalog.js +0 -277
  25. package/es/catalog/envMap/nx.hdr +0 -0
  26. package/es/catalog/envMap/ny.hdr +0 -0
  27. package/es/catalog/envMap/nz.hdr +0 -0
  28. package/es/catalog/envMap/px.hdr +0 -0
  29. package/es/catalog/envMap/py.hdr +0 -0
  30. package/es/catalog/envMap/pz.hdr +0 -0
  31. package/es/catalog/factories/area-factory-3d.js +0 -181
  32. package/es/catalog/factories/area-factory.js +0 -81
  33. package/es/catalog/factories/export.js +0 -7
  34. package/es/catalog/factories/wall-factory-3d.js +0 -202
  35. package/es/catalog/factories/wall-factory.js +0 -268
  36. package/es/catalog/holes/door-closet/planner-element.js +0 -222
  37. package/es/catalog/holes/door-double/door_double.png +0 -0
  38. package/es/catalog/holes/door-double/planner-element.js +0 -315
  39. package/es/catalog/holes/door-exterior/planner-element.js +0 -215
  40. package/es/catalog/holes/door-interior/planner-element.js +0 -227
  41. package/es/catalog/holes/door-panic/panicDoor.png +0 -0
  42. package/es/catalog/holes/door-panic/planner-element.js +0 -503
  43. package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
  44. package/es/catalog/holes/door-panic-double/planner-element.js +0 -463
  45. package/es/catalog/holes/door-sliding/planner-element.js +0 -225
  46. package/es/catalog/holes/doorway-framed/planner-element.js +0 -145
  47. package/es/catalog/holes/doorway-frameless/planner-element.js +0 -104
  48. package/es/catalog/holes/export.js +0 -13
  49. package/es/catalog/holes/gate/gate.jpg +0 -0
  50. package/es/catalog/holes/window-clear/planner-element.js +0 -166
  51. package/es/catalog/holes/window-clear/texture.png +0 -0
  52. package/es/catalog/holes/window-cross/planner-element.js +0 -165
  53. package/es/catalog/holes/window-cross/texture.png +0 -0
  54. package/es/catalog/holes/window-double-hung/planner-element.js +0 -303
  55. package/es/catalog/holes/window-double-hung/texture.png +0 -0
  56. package/es/catalog/holes/window-vertical/planner-element.js +0 -276
  57. package/es/catalog/holes/window-vertical/texture.png +0 -0
  58. package/es/catalog/lines/wall/planner-element.js +0 -70
  59. package/es/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
  60. package/es/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
  61. package/es/catalog/lines/wall/textures/bricks.jpg +0 -0
  62. package/es/catalog/lines/wall/textures/bricks2.jpg +0 -0
  63. package/es/catalog/lines/wall/textures/bricks3.jpg +0 -0
  64. package/es/catalog/lines/wall/textures/morden-normal.jpg +0 -0
  65. package/es/catalog/lines/wall/textures/morden.jpg +0 -0
  66. package/es/catalog/lines/wall/textures/painted-normal.jpg +0 -0
  67. package/es/catalog/lines/wall/textures/painted.jpg +0 -0
  68. package/es/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
  69. package/es/catalog/lines/wall/textures/plaster.jpg +0 -0
  70. package/es/catalog/lines/wall/wall.png +0 -0
  71. package/es/catalog/molding/molding-dcm/planner-element.js +0 -28
  72. package/es/catalog/molding/molding-dcm/texture.png +0 -0
  73. package/es/catalog/molding/molding-fbm/planner-element.js +0 -28
  74. package/es/catalog/molding/molding-fbm/texture.png +0 -0
  75. package/es/catalog/molding/molding-lrm/planner-element.js +0 -28
  76. package/es/catalog/molding/molding-lrm/texture.png +0 -0
  77. package/es/catalog/properties/export.js +0 -21
  78. package/es/catalog/properties/property-checkbox.js +0 -116
  79. package/es/catalog/properties/property-color.js +0 -39
  80. package/es/catalog/properties/property-enum.js +0 -97
  81. package/es/catalog/properties/property-hidden.js +0 -19
  82. package/es/catalog/properties/property-lenght-measure.js +0 -101
  83. package/es/catalog/properties/property-length-measure.js +0 -134
  84. package/es/catalog/properties/property-length-measure_hole.js +0 -101
  85. package/es/catalog/properties/property-number.js +0 -48
  86. package/es/catalog/properties/property-read-only.js +0 -26
  87. package/es/catalog/properties/property-string.js +0 -48
  88. package/es/catalog/properties/property-toggle.js +0 -39
  89. package/es/catalog/properties/shared-property-style.js +0 -14
  90. package/es/catalog/utils/FuseUtils.js +0 -82
  91. package/es/catalog/utils/exporter.js +0 -148
  92. package/es/catalog/utils/geom-utils.js +0 -189
  93. package/es/catalog/utils/item-loader.js +0 -1521
  94. package/es/catalog/utils/load-obj.js +0 -91
  95. package/es/catalog/utils/mtl-loader.js +0 -358
  96. package/es/catalog/utils/obj-loader.js +0 -477
  97. package/es/class/FuseUtils.js +0 -82
  98. package/es/class/area.js +0 -145
  99. package/es/class/export.js +0 -24
  100. package/es/class/group.js +0 -440
  101. package/es/class/guide.js +0 -62
  102. package/es/class/hole.js +0 -929
  103. package/es/class/item.js +0 -1883
  104. package/es/class/layer.js +0 -667
  105. package/es/class/line.js +0 -1180
  106. package/es/class/project.js +0 -793
  107. package/es/class/vertex.js +0 -202
  108. package/es/components/content.js +0 -107
  109. package/es/components/disclaimer/disclaimer.js +0 -97
  110. package/es/components/export.js +0 -9
  111. package/es/components/style/button.js +0 -113
  112. package/es/components/style/cancel-button.js +0 -22
  113. package/es/components/style/content-container.js +0 -33
  114. package/es/components/style/content-title.js +0 -29
  115. package/es/components/style/delete-button.js +0 -25
  116. package/es/components/style/export.js +0 -31
  117. package/es/components/style/form-block.js +0 -24
  118. package/es/components/style/form-color-input.js +0 -27
  119. package/es/components/style/form-label.js +0 -26
  120. package/es/components/style/form-number-input.js +0 -213
  121. package/es/components/style/form-number-input_2.js +0 -206
  122. package/es/components/style/form-select.js +0 -68
  123. package/es/components/style/form-slider.js +0 -61
  124. package/es/components/style/form-submit-button.js +0 -26
  125. package/es/components/style/form-text-input.js +0 -95
  126. package/es/components/viewer2d/area.js +0 -81
  127. package/es/components/viewer2d/export.js +0 -31
  128. package/es/components/viewer2d/grids/grid-horizontal-streak.js +0 -37
  129. package/es/components/viewer2d/grids/grid-streak.js +0 -37
  130. package/es/components/viewer2d/grids/grid-vertical-streak.js +0 -37
  131. package/es/components/viewer2d/grids/grids.js +0 -35
  132. package/es/components/viewer2d/group.js +0 -53
  133. package/es/components/viewer2d/item.js +0 -513
  134. package/es/components/viewer2d/layer.js +0 -164
  135. package/es/components/viewer2d/line.js +0 -882
  136. package/es/components/viewer2d/ruler.js +0 -100
  137. package/es/components/viewer2d/rulerDist.js +0 -146
  138. package/es/components/viewer2d/rulerX.js +0 -151
  139. package/es/components/viewer2d/rulerY.js +0 -153
  140. package/es/components/viewer2d/scene.js +0 -140
  141. package/es/components/viewer2d/snap.js +0 -74
  142. package/es/components/viewer2d/state.js +0 -78
  143. package/es/components/viewer2d/utils.js +0 -198
  144. package/es/components/viewer2d/vertex.js +0 -65
  145. package/es/components/viewer2d/viewer2d.js +0 -1398
  146. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -2592
  147. package/es/components/viewer3d/dcm.js +0 -401
  148. package/es/components/viewer3d/fbm.js +0 -414
  149. package/es/components/viewer3d/front3D.js +0 -66
  150. package/es/components/viewer3d/grid-creator.js +0 -25
  151. package/es/components/viewer3d/grids/grid-horizontal-streak.js +0 -36
  152. package/es/components/viewer3d/grids/grid-streak.js +0 -27
  153. package/es/components/viewer3d/grids/grid-vertical-streak.js +0 -36
  154. package/es/components/viewer3d/libs/first-person-controls.js +0 -67
  155. package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1281
  156. package/es/components/viewer3d/libs/mtl-loader.js +0 -357
  157. package/es/components/viewer3d/libs/obj-loader.js +0 -462
  158. package/es/components/viewer3d/libs/orbit-controls.js +0 -699
  159. package/es/components/viewer3d/libs/pointer-lock-controls.js +0 -46
  160. package/es/components/viewer3d/lrm.js +0 -305
  161. package/es/components/viewer3d/model.js +0 -708
  162. package/es/components/viewer3d/pointer-lock-navigation.js +0 -115
  163. package/es/components/viewer3d/ruler-utils/itemRect.js +0 -61
  164. package/es/components/viewer3d/ruler-utils/layer3D.js +0 -495
  165. package/es/components/viewer3d/ruler-utils/ruler3D.js +0 -227
  166. package/es/components/viewer3d/ruler-utils/scene3D.js +0 -60
  167. package/es/components/viewer3d/ruler-utils/state3D.js +0 -18
  168. package/es/components/viewer3d/scene-creator.js +0 -3608
  169. package/es/components/viewer3d/three-memory-cleaner.js +0 -51
  170. package/es/components/viewer3d/viewer3d-first-person.js +0 -315
  171. package/es/components/viewer3d/viewer3d.js +0 -2527
  172. package/es/constants.js +0 -636
  173. package/es/index.js +0 -16
  174. package/es/models.js +0 -510
  175. package/es/plugins/SVGLoader.js +0 -1412
  176. package/es/plugins/autosave.js +0 -33
  177. package/es/plugins/console-debugger.js +0 -37
  178. package/es/plugins/export.js +0 -9
  179. package/es/plugins/keyboard.js +0 -101
  180. package/es/reducers/areas-reducer.js +0 -12
  181. package/es/reducers/export.js +0 -25
  182. package/es/reducers/groups-reducer.js +0 -38
  183. package/es/reducers/holes-reducer.js +0 -62
  184. package/es/reducers/items-reducer.js +0 -140
  185. package/es/reducers/lines-reducer.js +0 -45
  186. package/es/reducers/project-reducer.js +0 -129
  187. package/es/reducers/reducer.js +0 -19
  188. package/es/reducers/scene-reducer.js +0 -28
  189. package/es/reducers/user-reducer.js +0 -40
  190. package/es/reducers/vertices-reducer.js +0 -19
  191. package/es/reducers/viewer2d-reducer.js +0 -75
  192. package/es/reducers/viewer3d-reducer.js +0 -56
  193. package/es/shared-style.js +0 -66
  194. package/es/styles/export.js +0 -5
  195. package/es/styles/tabs.css +0 -40
  196. package/es/translator/en.js +0 -104
  197. package/es/translator/it.js +0 -79
  198. package/es/translator/ru.js +0 -79
  199. package/es/translator/translator.js +0 -84
  200. package/es/utils/browser.js +0 -33
  201. package/es/utils/email-validator.js +0 -4
  202. package/es/utils/export.js +0 -25
  203. package/es/utils/geometry.js +0 -2420
  204. package/es/utils/get-edges-of-subgraphs.js +0 -27
  205. package/es/utils/graph-cycles.js +0 -237
  206. package/es/utils/graph-inner-cycles.js +0 -46
  207. package/es/utils/graph.js +0 -150
  208. package/es/utils/helper.js +0 -268
  209. package/es/utils/history.js +0 -29
  210. package/es/utils/id-broker.js +0 -19
  211. package/es/utils/logger.js +0 -8
  212. package/es/utils/math.js +0 -50
  213. package/es/utils/molding.js +0 -871
  214. package/es/utils/name-generator.js +0 -18
  215. package/es/utils/objects-utils.js +0 -50
  216. package/es/utils/phone-validator.js +0 -4
  217. package/es/utils/process-black-list.js +0 -18
  218. package/es/utils/react-if.js +0 -18
  219. package/es/utils/snap-scene.js +0 -99
  220. package/es/utils/snap.js +0 -237
  221. package/es/utils/summarizeCart.js +0 -24
  222. package/es/utils/threeCSG.es6.js +0 -498
  223. package/es/version.js +0 -2
  224. package/lib/catalog/properties/property-string.js +0 -55
  225. package/lib/catalog/properties/property-toggle.js +0 -46
  226. package/lib/catalog/properties/shared-property-style.js +0 -20
  227. package/lib/catalog/utils/FuseUtils.js +0 -88
  228. package/lib/catalog/utils/exporter.js +0 -155
  229. package/lib/catalog/utils/geom-utils.js +0 -205
  230. package/lib/catalog/utils/item-loader.js +0 -1533
  231. package/lib/catalog/utils/load-obj.js +0 -99
  232. package/lib/catalog/utils/mtl-loader.js +0 -363
  233. package/lib/catalog/utils/obj-loader.js +0 -482
  234. package/lib/class/FuseUtils.js +0 -88
  235. package/lib/class/area.js +0 -150
  236. package/lib/class/export.js +0 -96
  237. package/lib/class/group.js +0 -445
  238. package/lib/class/guide.js +0 -67
  239. package/lib/class/hole.js +0 -934
  240. package/lib/class/item.js +0 -1889
  241. package/lib/class/layer.js +0 -672
  242. package/lib/class/line.js +0 -1186
  243. package/lib/class/project.js +0 -799
  244. package/lib/class/vertex.js +0 -207
  245. package/lib/components/content.js +0 -116
  246. package/lib/components/disclaimer/disclaimer.js +0 -105
  247. package/lib/components/export.js +0 -33
  248. package/lib/components/style/button.js +0 -120
  249. package/lib/components/style/cancel-button.js +0 -29
  250. package/lib/components/style/content-container.js +0 -40
  251. package/lib/components/style/content-title.js +0 -37
  252. package/lib/components/style/delete-button.js +0 -34
  253. package/lib/components/style/export.js +0 -121
  254. package/lib/components/style/form-block.js +0 -31
  255. package/lib/components/style/form-color-input.js +0 -34
  256. package/lib/components/style/form-label.js +0 -33
  257. package/lib/components/style/form-number-input.js +0 -220
  258. package/lib/components/style/form-number-input_2.js +0 -213
  259. package/lib/components/style/form-select.js +0 -75
  260. package/lib/components/style/form-slider.js +0 -68
  261. package/lib/components/style/form-submit-button.js +0 -35
  262. package/lib/components/style/form-text-input.js +0 -101
  263. package/lib/components/viewer2d/area.js +0 -88
  264. package/lib/components/viewer2d/export.js +0 -121
  265. package/lib/components/viewer2d/grids/grid-horizontal-streak.js +0 -44
  266. package/lib/components/viewer2d/grids/grid-streak.js +0 -44
  267. package/lib/components/viewer2d/grids/grid-vertical-streak.js +0 -44
  268. package/lib/components/viewer2d/grids/grids.js +0 -44
  269. package/lib/components/viewer2d/group.js +0 -62
  270. package/lib/components/viewer2d/item.js +0 -521
  271. package/lib/components/viewer2d/layer.js +0 -171
  272. package/lib/components/viewer2d/line.js +0 -892
  273. package/lib/components/viewer2d/ruler.js +0 -107
  274. package/lib/components/viewer2d/rulerDist.js +0 -153
  275. package/lib/components/viewer2d/rulerX.js +0 -158
  276. package/lib/components/viewer2d/rulerY.js +0 -160
  277. package/lib/components/viewer2d/scene.js +0 -147
  278. package/lib/components/viewer2d/snap.js +0 -83
  279. package/lib/components/viewer2d/state.js +0 -87
  280. package/lib/components/viewer2d/utils.js +0 -210
  281. package/lib/components/viewer2d/vertex.js +0 -74
  282. package/lib/components/viewer2d/viewer2d.js +0 -1405
  283. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -2597
  284. package/lib/components/viewer3d/dcm.js +0 -407
  285. package/lib/components/viewer3d/fbm.js +0 -420
  286. package/lib/components/viewer3d/front3D.js +0 -75
  287. package/lib/components/viewer3d/grid-creator.js +0 -34
  288. package/lib/components/viewer3d/grids/grid-horizontal-streak.js +0 -44
  289. package/lib/components/viewer3d/grids/grid-streak.js +0 -35
  290. package/lib/components/viewer3d/grids/grid-vertical-streak.js +0 -44
  291. package/lib/components/viewer3d/libs/first-person-controls.js +0 -74
  292. package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1287
  293. package/lib/components/viewer3d/libs/mtl-loader.js +0 -363
  294. package/lib/components/viewer3d/libs/obj-loader.js +0 -468
  295. package/lib/components/viewer3d/libs/orbit-controls.js +0 -705
  296. package/lib/components/viewer3d/libs/pointer-lock-controls.js +0 -52
  297. package/lib/components/viewer3d/lrm.js +0 -311
  298. package/lib/components/viewer3d/model.js +0 -714
  299. package/lib/components/viewer3d/pointer-lock-navigation.js +0 -122
  300. package/lib/components/viewer3d/ruler-utils/itemRect.js +0 -68
  301. package/lib/components/viewer3d/ruler-utils/layer3D.js +0 -502
  302. package/lib/components/viewer3d/ruler-utils/ruler3D.js +0 -234
  303. package/lib/components/viewer3d/ruler-utils/scene3D.js +0 -68
  304. package/lib/components/viewer3d/ruler-utils/state3D.js +0 -25
  305. package/lib/components/viewer3d/scene-creator.js +0 -3642
  306. package/lib/components/viewer3d/three-memory-cleaner.js +0 -60
  307. package/lib/components/viewer3d/viewer3d-first-person.js +0 -320
  308. package/lib/components/viewer3d/viewer3d.js +0 -2532
  309. package/lib/constants.js +0 -645
  310. package/lib/index.js +0 -96
  311. package/lib/models.js +0 -517
  312. package/lib/plugins/SVGLoader.js +0 -1417
  313. package/lib/plugins/autosave.js +0 -39
  314. package/lib/plugins/console-debugger.js +0 -44
  315. package/lib/plugins/export.js +0 -33
  316. package/lib/plugins/keyboard.js +0 -107
  317. package/lib/reducers/areas-reducer.js +0 -18
  318. package/lib/reducers/export.js +0 -97
  319. package/lib/reducers/groups-reducer.js +0 -44
  320. package/lib/reducers/holes-reducer.js +0 -68
  321. package/lib/reducers/items-reducer.js +0 -146
  322. package/lib/reducers/lines-reducer.js +0 -51
  323. package/lib/reducers/project-reducer.js +0 -135
  324. package/lib/reducers/reducer.js +0 -26
  325. package/lib/reducers/scene-reducer.js +0 -34
  326. package/lib/reducers/user-reducer.js +0 -46
  327. package/lib/reducers/vertices-reducer.js +0 -25
  328. package/lib/reducers/viewer2d-reducer.js +0 -82
  329. package/lib/reducers/viewer3d-reducer.js +0 -63
  330. package/lib/shared-style.js +0 -72
  331. package/lib/styles/export.js +0 -13
  332. package/lib/translator/en.js +0 -110
  333. package/lib/translator/it.js +0 -85
  334. package/lib/translator/ru.js +0 -85
  335. package/lib/translator/translator.js +0 -90
  336. package/lib/utils/browser.js +0 -40
  337. package/lib/utils/email-validator.js +0 -10
  338. package/lib/utils/export.js +0 -56
  339. package/lib/utils/geometry.js +0 -2516
  340. package/lib/utils/get-edges-of-subgraphs.js +0 -34
  341. package/lib/utils/graph-cycles.js +0 -240
  342. package/lib/utils/graph-inner-cycles.js +0 -54
  343. package/lib/utils/graph.js +0 -157
  344. package/lib/utils/helper.js +0 -291
  345. package/lib/utils/history.js +0 -36
  346. package/lib/utils/id-broker.js +0 -26
  347. package/lib/utils/logger.js +0 -14
  348. package/lib/utils/math.js +0 -57
  349. package/lib/utils/molding.js +0 -895
  350. package/lib/utils/name-generator.js +0 -23
  351. package/lib/utils/objects-utils.js +0 -60
  352. package/lib/utils/phone-validator.js +0 -10
  353. package/lib/utils/process-black-list.js +0 -24
  354. package/lib/utils/react-if.js +0 -24
  355. package/lib/utils/snap-scene.js +0 -105
  356. package/lib/utils/snap.js +0 -249
  357. package/lib/utils/summarizeCart.js +0 -30
  358. package/lib/utils/threeCSG.es6.js +0 -503
  359. package/lib/version.js +0 -8
@@ -1,478 +0,0 @@
1
- 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); }
2
- var _excluded = ["width", "height", "projectElement", "categoryData", "dataBundle", "configData", "toolbarButtons", "options", "user", "auth", "featureFlags", "sentry", "analytics", "onEvent", "onSave", "onError"];
3
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- 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; }
5
- 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; }
6
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
- function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
10
- function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
11
- function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
12
- function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
13
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
14
- 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."); }
15
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
16
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
17
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
18
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
19
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
20
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
21
- import React, { useEffect } from 'react';
22
- import PropTypes from 'prop-types';
23
- import { Provider } from 'react-redux';
24
- import { createStore } from 'redux';
25
- import * as Models from "./models";
26
- import KitchenConfigurator from "./KitchenConfigurator";
27
- import AppContext from "./AppContext";
28
- import Catalog from "./catalog/catalog";
29
- import { SVGLoader } from 'three/addons/loaders/SVGLoader';
30
- import { isEmpty } from "./utils/helper";
31
- import { TOE_KICK_MOLDING } from "./constants";
32
- import * as Areas from "./catalog/areas/area/planner-element";
33
- import * as Lines from "./catalog/lines/wall/planner-element";
34
- import * as Holes from "./catalog/holes/export";
35
- import { render2DItem, render3DApplianceItem, render3DItem, render3DLightingItem } from "./catalog/utils/item-loader";
36
- import { Models as PlannerModels, Plugins as PlannerPlugins, reducer as PlannerReducer } from "./index";
37
- import { Map } from 'immutable';
38
- import * as Sentry from '@sentry/react';
39
- import { loadProject, rename } from "./actions/project-actions";
40
- import exporter from "./catalog/utils/exporter";
41
-
42
- /* ============================== component ============================= */
43
- var MyCatalog = new Catalog();
44
- var AppState = Map({
45
- KitchenConfigurator: new PlannerModels.State()
46
- });
47
- console.log('Version: 378.45-202509_DIY-364-mbox-crash');
48
- isProduction && Sentry.init({
49
- dsn: process.env.SENTRY_DSN,
50
- environment: process.env.SENTRY_ENVIRONMENT
51
- });
52
-
53
- //define reducer
54
- var reducer = function reducer(state, action) {
55
- state = state || AppState;
56
- state = state.update('KitchenConfigurator', function (plannerState) {
57
- return PlannerReducer(plannerState, action);
58
- });
59
- return state;
60
- };
61
- var store = createStore(reducer, null, !isProduction && window.devToolsExtension ? window.devToolsExtension({
62
- features: {
63
- pause: true,
64
- // start/pause recording of dispatched actions
65
- lock: true,
66
- // lock/unlock dispatching actions and side effects
67
- persist: true,
68
- // persist states on page reloading
69
- "export": true,
70
- // export history of actions in a file
71
- "import": 'custom',
72
- // import history of actions from a file
73
- jump: true,
74
- // jump back and forth (time travelling)
75
- skip: true,
76
- // skip (cancel) actions
77
- reorder: true,
78
- // drag and drop actions in the history list
79
- dispatch: true,
80
- // dispatch custom actions or action creators
81
- test: true // generate tests for the selected actions
82
- },
83
- maxAge: 999999
84
- }) : function (f) {
85
- return f;
86
- });
87
- var plugins = [PlannerPlugins.Keyboard(), PlannerPlugins.ConsoleDebugger()];
88
- export default function KitchenConfiguratorApp(props) {
89
- var width = props.width,
90
- height = props.height,
91
- projectElement = props.projectElement,
92
- categoryData = props.categoryData,
93
- dataBundle = props.dataBundle,
94
- configData = props.configData,
95
- toolbarButtons = props.toolbarButtons,
96
- options = props.options,
97
- user = props.user,
98
- auth = props.auth,
99
- featureFlags = props.featureFlags,
100
- sentry = props.sentry,
101
- analytics = props.analytics,
102
- onEvent = props.onEvent,
103
- onSave = props.onSave,
104
- onError = props.onError,
105
- passThrough = _objectWithoutProperties(props, _excluded);
106
- var _ref = categoryData && categoryData.data || {},
107
- catalogs = _ref.catalogs,
108
- colorAlias = _ref.colorAlias,
109
- subgroups = _ref.subgroups;
110
- var _ref2 = dataBundle || {},
111
- _ref2$data = _ref2.data,
112
- data = _ref2$data === void 0 ? [] : _ref2$data,
113
- _ref2$appliances = _ref2.appliances,
114
- appliances = _ref2$appliances === void 0 ? [] : _ref2$appliances,
115
- _ref2$furnishing = _ref2.furnishing,
116
- furnishing = _ref2$furnishing === void 0 ? [] : _ref2$furnishing,
117
- _ref2$lighting = _ref2.lighting,
118
- lighting = _ref2$lighting === void 0 ? [] : _ref2$lighting;
119
- var _projectElement = _slicedToArray(projectElement, 1),
120
- project_data = _projectElement[0].project_data;
121
- var id = configData.id,
122
- logoImg = configData.logoImg,
123
- companyUrl = configData.companyUrl;
124
- var _React$useState = React.useState([]),
125
- _React$useState2 = _slicedToArray(_React$useState, 2),
126
- outlineSVGData = _React$useState2[0],
127
- setOutlineSVGData = _React$useState2[1];
128
- var _React$useState3 = React.useState(false),
129
- _React$useState4 = _slicedToArray(_React$useState3, 2),
130
- catalogInitiated = _React$useState4[0],
131
- setCatalogInitiated = _React$useState4[1];
132
- useEffect(function () {
133
- var initMyCatalog = /*#__PURE__*/function () {
134
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
135
- var x, _x, _x2;
136
- return _regenerator().w(function (_context) {
137
- while (1) switch (_context.n) {
138
- case 0:
139
- for (x in Areas) MyCatalog.registerElement(Areas[x]);
140
- for (_x in Lines) MyCatalog.registerElement(Lines[_x]);
141
- for (_x2 in Holes) MyCatalog.registerElement(Holes[_x2]);
142
- MyCatalog.registerCategory('Windows', 'Windows', [Holes.windowClear, Holes.windowCross, Holes.windowDoubleHung, Holes.windowVertical]);
143
- MyCatalog.registerCategory('Doors', 'Doors', [Holes.doorInterior, Holes.doorExterior, Holes.doorCloset, Holes.doorSliding, Holes.doorwayFramed, Holes.doorwayFrameless]);
144
- case 1:
145
- return _context.a(2);
146
- }
147
- }, _callee);
148
- }));
149
- return function initMyCatalog() {
150
- return _ref3.apply(this, arguments);
151
- };
152
- }();
153
- var loadMoldings = /*#__PURE__*/function () {
154
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
155
- var door_color_alias, subgroup_ids, door_color_alias_ids, doorStyleData, molding, toeMoldingData, cabinets, promises;
156
- return _regenerator().w(function (_context2) {
157
- while (1) switch (_context2.n) {
158
- case 0:
159
- door_color_alias = [];
160
- subgroup_ids = catalogs.filter(function (item) {
161
- return item.id == id;
162
- })[0].manufacturer_subgroup_ids.split(',');
163
- door_color_alias_ids = [];
164
- subgroups.forEach(function (subgroup) {
165
- if (subgroup_ids.some(function (id) {
166
- return id == subgroup.id.toString();
167
- })) {
168
- subgroup.door_color_alias_ids.split(',').forEach(function (item) {
169
- item != '' && door_color_alias_ids.push(item);
170
- });
171
- }
172
- });
173
- colorAlias.forEach(function (color) {
174
- return door_color_alias_ids.some(function (id) {
175
- return id == color.id.toString();
176
- }) && door_color_alias.push(color);
177
- });
178
- doorStyleData = categoryData.data.doorStyles.items;
179
- categoryData.data.doorStyles.items = doorStyleData.treeStruct;
180
- door_color_alias.forEach(function (dca) {
181
- doorStyleData.doorColorData.forEach(function (dc) {
182
- dc.door_style_id = parseInt(dc.door_style_id);
183
- if (dc.id !== dca.door_color_id) return;
184
- dc.name = dca.alias_name;
185
- dc.color_sku_alias = dca.sku_alias_name;
186
- doorStyleData.treeStruct.forEach(function (el) {
187
- el.items.forEach(function (elem) {
188
- return dc.door_style_id === elem.id && (dc.door_style_name = elem.name);
189
- });
190
- });
191
- dca.alias_installation_type = isEmpty(dca.alias_installation_type) ? [] : dca.alias_installation_type.split(',').map(function (n) {
192
- return parseInt(n);
193
- });
194
- categoryData.data.doorStyles.items.forEach(function (item) {
195
- if (dca.alias_installation_type.some(function (ait) {
196
- return ait === item.id;
197
- })) item.items.forEach(function (ds) {
198
- if (ds.name === dc.door_style_name) ds.items.push(dc);
199
- });
200
- });
201
- });
202
- });
203
- molding = [];
204
- toeMoldingData = [];
205
- cabinets = categoryData.data.cabinets;
206
- cabinets[cabinets.length - 1].items.forEach(function (index) {
207
- if (index.name.toLowerCase().includes('molding')) {
208
- index.items.forEach(function (item) {
209
- return molding.push(item);
210
- });
211
- }
212
- if (index.name.includes(TOE_KICK_MOLDING)) {
213
- index.items.forEach(function (item) {
214
- return toeMoldingData.push(item);
215
- });
216
- }
217
- });
218
- categoryData.data.toeMoldingData = toeMoldingData;
219
- promises = molding.map(function (child) {
220
- return new Promise(function (resolve, reject) {
221
- var url = child === null || child === void 0 ? void 0 : child.shape_svg;
222
- if (!url) return resolve();
223
- var loader = new SVGLoader();
224
- loader.load(url, function (data) {
225
- var _data$xml$viewBox$ani, _data$xml, _data$xml$viewBox$ani2, _data$xml2;
226
- child.data = {
227
- paths: data.paths,
228
- svg_width: (_data$xml$viewBox$ani = (_data$xml = data.xml) === null || _data$xml === void 0 || (_data$xml = _data$xml.viewBox) === null || _data$xml === void 0 || (_data$xml = _data$xml.animVal) === null || _data$xml === void 0 ? void 0 : _data$xml.width) !== null && _data$xml$viewBox$ani !== void 0 ? _data$xml$viewBox$ani : 0,
229
- svg_height: (_data$xml$viewBox$ani2 = (_data$xml2 = data.xml) === null || _data$xml2 === void 0 || (_data$xml2 = _data$xml2.viewBox) === null || _data$xml2 === void 0 || (_data$xml2 = _data$xml2.animVal) === null || _data$xml2 === void 0 ? void 0 : _data$xml2.height) !== null && _data$xml$viewBox$ani2 !== void 0 ? _data$xml$viewBox$ani2 : 0
230
- };
231
- resolve();
232
- }, null, function (error) {
233
- console.error(error);
234
- reject(error);
235
- });
236
- });
237
- });
238
- return _context2.a(2, Promise.all(promises));
239
- }
240
- }, _callee2);
241
- }));
242
- return function loadMoldings() {
243
- return _ref4.apply(this, arguments);
244
- };
245
- }();
246
- var loadSVGs = /*#__PURE__*/function () {
247
- var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
248
- var svgLoadPromises, outlineData;
249
- return _regenerator().w(function (_context4) {
250
- while (1) switch (_context4.n) {
251
- case 0:
252
- svgLoadPromises = data.map(/*#__PURE__*/function () {
253
- var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(item) {
254
- var _parsed$xml$viewBox, _parsed$xml$viewBox2, response, svgText, loader, parsed, _t;
255
- return _regenerator().w(function (_context3) {
256
- while (1) switch (_context3.p = _context3.n) {
257
- case 0:
258
- if (item.outline) {
259
- _context3.n = 1;
260
- break;
261
- }
262
- return _context3.a(2, null);
263
- case 1:
264
- _context3.p = 1;
265
- _context3.n = 2;
266
- return fetch(item.outline, {
267
- cache: 'no-store'
268
- });
269
- case 2:
270
- response = _context3.v;
271
- _context3.n = 3;
272
- return response.text();
273
- case 3:
274
- svgText = _context3.v;
275
- loader = new SVGLoader();
276
- parsed = loader.parse(svgText);
277
- if (!isEmpty(parsed.paths)) {
278
- _context3.n = 4;
279
- break;
280
- }
281
- return _context3.a(2, null);
282
- case 4:
283
- return _context3.a(2, {
284
- paths: parsed.paths,
285
- svgWidth: parseFloat(parsed.xml.getAttribute('width')) || ((_parsed$xml$viewBox = parsed.xml.viewBox) === null || _parsed$xml$viewBox === void 0 || (_parsed$xml$viewBox = _parsed$xml$viewBox.animVal) === null || _parsed$xml$viewBox === void 0 ? void 0 : _parsed$xml$viewBox.width) || 0,
286
- svgHeight: parseFloat(parsed.xml.getAttribute('height')) || ((_parsed$xml$viewBox2 = parsed.xml.viewBox) === null || _parsed$xml$viewBox2 === void 0 || (_parsed$xml$viewBox2 = _parsed$xml$viewBox2.animVal) === null || _parsed$xml$viewBox2 === void 0 ? void 0 : _parsed$xml$viewBox2.height) || 0,
287
- reverse: !parseFloat(parsed.xml.getAttribute('height'))
288
- });
289
- case 5:
290
- _context3.p = 5;
291
- _t = _context3.v;
292
- console.error('Failed to load SVG:', item.outline, _t);
293
- return _context3.a(2, null);
294
- }
295
- }, _callee3, null, [[1, 5]]);
296
- }));
297
- return function (_x3) {
298
- return _ref6.apply(this, arguments);
299
- };
300
- }());
301
- _context4.n = 1;
302
- return Promise.all(svgLoadPromises);
303
- case 1:
304
- outlineData = _context4.v;
305
- setOutlineSVGData(outlineData);
306
- case 2:
307
- return _context4.a(2);
308
- }
309
- }, _callee4);
310
- }));
311
- return function loadSVGs() {
312
- return _ref5.apply(this, arguments);
313
- };
314
- }();
315
- var initCatalog = /*#__PURE__*/function () {
316
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
317
- return _regenerator().w(function (_context5) {
318
- while (1) switch (_context5.n) {
319
- case 0:
320
- setCatalogInitiated(false);
321
- _context5.n = 1;
322
- return initMyCatalog();
323
- case 1:
324
- _context5.n = 2;
325
- return loadMoldings();
326
- case 2:
327
- _context5.n = 3;
328
- return loadSVGs();
329
- case 3:
330
- setCatalogInitiated(true);
331
- case 4:
332
- return _context5.a(2);
333
- }
334
- }, _callee5);
335
- }));
336
- return function initCatalog() {
337
- return _ref7.apply(this, arguments);
338
- };
339
- }();
340
- initCatalog();
341
- // eslint-disable-next-line react-hooks/exhaustive-deps
342
- }, [categoryData, data, id, catalogs, colorAlias, subgroups]);
343
-
344
- // Register items once SVGs are loaded
345
- useEffect(function () {
346
- if (!outlineSVGData.length) return;
347
- var Item = [];
348
- data.forEach(function (obj, index) {
349
- Item.push(exporter(_objectSpread(_objectSpread({}, obj), {}, {
350
- type: 'cabinet',
351
- outlineSVGData: outlineSVGData[index],
352
- render2DItem: render2DItem,
353
- render3DItem: render3DItem
354
- })));
355
- });
356
- appliances.forEach(function (obj) {
357
- Item.push(exporter(_objectSpread(_objectSpread({}, obj), {}, {
358
- render2DItem: render2DItem,
359
- render3DItem: render3DApplianceItem,
360
- type: 'appliance'
361
- })));
362
- });
363
- lighting.forEach(function (obj) {
364
- Item.push(exporter(_objectSpread(_objectSpread({}, obj), {}, {
365
- type: 'lighting',
366
- render2DItem: render2DItem,
367
- render3DItem: render3DLightingItem
368
- })));
369
- });
370
- furnishing.forEach(function (obj) {
371
- Item.push(exporter(_objectSpread(_objectSpread({}, obj), {}, {
372
- type: 'furnishing',
373
- render2DItem: render2DItem,
374
- render3DItem: render3DApplianceItem
375
- })));
376
- });
377
- for (var x in Item) MyCatalog.registerElement(Item[x]);
378
- }, [outlineSVGData, data, appliances, furnishing, lighting]);
379
-
380
- // Forward updates/save moments to host
381
- useEffect(function () {
382
- if (!onEvent && !onSave && !onError) return;
383
- var unsubscribe = store.subscribe(function () {
384
- var _state$get, _state$get$get, _state$get$get$get;
385
- var state = store.getState();
386
- onEvent === null || onEvent === void 0 || onEvent({
387
- type: 'state-update',
388
- payload: {
389
- state: state
390
- }
391
- });
392
- var pendingSave = state === null || state === void 0 || (_state$get = state.get) === null || _state$get === void 0 || (_state$get = _state$get.call(state, 'KitchenConfigurator')) === null || _state$get === void 0 || (_state$get$get = _state$get.get) === null || _state$get$get === void 0 || (_state$get$get = _state$get$get.call(_state$get, 'misc')) === null || _state$get$get === void 0 || (_state$get$get$get = _state$get$get.get) === null || _state$get$get$get === void 0 ? void 0 : _state$get$get$get.call(_state$get$get, 'pendingSave');
393
- if (pendingSave && onSave) {
394
- try {
395
- var _planner$get, _planner$get2;
396
- var planner = state.get('KitchenConfigurator');
397
- var currentScene = planner !== null && planner !== void 0 && (_planner$get = planner.get) !== null && _planner$get !== void 0 && (_planner$get = _planner$get.call(planner, 'scene')) !== null && _planner$get !== void 0 && _planner$get.toJS ? planner.get('scene').toJS() : (planner === null || planner === void 0 || (_planner$get2 = planner.get) === null || _planner$get2 === void 0 ? void 0 : _planner$get2.call(planner, 'scene')) || null;
398
- onSave({
399
- type: 'save',
400
- payload: {
401
- scene: currentScene
402
- }
403
- });
404
- } catch (e) {
405
- onError === null || onError === void 0 || onError({
406
- type: 'save-error',
407
- error: e
408
- });
409
- }
410
- }
411
- });
412
- return function () {
413
- return unsubscribe();
414
- };
415
- }, [store, onEvent, onSave, onError]);
416
- useEffect(function () {
417
- if (projectElement.length === 0) return;
418
- if (!catalogInitiated) return;
419
- sessionStorage.setItem('projectTitle', projectElement[0].title);
420
- store.dispatch(rename(projectElement[0].title));
421
- sessionStorage.setItem('projectId', projectElement[0].id);
422
- sessionStorage.setItem('email', projectElement[0].email);
423
- sessionStorage.setItem('firstName', projectElement[0].firstName);
424
- sessionStorage.setItem('lastName', projectElement[0].lastName);
425
- sessionStorage.setItem('phone', projectElement[0].phone);
426
- var jsonData;
427
- jsonData = JSON.parse(projectElement[0].project_data);
428
- jsonData.isLoadingCabinet = false;
429
- store.dispatch(loadProject(jsonData, categoryData));
430
- }, [project_data, catalogInitiated]);
431
- return /*#__PURE__*/React.createElement(AppContext.Provider, null, /*#__PURE__*/React.createElement(Provider, {
432
- store: store
433
- }, /*#__PURE__*/React.createElement(KitchenConfigurator, _extends({
434
- catalog: MyCatalog,
435
- width: width,
436
- height: height,
437
- logoImage: logoImg,
438
- companyURL: companyUrl,
439
- plugins: plugins,
440
- toolbarButtons: toolbarButtons,
441
- stateExtractor: function stateExtractor(state) {
442
- return state.get('KitchenConfigurator');
443
- },
444
- categoryData: categoryData,
445
- data: data,
446
- configData: configData,
447
- onEvent: onEvent,
448
- onSave: onSave,
449
- onError: onError
450
- }, passThrough))));
451
- }
452
-
453
- /* ============================== prop types ============================== */
454
-
455
- KitchenConfiguratorApp.propTypes = {
456
- width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
457
- height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
458
- projectElement: PropTypes.arrayOf(PropTypes.object),
459
- categoryData: PropTypes.any,
460
- dataBundle: PropTypes.any,
461
- configData: PropTypes.any,
462
- catalog: PropTypes.oneOfType([PropTypes.object, PropTypes.instanceOf(Models.Catalog)]),
463
- logoImg: PropTypes.any,
464
- companyUrl: PropTypes.string,
465
- toolbarButtons: PropTypes.any,
466
- options: PropTypes.object,
467
- user: PropTypes.object,
468
- auth: PropTypes.object,
469
- featureFlags: PropTypes.object,
470
- sentry: PropTypes.shape({
471
- dsn: PropTypes.string,
472
- environment: PropTypes.string
473
- }),
474
- onEvent: PropTypes.func,
475
- onSave: PropTypes.func,
476
- onError: PropTypes.func,
477
- store: PropTypes.object
478
- };
@@ -1,14 +0,0 @@
1
- import { SELECT_AREA, SET_FLOOR_STYLES } from "../constants";
2
- export function selectArea(layerID, areaID) {
3
- return {
4
- type: SELECT_AREA,
5
- layerID: layerID,
6
- areaID: areaID
7
- };
8
- }
9
- export function setFloorStyles(texture) {
10
- return {
11
- type: SET_FLOOR_STYLES,
12
- texture: texture
13
- };
14
- }
@@ -1,23 +0,0 @@
1
- import * as projectActions from "./project-actions";
2
- import * as viewer2DActions from "./viewer2d-actions";
3
- import * as viewer3DActions from "./viewer3d-actions";
4
- import * as linesActions from "./lines-actions";
5
- import * as holesActions from "./holes-actions";
6
- import * as sceneActions from "./scene-actions";
7
- import * as verticesActions from "./vertices-actions";
8
- import * as itemsActions from "./items-actions";
9
- import * as areaActions from "./area-actions";
10
- import * as groupsActions from "./groups-actions";
11
- export { projectActions, viewer2DActions, viewer3DActions, linesActions, holesActions, sceneActions, verticesActions, itemsActions, areaActions, groupsActions };
12
- export default {
13
- projectActions: projectActions,
14
- viewer2DActions: viewer2DActions,
15
- viewer3DActions: viewer3DActions,
16
- linesActions: linesActions,
17
- holesActions: holesActions,
18
- sceneActions: sceneActions,
19
- verticesActions: verticesActions,
20
- itemsActions: itemsActions,
21
- areaActions: areaActions,
22
- groupsActions: groupsActions
23
- };
@@ -1,89 +0,0 @@
1
- import { GROUP_ACTIONS } from "../constants";
2
- export function addGroup() {
3
- return {
4
- type: GROUP_ACTIONS.ADD_GROUP
5
- };
6
- }
7
- export function addGroupFromSelected() {
8
- return {
9
- type: GROUP_ACTIONS.ADD_GROUP_FROM_SELECTED
10
- };
11
- }
12
- export function selectGroup(groupID) {
13
- return {
14
- type: GROUP_ACTIONS.SELECT_GROUP,
15
- groupID: groupID
16
- };
17
- }
18
- export function unselectGroup(groupID) {
19
- return {
20
- type: GROUP_ACTIONS.UNSELECT_GROUP,
21
- groupID: groupID
22
- };
23
- }
24
- export function addToGroup(groupID, layerID, elementPrototype, elementID) {
25
- return {
26
- type: GROUP_ACTIONS.ADD_TO_GROUP,
27
- groupID: groupID,
28
- layerID: layerID,
29
- elementPrototype: elementPrototype,
30
- elementID: elementID
31
- };
32
- }
33
- export function removeFromGroup(groupID, layerID, elementPrototype, elementID) {
34
- return {
35
- type: GROUP_ACTIONS.REMOVE_FROM_GROUP,
36
- groupID: groupID,
37
- layerID: layerID,
38
- elementPrototype: elementPrototype,
39
- elementID: elementID
40
- };
41
- }
42
- export function setGroupAttributes(groupID, attributes) {
43
- return {
44
- type: GROUP_ACTIONS.SET_GROUP_ATTRIBUTES,
45
- groupID: groupID,
46
- attributes: attributes
47
- };
48
- }
49
- export function setGroupProperties(groupID, properties) {
50
- return {
51
- type: GROUP_ACTIONS.SET_GROUP_PROPERTIES,
52
- groupID: groupID,
53
- properties: properties
54
- };
55
- }
56
- export function setGroupBarycenter(groupID, barycenter) {
57
- return {
58
- type: GROUP_ACTIONS.SET_GROUP_BARYCENTER,
59
- groupID: groupID,
60
- barycenter: barycenter
61
- };
62
- }
63
- export function removeGroup(groupID) {
64
- return {
65
- type: GROUP_ACTIONS.REMOVE_GROUP,
66
- groupID: groupID
67
- };
68
- }
69
- export function removeGroupAndDeleteElements(groupID) {
70
- return {
71
- type: GROUP_ACTIONS.REMOVE_GROUP_AND_DELETE_ELEMENTS,
72
- groupID: groupID
73
- };
74
- }
75
- export function groupTranslate(groupID, x, y) {
76
- return {
77
- type: GROUP_ACTIONS.GROUP_TRANSLATE,
78
- groupID: groupID,
79
- x: x,
80
- y: y
81
- };
82
- }
83
- export function groupRotate(groupID, rotation) {
84
- return {
85
- type: GROUP_ACTIONS.GROUP_ROTATE,
86
- groupID: groupID,
87
- rotation: rotation
88
- };
89
- }