kitchen-simulator 1.1.1-test.7 → 1.1.1-test.70

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 (354) hide show
  1. package/es/@history.js +8 -2
  2. package/es/AppContext.js +8 -3
  3. package/es/KitchenConfigurator.js +93 -106
  4. package/es/KitchenConfiguratorApp.js +143 -154
  5. package/es/actions/area-actions.js +10 -5
  6. package/es/actions/export.js +27 -12
  7. package/es/actions/groups-actions.js +43 -27
  8. package/es/actions/holes-actions.js +53 -34
  9. package/es/actions/items-actions.js +143 -94
  10. package/es/actions/lines-actions.js +34 -21
  11. package/es/actions/project-actions.js +143 -94
  12. package/es/actions/scene-actions.js +19 -11
  13. package/es/actions/vertices-actions.js +13 -7
  14. package/es/actions/viewer2d-actions.js +34 -21
  15. package/es/actions/viewer3d-actions.js +16 -9
  16. package/es/catalog/areas/area/planner-element.js +16 -8
  17. package/es/catalog/catalog.js +19 -24
  18. package/es/catalog/factories/area-factory-3d.js +29 -22
  19. package/es/catalog/factories/area-factory.js +18 -14
  20. package/es/catalog/factories/export.js +12 -6
  21. package/es/catalog/factories/wall-factory-3d.js +39 -31
  22. package/es/catalog/factories/wall-factory.js +29 -21
  23. package/es/catalog/holes/door-closet/planner-element.js +22 -15
  24. package/es/catalog/holes/door-double/planner-element.js +22 -15
  25. package/es/catalog/holes/door-exterior/planner-element.js +23 -16
  26. package/es/catalog/holes/door-interior/planner-element.js +23 -16
  27. package/es/catalog/holes/door-panic/planner-element.js +14 -7
  28. package/es/catalog/holes/door-panic-double/planner-element.js +22 -15
  29. package/es/catalog/holes/door-sliding/planner-element.js +23 -16
  30. package/es/catalog/holes/doorway-framed/planner-element.js +18 -11
  31. package/es/catalog/holes/doorway-frameless/planner-element.js +14 -7
  32. package/es/catalog/holes/export.js +31 -13
  33. package/es/catalog/holes/window-clear/planner-element.js +17 -10
  34. package/es/catalog/holes/window-cross/planner-element.js +17 -10
  35. package/es/catalog/holes/window-double-hung/planner-element.js +17 -10
  36. package/es/catalog/holes/window-vertical/planner-element.js +17 -10
  37. package/es/catalog/lines/wall/planner-element.js +19 -11
  38. package/es/catalog/molding/molding-dcm/planner-element.js +12 -5
  39. package/es/catalog/molding/molding-fbm/planner-element.js +12 -5
  40. package/es/catalog/molding/molding-lrm/planner-element.js +12 -5
  41. package/es/catalog/properties/export.js +33 -20
  42. package/es/catalog/properties/property-checkbox.js +82 -35
  43. package/es/catalog/properties/property-color.js +21 -16
  44. package/es/catalog/properties/property-enum.js +70 -28
  45. package/es/catalog/properties/property-hidden.js +14 -9
  46. package/es/catalog/properties/property-lenght-measure.js +43 -39
  47. package/es/catalog/properties/property-length-measure.js +82 -34
  48. package/es/catalog/properties/property-length-measure_hole.js +43 -39
  49. package/es/catalog/properties/property-number.js +22 -17
  50. package/es/catalog/properties/property-read-only.js +21 -16
  51. package/es/catalog/properties/property-string.js +21 -16
  52. package/es/catalog/properties/property-toggle.js +21 -16
  53. package/es/catalog/properties/shared-property-style.js +5 -1
  54. package/es/catalog/utils/FuseUtils.js +13 -11
  55. package/es/catalog/utils/exporter.js +13 -11
  56. package/es/catalog/utils/geom-utils.js +27 -13
  57. package/es/catalog/utils/item-loader.js +95 -91
  58. package/es/catalog/utils/load-obj.js +26 -20
  59. package/es/catalog/utils/mtl-loader.js +7 -3
  60. package/es/catalog/utils/obj-loader.js +7 -3
  61. package/es/class/FuseUtils.js +13 -11
  62. package/es/class/area.js +26 -26
  63. package/es/class/export.js +38 -23
  64. package/es/class/group.js +57 -62
  65. package/es/class/guide.js +19 -19
  66. package/es/class/hole.js +87 -88
  67. package/es/class/item.js +148 -155
  68. package/es/class/layer.js +63 -63
  69. package/es/class/line.js +141 -144
  70. package/es/class/project.js +96 -94
  71. package/es/class/vertex.js +33 -33
  72. package/es/components/content.js +27 -19
  73. package/es/components/disclaimer/disclaimer.js +79 -93
  74. package/es/components/export.js +15 -8
  75. package/es/components/style/button.js +29 -30
  76. package/es/components/style/cancel-button.js +12 -8
  77. package/es/components/style/content-container.js +14 -12
  78. package/es/components/style/content-title.js +18 -15
  79. package/es/components/style/delete-button.js +15 -9
  80. package/es/components/style/export.js +48 -30
  81. package/es/components/style/form-block.js +13 -12
  82. package/es/components/style/form-color-input.js +12 -8
  83. package/es/components/style/form-label.js +13 -12
  84. package/es/components/style/form-number-input.js +71 -47
  85. package/es/components/style/form-number-input_2.js +42 -42
  86. package/es/components/style/form-select.js +58 -14
  87. package/es/components/style/form-slider.js +36 -16
  88. package/es/components/style/form-submit-button.js +15 -9
  89. package/es/components/style/form-text-input.js +55 -37
  90. package/es/components/viewer2d/area.js +22 -17
  91. package/es/components/viewer2d/export.js +48 -30
  92. package/es/components/viewer2d/grids/grid-horizontal-streak.js +15 -11
  93. package/es/components/viewer2d/grids/grid-streak.js +15 -11
  94. package/es/components/viewer2d/grids/grid-vertical-streak.js +15 -11
  95. package/es/components/viewer2d/grids/grids.js +17 -15
  96. package/es/components/viewer2d/group.js +22 -15
  97. package/es/components/viewer2d/item.js +68 -68
  98. package/es/components/viewer2d/layer.js +28 -23
  99. package/es/components/viewer2d/line.js +109 -104
  100. package/es/components/viewer2d/ruler.js +27 -23
  101. package/es/components/viewer2d/rulerDist.js +26 -21
  102. package/es/components/viewer2d/rulerX.js +45 -45
  103. package/es/components/viewer2d/rulerY.js +43 -43
  104. package/es/components/viewer2d/scene.js +40 -46
  105. package/es/components/viewer2d/snap.js +20 -13
  106. package/es/components/viewer2d/state.js +25 -23
  107. package/es/components/viewer2d/utils.js +63 -21
  108. package/es/components/viewer2d/vertex.js +15 -8
  109. package/es/components/viewer2d/viewer2d.js +169 -166
  110. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +21 -24
  111. package/es/components/viewer3d/dcm.js +5 -1
  112. package/es/components/viewer3d/fbm.js +5 -1
  113. package/es/components/viewer3d/front3D.js +19 -17
  114. package/es/components/viewer3d/grid-creator.js +15 -8
  115. package/es/components/viewer3d/grids/grid-horizontal-streak.js +12 -6
  116. package/es/components/viewer3d/grids/grid-streak.js +11 -5
  117. package/es/components/viewer3d/grids/grid-vertical-streak.js +12 -6
  118. package/es/components/viewer3d/libs/first-person-controls.js +7 -2
  119. package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +5 -1
  120. package/es/components/viewer3d/libs/mtl-loader.js +6 -2
  121. package/es/components/viewer3d/libs/obj-loader.js +6 -2
  122. package/es/components/viewer3d/libs/orbit-controls.js +10 -5
  123. package/es/components/viewer3d/libs/pointer-lock-controls.js +9 -4
  124. package/es/components/viewer3d/lrm.js +5 -1
  125. package/es/components/viewer3d/model.js +5 -1
  126. package/es/components/viewer3d/pointer-lock-navigation.js +8 -3
  127. package/es/components/viewer3d/ruler-utils/itemRect.js +23 -18
  128. package/es/components/viewer3d/ruler-utils/layer3D.js +64 -59
  129. package/es/components/viewer3d/ruler-utils/ruler3D.js +44 -42
  130. package/es/components/viewer3d/ruler-utils/scene3D.js +16 -11
  131. package/es/components/viewer3d/ruler-utils/state3D.js +9 -4
  132. package/es/components/viewer3d/scene-creator.js +225 -198
  133. package/es/components/viewer3d/three-memory-cleaner.js +10 -3
  134. package/es/components/viewer3d/viewer3d-first-person.js +44 -46
  135. package/es/components/viewer3d/viewer3d.js +206 -209
  136. package/es/constants.js +356 -349
  137. package/es/index.js +20 -15
  138. package/es/models.js +183 -183
  139. package/es/plugins/SVGLoader.js +51 -48
  140. package/es/plugins/autosave.js +7 -3
  141. package/es/plugins/console-debugger.js +10 -8
  142. package/es/plugins/export.js +15 -8
  143. package/es/plugins/keyboard.js +33 -29
  144. package/es/reducers/areas-reducer.js +11 -7
  145. package/es/reducers/export.js +39 -24
  146. package/es/reducers/groups-reducer.js +35 -31
  147. package/es/reducers/holes-reducer.js +47 -43
  148. package/es/reducers/items-reducer.js +110 -109
  149. package/es/reducers/lines-reducer.js +32 -28
  150. package/es/reducers/project-reducer.js +109 -105
  151. package/es/reducers/reducer.js +21 -16
  152. package/es/reducers/scene-reducer.js +19 -15
  153. package/es/reducers/user-reducer.js +9 -6
  154. package/es/reducers/vertices-reducer.js +15 -11
  155. package/es/reducers/viewer2d-reducer.js +22 -18
  156. package/es/reducers/viewer3d-reducer.js +20 -16
  157. package/es/shared-style.js +14 -10
  158. package/es/styles/export.js +9 -3
  159. package/es/translator/en.js +5 -1
  160. package/es/translator/it.js +5 -1
  161. package/es/translator/ru.js +5 -1
  162. package/es/translator/translator.js +17 -17
  163. package/es/utils/browser.js +7 -2
  164. package/es/utils/convert-units-lite.js +33 -0
  165. package/es/utils/email-validator.js +5 -1
  166. package/es/utils/export.js +32 -15
  167. package/es/utils/geometry.js +277 -191
  168. package/es/utils/get-edges-of-subgraphs.js +7 -1
  169. package/es/utils/graph-cycles.js +9 -9
  170. package/es/utils/graph-inner-cycles.js +16 -10
  171. package/es/utils/graph.js +15 -12
  172. package/es/utils/helper.js +61 -109
  173. package/es/utils/history.js +13 -8
  174. package/es/utils/id-broker.js +13 -12
  175. package/es/utils/logger.js +5 -1
  176. package/es/utils/math.js +10 -5
  177. package/es/utils/molding.js +175 -158
  178. package/es/utils/name-generator.js +11 -11
  179. package/es/utils/objects-utils.js +17 -7
  180. package/es/utils/phone-validator.js +5 -1
  181. package/es/utils/process-black-list.js +8 -6
  182. package/es/utils/react-if.js +10 -6
  183. package/es/utils/snap-scene.js +32 -32
  184. package/es/utils/snap.js +57 -51
  185. package/es/utils/summarizeCart.js +5 -1
  186. package/es/utils/threeCSG.es6.js +20 -17
  187. package/es/version.js +5 -1
  188. package/lib/@history.js +3 -2
  189. package/lib/AppContext.js +3 -2
  190. package/lib/KitchenConfigurator.js +70 -88
  191. package/lib/KitchenConfiguratorApp.js +98 -113
  192. package/lib/actions/export.js +1 -1
  193. package/lib/catalog/areas/area/planner-element.js +13 -8
  194. package/lib/catalog/catalog.js +9 -16
  195. package/lib/catalog/factories/area-factory-3d.js +1 -1
  196. package/lib/catalog/factories/area-factory.js +6 -7
  197. package/lib/catalog/factories/export.js +1 -1
  198. package/lib/catalog/factories/wall-factory-3d.js +4 -4
  199. package/lib/catalog/factories/wall-factory.js +4 -3
  200. package/lib/catalog/holes/door-closet/planner-element.js +4 -3
  201. package/lib/catalog/holes/door-double/planner-element.js +4 -3
  202. package/lib/catalog/holes/door-exterior/planner-element.js +4 -3
  203. package/lib/catalog/holes/door-interior/planner-element.js +4 -3
  204. package/lib/catalog/holes/door-panic/planner-element.js +4 -3
  205. package/lib/catalog/holes/door-panic-double/planner-element.js +4 -3
  206. package/lib/catalog/holes/door-sliding/planner-element.js +4 -3
  207. package/lib/catalog/holes/doorway-framed/planner-element.js +4 -3
  208. package/lib/catalog/holes/doorway-frameless/planner-element.js +4 -3
  209. package/lib/catalog/holes/export.js +14 -14
  210. package/lib/catalog/holes/window-clear/planner-element.js +4 -3
  211. package/lib/catalog/holes/window-cross/planner-element.js +4 -3
  212. package/lib/catalog/holes/window-double-hung/planner-element.js +4 -3
  213. package/lib/catalog/holes/window-vertical/planner-element.js +4 -3
  214. package/lib/catalog/lines/wall/planner-element.js +16 -11
  215. package/lib/catalog/molding/molding-dcm/planner-element.js +4 -3
  216. package/lib/catalog/molding/molding-fbm/planner-element.js +4 -3
  217. package/lib/catalog/molding/molding-lrm/planner-element.js +4 -3
  218. package/lib/catalog/properties/export.js +1 -1
  219. package/lib/catalog/properties/property-checkbox.js +68 -25
  220. package/lib/catalog/properties/property-color.js +3 -2
  221. package/lib/catalog/properties/property-enum.js +54 -16
  222. package/lib/catalog/properties/property-hidden.js +3 -2
  223. package/lib/catalog/properties/property-lenght-measure.js +10 -10
  224. package/lib/catalog/properties/property-length-measure.js +61 -17
  225. package/lib/catalog/properties/property-length-measure_hole.js +10 -10
  226. package/lib/catalog/properties/property-number.js +3 -2
  227. package/lib/catalog/properties/property-read-only.js +3 -2
  228. package/lib/catalog/properties/property-string.js +3 -2
  229. package/lib/catalog/properties/property-toggle.js +3 -2
  230. package/lib/catalog/properties/shared-property-style.js +2 -1
  231. package/lib/catalog/utils/FuseUtils.js +10 -11
  232. package/lib/catalog/utils/exporter.js +10 -12
  233. package/lib/catalog/utils/geom-utils.js +1 -1
  234. package/lib/catalog/utils/item-loader.js +29 -35
  235. package/lib/catalog/utils/mtl-loader.js +7 -3
  236. package/lib/catalog/utils/obj-loader.js +7 -3
  237. package/lib/class/FuseUtils.js +10 -11
  238. package/lib/class/area.js +9 -11
  239. package/lib/class/export.js +1 -1
  240. package/lib/class/group.js +13 -20
  241. package/lib/class/guide.js +9 -12
  242. package/lib/class/hole.js +7 -9
  243. package/lib/class/item.js +25 -35
  244. package/lib/class/layer.js +7 -9
  245. package/lib/class/line.js +14 -20
  246. package/lib/class/project.js +10 -11
  247. package/lib/class/vertex.js +9 -11
  248. package/lib/components/content.js +5 -3
  249. package/lib/components/disclaimer/disclaimer.js +69 -88
  250. package/lib/components/export.js +1 -1
  251. package/lib/components/style/button.js +17 -22
  252. package/lib/components/style/cancel-button.js +7 -7
  253. package/lib/components/style/content-container.js +5 -7
  254. package/lib/components/style/content-title.js +10 -12
  255. package/lib/components/style/delete-button.js +8 -8
  256. package/lib/components/style/export.js +1 -1
  257. package/lib/components/style/form-block.js +9 -12
  258. package/lib/components/style/form-color-input.js +7 -7
  259. package/lib/components/style/form-label.js +9 -12
  260. package/lib/components/style/form-number-input.js +43 -23
  261. package/lib/components/style/form-number-input_2.js +15 -19
  262. package/lib/components/style/form-select.js +53 -15
  263. package/lib/components/style/form-slider.js +28 -12
  264. package/lib/components/style/form-submit-button.js +8 -8
  265. package/lib/components/style/form-text-input.js +46 -32
  266. package/lib/components/viewer2d/area.js +8 -7
  267. package/lib/components/viewer2d/export.js +1 -1
  268. package/lib/components/viewer2d/grids/grid-horizontal-streak.js +3 -3
  269. package/lib/components/viewer2d/grids/grid-streak.js +3 -3
  270. package/lib/components/viewer2d/grids/grid-vertical-streak.js +3 -3
  271. package/lib/components/viewer2d/grids/grids.js +6 -10
  272. package/lib/components/viewer2d/group.js +4 -3
  273. package/lib/components/viewer2d/item.js +14 -19
  274. package/lib/components/viewer2d/layer.js +3 -2
  275. package/lib/components/viewer2d/line.js +4 -7
  276. package/lib/components/viewer2d/ruler.js +9 -9
  277. package/lib/components/viewer2d/rulerDist.js +7 -6
  278. package/lib/components/viewer2d/rulerX.js +15 -19
  279. package/lib/components/viewer2d/rulerY.js +15 -19
  280. package/lib/components/viewer2d/scene.js +24 -34
  281. package/lib/components/viewer2d/snap.js +4 -3
  282. package/lib/components/viewer2d/state.js +7 -11
  283. package/lib/components/viewer2d/utils.js +35 -2
  284. package/lib/components/viewer2d/vertex.js +4 -3
  285. package/lib/components/viewer2d/viewer2d.js +40 -41
  286. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +14 -20
  287. package/lib/components/viewer3d/dcm.js +2 -1
  288. package/lib/components/viewer3d/fbm.js +2 -1
  289. package/lib/components/viewer3d/front3D.js +6 -10
  290. package/lib/components/viewer3d/grid-creator.js +4 -3
  291. package/lib/components/viewer3d/grids/grid-horizontal-streak.js +3 -2
  292. package/lib/components/viewer3d/grids/grid-streak.js +3 -2
  293. package/lib/components/viewer3d/grids/grid-vertical-streak.js +3 -2
  294. package/lib/components/viewer3d/libs/mtl-loader.js +7 -2
  295. package/lib/components/viewer3d/libs/obj-loader.js +7 -2
  296. package/lib/components/viewer3d/libs/orbit-controls.js +10 -5
  297. package/lib/components/viewer3d/libs/pointer-lock-controls.js +9 -4
  298. package/lib/components/viewer3d/lrm.js +2 -1
  299. package/lib/components/viewer3d/pointer-lock-navigation.js +1 -1
  300. package/lib/components/viewer3d/ruler-utils/itemRect.js +10 -9
  301. package/lib/components/viewer3d/ruler-utils/layer3D.js +35 -34
  302. package/lib/components/viewer3d/ruler-utils/ruler3D.js +5 -7
  303. package/lib/components/viewer3d/ruler-utils/scene3D.js +4 -5
  304. package/lib/components/viewer3d/ruler-utils/state3D.js +3 -2
  305. package/lib/components/viewer3d/scene-creator.js +40 -45
  306. package/lib/components/viewer3d/three-memory-cleaner.js +1 -1
  307. package/lib/components/viewer3d/viewer3d-first-person.js +13 -17
  308. package/lib/components/viewer3d/viewer3d.js +34 -38
  309. package/lib/index.js +16 -88
  310. package/lib/models.js +58 -63
  311. package/lib/plugins/autosave.js +2 -1
  312. package/lib/plugins/console-debugger.js +5 -7
  313. package/lib/plugins/export.js +1 -1
  314. package/lib/plugins/keyboard.js +2 -1
  315. package/lib/reducers/areas-reducer.js +2 -1
  316. package/lib/reducers/export.js +1 -1
  317. package/lib/reducers/groups-reducer.js +2 -1
  318. package/lib/reducers/holes-reducer.js +2 -1
  319. package/lib/reducers/items-reducer.js +2 -1
  320. package/lib/reducers/lines-reducer.js +2 -1
  321. package/lib/reducers/project-reducer.js +2 -1
  322. package/lib/reducers/scene-reducer.js +2 -1
  323. package/lib/reducers/user-reducer.js +2 -2
  324. package/lib/reducers/vertices-reducer.js +2 -1
  325. package/lib/reducers/viewer2d-reducer.js +5 -5
  326. package/lib/reducers/viewer3d-reducer.js +5 -5
  327. package/lib/styles/export.js +1 -1
  328. package/lib/translator/en.js +2 -1
  329. package/lib/translator/it.js +2 -1
  330. package/lib/translator/ru.js +2 -1
  331. package/lib/translator/translator.js +7 -10
  332. package/lib/utils/convert-units-lite.js +35 -0
  333. package/lib/utils/export.js +2 -2
  334. package/lib/utils/geometry.js +20 -28
  335. package/lib/utils/get-edges-of-subgraphs.js +7 -1
  336. package/lib/utils/graph-cycles.js +9 -9
  337. package/lib/utils/graph-inner-cycles.js +1 -1
  338. package/lib/utils/graph.js +15 -12
  339. package/lib/utils/helper.js +14 -83
  340. package/lib/utils/history.js +1 -1
  341. package/lib/utils/id-broker.js +7 -10
  342. package/lib/utils/molding.js +66 -71
  343. package/lib/utils/name-generator.js +7 -9
  344. package/lib/utils/objects-utils.js +5 -3
  345. package/lib/utils/process-black-list.js +3 -5
  346. package/lib/utils/react-if.js +3 -2
  347. package/lib/utils/snap-scene.js +3 -7
  348. package/lib/utils/snap.js +22 -26
  349. package/lib/utils/threeCSG.es6.js +16 -15
  350. package/package.json +26 -54
  351. package/es/analytics/ga4.js +0 -191
  352. package/es/analytics/posthog.js +0 -60
  353. package/lib/analytics/ga4.js +0 -197
  354. package/lib/analytics/posthog.js +0 -68
@@ -1,128 +1,132 @@
1
- import { history } from "../utils/export";
2
- import { LOAD_PROJECT, NEW_PROJECT, OPEN_CATALOG, SELECT_TOOL_EDIT, MODE_IDLE, UNSELECT_ALL, SELECT_ALL, SET_PROPERTIES, SET_ITEMS_ATTRIBUTES, SET_LINES_ATTRIBUTES, SET_HOLES_ATTRIBUTES, REMOVE, INVERT, UNDO, REDO, RECREATE, UNCREATE, PROJECT_RE_NAME, ROLLBACK, SET_PROJECT_PROPERTIES, SET_PROJECT_ID, OPEN_PROJECT_CONFIGURATOR, INIT_CATALOG, UPDATE_MOUSE_COORDS, UPDATE_ZOOM_SCALE, TOGGLE_SNAP, CHANGE_CATALOG_PAGE, GO_BACK_TO_CATALOG_PAGE, THROW_ERROR, THROW_WARNING, COPY_PROPERTIES, PASTE_PROPERTIES, PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY, ALTERATE_STATE, SET_MODE, ADD_HORIZONTAL_GUIDE, ADD_VERTICAL_GUIDE, ADD_CIRCULAR_GUIDE, REMOVE_HORIZONTAL_GUIDE, REMOVE_VERTICAL_GUIDE, REMOVE_CIRCULAR_GUIDE, REMOVE_DRAWING_SUPPORT, SET_STATE_PROPERTIES, SHIFT2DON, SHIFT2DOFF, MODE_DRAWING_LINE, SET_IS_HELP, SET_IS_CABINET_DRAWING } from "../constants";
3
- import { Project } from "../class/export";
4
- export default function (state, action) {
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = _default;
5
+ var _export = require("../utils/export");
6
+ var _constants = require("../constants");
7
+ var _export2 = require("../class/export");
8
+ function _default(state, action) {
5
9
  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:
10
+ case _constants.NEW_PROJECT:
11
+ return _export2.Project.newProject(state).updatedState;
12
+ case _constants.LOAD_PROJECT:
13
+ return _export2.Project.loadProject(state, action.sceneJSON, action.categoryData).updatedState;
14
+ case _constants.OPEN_CATALOG:
15
+ return _export2.Project.openCatalog(state).updatedState;
16
+ case _constants.CHANGE_CATALOG_PAGE:
17
+ return _export2.Project.changeCatalogPage(state, action.oldPage, action.newPage).updatedState;
18
+ case _constants.GO_BACK_TO_CATALOG_PAGE:
19
+ return _export2.Project.goBackToCatalogPage(state, action.newPage).updatedState;
20
+ case _constants.SELECT_TOOL_EDIT:
21
+ return _export2.Project.setMode(state, _constants.MODE_IDLE).updatedState;
22
+ case _constants.UNSELECT_ALL:
23
+ return _export2.Project.unselectAll(state).updatedState;
24
+ case _constants.SELECT_ALL:
25
+ return _export2.Project.selectAll(state, action.value).updatedState;
26
+ case _constants.SET_PROPERTIES:
23
27
  state = state.merge({
24
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
28
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
25
29
  });
26
- return Project.setProperties(state, state.getIn(['scene', 'selectedLayer']), action.properties).updatedState;
27
- case SET_ITEMS_ATTRIBUTES:
30
+ return _export2.Project.setProperties(state, state.getIn(['scene', 'selectedLayer']), action.properties).updatedState;
31
+ case _constants.SET_ITEMS_ATTRIBUTES:
28
32
  state = state.merge({
29
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
33
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
30
34
  });
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
+ return _export2.Project.setItemsAttributes(state, action.itemsAttributes).updatedState;
36
+ case _constants.SET_LINES_ATTRIBUTES:
37
+ if (state.mode != _constants.MODE_DRAWING_LINE) state = state.merge({
38
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
35
39
  });
36
- return Project.setLinesAttributes(state, action.linesAttributes, action.isDirect, action.directData).updatedState;
37
- case SET_HOLES_ATTRIBUTES:
40
+ return _export2.Project.setLinesAttributes(state, action.linesAttributes, action.isDirect, action.directData).updatedState;
41
+ case _constants.SET_HOLES_ATTRIBUTES:
38
42
  state = state.merge({
39
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
43
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
40
44
  });
41
- return Project.setHolesAttributes(state, action.holesAttributes).updatedState;
42
- case REMOVE:
45
+ return _export2.Project.setHolesAttributes(state, action.holesAttributes).updatedState;
46
+ case _constants.REMOVE:
43
47
  state = state.merge({
44
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
48
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
45
49
  });
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:
50
+ return _export2.Project.remove(state).updatedState;
51
+ case _constants.UNDO:
52
+ return _export2.Project.undo(state).updatedState;
53
+ case _constants.REDO:
54
+ return _export2.Project.redo(state).updatedState;
55
+ case _constants.UNCREATE:
56
+ return _export2.Project.uncreate(state).updatedState;
57
+ case _constants.PROJECT_RE_NAME:
58
+ return _export2.Project.rename(state, action.name).updatedState;
59
+ case _constants.RECREATE:
60
+ return _export2.Project.recreate(state).updatedState;
61
+ case _constants.SHIFT2DOFF:
62
+ return _export2.Project.shift2doff(state).updatedState;
63
+ case _constants.SHIFT2DON:
64
+ return _export2.Project.shift2don(state).updatedState;
65
+ case _constants.ROLLBACK:
66
+ return _export2.Project.rollback(state).updatedState;
67
+ case _constants.SET_PROJECT_PROPERTIES:
64
68
  state = state.merge({
65
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
69
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
66
70
  });
67
- return Project.setProjectProperties(state, action.properties).updatedState;
68
- case SET_PROJECT_ID:
71
+ return _export2.Project.setProjectProperties(state, action.properties).updatedState;
72
+ case _constants.SET_PROJECT_ID:
69
73
  state = state.merge({
70
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
74
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
71
75
  });
72
- return Project.setProjectId(state, action.id).updatedState;
73
- case OPEN_PROJECT_CONFIGURATOR:
76
+ return _export2.Project.setProjectId(state, action.id).updatedState;
77
+ case _constants.OPEN_PROJECT_CONFIGURATOR:
74
78
  state = state.merge({
75
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
79
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
76
80
  });
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:
81
+ return _export2.Project.openProjectConfigurator(state).updatedState;
82
+ case _constants.INIT_CATALOG:
83
+ return _export2.Project.initCatalog(state, action.catalog).updatedState;
84
+ case _constants.UPDATE_MOUSE_COORDS:
85
+ return _export2.Project.updateMouseCoord(state, action.coords).updatedState;
86
+ case _constants.UPDATE_ZOOM_SCALE:
87
+ return _export2.Project.updateZoomScale(state, action.scale).updatedState;
88
+ case _constants.TOGGLE_SNAP:
89
+ return _export2.Project.toggleSnap(state, action.mask).updatedState;
90
+ case _constants.THROW_ERROR:
91
+ return _export2.Project.throwError(state, action.error).updatedState;
92
+ case _constants.THROW_WARNING:
93
+ return _export2.Project.throwWarning(state, action.warning).updatedState;
94
+ case _constants.COPY_PROPERTIES:
95
+ return _export2.Project.copyProperties(state, action.properties).updatedState;
96
+ case _constants.PASTE_PROPERTIES:
93
97
  state = state.merge({
94
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
98
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
95
99
  });
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:
100
+ return _export2.Project.pasteProperties(state).updatedState;
101
+ case _constants.PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY:
102
+ return _export2.Project.pushLastSelectedCatalogElementToHistory(state, action.element).updatedState;
103
+ case _constants.ALTERATE_STATE:
104
+ return _export2.Project.setAlterate(state).updatedState;
105
+ case _constants.SET_MODE:
106
+ return _export2.Project.setMode(state, action.mode).updatedState;
107
+ case _constants.ADD_HORIZONTAL_GUIDE:
104
108
  state = state.merge({
105
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
109
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
106
110
  });
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;
111
+ return _export2.Project.addHorizontalGuide(state, action.coordinate).updatedState;
112
+ case _constants.ADD_VERTICAL_GUIDE:
113
+ return _export2.Project.addVerticalGuide(state, action.coordinate).updatedState;
114
+ case _constants.ADD_CIRCULAR_GUIDE:
115
+ return _export2.Project.addCircularGuide(state, action.x, action.y, action.radius).updatedState;
116
+ case _constants.REMOVE_HORIZONTAL_GUIDE:
117
+ return _export2.Project.removeHorizontalGuide(state, action.guideID).updatedState;
118
+ case _constants.REMOVE_VERTICAL_GUIDE:
119
+ return _export2.Project.removeVerticalGuide(state, action.guideID).updatedState;
120
+ case _constants.REMOVE_CIRCULAR_GUIDE:
121
+ return _export2.Project.removeCircularGuide(state, action.guideID).updatedState;
122
+ case _constants.REMOVE_DRAWING_SUPPORT:
123
+ return _export2.Project.removeDrawingSupport(state).updatedState;
124
+ case _constants.SET_STATE_PROPERTIES:
125
+ return _export2.Project.setStateProperties(state, action.properties).updatedState;
126
+ case _constants.SET_IS_HELP:
127
+ return _export2.Project.setIsHelp(state, action.isHelp).updatedState;
128
+ case _constants.SET_IS_CABINET_DRAWING:
129
+ return _export2.Project.setIsCabinetDrawing(state, action.isCabinetDrawing).updatedState;
126
130
  default:
127
131
  return state;
128
132
  }
@@ -1,19 +1,24 @@
1
- import { PROJECT_ACTIONS, VIEWER2D_ACTIONS, VIEWER3D_ACTIONS, GROUP_ACTIONS, ITEMS_ACTIONS, HOLE_ACTIONS, LINE_ACTIONS, AREA_ACTIONS, SCENE_ACTIONS, VERTEX_ACTIONS, USER_ACTIONS } from "../constants";
2
- import { KitchenConfiguratorAreasReducer, KitchenConfiguratorHolesReducer, KitchenConfiguratorItemsReducer, KitchenConfiguratorLinesReducer, KitchenConfiguratorGroupsReducer, KitchenConfiguratorProjectReducer, KitchenConfiguratorSceneReducer, KitchenConfiguratorVerticesReducer, KitchenConfiguratorViewer2dReducer, KitchenConfiguratorViewer3dReducer, KitchenConfiguratorUserReducer } from "./export";
3
- import { State } from "../models";
4
- export var initialState = new State();
5
- export default function appReducer(state, action) {
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = appReducer;
5
+ exports.initialState = void 0;
6
+ var _constants = require("../constants");
7
+ var _export = require("./export");
8
+ var _models = require("../models");
9
+ var initialState = exports.initialState = new _models.State();
10
+ function appReducer(state, action) {
6
11
  // /////////
7
- if (PROJECT_ACTIONS[action.type]) return KitchenConfiguratorProjectReducer.apply(void 0, arguments);
8
- if (VIEWER2D_ACTIONS[action.type]) return KitchenConfiguratorViewer2dReducer.apply(void 0, arguments);
9
- if (VIEWER3D_ACTIONS[action.type]) return KitchenConfiguratorViewer3dReducer.apply(void 0, arguments);
10
- if (ITEMS_ACTIONS[action.type]) return KitchenConfiguratorItemsReducer.apply(void 0, arguments);
11
- if (HOLE_ACTIONS[action.type]) return KitchenConfiguratorHolesReducer.apply(void 0, arguments);
12
- if (LINE_ACTIONS[action.type]) return KitchenConfiguratorLinesReducer.apply(void 0, arguments);
13
- if (AREA_ACTIONS[action.type]) return KitchenConfiguratorAreasReducer.apply(void 0, arguments);
14
- if (GROUP_ACTIONS[action.type]) return KitchenConfiguratorGroupsReducer.apply(void 0, arguments);
15
- if (SCENE_ACTIONS[action.type]) return KitchenConfiguratorSceneReducer.apply(void 0, arguments);
16
- if (VERTEX_ACTIONS[action.type]) return KitchenConfiguratorVerticesReducer.apply(void 0, arguments);
17
- if (USER_ACTIONS[action.type]) return KitchenConfiguratorUserReducer.apply(void 0, arguments);
12
+ if (_constants.PROJECT_ACTIONS[action.type]) return _export.KitchenConfiguratorProjectReducer.apply(void 0, arguments);
13
+ if (_constants.VIEWER2D_ACTIONS[action.type]) return _export.KitchenConfiguratorViewer2dReducer.apply(void 0, arguments);
14
+ if (_constants.VIEWER3D_ACTIONS[action.type]) return _export.KitchenConfiguratorViewer3dReducer.apply(void 0, arguments);
15
+ if (_constants.ITEMS_ACTIONS[action.type]) return _export.KitchenConfiguratorItemsReducer.apply(void 0, arguments);
16
+ if (_constants.HOLE_ACTIONS[action.type]) return _export.KitchenConfiguratorHolesReducer.apply(void 0, arguments);
17
+ if (_constants.LINE_ACTIONS[action.type]) return _export.KitchenConfiguratorLinesReducer.apply(void 0, arguments);
18
+ if (_constants.AREA_ACTIONS[action.type]) return _export.KitchenConfiguratorAreasReducer.apply(void 0, arguments);
19
+ if (_constants.GROUP_ACTIONS[action.type]) return _export.KitchenConfiguratorGroupsReducer.apply(void 0, arguments);
20
+ if (_constants.SCENE_ACTIONS[action.type]) return _export.KitchenConfiguratorSceneReducer.apply(void 0, arguments);
21
+ if (_constants.VERTEX_ACTIONS[action.type]) return _export.KitchenConfiguratorVerticesReducer.apply(void 0, arguments);
22
+ if (_constants.USER_ACTIONS[action.type]) return _export.KitchenConfiguratorUserReducer.apply(void 0, arguments);
18
23
  return state || initialState;
19
24
  }
@@ -1,27 +1,31 @@
1
- import { Layer } from "../class/export";
2
- import { history } from "../utils/export";
3
- import { ADD_LAYER, SELECT_LAYER, SET_LAYER_PROPERTIES, REMOVE_LAYER, UPDATE_MOVING_STATE } from "../constants";
4
- export default function (state, action) {
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = _default;
5
+ var _export = require("../class/export");
6
+ var _export2 = require("../utils/export");
7
+ var _constants = require("../constants");
8
+ function _default(state, action) {
5
9
  var saveHistory = function saveHistory() {
6
10
  return state = state.merge({
7
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
11
+ sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
8
12
  });
9
13
  };
10
14
  switch (action.type) {
11
- case ADD_LAYER:
15
+ case _constants.ADD_LAYER:
12
16
  saveHistory();
13
- return Layer.create(state, action.name, action.altitude).updatedState;
14
- case SELECT_LAYER:
17
+ return _export.Layer.create(state, action.name, action.altitude).updatedState;
18
+ case _constants.SELECT_LAYER:
15
19
  saveHistory();
16
- return Layer.select(state, action.layerID).updatedState;
17
- case SET_LAYER_PROPERTIES:
20
+ return _export.Layer.select(state, action.layerID).updatedState;
21
+ case _constants.SET_LAYER_PROPERTIES:
18
22
  saveHistory();
19
- return Layer.setProperties(state, action.layerID, action.properties).updatedState;
20
- case REMOVE_LAYER:
23
+ return _export.Layer.setProperties(state, action.layerID, action.properties).updatedState;
24
+ case _constants.REMOVE_LAYER:
21
25
  saveHistory();
22
- return Layer.remove(state, action.layerID).updatedState;
23
- case UPDATE_MOVING_STATE:
24
- return Layer.updateMovingState(state, action.showflag).updatedState;
26
+ return _export.Layer.remove(state, action.layerID).updatedState;
27
+ case _constants.UPDATE_MOVING_STATE:
28
+ return _export.Layer.updateMovingState(state, action.showflag).updatedState;
25
29
  default:
26
30
  return state;
27
31
  }
@@ -1,5 +1,8 @@
1
- import { object } from 'prop-types';
2
- import { LOGIN_SUCCESS, LOGIN_ERROR, LOGOUT } from "../constants";
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = _default;
5
+ var _constants = require("../constants");
3
6
  var initialState = {
4
7
  success: false,
5
8
  error: {
@@ -7,23 +10,23 @@ var initialState = {
7
10
  password: null
8
11
  }
9
12
  };
10
- export default function (state, action) {
13
+ function _default(state, action) {
11
14
  switch (action.type) {
12
- case LOGIN_SUCCESS:
15
+ case _constants.LOGIN_SUCCESS:
13
16
  {
14
17
  return state.merge({
15
18
  login: true,
16
19
  userId: action.userid
17
20
  });
18
21
  }
19
- case LOGIN_ERROR:
22
+ case _constants.LOGIN_ERROR:
20
23
  {
21
24
  return state.merge({
22
25
  login: false,
23
26
  userId: 0
24
27
  });
25
28
  }
26
- case LOGOUT:
29
+ case _constants.LOGOUT:
27
30
  {
28
31
  state = state.merge({
29
32
  scene: state.scene.merge({
@@ -1,18 +1,22 @@
1
- import { BEGIN_DRAGGING_VERTEX, UPDATE_DRAGGING_VERTEX, END_DRAGGING_VERTEX } from "../constants";
2
- import { history } from "../utils/export";
3
- import { Vertex } from "../class/export";
4
- export default function (state, action) {
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = _default;
5
+ var _constants = require("../constants");
6
+ var _export = require("../utils/export");
7
+ var _export2 = require("../class/export");
8
+ function _default(state, action) {
5
9
  switch (action.type) {
6
- case BEGIN_DRAGGING_VERTEX:
7
- return Vertex.beginDraggingVertex(state, action.layerID, action.vertexID, action.x, action.y).updatedState;
8
- case UPDATE_DRAGGING_VERTEX:
9
- return Vertex.updateDraggingVertex(state, action.x, action.y).updatedState;
10
- case END_DRAGGING_VERTEX:
10
+ case _constants.BEGIN_DRAGGING_VERTEX:
11
+ return _export2.Vertex.beginDraggingVertex(state, action.layerID, action.vertexID, action.x, action.y).updatedState;
12
+ case _constants.UPDATE_DRAGGING_VERTEX:
13
+ return _export2.Vertex.updateDraggingVertex(state, action.x, action.y).updatedState;
14
+ case _constants.END_DRAGGING_VERTEX:
11
15
  // Code that saving the scene history (26 ~ 28)
12
16
  state = state.merge({
13
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
17
+ sceneHistory: _export.history.historyPush(state.sceneHistory, state.scene)
14
18
  });
15
- return Vertex.endDraggingVertex(state, action.x, action.y).updatedState;
19
+ return _export2.Vertex.endDraggingVertex(state, action.x, action.y).updatedState;
16
20
  default:
17
21
  return state;
18
22
  }
@@ -1,10 +1,14 @@
1
- import { UPDATE_2D_CAMERA, SELECT_TOOL_PAN, SELECT_TOOL_ZOOM_IN, SELECT_TOOL_ZOOM_OUT, MODE_2D_PAN, MODE_2D_ZOOM_IN, MODE_2D_ZOOM_OUT, CHANGE_WALL_LENGTH_MEASURE, CHANGE_BASE_CABINET_MEASURE, CHANGE_WALL_CABINET_MEASURE, CHANGE_WINDOW_DOOR_MEASURE, UPDATE_CEIL_HEIGHT, UPDATE_CEIL_HEIGHT_UNIT } from "../constants";
2
- import convert from 'convert-units';
3
- export default function (state, action) {
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = _default;
5
+ var _constants = require("../constants");
6
+ var _convertUnitsLite = require("../utils/convert-units-lite");
7
+ function _default(state, action) {
4
8
  var _state = state,
5
9
  scene = _state.scene;
6
10
  switch (action.type) {
7
- case UPDATE_CEIL_HEIGHT_UNIT:
11
+ case _constants.UPDATE_CEIL_HEIGHT_UNIT:
8
12
  {
9
13
  var _state2 = state,
10
14
  _scene = _state2.scene;
@@ -16,7 +20,7 @@ export default function (state, action) {
16
20
  state = state.mergeIn(['scene', 'layers', selectedLayer], newLayer);
17
21
  return state;
18
22
  }
19
- case UPDATE_CEIL_HEIGHT:
23
+ case _constants.UPDATE_CEIL_HEIGHT:
20
24
  {
21
25
  var _selectedLayer = scene.selectedLayer;
22
26
  var _layer = scene.layers.get(_selectedLayer);
@@ -29,47 +33,47 @@ export default function (state, action) {
29
33
  if (item.type.includes('Light')) {
30
34
  var height = item.properties.getIn(['height', '_length']);
31
35
  var heightUnit = item.properties.getIn(['height', '_unit']);
32
- var newAltitude = action.value - convert(height).from(heightUnit).to('in');
33
- item = item.setIn(['properties', 'altitude', '_length'], convert(newAltitude).from('in').to(_layer.unit));
36
+ var newAltitude = action.value - (0, _convertUnitsLite.convert)(height).from(heightUnit).to('in');
37
+ item = item.setIn(['properties', 'altitude', '_length'], (0, _convertUnitsLite.convert)(newAltitude).from('in').to(_layer.unit));
34
38
  }
35
39
  return item;
36
40
  });
37
41
  state = state.mergeIn(['scene', 'layers', _selectedLayer, 'items'], newItems);
38
42
  return state;
39
43
  }
40
- case UPDATE_2D_CAMERA:
44
+ case _constants.UPDATE_2D_CAMERA:
41
45
  return state.merge({
42
46
  viewer2D: action.value
43
47
  });
44
- case CHANGE_WALL_LENGTH_MEASURE:
48
+ case _constants.CHANGE_WALL_LENGTH_MEASURE:
45
49
  return state.merge({
46
50
  scene: scene.merge({
47
51
  showWallLengthMeasure: action.value
48
52
  })
49
53
  });
50
- case CHANGE_BASE_CABINET_MEASURE:
54
+ case _constants.CHANGE_BASE_CABINET_MEASURE:
51
55
  return state.merge({
52
56
  scene: scene.merge({
53
57
  showBaseCabinetMeasure: action.value
54
58
  })
55
59
  });
56
- case CHANGE_WALL_CABINET_MEASURE:
60
+ case _constants.CHANGE_WALL_CABINET_MEASURE:
57
61
  return state.merge({
58
62
  scene: scene.merge({
59
63
  showWallCabinetMeasure: action.value
60
64
  })
61
65
  });
62
- case CHANGE_WINDOW_DOOR_MEASURE:
66
+ case _constants.CHANGE_WINDOW_DOOR_MEASURE:
63
67
  return state.merge({
64
68
  scene: scene.merge({
65
69
  showWindowDoorMeasure: action.value
66
70
  })
67
71
  });
68
- case SELECT_TOOL_PAN:
69
- return state.set('mode', MODE_2D_PAN);
70
- case SELECT_TOOL_ZOOM_IN:
71
- return state.set('mode', MODE_2D_ZOOM_IN);
72
- case SELECT_TOOL_ZOOM_OUT:
73
- return state.set('mode', MODE_2D_ZOOM_OUT);
72
+ case _constants.SELECT_TOOL_PAN:
73
+ return state.set('mode', _constants.MODE_2D_PAN);
74
+ case _constants.SELECT_TOOL_ZOOM_IN:
75
+ return state.set('mode', _constants.MODE_2D_ZOOM_IN);
76
+ case _constants.SELECT_TOOL_ZOOM_OUT:
77
+ return state.set('mode', _constants.MODE_2D_ZOOM_OUT);
74
78
  }
75
79
  }
@@ -1,13 +1,17 @@
1
- import { MODE_3D_VIEW, MODE_3D_FIRST_PERSON, SELECT_TOOL_3D_VIEW, SELECT_TOOL_3D_FIRST_PERSON, UPDATE_3D_CEIL_HEIGHT, UPDATE_3D_CEIL_HEIGHT_UNIT } from "../constants";
2
- import { Project } from "../class/export";
3
- import { history } from "../utils/export";
4
- import convert from 'convert-units';
5
- export default function (state, action) {
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = _default;
5
+ var _constants = require("../constants");
6
+ var _export = require("../class/export");
7
+ var _export2 = require("../utils/export");
8
+ var _convertUnitsLite = require("../utils/convert-units-lite");
9
+ function _default(state, action) {
6
10
  state = state.merge({
7
- sceneHistory: history.historyPush(state.sceneHistory, state.scene)
11
+ sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
8
12
  });
9
13
  switch (action.type) {
10
- case UPDATE_3D_CEIL_HEIGHT_UNIT:
14
+ case _constants.UPDATE_3D_CEIL_HEIGHT_UNIT:
11
15
  {
12
16
  var _state = state,
13
17
  scene = _state.scene;
@@ -19,7 +23,7 @@ export default function (state, action) {
19
23
  state = state.mergeIn(['scene', 'layers', selectedLayer], newLayer);
20
24
  return state;
21
25
  }
22
- case UPDATE_3D_CEIL_HEIGHT:
26
+ case _constants.UPDATE_3D_CEIL_HEIGHT:
23
27
  {
24
28
  var _state2 = state,
25
29
  _scene = _state2.scene;
@@ -34,21 +38,21 @@ export default function (state, action) {
34
38
  if (item.type.includes('Light')) {
35
39
  var height = item.properties.getIn(['height', '_length']);
36
40
  var heightUnit = item.properties.getIn(['height', '_unit']);
37
- var newAltitude = action.value - convert(height).from(heightUnit).to('in');
38
- item = item.setIn(['properties', 'altitude', '_length'], convert(newAltitude).from('in').to(_layer.unit));
41
+ var newAltitude = action.value - (0, _convertUnitsLite.convert)(height).from(heightUnit).to('in');
42
+ item = item.setIn(['properties', 'altitude', '_length'], (0, _convertUnitsLite.convert)(newAltitude).from('in').to(_layer.unit));
39
43
  }
40
44
  return item;
41
45
  });
42
46
  state = state.mergeIn(['scene', 'layers', _selectedLayer, 'items'], newItems);
43
47
  return state;
44
48
  }
45
- case SELECT_TOOL_3D_VIEW:
46
- state = Project.rollback(state).updatedState;
47
- state = Project.setMode(state, MODE_3D_VIEW).updatedState;
49
+ case _constants.SELECT_TOOL_3D_VIEW:
50
+ state = _export.Project.rollback(state).updatedState;
51
+ state = _export.Project.setMode(state, _constants.MODE_3D_VIEW).updatedState;
48
52
  return state;
49
- case SELECT_TOOL_3D_FIRST_PERSON:
50
- state = Project.rollback(state).updatedState;
51
- state = Project.setMode(state, MODE_3D_FIRST_PERSON).updatedState;
53
+ case _constants.SELECT_TOOL_3D_FIRST_PERSON:
54
+ state = _export.Project.rollback(state).updatedState;
55
+ state = _export.Project.setMode(state, _constants.MODE_3D_FIRST_PERSON).updatedState;
52
56
  return state;
53
57
  default:
54
58
  return state;
@@ -1,10 +1,14 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.TOOLBAR_COLOR = exports.SECONDARY_COLOR = exports.PRIMARY_COLOR = exports.MESH_SELECTED = exports.MATERIAL_COLORS = exports.LINE_MESH_COLOR = exports.LINE_MESH = exports.INTERIOR_LINE = exports.COLORS = exports.AREA_MESH_COLOR = void 0;
1
5
  // COLORS
2
- export var COLORS = {
6
+ var COLORS = exports.COLORS = {
3
7
  white: '#FFF',
4
8
  lightgrey: '#d3d3d3',
5
9
  black: '#000'
6
10
  };
7
- export var MATERIAL_COLORS = {
11
+ var MATERIAL_COLORS = exports.MATERIAL_COLORS = {
8
12
  500: {
9
13
  amber: '#FFC107',
10
14
  blue_grey: '#607D8B',
@@ -27,7 +31,7 @@ export var MATERIAL_COLORS = {
27
31
  yellow: '#FFEB3B'
28
32
  }
29
33
  };
30
- export var PRIMARY_COLOR = {
34
+ var PRIMARY_COLOR = exports.PRIMARY_COLOR = {
31
35
  main: '#DEDEDE',
32
36
  alt: '#DEDEDE',
33
37
  icon: '#A2A2A2',
@@ -36,31 +40,31 @@ export var PRIMARY_COLOR = {
36
40
  text_alt: '#232323',
37
41
  input: '#55595C'
38
42
  };
39
- export var SECONDARY_COLOR = {
43
+ var SECONDARY_COLOR = exports.SECONDARY_COLOR = {
40
44
  main: '#1CA6FC',
41
45
  alt: '#005FAF',
42
46
  icon: '#1CA6FC',
43
47
  border: '1px solid #FFF'
44
48
  };
45
- export var TOOLBAR_COLOR = {
49
+ var TOOLBAR_COLOR = exports.TOOLBAR_COLOR = {
46
50
  normal: 'rgb(211,230,228)',
47
51
  focus: 'rgba(71, 71, 71,0.9)',
48
52
  active: 'rgba(17, 131, 187, 0.8)'
49
53
  // active: 'rgba(34,144,107, 0.8)',
50
54
  };
51
- export var MESH_SELECTED = 'rgba(71, 71, 71,0.9)';
52
- export var AREA_MESH_COLOR = {
55
+ var MESH_SELECTED = exports.MESH_SELECTED = 'rgba(71, 71, 71,0.9)';
56
+ var AREA_MESH_COLOR = exports.AREA_MESH_COLOR = {
53
57
  selected: 'rgb(234,234,255)',
54
58
  unselected: 'rgb(221,221,255)'
55
59
  };
56
- export var INTERIOR_LINE = {
60
+ var INTERIOR_LINE = exports.INTERIOR_LINE = {
57
61
  unselected: ' #0a0a10',
58
62
  selected: '#4C12A1'
59
63
  };
60
- export var LINE_MESH_COLOR = {
64
+ var LINE_MESH_COLOR = exports.LINE_MESH_COLOR = {
61
65
  selected: '#4C12A1',
62
66
  unselected: 'rgb(135,145,171)'
63
67
  };
64
- export var LINE_MESH = {
68
+ var LINE_MESH = exports.LINE_MESH = {
65
69
  selected: '#4C12A1'
66
70
  };
@@ -1,5 +1,11 @@
1
- import * as TabsStyle from "./tabs.css";
2
- export { TabsStyle };
3
- export default {
1
+ "use strict";
2
+
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
+ exports.__esModule = true;
5
+ exports["default"] = exports.TabsStyle = void 0;
6
+ var TabsStyle = _interopRequireWildcard(require("./tabs.css"));
7
+ exports.TabsStyle = TabsStyle;
8
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
9
+ var _default = exports["default"] = {
4
10
  TabsStyle: TabsStyle
5
11
  };