kitchen-simulator 1.1.1-test.80 → 1.1.1-test.83

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.
@@ -9,17 +9,28 @@ import * as itemsActions from "./items-actions";
9
9
  import * as areaActions from "./area-actions";
10
10
  import * as groupsActions from "./groups-actions";
11
11
 
12
- export { projectActions, viewer2DActions, viewer3DActions, linesActions, holesActions, sceneActions, verticesActions, itemsActions, areaActions, groupsActions, userActions };
12
+ export {
13
+ projectActions,
14
+ viewer2DActions,
15
+ viewer3DActions,
16
+ linesActions,
17
+ holesActions,
18
+ sceneActions,
19
+ verticesActions,
20
+ itemsActions,
21
+ areaActions,
22
+ groupsActions
23
+ };
24
+
13
25
  export default {
14
- projectActions: projectActions,
15
- viewer2DActions: viewer2DActions,
16
- viewer3DActions: viewer3DActions,
17
- linesActions: linesActions,
18
- holesActions: holesActions,
19
- sceneActions: sceneActions,
20
- verticesActions: verticesActions,
21
- itemsActions: itemsActions,
22
- areaActions: areaActions,
23
- groupsActions: groupsActions,
24
- userActions: userActions
25
- };
26
+ projectActions,
27
+ viewer2DActions,
28
+ viewer3DActions,
29
+ linesActions,
30
+ holesActions,
31
+ sceneActions,
32
+ verticesActions,
33
+ itemsActions,
34
+ areaActions,
35
+ groupsActions
36
+ };
@@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
3
3
  import Viewer2D from "./viewer2d/viewer2d";
4
4
  import Viewer3D from "./viewer3d/viewer3d";
5
5
  import Viewer3DFirstPerson from "./viewer3d/viewer3d-first-person";
6
- import CatalogList from "./catalog-view/catalog-list";
7
- import ProjectConfigurator from "./configurator/project-configurator";
6
+ // import CatalogList from './catalog-view/catalog-list';
7
+ // import ProjectConfigurator from './configurator/project-configurator';
8
8
  import * as constants from "../constants";
9
9
  import Front3D from "./viewer3d/front3D";
10
10
  export default function Content(_ref, _ref2) {
@@ -48,14 +48,18 @@ export default function Content(_ref, _ref2) {
48
48
  width: width,
49
49
  height: height
50
50
  });
51
- case constants.MODE_VIEWING_CATALOG:
52
- return /*#__PURE__*/React.createElement(CatalogList, {
53
- state: state,
54
- param: match,
55
- width: width,
56
- height: height,
57
- categoryData: this.props.categoryData
58
- });
51
+
52
+ // case constants.MODE_VIEWING_CATALOG:
53
+ // return (
54
+ // <CatalogList
55
+ // state={state}
56
+ // param={match}
57
+ // width={width}
58
+ // height={height}
59
+ // categoryData={this.props.categoryData}
60
+ // />
61
+ // );
62
+
59
63
  case constants.MODE_IDLE:
60
64
  case constants.MODE_2D_ZOOM_IN:
61
65
  case constants.MODE_2D_ZOOM_OUT:
@@ -92,12 +96,12 @@ export default function Content(_ref, _ref2) {
92
96
  keyDownEnable: keyDownEnable,
93
97
  downloadFlag: false
94
98
  });
95
- case constants.MODE_CONFIGURING_PROJECT:
96
- return /*#__PURE__*/React.createElement(ProjectConfigurator, {
97
- width: width,
98
- height: height,
99
- state: state
100
- });
99
+
100
+ // case constants.MODE_CONFIGURING_PROJECT:
101
+ // return (
102
+ // <ProjectConfigurator width={width} height={height} state={state} />
103
+ // );
104
+
101
105
  default:
102
106
  if (customContents.hasOwnProperty(mode)) {
103
107
  var CustomContent = customContents[mode];
@@ -0,0 +1,7 @@
1
+ import Content from "./content";
2
+ import Viewer2DComponents from "./viewer2d/export";
3
+ import StyleComponents from "./style/export";
4
+
5
+ export { Content, Viewer2DComponents, StyleComponents };
6
+
7
+ export default { Content, Viewer2DComponents, StyleComponents };
@@ -5,7 +5,6 @@ import Ruler from "./ruler";
5
5
  import { BASE_CABINET_LAYOUTPOS, LINE_THICKNESS, WALL_CABINET_LAYOUTPOS } from "../../constants";
6
6
  import * as Three from 'three';
7
7
  import { isEmpty } from "./utils";
8
- import Tooltip from '@material-ui/core/Tooltip';
9
8
  var STYLE = {
10
9
  stroke: 'rgb(77, 77, 77)',
11
10
  strokeWidth: '1px'
@@ -802,9 +801,7 @@ export default function Line(_ref) {
802
801
  } : {}
803
802
  }, renderedLine, /*#__PURE__*/React.createElement("g", {
804
803
  transform: "translate(".concat(x1, ", ").concat(y1, ") rotate(").concat(angle, ", 0, 0)")
805
- }, renderedHoles)), line.selected && /*#__PURE__*/React.createElement(Tooltip, {
806
- title: "Elevation View"
807
- }, /*#__PURE__*/React.createElement("g", {
804
+ }, renderedHoles)), line.selected && /*#__PURE__*/React.createElement("g", {
808
805
  id: 'elevation-button',
809
806
  key: 1,
810
807
  transform: "translate(".concat(x1 + 35, ", ").concat(y1 - 15, ")"),
@@ -834,7 +831,7 @@ export default function Line(_ref) {
834
831
  style: {
835
832
  transform: 'rotateX(180deg)'
836
833
  }
837
- }))), line.selected && /*#__PURE__*/React.createElement("g", {
834
+ })), line.selected && /*#__PURE__*/React.createElement("g", {
838
835
  id: 'remove-button',
839
836
  key: 2,
840
837
  transform: "translate(".concat(x1 + 10, ", ").concat(y1, ")"),
@@ -1,43 +1,36 @@
1
- "use strict";
1
+ import * as projectActions from "./project-actions";
2
+ import * as viewer2DActions from "./viewer2d-actions";
3
+ import * as viewer3DActions from "./viewer3d-actions";
4
+ import * as linesActions from "./lines-actions";
5
+ import * as holesActions from "./holes-actions";
6
+ import * as sceneActions from "./scene-actions";
7
+ import * as verticesActions from "./vertices-actions";
8
+ import * as itemsActions from "./items-actions";
9
+ import * as areaActions from "./area-actions";
10
+ import * as groupsActions from "./groups-actions";
2
11
 
3
- var _typeof = require("@babel/runtime/helpers/typeof");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.viewer3DActions = exports.viewer2DActions = exports.verticesActions = exports.userActions = exports.sceneActions = exports.projectActions = exports.linesActions = exports.itemsActions = exports.holesActions = exports.groupsActions = exports["default"] = exports.areaActions = void 0;
8
- var projectActions = _interopRequireWildcard(require("./project-actions"));
9
- exports.projectActions = projectActions;
10
- var viewer2DActions = _interopRequireWildcard(require("./viewer2d-actions"));
11
- exports.viewer2DActions = viewer2DActions;
12
- var viewer3DActions = _interopRequireWildcard(require("./viewer3d-actions"));
13
- exports.viewer3DActions = viewer3DActions;
14
- var linesActions = _interopRequireWildcard(require("./lines-actions"));
15
- exports.linesActions = linesActions;
16
- var holesActions = _interopRequireWildcard(require("./holes-actions"));
17
- exports.holesActions = holesActions;
18
- var sceneActions = _interopRequireWildcard(require("./scene-actions"));
19
- exports.sceneActions = sceneActions;
20
- var verticesActions = _interopRequireWildcard(require("./vertices-actions"));
21
- exports.verticesActions = verticesActions;
22
- var itemsActions = _interopRequireWildcard(require("./items-actions"));
23
- exports.itemsActions = itemsActions;
24
- var areaActions = _interopRequireWildcard(require("./area-actions"));
25
- exports.areaActions = areaActions;
26
- var groupsActions = _interopRequireWildcard(require("./groups-actions"));
27
- exports.groupsActions = groupsActions;
28
- var userActions = _interopRequireWildcard(require("./user-actions"));
29
- exports.userActions = userActions;
30
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
31
- var _default = exports["default"] = {
32
- projectActions: projectActions,
33
- viewer2DActions: viewer2DActions,
34
- viewer3DActions: viewer3DActions,
35
- linesActions: linesActions,
36
- holesActions: holesActions,
37
- sceneActions: sceneActions,
38
- verticesActions: verticesActions,
39
- itemsActions: itemsActions,
40
- areaActions: areaActions,
41
- groupsActions: groupsActions,
42
- userActions: userActions
43
- };
12
+ export {
13
+ projectActions,
14
+ viewer2DActions,
15
+ viewer3DActions,
16
+ linesActions,
17
+ holesActions,
18
+ sceneActions,
19
+ verticesActions,
20
+ itemsActions,
21
+ areaActions,
22
+ groupsActions
23
+ };
24
+
25
+ export default {
26
+ projectActions,
27
+ viewer2DActions,
28
+ viewer3DActions,
29
+ linesActions,
30
+ holesActions,
31
+ sceneActions,
32
+ verticesActions,
33
+ itemsActions,
34
+ areaActions,
35
+ groupsActions
36
+ };
@@ -11,11 +11,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
  var _viewer2d = _interopRequireDefault(require("./viewer2d/viewer2d"));
12
12
  var _viewer3d = _interopRequireDefault(require("./viewer3d/viewer3d"));
13
13
  var _viewer3dFirstPerson = _interopRequireDefault(require("./viewer3d/viewer3d-first-person"));
14
- var _catalogList = _interopRequireDefault(require("./catalog-view/catalog-list"));
15
- var _projectConfigurator = _interopRequireDefault(require("./configurator/project-configurator"));
16
14
  var constants = _interopRequireWildcard(require("../constants"));
17
15
  var _front3D = _interopRequireDefault(require("./viewer3d/front3D"));
18
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
+ // import CatalogList from './catalog-view/catalog-list';
18
+ // import ProjectConfigurator from './configurator/project-configurator';
19
+
19
20
  function Content(_ref, _ref2) {
20
21
  var width = _ref.width,
21
22
  height = _ref.height,
@@ -57,14 +58,18 @@ function Content(_ref, _ref2) {
57
58
  width: width,
58
59
  height: height
59
60
  });
60
- case constants.MODE_VIEWING_CATALOG:
61
- return /*#__PURE__*/_react["default"].createElement(_catalogList["default"], {
62
- state: state,
63
- param: match,
64
- width: width,
65
- height: height,
66
- categoryData: this.props.categoryData
67
- });
61
+
62
+ // case constants.MODE_VIEWING_CATALOG:
63
+ // return (
64
+ // <CatalogList
65
+ // state={state}
66
+ // param={match}
67
+ // width={width}
68
+ // height={height}
69
+ // categoryData={this.props.categoryData}
70
+ // />
71
+ // );
72
+
68
73
  case constants.MODE_IDLE:
69
74
  case constants.MODE_2D_ZOOM_IN:
70
75
  case constants.MODE_2D_ZOOM_OUT:
@@ -101,12 +106,12 @@ function Content(_ref, _ref2) {
101
106
  keyDownEnable: keyDownEnable,
102
107
  downloadFlag: false
103
108
  });
104
- case constants.MODE_CONFIGURING_PROJECT:
105
- return /*#__PURE__*/_react["default"].createElement(_projectConfigurator["default"], {
106
- width: width,
107
- height: height,
108
- state: state
109
- });
109
+
110
+ // case constants.MODE_CONFIGURING_PROJECT:
111
+ // return (
112
+ // <ProjectConfigurator width={width} height={height} state={state} />
113
+ // );
114
+
110
115
  default:
111
116
  if (customContents.hasOwnProperty(mode)) {
112
117
  var CustomContent = customContents[mode];
@@ -0,0 +1,7 @@
1
+ import Content from "./content";
2
+ import Viewer2DComponents from "./viewer2d/export";
3
+ import StyleComponents from "./style/export";
4
+
5
+ export { Content, Viewer2DComponents, StyleComponents };
6
+
7
+ export default { Content, Viewer2DComponents, StyleComponents };
@@ -14,7 +14,6 @@ var _ruler = _interopRequireDefault(require("./ruler"));
14
14
  var _constants = require("../../constants");
15
15
  var Three = _interopRequireWildcard(require("three"));
16
16
  var _utils = require("./utils");
17
- var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
18
17
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
19
18
  var STYLE = {
20
19
  stroke: 'rgb(77, 77, 77)',
@@ -812,9 +811,7 @@ function Line(_ref) {
812
811
  } : {}
813
812
  }, renderedLine, /*#__PURE__*/_react["default"].createElement("g", {
814
813
  transform: "translate(".concat(x1, ", ").concat(y1, ") rotate(").concat(angle, ", 0, 0)")
815
- }, renderedHoles)), line.selected && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
816
- title: "Elevation View"
817
- }, /*#__PURE__*/_react["default"].createElement("g", {
814
+ }, renderedHoles)), line.selected && /*#__PURE__*/_react["default"].createElement("g", {
818
815
  id: 'elevation-button',
819
816
  key: 1,
820
817
  transform: "translate(".concat(x1 + 35, ", ").concat(y1 - 15, ")"),
@@ -844,7 +841,7 @@ function Line(_ref) {
844
841
  style: {
845
842
  transform: 'rotateX(180deg)'
846
843
  }
847
- }))), line.selected && /*#__PURE__*/_react["default"].createElement("g", {
844
+ })), line.selected && /*#__PURE__*/_react["default"].createElement("g", {
848
845
  id: 'remove-button',
849
846
  key: 2,
850
847
  transform: "translate(".concat(x1 + 10, ", ").concat(y1, ")"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "1.1.1-test.80",
3
+ "version": "1.1.1-test.83",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -1,58 +0,0 @@
1
- import { LOGIN_SUCCESS, LOGIN_ERROR, LOGOUT, SET_USER_DATA, LOCAL_STORAGE_TOKEN_VALUE, LOCAL_STORAGE_ORIGINAL_TOKEN, LOCAL_STORAGE_TOKEN_NAME } from "../constants";
2
- import jwtService from "../components/login/jwtService";
3
- import history from "../@history";
4
- import ls from 'localstorage-slim';
5
- export function submitLogin(values) {
6
- jwtService.signInWithEmailAndPassword(values).then(function (response) {
7
- console.log(response);
8
- if (response.data.user) {
9
- setUser(response.data.user);
10
- setSession(response.data.token);
11
- return {
12
- type: LOGIN_SUCCESS,
13
- user: response.data.user
14
- };
15
- }
16
- })["catch"](function (error) {
17
- return {
18
- type: LOGIN_ERROR,
19
- payload: error
20
- };
21
- });
22
- }
23
- export function logout() {
24
- jwtService.logout();
25
- history.push({
26
- pathname: '/login'
27
- });
28
- return {
29
- type: LOGOUT
30
- };
31
- }
32
- export function login(userid, role, token, utmObj) {
33
- var projectId = sessionStorage.getItem('projectId');
34
- if (projectId === null) projectId = 'new';
35
- var utm = new URLSearchParams(Object.entries(utmObj));
36
- var visualizerName = sessionStorage.getItem('visualizerName');
37
- var originalAccessToken = ls.get(LOCAL_STORAGE_ORIGINAL_TOKEN);
38
- var tokenName = ls.get(LOCAL_STORAGE_TOKEN_NAME);
39
- var extraParams = '';
40
- if (tokenName && originalAccessToken) {
41
- extraParams = "&".concat(tokenName).concat(originalAccessToken);
42
- }
43
- history.push({
44
- pathname: "/".concat(visualizerName, "/project/").concat(role, "/").concat(token, "/").concat(projectId, "?").concat(utm.toString()).concat(extraParams)
45
- });
46
- return {
47
- type: LOGIN_SUCCESS,
48
- userid: userid
49
- };
50
- }
51
- export function setUserData(user) {
52
- return function (dispatch) {
53
- dispatch({
54
- type: SET_USER_DATA,
55
- payload: user
56
- });
57
- };
58
- }
@@ -1,68 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.login = login;
8
- exports.logout = logout;
9
- exports.setUserData = setUserData;
10
- exports.submitLogin = submitLogin;
11
- var _constants = require("../constants");
12
- var _jwtService = _interopRequireDefault(require("../components/login/jwtService"));
13
- var _history = _interopRequireDefault(require("../@history"));
14
- var _localstorageSlim = _interopRequireDefault(require("localstorage-slim"));
15
- function submitLogin(values) {
16
- _jwtService["default"].signInWithEmailAndPassword(values).then(function (response) {
17
- console.log(response);
18
- if (response.data.user) {
19
- setUser(response.data.user);
20
- setSession(response.data.token);
21
- return {
22
- type: _constants.LOGIN_SUCCESS,
23
- user: response.data.user
24
- };
25
- }
26
- })["catch"](function (error) {
27
- return {
28
- type: _constants.LOGIN_ERROR,
29
- payload: error
30
- };
31
- });
32
- }
33
- function logout() {
34
- _jwtService["default"].logout();
35
- _history["default"].push({
36
- pathname: '/login'
37
- });
38
- return {
39
- type: _constants.LOGOUT
40
- };
41
- }
42
- function login(userid, role, token, utmObj) {
43
- var projectId = sessionStorage.getItem('projectId');
44
- if (projectId === null) projectId = 'new';
45
- var utm = new URLSearchParams(Object.entries(utmObj));
46
- var visualizerName = sessionStorage.getItem('visualizerName');
47
- var originalAccessToken = _localstorageSlim["default"].get(_constants.LOCAL_STORAGE_ORIGINAL_TOKEN);
48
- var tokenName = _localstorageSlim["default"].get(_constants.LOCAL_STORAGE_TOKEN_NAME);
49
- var extraParams = '';
50
- if (tokenName && originalAccessToken) {
51
- extraParams = "&".concat(tokenName).concat(originalAccessToken);
52
- }
53
- _history["default"].push({
54
- pathname: "/".concat(visualizerName, "/project/").concat(role, "/").concat(token, "/").concat(projectId, "?").concat(utm.toString()).concat(extraParams)
55
- });
56
- return {
57
- type: _constants.LOGIN_SUCCESS,
58
- userid: userid
59
- };
60
- }
61
- function setUserData(user) {
62
- return function (dispatch) {
63
- dispatch({
64
- type: _constants.SET_USER_DATA,
65
- payload: user
66
- });
67
- };
68
- }