kitchen-simulator 5.0.0-test.16 → 5.0.0-test.18

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "5.0.0-test.16",
3
+ "version": "5.0.0-test.18",
4
4
  "description": "It is a kitchen simulator.",
5
5
  "main": "src/_index.js",
6
6
  "module": "src/_index.js",
@@ -1,4 +1,3 @@
1
- import Dialog from '@material-ui/core/Dialog';
2
1
  import axios from 'axios';
3
2
  import convert from 'convert-units';
4
3
  import { Plugins as PlannerPlugins } from './_index';
@@ -8,69 +7,16 @@ import ReactGA from 'react-ga4';
8
7
  import { hotjar } from 'react-hotjar';
9
8
  import { connect } from 'react-redux';
10
9
  import { bindActionCreators } from 'redux';
11
- import styled from 'styled-components';
12
- import SnackBar from './components/atoms/Snackbar';
13
10
  import * as constants from './constants';
14
- import {
15
- BG_COLOR_HOVER,
16
- CLIENTS_NAME,
17
- DEFAULT_FONT_FAMILY,
18
- PRIMARY_GREEN_COLOR,
19
- SECONDARY_PURPLE_COLOR,
20
- TEXT_COLOR_NEUTRAL_1
21
- } from './constants';
22
11
  import { base64Decode, getPath } from './utils/helper';
23
12
  import actions from './actions/_export';
24
13
  import Catalog from './catalog/catalog';
25
14
  import { Content } from './components/_export';
26
- import jwtService from './components/login/jwtService';
27
15
  import Translator from './translator/translator';
28
16
  import { objectsMap } from './utils/objects-utils';
29
17
  import { VERSION } from './version';
30
18
 
31
- const AWS = require('aws-sdk');
32
-
33
- const StyledDialog = styled(Dialog)`
34
- .MuiDialog-paperWidthSm {
35
- border-radius: 10px;
36
- }
37
- `;
38
-
39
- export const StyledDialogContent = styled.span`
40
- font-family: ${DEFAULT_FONT_FAMILY};
41
- color: ${TEXT_COLOR_NEUTRAL_1};
42
- padding: 10px 30px;
43
- padding-top: 30px;
44
- `;
45
-
46
- export const StyledDialogAction = styled.div`
47
- display: flex;
48
- justify-content: flex-end;
49
- padding: 15px 30px 25px;
50
- `;
51
-
52
- export const StyledButton = styled.div`
53
- padding: 10px 20px;
54
- cursor: pointer;
55
- margin-right: 10px;
56
- color: ${SECONDARY_PURPLE_COLOR};
57
- font-weight: bold;
58
- font-family: ${DEFAULT_FONT_FAMILY};
59
- font-size: 16px;
60
- border-radius: 20px;
61
- :hover {
62
- background-color: ${BG_COLOR_HOVER};
63
- }
64
- `;
65
-
66
- const s3 = new AWS.S3({
67
- accessKeyId: process.env.REACT_APP_AWS_ID,
68
- secretAccessKey: process.env.REACT_APP_AWS_SECRET
69
- });
70
-
71
19
  const toolbarW = 0;
72
- const sidebarW = 250;
73
- const footerBarH = 20;
74
20
 
75
21
  const wrapperStyle = {
76
22
  display: 'flex',
@@ -146,8 +92,6 @@ class KitchenConfigurator extends Component {
146
92
  ttclid: utmRequestData?.ttclid || 'ttclid'
147
93
  };
148
94
 
149
- this.jwtCheck();
150
-
151
95
  this.openFloor = this.openFloor.bind(this);
152
96
  this.openCabinet = this.openCabinet.bind(this);
153
97
  this.openFinishing = this.openFinishing.bind(this);
@@ -297,46 +241,6 @@ class KitchenConfigurator extends Component {
297
241
  ).parentElement.parentElement.style.zIndex = 6;
298
242
  }
299
243
 
300
- jwtCheck() {
301
- jwtService.on('onAutoLogin', () => {
302
- // this.props.showMessage({message: 'Logging in with JWT'});
303
-
304
- /**
305
- * Sign in and retrieve user data from Api
306
- */
307
- jwtService
308
- .signInWithToken()
309
- .then(user => {
310
- //this.props.userActions.setUserData(user);
311
- this.props.userActions.login(
312
- user.id,
313
- user.role,
314
- jwtService.getAccessToken(),
315
- this.utm
316
- );
317
- //this.props.showMessage(option)
318
- //this.props.showMessage({message: 'Logged in with token data', variant: 'success'});
319
- //alert('Logged in with token data');
320
- })
321
- .catch(error => {
322
- //this.props.showMessage({message: error});
323
- this.setState({
324
- isSnackBarOpen: true,
325
- snackBarMessage: error
326
- });
327
- });
328
- });
329
-
330
- jwtService.on('onAutoLogout', message => {
331
- if (message) {
332
- //this.props.showMessage({message, variant: 'error'});
333
- }
334
- this.props.userActions.logout();
335
- });
336
-
337
- jwtService.init();
338
- }
339
-
340
244
  getChildContext() {
341
245
  return {
342
246
  ...objectsMap(actions, actionNamespace => this.props[actionNamespace]),
@@ -592,41 +496,6 @@ class KitchenConfigurator extends Component {
592
496
 
593
497
  return (
594
498
  <section>
595
- <SnackBar
596
- isOpen={this.state.isSnackBarOpen}
597
- message={this.state.snackBarMessage}
598
- handleClose={() =>
599
- this.setState({ isSnackBarOpen: false, snackBarMessage: '' })
600
- }
601
- autoHideDuration={10000}
602
- />
603
- <SnackBar
604
- style={{ marginTop: this.state.isSnackBarOpen ? 75 : 'unset' }}
605
- isOpen={this.state.isSnackBar1Open}
606
- message={`The items in your design have been added to your shopping cart at ${CLIENTS_NAME[sessionStorage.getItem('visualizerName')]}. <br />Please log in with the same email address.`}
607
- autoHideDuration={20000}
608
- action={
609
- <div>
610
- <a
611
- href={this.state.redirectURL}
612
- target="_blank"
613
- style={{
614
- fontFamily: DEFAULT_FONT_FAMILY,
615
- color: PRIMARY_GREEN_COLOR,
616
- fontWeight: 700,
617
- marginRight: 10
618
- }}
619
- >
620
- View Cart
621
- </a>
622
- <img
623
- onClick={() => this.setState({ isSnackBar1Open: false })}
624
- style={{ float: 'right', height: 24, cursor: 'pointer' }}
625
- src="/assets/img/svg/close.svg"
626
- />
627
- </div>
628
- }
629
- />
630
499
  <div style={{ ...wrapperStyle, height }}>
631
500
  <Content
632
501
  width={contentW}