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,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>
@@ -24,6 +24,8 @@ export default function (_ref) {
24
24
  obj_property = _ref.obj_property,
25
25
  outlineSVGData = _ref.outlineSVGData,
26
26
  cds = _ref.cds,
27
+ can_be_mirrored = _ref.can_be_mirrored,
28
+ mirrored = _ref.mirrored,
27
29
  _ref$width_unit = _ref.width_unit,
28
30
  width_unit = _ref$width_unit === void 0 ? 'in' : _ref$width_unit,
29
31
  _ref$height_unit = _ref.height_unit,
@@ -150,6 +152,8 @@ export default function (_ref) {
150
152
  img: base,
151
153
  obj: obj_property,
152
154
  cds: cds,
155
+ can_be_mirrored: can_be_mirrored,
156
+ mirrored: mirrored,
153
157
  structure_json: structure_json,
154
158
  ccdf_list: ccdf_list,
155
159
  width_unit: widthUnit,
@@ -62,6 +62,7 @@ export function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corn
62
62
  var x = element.x,
63
63
  y = element.y,
64
64
  rotation = element.rotation;
65
+ var isMirrored = element.mirrored === true;
65
66
  var el_DSN = 'el_DSN',
66
67
  doorStylesKeys = [];
67
68
  var _element = element.toJS();
@@ -182,6 +183,8 @@ export function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corn
182
183
  }
183
184
  var padding_width = padding * newWidth / svg_width;
184
185
  var padding_depth = padding * newDepth / svg_depth;
186
+ var paddedWidth = newWidth + 2 * padding_width;
187
+ var paddedDepth = newDepth + 2 * padding_depth;
185
188
 
186
189
  // offset of the warning icons(by default, show the icons with width direction and if depth is bigger than width, show with depth direction.)
187
190
  var transX = svg_width < svg_depth ? 0 : 10;
@@ -269,17 +272,19 @@ export function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corn
269
272
  transform: "rotate(".concat(rotation, ")")
270
273
  }, /*#__PURE__*/React.createElement("g", {
271
274
  transform: "translate(".concat(-newWidth / 2 - padding_width, ",").concat(-newDepth / 2 - padding_depth, ")")
275
+ }, /*#__PURE__*/React.createElement("g", {
276
+ transform: isMirrored ? "translate(".concat(paddedWidth, ", 0) scale(-1, 1)") : undefined
272
277
  }, /*#__PURE__*/React.createElement("image", {
273
278
  preserveAspectRatio: "none",
274
279
  style: {
275
280
  pointerEvents: 'none'
276
281
  },
277
282
  href: svg_url,
278
- width: "".concat(newWidth + 2 * padding_width),
279
- height: "".concat(newDepth + 2 * padding_depth),
283
+ width: "".concat(paddedWidth),
284
+ height: "".concat(paddedDepth),
280
285
  transform: "scale(1, -1)",
281
286
  x: "0",
282
- y: "".concat(-newDepth - 2 * padding_depth)
287
+ y: "".concat(-paddedDepth)
283
288
  }), /*#__PURE__*/React.createElement("rect", {
284
289
  x: "".concat(padding_width),
285
290
  y: "".concat(padding_depth),
@@ -291,7 +296,7 @@ export function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corn
291
296
  opacity: 0.7,
292
297
  postion: 'relative'
293
298
  }
294
- }), /*#__PURE__*/React.createElement("g", {
299
+ })), /*#__PURE__*/React.createElement("g", {
295
300
  transform: "translate(".concat(padding_width, ",").concat(padding_depth, ")")
296
301
  }, txtContent)), element.category === 'cabinet' && /*#__PURE__*/React.createElement("g", {
297
302
  visibility: isWarningCabinet(element) ? 'visible' : 'hidden'
@@ -314,6 +319,8 @@ export function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corn
314
319
  transform: "rotate(".concat(rotation, ")")
315
320
  }, /*#__PURE__*/React.createElement("g", {
316
321
  transform: "translate(".concat(-newWidth / 2, ",").concat(-newDepth / 2, ")")
322
+ }, /*#__PURE__*/React.createElement("g", {
323
+ transform: isMirrored ? "translate(".concat(newWidth, ", 0) scale(-1, 1)") : undefined
317
324
  }, newDepth > 15 ? [/*#__PURE__*/React.createElement("rect", {
318
325
  key: "base",
319
326
  x: "0",
@@ -332,7 +339,7 @@ export function render2DItem(element, layer, scene, sizeinfo, layoutpos, is_corn
332
339
  width: newWidth,
333
340
  height: newDepth,
334
341
  style: style
335
- }), txtContent)));
342
+ })), txtContent)));
336
343
  }
337
344
  return rendered;
338
345
  }
@@ -388,6 +395,7 @@ export function render3DItem(element, layer, scene, sizeinfo, structure_json, is
388
395
  if (element.doorStyle.constructor !== Map) {
389
396
  element = element.set('doorStyle', fromJS(element.doorStyle));
390
397
  }
398
+ var isMirrored = element.mirrored === true;
391
399
  if (element.doorStyle.toJS().handle_gltf !== '') {
392
400
  // Check element has doorHandle
393
401
  for (var i = 1; i < 10; i++) {
@@ -478,9 +486,10 @@ export function render3DItem(element, layer, scene, sizeinfo, structure_json, is
478
486
  newAltitude = convert(newAltitude).from(newUnit).to(scene.unit);
479
487
  var _element = element.toJS();
480
488
  if (!_element.doorStyle.doorStyles.is_euro_cds) {
481
- object1.scale.set(100 * newWidth / sizeinfo.width, 100 * newHeight / sizeinfo.height, 100 * newDepth / sizeinfo.depth);
489
+ var scaleX = 100 * newWidth / sizeinfo.width;
490
+ object1.scale.set(isMirrored ? -scaleX : scaleX, 100 * newHeight / sizeinfo.height, 100 * newDepth / sizeinfo.depth);
482
491
  } else {
483
- object1.scale.set(100, 100, 100);
492
+ object1.scale.set(isMirrored ? -100 : 100, 100, 100);
484
493
  }
485
494
  // Normalize the origin of the object
486
495
  var boundingBox = GeomUtils.baseBox3FromObject(object1);
@@ -551,7 +560,8 @@ export function render3DItem(element, layer, scene, sizeinfo, structure_json, is
551
560
  // save object transform info///
552
561
  var scalevec = new Three.Vector3(object1.scale.x, object1.scale.y, object1.scale.z);
553
562
  var posVec = new Three.Vector3(object1.position.x, object1.position.y, object1.position.z);
554
- object.scale.set(1 * newWidth / sizeinfo.width, 1 * newHeight / sizeinfo.height, 1 * newDepth / sizeinfo.depth);
563
+ var selectedScaleX = 1 * newWidth / sizeinfo.width;
564
+ object.scale.set(isMirrored ? -selectedScaleX : selectedScaleX, 1 * newHeight / sizeinfo.height, 1 * newDepth / sizeinfo.depth);
555
565
  object1.position.set(0, 0, 0);
556
566
  object1.rotation.set(0, 0, 0);
557
567
 
package/es/class/item.js CHANGED
@@ -8,13 +8,14 @@ import { convert } from "../utils/convert-units-lite";
8
8
  import { Group, Hole, Layer } from "./export";
9
9
  import { GeometryUtils, IDBroker, MoldingUtils, NameGenerator } from "../utils/export";
10
10
  import { fromJS, Map } from 'immutable';
11
- import { DOORSTYLE_SCOPE_ALL, DOORSTYLE_SCOPE_MULTIPLE, DOORSTYLE_SCOPE_SINGLE, INSTALLATION_SUFFIX_TYPE, INTERNAL_EVENT_DRAW_ELEMENT, MODE_DRAGGING_ITEM, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM, MODE_ROTATING_ITEM_3D, MOLDING_LOCATIONS } from "../constants";
11
+ import { DOORSTYLE_SCOPE_ALL, DOORSTYLE_SCOPE_MULTIPLE, DOORSTYLE_SCOPE_SINGLE, INSTALLATION_SUFFIX_TYPE, INTERNAL_EVENT_DRAW_ELEMENT, INTERNAL_EVENT_MIRROR_ELEMENT, MODE_DRAGGING_ITEM, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM, MODE_ROTATING_ITEM_3D, MOLDING_LOCATIONS } from "../constants";
12
12
  import { debugUtil, updatePayloadOfInternalEvent } from "../utils/helper";
13
13
  import { isUndefined } from 'util';
14
14
  import { hasMoldingLayout } from "../utils/molding";
15
15
  import { getInstallationSuffix, isEmpty } from "../components/viewer2d/utils";
16
16
  import { historyPush } from "../utils/history";
17
17
  import { toJSIfNeeded } from "../shared/objects/immutable";
18
+ import { canMirrorCabinet } from "../shared/domain/cabinet-mirror";
18
19
  import { isWarningCabinet } from "../shared/domain/cabinet-warning";
19
20
  var allItemRect;
20
21
  var allItemSnap;
@@ -80,6 +81,8 @@ var Item = /*#__PURE__*/function () {
80
81
  category: state.catalog.getIn(['elements', type, 'type']),
81
82
  layoutpos: state.catalog.getIn(['elements', type, 'info', 'layoutpos']),
82
83
  cabinet_category: state.catalog.getIn(['elements', type, 'obj']).toJS().cabinet_category,
84
+ can_be_mirrored: state.catalog.getIn(['elements', type, 'can_be_mirrored']),
85
+ mirrored: state.catalog.getIn(['elements', type, 'mirrored']),
83
86
  type: type,
84
87
  height: height,
85
88
  width: width,
@@ -108,7 +111,8 @@ var Item = /*#__PURE__*/function () {
108
111
  if (isDuplication && refItem) {
109
112
  var _refItem$ccdf, _refItem$get, _refItem$properties, _refItem$properties$g;
110
113
  item = item.merge({
111
- doorStyle: refItem.doorStyle
114
+ doorStyle: refItem.doorStyle,
115
+ mirrored: refItem.mirrored === true
112
116
  });
113
117
  // When duplicating, preserve the instance-selected CCDF from the source cabinet.
114
118
  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');
@@ -300,6 +304,54 @@ var Item = /*#__PURE__*/function () {
300
304
  updatedState: state
301
305
  };
302
306
  }
307
+ }, {
308
+ key: "setMoldingsCCDF",
309
+ value: function setMoldingsCCDF(state, ccdf_list, applyScope) {
310
+ var layerID = state.getIn(['scene', 'selectedLayer']);
311
+ var layer = state.getIn(['scene', 'layers', layerID]);
312
+ if (!Array.isArray(ccdf_list)) return {
313
+ updatedState: state
314
+ };
315
+ var idSet = null;
316
+ if (applyScope === DOORSTYLE_SCOPE_SINGLE) {
317
+ var selectedItemIds = state.getIn(['scene', 'layers', layerID, 'selected', 'items']).toJS();
318
+ idSet = new Set(selectedItemIds);
319
+ }
320
+ var layerMoldings = layer.molding;
321
+ if (!isEmpty(layerMoldings)) {
322
+ var updatedLayerMoldings = [];
323
+ layerMoldings === null || layerMoldings === void 0 || layerMoldings.forEach(function (md) {
324
+ var moldingID = md.itemID;
325
+ var picked = ccdf_list.find(function (c) {
326
+ return (c === null || c === void 0 ? void 0 : c.cabinet_id) && c.cabinet_id === moldingID;
327
+ });
328
+ md.ccdf = picked;
329
+ updatedLayerMoldings.push(md);
330
+ });
331
+ state = state.setIn(['scene', 'layers', layerID, 'molding'], updatedLayerMoldings);
332
+ }
333
+ layer.items.forEach(function (it) {
334
+ var _idSet2;
335
+ // if (isEmpty(it?.molding)) return;
336
+ var should = applyScope === DOORSTYLE_SCOPE_ALL ? true : (_idSet2 = idSet) === null || _idSet2 === void 0 ? void 0 : _idSet2.has(it.id);
337
+ if (!should) return;
338
+ var itemMoldings = it.molding;
339
+ var updatedItemMoldings = [];
340
+ itemMoldings === null || itemMoldings === void 0 || itemMoldings.forEach(function (md) {
341
+ var itemMoldingID = md.itemID;
342
+ var picked = ccdf_list.find(function (c) {
343
+ return (c === null || c === void 0 ? void 0 : c.cabinet_id) && c.cabinet_id === itemMoldingID;
344
+ });
345
+ if (!picked) return;
346
+ md.ccdf = picked;
347
+ updatedItemMoldings.push(md);
348
+ });
349
+ state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], updatedItemMoldings);
350
+ });
351
+ return {
352
+ updatedState: state
353
+ };
354
+ }
303
355
  }, {
304
356
  key: "updateDoorHandle",
305
357
  value: function updateDoorHandle(item, layer) {
@@ -592,6 +644,32 @@ var Item = /*#__PURE__*/function () {
592
644
  updatedState: state
593
645
  };
594
646
  }
647
+ }, {
648
+ key: "toggleItemMirror",
649
+ value: function toggleItemMirror(state, layerID, itemID) {
650
+ var mirrored = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
651
+ var onInternalEvent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
652
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
653
+ if (isUndefined(item) || !canMirrorCabinet(item)) {
654
+ return {
655
+ updatedState: state
656
+ };
657
+ }
658
+ var layer = state.getIn(['scene', 'layers', layerID]);
659
+ var nextMirrored = typeof mirrored === 'boolean' ? mirrored : item.mirrored !== true;
660
+ var mirroredItem = item.set('mirrored', nextMirrored);
661
+ state = state.setIn(['scene', 'layers', layerID, 'items', itemID, 'mirrored'], nextMirrored);
662
+ if (onInternalEvent) {
663
+ var jsElement = updatePayloadOfInternalEvent(mirroredItem, layer);
664
+ onInternalEvent({
665
+ type: INTERNAL_EVENT_MIRROR_ELEMENT,
666
+ value: jsElement
667
+ });
668
+ }
669
+ return {
670
+ updatedState: state
671
+ };
672
+ }
595
673
  }, {
596
674
  key: "storeDistArray",
597
675
  value: function storeDistArray(state, layerID, itemID, distArray) {