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.
Files changed (179) hide show
  1. package/package.json +8 -26
  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 -3
  7. package/src/components/catalog-view/catalog-breadcrumb.jsx +53 -0
  8. package/src/components/catalog-view/catalog-item.jsx +229 -0
  9. package/src/components/catalog-view/catalog-list.jsx +173 -0
  10. package/src/components/catalog-view/catalog-page-item.jsx +110 -0
  11. package/src/components/catalog-view/catalog-turn-back-page-item.jsx +80 -0
  12. package/src/components/configurator/custom-configurator.jsx +77 -0
  13. package/src/components/configurator/project-configurator.jsx +120 -0
  14. package/src/components/export.js +36 -0
  15. package/src/components/firstsetting/button/styles.js +223 -0
  16. package/src/components/firstsetting/export.js +9 -0
  17. package/src/components/firstsetting/firstsetting-content-button.jsx +198 -0
  18. package/src/components/firstsetting/firstsetting-toggle-button.jsx +101 -0
  19. package/src/components/firstsetting/firstsetting.jsx +814 -0
  20. package/src/components/footerbar/button/ControlButton.jsx +43 -0
  21. package/src/components/footerbar/button/DirectionButton.jsx +54 -0
  22. package/src/components/footerbar/button/DirectionPanSpinButton.jsx +36 -0
  23. package/src/components/footerbar/button/ToggleButton.jsx +58 -0
  24. package/src/components/footerbar/button/ToggleConvertButton.jsx +48 -0
  25. package/src/components/footerbar/button/ToggleMeasureButton.jsx +33 -0
  26. package/src/components/footerbar/button/styles.js +217 -0
  27. package/src/components/footerbar/export.js +9 -0
  28. package/src/components/footerbar/footer-content-button.jsx +198 -0
  29. package/src/components/footerbar/footer-toggle-button.jsx +101 -0
  30. package/src/components/footerbar/footerbar.jsx +1103 -0
  31. package/src/components/footerbar/styles.js +263 -0
  32. package/src/components/header/button/MenuButton.jsx +46 -0
  33. package/src/components/header/button/SaveButton.jsx +54 -0
  34. package/src/components/header/button/styles.js +181 -0
  35. package/src/components/header/export.js +5 -0
  36. package/src/components/header/header.jsx +631 -0
  37. package/src/components/header/header.style.css +47 -0
  38. package/src/components/header/styles.js +320 -0
  39. package/src/components/login/Login.js +77 -0
  40. package/src/components/login/LoginForm/index.js +108 -0
  41. package/src/components/login/Register.js +82 -0
  42. package/src/components/login/RegisterForm/index.js +171 -0
  43. package/src/components/login/jwtService.js +201 -0
  44. package/src/components/login/style.css +158 -0
  45. package/src/components/login/style.scss +260 -0
  46. package/src/components/myprojects/export.js +5 -0
  47. package/src/components/myprojects/index.jsx +445 -0
  48. package/src/components/myprojects/styles.js +241 -0
  49. package/src/components/sidebar/custom-accordion.jsx +48 -0
  50. package/src/components/sidebar/export.js +15 -0
  51. package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +73 -0
  52. package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +101 -0
  53. package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +149 -0
  54. package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +316 -0
  55. package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +108 -0
  56. package/src/components/sidebar/panel-element-editor/element-editor.jsx +1070 -0
  57. package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
  58. package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +104 -0
  59. package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +155 -0
  60. package/src/components/sidebar/panel-group-editor.jsx +272 -0
  61. package/src/components/sidebar/panel-groups.jsx +310 -0
  62. package/src/components/sidebar/panel-guides.jsx +192 -0
  63. package/src/components/sidebar/panel-layer-elements.jsx +298 -0
  64. package/src/components/sidebar/panel-layers.jsx +381 -0
  65. package/src/components/sidebar/panel.jsx +71 -0
  66. package/src/components/sidebar/sidebar.jsx +106 -0
  67. package/src/components/sidebar/toolbar-panel.jsx +139 -0
  68. package/src/components/sign/export.js +7 -0
  69. package/src/components/sign/main/index.jsx +523 -0
  70. package/src/components/sign/main/styles.js +163 -0
  71. package/src/components/toolbar/button/ControlButton.jsx +41 -0
  72. package/src/components/toolbar/button/DirectionButton.jsx +34 -0
  73. package/src/components/toolbar/button/RightButton.jsx +103 -0
  74. package/src/components/toolbar/button/ToggleButton.jsx +41 -0
  75. package/src/components/toolbar/button/index.jsx +55 -0
  76. package/src/components/toolbar/button/styles.js +127 -0
  77. package/src/components/toolbar/components/DoorStyleMenu.jsx +103 -0
  78. package/src/components/toolbar/components/Pricing.jsx +126 -0
  79. package/src/components/toolbar/components/ReviewForQuote.jsx +635 -0
  80. package/src/components/toolbar/export.js +21 -0
  81. package/src/components/toolbar/main/Alert.js +122 -0
  82. package/src/components/toolbar/main/TakePictureModal.jsx +104 -0
  83. package/src/components/toolbar/main/confirm-popup.jsx +99 -0
  84. package/src/components/toolbar/main/index.jsx +5627 -0
  85. package/src/components/toolbar/main/lShaped.json +311 -0
  86. package/src/components/toolbar/main/longNarrow.json +238 -0
  87. package/src/components/toolbar/main/myComponents.js +123 -0
  88. package/src/components/toolbar/main/oRectangle.json +220 -0
  89. package/src/components/toolbar/main/rectangle.json +238 -0
  90. package/src/components/toolbar/main/style.css +107 -0
  91. package/src/components/toolbar/main/styles.js +696 -0
  92. package/src/components/toolbar/plugin-item.jsx +123 -0
  93. package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +73 -0
  94. package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +102 -0
  95. package/src/components/toolbar/popup/appliance/index.jsx +83 -0
  96. package/src/components/toolbar/popup/autosaveprompt/index.jsx +150 -0
  97. package/src/components/toolbar/popup/autosaveprompt/styles.css +64 -0
  98. package/src/components/toolbar/popup/autosaveprompt/styles.js +40 -0
  99. package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +73 -0
  100. package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +119 -0
  101. package/src/components/toolbar/popup/cabinet/index.jsx +85 -0
  102. package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +63 -0
  103. package/src/components/toolbar/popup/doorStyle/index.jsx +71 -0
  104. package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +139 -0
  105. package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +2 -0
  106. package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +157 -0
  107. package/src/components/toolbar/popup/downloadsummary/index.jsx +643 -0
  108. package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +51 -0
  109. package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +175 -0
  110. package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +283 -0
  111. package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +2257 -0
  112. package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +93 -0
  113. package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +132 -0
  114. package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +2198 -0
  115. package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +152 -0
  116. package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +149 -0
  117. package/src/components/toolbar/popup/downloadsummary/styles.css +177 -0
  118. package/src/components/toolbar/popup/downloadsummary/styles.js +453 -0
  119. package/src/components/toolbar/popup/finishingtouch/category/index.jsx +34 -0
  120. package/src/components/toolbar/popup/finishingtouch/index.jsx +58 -0
  121. package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +112 -0
  122. package/src/components/toolbar/popup/finishingtouch/product/index.jsx +116 -0
  123. package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +101 -0
  124. package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +254 -0
  125. package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +311 -0
  126. package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +238 -0
  127. package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +220 -0
  128. package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +238 -0
  129. package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +86 -0
  130. package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +109 -0
  131. package/src/components/toolbar/popup/floorplan/index.jsx +60 -0
  132. package/src/components/toolbar/popup/index.jsx +241 -0
  133. package/src/components/toolbar/popup/newproject/index.jsx +59 -0
  134. package/src/components/toolbar/popup/newproject/styles.css +64 -0
  135. package/src/components/toolbar/popup/newproject/styles.js +41 -0
  136. package/src/components/toolbar/popup/product/appliance.jsx +54 -0
  137. package/src/components/toolbar/popup/product/cabinetproduct.jsx +15 -0
  138. package/src/components/toolbar/popup/product/doorstyle.jsx +58 -0
  139. package/src/components/toolbar/popup/product/doorstyleproduct.jsx +47 -0
  140. package/src/components/toolbar/popup/product/floor.jsx +36 -0
  141. package/src/components/toolbar/popup/product/floorproduct.jsx +42 -0
  142. package/src/components/toolbar/popup/product/index.jsx +36 -0
  143. package/src/components/toolbar/popup/product/primary.jsx +77 -0
  144. package/src/components/toolbar/popup/product/productline.jsx +93 -0
  145. package/src/components/toolbar/popup/product/reviewItem.jsx +427 -0
  146. package/src/components/toolbar/popup/product/reviewMolding.jsx +310 -0
  147. package/src/components/toolbar/popup/product/style.css +54 -0
  148. package/src/components/toolbar/popup/product/styles.js +260 -0
  149. package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +146 -0
  150. package/src/components/toolbar/popup/savedesign/index.jsx +495 -0
  151. package/src/components/toolbar/popup/savedesign/savedesign.style.css +16 -0
  152. package/src/components/toolbar/popup/savedesign/styles.js +151 -0
  153. package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +87 -0
  154. package/src/components/toolbar/popup/styles.js +909 -0
  155. package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +192 -0
  156. package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +96 -0
  157. package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +54 -0
  158. package/src/components/toolbar/popup/submitforquote/StepDots.jsx +25 -0
  159. package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +116 -0
  160. package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +38 -0
  161. package/src/components/toolbar/popup/submitforquote/index.jsx +698 -0
  162. package/src/components/toolbar/popup/submitforquote/styles.css +105 -0
  163. package/src/components/toolbar/popup/submitforquote/styles.js +294 -0
  164. package/src/components/toolbar/popup/submitprompt/index.jsx +89 -0
  165. package/src/components/toolbar/popup/submitprompt/styles.css +64 -0
  166. package/src/components/toolbar/popup/submitprompt/styles.js +42 -0
  167. package/src/components/toolbar/toolbar-button.jsx +90 -0
  168. package/src/components/toolbar/toolbar-load-button.jsx +36 -0
  169. package/src/components/toolbar/toolbar-save-button.jsx +32 -0
  170. package/src/components/wizardstep/button/styles.js +677 -0
  171. package/src/components/wizardstep/export.js +5 -0
  172. package/src/components/wizardstep/index.jsx +1372 -0
  173. package/src/components/wizardstep/styles.js +688 -0
  174. package/src/components/wizardstep/wizardstep-content-button.jsx +198 -0
  175. package/src/components/wizardstep/wizardstep-toggle-button.jsx +101 -0
  176. package/src/{_index.js → index.js} +4 -4
  177. package/src/renderer.jsx +466 -0
  178. package/src/actions/_export.js +0 -35
  179. package/src/components/_export.js +0 -11
@@ -0,0 +1,119 @@
1
+ import React, { useState } from 'react';
2
+
3
+ import { FaSearch, FaPlus, FaAngleLeft } from 'react-icons/fa';
4
+
5
+ import * as S from '../../styles';
6
+ import Appliance from '../../product/appliance';
7
+ import ProductLine from '../../product/productline';
8
+ import { ARRAY_3D_MODES } from '../../../../../constants';
9
+
10
+ export const CabinetChooseProduct = ({
11
+ setStep,
12
+ chooseAction,
13
+ closeAction,
14
+ pData,
15
+ bFlag,
16
+ props,
17
+ doorExpand,
18
+ search,
19
+ dData,
20
+ onSearch,
21
+ mode,
22
+ isExpand
23
+ }) => {
24
+ let temp = [];
25
+
26
+ for (let i = 0; i < pData.length; i++) {
27
+ if (pData[i].name.indexOf(search) != -1) temp.push(pData[i]);
28
+ }
29
+
30
+ pData = temp;
31
+ let cabinetselect = name => {
32
+ select(props.catalog.elements[name]);
33
+ };
34
+ let select = element => {
35
+ props.projectActions.unselectAll();
36
+ switch (element.prototype) {
37
+ case 'lines':
38
+ props.linesActions.selectToolDrawingLine(element.name);
39
+ break;
40
+ case 'items':
41
+ ARRAY_3D_MODES.includes(mode)
42
+ ? props.itemsActions.selectToolDrawingItem3D(element.name)
43
+ : props.itemsActions.selectToolDrawingItem(element.name);
44
+ break;
45
+ case 'holes':
46
+ props.holesActions.selectToolDrawingHole(element.name);
47
+ break;
48
+ }
49
+ props.itemsActions.updatePopupOpen(1);
50
+ props.projectActions.pushLastSelectedCatalogElementToHistory(element);
51
+ closeAction && closeAction();
52
+ };
53
+
54
+ let products = [];
55
+
56
+ if (pData.length > 0) {
57
+ let name = pData[0].type == 'cabinet' ? 'cabinet' : 'dir';
58
+ let blMolding = pData[0].asset.endsWith('.svg') ? 1 : 0;
59
+ if (!bFlag) {
60
+ for (let i = 0; i < pData.length; i++) {
61
+ if (!blMolding)
62
+ products.push(
63
+ <section
64
+ key={i.toString()}
65
+ style={{ width: '100%', position: 'relative' }}
66
+ >
67
+ <ProductLine
68
+ name={name}
69
+ onClick={() => {
70
+ cabinetselect(pData[i].name);
71
+ }}
72
+ url={pData[i].thumbnail}
73
+ title={pData[i].long_name}
74
+ info={pData[i].info}
75
+ hascds={pData[i].hascds}
76
+ ></ProductLine>
77
+ {!pData[i].hascds && (
78
+ <S.UnAvailableText>Unavailable</S.UnAvailableText>
79
+ )}
80
+ </section>
81
+ );
82
+ else
83
+ products.push(
84
+ <Appliance
85
+ key={i.toString()}
86
+ name={'finishing'}
87
+ onClick={() => {
88
+ chooseAction(pData[i]);
89
+ }}
90
+ selected={pData[i].selected ? pData[i].selected : null}
91
+ url={pData[i].thumbnail}
92
+ title={pData[i].name}
93
+ category={pData[i].category}
94
+ />
95
+ );
96
+ }
97
+ }
98
+ }
99
+
100
+ let miHeight = bFlag ? 28 : 0;
101
+ let nonHeight = 495 - miHeight + 'px';
102
+ let height = window.innerHeight * 0.6 - miHeight + 'px';
103
+ return (
104
+ <S.ProductsContentWrapper
105
+ style={{
106
+ width: isExpand === 1 ? 400 : 220,
107
+ height: doorExpand ? height : nonHeight
108
+ }}
109
+ >
110
+ {isExpand === 1 ? (
111
+ <S.ItemWrapper style={{ flexWrap: 'wrap', border: 'none' }}>
112
+ {products}
113
+ </S.ItemWrapper>
114
+ ) : (
115
+ products
116
+ )}
117
+ </S.ProductsContentWrapper>
118
+ );
119
+ };
@@ -0,0 +1,85 @@
1
+ import React, { useState } from 'react';
2
+
3
+ import { DoubleToolbarButtonWithPopup } from '../';
4
+
5
+ import { CabinetChooseProduct } from './choose-product/';
6
+ import { CabinetCategory } from './cabinet-category';
7
+
8
+ import { STEP_CABINET_CHOOSE_PRODUCT } from '../../../../constants';
9
+
10
+ const CabinetToolbarButton = ({
11
+ trigger,
12
+ action,
13
+ chooseAction,
14
+ dataSource,
15
+ subData,
16
+ bFlag,
17
+ props,
18
+ dData,
19
+ isExpand,
20
+ expandAction,
21
+ closeAction,
22
+ cabinetCollapse,
23
+ doorCollapse,
24
+ doorExpand,
25
+ collapseAction,
26
+ searchCabinet,
27
+ search,
28
+ mode,
29
+ isOpen
30
+ }) => {
31
+ const [step, setStep] = useState(STEP_CABINET_CHOOSE_PRODUCT);
32
+ let content = <div />;
33
+ let content1 = <div />;
34
+ content1 = (
35
+ <CabinetChooseProduct
36
+ action={action}
37
+ closeAction={closeAction}
38
+ chooseAction={chooseAction}
39
+ pData={subData}
40
+ dData={dData}
41
+ bFlag={0}
42
+ doorExpand={doorExpand}
43
+ props={props}
44
+ setStep={setStep}
45
+ search={searchCabinet}
46
+ onSearch={search}
47
+ mode={mode}
48
+ isExpand={isExpand}
49
+ ></CabinetChooseProduct>
50
+ );
51
+ content = (
52
+ <CabinetCategory
53
+ action={action}
54
+ pData={dataSource}
55
+ bFlag={bFlag}
56
+ doorExpand={doorExpand}
57
+ props={props}
58
+ setStep={setStep}
59
+ search={searchCabinet}
60
+ onSearch={search}
61
+ mode={mode}
62
+ ></CabinetCategory>
63
+ );
64
+ return (
65
+ <DoubleToolbarButtonWithPopup
66
+ closeAction={closeAction}
67
+ isOpen={isOpen}
68
+ mode={mode}
69
+ isExpand={isExpand}
70
+ expandAction={expandAction}
71
+ style={{ minWidth: step >= 1 && isExpand == 1 ? '800px' : '600px' }}
72
+ order={2}
73
+ isDouble={subData.length}
74
+ collapse1={cabinetCollapse}
75
+ collapse2={doorCollapse}
76
+ collapseAction={collapseAction}
77
+ trigger={trigger}
78
+ children1={content1}
79
+ >
80
+ {content}
81
+ </DoubleToolbarButtonWithPopup>
82
+ );
83
+ };
84
+
85
+ export default CabinetToolbarButton;
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+
3
+ import * as S from '../../styles';
4
+ import DoorStyleProduct from '../../product/doorstyleproduct';
5
+
6
+ export const StyleChooseProduct = ({
7
+ dataSource,
8
+ isExpand,
9
+ currentTexture,
10
+ chooseAction,
11
+ selected
12
+ }) => {
13
+ let miHeight = 0;
14
+ let nonHeight = 495 - miHeight + 'px';
15
+ // let height = (window.innerHeight * 0.6 - miHeight) + "px";
16
+
17
+ let products = [];
18
+ dataSource.forEach(el => {
19
+ products.push(
20
+ <DoorStyleProduct
21
+ key={el.name}
22
+ doorId={el.id}
23
+ isExpand={isExpand}
24
+ url={el.thumbnail}
25
+ name={el.name}
26
+ selected={selected}
27
+ currentTexture={currentTexture}
28
+ onClick={() => {
29
+ chooseAction(el);
30
+ }}
31
+ />
32
+ );
33
+ });
34
+
35
+ return (
36
+ <S.ProductsContentWrapper
37
+ style={{
38
+ padding: 18,
39
+ width: isExpand === 1 ? 800 : 300,
40
+ height: nonHeight
41
+ }}
42
+ >
43
+ <S.ItemWrapper
44
+ style={{
45
+ flexWrap: 'wrap',
46
+ border: 'none',
47
+ justifyContent: 'space-between'
48
+ }}
49
+ >
50
+ {products.map((product, key) => {
51
+ return (
52
+ <section
53
+ key={key}
54
+ style={{ width: isExpand === 1 ? '30%' : '45%' }}
55
+ >
56
+ {product}
57
+ </section>
58
+ );
59
+ })}
60
+ </S.ItemWrapper>
61
+ </S.ProductsContentWrapper>
62
+ );
63
+ };
@@ -0,0 +1,71 @@
1
+ import React from 'react';
2
+
3
+ import { StyleCategory } from './style-category';
4
+ import { StyleChooseProduct } from './choose-style';
5
+
6
+ import { DoubleToolbarButtonWithPopup } from '../';
7
+
8
+ const CabinetDoorStyleToolbarButton = ({
9
+ action,
10
+ chooseAction,
11
+ dataSource,
12
+ stepSource,
13
+ subData,
14
+ isOpen,
15
+ currentTexture,
16
+ recentStyle,
17
+ selectFromRecent,
18
+ step,
19
+ trigger,
20
+ categoryCollapse,
21
+ productCollapse,
22
+ collapseAction,
23
+ isExpand,
24
+ expandAction,
25
+ mode,
26
+ closeAction,
27
+ selected
28
+ }) => {
29
+ let content = (
30
+ <StyleCategory
31
+ recentStyle={recentStyle}
32
+ selectFromRecent={selectFromRecent}
33
+ step={step}
34
+ action={action}
35
+ stepSource={stepSource}
36
+ dataSource={dataSource}
37
+ isExpand={!productCollapse}
38
+ currentTexture={currentTexture}
39
+ ></StyleCategory>
40
+ );
41
+ let content1 = (
42
+ <StyleChooseProduct
43
+ chooseAction={chooseAction}
44
+ dataSource={subData}
45
+ isExpand={isExpand}
46
+ selected={selected}
47
+ currentTexture={currentTexture}
48
+ ></StyleChooseProduct>
49
+ );
50
+ return (
51
+ <DoubleToolbarButtonWithPopup
52
+ isOpen={isOpen}
53
+ closeAction={closeAction}
54
+ mode={mode}
55
+ isExpand={isExpand}
56
+ expandAction={expandAction}
57
+ style={{ minWidth: step >= 1 && isExpand == 1 ? '800px' : '600px' }}
58
+ order={1}
59
+ isDouble={subData.length}
60
+ collapse1={categoryCollapse}
61
+ collapse2={productCollapse}
62
+ collapseAction={collapseAction}
63
+ trigger={trigger}
64
+ children1={content1}
65
+ >
66
+ {content}
67
+ </DoubleToolbarButtonWithPopup>
68
+ );
69
+ };
70
+
71
+ export default CabinetDoorStyleToolbarButton;
@@ -0,0 +1,139 @@
1
+ import React, { useState } from 'react';
2
+ import ToolbarPanel from '../../../../sidebar/toolbar-panel';
3
+ import * as S from '../../styles';
4
+
5
+ import DoorStyle from '../../product/doorstyle';
6
+ import PrimaryDoorStyle from '../../product/primary';
7
+ export const StyleCategory = ({
8
+ step,
9
+ action,
10
+ dataSource,
11
+ stepSource,
12
+ isExpand,
13
+ currentTexture,
14
+ recentStyle,
15
+ selectFromRecent
16
+ }) => {
17
+ const [selOption, setSelOption] = useState(-1);
18
+ const [selSubOption, setSelSbuOption] = useState(-1);
19
+
20
+ let miHeight = 0;
21
+ let nonHeight = 495 - miHeight + 'px';
22
+ let height = window.innerHeight * 0.6 - miHeight + 'px';
23
+ var result = <div></div>;
24
+
25
+ if (step === 0) {
26
+ // const recentDiv = [];
27
+ // recentStyle.map((el, key) => {
28
+ // recentDiv.push(
29
+ // <DoorStyle
30
+ // key={key}
31
+ // url={el.textureData.thumbnail}
32
+ // name={el.textureData.name}
33
+ // onClick={() => {selectFromRecent(key)}}
34
+ // >
35
+ // </DoorStyle>
36
+ // );
37
+ // })
38
+ // // const categoryDiv = [];
39
+ // stepSource.forEach((el, key) => {
40
+ // categoryDiv.push(
41
+ // <ToolbarPanel
42
+ // onClose={() => {action(key)}}
43
+ // onOpen={() => {action(key)}}
44
+ // isUrl={true}
45
+ // key={key.toString()}
46
+ // name={el.name}
47
+ // url={el.thumbnail}>
48
+ // </ToolbarPanel>
49
+ // );
50
+ // })
51
+ result = (
52
+ // <ToolbarPanel
53
+ // opened
54
+ // onClose={() => {}}
55
+ // onOpen={() => {}}
56
+ // isUrl={false}
57
+ // name={"Primary Door Style"}
58
+ // url={null}>
59
+ <PrimaryDoorStyle
60
+ url={currentTexture !== null ? currentTexture.thumbnail : null}
61
+ title={currentTexture !== null ? currentTexture.name : null}
62
+ onClick={() => {
63
+ action(-1);
64
+ }}
65
+ />
66
+ // </ToolbarPanel>
67
+ );
68
+ {
69
+ /* {step === 1
70
+ ? (
71
+ <div>
72
+ {categoryDiv}
73
+ </div>
74
+ )
75
+ : ( <div></div>)} */
76
+ }
77
+ {
78
+ /* <ToolbarPanel
79
+ opened
80
+ onClose={() => {}}
81
+ onOpen={() => {}}
82
+ isUrl={false}
83
+ name={"Recently Used"}
84
+ url={null}>
85
+ <div style={{ width: 200, padding: 5, display:'flex', width: '100%',overflowX: "auto"} } >
86
+ {recentDiv}
87
+ </div>
88
+ </ToolbarPanel> */
89
+ }
90
+ } else {
91
+ result = [];
92
+ stepSource.forEach((el, key) => {
93
+ const toolbarChildren = [];
94
+ el.items.forEach((element, idx) => {
95
+ toolbarChildren.push(
96
+ <DoorStyle
97
+ key={idx}
98
+ idx={idx}
99
+ subOptionIdx={key}
100
+ selSubOption={selSubOption}
101
+ url={element.thumbnail}
102
+ name={element.name}
103
+ selOption={selOption}
104
+ onClick={() => {
105
+ action(el.name + '/' + element.name);
106
+ setSelOption(idx);
107
+ setSelSbuOption(key);
108
+ }}
109
+ ></DoorStyle>
110
+ );
111
+ });
112
+ result.push(
113
+ <S.ItemWrapper key={key.toString()}>
114
+ <ToolbarPanel
115
+ // onClose={() => {action(el.name)}}
116
+ // onOpen={() => {action(el.name)}}
117
+ onClose={() => {}}
118
+ onOpen={() => {}}
119
+ isUrl={true}
120
+ key={key.toString()}
121
+ idx={key}
122
+ selSubOption={selSubOption}
123
+ name={el.name}
124
+ url={el.thumbnail}
125
+ >
126
+ {toolbarChildren}
127
+ </ToolbarPanel>
128
+ </S.ItemWrapper>
129
+ );
130
+ });
131
+ }
132
+ return (
133
+ <S.CategoryContentWrapper
134
+ style={{ height: isExpand ? height : nonHeight, maxWidth: 185 }}
135
+ >
136
+ {result}
137
+ </S.CategoryContentWrapper>
138
+ );
139
+ };
@@ -0,0 +1,2 @@
1
+ import { createContext } from 'react';
2
+ export const DownloadSummaryContext = createContext(null);
@@ -0,0 +1,157 @@
1
+ import React, { useContext } from 'react';
2
+ import moment from 'moment';
3
+ import { DownloadSummaryContext } from './downloadSummaryContext';
4
+
5
+ const DownloadSummaryTemp = config => {
6
+ const summaryContextValue = useContext(DownloadSummaryContext);
7
+
8
+ const clientName = (
9
+ (summaryContextValue?.firstName ?? '') +
10
+ ' ' +
11
+ (summaryContextValue?.lastName ?? '')
12
+ ).trim();
13
+
14
+ const projectId = summaryContextValue?.projectId
15
+ ? `#${summaryContextValue?.projectId}`
16
+ : '';
17
+
18
+ return (
19
+ <div style={styles.container}>
20
+ <div style={styles.header}>
21
+ <div style={styles.header_log}>
22
+ <div
23
+ style={{
24
+ height: '40px',
25
+ width: '40px',
26
+ backgroundColor: 'blueviolet'
27
+ }}
28
+ >
29
+ <img src={config?.config} width="100%" height="100%" />
30
+ </div>
31
+ <span style={{ padding: '0 10px' }}>
32
+ {summaryContextValue?.projectTitle ?? ''}
33
+ </span>
34
+ </div>
35
+ <span>
36
+ Created for:
37
+ <span
38
+ style={{
39
+ color: '#434D63',
40
+ fontWeight: '700',
41
+ marginLeft: 5
42
+ }}
43
+ >
44
+ {clientName}
45
+ </span>
46
+ </span>
47
+ <span>
48
+ Date:{' '}
49
+ <span style={{ color: '#434D63', fontWeight: '700', marginLeft: 5 }}>
50
+ {moment(new Date()).format('DD-MM-YYYY')}
51
+ </span>
52
+ </span>
53
+ <span>
54
+ ID:{' '}
55
+ <span
56
+ style={{
57
+ color: '#434D63',
58
+ fontWeight: '700',
59
+ marginLeft: 5
60
+ }}
61
+ >
62
+ {projectId}
63
+ </span>
64
+ </span>
65
+ </div>
66
+ {config.children}
67
+ <div
68
+ style={{
69
+ textAlign: 'justify',
70
+ margin: '0 0 40px 0',
71
+ fontSize: '7px',
72
+ color: '#565F77'
73
+ }}
74
+ >
75
+ <span
76
+ style={{
77
+ // fontSize: '8px',
78
+ fontFamily: 'Open Sans',
79
+ fontWeight: '700',
80
+ lineHeight: '13px',
81
+ wordWrap: 'break-word'
82
+ }}
83
+ >
84
+ Disclaimer:
85
+ </span>{' '}
86
+ <span
87
+ style={{
88
+ // fontSize: '8px',
89
+ fontFamily: 'Open Sans',
90
+ fontWeight: '400',
91
+ lineHeight: '13px',
92
+ wordWrap: 'break-word'
93
+ }}
94
+ >
95
+ DIY Design Space not take responsibility for the accuracy of
96
+ measurements or furniture arrangements. The prices displayed here
97
+ apply to items in stock at the time of the offer's issuance. All
98
+ delivery, assembly, and installation services required are billed are
99
+ billed separately and are not included in the price. While we strive
100
+ to ensure the accuracy of the information in this program, we
101
+ apologize for any errors that may occur.
102
+ </span>
103
+ </div>
104
+ <div style={styles.footer}>
105
+ <span>© DIY.DS v1.0/2024</span>
106
+ <span>DIY Design Space® 2024 All rights reserved</span>
107
+ </div>
108
+ </div>
109
+ );
110
+ };
111
+
112
+ const styles = {
113
+ container: {
114
+ // width: '454px',
115
+ // height: '784px',
116
+ // minHeight:'100%',
117
+ backgroundColor: '#fff',
118
+ padding: '30px 30px',
119
+ marginBottom: '10px',
120
+ borderRadius: '5px',
121
+ fontFamily: 'Open Sans'
122
+ },
123
+ header: {
124
+ width: '100%',
125
+ display: 'flex',
126
+ flexDirection: 'row',
127
+ justifyContent: 'space-between',
128
+ alignItems: 'center',
129
+ padding: '5px 0',
130
+ borderBottom: '1px solid #EAEDFF',
131
+ color: '#565F77',
132
+ fontSize: '7px',
133
+ fontWeight: '400',
134
+ lineHeight: '13px',
135
+ wordWrap: 'break-word',
136
+ fontFamily: 'Open Sans'
137
+ },
138
+ header_log: {
139
+ display: 'flex',
140
+ flexDirection: 'row',
141
+ alignItems: 'center',
142
+ justifyContent: 'space-between'
143
+ },
144
+ footer: {
145
+ padding: '15px 0',
146
+ borderTop: '1px solid #EAEDFF',
147
+ display: 'flex',
148
+ justifyContent: 'space-between',
149
+ fontFamily: 'Inter',
150
+ color: '#565F77',
151
+ fontSize: '7px',
152
+ lineHeight: '11.2px',
153
+ wordWrap: 'break-word'
154
+ }
155
+ };
156
+
157
+ export default DownloadSummaryTemp;