hart-estate-widget 1.0.1 → 1.1.3
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/README.md +144 -4
- package/build/widget.bundle.js +2 -0
- package/build/widget.bundle.js.LICENSE.txt +43 -0
- package/build/widget.module.js +2 -0
- package/build/widget.module.js.LICENSE.txt +43 -0
- package/package.json +42 -37
- package/build/Application.js +0 -107
- package/build/Widget.js +0 -44
- package/build/assets/img/3D.jpg +0 -0
- package/build/assets/img/refresh-icon.svg +0 -6
- package/build/assets/sass/components/instructions.sass +0 -50
- package/build/assets/sass/components/tabs.sass +0 -117
- package/build/assets/sass/index.sass +0 -45
- package/build/assets/sass/vars.sass +0 -15
- package/build/components/ImageTab.js +0 -20
- package/build/components/Instructions.js +0 -33
- package/build/components/RotationTab.js +0 -66
- package/build/components/TabPanes.js +0 -90
- package/build/components/TabWrapper.js +0 -38
- package/build/defaultConfig.js +0 -20
- package/build/index.js +0 -13
- package/build/lib/threesixty/events.js +0 -193
- package/build/lib/threesixty/index.js +0 -236
- package/build/store/index.js +0 -31
@@ -0,0 +1,43 @@
|
|
1
|
+
/*
|
2
|
+
object-assign
|
3
|
+
(c) Sindre Sorhus
|
4
|
+
@license MIT
|
5
|
+
*/
|
6
|
+
|
7
|
+
/** @license React v0.20.2
|
8
|
+
* scheduler.production.min.js
|
9
|
+
*
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
11
|
+
*
|
12
|
+
* This source code is licensed under the MIT license found in the
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
14
|
+
*/
|
15
|
+
|
16
|
+
/** @license React v16.13.1
|
17
|
+
* react-is.production.min.js
|
18
|
+
*
|
19
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
20
|
+
*
|
21
|
+
* This source code is licensed under the MIT license found in the
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
23
|
+
*/
|
24
|
+
|
25
|
+
/** @license React v17.0.2
|
26
|
+
* react-dom.production.min.js
|
27
|
+
*
|
28
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
29
|
+
*
|
30
|
+
* This source code is licensed under the MIT license found in the
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
32
|
+
*/
|
33
|
+
|
34
|
+
/** @license React v17.0.2
|
35
|
+
* react.production.min.js
|
36
|
+
*
|
37
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
38
|
+
*
|
39
|
+
* This source code is licensed under the MIT license found in the
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
41
|
+
*/
|
42
|
+
|
43
|
+
//!\ DECLARE ALIAS AFTER assign prototype !
|
package/package.json
CHANGED
@@ -3,59 +3,64 @@
|
|
3
3
|
"description": "HART Estate widget",
|
4
4
|
"author": "HART",
|
5
5
|
"keywords": [
|
6
|
-
"
|
7
|
-
"hart",
|
6
|
+
"estate",
|
8
7
|
"widget",
|
9
|
-
"
|
8
|
+
"hart"
|
10
9
|
],
|
11
|
-
"
|
10
|
+
"sideEffects": [
|
11
|
+
"*.sass"
|
12
|
+
],
|
13
|
+
"version": "1.1.3",
|
12
14
|
"private": false,
|
13
|
-
"main": "build/
|
14
|
-
"module": "build/
|
15
|
+
"main": "build/widget.module.js",
|
16
|
+
"module": "build/widget.module.js",
|
15
17
|
"files": [
|
16
18
|
"build",
|
17
19
|
"README.md"
|
18
20
|
],
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"url": "https://gitlab.myhart.ru/hart_estate/hart-estate-widget"
|
21
|
+
"engines": {
|
22
|
+
"node": "^16.13.1"
|
22
23
|
},
|
23
24
|
"scripts": {
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"
|
28
|
-
},
|
29
|
-
"dependencies": {
|
30
|
-
"@babel/polyfill": "^7.12.1",
|
31
|
-
"mobx": "^6.3.13",
|
32
|
-
"mobx-react-lite": "^3.2.3",
|
33
|
-
"panzoom": "^9.4.2",
|
34
|
-
"react": "^17.0.2",
|
35
|
-
"react-dom": "^17.0.2",
|
36
|
-
"react-scripts": "^5.0.0"
|
25
|
+
"cleanup": "rm -rf build",
|
26
|
+
"start": "npm run cleanup && webpack-dev-server --config webpack-development.config.js",
|
27
|
+
"build": "npm run cleanup && webpack --config webpack-production.config.js",
|
28
|
+
"local-tunnel": "Lt --port 9000 --subdomain estate-widget --local-host localhost"
|
37
29
|
},
|
38
30
|
"devDependencies": {
|
39
|
-
"@babel/cli": "^7.17.0",
|
40
31
|
"@babel/core": "^7.17.0",
|
41
32
|
"@babel/eslint-parser": "^7.16.3",
|
33
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
34
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
42
35
|
"@babel/preset-env": "^7.16.11",
|
36
|
+
"@babel/preset-react": "^7.18.6",
|
37
|
+
"babel-loader": "^8.2.5",
|
38
|
+
"css-loader": "^6.6.0",
|
43
39
|
"eslint": "^8.0.0",
|
44
40
|
"eslint-config-react-app": "^7.0.0",
|
45
41
|
"eslint-plugin-react": "^7.28.0",
|
46
|
-
"
|
47
|
-
"sass": "^1.46.0"
|
42
|
+
"path": "^0.12.7",
|
43
|
+
"sass": "^1.46.0",
|
44
|
+
"sass-loader": "^12.4.0",
|
45
|
+
"style-loader": "^3.3.1",
|
46
|
+
"webpack": "^5.74.0",
|
47
|
+
"webpack-cli": "^4.10.0",
|
48
|
+
"webpack-dev-server": "^4.7.4",
|
49
|
+
"@fontsource/roboto-mono": "^4.5.8",
|
50
|
+
"geometric": "^2.2.10",
|
51
|
+
"mobx": "^6.3.13",
|
52
|
+
"mobx-react-lite": "^3.2.3",
|
53
|
+
"panolens": "^0.12.1",
|
54
|
+
"panzoom": "^9.4.2",
|
55
|
+
"react": "^17.0.2",
|
56
|
+
"react-dom": "^17.0.2",
|
57
|
+
"react-select": "^5.7.2",
|
58
|
+
"screenfull": "^6.0.1",
|
59
|
+
"ua-parser-js": "^1.0.2"
|
48
60
|
},
|
49
|
-
"browserslist":
|
50
|
-
"
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
],
|
55
|
-
"development": [
|
56
|
-
"last 1 chrome version",
|
57
|
-
"last 1 firefox version",
|
58
|
-
"last 1 safari version"
|
59
|
-
]
|
60
|
-
}
|
61
|
+
"browserslist": [
|
62
|
+
">0.2%",
|
63
|
+
"not dead",
|
64
|
+
"not op_mini all"
|
65
|
+
]
|
61
66
|
}
|
package/build/Application.js
DELETED
@@ -1,107 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
9
|
-
|
10
|
-
var _react = require("react");
|
11
|
-
|
12
|
-
var _mobxReactLite = require("mobx-react-lite");
|
13
|
-
|
14
|
-
var _store = _interopRequireDefault(require("store"));
|
15
|
-
|
16
|
-
var _TabPanes = _interopRequireDefault(require("components/TabPanes"));
|
17
|
-
|
18
|
-
var _ImageTab = _interopRequireDefault(require("components/ImageTab"));
|
19
|
-
|
20
|
-
var _RotationTab = _interopRequireDefault(require("components/RotationTab"));
|
21
|
-
|
22
|
-
var _TabWrapper = _interopRequireDefault(require("components/TabWrapper"));
|
23
|
-
|
24
|
-
var _D = _interopRequireDefault(require("assets/img/3D.jpg"));
|
25
|
-
|
26
|
-
var _react2 = require("react/cjs/react.development");
|
27
|
-
|
28
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
29
|
-
|
30
|
-
const Application = (0, _mobxReactLite.observer)(_ref => {
|
31
|
-
let {
|
32
|
-
width,
|
33
|
-
height
|
34
|
-
} = _ref;
|
35
|
-
const {
|
36
|
-
config
|
37
|
-
} = _store.default;
|
38
|
-
const [currentTab, setCurrentTab] = (0, _react.useState)(config.tabs[0]);
|
39
|
-
const [isTabPanesVisible, setTabPanesState] = (0, _react.useState)(true);
|
40
|
-
|
41
|
-
const showTabPanes = () => setTabPanesState(true);
|
42
|
-
|
43
|
-
const hideTabPanes = () => setTabPanesState(false);
|
44
|
-
|
45
|
-
const tabsList = {
|
46
|
-
'planImage': /*#__PURE__*/React.createElement(_ImageTab.default, {
|
47
|
-
image: config.planImage
|
48
|
-
}),
|
49
|
-
'topView': /*#__PURE__*/React.createElement(_ImageTab.default, {
|
50
|
-
image: config.topView
|
51
|
-
}),
|
52
|
-
'topDownView': /*#__PURE__*/React.createElement(_ImageTab.default, {
|
53
|
-
image: config.topDownView
|
54
|
-
}),
|
55
|
-
'rotation': /*#__PURE__*/React.createElement(_TabWrapper.default, {
|
56
|
-
isActive: !isTabPanesVisible,
|
57
|
-
image: config.rotationImages[0],
|
58
|
-
title: "360\xB0 overview",
|
59
|
-
text: ['Use mouse to rotate', 'Shift + LMB to move'],
|
60
|
-
onStart: hideTabPanes
|
61
|
-
}, /*#__PURE__*/React.createElement(_RotationTab.default, {
|
62
|
-
images: config.rotationImages
|
63
|
-
})),
|
64
|
-
'panorama': /*#__PURE__*/React.createElement(_TabWrapper.default, {
|
65
|
-
isActive: !isTabPanesVisible,
|
66
|
-
image: config.panoramaImages[0],
|
67
|
-
title: "Panoramic tour",
|
68
|
-
text: ['Use mouse to rotate', 'To move through the rooms, click on the layout thumbnail'],
|
69
|
-
onStart: hideTabPanes
|
70
|
-
}, /*#__PURE__*/React.createElement("p", null, "Work in progress")),
|
71
|
-
'model': /*#__PURE__*/React.createElement(_TabWrapper.default, {
|
72
|
-
isActive: !isTabPanesVisible,
|
73
|
-
image: _D.default,
|
74
|
-
title: "3D Model",
|
75
|
-
text: ['Use mouse to rotate', 'Use the right mouse button to move'],
|
76
|
-
onStart: hideTabPanes
|
77
|
-
}, /*#__PURE__*/React.createElement("p", null, "Work in progress"))
|
78
|
-
};
|
79
|
-
const appStyle = {
|
80
|
-
width,
|
81
|
-
height
|
82
|
-
};
|
83
|
-
|
84
|
-
const setWindowHeight = () => {
|
85
|
-
document.querySelector('.widget-application').style.setProperty('--vh', window.innerHeight / 100 + 'px');
|
86
|
-
};
|
87
|
-
|
88
|
-
(0, _react2.useEffect)(() => {
|
89
|
-
window.addEventListener('resize', setWindowHeight);
|
90
|
-
setWindowHeight();
|
91
|
-
}, []);
|
92
|
-
return /*#__PURE__*/React.createElement("main", {
|
93
|
-
className: "widget-application",
|
94
|
-
style: appStyle
|
95
|
-
}, /*#__PURE__*/React.createElement("section", {
|
96
|
-
className: "widget-tab widget-tab--".concat(currentTab, " widget-tab--panes-").concat(config.tabPanes ? 'visible' : 'hidden')
|
97
|
-
}, tabsList[currentTab]), config.tabPanes && isTabPanesVisible && /*#__PURE__*/React.createElement(_TabPanes.default, {
|
98
|
-
currentTab: currentTab,
|
99
|
-
setCurrentTab: setCurrentTab
|
100
|
-
}), config.tabPanes && !isTabPanesVisible && /*#__PURE__*/React.createElement("button", {
|
101
|
-
type: "button",
|
102
|
-
className: "widget-close",
|
103
|
-
onClick: showTabPanes
|
104
|
-
}, "Exit"));
|
105
|
-
});
|
106
|
-
var _default = Application;
|
107
|
-
exports.default = _default;
|
package/build/Widget.js
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
require("core-js/modules/es.object.assign.js");
|
9
|
-
|
10
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
11
|
-
|
12
|
-
var _store = _interopRequireDefault(require("./store"));
|
13
|
-
|
14
|
-
var _Application = _interopRequireDefault(require("./Application"));
|
15
|
-
|
16
|
-
var _defaultConfig = _interopRequireDefault(require("./defaultConfig"));
|
17
|
-
|
18
|
-
require("./assets/sass/index.sass");
|
19
|
-
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
|
-
|
22
|
-
class Widget {
|
23
|
-
constructor() {
|
24
|
-
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
25
|
-
const config = Object.assign(_defaultConfig.default, options);
|
26
|
-
const {
|
27
|
-
container
|
28
|
-
} = config;
|
29
|
-
const widgetContainer = document.getElementById(container);
|
30
|
-
if (!widgetContainer) throw new Error("\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043D\u0430\u0439\u0442\u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442: #".concat(container));
|
31
|
-
config.containerElement = widgetContainer;
|
32
|
-
|
33
|
-
_store.default.setConfig(config);
|
34
|
-
|
35
|
-
_reactDom.default.render( /*#__PURE__*/React.createElement(_Application.default, {
|
36
|
-
width: config.width,
|
37
|
-
height: config.height
|
38
|
-
}), widgetContainer);
|
39
|
-
}
|
40
|
-
|
41
|
-
}
|
42
|
-
|
43
|
-
var _default = Widget;
|
44
|
-
exports.default = _default;
|
package/build/assets/img/3D.jpg
DELETED
Binary file
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 438.529 438.528">
|
2
|
-
<g>
|
3
|
-
<path d="M433.109,23.694c-3.614-3.612-7.898-5.424-12.848-5.424c-4.948,0-9.226,1.812-12.847,5.424l-37.113,36.835 c-20.365-19.226-43.684-34.123-69.948-44.684C274.091,5.283,247.056,0.003,219.266,0.003c-52.344,0-98.022,15.843-137.042,47.536 C43.203,79.228,17.509,120.574,5.137,171.587v1.997c0,2.474,0.903,4.617,2.712,6.423c1.809,1.809,3.949,2.712,6.423,2.712h56.814 c4.189,0,7.042-2.19,8.566-6.565c7.993-19.032,13.035-30.166,15.131-33.403c13.322-21.698,31.023-38.734,53.103-51.106 c22.082-12.371,45.873-18.559,71.376-18.559c38.261,0,71.473,13.039,99.645,39.115l-39.406,39.397 c-3.607,3.617-5.421,7.902-5.421,12.851c0,4.948,1.813,9.231,5.421,12.847c3.621,3.617,7.905,5.424,12.854,5.424h127.906 c4.949,0,9.233-1.807,12.848-5.424c3.613-3.616,5.42-7.898,5.42-12.847V36.542C438.529,31.593,436.733,27.312,433.109,23.694z" fill="#FAD436"></path>
|
4
|
-
<path d="M422.253,255.813h-54.816c-4.188,0-7.043,2.187-8.562,6.566c-7.99,19.034-13.038,30.163-15.129,33.4 c-13.326,21.693-31.028,38.735-53.102,51.106c-22.083,12.375-45.874,18.556-71.378,18.556c-18.461,0-36.259-3.423-53.387-10.273 c-17.13-6.858-32.454-16.567-45.966-29.13l39.115-39.112c3.615-3.613,5.424-7.901,5.424-12.847c0-4.948-1.809-9.236-5.424-12.847 c-3.617-3.62-7.898-5.431-12.847-5.431H18.274c-4.952,0-9.235,1.811-12.851,5.431C1.807,264.844,0,269.132,0,274.08v127.907 c0,4.945,1.807,9.232,5.424,12.847c3.619,3.61,7.902,5.428,12.851,5.428c4.948,0,9.229-1.817,12.847-5.428l36.829-36.833 c20.367,19.41,43.542,34.355,69.523,44.823c25.981,10.472,52.866,15.701,80.653,15.701c52.155,0,97.643-15.845,136.471-47.534 c38.828-31.688,64.333-73.042,76.52-124.05c0.191-0.38,0.281-1.047,0.281-1.995c0-2.478-0.907-4.612-2.715-6.427 C426.874,256.72,424.731,255.813,422.253,255.813z" fill="#FAD436"></path>
|
5
|
-
</g>
|
6
|
-
</svg>
|
@@ -1,50 +0,0 @@
|
|
1
|
-
@import '../vars'
|
2
|
-
|
3
|
-
.widget-application
|
4
|
-
.widget-instructions
|
5
|
-
position: absolute
|
6
|
-
z-index: 2
|
7
|
-
left: 0
|
8
|
-
top: 0
|
9
|
-
width: 100%
|
10
|
-
height: 100%
|
11
|
-
display: flex
|
12
|
-
align-items: center
|
13
|
-
justify-content: center
|
14
|
-
background-color: rgba(0, 0, 0, 0.3)
|
15
|
-
&__content
|
16
|
-
display: flex
|
17
|
-
flex-direction: column
|
18
|
-
align-items: flex-start
|
19
|
-
justify-content: flex-start
|
20
|
-
background-color: $white
|
21
|
-
box-shadow: 1px 1px 10px rgb(0 0 0 / 50%)
|
22
|
-
border-radius: 5px
|
23
|
-
overflow: hidden
|
24
|
-
width: 350px
|
25
|
-
&__head
|
26
|
-
width: 100%
|
27
|
-
padding: 10px
|
28
|
-
border-bottom: 1px solid #d1d1d1
|
29
|
-
color: rgba(74, 74, 74, .7)
|
30
|
-
text-align: center
|
31
|
-
font-size: .8rem
|
32
|
-
&__body
|
33
|
-
width: 100%
|
34
|
-
padding: 10px
|
35
|
-
text-align: center
|
36
|
-
font-size: .7rem
|
37
|
-
p
|
38
|
-
margin: 10px 0
|
39
|
-
&__footer
|
40
|
-
width: 100%
|
41
|
-
button
|
42
|
-
width: 100%
|
43
|
-
background-color: $mainColor
|
44
|
-
font-size: .8rem
|
45
|
-
font-weight: 500
|
46
|
-
text-align: center
|
47
|
-
color: #000000
|
48
|
-
cursor: pointer
|
49
|
-
border: none
|
50
|
-
padding: 10px 5px
|
@@ -1,117 +0,0 @@
|
|
1
|
-
@import '../vars'
|
2
|
-
|
3
|
-
.widget-application
|
4
|
-
.widget-tab
|
5
|
-
width: 100%
|
6
|
-
height: 100%
|
7
|
-
display: flex
|
8
|
-
align-items: center
|
9
|
-
justify-content: center
|
10
|
-
padding: 60px 30px 125px 30px
|
11
|
-
@media (max-width: 630px)
|
12
|
-
padding: 60px 15px 90px 15px
|
13
|
-
&--panes-hidden
|
14
|
-
padding: 60px 30px
|
15
|
-
&__image
|
16
|
-
max-width: 100%
|
17
|
-
max-height: 100%
|
18
|
-
object-fit: contain
|
19
|
-
display: block
|
20
|
-
&__threesixty
|
21
|
-
width: 100%
|
22
|
-
height: 100%
|
23
|
-
touch-action: none
|
24
|
-
-webkit-touch-action: none
|
25
|
-
&-container
|
26
|
-
width: 100% !important
|
27
|
-
height: 100% !important
|
28
|
-
position: relative
|
29
|
-
cursor: move
|
30
|
-
background-image: none !important
|
31
|
-
img
|
32
|
-
position: absolute
|
33
|
-
left: 50%
|
34
|
-
top: 50%
|
35
|
-
transform: translate(-50%, -50%)
|
36
|
-
max-width: 100%
|
37
|
-
max-height: 100%
|
38
|
-
object-fit: contain
|
39
|
-
@include noSelect
|
40
|
-
&--panorama,
|
41
|
-
&--model
|
42
|
-
.widget-tab__image
|
43
|
-
position: absolute
|
44
|
-
z-index: 1
|
45
|
-
left: 0
|
46
|
-
top: 0
|
47
|
-
width: 100%
|
48
|
-
height: 100%
|
49
|
-
object-fit: cover
|
50
|
-
|
51
|
-
.widget-tab-panes
|
52
|
-
position: absolute
|
53
|
-
z-index: 3
|
54
|
-
left: 50%
|
55
|
-
bottom: 5px
|
56
|
-
max-width: 100%
|
57
|
-
padding: 0 30px 15px 30px
|
58
|
-
transform: translateX(-50%)
|
59
|
-
display: flex
|
60
|
-
align-items: center
|
61
|
-
justify-content: flex-start
|
62
|
-
overflow-x: auto
|
63
|
-
@media (max-width: 630px)
|
64
|
-
padding: 0 15px 15px 15px
|
65
|
-
.widget-tab-pane
|
66
|
-
width: 85px
|
67
|
-
height: 85px
|
68
|
-
border-radius: 5px
|
69
|
-
margin: 0 10px
|
70
|
-
background-color: $lightGray
|
71
|
-
cursor: pointer
|
72
|
-
border-width: 3px
|
73
|
-
border-style: solid
|
74
|
-
border-color: $lightGray
|
75
|
-
overflow: hidden
|
76
|
-
display: flex
|
77
|
-
align-items: center
|
78
|
-
justify-content: center
|
79
|
-
flex: none
|
80
|
-
transition: border .3s ease
|
81
|
-
position: relative
|
82
|
-
@include noSelect
|
83
|
-
@media (max-width: 630px)
|
84
|
-
width: 50px
|
85
|
-
height: 50px
|
86
|
-
margin: 0 5px
|
87
|
-
&::before
|
88
|
-
content: ''
|
89
|
-
position: absolute
|
90
|
-
left: 0
|
91
|
-
top: 0
|
92
|
-
width: 100%
|
93
|
-
height: 100%
|
94
|
-
box-shadow: inset 1px 1px 10px rgb(0 0 0 / 30%)
|
95
|
-
&--active,
|
96
|
-
&:hover
|
97
|
-
border-color: $mainColor
|
98
|
-
&__image
|
99
|
-
width: 100%
|
100
|
-
height: 100%
|
101
|
-
object-fit: cover
|
102
|
-
object-position: center
|
103
|
-
display: block
|
104
|
-
&__icon
|
105
|
-
width: 16px
|
106
|
-
height: 16px
|
107
|
-
object-fit: contain
|
108
|
-
object-position: center
|
109
|
-
display: block
|
110
|
-
position: absolute
|
111
|
-
left: 10px
|
112
|
-
bottom: 8px
|
113
|
-
@media (max-width: 630px)
|
114
|
-
width: 12px
|
115
|
-
height: 12px
|
116
|
-
left: 5px
|
117
|
-
bottom: 3px
|
@@ -1,45 +0,0 @@
|
|
1
|
-
@import './vars'
|
2
|
-
|
3
|
-
*, *:before, *:after
|
4
|
-
box-sizing: border-box
|
5
|
-
-webkit-box-sizing: border-box
|
6
|
-
margin: 0
|
7
|
-
padding: 0
|
8
|
-
-webkit-font-smoothing: antialiased
|
9
|
-
-moz-osx-font-smoothing: grayscale
|
10
|
-
outline: none
|
11
|
-
font-family: 'Lato', sans-serif
|
12
|
-
font-weight: 400
|
13
|
-
text-decoration: none
|
14
|
-
|
15
|
-
html, body
|
16
|
-
font-size: 20px
|
17
|
-
|
18
|
-
.widget-application
|
19
|
-
--vh: 100vh
|
20
|
-
|
21
|
-
width: 100%
|
22
|
-
height: calc(100 * var(--vh))
|
23
|
-
overflow: hidden
|
24
|
-
position: relative
|
25
|
-
z-index: 1
|
26
|
-
.widget-close
|
27
|
-
position: absolute
|
28
|
-
display: flex
|
29
|
-
align-items: center
|
30
|
-
justify-content: center
|
31
|
-
z-index: 3
|
32
|
-
right: 15px
|
33
|
-
top: 15px
|
34
|
-
color: $black
|
35
|
-
background-color: $mainColor
|
36
|
-
padding: 5px 15px
|
37
|
-
border-radius: 10px
|
38
|
-
font-size: .8rem
|
39
|
-
border: none
|
40
|
-
cursor: pointer
|
41
|
-
&:hover
|
42
|
-
box-shadow: 1px 1px 10px rgb(0 0 0 / 15%)
|
43
|
-
|
44
|
-
@import './components/tabs'
|
45
|
-
@import './components/instructions'
|
@@ -1,15 +0,0 @@
|
|
1
|
-
$mobile: "only screen and (max-width: 545px)"
|
2
|
-
$tablet: "only screen and (max-width: 900px)"
|
3
|
-
$laptop: "only screen and (max-width: 1440px)"
|
4
|
-
$desktop: "only screen and (min-width: 1441px)"
|
5
|
-
|
6
|
-
$white: #FFFFFF
|
7
|
-
$black: #000000
|
8
|
-
$lightGray: #F4F7F7
|
9
|
-
$mainColor: #FAD436
|
10
|
-
|
11
|
-
@mixin noSelect
|
12
|
-
user-select: none
|
13
|
-
-webkit-user-select: none
|
14
|
-
user-drag: none
|
15
|
-
-webkit-user-drag: none
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
const ImageTab = _ref => {
|
9
|
-
let {
|
10
|
-
image
|
11
|
-
} = _ref;
|
12
|
-
return /*#__PURE__*/React.createElement("img", {
|
13
|
-
className: "widget-tab__image",
|
14
|
-
src: image,
|
15
|
-
alt: "plan-view"
|
16
|
-
});
|
17
|
-
};
|
18
|
-
|
19
|
-
var _default = ImageTab;
|
20
|
-
exports.default = _default;
|
@@ -1,33 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
const Instructions = _ref => {
|
9
|
-
let {
|
10
|
-
title,
|
11
|
-
text,
|
12
|
-
onClick
|
13
|
-
} = _ref;
|
14
|
-
return /*#__PURE__*/React.createElement("div", {
|
15
|
-
className: "widget-instructions"
|
16
|
-
}, /*#__PURE__*/React.createElement("div", {
|
17
|
-
className: "widget-instructions__content"
|
18
|
-
}, /*#__PURE__*/React.createElement("div", {
|
19
|
-
className: "widget-instructions__head"
|
20
|
-
}, title), /*#__PURE__*/React.createElement("div", {
|
21
|
-
className: "widget-instructions__body"
|
22
|
-
}, text.map((row, index) => /*#__PURE__*/React.createElement("p", {
|
23
|
-
key: index
|
24
|
-
}, row))), /*#__PURE__*/React.createElement("div", {
|
25
|
-
className: "widget-instructions__footer"
|
26
|
-
}, /*#__PURE__*/React.createElement("button", {
|
27
|
-
onClick: onClick,
|
28
|
-
type: "button"
|
29
|
-
}, "Start"))));
|
30
|
-
};
|
31
|
-
|
32
|
-
var _default = Instructions;
|
33
|
-
exports.default = _default;
|
@@ -1,66 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
9
|
-
|
10
|
-
var _react = require("react");
|
11
|
-
|
12
|
-
var _threesixty = _interopRequireDefault(require("lib/threesixty"));
|
13
|
-
|
14
|
-
var _panzoom = _interopRequireDefault(require("panzoom"));
|
15
|
-
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
|
-
|
18
|
-
const RotationTab = _ref => {
|
19
|
-
let {
|
20
|
-
images
|
21
|
-
} = _ref;
|
22
|
-
const [activeIndex, setActiveIndex] = (0, _react.useState)(0);
|
23
|
-
(0, _react.useEffect)(() => {
|
24
|
-
const container = document.querySelector('.widget-tab__threesixty-container');
|
25
|
-
const widgetTab = document.querySelector('.widget-tab');
|
26
|
-
const rotation = new _threesixty.default(container, {
|
27
|
-
image: images.map(img => img),
|
28
|
-
parentElement: widgetTab,
|
29
|
-
inverted: true
|
30
|
-
});
|
31
|
-
|
32
|
-
rotation._update = () => setActiveIndex(rotation.index);
|
33
|
-
|
34
|
-
let lastIndex = 0;
|
35
|
-
const controller = (0, _panzoom.default)(container, {
|
36
|
-
maxZoom: 3,
|
37
|
-
minZoom: 0.5,
|
38
|
-
beforeMouseDown: e => !e.shiftKey
|
39
|
-
});
|
40
|
-
controller.on('panstart', () => {
|
41
|
-
lastIndex = rotation.index;
|
42
|
-
|
43
|
-
rotation._update = () => {};
|
44
|
-
});
|
45
|
-
controller.on('panend', () => {
|
46
|
-
rotation.goto(lastIndex);
|
47
|
-
|
48
|
-
rotation._update = () => setActiveIndex(rotation.index);
|
49
|
-
});
|
50
|
-
}, [images]);
|
51
|
-
return /*#__PURE__*/React.createElement("div", {
|
52
|
-
className: "widget-tab__threesixty"
|
53
|
-
}, /*#__PURE__*/React.createElement("div", {
|
54
|
-
className: "widget-tab__threesixty-container"
|
55
|
-
}, images.map((img, index) => /*#__PURE__*/React.createElement("img", {
|
56
|
-
src: img,
|
57
|
-
key: index,
|
58
|
-
alt: "rotation-view-".concat(index),
|
59
|
-
style: {
|
60
|
-
opacity: activeIndex === index ? 1 : 0
|
61
|
-
}
|
62
|
-
}))));
|
63
|
-
};
|
64
|
-
|
65
|
-
var _default = RotationTab;
|
66
|
-
exports.default = _default;
|