kitchen-simulator 5.0.0-test.17 → 5.0.0-test.19

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 (206) hide show
  1. package/package.json +8 -18
  2. package/src/@history.js +3 -0
  3. package/src/CrossSignOn.jsx +94 -0
  4. package/src/KitchenConfigurator.jsx +1526 -0
  5. package/src/KitchenConfiguratorApp.jsx +1 -1
  6. package/src/_KitchenConfigurator.jsx +3 -91
  7. package/src/components/atoms/Snackbar/index.jsx +43 -0
  8. package/src/components/atoms/radio-button/index.jsx +20 -0
  9. package/src/components/atoms/radio-button/styles.js +56 -0
  10. package/src/components/button/MainButton.jsx +157 -0
  11. package/src/components/button/ToggleMeasureButton.jsx +65 -0
  12. package/src/components/catalog-view/catalog-breadcrumb.jsx +53 -0
  13. package/src/components/catalog-view/catalog-item.jsx +229 -0
  14. package/src/components/catalog-view/catalog-list.jsx +173 -0
  15. package/src/components/catalog-view/catalog-page-item.jsx +110 -0
  16. package/src/components/catalog-view/catalog-turn-back-page-item.jsx +80 -0
  17. package/src/components/configurator/custom-configurator.jsx +77 -0
  18. package/src/components/configurator/project-configurator.jsx +120 -0
  19. package/src/components/content.jsx +136 -0
  20. package/src/components/export.js +36 -0
  21. package/src/components/firstsetting/button/styles.js +223 -0
  22. package/src/components/firstsetting/export.js +9 -0
  23. package/src/components/firstsetting/firstsetting-content-button.jsx +198 -0
  24. package/src/components/firstsetting/firstsetting-toggle-button.jsx +101 -0
  25. package/src/components/firstsetting/firstsetting.jsx +814 -0
  26. package/src/components/footerbar/button/ControlButton.jsx +43 -0
  27. package/src/components/footerbar/button/DirectionButton.jsx +54 -0
  28. package/src/components/footerbar/button/DirectionPanSpinButton.jsx +36 -0
  29. package/src/components/footerbar/button/ToggleButton.jsx +58 -0
  30. package/src/components/footerbar/button/ToggleConvertButton.jsx +48 -0
  31. package/src/components/footerbar/button/ToggleMeasureButton.jsx +33 -0
  32. package/src/components/footerbar/button/styles.js +217 -0
  33. package/src/components/footerbar/export.js +9 -0
  34. package/src/components/footerbar/footer-content-button.jsx +198 -0
  35. package/src/components/footerbar/footer-toggle-button.jsx +101 -0
  36. package/src/components/footerbar/footerbar.jsx +1103 -0
  37. package/src/components/footerbar/styles.js +263 -0
  38. package/src/components/header/button/MenuButton.jsx +46 -0
  39. package/src/components/header/button/SaveButton.jsx +54 -0
  40. package/src/components/header/button/styles.js +181 -0
  41. package/src/components/header/export.js +5 -0
  42. package/src/components/header/header.jsx +631 -0
  43. package/src/components/header/header.style.css +47 -0
  44. package/src/components/header/styles.js +320 -0
  45. package/src/components/login/Login.js +77 -0
  46. package/src/components/login/LoginForm/index.js +108 -0
  47. package/src/components/login/Register.js +82 -0
  48. package/src/components/login/RegisterForm/index.js +171 -0
  49. package/src/components/login/jwtService.js +201 -0
  50. package/src/components/login/style.css +158 -0
  51. package/src/components/login/style.scss +260 -0
  52. package/src/components/molecules/slider/index.jsx +15 -0
  53. package/src/components/molecules/slider/styles.js +0 -0
  54. package/src/components/molecules/slider/styles.scss +3 -0
  55. package/src/components/myprojects/export.js +5 -0
  56. package/src/components/myprojects/index.jsx +445 -0
  57. package/src/components/myprojects/styles.js +241 -0
  58. package/src/components/sidebar/custom-accordion.jsx +48 -0
  59. package/src/components/sidebar/export.js +15 -0
  60. package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +73 -0
  61. package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +101 -0
  62. package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +149 -0
  63. package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +316 -0
  64. package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +108 -0
  65. package/src/components/sidebar/panel-element-editor/element-editor.jsx +1070 -0
  66. package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
  67. package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +104 -0
  68. package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +155 -0
  69. package/src/components/sidebar/panel-group-editor.jsx +272 -0
  70. package/src/components/sidebar/panel-groups.jsx +310 -0
  71. package/src/components/sidebar/panel-guides.jsx +192 -0
  72. package/src/components/sidebar/panel-layer-elements.jsx +298 -0
  73. package/src/components/sidebar/panel-layers.jsx +381 -0
  74. package/src/components/sidebar/panel.jsx +71 -0
  75. package/src/components/sidebar/sidebar.jsx +106 -0
  76. package/src/components/sidebar/toolbar-panel.jsx +139 -0
  77. package/src/components/sign/export.js +7 -0
  78. package/src/components/sign/main/index.jsx +523 -0
  79. package/src/components/sign/main/styles.js +163 -0
  80. package/src/components/style/button.jsx +95 -0
  81. package/src/components/style/cancel-button.jsx +20 -0
  82. package/src/components/style/content-container.jsx +29 -0
  83. package/src/components/style/content-title.jsx +20 -0
  84. package/src/components/style/delete-button.jsx +23 -0
  85. package/src/components/style/export.jsx +48 -0
  86. package/src/components/style/form-block.jsx +13 -0
  87. package/src/components/style/form-color-input.jsx +27 -0
  88. package/src/components/style/form-label.jsx +15 -0
  89. package/src/components/style/form-number-input.jsx +196 -0
  90. package/src/components/style/form-number-input_2.jsx +191 -0
  91. package/src/components/style/form-select.jsx +38 -0
  92. package/src/components/style/form-slider.jsx +36 -0
  93. package/src/components/style/form-submit-button.jsx +23 -0
  94. package/src/components/style/form-text-input.jsx +65 -0
  95. package/src/components/toolbar/button/ControlButton.jsx +41 -0
  96. package/src/components/toolbar/button/DirectionButton.jsx +34 -0
  97. package/src/components/toolbar/button/RightButton.jsx +103 -0
  98. package/src/components/toolbar/button/ToggleButton.jsx +41 -0
  99. package/src/components/toolbar/button/index.jsx +55 -0
  100. package/src/components/toolbar/button/styles.js +127 -0
  101. package/src/components/toolbar/components/DoorStyleMenu.jsx +103 -0
  102. package/src/components/toolbar/components/Pricing.jsx +126 -0
  103. package/src/components/toolbar/components/ReviewForQuote.jsx +635 -0
  104. package/src/components/toolbar/export.js +21 -0
  105. package/src/components/toolbar/main/Alert.js +122 -0
  106. package/src/components/toolbar/main/TakePictureModal.jsx +104 -0
  107. package/src/components/toolbar/main/confirm-popup.jsx +99 -0
  108. package/src/components/toolbar/main/index.jsx +5627 -0
  109. package/src/components/toolbar/main/lShaped.json +311 -0
  110. package/src/components/toolbar/main/longNarrow.json +238 -0
  111. package/src/components/toolbar/main/myComponents.js +123 -0
  112. package/src/components/toolbar/main/oRectangle.json +220 -0
  113. package/src/components/toolbar/main/rectangle.json +238 -0
  114. package/src/components/toolbar/main/style.css +107 -0
  115. package/src/components/toolbar/main/styles.js +696 -0
  116. package/src/components/toolbar/plugin-item.jsx +123 -0
  117. package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +73 -0
  118. package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +102 -0
  119. package/src/components/toolbar/popup/appliance/index.jsx +83 -0
  120. package/src/components/toolbar/popup/autosaveprompt/index.jsx +150 -0
  121. package/src/components/toolbar/popup/autosaveprompt/styles.css +64 -0
  122. package/src/components/toolbar/popup/autosaveprompt/styles.js +40 -0
  123. package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +73 -0
  124. package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +119 -0
  125. package/src/components/toolbar/popup/cabinet/index.jsx +85 -0
  126. package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +63 -0
  127. package/src/components/toolbar/popup/doorStyle/index.jsx +71 -0
  128. package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +139 -0
  129. package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +2 -0
  130. package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +157 -0
  131. package/src/components/toolbar/popup/downloadsummary/index.jsx +643 -0
  132. package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +51 -0
  133. package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +175 -0
  134. package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +283 -0
  135. package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +2257 -0
  136. package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +93 -0
  137. package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +132 -0
  138. package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +2198 -0
  139. package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +152 -0
  140. package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +149 -0
  141. package/src/components/toolbar/popup/downloadsummary/styles.css +177 -0
  142. package/src/components/toolbar/popup/downloadsummary/styles.js +453 -0
  143. package/src/components/toolbar/popup/finishingtouch/category/index.jsx +34 -0
  144. package/src/components/toolbar/popup/finishingtouch/index.jsx +58 -0
  145. package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +112 -0
  146. package/src/components/toolbar/popup/finishingtouch/product/index.jsx +116 -0
  147. package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +101 -0
  148. package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +254 -0
  149. package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +311 -0
  150. package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +238 -0
  151. package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +220 -0
  152. package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +238 -0
  153. package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +86 -0
  154. package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +109 -0
  155. package/src/components/toolbar/popup/floorplan/index.jsx +60 -0
  156. package/src/components/toolbar/popup/index.jsx +241 -0
  157. package/src/components/toolbar/popup/newproject/index.jsx +59 -0
  158. package/src/components/toolbar/popup/newproject/styles.css +64 -0
  159. package/src/components/toolbar/popup/newproject/styles.js +41 -0
  160. package/src/components/toolbar/popup/product/appliance.jsx +54 -0
  161. package/src/components/toolbar/popup/product/cabinetproduct.jsx +15 -0
  162. package/src/components/toolbar/popup/product/doorstyle.jsx +58 -0
  163. package/src/components/toolbar/popup/product/doorstyleproduct.jsx +47 -0
  164. package/src/components/toolbar/popup/product/floor.jsx +36 -0
  165. package/src/components/toolbar/popup/product/floorproduct.jsx +42 -0
  166. package/src/components/toolbar/popup/product/index.jsx +36 -0
  167. package/src/components/toolbar/popup/product/primary.jsx +77 -0
  168. package/src/components/toolbar/popup/product/productline.jsx +93 -0
  169. package/src/components/toolbar/popup/product/reviewItem.jsx +427 -0
  170. package/src/components/toolbar/popup/product/reviewMolding.jsx +310 -0
  171. package/src/components/toolbar/popup/product/style.css +54 -0
  172. package/src/components/toolbar/popup/product/styles.js +260 -0
  173. package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +146 -0
  174. package/src/components/toolbar/popup/savedesign/index.jsx +495 -0
  175. package/src/components/toolbar/popup/savedesign/savedesign.style.css +16 -0
  176. package/src/components/toolbar/popup/savedesign/styles.js +151 -0
  177. package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +87 -0
  178. package/src/components/toolbar/popup/styles.js +909 -0
  179. package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +192 -0
  180. package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +96 -0
  181. package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +54 -0
  182. package/src/components/toolbar/popup/submitforquote/StepDots.jsx +25 -0
  183. package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +116 -0
  184. package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +38 -0
  185. package/src/components/toolbar/popup/submitforquote/index.jsx +698 -0
  186. package/src/components/toolbar/popup/submitforquote/styles.css +105 -0
  187. package/src/components/toolbar/popup/submitforquote/styles.js +294 -0
  188. package/src/components/toolbar/popup/submitprompt/index.jsx +89 -0
  189. package/src/components/toolbar/popup/submitprompt/styles.css +64 -0
  190. package/src/components/toolbar/popup/submitprompt/styles.js +42 -0
  191. package/src/components/toolbar/toolbar-button.jsx +90 -0
  192. package/src/components/toolbar/toolbar-load-button.jsx +36 -0
  193. package/src/components/toolbar/toolbar-save-button.jsx +32 -0
  194. package/src/components/tutorial-view/Modal.jsx +584 -0
  195. package/src/components/tutorial-view/style.css +111 -0
  196. package/src/components/tutorial-view/styles.js +65 -0
  197. package/src/components/wizardstep/button/styles.js +677 -0
  198. package/src/components/wizardstep/export.js +5 -0
  199. package/src/components/wizardstep/index.jsx +1372 -0
  200. package/src/components/wizardstep/styles.js +688 -0
  201. package/src/components/wizardstep/wizardstep-content-button.jsx +198 -0
  202. package/src/components/wizardstep/wizardstep-toggle-button.jsx +101 -0
  203. package/src/{_index.js → index.js} +4 -4
  204. package/src/renderer.jsx +466 -0
  205. package/src/actions/_export.js +0 -35
  206. package/src/components/_export.js +0 -11
@@ -0,0 +1,175 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ import { ReactSVGPanZoom } from 'react-svg-pan-zoom';
3
+ import State from '../../../../viewer2d/state';
4
+ import { getSignedUrl } from '../../../../../utils/helper';
5
+
6
+ const Viewer2DDownLoad = ({ state, catalog, width, height }) => {
7
+ const Viewer = useRef(null);
8
+
9
+ useEffect(() => {
10
+ // move viewer point to center
11
+ let selectedLayer = state.scene.layers.get(state.scene.selectedLayer);
12
+ const vertices = selectedLayer.vertices;
13
+
14
+ if (vertices.isEmpty()) {
15
+ return;
16
+ }
17
+
18
+ let bottomX = 0,
19
+ bottomY = 100000,
20
+ topX = 100000,
21
+ topY = 0;
22
+
23
+ vertices.forEach(vertex => {
24
+ if (bottomX < vertex.x) bottomX = vertex.x;
25
+ if (bottomY > vertex.y) bottomY = vertex.y;
26
+ if (topX > vertex.x) topX = vertex.x;
27
+ if (topY < vertex.y) topY = vertex.y;
28
+ });
29
+
30
+ let width = bottomX - topX;
31
+ let height = topY - bottomY;
32
+ let scale = Math.min(786 / width, 700 / height);
33
+ let moveX = topX + width / 2;
34
+ let moveY = 2000 - (bottomY + height / 2);
35
+
36
+ Viewer.current.setPointOnViewerCenter(moveX, moveY, scale * 0.62);
37
+
38
+ saveSVGScreenshotToFile();
39
+
40
+ return () => (window.pdf2DPlain = '');
41
+ }, []);
42
+
43
+ const saveSVGScreenshotToFile = async () => {
44
+ // First of all I need the svg content of the viewer
45
+ let svgElements1 = document.getElementById('viewer2d_download');
46
+
47
+ if (svgElements1 !== null) {
48
+ let svgElements = svgElements1.getElementsByTagName('svg');
49
+
50
+ // I get the element with max width (which is the viewer)
51
+ let maxWidthSVGElement = svgElements[0];
52
+ // let maxWidthSVGElement = document.getElementById("viewer2d_download");
53
+ for (let i = 1; i < svgElements.length; i++) {
54
+ if (
55
+ svgElements[i].width.baseVal.value >
56
+ maxWidthSVGElement.width.baseVal.value
57
+ ) {
58
+ maxWidthSVGElement = svgElements[i];
59
+ }
60
+ }
61
+ // Begin: Change Image tags' href to local data src
62
+ let images = maxWidthSVGElement.getElementsByTagName('image');
63
+
64
+ let readBlob = b => {
65
+ return new Promise(res => {
66
+ const reader = new FileReader();
67
+ reader.onloadend = () => {
68
+ res(reader.result);
69
+ };
70
+ reader.onerror = () => {
71
+ res(b);
72
+ };
73
+ reader.readAsDataURL(b);
74
+ });
75
+ };
76
+
77
+ try {
78
+ let imagePromises = Array.from(images).map(async image => {
79
+ image.setAttribute('crossorigin', 'anonymous');
80
+ const url = getSignedUrl(image.getAttribute('href'));
81
+ const response = await fetch(url, { cache: 'no-store' });
82
+ const blob = await response.blob();
83
+ const content = await readBlob(blob);
84
+ image.setAttribute('href', content);
85
+ });
86
+
87
+ await Promise.all(imagePromises); // 💡 wait for all images to be ready
88
+ } catch (e) {
89
+ console.error(
90
+ '[Download 2D View of PDF] Error loading images for SVG:',
91
+ e
92
+ );
93
+ }
94
+ // End: Change Image tags' href to local data src
95
+
96
+ let serializer = new XMLSerializer();
97
+
98
+ let img = new Image();
99
+
100
+ // I create the new canvas to draw
101
+ let canvas42DPlain = document.createElement('canvas');
102
+ // let canvas = document.getElementById('canvas_crop_image');
103
+ let ctx = canvas42DPlain.getContext('2d');
104
+
105
+ // Set width and height for the new canvas
106
+ let heightAtt = document.createAttribute('height');
107
+ heightAtt.value = maxWidthSVGElement.height.baseVal.value;
108
+ canvas42DPlain.setAttributeNode(heightAtt);
109
+
110
+ let widthAtt = document.createAttribute('width');
111
+ widthAtt.value = maxWidthSVGElement.width.baseVal.value;
112
+ canvas42DPlain.setAttributeNode(widthAtt);
113
+
114
+ ctx.fillStyle = 'white';
115
+ ctx.fillRect(0, 0, canvas42DPlain.width, canvas42DPlain.height);
116
+
117
+ img.crossOrigin = 'anonymous';
118
+ img.src = `data:image/svg+xml;base64,${window.btoa(
119
+ serializer.serializeToString(maxWidthSVGElement)
120
+ )}`;
121
+
122
+ img.onload = () => {
123
+ ctx.globalAlpha = 1;
124
+ ctx.drawImage(
125
+ img,
126
+ 0,
127
+ 0,
128
+ maxWidthSVGElement.width.baseVal.value,
129
+ maxWidthSVGElement.height.baseVal.value
130
+ );
131
+
132
+ window.pdf2DPlain = canvas42DPlain.toDataURL();
133
+ };
134
+ } else {
135
+ window.pdf2DPlain = '';
136
+ }
137
+ };
138
+
139
+ return (
140
+ <div style={{}} id="viewer2d_download">
141
+ <ReactSVGPanZoom
142
+ width={width}
143
+ height={height}
144
+ miniaturePosition="none"
145
+ toolbarPosition="none"
146
+ ref={Viewer}
147
+ detectWheel={false}
148
+ detectAutoPan={false}
149
+ >
150
+ <svg width={width} height={height}>
151
+ <defs>
152
+ <pattern
153
+ id="diagonalFill"
154
+ patternUnits="userSpaceOnUse"
155
+ width="4"
156
+ height="4"
157
+ fill="#FFF"
158
+ >
159
+ <rect x="0" y="0" width="4" height="4" fill="#FFF" />
160
+ <path
161
+ d="M-1,1 l2,-2 M0,4 l4,-4 M3,5 l2,-2"
162
+ style={{ stroke: '#8E9BA2', strokeWidth: 1 }}
163
+ />
164
+ </pattern>
165
+ </defs>
166
+ <g>
167
+ <State state={state} catalog={catalog} relatedLines={[]} />
168
+ </g>
169
+ </svg>
170
+ </ReactSVGPanZoom>
171
+ </div>
172
+ );
173
+ };
174
+
175
+ export default Viewer2DDownLoad;
@@ -0,0 +1,283 @@
1
+ import React, { useEffect, useState, useContext } from 'react';
2
+ import moment from 'moment';
3
+ import Viewer3D from '../../../../viewer3d/viewer3d';
4
+ import { DEFAULT_FONT_FAMILY, MODE_3D_VIEW } from '../../../../../constants';
5
+ import { DownloadSummaryContext } from './../downloadSummaryContext';
6
+
7
+ const Show3DView = ({ props, setIsLoading3D }) => {
8
+ let newState = props.state.set('mode', MODE_3D_VIEW);
9
+ const summaryContextValue = useContext(DownloadSummaryContext);
10
+
11
+ const clientName = (
12
+ (summaryContextValue?.firstName ?? '') +
13
+ ' ' +
14
+ (summaryContextValue?.lastName ?? '')
15
+ ).trim();
16
+
17
+ const projectId = summaryContextValue?.projectId
18
+ ? `#${summaryContextValue?.projectId}`
19
+ : '';
20
+
21
+ const [hasWall, setHasWall] = useState(true);
22
+
23
+ useEffect(() => {
24
+ let layer = props.state.scene.getIn([
25
+ 'layers',
26
+ props.state.scene.selectedLayer
27
+ ]);
28
+ !layer.lines.size && setHasWall(false);
29
+ });
30
+
31
+ useEffect(() => {
32
+ return () => (window.pdf3DPlain = '');
33
+ }, []);
34
+
35
+ const saveSVGScreenshotToFile = () => {
36
+ let canvas2D3DPlain1 = document.getElementById('div_pdf3DPlain');
37
+
38
+ if (canvas2D3DPlain1 !== null) {
39
+ let canvas2D3DPlain = canvas2D3DPlain1.getElementsByTagName('canvas')[0];
40
+
41
+ if (canvas2D3DPlain !== undefined) {
42
+ window.pdf3DPlain = canvas2D3DPlain.toDataURL();
43
+ }
44
+ } else {
45
+ window.pdf3DPlain = '';
46
+ }
47
+ };
48
+
49
+ const _setIsLoading3D = v => {
50
+ if (!v) {
51
+ saveSVGScreenshotToFile();
52
+ }
53
+ setIsLoading3D(v);
54
+ };
55
+
56
+ return (
57
+ <div
58
+ style={{
59
+ width: '100%',
60
+ minHeight: '100%',
61
+ backgroundColor: '#fff',
62
+ marginBottom: '10px'
63
+ }}
64
+ >
65
+ {hasWall ? (
66
+ <div
67
+ id="div_pdf3DPlain"
68
+ style={{ transform: `scale(0.5, 0.5)`, width: 0, height: 0 }}
69
+ >
70
+ <Viewer3D
71
+ state={newState}
72
+ setIsLoading3D={_setIsLoading3D}
73
+ width={802}
74
+ height={700}
75
+ downloadFlag={true}
76
+ />
77
+ <div style={{ position: 'absolute', left: '690px', top: '38px' }}>
78
+ <img
79
+ id="logo3DPlain"
80
+ style={{
81
+ width: '50px',
82
+ height: '50px'
83
+ }}
84
+ src={'/assets/img/loading/loading.gif'}
85
+ alt="img"
86
+ />
87
+ </div>
88
+ </div>
89
+ ) : (
90
+ <div style={styles.noWall}>
91
+ <h1>No wall</h1>
92
+ </div>
93
+ )}
94
+ <div
95
+ style={{
96
+ padding: hasWall ? '360px 30px 30px 30px' : '30px 30px 30px 30px'
97
+ }}
98
+ >
99
+ <div style={{ alignItems: 'center', padding: '5px 0' }}>
100
+ <div style={styles.headerInfo}>
101
+ <span>
102
+ Created for:
103
+ <span
104
+ style={{
105
+ color: '#565F77',
106
+ fontWeight: '700',
107
+ marginLeft: 5
108
+ }}
109
+ >
110
+ {clientName}
111
+ </span>
112
+ </span>
113
+ <span>
114
+ Date:{' '}
115
+ <span
116
+ style={{
117
+ color: '#565F77',
118
+ fontWeight: '700',
119
+ marginLeft: 5
120
+ }}
121
+ >
122
+ {moment(new Date()).format('DD-MM-YYYY')}
123
+ </span>
124
+ </span>
125
+ <span>
126
+ ID:{' '}
127
+ <span
128
+ style={{ color: '#565F77', fontWeight: '700', marginLeft: 5 }}
129
+ >
130
+ {projectId}
131
+ </span>
132
+ </span>
133
+ </div>
134
+ <div
135
+ style={{ display: 'flex', alignItems: 'center', marginTop: '11px' }}
136
+ >
137
+ <div style={{ flex: 5 }}>
138
+ <div
139
+ style={{
140
+ color: '#000F33',
141
+ fontSize: '17px',
142
+ fontFamily: DEFAULT_FONT_FAMILY,
143
+ fontWeight: '700',
144
+ lineHeight: '45.9px',
145
+ wordWrap: 'break-word',
146
+ margin: '7px 0'
147
+ }}
148
+ >
149
+ {summaryContextValue?.projectTitle ?? ''}
150
+ </div>
151
+ <div
152
+ style={{
153
+ display: 'flex',
154
+ justifyContent: 'space-between',
155
+ alignItems: 'center'
156
+ }}
157
+ >
158
+ <span
159
+ style={{
160
+ textAlign: 'center',
161
+ fontFamily: DEFAULT_FONT_FAMILY,
162
+ fontWeight: '600',
163
+ lineHeight: '15px',
164
+ wordWrap: 'break-word',
165
+ fontSize: '9px',
166
+ color: '#434D63'
167
+ }}
168
+ >
169
+ <b>
170
+ Summary ID: #{projectId}
171
+ {moment(new Date()).format('DD-MM-YYYY')}
172
+ </b>
173
+ </span>
174
+ <div
175
+ style={{ width: 1, height: 14, backgroundColor: '#8791AB' }}
176
+ ></div>
177
+ <span
178
+ style={{
179
+ textAlign: 'center',
180
+ fontFamily: DEFAULT_FONT_FAMILY,
181
+ fontWeight: '600',
182
+ lineHeight: '15px',
183
+ wordWrap: 'break-word',
184
+ fontSize: '9px',
185
+ color: '#434D63'
186
+ }}
187
+ >
188
+ <b>Available: {moment(new Date()).format('DD-MM-YYYY')}</b>
189
+ </span>
190
+ </div>
191
+ </div>
192
+ <div
193
+ style={{ flex: 2, display: 'flex', justifyContent: 'flex-end' }}
194
+ >
195
+ <div style={{ height: 46, width: 46 }}>
196
+ <img src={props.logoImage} width="100%" height="100%" />
197
+ </div>
198
+ </div>
199
+ </div>
200
+ </div>
201
+ <div
202
+ style={{
203
+ margin: '30px 0',
204
+ textAlign: 'justify',
205
+ marginBottom: '40px',
206
+ fontSize: '7px',
207
+ color: '#565F77'
208
+ }}
209
+ >
210
+ <span
211
+ style={{
212
+ // fontSize: '8px',
213
+ fontFamily: DEFAULT_FONT_FAMILY,
214
+ fontWeight: '700',
215
+ lineHeight: '13px',
216
+ wordWrap: 'break-word'
217
+ }}
218
+ >
219
+ Disclaimer:
220
+ </span>{' '}
221
+ <span
222
+ style={{
223
+ // fontSize: '8px',
224
+ fontFamily: DEFAULT_FONT_FAMILY,
225
+ fontWeight: '400',
226
+ lineHeight: '13px',
227
+ wordWrap: 'break-word'
228
+ }}
229
+ >
230
+ DIY Design Space not take responsibility for the accuracy of
231
+ measurements or furniture arrangements. The prices displayed here
232
+ apply to items in stock at the time of the offer's issuance. All
233
+ delivery, assembly, and installation services required are billed
234
+ are billed separately and are not included in the price. While we
235
+ strive to ensure the accuracy of the information in this program, we
236
+ apologize for any errors that may occur.
237
+ </span>
238
+ </div>
239
+ <div style={styles.footer}>
240
+ <span>© DIY.DS v1.0/2024</span>
241
+ <span>DIY Design Space® 2024 All rights reserved</span>
242
+ </div>
243
+ </div>
244
+ </div>
245
+ );
246
+ };
247
+
248
+ const styles = {
249
+ headerInfo: {
250
+ display: 'flex',
251
+ justifyContent: 'space-between',
252
+ alignItems: 'center',
253
+ height: '30px',
254
+ fontFamily: DEFAULT_FONT_FAMILY,
255
+ color: '#565F77',
256
+ borderBottom: '1px solid #EAEDFF',
257
+ fontSize: '7px',
258
+ fontWeight: '400',
259
+ lineHeight: '13px',
260
+ wordWrap: 'break-word'
261
+ },
262
+ footer: {
263
+ padding: '15px 0',
264
+ borderTop: '1px solid #EAEDFF',
265
+ display: 'flex',
266
+ justifyContent: 'space-between',
267
+ fontFamily: 'Inter',
268
+ color: '#565F77',
269
+ fontSize: '7px',
270
+ lineHeight: '11.2px',
271
+ wordWrap: 'break-word'
272
+ },
273
+ noWall: {
274
+ width: '400px',
275
+ height: '350px',
276
+ backgroundColor: 'lightgrey',
277
+ display: 'inline-flex',
278
+ justifyContent: 'center',
279
+ alignItems: 'center'
280
+ }
281
+ };
282
+
283
+ export default Show3DView;