kitchen-simulator 11.27.0 → 11.28.2

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 (93) hide show
  1. package/es/actions/items-actions.js +20 -2
  2. package/es/assets/img/svg/3d_item_move.svg +9 -105
  3. package/es/assets/img/svg/3d_item_rotation.svg +3 -75
  4. package/es/assets/img/svg/accessories.svg +4 -4
  5. package/es/assets/img/svg/bottombar/elevation-back.svg +6 -6
  6. package/es/assets/img/svg/bottombar/elevation-front.svg +6 -6
  7. package/es/assets/img/svg/bottombar/elevation-left.svg +6 -6
  8. package/es/assets/img/svg/bottombar/elevation-right.svg +7 -7
  9. package/es/assets/img/svg/bottombar/elevation.svg +13 -13
  10. package/es/assets/img/svg/delete.svg +6 -2
  11. package/es/assets/img/svg/detail.svg +77 -77
  12. package/es/assets/img/svg/duplicate.svg +6 -6
  13. package/es/assets/img/svg/filtersActive.svg +19 -19
  14. package/es/assets/img/svg/invert.svg +12 -127
  15. package/es/assets/img/svg/menubar/login.svg +84 -84
  16. package/es/assets/img/svg/menubar/my_projects.svg +85 -85
  17. package/es/assets/img/svg/menubar/new_project.svg +110 -110
  18. package/es/assets/img/svg/menubar/save_project.svg +84 -84
  19. package/es/assets/img/svg/options.svg +3 -3
  20. package/es/assets/img/svg/positioning.svg +3 -3
  21. package/es/assets/img/svg/toggleFilters.svg +19 -19
  22. package/es/assets/img/svg/toolbar/shopping-cart.svg +13 -13
  23. package/es/assets/img/svg/wizardstep/detail_view.svg +87 -87
  24. package/es/assets/img/svg/wizardstep/tile_view.svg +95 -95
  25. package/es/catalog/utils/exporter.js +4 -0
  26. package/es/catalog/utils/item-loader.js +18 -8
  27. package/es/class/item.js +80 -2
  28. package/es/components/viewer2d/item.js +139 -125
  29. package/es/components/viewer2d/viewer2d.js +7 -4
  30. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +556 -556
  31. package/es/components/viewer3d/scene-creator.js +18 -0
  32. package/es/components/viewer3d/viewer3d.js +137 -49
  33. package/es/constants.js +7 -1
  34. package/es/events/external/handleExternalEvent.js +36 -33
  35. package/es/events/external/handleExternalEvent.util.js +4 -2
  36. package/es/events/external/handlers.changeDoorStyle.js +28 -7
  37. package/es/events/external/handlers.elementOps.js +8 -0
  38. package/es/mappings/external-events/mapExternalEventPayload.js +4 -4
  39. package/es/mappings/external-events/mappers/addItemMapper.js +9 -9
  40. package/es/mappings/external-events/mappers/ccdfMapper.js +1 -1
  41. package/es/models.js +4 -0
  42. package/es/reducers/items-reducer.js +10 -1
  43. package/es/shared/domain/asset/sanitize-asset-url.js +5 -5
  44. package/es/shared/domain/cabinet-mirror.js +7 -0
  45. package/es/utils/geometry.js +5 -3
  46. package/es/utils/skinPanelEngine.js +14 -14
  47. package/lib/actions/items-actions.js +20 -0
  48. package/lib/assets/img/svg/3d_item_move.svg +9 -105
  49. package/lib/assets/img/svg/3d_item_rotation.svg +3 -75
  50. package/lib/assets/img/svg/accessories.svg +4 -4
  51. package/lib/assets/img/svg/bottombar/elevation-back.svg +6 -6
  52. package/lib/assets/img/svg/bottombar/elevation-front.svg +6 -6
  53. package/lib/assets/img/svg/bottombar/elevation-left.svg +6 -6
  54. package/lib/assets/img/svg/bottombar/elevation-right.svg +7 -7
  55. package/lib/assets/img/svg/bottombar/elevation.svg +13 -13
  56. package/lib/assets/img/svg/delete.svg +6 -2
  57. package/lib/assets/img/svg/detail.svg +77 -77
  58. package/lib/assets/img/svg/duplicate.svg +6 -6
  59. package/lib/assets/img/svg/filtersActive.svg +19 -19
  60. package/lib/assets/img/svg/invert.svg +12 -127
  61. package/lib/assets/img/svg/menubar/login.svg +84 -84
  62. package/lib/assets/img/svg/menubar/my_projects.svg +85 -85
  63. package/lib/assets/img/svg/menubar/new_project.svg +110 -110
  64. package/lib/assets/img/svg/menubar/save_project.svg +84 -84
  65. package/lib/assets/img/svg/options.svg +3 -3
  66. package/lib/assets/img/svg/positioning.svg +3 -3
  67. package/lib/assets/img/svg/toggleFilters.svg +19 -19
  68. package/lib/assets/img/svg/toolbar/shopping-cart.svg +13 -13
  69. package/lib/assets/img/svg/wizardstep/detail_view.svg +87 -87
  70. package/lib/assets/img/svg/wizardstep/tile_view.svg +95 -95
  71. package/lib/catalog/utils/exporter.js +4 -0
  72. package/lib/catalog/utils/item-loader.js +18 -8
  73. package/lib/class/item.js +79 -1
  74. package/lib/components/viewer2d/item.js +138 -124
  75. package/lib/components/viewer2d/viewer2d.js +7 -4
  76. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +556 -556
  77. package/lib/components/viewer3d/scene-creator.js +18 -0
  78. package/lib/components/viewer3d/viewer3d.js +137 -49
  79. package/lib/constants.js +11 -5
  80. package/lib/events/external/handleExternalEvent.js +34 -31
  81. package/lib/events/external/handleExternalEvent.util.js +4 -2
  82. package/lib/events/external/handlers.changeDoorStyle.js +28 -7
  83. package/lib/events/external/handlers.elementOps.js +9 -0
  84. package/lib/mappings/external-events/mapExternalEventPayload.js +4 -4
  85. package/lib/mappings/external-events/mappers/addItemMapper.js +9 -9
  86. package/lib/mappings/external-events/mappers/ccdfMapper.js +1 -1
  87. package/lib/models.js +4 -0
  88. package/lib/reducers/items-reducer.js +9 -0
  89. package/lib/shared/domain/asset/sanitize-asset-url.js +5 -5
  90. package/lib/shared/domain/cabinet-mirror.js +13 -0
  91. package/lib/utils/geometry.js +5 -3
  92. package/lib/utils/skinPanelEngine.js +14 -14
  93. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
- <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g clip-path="url(#clip0_2780_182858)">
3
- <path d="M4 19.8638C4 20.3942 4.21071 20.9029 4.58579 21.278C4.96086 21.6531 5.46957 21.8638 6 21.8638C6.53043 21.8638 7.03914 21.6531 7.41421 21.278C7.78929 20.9029 8 20.3942 8 19.8638C8 19.3333 7.78929 18.8246 7.41421 18.4496C7.03914 18.0745 6.53043 17.8638 6 17.8638C5.46957 17.8638 4.96086 18.0745 4.58579 18.4496C4.21071 18.8246 4 19.3333 4 19.8638Z" stroke="#4C12A1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4
- <path d="M15 19.8638C15 20.3942 15.2107 20.9029 15.5858 21.278C15.9609 21.6531 16.4696 21.8638 17 21.8638C17.5304 21.8638 18.0391 21.6531 18.4142 21.278C18.7893 20.9029 19 20.3942 19 19.8638C19 19.3333 18.7893 18.8246 18.4142 18.4496C18.0391 18.0745 17.5304 17.8638 17 17.8638C16.4696 17.8638 15.9609 18.0745 15.5858 18.4496C15.2107 18.8246 15 19.3333 15 19.8638Z" stroke="#4C12A1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
5
- <path d="M17 17.8638H6V3.86377H4" stroke="#4C12A1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6
- <path d="M6 5.86377L20 6.86377L19 13.8638H6" stroke="#4C12A1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
7
- </g>
8
- <defs>
9
- <clipPath id="clip0_2780_182858">
10
- <rect width="24" height="24" fill="white" transform="translate(0 0.86377)"/>
11
- </clipPath>
12
- </defs>
13
- </svg>
1
+ <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_2780_182858)">
3
+ <path d="M4 19.8638C4 20.3942 4.21071 20.9029 4.58579 21.278C4.96086 21.6531 5.46957 21.8638 6 21.8638C6.53043 21.8638 7.03914 21.6531 7.41421 21.278C7.78929 20.9029 8 20.3942 8 19.8638C8 19.3333 7.78929 18.8246 7.41421 18.4496C7.03914 18.0745 6.53043 17.8638 6 17.8638C5.46957 17.8638 4.96086 18.0745 4.58579 18.4496C4.21071 18.8246 4 19.3333 4 19.8638Z" stroke="#4C12A1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M15 19.8638C15 20.3942 15.2107 20.9029 15.5858 21.278C15.9609 21.6531 16.4696 21.8638 17 21.8638C17.5304 21.8638 18.0391 21.6531 18.4142 21.278C18.7893 20.9029 19 20.3942 19 19.8638C19 19.3333 18.7893 18.8246 18.4142 18.4496C18.0391 18.0745 17.5304 17.8638 17 17.8638C16.4696 17.8638 15.9609 18.0745 15.5858 18.4496C15.2107 18.8246 15 19.3333 15 19.8638Z" stroke="#4C12A1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M17 17.8638H6V3.86377H4" stroke="#4C12A1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M6 5.86377L20 6.86377L19 13.8638H6" stroke="#4C12A1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
7
+ </g>
8
+ <defs>
9
+ <clipPath id="clip0_2780_182858">
10
+ <rect width="24" height="24" fill="white" transform="translate(0 0.86377)"/>
11
+ </clipPath>
12
+ </defs>
13
+ </svg>
@@ -1,87 +1,87 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
-
4
- <svg
5
- xmlns:dc="http://purl.org/dc/elements/1.1/"
6
- xmlns:cc="http://creativecommons.org/ns#"
7
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
- xmlns:svg="http://www.w3.org/2000/svg"
9
- xmlns="http://www.w3.org/2000/svg"
10
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
- width="17"
13
- height="14"
14
- id="svg91951"
15
- version="1.1"
16
- inkscape:version="0.48.4 r9939"
17
- sodipodi:docname="New document 3">
18
- <defs
19
- id="defs91953" />
20
- <sodipodi:namedview
21
- id="base"
22
- pagecolor="#ffffff"
23
- bordercolor="#666666"
24
- borderopacity="1.0"
25
- inkscape:pageopacity="0.0"
26
- inkscape:pageshadow="2"
27
- inkscape:zoom="22.197802"
28
- inkscape:cx="8"
29
- inkscape:cy="8"
30
- inkscape:current-layer="layer1"
31
- showgrid="true"
32
- inkscape:grid-bbox="true"
33
- inkscape:document-units="px"
34
- inkscape:window-width="1920"
35
- inkscape:window-height="1017"
36
- inkscape:window-x="-8"
37
- inkscape:window-y="-8"
38
- inkscape:window-maximized="1" />
39
- <metadata
40
- id="metadata91956">
41
- <rdf:RDF>
42
- <cc:Work
43
- rdf:about="">
44
- <dc:format>image/svg+xml</dc:format>
45
- <dc:type
46
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
47
- <dc:title></dc:title>
48
- </cc:Work>
49
- </rdf:RDF>
50
- </metadata>
51
- <g
52
- id="layer1"
53
- inkscape:label="Layer 1"
54
- inkscape:groupmode="layer"
55
- transform="translate(0,-2)">
56
- <path
57
- style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
58
- inkscape:connector-curvature="0"
59
- d="M 4.999831,2.9996402 H 16.000362"
60
- id="path28763" />
61
- <path
62
- style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
63
- inkscape:connector-curvature="0"
64
- d="M 4.999831,8.9950062 H 16.000362"
65
- id="path28765" />
66
- <path
67
- style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
68
- inkscape:connector-curvature="0"
69
- d="M 4.999831,14.990372 H 16.000362"
70
- id="path28767" />
71
- <path
72
- style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
73
- inkscape:connector-curvature="0"
74
- d="m 0.9996379,2.9996402 v 0.00999"
75
- id="path28769" />
76
- <path
77
- style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
78
- inkscape:connector-curvature="0"
79
- d="m 0.9996379,8.9950062 v 0.00999"
80
- id="path28771" />
81
- <path
82
- style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
83
- inkscape:connector-curvature="0"
84
- d="m 0.9996379,14.990372 v 0.01"
85
- id="path28773" />
86
- </g>
87
- </svg>
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ width="17"
13
+ height="14"
14
+ id="svg91951"
15
+ version="1.1"
16
+ inkscape:version="0.48.4 r9939"
17
+ sodipodi:docname="New document 3">
18
+ <defs
19
+ id="defs91953" />
20
+ <sodipodi:namedview
21
+ id="base"
22
+ pagecolor="#ffffff"
23
+ bordercolor="#666666"
24
+ borderopacity="1.0"
25
+ inkscape:pageopacity="0.0"
26
+ inkscape:pageshadow="2"
27
+ inkscape:zoom="22.197802"
28
+ inkscape:cx="8"
29
+ inkscape:cy="8"
30
+ inkscape:current-layer="layer1"
31
+ showgrid="true"
32
+ inkscape:grid-bbox="true"
33
+ inkscape:document-units="px"
34
+ inkscape:window-width="1920"
35
+ inkscape:window-height="1017"
36
+ inkscape:window-x="-8"
37
+ inkscape:window-y="-8"
38
+ inkscape:window-maximized="1" />
39
+ <metadata
40
+ id="metadata91956">
41
+ <rdf:RDF>
42
+ <cc:Work
43
+ rdf:about="">
44
+ <dc:format>image/svg+xml</dc:format>
45
+ <dc:type
46
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
47
+ <dc:title></dc:title>
48
+ </cc:Work>
49
+ </rdf:RDF>
50
+ </metadata>
51
+ <g
52
+ id="layer1"
53
+ inkscape:label="Layer 1"
54
+ inkscape:groupmode="layer"
55
+ transform="translate(0,-2)">
56
+ <path
57
+ style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
58
+ inkscape:connector-curvature="0"
59
+ d="M 4.999831,2.9996402 H 16.000362"
60
+ id="path28763" />
61
+ <path
62
+ style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
63
+ inkscape:connector-curvature="0"
64
+ d="M 4.999831,8.9950062 H 16.000362"
65
+ id="path28765" />
66
+ <path
67
+ style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
68
+ inkscape:connector-curvature="0"
69
+ d="M 4.999831,14.990372 H 16.000362"
70
+ id="path28767" />
71
+ <path
72
+ style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
73
+ inkscape:connector-curvature="0"
74
+ d="m 0.9996379,2.9996402 v 0.00999"
75
+ id="path28769" />
76
+ <path
77
+ style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
78
+ inkscape:connector-curvature="0"
79
+ d="m 0.9996379,8.9950062 v 0.00999"
80
+ id="path28771" />
81
+ <path
82
+ style="fill:none;stroke:#4c12a1;stroke-width:1.9992758;stroke-linecap:round;stroke-linejoin:round"
83
+ inkscape:connector-curvature="0"
84
+ d="m 0.9996379,14.990372 v 0.01"
85
+ id="path28773" />
86
+ </g>
87
+ </svg>
@@ -1,95 +1,95 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
-
4
- <svg
5
- xmlns:dc="http://purl.org/dc/elements/1.1/"
6
- xmlns:cc="http://creativecommons.org/ns#"
7
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
- xmlns:svg="http://www.w3.org/2000/svg"
9
- xmlns="http://www.w3.org/2000/svg"
10
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
- width="18"
13
- height="18"
14
- id="svg91993"
15
- version="1.1"
16
- inkscape:version="0.48.4 r9939"
17
- sodipodi:docname="New document 5">
18
- <defs
19
- id="defs91995">
20
- <clipPath
21
- id="clip69_0_1">
22
- <rect
23
- style="fill:#ffffff"
24
- y="0"
25
- x="0"
26
- id="rect47253"
27
- transform="translate(352,835.725)"
28
- height="24"
29
- width="24" />
30
- </clipPath>
31
- </defs>
32
- <sodipodi:namedview
33
- id="base"
34
- pagecolor="#ffffff"
35
- bordercolor="#666666"
36
- borderopacity="1.0"
37
- inkscape:pageopacity="0.0"
38
- inkscape:pageshadow="2"
39
- inkscape:zoom="16"
40
- inkscape:cx="15.73047"
41
- inkscape:cy="11.433004"
42
- inkscape:current-layer="layer1"
43
- showgrid="true"
44
- inkscape:grid-bbox="true"
45
- inkscape:document-units="px"
46
- inkscape:window-width="1920"
47
- inkscape:window-height="1017"
48
- inkscape:window-x="-8"
49
- inkscape:window-y="-8"
50
- inkscape:window-maximized="1" />
51
- <metadata
52
- id="metadata91998">
53
- <rdf:RDF>
54
- <cc:Work
55
- rdf:about="">
56
- <dc:format>image/svg+xml</dc:format>
57
- <dc:type
58
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
59
- <dc:title></dc:title>
60
- </cc:Work>
61
- </rdf:RDF>
62
- </metadata>
63
- <g
64
- id="layer1"
65
- inkscape:label="Layer 1"
66
- inkscape:groupmode="layer"
67
- transform="translate(0,-14)">
68
- <g
69
- transform="translate(-355,-824.725)"
70
- style="fill:none"
71
- id="g3633"
72
- clip-path="url(#clip69_0_1)">
73
- <path
74
- id="path3635"
75
- d="m 356,840.725 c 0,-0.265 0.105,-0.519 0.293,-0.707 0.187,-0.188 0.442,-0.293 0.707,-0.293 h 4 c 0.265,0 0.52,0.105 0.707,0.293 0.188,0.188 0.293,0.442 0.293,0.707 v 4 c 0,0.265 -0.105,0.52 -0.293,0.707 -0.187,0.188 -0.442,0.293 -0.707,0.293 h -4 c -0.265,0 -0.52,-0.105 -0.707,-0.293 C 356.105,845.245 356,844.99 356,844.725 v -4 z"
76
- inkscape:connector-curvature="0"
77
- style="stroke:#4c12a1;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" />
78
- <path
79
- id="path3637"
80
- d="m 366,840.725 c 0,-0.265 0.105,-0.519 0.293,-0.707 0.187,-0.188 0.442,-0.293 0.707,-0.293 h 4 c 0.265,0 0.52,0.105 0.707,0.293 0.188,0.188 0.293,0.442 0.293,0.707 v 4 c 0,0.265 -0.105,0.52 -0.293,0.707 -0.187,0.188 -0.442,0.293 -0.707,0.293 h -4 c -0.265,0 -0.52,-0.105 -0.707,-0.293 C 366.105,845.245 366,844.99 366,844.725 v -4 z"
81
- inkscape:connector-curvature="0"
82
- style="stroke:#4c12a1;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" />
83
- <path
84
- id="path3639"
85
- d="m 356,850.725 c 0,-0.265 0.105,-0.519 0.293,-0.707 0.187,-0.188 0.442,-0.293 0.707,-0.293 h 4 c 0.265,0 0.52,0.105 0.707,0.293 0.188,0.188 0.293,0.442 0.293,0.707 v 4 c 0,0.265 -0.105,0.52 -0.293,0.707 -0.187,0.188 -0.442,0.293 -0.707,0.293 h -4 c -0.265,0 -0.52,-0.105 -0.707,-0.293 C 356.105,855.245 356,854.99 356,854.725 v -4 z"
86
- inkscape:connector-curvature="0"
87
- style="stroke:#4c12a1;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" />
88
- <path
89
- id="path3641"
90
- d="m 366,850.725 c 0,-0.265 0.105,-0.519 0.293,-0.707 0.187,-0.188 0.442,-0.293 0.707,-0.293 h 4 c 0.265,0 0.52,0.105 0.707,0.293 0.188,0.188 0.293,0.442 0.293,0.707 v 4 c 0,0.265 -0.105,0.52 -0.293,0.707 -0.187,0.188 -0.442,0.293 -0.707,0.293 h -4 c -0.265,0 -0.52,-0.105 -0.707,-0.293 C 366.105,855.245 366,854.99 366,854.725 v -4 z"
91
- inkscape:connector-curvature="0"
92
- style="stroke:#4c12a1;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" />
93
- </g>
94
- </g>
95
- </svg>
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ width="18"
13
+ height="18"
14
+ id="svg91993"
15
+ version="1.1"
16
+ inkscape:version="0.48.4 r9939"
17
+ sodipodi:docname="New document 5">
18
+ <defs
19
+ id="defs91995">
20
+ <clipPath
21
+ id="clip69_0_1">
22
+ <rect
23
+ style="fill:#ffffff"
24
+ y="0"
25
+ x="0"
26
+ id="rect47253"
27
+ transform="translate(352,835.725)"
28
+ height="24"
29
+ width="24" />
30
+ </clipPath>
31
+ </defs>
32
+ <sodipodi:namedview
33
+ id="base"
34
+ pagecolor="#ffffff"
35
+ bordercolor="#666666"
36
+ borderopacity="1.0"
37
+ inkscape:pageopacity="0.0"
38
+ inkscape:pageshadow="2"
39
+ inkscape:zoom="16"
40
+ inkscape:cx="15.73047"
41
+ inkscape:cy="11.433004"
42
+ inkscape:current-layer="layer1"
43
+ showgrid="true"
44
+ inkscape:grid-bbox="true"
45
+ inkscape:document-units="px"
46
+ inkscape:window-width="1920"
47
+ inkscape:window-height="1017"
48
+ inkscape:window-x="-8"
49
+ inkscape:window-y="-8"
50
+ inkscape:window-maximized="1" />
51
+ <metadata
52
+ id="metadata91998">
53
+ <rdf:RDF>
54
+ <cc:Work
55
+ rdf:about="">
56
+ <dc:format>image/svg+xml</dc:format>
57
+ <dc:type
58
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
59
+ <dc:title></dc:title>
60
+ </cc:Work>
61
+ </rdf:RDF>
62
+ </metadata>
63
+ <g
64
+ id="layer1"
65
+ inkscape:label="Layer 1"
66
+ inkscape:groupmode="layer"
67
+ transform="translate(0,-14)">
68
+ <g
69
+ transform="translate(-355,-824.725)"
70
+ style="fill:none"
71
+ id="g3633"
72
+ clip-path="url(#clip69_0_1)">
73
+ <path
74
+ id="path3635"
75
+ d="m 356,840.725 c 0,-0.265 0.105,-0.519 0.293,-0.707 0.187,-0.188 0.442,-0.293 0.707,-0.293 h 4 c 0.265,0 0.52,0.105 0.707,0.293 0.188,0.188 0.293,0.442 0.293,0.707 v 4 c 0,0.265 -0.105,0.52 -0.293,0.707 -0.187,0.188 -0.442,0.293 -0.707,0.293 h -4 c -0.265,0 -0.52,-0.105 -0.707,-0.293 C 356.105,845.245 356,844.99 356,844.725 v -4 z"
76
+ inkscape:connector-curvature="0"
77
+ style="stroke:#4c12a1;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" />
78
+ <path
79
+ id="path3637"
80
+ d="m 366,840.725 c 0,-0.265 0.105,-0.519 0.293,-0.707 0.187,-0.188 0.442,-0.293 0.707,-0.293 h 4 c 0.265,0 0.52,0.105 0.707,0.293 0.188,0.188 0.293,0.442 0.293,0.707 v 4 c 0,0.265 -0.105,0.52 -0.293,0.707 -0.187,0.188 -0.442,0.293 -0.707,0.293 h -4 c -0.265,0 -0.52,-0.105 -0.707,-0.293 C 366.105,845.245 366,844.99 366,844.725 v -4 z"
81
+ inkscape:connector-curvature="0"
82
+ style="stroke:#4c12a1;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" />
83
+ <path
84
+ id="path3639"
85
+ d="m 356,850.725 c 0,-0.265 0.105,-0.519 0.293,-0.707 0.187,-0.188 0.442,-0.293 0.707,-0.293 h 4 c 0.265,0 0.52,0.105 0.707,0.293 0.188,0.188 0.293,0.442 0.293,0.707 v 4 c 0,0.265 -0.105,0.52 -0.293,0.707 -0.187,0.188 -0.442,0.293 -0.707,0.293 h -4 c -0.265,0 -0.52,-0.105 -0.707,-0.293 C 356.105,855.245 356,854.99 356,854.725 v -4 z"
86
+ inkscape:connector-curvature="0"
87
+ style="stroke:#4c12a1;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" />
88
+ <path
89
+ id="path3641"
90
+ d="m 366,850.725 c 0,-0.265 0.105,-0.519 0.293,-0.707 0.187,-0.188 0.442,-0.293 0.707,-0.293 h 4 c 0.265,0 0.52,0.105 0.707,0.293 0.188,0.188 0.293,0.442 0.293,0.707 v 4 c 0,0.265 -0.105,0.52 -0.293,0.707 -0.187,0.188 -0.442,0.293 -0.707,0.293 h -4 c -0.265,0 -0.52,-0.105 -0.707,-0.293 C 366.105,855.245 366,854.99 366,854.725 v -4 z"
91
+ inkscape:connector-curvature="0"
92
+ style="stroke:#4c12a1;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" />
93
+ </g>
94
+ </g>
95
+ </svg>
@@ -31,6 +31,8 @@ function _default(_ref) {
31
31
  obj_property = _ref.obj_property,
32
32
  outlineSVGData = _ref.outlineSVGData,
33
33
  cds = _ref.cds,
34
+ can_be_mirrored = _ref.can_be_mirrored,
35
+ mirrored = _ref.mirrored,
34
36
  _ref$width_unit = _ref.width_unit,
35
37
  width_unit = _ref$width_unit === void 0 ? 'in' : _ref$width_unit,
36
38
  _ref$height_unit = _ref.height_unit,
@@ -157,6 +159,8 @@ function _default(_ref) {
157
159
  img: base,
158
160
  obj: obj_property,
159
161
  cds: cds,
162
+ can_be_mirrored: can_be_mirrored,
163
+ mirrored: mirrored,
160
164
  structure_json: structure_json,
161
165
  ccdf_list: ccdf_list,
162
166
  width_unit: widthUnit,
@@ -76,6 +76,7 @@ function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corner, sha
76
76
  var x = element.x,
77
77
  y = element.y,
78
78
  rotation = element.rotation;
79
+ var isMirrored = element.mirrored === true;
79
80
  var el_DSN = 'el_DSN',
80
81
  doorStylesKeys = [];
81
82
  var _element = element.toJS();
@@ -196,6 +197,8 @@ function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corner, sha
196
197
  }
197
198
  var padding_width = padding * newWidth / svg_width;
198
199
  var padding_depth = padding * newDepth / svg_depth;
200
+ var paddedWidth = newWidth + 2 * padding_width;
201
+ var paddedDepth = newDepth + 2 * padding_depth;
199
202
 
200
203
  // offset of the warning icons(by default, show the icons with width direction and if depth is bigger than width, show with depth direction.)
201
204
  var transX = svg_width < svg_depth ? 0 : 10;
@@ -283,17 +286,19 @@ function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corner, sha
283
286
  transform: "rotate(".concat(rotation, ")")
284
287
  }, /*#__PURE__*/_react["default"].createElement("g", {
285
288
  transform: "translate(".concat(-newWidth / 2 - padding_width, ",").concat(-newDepth / 2 - padding_depth, ")")
289
+ }, /*#__PURE__*/_react["default"].createElement("g", {
290
+ transform: isMirrored ? "translate(".concat(paddedWidth, ", 0) scale(-1, 1)") : undefined
286
291
  }, /*#__PURE__*/_react["default"].createElement("image", {
287
292
  preserveAspectRatio: "none",
288
293
  style: {
289
294
  pointerEvents: 'none'
290
295
  },
291
296
  href: svg_url,
292
- width: "".concat(newWidth + 2 * padding_width),
293
- height: "".concat(newDepth + 2 * padding_depth),
297
+ width: "".concat(paddedWidth),
298
+ height: "".concat(paddedDepth),
294
299
  transform: "scale(1, -1)",
295
300
  x: "0",
296
- y: "".concat(-newDepth - 2 * padding_depth)
301
+ y: "".concat(-paddedDepth)
297
302
  }), /*#__PURE__*/_react["default"].createElement("rect", {
298
303
  x: "".concat(padding_width),
299
304
  y: "".concat(padding_depth),
@@ -305,7 +310,7 @@ function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corner, sha
305
310
  opacity: 0.7,
306
311
  postion: 'relative'
307
312
  }
308
- }), /*#__PURE__*/_react["default"].createElement("g", {
313
+ })), /*#__PURE__*/_react["default"].createElement("g", {
309
314
  transform: "translate(".concat(padding_width, ",").concat(padding_depth, ")")
310
315
  }, txtContent)), element.category === 'cabinet' && /*#__PURE__*/_react["default"].createElement("g", {
311
316
  visibility: (0, _cabinetWarning.isWarningCabinet)(element) ? 'visible' : 'hidden'
@@ -328,6 +333,8 @@ function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corner, sha
328
333
  transform: "rotate(".concat(rotation, ")")
329
334
  }, /*#__PURE__*/_react["default"].createElement("g", {
330
335
  transform: "translate(".concat(-newWidth / 2, ",").concat(-newDepth / 2, ")")
336
+ }, /*#__PURE__*/_react["default"].createElement("g", {
337
+ transform: isMirrored ? "translate(".concat(newWidth, ", 0) scale(-1, 1)") : undefined
331
338
  }, newDepth > 15 ? [/*#__PURE__*/_react["default"].createElement("rect", {
332
339
  key: "base",
333
340
  x: "0",
@@ -346,7 +353,7 @@ function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corner, sha
346
353
  width: newWidth,
347
354
  height: newDepth,
348
355
  style: style
349
- }), txtContent)));
356
+ })), txtContent)));
350
357
  }
351
358
  return rendered;
352
359
  }
@@ -402,6 +409,7 @@ function render3DItem(element, layer, scene, sizeinfo, structure_json, is_corner
402
409
  if (element.doorStyle.constructor !== _immutable.Map) {
403
410
  element = element.set('doorStyle', (0, _immutable.fromJS)(element.doorStyle));
404
411
  }
412
+ var isMirrored = element.mirrored === true;
405
413
  if (element.doorStyle.toJS().handle_gltf !== '') {
406
414
  // Check element has doorHandle
407
415
  for (var i = 1; i < 10; i++) {
@@ -492,9 +500,10 @@ function render3DItem(element, layer, scene, sizeinfo, structure_json, is_corner
492
500
  newAltitude = (0, _convertUnitsLite.convert)(newAltitude).from(newUnit).to(scene.unit);
493
501
  var _element = element.toJS();
494
502
  if (!_element.doorStyle.doorStyles.is_euro_cds) {
495
- object1.scale.set(100 * newWidth / sizeinfo.width, 100 * newHeight / sizeinfo.height, 100 * newDepth / sizeinfo.depth);
503
+ var scaleX = 100 * newWidth / sizeinfo.width;
504
+ object1.scale.set(isMirrored ? -scaleX : scaleX, 100 * newHeight / sizeinfo.height, 100 * newDepth / sizeinfo.depth);
496
505
  } else {
497
- object1.scale.set(100, 100, 100);
506
+ object1.scale.set(isMirrored ? -100 : 100, 100, 100);
498
507
  }
499
508
  // Normalize the origin of the object
500
509
  var boundingBox = GeomUtils.baseBox3FromObject(object1);
@@ -565,7 +574,8 @@ function render3DItem(element, layer, scene, sizeinfo, structure_json, is_corner
565
574
  // save object transform info///
566
575
  var scalevec = new Three.Vector3(object1.scale.x, object1.scale.y, object1.scale.z);
567
576
  var posVec = new Three.Vector3(object1.position.x, object1.position.y, object1.position.z);
568
- object.scale.set(1 * newWidth / sizeinfo.width, 1 * newHeight / sizeinfo.height, 1 * newDepth / sizeinfo.depth);
577
+ var selectedScaleX = 1 * newWidth / sizeinfo.width;
578
+ object.scale.set(isMirrored ? -selectedScaleX : selectedScaleX, 1 * newHeight / sizeinfo.height, 1 * newDepth / sizeinfo.depth);
569
579
  object1.position.set(0, 0, 0);
570
580
  object1.rotation.set(0, 0, 0);
571
581
 
package/lib/class/item.js CHANGED
@@ -20,6 +20,7 @@ var _molding = require("../utils/molding");
20
20
  var _utils = require("../components/viewer2d/utils");
21
21
  var _history = require("../utils/history");
22
22
  var _immutable2 = require("../shared/objects/immutable");
23
+ var _cabinetMirror = require("../shared/domain/cabinet-mirror");
23
24
  var _cabinetWarning = require("../shared/domain/cabinet-warning");
24
25
  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; }
25
26
  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) { (0, _defineProperty2["default"])(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; }
@@ -87,6 +88,8 @@ var Item = exports["default"] = /*#__PURE__*/function () {
87
88
  category: state.catalog.getIn(['elements', type, 'type']),
88
89
  layoutpos: state.catalog.getIn(['elements', type, 'info', 'layoutpos']),
89
90
  cabinet_category: state.catalog.getIn(['elements', type, 'obj']).toJS().cabinet_category,
91
+ can_be_mirrored: state.catalog.getIn(['elements', type, 'can_be_mirrored']),
92
+ mirrored: state.catalog.getIn(['elements', type, 'mirrored']),
90
93
  type: type,
91
94
  height: height,
92
95
  width: width,
@@ -115,7 +118,8 @@ var Item = exports["default"] = /*#__PURE__*/function () {
115
118
  if (isDuplication && refItem) {
116
119
  var _refItem$ccdf, _refItem$get, _refItem$properties, _refItem$properties$g;
117
120
  item = item.merge({
118
- doorStyle: refItem.doorStyle
121
+ doorStyle: refItem.doorStyle,
122
+ mirrored: refItem.mirrored === true
119
123
  });
120
124
  // When duplicating, preserve the instance-selected CCDF from the source cabinet.
121
125
  var refCcdf = (_refItem$ccdf = refItem === null || refItem === void 0 ? void 0 : refItem.ccdf) !== null && _refItem$ccdf !== void 0 ? _refItem$ccdf : refItem === null || refItem === void 0 || (_refItem$get = refItem.get) === null || _refItem$get === void 0 ? void 0 : _refItem$get.call(refItem, 'ccdf');
@@ -307,6 +311,54 @@ var Item = exports["default"] = /*#__PURE__*/function () {
307
311
  updatedState: state
308
312
  };
309
313
  }
314
+ }, {
315
+ key: "setMoldingsCCDF",
316
+ value: function setMoldingsCCDF(state, ccdf_list, applyScope) {
317
+ var layerID = state.getIn(['scene', 'selectedLayer']);
318
+ var layer = state.getIn(['scene', 'layers', layerID]);
319
+ if (!Array.isArray(ccdf_list)) return {
320
+ updatedState: state
321
+ };
322
+ var idSet = null;
323
+ if (applyScope === _constants.DOORSTYLE_SCOPE_SINGLE) {
324
+ var selectedItemIds = state.getIn(['scene', 'layers', layerID, 'selected', 'items']).toJS();
325
+ idSet = new Set(selectedItemIds);
326
+ }
327
+ var layerMoldings = layer.molding;
328
+ if (!(0, _utils.isEmpty)(layerMoldings)) {
329
+ var updatedLayerMoldings = [];
330
+ layerMoldings === null || layerMoldings === void 0 || layerMoldings.forEach(function (md) {
331
+ var moldingID = md.itemID;
332
+ var picked = ccdf_list.find(function (c) {
333
+ return (c === null || c === void 0 ? void 0 : c.cabinet_id) && c.cabinet_id === moldingID;
334
+ });
335
+ md.ccdf = picked;
336
+ updatedLayerMoldings.push(md);
337
+ });
338
+ state = state.setIn(['scene', 'layers', layerID, 'molding'], updatedLayerMoldings);
339
+ }
340
+ layer.items.forEach(function (it) {
341
+ var _idSet2;
342
+ // if (isEmpty(it?.molding)) return;
343
+ var should = applyScope === _constants.DOORSTYLE_SCOPE_ALL ? true : (_idSet2 = idSet) === null || _idSet2 === void 0 ? void 0 : _idSet2.has(it.id);
344
+ if (!should) return;
345
+ var itemMoldings = it.molding;
346
+ var updatedItemMoldings = [];
347
+ itemMoldings === null || itemMoldings === void 0 || itemMoldings.forEach(function (md) {
348
+ var itemMoldingID = md.itemID;
349
+ var picked = ccdf_list.find(function (c) {
350
+ return (c === null || c === void 0 ? void 0 : c.cabinet_id) && c.cabinet_id === itemMoldingID;
351
+ });
352
+ if (!picked) return;
353
+ md.ccdf = picked;
354
+ updatedItemMoldings.push(md);
355
+ });
356
+ state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], updatedItemMoldings);
357
+ });
358
+ return {
359
+ updatedState: state
360
+ };
361
+ }
310
362
  }, {
311
363
  key: "updateDoorHandle",
312
364
  value: function updateDoorHandle(item, layer) {
@@ -599,6 +651,32 @@ var Item = exports["default"] = /*#__PURE__*/function () {
599
651
  updatedState: state
600
652
  };
601
653
  }
654
+ }, {
655
+ key: "toggleItemMirror",
656
+ value: function toggleItemMirror(state, layerID, itemID) {
657
+ var mirrored = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
658
+ var onInternalEvent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
659
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
660
+ if ((0, _util.isUndefined)(item) || !(0, _cabinetMirror.canMirrorCabinet)(item)) {
661
+ return {
662
+ updatedState: state
663
+ };
664
+ }
665
+ var layer = state.getIn(['scene', 'layers', layerID]);
666
+ var nextMirrored = typeof mirrored === 'boolean' ? mirrored : item.mirrored !== true;
667
+ var mirroredItem = item.set('mirrored', nextMirrored);
668
+ state = state.setIn(['scene', 'layers', layerID, 'items', itemID, 'mirrored'], nextMirrored);
669
+ if (onInternalEvent) {
670
+ var jsElement = (0, _helper.updatePayloadOfInternalEvent)(mirroredItem, layer);
671
+ onInternalEvent({
672
+ type: _constants.INTERNAL_EVENT_MIRROR_ELEMENT,
673
+ value: jsElement
674
+ });
675
+ }
676
+ return {
677
+ updatedState: state
678
+ };
679
+ }
602
680
  }, {
603
681
  key: "storeDistArray",
604
682
  value: function storeDistArray(state, layerID, itemID, distArray) {