kitchen-simulator 5.0.0-test.18 → 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.
- package/package.json +8 -26
- package/src/@history.js +3 -0
- package/src/CrossSignOn.jsx +94 -0
- package/src/KitchenConfigurator.jsx +1526 -0
- package/src/KitchenConfiguratorApp.jsx +1 -1
- package/src/_KitchenConfigurator.jsx +3 -3
- package/src/components/catalog-view/catalog-breadcrumb.jsx +53 -0
- package/src/components/catalog-view/catalog-item.jsx +229 -0
- package/src/components/catalog-view/catalog-list.jsx +173 -0
- package/src/components/catalog-view/catalog-page-item.jsx +110 -0
- package/src/components/catalog-view/catalog-turn-back-page-item.jsx +80 -0
- package/src/components/configurator/custom-configurator.jsx +77 -0
- package/src/components/configurator/project-configurator.jsx +120 -0
- package/src/components/export.js +36 -0
- package/src/components/firstsetting/button/styles.js +223 -0
- package/src/components/firstsetting/export.js +9 -0
- package/src/components/firstsetting/firstsetting-content-button.jsx +198 -0
- package/src/components/firstsetting/firstsetting-toggle-button.jsx +101 -0
- package/src/components/firstsetting/firstsetting.jsx +814 -0
- package/src/components/footerbar/button/ControlButton.jsx +43 -0
- package/src/components/footerbar/button/DirectionButton.jsx +54 -0
- package/src/components/footerbar/button/DirectionPanSpinButton.jsx +36 -0
- package/src/components/footerbar/button/ToggleButton.jsx +58 -0
- package/src/components/footerbar/button/ToggleConvertButton.jsx +48 -0
- package/src/components/footerbar/button/ToggleMeasureButton.jsx +33 -0
- package/src/components/footerbar/button/styles.js +217 -0
- package/src/components/footerbar/export.js +9 -0
- package/src/components/footerbar/footer-content-button.jsx +198 -0
- package/src/components/footerbar/footer-toggle-button.jsx +101 -0
- package/src/components/footerbar/footerbar.jsx +1103 -0
- package/src/components/footerbar/styles.js +263 -0
- package/src/components/header/button/MenuButton.jsx +46 -0
- package/src/components/header/button/SaveButton.jsx +54 -0
- package/src/components/header/button/styles.js +181 -0
- package/src/components/header/export.js +5 -0
- package/src/components/header/header.jsx +631 -0
- package/src/components/header/header.style.css +47 -0
- package/src/components/header/styles.js +320 -0
- package/src/components/login/Login.js +77 -0
- package/src/components/login/LoginForm/index.js +108 -0
- package/src/components/login/Register.js +82 -0
- package/src/components/login/RegisterForm/index.js +171 -0
- package/src/components/login/jwtService.js +201 -0
- package/src/components/login/style.css +158 -0
- package/src/components/login/style.scss +260 -0
- package/src/components/myprojects/export.js +5 -0
- package/src/components/myprojects/index.jsx +445 -0
- package/src/components/myprojects/styles.js +241 -0
- package/src/components/sidebar/custom-accordion.jsx +48 -0
- package/src/components/sidebar/export.js +15 -0
- package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +73 -0
- package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +101 -0
- package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +149 -0
- package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +316 -0
- package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +108 -0
- package/src/components/sidebar/panel-element-editor/element-editor.jsx +1070 -0
- package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
- package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +104 -0
- package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +155 -0
- package/src/components/sidebar/panel-group-editor.jsx +272 -0
- package/src/components/sidebar/panel-groups.jsx +310 -0
- package/src/components/sidebar/panel-guides.jsx +192 -0
- package/src/components/sidebar/panel-layer-elements.jsx +298 -0
- package/src/components/sidebar/panel-layers.jsx +381 -0
- package/src/components/sidebar/panel.jsx +71 -0
- package/src/components/sidebar/sidebar.jsx +106 -0
- package/src/components/sidebar/toolbar-panel.jsx +139 -0
- package/src/components/sign/export.js +7 -0
- package/src/components/sign/main/index.jsx +523 -0
- package/src/components/sign/main/styles.js +163 -0
- package/src/components/toolbar/button/ControlButton.jsx +41 -0
- package/src/components/toolbar/button/DirectionButton.jsx +34 -0
- package/src/components/toolbar/button/RightButton.jsx +103 -0
- package/src/components/toolbar/button/ToggleButton.jsx +41 -0
- package/src/components/toolbar/button/index.jsx +55 -0
- package/src/components/toolbar/button/styles.js +127 -0
- package/src/components/toolbar/components/DoorStyleMenu.jsx +103 -0
- package/src/components/toolbar/components/Pricing.jsx +126 -0
- package/src/components/toolbar/components/ReviewForQuote.jsx +635 -0
- package/src/components/toolbar/export.js +21 -0
- package/src/components/toolbar/main/Alert.js +122 -0
- package/src/components/toolbar/main/TakePictureModal.jsx +104 -0
- package/src/components/toolbar/main/confirm-popup.jsx +99 -0
- package/src/components/toolbar/main/index.jsx +5627 -0
- package/src/components/toolbar/main/lShaped.json +311 -0
- package/src/components/toolbar/main/longNarrow.json +238 -0
- package/src/components/toolbar/main/myComponents.js +123 -0
- package/src/components/toolbar/main/oRectangle.json +220 -0
- package/src/components/toolbar/main/rectangle.json +238 -0
- package/src/components/toolbar/main/style.css +107 -0
- package/src/components/toolbar/main/styles.js +696 -0
- package/src/components/toolbar/plugin-item.jsx +123 -0
- package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +73 -0
- package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +102 -0
- package/src/components/toolbar/popup/appliance/index.jsx +83 -0
- package/src/components/toolbar/popup/autosaveprompt/index.jsx +150 -0
- package/src/components/toolbar/popup/autosaveprompt/styles.css +64 -0
- package/src/components/toolbar/popup/autosaveprompt/styles.js +40 -0
- package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +73 -0
- package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +119 -0
- package/src/components/toolbar/popup/cabinet/index.jsx +85 -0
- package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +63 -0
- package/src/components/toolbar/popup/doorStyle/index.jsx +71 -0
- package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +139 -0
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +2 -0
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +157 -0
- package/src/components/toolbar/popup/downloadsummary/index.jsx +643 -0
- package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +51 -0
- package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +175 -0
- package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +283 -0
- package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +2257 -0
- package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +93 -0
- package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +132 -0
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +2198 -0
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +152 -0
- package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +149 -0
- package/src/components/toolbar/popup/downloadsummary/styles.css +177 -0
- package/src/components/toolbar/popup/downloadsummary/styles.js +453 -0
- package/src/components/toolbar/popup/finishingtouch/category/index.jsx +34 -0
- package/src/components/toolbar/popup/finishingtouch/index.jsx +58 -0
- package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +112 -0
- package/src/components/toolbar/popup/finishingtouch/product/index.jsx +116 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +101 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +254 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +311 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +238 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +220 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +238 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +86 -0
- package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +109 -0
- package/src/components/toolbar/popup/floorplan/index.jsx +60 -0
- package/src/components/toolbar/popup/index.jsx +241 -0
- package/src/components/toolbar/popup/newproject/index.jsx +59 -0
- package/src/components/toolbar/popup/newproject/styles.css +64 -0
- package/src/components/toolbar/popup/newproject/styles.js +41 -0
- package/src/components/toolbar/popup/product/appliance.jsx +54 -0
- package/src/components/toolbar/popup/product/cabinetproduct.jsx +15 -0
- package/src/components/toolbar/popup/product/doorstyle.jsx +58 -0
- package/src/components/toolbar/popup/product/doorstyleproduct.jsx +47 -0
- package/src/components/toolbar/popup/product/floor.jsx +36 -0
- package/src/components/toolbar/popup/product/floorproduct.jsx +42 -0
- package/src/components/toolbar/popup/product/index.jsx +36 -0
- package/src/components/toolbar/popup/product/primary.jsx +77 -0
- package/src/components/toolbar/popup/product/productline.jsx +93 -0
- package/src/components/toolbar/popup/product/reviewItem.jsx +427 -0
- package/src/components/toolbar/popup/product/reviewMolding.jsx +310 -0
- package/src/components/toolbar/popup/product/style.css +54 -0
- package/src/components/toolbar/popup/product/styles.js +260 -0
- package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +146 -0
- package/src/components/toolbar/popup/savedesign/index.jsx +495 -0
- package/src/components/toolbar/popup/savedesign/savedesign.style.css +16 -0
- package/src/components/toolbar/popup/savedesign/styles.js +151 -0
- package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +87 -0
- package/src/components/toolbar/popup/styles.js +909 -0
- package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +192 -0
- package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +96 -0
- package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +54 -0
- package/src/components/toolbar/popup/submitforquote/StepDots.jsx +25 -0
- package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +116 -0
- package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +38 -0
- package/src/components/toolbar/popup/submitforquote/index.jsx +698 -0
- package/src/components/toolbar/popup/submitforquote/styles.css +105 -0
- package/src/components/toolbar/popup/submitforquote/styles.js +294 -0
- package/src/components/toolbar/popup/submitprompt/index.jsx +89 -0
- package/src/components/toolbar/popup/submitprompt/styles.css +64 -0
- package/src/components/toolbar/popup/submitprompt/styles.js +42 -0
- package/src/components/toolbar/toolbar-button.jsx +90 -0
- package/src/components/toolbar/toolbar-load-button.jsx +36 -0
- package/src/components/toolbar/toolbar-save-button.jsx +32 -0
- package/src/components/wizardstep/button/styles.js +677 -0
- package/src/components/wizardstep/export.js +5 -0
- package/src/components/wizardstep/index.jsx +1372 -0
- package/src/components/wizardstep/styles.js +688 -0
- package/src/components/wizardstep/wizardstep-content-button.jsx +198 -0
- package/src/components/wizardstep/wizardstep-toggle-button.jsx +101 -0
- package/src/{_index.js → index.js} +4 -4
- package/src/renderer.jsx +466 -0
- package/src/actions/_export.js +0 -35
- 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;
|