kitchen-simulator 5.0.0-test.7 → 5.0.0-test.8

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 (171) hide show
  1. package/package.json +13 -3
  2. package/src/components/_export.js +11 -0
  3. package/src/components/catalog-view/catalog-breadcrumb.jsx +0 -53
  4. package/src/components/catalog-view/catalog-item.jsx +0 -229
  5. package/src/components/catalog-view/catalog-list.jsx +0 -173
  6. package/src/components/catalog-view/catalog-page-item.jsx +0 -110
  7. package/src/components/catalog-view/catalog-turn-back-page-item.jsx +0 -80
  8. package/src/components/configurator/custom-configurator.jsx +0 -77
  9. package/src/components/configurator/project-configurator.jsx +0 -120
  10. package/src/components/export.js +0 -36
  11. package/src/components/firstsetting/button/styles.js +0 -223
  12. package/src/components/firstsetting/export.js +0 -9
  13. package/src/components/firstsetting/firstsetting-content-button.jsx +0 -198
  14. package/src/components/firstsetting/firstsetting-toggle-button.jsx +0 -101
  15. package/src/components/firstsetting/firstsetting.jsx +0 -814
  16. package/src/components/footerbar/button/ControlButton.jsx +0 -43
  17. package/src/components/footerbar/button/DirectionButton.jsx +0 -54
  18. package/src/components/footerbar/button/DirectionPanSpinButton.jsx +0 -36
  19. package/src/components/footerbar/button/ToggleButton.jsx +0 -58
  20. package/src/components/footerbar/button/ToggleConvertButton.jsx +0 -48
  21. package/src/components/footerbar/button/ToggleMeasureButton.jsx +0 -33
  22. package/src/components/footerbar/button/styles.js +0 -217
  23. package/src/components/footerbar/export.js +0 -9
  24. package/src/components/footerbar/footer-content-button.jsx +0 -198
  25. package/src/components/footerbar/footer-toggle-button.jsx +0 -101
  26. package/src/components/footerbar/footerbar.jsx +0 -1103
  27. package/src/components/footerbar/styles.js +0 -263
  28. package/src/components/header/button/MenuButton.jsx +0 -46
  29. package/src/components/header/button/SaveButton.jsx +0 -54
  30. package/src/components/header/button/styles.js +0 -181
  31. package/src/components/header/export.js +0 -5
  32. package/src/components/header/header.jsx +0 -631
  33. package/src/components/header/header.style.css +0 -47
  34. package/src/components/header/styles.js +0 -320
  35. package/src/components/login/Login.js +0 -77
  36. package/src/components/login/LoginForm/index.js +0 -108
  37. package/src/components/login/Register.js +0 -83
  38. package/src/components/login/RegisterForm/index.js +0 -171
  39. package/src/components/login/jwtService.js +0 -201
  40. package/src/components/login/style.css +0 -158
  41. package/src/components/login/style.scss +0 -260
  42. package/src/components/myprojects/export.js +0 -5
  43. package/src/components/myprojects/index.jsx +0 -445
  44. package/src/components/myprojects/styles.js +0 -241
  45. package/src/components/sidebar/custom-accordion.jsx +0 -48
  46. package/src/components/sidebar/export.js +0 -15
  47. package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +0 -73
  48. package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +0 -101
  49. package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +0 -149
  50. package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +0 -316
  51. package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +0 -108
  52. package/src/components/sidebar/panel-element-editor/element-editor.jsx +0 -1070
  53. package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
  54. package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +0 -104
  55. package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +0 -155
  56. package/src/components/sidebar/panel-group-editor.jsx +0 -272
  57. package/src/components/sidebar/panel-groups.jsx +0 -310
  58. package/src/components/sidebar/panel-guides.jsx +0 -192
  59. package/src/components/sidebar/panel-layer-elements.jsx +0 -298
  60. package/src/components/sidebar/panel-layers.jsx +0 -381
  61. package/src/components/sidebar/panel.jsx +0 -71
  62. package/src/components/sidebar/sidebar.jsx +0 -106
  63. package/src/components/sidebar/toolbar-panel.jsx +0 -139
  64. package/src/components/sign/export.js +0 -7
  65. package/src/components/sign/main/index.jsx +0 -523
  66. package/src/components/sign/main/styles.js +0 -163
  67. package/src/components/toolbar/button/ControlButton.jsx +0 -41
  68. package/src/components/toolbar/button/DirectionButton.jsx +0 -34
  69. package/src/components/toolbar/button/RightButton.jsx +0 -103
  70. package/src/components/toolbar/button/ToggleButton.jsx +0 -41
  71. package/src/components/toolbar/button/index.jsx +0 -55
  72. package/src/components/toolbar/button/styles.js +0 -127
  73. package/src/components/toolbar/components/DoorStyleMenu.jsx +0 -103
  74. package/src/components/toolbar/components/Pricing.jsx +0 -126
  75. package/src/components/toolbar/components/ReviewForQuote.jsx +0 -635
  76. package/src/components/toolbar/export.js +0 -21
  77. package/src/components/toolbar/main/Alert.js +0 -122
  78. package/src/components/toolbar/main/TakePictureModal.jsx +0 -104
  79. package/src/components/toolbar/main/confirm-popup.jsx +0 -99
  80. package/src/components/toolbar/main/index.jsx +0 -5627
  81. package/src/components/toolbar/main/lShaped.json +0 -311
  82. package/src/components/toolbar/main/longNarrow.json +0 -238
  83. package/src/components/toolbar/main/myComponents.js +0 -123
  84. package/src/components/toolbar/main/oRectangle.json +0 -220
  85. package/src/components/toolbar/main/rectangle.json +0 -238
  86. package/src/components/toolbar/main/style.css +0 -107
  87. package/src/components/toolbar/main/styles.js +0 -696
  88. package/src/components/toolbar/plugin-item.jsx +0 -123
  89. package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +0 -73
  90. package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +0 -102
  91. package/src/components/toolbar/popup/appliance/index.jsx +0 -83
  92. package/src/components/toolbar/popup/autosaveprompt/index.jsx +0 -150
  93. package/src/components/toolbar/popup/autosaveprompt/styles.css +0 -64
  94. package/src/components/toolbar/popup/autosaveprompt/styles.js +0 -40
  95. package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +0 -73
  96. package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +0 -119
  97. package/src/components/toolbar/popup/cabinet/index.jsx +0 -85
  98. package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +0 -63
  99. package/src/components/toolbar/popup/doorStyle/index.jsx +0 -71
  100. package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +0 -139
  101. package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -2
  102. package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +0 -157
  103. package/src/components/toolbar/popup/downloadsummary/index.jsx +0 -643
  104. package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +0 -51
  105. package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +0 -175
  106. package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +0 -283
  107. package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +0 -2257
  108. package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -93
  109. package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +0 -132
  110. package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +0 -2198
  111. package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +0 -152
  112. package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +0 -149
  113. package/src/components/toolbar/popup/downloadsummary/styles.css +0 -177
  114. package/src/components/toolbar/popup/downloadsummary/styles.js +0 -453
  115. package/src/components/toolbar/popup/finishingtouch/category/index.jsx +0 -34
  116. package/src/components/toolbar/popup/finishingtouch/index.jsx +0 -58
  117. package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +0 -112
  118. package/src/components/toolbar/popup/finishingtouch/product/index.jsx +0 -116
  119. package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +0 -101
  120. package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +0 -254
  121. package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +0 -311
  122. package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +0 -238
  123. package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +0 -220
  124. package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +0 -238
  125. package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -86
  126. package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +0 -109
  127. package/src/components/toolbar/popup/floorplan/index.jsx +0 -60
  128. package/src/components/toolbar/popup/index.jsx +0 -241
  129. package/src/components/toolbar/popup/newproject/index.jsx +0 -59
  130. package/src/components/toolbar/popup/newproject/styles.css +0 -64
  131. package/src/components/toolbar/popup/newproject/styles.js +0 -41
  132. package/src/components/toolbar/popup/product/appliance.jsx +0 -54
  133. package/src/components/toolbar/popup/product/cabinetproduct.jsx +0 -15
  134. package/src/components/toolbar/popup/product/doorstyle.jsx +0 -58
  135. package/src/components/toolbar/popup/product/doorstyleproduct.jsx +0 -47
  136. package/src/components/toolbar/popup/product/floor.jsx +0 -36
  137. package/src/components/toolbar/popup/product/floorproduct.jsx +0 -42
  138. package/src/components/toolbar/popup/product/index.jsx +0 -36
  139. package/src/components/toolbar/popup/product/primary.jsx +0 -77
  140. package/src/components/toolbar/popup/product/productline.jsx +0 -93
  141. package/src/components/toolbar/popup/product/reviewItem.jsx +0 -427
  142. package/src/components/toolbar/popup/product/reviewMolding.jsx +0 -310
  143. package/src/components/toolbar/popup/product/style.css +0 -54
  144. package/src/components/toolbar/popup/product/styles.js +0 -260
  145. package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +0 -146
  146. package/src/components/toolbar/popup/savedesign/index.jsx +0 -495
  147. package/src/components/toolbar/popup/savedesign/savedesign.style.css +0 -16
  148. package/src/components/toolbar/popup/savedesign/styles.js +0 -151
  149. package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +0 -87
  150. package/src/components/toolbar/popup/styles.js +0 -909
  151. package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +0 -192
  152. package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +0 -96
  153. package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +0 -54
  154. package/src/components/toolbar/popup/submitforquote/StepDots.jsx +0 -25
  155. package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +0 -116
  156. package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -38
  157. package/src/components/toolbar/popup/submitforquote/index.jsx +0 -698
  158. package/src/components/toolbar/popup/submitforquote/styles.css +0 -105
  159. package/src/components/toolbar/popup/submitforquote/styles.js +0 -294
  160. package/src/components/toolbar/popup/submitprompt/index.jsx +0 -89
  161. package/src/components/toolbar/popup/submitprompt/styles.css +0 -64
  162. package/src/components/toolbar/popup/submitprompt/styles.js +0 -42
  163. package/src/components/toolbar/toolbar-button.jsx +0 -90
  164. package/src/components/toolbar/toolbar-load-button.jsx +0 -36
  165. package/src/components/toolbar/toolbar-save-button.jsx +0 -32
  166. package/src/components/wizardstep/button/styles.js +0 -677
  167. package/src/components/wizardstep/export.js +0 -5
  168. package/src/components/wizardstep/index.jsx +0 -1372
  169. package/src/components/wizardstep/styles.js +0 -688
  170. package/src/components/wizardstep/wizardstep-content-button.jsx +0 -198
  171. package/src/components/wizardstep/wizardstep-toggle-button.jsx +0 -101
@@ -1,41 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import * as SharedStyle from '../../../shared-style';
4
- import * as S from './styles';
5
-
6
- export default class ControlButton extends Component {
7
- constructor(props, context) {
8
- super(props, context);
9
- this.state = { hover: false };
10
- }
11
-
12
- render() {
13
- let { state, props } = this;
14
- let overlayStyle = {};
15
- if (state.hover) overlayStyle = { ...overlayStyle, display: 'block' };
16
-
17
- return (
18
- <S.Control
19
- onMouseOver={event => this.setState({ hover: true })}
20
- onMouseOut={event => this.setState({ hover: false })}
21
- onClick={props.onClick}
22
- >
23
- {[
24
- props.title !== undefined ? (
25
- <S.ControlTitle key={props.title}>{props.title}</S.ControlTitle>
26
- ) : null,
27
- props.icon !== undefined ? (
28
- <S.ControlIcon key={props.icon}>{props.icon}</S.ControlIcon>
29
- ) : null
30
- ]}
31
- </S.Control>
32
- );
33
- }
34
- }
35
-
36
- ControlButton.propTypes = {
37
- title: PropTypes.string,
38
- hover: PropTypes.bool,
39
- active: PropTypes.bool.isRequired,
40
- onClick: PropTypes.func
41
- };
@@ -1,34 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import * as SharedStyle from '../../../shared-style';
4
- import * as S from './styles';
5
-
6
- export default class DirectionButton extends Component {
7
- constructor(props, context) {
8
- super(props, context);
9
- }
10
-
11
- render() {
12
- let { props } = this;
13
- let overlayStyle = {};
14
- overlayStyle = props.active
15
- ? { ...overlayStyle, background: SharedStyle.TOOLBAR_COLOR.active }
16
- : { ...overlayStyle };
17
- return (
18
- <S.DirectionIcon
19
- style={props.style}
20
- onClick={props.onClick}
21
- key={props.icon}
22
- >
23
- {props.icon}
24
- </S.DirectionIcon>
25
- );
26
- }
27
- }
28
-
29
- DirectionButton.propTypes = {
30
- title: PropTypes.string,
31
- hover: PropTypes.bool,
32
- active: PropTypes.bool.isRequired,
33
- onClick: PropTypes.func
34
- };
@@ -1,103 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import * as S from './styles';
4
-
5
- export default class RightButton extends Component {
6
- constructor(props, context) {
7
- super(props, context);
8
- this.state = { hover: false };
9
- }
10
-
11
- render() {
12
- let { state, props } = this;
13
- let overlayStyle = {};
14
- if (state.hover) overlayStyle = { ...overlayStyle, display: 'block' };
15
- if (props.active) overlayStyle = { ...overlayStyle, display: 'block' };
16
- return (
17
- <S.rMain
18
- onMouseOver={event => this.setState({ hover: true })}
19
- onMouseOut={event => this.setState({ hover: false })}
20
- onClick={props.onClick}
21
- >
22
- <S.rightIcon>{props.icon}</S.rightIcon>
23
-
24
- <S.rOverlay style={{ ...overlayStyle }}>
25
- <img width="40px" src={props.src} />
26
- <S.rTitle>{props.title}</S.rTitle>
27
- </S.rOverlay>
28
- {/* {
29
- state.active ?
30
- <div style={STYLE_TOOLTIP}>
31
- <span style={STYLE_TOOLTIP_PIN} />
32
- {props.tooltip}
33
- </div>
34
- : null
35
- } */}
36
- </S.rMain>
37
- );
38
- }
39
- }
40
-
41
- RightButton.propTypes = {
42
- title: PropTypes.string,
43
- hover: PropTypes.bool,
44
- onClick: PropTypes.func
45
- };
46
-
47
- export class RightTextButton extends Component {
48
- constructor(props, context) {
49
- super(props, context);
50
- this.state = { hover: false };
51
- }
52
-
53
- render() {
54
- let { state, props } = this;
55
- return (
56
- <S.rMain
57
- onMouseOver={event => this.setState({ hover: true })}
58
- onMouseOut={event => this.setState({ hover: false })}
59
- onClick={props.onClick}
60
- >
61
- <S.rightIcon>{props.icon}</S.rightIcon>
62
-
63
- {state.hover ? (
64
- <S.rOverlay style={{ display: 'block' }}>
65
- <img width="40px" src={props.src} />
66
- <S.rTitle
67
- style={{ top: '20px', paddingTop: '7px', paddingBottom: '7px' }}
68
- >
69
- {props.title}
70
- </S.rTitle>
71
- </S.rOverlay>
72
- ) : (
73
- <S.rOverlay style={{ display: 'block' }}>
74
- <S.rTitle
75
- style={{
76
- color: 'black',
77
- top: '20px',
78
- paddingTop: '7px',
79
- paddingBottom: '7px'
80
- }}
81
- >
82
- {props.title}
83
- </S.rTitle>
84
- </S.rOverlay>
85
- )}
86
- {/* {
87
- state.active ?
88
- <div style={STYLE_TOOLTIP}>
89
- <span style={STYLE_TOOLTIP_PIN} />
90
- {props.tooltip}
91
- </div>
92
- : null
93
- } */}
94
- </S.rMain>
95
- );
96
- }
97
- }
98
-
99
- RightTextButton.propTypes = {
100
- title: PropTypes.string,
101
- hover: PropTypes.bool,
102
- onClick: PropTypes.func
103
- };
@@ -1,41 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import * as SharedStyle from '../../../shared-style';
4
- import { MODE_IDLE_3D } from '../../../constants';
5
- import * as S from './styles';
6
-
7
- export default class ToggleButton extends Component {
8
- constructor(props, context) {
9
- super(props, context);
10
- }
11
-
12
- render() {
13
- let { props } = this;
14
- let overlayStyle = {};
15
- let activeStyle =
16
- props.settingMode === MODE_IDLE_3D || props.active
17
- ? { paddingRight: '30px', paddingBottom: '2px' }
18
- : { paddingLeft: '30px', paddingBottom: '2px' };
19
- return (
20
- <S.Toggle style={{ ...overlayStyle }} onClick={props.onClick}>
21
- {[
22
- props.title !== undefined ? (
23
- <S.ControlTitle key={props.title}>{props.title}</S.ControlTitle>
24
- ) : null,
25
- props.icon !== undefined ? (
26
- <S.ToggleIcon style={{ ...activeStyle }} key={props.icon}>
27
- {props.icon}
28
- </S.ToggleIcon>
29
- ) : null
30
- ]}
31
- </S.Toggle>
32
- );
33
- }
34
- }
35
-
36
- ToggleButton.propTypes = {
37
- title: PropTypes.string,
38
- hover: PropTypes.bool,
39
- active: PropTypes.bool.isRequired,
40
- onClick: PropTypes.func
41
- };
@@ -1,55 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import * as S from './styles';
5
-
6
- //http://www.cssportal.com/css-tooltip-generator/
7
-
8
- export default class ToolbarButton extends Component {
9
- constructor(props, context) {
10
- super(props, context);
11
- this.state = { hover: false };
12
- }
13
-
14
- render() {
15
- let { state, props } = this;
16
- const { active, onClick, children, src, title, ...otherProps } = props;
17
- let overlayStyle = {};
18
- if (state.hover) overlayStyle = { ...overlayStyle, display: 'block' };
19
- // overlayStyle = { ...overlayStyle, 'display': 'block', 'background': SharedStyle.TOOLBAR_COLOR.focus }
20
-
21
- if (props.active) overlayStyle = { ...overlayStyle, display: 'block' };
22
- // overlayStyle = { ...overlayStyle, 'display': 'block', 'background': SharedStyle.TOOLBAR_COLOR.active }
23
- return (
24
- <S.Main
25
- {...otherProps}
26
- onMouseOver={event => this.setState({ hover: true })}
27
- onMouseOut={event => this.setState({ hover: false })}
28
- onClick={props.onClick}
29
- >
30
- <div>{props.children}</div>
31
-
32
- <S.Overlay style={{ ...overlayStyle }}>
33
- <img width="75px" src={props.src} />
34
- <S.Title>{props.title}</S.Title>
35
- </S.Overlay>
36
- {/* {
37
- state.active ?
38
- <div style={STYLE_TOOLTIP}>
39
- <span style={STYLE_TOOLTIP_PIN} />
40
- {props.tooltip}
41
- </div>
42
- : null
43
- } */}
44
- </S.Main>
45
- );
46
- }
47
- }
48
-
49
- ToolbarButton.propTypes = {
50
- title: PropTypes.string,
51
- hover: PropTypes.bool,
52
- active: PropTypes.bool.isRequired,
53
- tooltip: PropTypes.string.isRequired,
54
- onClick: PropTypes.func
55
- };
@@ -1,127 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- export const Main = styled.div`
4
- z-index: 6;
5
- width: 75px;
6
- height: 75px;
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- font-size: 0px;
11
- position: relative;
12
- cursor: pointer;
13
- background: #d3e7e5;
14
- box-shadow: 3px 1px 3px 0px rgba(0, 0, 0, 0.2),
15
- -1px -1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12);
16
- `;
17
- export const rightIcon = styled.div`
18
- img {
19
- box-shadow: 3px 1px 3px 0px rgba(0, 0, 0, 0.2),
20
- -1px -1px 1px 0px rgba(0, 0, 0, 0.14),
21
- 0px 2px 1px -1px rgba(0, 0, 0, 0.12);
22
- border-radius: 8%;
23
- }
24
- `;
25
- export const Overlay = styled.div`
26
- position: absolute;
27
- top: 0px;
28
- left: 0px;
29
- bottom: 0px;
30
- width: 100%;
31
- text-align: center;
32
- background: rgba(0, 0, 0, 0.5);
33
- display: none;
34
- `;
35
- export const Title = styled.span`
36
- position: absolute;
37
- top: 51%;
38
- left: 0px;
39
- width: 100%;
40
- color: #fff;
41
- text-transform: uppercase;
42
- transform: translate(0%, -50%);
43
- font-size: 11px;
44
- `;
45
- export const rMain = styled.div`
46
- width: 40px;
47
- display: inline-block;
48
- align-items: center;
49
- justify-content: center;
50
- margin-right: 14px;
51
- position: relative;
52
- cursor: pointer;
53
- `;
54
- export const rOverlay = styled.div`
55
- position: absolute;
56
- top: 0px;
57
- left: 0px;
58
- bottom: 0px;
59
- width: 100%;
60
- text-align: center;
61
- display: none;
62
- `;
63
- export const rTitle = styled.span`
64
- position: absolute;
65
- top: 45%;
66
- left: 1px;
67
- width: 100%;
68
- color: #fff;
69
- text-transform: uppercase;
70
- transform: translate(0%, -50%);
71
-
72
- @media screen and (min-width: 1024) {
73
- font-size: 11px;
74
- }
75
- @media screen and (max-width: 1024) {
76
- font-size: 11px;
77
- }
78
- @media screen and (min-width: 1366) {
79
- font-size: 13px;
80
- }
81
- @media screen and (max-width: 1366) {
82
- font-size: 13px;
83
- }
84
- @media screen and (min-width: 1440) {
85
- font-size: 16px;
86
- }
87
- @media screen and (max-width: 1440) {
88
- font-size: 16px;
89
- }
90
- `;
91
-
92
- export const Toggle = styled.div`
93
- display: flex;
94
- align-items: center;
95
- position: relative;
96
- height: 36px;
97
- margin-left: 20px;
98
- justify-content: center;
99
- font-size: 14px;
100
- cursor: pointer;
101
- -webkit-user-select: none;
102
- -moz-user-select: none;
103
- -ms-user-select: none;
104
- user-select: none;
105
- :hover {
106
- box-shadow: 0px 3px 5px -1px rgba(156, 154, 154, 0.2),
107
- 0px 6px 10px 0px rgba(156, 154, 154, 0.39),
108
- 0px 1px 18px 0px rgba(156, 154, 154, 0.12);
109
- border-radius: 18px;
110
- }
111
- `;
112
-
113
- export const ToggleIcon = styled.div`
114
- ${'' /* transition-duration: .3s; */}
115
- position: absolute;
116
- top: 0px;
117
- img {
118
- font-size: 1.4rem;
119
- box-sizing: border-box;
120
- border-radius: 50%;
121
- }
122
- `;
123
-
124
- export const ControlTitle = styled.span`
125
- margin: 10px;
126
- font-size: 12px;
127
- `;
@@ -1,103 +0,0 @@
1
- import React from 'react';
2
- import { FormControl, InputLabel, Select, MenuItem } from '@material-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
4
-
5
- const useStyles = makeStyles({
6
- selectRoot: {
7
- display: 'flex',
8
- alignItems: 'center',
9
- gap: '0.5rem',
10
- color: 'rgb(76, 18, 161)',
11
- fontWeight: 600,
12
- fontSize: '14px'
13
- },
14
- inputLabel: {
15
- color: 'black'
16
- }
17
- });
18
-
19
- const DoorStyleMenu = ({
20
- selected,
21
- data,
22
- onChange,
23
- getValue,
24
- placeholder,
25
- iconStyle
26
- }) => {
27
- const classes = useStyles();
28
-
29
- if (!data || !data.length) return null;
30
-
31
- return (
32
- <FormControl fullWidth variant="outlined">
33
- {placeholder && (
34
- <InputLabel className={classes.inputLabel}>{placeholder}</InputLabel>
35
- )}
36
- <Select
37
- value={selected}
38
- onChange={e => onChange(e.target.value)}
39
- label={placeholder}
40
- classes={{ root: classes.selectRoot }}
41
- renderValue={value => {
42
- if (!value) {
43
- return <span style={{ color: 'rgba(86, 95, 119, 1)' }}>Any</span>;
44
- }
45
- const selectedItem = data.find(item => getValue(item) === value.name);
46
- if (!selectedItem)
47
- return <span style={{ color: 'rgba(86, 95, 119, 1)' }}>Any</span>;
48
- return (
49
- <span
50
- style={{
51
- display: 'flex',
52
- alignItems: 'center',
53
- gap: '0.5rem',
54
- width: '100%'
55
- }}
56
- >
57
- <span>{selectedItem.name}</span>
58
- <img
59
- style={
60
- iconStyle && {
61
- ...iconStyle
62
- }
63
- }
64
- height="20"
65
- src={selectedItem.thumbnail}
66
- alt=""
67
- />
68
- </span>
69
- );
70
- }}
71
- >
72
- <MenuItem value={''}>
73
- <span style={{ color: 'rgba(86, 95, 119, 1)' }}>Any</span>
74
- </MenuItem>
75
- {data.map((item, key) => (
76
- <MenuItem
77
- classes={{ root: classes.selectRoot }}
78
- key={key}
79
- value={getValue(item)}
80
- >
81
- <font size="2">{item.name}</font>
82
- <img
83
- style={
84
- iconStyle && {
85
- ...iconStyle
86
- }
87
- }
88
- height="20"
89
- src={item.thumbnail}
90
- alt=""
91
- />
92
- </MenuItem>
93
- ))}
94
- </Select>
95
- </FormControl>
96
- );
97
- };
98
-
99
- DoorStyleMenu.defaultProps = {
100
- getValue: it => it.name
101
- };
102
-
103
- export default DoorStyleMenu;
@@ -1,126 +0,0 @@
1
- import React from 'react';
2
- import Skeleton from '@material-ui/lab/Skeleton';
3
- import * as PS from '../popup/styles';
4
- import { TEXT_COLOR_NEUTRAL_0 } from '../../../../src/constants';
5
- import { useGetPricesBySku } from '../../../../src/hooks/useGetPricesBySku';
6
- import { useValidateToken } from '../../../../src/hooks/useValidateToken';
7
-
8
- export const Pricing = ({ internalSKU, accessToken }) => {
9
- const { data } = useValidateToken(accessToken);
10
-
11
- const {
12
- data: { prices = [] },
13
- isFetching
14
- } = useGetPricesBySku(data?.source === 'none' ? [] : [internalSKU]);
15
-
16
- if (isFetching || data?.source === 'none') {
17
- return (
18
- <React.Fragment>
19
- <PS.DesignValue
20
- style={{
21
- fontSize: 16,
22
- margin: '10px 0',
23
- fontWeight: 600,
24
- marginBottom: 0
25
- }}
26
- >
27
- <Skeleton variant="text" width={80} height={24} />
28
- </PS.DesignValue>
29
- <span
30
- style={{
31
- display: 'flex',
32
- justifyContent: 'space-between',
33
- marginBottom: 5
34
- }}
35
- >
36
- <Skeleton variant="text" width={100} height={20} />
37
- <Skeleton variant="text" width={60} height={20} />
38
- </span>
39
- <span
40
- style={{
41
- display: 'flex',
42
- justifyContent: 'space-between'
43
- }}
44
- >
45
- <Skeleton variant="text" width={120} height={20} />
46
- <Skeleton variant="text" width={60} height={20} />
47
- </span>
48
- </React.Fragment>
49
- );
50
- }
51
-
52
- const product = prices && prices.length > 0 ? prices[0] : null;
53
-
54
- if (!prices || prices.length === 0) {
55
- return (
56
- <PS.DesignValue
57
- style={{
58
- fontSize: 16,
59
- margin: '10px 0',
60
- fontWeight: 600,
61
- marginBottom: 0
62
- }}
63
- >
64
- No pricing information available
65
- </PS.DesignValue>
66
- );
67
- }
68
-
69
- return (
70
- <React.Fragment>
71
- <PS.DesignValue
72
- style={{
73
- fontSize: 16,
74
- margin: '10px 0',
75
- fontWeight: 600,
76
- marginBottom: 0
77
- }}
78
- >
79
- Pricing
80
- </PS.DesignValue>
81
- <span
82
- style={{
83
- display: 'flex',
84
- justifyContent: 'space-between',
85
- marginBottom: 5
86
- }}
87
- >
88
- <PS.PropteryValue2>Regular Price: </PS.PropteryValue2>
89
- <PS.PropteryValue2
90
- style={{
91
- color: TEXT_COLOR_NEUTRAL_0,
92
- textDecoration:
93
- product?.discounted_price !== product?.regular_price
94
- ? 'line-through'
95
- : 'none',
96
- width: 'unset',
97
- fontWeight: 600
98
- }}
99
- >
100
- {`$${product?.regular_price}`}
101
- </PS.PropteryValue2>
102
- </span>
103
- {product?.discounted_price !== null ? (
104
- <span
105
- style={{
106
- display: 'flex',
107
- justifyContent: 'space-between'
108
- }}
109
- >
110
- <PS.PropteryValue2>Discounted Price: </PS.PropteryValue2>
111
- <PS.PropteryValue2
112
- style={{
113
- color: 'green',
114
- width: 'unset',
115
- fontWeight: 600
116
- }}
117
- >
118
- {product?.discounted_price !== product.regular_price
119
- ? `$${product?.discounted_price}`
120
- : '-'}
121
- </PS.PropteryValue2>
122
- </span>
123
- ) : null}
124
- </React.Fragment>
125
- );
126
- };