kitchen-simulator 1.1.1-test.48 → 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 +1 -1
  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 -25
  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,33 +0,0 @@
1
- var sessionStorage = window.hasOwnProperty('sessionStorage') ? window.sessionStorage : false;
2
- import { loadProject } from "../actions/project-actions";
3
- var TIMEOUT_DELAY = 500;
4
- var timeout = null;
5
- export default function autosave(autosaveKey, revert, delay) {
6
- return function (store, stateExtractor) {
7
- delay = delay || TIMEOUT_DELAY;
8
- if (revert === undefined) return;
9
- if (!autosaveKey) return;
10
- if (!sessionStorage) return;
11
-
12
- //revert
13
- if (revert && sessionStorage.getItem(autosaveKey) !== null) {
14
- var data = sessionStorage.getItem(autosaveKey);
15
- var json = JSON.parse(data);
16
- store.dispatch(loadProject(json));
17
- }
18
-
19
- //update
20
- store.subscribe(function () {
21
- if (timeout) clearTimeout(timeout);
22
- timeout = setTimeout(function () {
23
- var state = stateExtractor(store.getState());
24
- // sessionStorage.setItem(autosaveKey, JSON.stringify(state.scene.toJS()));
25
- /*let scene = state.sceneHistory.last;
26
- if (scene) {
27
- let json = JSON.stringify(scene.toJS());
28
- sessionStorage.setItem(autosaveKey, json);
29
- }*/
30
- }, delay);
31
- });
32
- };
33
- }
@@ -1,37 +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
- 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; }
3
- 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; }
4
- 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; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
- 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); }
7
- import actions from "../actions/export";
8
- export default function consoleDebugger() {
9
- return function (store, stateExtractor) {
10
- window.KitchenConfigurator = _objectSpread(_objectSpread({}, actions), {}, {
11
- getStore: function getStore() {
12
- return store;
13
- },
14
- getState: function getState() {
15
- return stateExtractor(store.getState());
16
- },
17
- "do": function _do(actions) {
18
- var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
19
- actions = actions.reverse();
20
- var dispatch = store.dispatch;
21
- var _dispatchAction = function dispatchAction() {
22
- console.info("There are other ".concat(actions.length, " actions on stack"));
23
- if (actions.length === 0) return;
24
- dispatch(actions.pop());
25
- if (actions.length === 0) return;
26
- setTimeout(_dispatchAction, delay);
27
- };
28
- setTimeout(_dispatchAction, 0);
29
- }
30
- });
31
- console.groupCollapsed('KitchenConfigurator');
32
- console.info('KitchenConfigurator is ready');
33
- console.info('console.log(KitchenConfigurator)');
34
- console.log(window.KitchenConfigurator);
35
- console.groupEnd();
36
- };
37
- }
@@ -1,9 +0,0 @@
1
- import Autosave from "./autosave";
2
- import Keyboard from "./keyboard";
3
- import ConsoleDebugger from "./console-debugger";
4
- export { Autosave, Keyboard, ConsoleDebugger };
5
- export default {
6
- Autosave: Autosave,
7
- Keyboard: Keyboard,
8
- ConsoleDebugger: ConsoleDebugger
9
- };
@@ -1,101 +0,0 @@
1
- import { KEYBOARD_BUTTON_CODE, MODE_3D_FIRST_PERSON, MODE_3D_VIEW, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, MODE_SNAPPING } from "../constants";
2
- import { copyProperties, pasteProperties, recreate, redo, remove, rollback, shift2doff, shift2don, toggleSnap, uncreate, undo } from "../actions/project-actions";
3
- export default function keyboard() {
4
- return function (store, stateExtractor) {
5
- window.addEventListener('keydown', function (event) {
6
- var state = stateExtractor(store.getState());
7
- var mode = state.get('mode');
8
- switch (event.keyCode) {
9
- case KEYBOARD_BUTTON_CODE.BACKSPACE:
10
- case KEYBOARD_BUTTON_CODE.DELETE:
11
- {
12
- if ([MODE_IDLE, MODE_3D_FIRST_PERSON, MODE_3D_VIEW, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, MODE_DRAGGING_ITEM_3D].includes(mode)) store.dispatch(remove());
13
- break;
14
- }
15
- case KEYBOARD_BUTTON_CODE.ESC:
16
- {
17
- store.dispatch(rollback());
18
- break;
19
- }
20
- case KEYBOARD_BUTTON_CODE.Z:
21
- {
22
- if (event.getModifierState('Control') || event.getModifierState('Meta')) store.dispatch(undo());
23
- break;
24
- }
25
- case KEYBOARD_BUTTON_CODE.Q:
26
- {
27
- if (event.getModifierState('Control') || event.getModifierState('Meta')) store.dispatch(redo());
28
- break;
29
- }
30
- case KEYBOARD_BUTTON_CODE.ALT:
31
- {
32
- if (MODE_SNAPPING.includes(mode)) store.dispatch(toggleSnap(state.snapMask.merge({
33
- SNAP_POINT: false,
34
- SNAP_LINE: false,
35
- SNAP_SEGMENT: false,
36
- SNAP_GRID: false,
37
- SNAP_GUIDE: false,
38
- tempSnapConfiguartion: state.snapMask.toJS()
39
- })));
40
- break;
41
- }
42
- case KEYBOARD_BUTTON_CODE.C:
43
- {
44
- var selectedLayer = state.getIn(['scene', 'selectedLayer']);
45
- var selected = state.getIn(['scene', 'layers', selectedLayer, 'selected']);
46
- if ((mode === MODE_IDLE || mode === MODE_3D_VIEW) && (selected.holes.size || selected.areas.size || selected.items.size || selected.lines.size)) {
47
- if (selected.holes.size) {
48
- var hole = state.getIn(['scene', 'layers', selectedLayer, 'holes', selected.holes.get(0)]);
49
- store.dispatch(copyProperties(hole.get('properties')));
50
- } else if (selected.areas.size) {
51
- var area = state.getIn(['scene', 'layers', selectedLayer, 'areas', selected.areas.get(0)]);
52
- store.dispatch(copyProperties(area.properties));
53
- } else if (selected.items.size) {
54
- var item = state.getIn(['scene', 'layers', selectedLayer, 'items', selected.items.get(0)]);
55
- store.dispatch(copyProperties(item.properties));
56
- } else if (selected.lines.size) {
57
- var line = state.getIn(['scene', 'layers', selectedLayer, 'lines', selected.lines.get(0)]);
58
- store.dispatch(copyProperties(line.properties));
59
- }
60
- }
61
- break;
62
- }
63
- case KEYBOARD_BUTTON_CODE.V:
64
- {
65
- store.dispatch(pasteProperties());
66
- break;
67
- }
68
- case KEYBOARD_BUTTON_CODE.SHIFT:
69
- {
70
- if (['TEXTAREA', 'INPUT'].includes(document.activeElement.tagName) === false) {
71
- if ([MODE_DRAWING_ITEM_3D, MODE_IDLE_3D].includes(mode)) store.dispatch(recreate());else if ([MODE_DRAWING_ITEM, MODE_IDLE].includes(mode)) store.dispatch(shift2doff());
72
- }
73
- break;
74
- }
75
- }
76
- });
77
- window.addEventListener('keyup', function (event) {
78
- var state = stateExtractor(store.getState());
79
- var mode = state.get('mode');
80
- switch (event.keyCode) {
81
- case KEYBOARD_BUTTON_CODE.ALT:
82
- {
83
- if (MODE_SNAPPING.includes(mode)) store.dispatch(toggleSnap(state.snapMask.merge(state.snapMask.get('tempSnapConfiguartion'))));
84
- break;
85
- }
86
- case KEYBOARD_BUTTON_CODE.CTRL:
87
- {
88
- // store.dispatch(setAlterateState());
89
- break;
90
- }
91
- case KEYBOARD_BUTTON_CODE.SHIFT:
92
- {
93
- if (['TEXTAREA', 'INPUT'].includes(document.activeElement.tagName) === false) {
94
- if ([MODE_DRAWING_ITEM_3D, MODE_IDLE_3D].includes(mode)) store.dispatch(uncreate());else if ([MODE_DRAWING_ITEM, MODE_IDLE].includes(mode)) store.dispatch(shift2don());
95
- }
96
- break;
97
- }
98
- }
99
- });
100
- };
101
- }
@@ -1,12 +0,0 @@
1
- import { Area } from "../class/export";
2
- import { SELECT_AREA, SET_FLOOR_STYLES } from "../constants";
3
- export default function (state, action) {
4
- switch (action.type) {
5
- case SELECT_AREA:
6
- return Area.select(state, action.layerID, action.areaID).updatedState;
7
- case SET_FLOOR_STYLES:
8
- return Area.setFloorStyles(state, action.texture).updatedState;
9
- default:
10
- return state;
11
- }
12
- }
@@ -1,25 +0,0 @@
1
- import KitchenConfiguratorAreasReducer from "./areas-reducer";
2
- import KitchenConfiguratorHolesReducer from "./holes-reducer";
3
- import KitchenConfiguratorItemsReducer from "./items-reducer";
4
- import KitchenConfiguratorLinesReducer from "./lines-reducer";
5
- import KitchenConfiguratorGroupsReducer from "./groups-reducer";
6
- import KitchenConfiguratorProjectReducer from "./project-reducer";
7
- import KitchenConfiguratorSceneReducer from "./scene-reducer";
8
- import KitchenConfiguratorVerticesReducer from "./vertices-reducer";
9
- import KitchenConfiguratorViewer2dReducer from "./viewer2d-reducer";
10
- import KitchenConfiguratorViewer3dReducer from "./viewer3d-reducer";
11
- import KitchenConfiguratorUserReducer from "./user-reducer";
12
- export { KitchenConfiguratorAreasReducer, KitchenConfiguratorHolesReducer, KitchenConfiguratorItemsReducer, KitchenConfiguratorLinesReducer, KitchenConfiguratorGroupsReducer, KitchenConfiguratorProjectReducer, KitchenConfiguratorSceneReducer, KitchenConfiguratorVerticesReducer, KitchenConfiguratorViewer2dReducer, KitchenConfiguratorViewer3dReducer, KitchenConfiguratorUserReducer };
13
- export default {
14
- KitchenConfiguratorAreasReducer: KitchenConfiguratorAreasReducer,
15
- KitchenConfiguratorHolesReducer: KitchenConfiguratorHolesReducer,
16
- KitchenConfiguratorItemsReducer: KitchenConfiguratorItemsReducer,
17
- KitchenConfiguratorLinesReducer: KitchenConfiguratorLinesReducer,
18
- KitchenConfiguratorGroupsReducer: KitchenConfiguratorGroupsReducer,
19
- KitchenConfiguratorProjectReducer: KitchenConfiguratorProjectReducer,
20
- KitchenConfiguratorSceneReducer: KitchenConfiguratorSceneReducer,
21
- KitchenConfiguratorVerticesReducer: KitchenConfiguratorVerticesReducer,
22
- KitchenConfiguratorViewer2dReducer: KitchenConfiguratorViewer2dReducer,
23
- KitchenConfiguratorViewer3dReducer: KitchenConfiguratorViewer3dReducer,
24
- KitchenConfiguratorUserReducer: KitchenConfiguratorUserReducer
25
- };
@@ -1,38 +0,0 @@
1
- import { GROUP_ACTIONS } from "../constants";
2
- import { Group } from "../class/export";
3
- import { history } from "../utils/export";
4
- export default function (state, action) {
5
- state = state.merge({
6
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
7
- });
8
- switch (action.type) {
9
- case GROUP_ACTIONS.ADD_GROUP:
10
- return Group.create(state).updatedState;
11
- case GROUP_ACTIONS.ADD_GROUP_FROM_SELECTED:
12
- return Group.createFromSelectedElements(state).updatedState;
13
- case GROUP_ACTIONS.SELECT_GROUP:
14
- return Group.select(state, action.groupID).updatedState;
15
- case GROUP_ACTIONS.UNSELECT_GROUP:
16
- return Group.unselect(state, action.groupID).updatedState;
17
- case GROUP_ACTIONS.ADD_TO_GROUP:
18
- return Group.addElement(state, action.groupID, action.layerID, action.elementPrototype, action.elementID).updatedState;
19
- case GROUP_ACTIONS.REMOVE_FROM_GROUP:
20
- return Group.removeElement(state, action.groupID, action.layerID, action.elementPrototype, action.elementID).updatedState;
21
- case GROUP_ACTIONS.SET_GROUP_ATTRIBUTES:
22
- return Group.setAttributes(state, action.groupID, action.attributes).updatedState;
23
- case GROUP_ACTIONS.SET_GROUP_PROPERTIES:
24
- return Group.setProperties(state, action.groupID, action.properties).updatedState;
25
- case GROUP_ACTIONS.SET_GROUP_BARYCENTER:
26
- return Group.setBarycenter(state, action.groupID, action.barycenter.get('x'), action.barycenter.get('y')).updatedState;
27
- case GROUP_ACTIONS.REMOVE_GROUP:
28
- return Group.remove(state, action.groupID).updatedState;
29
- case GROUP_ACTIONS.REMOVE_GROUP_AND_DELETE_ELEMENTS:
30
- return Group.removeAndDeleteElements(state, action.groupID).updatedState;
31
- case GROUP_ACTIONS.GROUP_TRANSLATE:
32
- return Group.translate(state, action.groupID, action.x, action.y).updatedState;
33
- case GROUP_ACTIONS.GROUP_ROTATE:
34
- return Group.rotate(state, action.groupID, action.rotation).updatedState;
35
- default:
36
- return state;
37
- }
38
- }
@@ -1,62 +0,0 @@
1
- import { Hole } from "../class/export";
2
- import { history } from "../utils/export";
3
- import { BEGIN_DRAGGING_HOLE, BEGIN_DRAGGING_HOLE_3D, END_CREATING_HOLE, END_DRAGGING_HOLE, END_DRAGGING_HOLE_3D, END_DRAWING_HOLE, END_DRAWING_HOLE_3D, SELECT_HOLE, SELECT_TOOL_DRAWING_HOLE, SELECT_TOOL_DRAWING_HOLE_3D, UPDATE_DRAGGING_HOLE, UPDATE_DRAGGING_HOLE_CHANGED, UPDATE_DRAGGING_HOLE_RULER_CHANGED, UPDATE_DRAWING_HOLE, UPDATE_DRAWING_HOLE_3D, UPDATE_POPUP_OPEN } from "../constants";
4
- export default function (state, action) {
5
- switch (action.type) {
6
- case UPDATE_DRAGGING_HOLE_RULER_CHANGED:
7
- return Hole.updateDraggingHoleRulerChanged(state, action.width, action.layerID, action.holeID).updatedState;
8
- case UPDATE_DRAGGING_HOLE_CHANGED:
9
- return Hole.updateDraggingHoleChanged(state, action.x, action.y, action.layerID, action.holeID).updatedState;
10
- case END_CREATING_HOLE:
11
- return Hole.endCreatingHole(state).updatedState;
12
- case UPDATE_POPUP_OPEN:
13
- return Hole.updatePopupOpen(state, action.value).updatedState;
14
- case SELECT_TOOL_DRAWING_HOLE:
15
- state = state.merge({
16
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
17
- });
18
- return Hole.selectToolDrawingHole(state, action.sceneComponentType).updatedState;
19
- case SELECT_TOOL_DRAWING_HOLE_3D:
20
- return Hole.selectToolDrawingHole3D(state, action.sceneComponentType).updatedState;
21
- case UPDATE_DRAWING_HOLE:
22
- return Hole.updateDrawingHole(state, action.layerID, action.x, action.y).updatedState;
23
- case UPDATE_DRAWING_HOLE_3D:
24
- return Hole.updateDrawingHole3D(state, action.layerID, action.x, action.y).updatedState;
25
- case END_DRAWING_HOLE:
26
- state = state.merge({
27
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
28
- });
29
- return Hole.endDrawingHole(state, action.layerID, action.x, action.y).updatedState;
30
- case END_DRAWING_HOLE_3D:
31
- state = state.merge({
32
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
33
- });
34
- return Hole.endDrawingHole3D(state, action.layerID, action.x, action.y).updatedState;
35
- case BEGIN_DRAGGING_HOLE:
36
- state = state.merge({
37
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
38
- });
39
- return Hole.beginDraggingHole(state, action.layerID, action.holeID, action.x, action.y).updatedState;
40
- case BEGIN_DRAGGING_HOLE_3D:
41
- state = state.merge({
42
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
43
- });
44
- return Hole.beginDraggingHole3D(state, action.layerID, action.holeID, action.x, action.y).updatedState;
45
- case UPDATE_DRAGGING_HOLE:
46
- return Hole.updateDraggingHole(state, action.x, action.y).updatedState;
47
- case END_DRAGGING_HOLE:
48
- state = state.merge({
49
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
50
- });
51
- return Hole.endDraggingHole(state, action.x, action.y).updatedState;
52
- case END_DRAGGING_HOLE_3D:
53
- state = state.merge({
54
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
55
- });
56
- return Hole.endDraggingHole3D(state, action.x, action.y).updatedState;
57
- case SELECT_HOLE:
58
- return Hole.select(state, action.layerID, action.holeID).updatedState;
59
- default:
60
- return state;
61
- }
62
- }
@@ -1,140 +0,0 @@
1
- import { Item } from "../class/export";
2
- import { history } from "../utils/export";
3
- import { ANIMATE_OBJECT, BEGIN_DRAGGING_ITEM, BEGIN_DRAGGING_ITEM_3D, BEGIN_ROTATING_ITEM, BEGIN_ROTATING_ITEM_3D, DUPLICATE_SELECTED, EDIT_WIDTH, END_CREATING_CABINET, END_DRAGGING_ITEM, END_DRAGGING_ITEM_3D, END_DRAWING_ITEM, END_LOADING, END_ROTATING_ITEM, END_ROTATING_ITEM_3D, ITEM_MOVE_UP, REMOVE_REPLACE_SUBMODULE, REPLACE_ITEM, REPLACE_SUBMODULE, SELECT_ITEM, SELECT_TOOL_DRAWING_ITEM, SELECT_TOOL_DRAWING_ITEM_3D, SET_APPLIANCE_MATERIAL, SET_BACKSPLASH, SET_BACKSPLASH_VISIBLE, SET_COUNTER_TOP, SET_DOOR_HANDLE, SET_DOOR_STYLE, SET_HANDLE_MATERIAL, SET_INITIAL_DOOR_STYLE, SET_MODELLING, SET_MOLDING, SET_WALL_COLOR, STORE_DIST_ARRAY, TOGGLE_LOADING_CABINET, UPDATE_DRAGGING_ITEM, UPDATE_DRAGGING_ITEM_3DX, UPDATE_DRAGGING_ITEM_3DY, UPDATE_DRAGGING_ITEM_CHANGED, UPDATE_DRAWING_ITEM, UPDATE_ITEM_POSITION, UPDATE_MOLDING, UPDATE_POPUP_OPEN, UPDATE_ROTATING_ITEM, UPDATE_ROTATING_ITEM_CHANGED, VALIDATE_ITEM_POSTIONS } from "../constants";
4
- export default function (state, action) {
5
- switch (action.type) {
6
- case STORE_DIST_ARRAY:
7
- return Item.storeDistArray(state, action.layerID, action.itemID, action.distArray).updatedState;
8
- case VALIDATE_ITEM_POSTIONS:
9
- return Item.validateItemPositions(state, action.layerID).updatedState;
10
- case END_LOADING:
11
- return Item.endLoading(state).updatedState;
12
- case TOGGLE_LOADING_CABINET:
13
- return Item.toggleLoadingCabinet(state).updatedState;
14
- case EDIT_WIDTH:
15
- return Item.editWidth(state, action.newWidth, action.layerID, action.itemID).updatedState;
16
- case DUPLICATE_SELECTED:
17
- return Item.duplicateSelected(state, action.currentObject).updatedState;
18
- case END_CREATING_CABINET:
19
- return Item.endCreatingCabinet(state).updatedState;
20
- case UPDATE_POPUP_OPEN:
21
- return Item.updatePopupOpen(state, action.value).updatedState;
22
- case SELECT_ITEM:
23
- return Item.select(state, action.layerID, action.itemID).updatedState;
24
- case SELECT_TOOL_DRAWING_ITEM:
25
- state = state.merge({
26
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
27
- });
28
- return Item.selectToolDrawingItem(state, action.sceneComponentType, action.oStyle).updatedState;
29
- case REPLACE_ITEM:
30
- return Item.replaceItem(state, action.selectedPos, action.currentObject, action.selectedObject).updatedState;
31
- case UPDATE_DRAWING_ITEM:
32
- return Item.updateDrawingItem(state, action.layerID, action.x, action.y).updatedState;
33
- case END_DRAWING_ITEM:
34
- state = state.merge({
35
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
36
- });
37
- return Item.endDrawingItem(state, action.layerID, action.x, action.y).updatedState;
38
- case BEGIN_DRAGGING_ITEM:
39
- state = state.merge({
40
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
41
- });
42
- return Item.beginDraggingItem(state, action.layerID, action.itemID, action.x, action.y).updatedState;
43
- case BEGIN_DRAGGING_ITEM_3D:
44
- state = state.merge({
45
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
46
- });
47
- return Item.beginDraggingItem3D(state, action.layerID, action.itemID, action.x, action.y).updatedState;
48
- case UPDATE_DRAGGING_ITEM:
49
- return Item.updateDraggingItem(state, action.x, action.y).updatedState;
50
- case UPDATE_DRAGGING_ITEM_CHANGED:
51
- return Item.updateDraggingItemChanged(state, action.x, action.y, action.layerID, action.itemID).updatedState;
52
- case UPDATE_DRAGGING_ITEM_3DX:
53
- return Item.updateDraggingItem3DX(state, action.x).updatedState;
54
- case UPDATE_DRAGGING_ITEM_3DY:
55
- return Item.updateDraggingItem3DY(state, action.y).updatedState;
56
- case END_DRAGGING_ITEM:
57
- state = state.merge({
58
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
59
- });
60
- return Item.endDraggingItem(state, action.x, action.y).updatedState;
61
- case END_DRAGGING_ITEM_3D:
62
- state = state.merge({
63
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
64
- });
65
- return Item.endDraggingItem3D(state).updatedState;
66
- case BEGIN_ROTATING_ITEM:
67
- state = state.merge({
68
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
69
- });
70
- return Item.beginRotatingItem(state, action.layerID, action.itemID, action.x, action.y).updatedState;
71
- case BEGIN_ROTATING_ITEM_3D:
72
- state = state.merge({
73
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
74
- });
75
- return Item.beginRotatingItem3D(state, action.layerID, action.itemID, action.x, action.y, action.centerX, action.centerY).updatedState;
76
- case UPDATE_ROTATING_ITEM:
77
- return Item.updateRotatingItem(state, action.x, action.y).updatedState;
78
- case UPDATE_ROTATING_ITEM_CHANGED:
79
- return Item.updateRotatingItemChanged(state, action.rotation, action.layerID, action.itemID).updatedState;
80
- case END_ROTATING_ITEM:
81
- state = state.merge({
82
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
83
- });
84
- return Item.endRotatingItem(state, action.x, action.y).updatedState;
85
- case END_ROTATING_ITEM_3D:
86
- state = state.merge({
87
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
88
- });
89
- return Item.endRotatingItem3D(state, action.x, action.y).updatedState;
90
- case REPLACE_SUBMODULE:
91
- state = state.merge({
92
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
93
- });
94
- return Item.replaceSubmodule(state, action.url).updatedState;
95
- case ANIMATE_OBJECT:
96
- // state = state.merge({ sceneHistory: history.historyPush(state.sceneHistory, state.scene) });
97
- return Item.animateObject(state, action.value).updatedState;
98
- case REMOVE_REPLACE_SUBMODULE:
99
- return Item.removeReplacingSupport(state).updatedState;
100
- case ITEM_MOVE_UP:
101
- return Item.updateItemsAltitude(state, action.layerID, action.itemID, action.value).updatedState;
102
- case SELECT_TOOL_DRAWING_ITEM_3D:
103
- return Item.selectToolDrawingItem3D(state, action.sceneComponentType).updatedState;
104
- case SET_DOOR_STYLE:
105
- return Item.setDoorStyle(state, action.doorStyle, action.pathes, action.isAll).updatedState;
106
- case SET_HANDLE_MATERIAL:
107
- return Item.setHandleMaterial(state, action.material).updatedState;
108
- case SET_DOOR_HANDLE:
109
- return Item.setDoorHandle(state, action.doorHandle).updatedState;
110
- case SET_COUNTER_TOP:
111
- return Item.setCounterTop(state, action.counterTop).updatedState;
112
- case SET_MOLDING:
113
- return Item.setMolding(state, action.molding, action.isAll).updatedState;
114
- case UPDATE_MOLDING:
115
- return Item.updateMolding(state).updatedState;
116
- case SET_WALL_COLOR:
117
- state = state.merge({
118
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
119
- }); // save history when this actino performed,so undo enable
120
- return Item.setWallColor(state, action.wallColor).updatedState;
121
- case SET_MODELLING:
122
- return Item.setModelling(state, action.model).updatedState;
123
- case SET_BACKSPLASH:
124
- return Item.setBacksplash(state, action.backsplash).updatedState;
125
- case SET_BACKSPLASH_VISIBLE:
126
- return Item.setBacksplashVisible(state, action.itemID, action.backsplashVisible).updatedState;
127
- case SET_APPLIANCE_MATERIAL:
128
- return Item.setApplianceMaterial(state, action.material).updatedState;
129
- case SET_INITIAL_DOOR_STYLE:
130
- return Item.setInitialDoorStyle(state, action.doorStyle, action.oStyle).updatedState;
131
- case UPDATE_ITEM_POSITION:
132
- return Item.updateItemPosition(state, action.layerID, action.itemID, action.pos).updatedState;
133
- // case SET_MOVE_STATUS:
134
- // return state.merge({ moveStatus: action.status });
135
- // case SET_ROTATE_STATUS:
136
- // return state.merge({ rotateStatus: action.status });
137
- default:
138
- return state;
139
- }
140
- }
@@ -1,45 +0,0 @@
1
- import { Line } from "../class/export";
2
- import { history } from "../utils/export";
3
- import { BEGIN_DRAGGING_LINE, BEGIN_DRAWING_LINE, END_DRAGGING_LINE, END_DRAWING_LINE, SELECT_LINE, SELECT_TOOL_DRAWING_LINE, SET_RELATED_LINE, STOP_DRAWING_LINE, UPDATE_DRAGGING_LINE, UPDATE_DRAWING_LINE } from "../constants";
4
- export default function (state, action) {
5
- switch (action.type) {
6
- case SELECT_TOOL_DRAWING_LINE:
7
- sessionStorage.setItem('hintTextShow', true);
8
- setTimeout(function () {
9
- sessionStorage.setItem('hintTextShow', false);
10
- }, 500);
11
- return Line.selectToolDrawingLine(state, action.sceneComponentType).updatedState;
12
- case BEGIN_DRAWING_LINE:
13
- state = state.merge({
14
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
15
- });
16
- return Line.beginDrawingLine(state, action.layerID, action.x, action.y).updatedState;
17
- case UPDATE_DRAWING_LINE:
18
- return Line.updateDrawingLine(state, action.x, action.y, action.relatedLines).updatedState;
19
- case STOP_DRAWING_LINE:
20
- return Line.stopDrawingLine(state).updatedState;
21
- case END_DRAWING_LINE:
22
- state = state.merge({
23
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
24
- });
25
- return Line.endDrawingLine(state, action.x, action.y).updatedState;
26
- case BEGIN_DRAGGING_LINE:
27
- state = state.merge({
28
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
29
- });
30
- return Line.beginDraggingLine(state, action.layerID, action.lineID, action.x, action.y).updatedState;
31
- case UPDATE_DRAGGING_LINE:
32
- return Line.updateDraggingLine(state, action.x, action.y, action.relatedLines).updatedState;
33
- case END_DRAGGING_LINE:
34
- state = state.merge({
35
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
36
- });
37
- return Line.endDraggingLine(state, action.x, action.y, action.relatedLines).updatedState;
38
- case SELECT_LINE:
39
- return Line.select(state, action.layerID, action.lineID).updatedState;
40
- case SET_RELATED_LINE:
41
- return Line.setRelatedLine(state, action.layerID, action.lineID, action.intersection).updatedState;
42
- default:
43
- return state;
44
- }
45
- }
@@ -1,129 +0,0 @@
1
- import { history } from "../utils/export";
2
- import { ADD_CIRCULAR_GUIDE, ADD_HORIZONTAL_GUIDE, ADD_VERTICAL_GUIDE, ALTERATE_STATE, CHANGE_CATALOG_PAGE, COPY_PROPERTIES, GO_BACK_TO_CATALOG_PAGE, INIT_CATALOG, LOAD_PROJECT, MODE_DRAWING_LINE, MODE_IDLE, NEW_PROJECT, OPEN_CATALOG, OPEN_PROJECT_CONFIGURATOR, PASTE_PROPERTIES, PROJECT_RE_NAME, PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY, RECREATE, REDO, REMOVE, REMOVE_CIRCULAR_GUIDE, REMOVE_DRAWING_SUPPORT, REMOVE_HORIZONTAL_GUIDE, REMOVE_VERTICAL_GUIDE, ROLLBACK, SELECT_ALL, SELECT_TOOL_EDIT, SET_HOLES_ATTRIBUTES, SET_IS_CABINET_DRAWING, SET_IS_HELP, SET_ITEMS_ATTRIBUTES, SET_LINES_ATTRIBUTES, SET_MODE, SET_PROJECT_ID, SET_PROJECT_PROPERTIES, SET_PROPERTIES, SET_STATE_PROPERTIES, SHIFT2DOFF, SHIFT2DON, THROW_ERROR, THROW_WARNING, TOGGLE_SNAP, UNCREATE, UNDO, UNSELECT_ALL, UPDATE_MOUSE_COORDS, UPDATE_ZOOM_SCALE } from "../constants";
3
- import { Project } from "../class/export";
4
- export default function (state, action) {
5
- switch (action.type) {
6
- case NEW_PROJECT:
7
- return Project.newProject(state).updatedState;
8
- case LOAD_PROJECT:
9
- return Project.loadProject(state, action.sceneJSON, action.categoryData).updatedState;
10
- case OPEN_CATALOG:
11
- return Project.openCatalog(state).updatedState;
12
- case CHANGE_CATALOG_PAGE:
13
- return Project.changeCatalogPage(state, action.oldPage, action.newPage).updatedState;
14
- case GO_BACK_TO_CATALOG_PAGE:
15
- return Project.goBackToCatalogPage(state, action.newPage).updatedState;
16
- case SELECT_TOOL_EDIT:
17
- return Project.setMode(state, MODE_IDLE).updatedState;
18
- case UNSELECT_ALL:
19
- return Project.unselectAll(state).updatedState;
20
- case SELECT_ALL:
21
- return Project.selectAll(state, action.value).updatedState;
22
- case SET_PROPERTIES:
23
- state = state.merge({
24
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
25
- });
26
- return Project.setProperties(state, state.getIn(['scene', 'selectedLayer']), action.properties).updatedState;
27
- case SET_ITEMS_ATTRIBUTES:
28
- state = state.merge({
29
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
30
- });
31
- return Project.setItemsAttributes(state, action.itemsAttributes).updatedState;
32
- case SET_LINES_ATTRIBUTES:
33
- if (state.mode != MODE_DRAWING_LINE) state = state.merge({
34
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
35
- });
36
- return Project.setLinesAttributes(state, action.linesAttributes, action.isDirect, action.directData).updatedState;
37
- case SET_HOLES_ATTRIBUTES:
38
- state = state.merge({
39
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
40
- });
41
- return Project.setHolesAttributes(state, action.holesAttributes).updatedState;
42
- case REMOVE:
43
- state = state.merge({
44
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
45
- });
46
- return Project.remove(state).updatedState;
47
- case UNDO:
48
- return Project.undo(state).updatedState;
49
- case REDO:
50
- return Project.redo(state).updatedState;
51
- case UNCREATE:
52
- return Project.uncreate(state).updatedState;
53
- case PROJECT_RE_NAME:
54
- return Project.rename(state, action.name).updatedState;
55
- case RECREATE:
56
- return Project.recreate(state).updatedState;
57
- case SHIFT2DOFF:
58
- return Project.shift2doff(state).updatedState;
59
- case SHIFT2DON:
60
- return Project.shift2don(state).updatedState;
61
- case ROLLBACK:
62
- return Project.rollback(state).updatedState;
63
- case SET_PROJECT_PROPERTIES:
64
- state = state.merge({
65
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
66
- });
67
- return Project.setProjectProperties(state, action.properties).updatedState;
68
- case SET_PROJECT_ID:
69
- state = state.merge({
70
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
71
- });
72
- return Project.setProjectId(state, action.id).updatedState;
73
- case OPEN_PROJECT_CONFIGURATOR:
74
- state = state.merge({
75
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
76
- });
77
- return Project.openProjectConfigurator(state).updatedState;
78
- case INIT_CATALOG:
79
- return Project.initCatalog(state, action.catalog).updatedState;
80
- case UPDATE_MOUSE_COORDS:
81
- return Project.updateMouseCoord(state, action.coords).updatedState;
82
- case UPDATE_ZOOM_SCALE:
83
- return Project.updateZoomScale(state, action.scale).updatedState;
84
- case TOGGLE_SNAP:
85
- return Project.toggleSnap(state, action.mask).updatedState;
86
- case THROW_ERROR:
87
- return Project.throwError(state, action.error).updatedState;
88
- case THROW_WARNING:
89
- return Project.throwWarning(state, action.warning).updatedState;
90
- case COPY_PROPERTIES:
91
- return Project.copyProperties(state, action.properties).updatedState;
92
- case PASTE_PROPERTIES:
93
- state = state.merge({
94
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
95
- });
96
- return Project.pasteProperties(state).updatedState;
97
- case PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY:
98
- return Project.pushLastSelectedCatalogElementToHistory(state, action.element).updatedState;
99
- case ALTERATE_STATE:
100
- return Project.setAlterate(state).updatedState;
101
- case SET_MODE:
102
- return Project.setMode(state, action.mode).updatedState;
103
- case ADD_HORIZONTAL_GUIDE:
104
- state = state.merge({
105
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
106
- });
107
- return Project.addHorizontalGuide(state, action.coordinate).updatedState;
108
- case ADD_VERTICAL_GUIDE:
109
- return Project.addVerticalGuide(state, action.coordinate).updatedState;
110
- case ADD_CIRCULAR_GUIDE:
111
- return Project.addCircularGuide(state, action.x, action.y, action.radius).updatedState;
112
- case REMOVE_HORIZONTAL_GUIDE:
113
- return Project.removeHorizontalGuide(state, action.guideID).updatedState;
114
- case REMOVE_VERTICAL_GUIDE:
115
- return Project.removeVerticalGuide(state, action.guideID).updatedState;
116
- case REMOVE_CIRCULAR_GUIDE:
117
- return Project.removeCircularGuide(state, action.guideID).updatedState;
118
- case REMOVE_DRAWING_SUPPORT:
119
- return Project.removeDrawingSupport(state).updatedState;
120
- case SET_STATE_PROPERTIES:
121
- return Project.setStateProperties(state, action.properties).updatedState;
122
- case SET_IS_HELP:
123
- return Project.setIsHelp(state, action.isHelp).updatedState;
124
- case SET_IS_CABINET_DRAWING:
125
- return Project.setIsCabinetDrawing(state, action.isCabinetDrawing).updatedState;
126
- default:
127
- return state;
128
- }
129
- }