hart-estate-widget 0.0.41 → 0.0.42
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 +16 -4
- package/build/assets/fonts/RobotoMono/RobotoMono-Bold.eot +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Bold.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Bold.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Bold.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-BoldItalic.eot +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-BoldItalic.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-BoldItalic.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-BoldItalic.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Italic.eot +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Italic.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Italic.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Italic.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Light.eot +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Light.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Light.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Light.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-LightItalic.eot +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-LightItalic.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-LightItalic.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-LightItalic.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Medium.eot +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Medium.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Medium.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Medium.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-MediumItalic.eot +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-MediumItalic.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-MediumItalic.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-MediumItalic.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Regular.eot +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Regular.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Regular.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Regular.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Thin.eot +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Thin.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Thin.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Thin.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono.css +108 -0
- package/build/assets/icons/1x.svg +4 -0
- package/build/assets/icons/2x.svg +4 -0
- package/build/assets/icons/bullet.png +0 -0
- package/build/assets/icons/close.svg +4 -0
- package/build/assets/icons/enter-fullscreen.svg +6 -0
- package/build/assets/icons/hand-move.svg +15 -0
- package/build/assets/icons/hand-research.svg +12 -0
- package/build/assets/icons/rotation-close.svg +6 -0
- package/build/assets/icons/rotation.svg +4 -0
- package/build/assets/img/logo.svg +11 -0
- package/build/assets/sass/components/instructions.sass +51 -33
- package/build/assets/sass/components/model.sass +1 -0
- package/build/assets/sass/components/panorama.sass +95 -31
- package/build/assets/sass/components/tabs.sass +90 -91
- package/build/assets/sass/index.sass +45 -2
- package/build/assets/sass/mixin.sass +12 -0
- package/build/assets/sass/vars.sass +4 -1
- package/build/components/Application.js +48 -71
- package/build/components/Buttons/FullScreenButton.js +46 -0
- package/build/components/Buttons/TabButton.js +26 -0
- package/build/components/Instructions.js +26 -15
- package/build/components/ModelTab.js +62 -39
- package/build/components/PanoramaTab.js +262 -161
- package/build/components/RotationTab.js +40 -10
- package/build/config/defaultConfig.js +5 -2
- package/build/enums/deviceOrientationStatus.js +11 -0
- package/build/enums/imageExtentions.js +21 -0
- package/build/index.css +1 -1
- package/build/index.css.map +1 -1
- package/build/index.js +4 -12
- package/build/store/fullScreenStore.js +54 -0
- package/build/store/index.js +17 -29
- package/build/utils/panoramaHelpers.js +45 -2
- package/package.json +4 -2
- package/build/components/TabPanes.js +0 -96
- package/build/components/TabWrapper.js +0 -42
@@ -1,17 +1,51 @@
|
|
1
|
+
@import '../mixin'
|
1
2
|
@import '../vars'
|
2
3
|
|
3
4
|
.widget-application
|
5
|
+
.widget-tab-buttons
|
6
|
+
position: absolute
|
7
|
+
z-index: 3
|
8
|
+
right: 44px
|
9
|
+
bottom: 35px
|
10
|
+
display: flex
|
11
|
+
align-items: center
|
12
|
+
justify-content: flex-end
|
13
|
+
@media #{$mobile}
|
14
|
+
right: 20px
|
15
|
+
bottom: 20px
|
16
|
+
.widget-tab-button
|
17
|
+
@include customButton
|
18
|
+
width: 72px
|
19
|
+
height: 72px
|
20
|
+
border-radius: 50%
|
21
|
+
display: flex
|
22
|
+
align-items: center
|
23
|
+
justify-content: center
|
24
|
+
background-color: $gray
|
25
|
+
color: $text-dark
|
26
|
+
font-size: 28px
|
27
|
+
line-height: 120%
|
28
|
+
font-weight: bold
|
29
|
+
margin-left: 40px
|
30
|
+
@media #{$tablet}
|
31
|
+
width: 60px
|
32
|
+
height: 60px
|
33
|
+
font-size: 24px
|
34
|
+
margin-left: 20px
|
35
|
+
@media #{$mobile}
|
36
|
+
margin-left: 10px
|
37
|
+
&--active
|
38
|
+
background-color: $mainColor
|
39
|
+
|
4
40
|
.widget-tab
|
5
41
|
width: 100%
|
6
42
|
height: 100%
|
7
43
|
display: flex
|
8
44
|
align-items: center
|
9
45
|
justify-content: center
|
10
|
-
padding: 60px 30px
|
46
|
+
padding: 60px 30px
|
11
47
|
@media (max-width: 630px)
|
12
|
-
padding: 60px 15px
|
13
|
-
&--panes-hidden
|
14
|
-
padding: 60px 30px
|
48
|
+
padding: 60px 15px
|
15
49
|
&__image
|
16
50
|
max-width: 100%
|
17
51
|
max-height: 100%
|
@@ -22,11 +56,47 @@
|
|
22
56
|
height: 100%
|
23
57
|
touch-action: none
|
24
58
|
-webkit-touch-action: none
|
59
|
+
&-start
|
60
|
+
@include customButton
|
61
|
+
position: absolute
|
62
|
+
left: 50%
|
63
|
+
bottom: 35px
|
64
|
+
transform: translateX(-50%)
|
65
|
+
display: flex
|
66
|
+
align-items: center
|
67
|
+
justify-content: center
|
68
|
+
padding: 0 30px 0 27px
|
69
|
+
background-color: $gray
|
70
|
+
border-radius: 38px
|
71
|
+
height: 72px
|
72
|
+
@media #{$tablet}
|
73
|
+
height: 60px
|
74
|
+
width: 60px
|
75
|
+
padding: 0
|
76
|
+
left: 45px
|
77
|
+
transform: none
|
78
|
+
@media #{$mobile}
|
79
|
+
left: 20px
|
80
|
+
bottom: 20px
|
81
|
+
img
|
82
|
+
display: block
|
83
|
+
margin-right: 20px
|
84
|
+
position: relative
|
85
|
+
top: 2px
|
86
|
+
@media #{$tablet}
|
87
|
+
width: 30px
|
88
|
+
margin-right: 0
|
89
|
+
span
|
90
|
+
font-size: 24px
|
91
|
+
font-weight: bold
|
92
|
+
color: $text-dark
|
93
|
+
text-transform: uppercase
|
94
|
+
@media #{$tablet}
|
95
|
+
display: none
|
25
96
|
&-container
|
26
97
|
width: 100% !important
|
27
98
|
height: 100% !important
|
28
99
|
position: relative
|
29
|
-
cursor: move
|
30
100
|
background-image: none !important
|
31
101
|
img
|
32
102
|
position: absolute
|
@@ -35,18 +105,16 @@
|
|
35
105
|
transform: translate(-50%, -50%)
|
36
106
|
max-width: 100%
|
37
107
|
max-height: 100%
|
108
|
+
width: 600px
|
109
|
+
height: 600px
|
38
110
|
object-fit: contain
|
111
|
+
opacity: 0
|
39
112
|
@include noSelect
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
left: 0
|
46
|
-
top: 0
|
47
|
-
width: 100%
|
48
|
-
height: 100%
|
49
|
-
object-fit: cover
|
113
|
+
&.active
|
114
|
+
opacity: 1
|
115
|
+
&--active
|
116
|
+
.widget-tab__threesixty-container
|
117
|
+
cursor: move
|
50
118
|
|
51
119
|
&-menu
|
52
120
|
position: absolute
|
@@ -77,7 +145,7 @@
|
|
77
145
|
background-color: $mainColor
|
78
146
|
padding: 5px 15px
|
79
147
|
border-radius: 10px
|
80
|
-
font-size: .
|
148
|
+
font-size: .7rem
|
81
149
|
border: none
|
82
150
|
cursor: pointer
|
83
151
|
margin-bottom: 15px
|
@@ -99,85 +167,16 @@
|
|
99
167
|
display: none !important
|
100
168
|
&[type=file]
|
101
169
|
display: none
|
102
|
-
&:hover
|
103
|
-
box-shadow: 1px 1px 10px rgba(0, 0, 0, .15)
|
104
170
|
&:nth-child(1)
|
105
171
|
position: relative
|
106
172
|
&::after
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
margin-left: 10px
|
173
|
+
--bar-width: 2px
|
174
|
+
content: ''
|
175
|
+
width: 20px
|
176
|
+
height: 15px
|
112
177
|
display: block
|
178
|
+
background: repeating-linear-gradient(180deg, $black, $black var(--bar-width), transparentize($black, 1) var(--bar-width), transparentize($black, 1) calc(var(--bar-width) * 3),)
|
113
179
|
position: absolute
|
114
180
|
right: 10px
|
115
181
|
top: 50%
|
116
|
-
|
117
|
-
.widget-tab-panes
|
118
|
-
position: absolute
|
119
|
-
z-index: 3
|
120
|
-
left: 50%
|
121
|
-
bottom: 5px
|
122
|
-
max-width: 100%
|
123
|
-
padding: 0 30px 15px 30px
|
124
|
-
transform: translateX(-50%)
|
125
|
-
display: flex
|
126
|
-
align-items: center
|
127
|
-
justify-content: flex-start
|
128
|
-
overflow-x: auto
|
129
|
-
@media (max-width: 630px)
|
130
|
-
padding: 0 15px 15px 15px
|
131
|
-
.widget-tab-pane
|
132
|
-
width: 85px
|
133
|
-
height: 85px
|
134
|
-
border-radius: 5px
|
135
|
-
margin: 0 10px
|
136
|
-
background-color: $lightGray
|
137
|
-
cursor: pointer
|
138
|
-
border-width: 3px
|
139
|
-
border-style: solid
|
140
|
-
border-color: $lightGray
|
141
|
-
overflow: hidden
|
142
|
-
display: flex
|
143
|
-
align-items: center
|
144
|
-
justify-content: center
|
145
|
-
flex: none
|
146
|
-
transition: border .3s ease
|
147
|
-
position: relative
|
148
|
-
@include noSelect
|
149
|
-
@media (max-width: 630px)
|
150
|
-
width: 50px
|
151
|
-
height: 50px
|
152
|
-
margin: 0 5px
|
153
|
-
&::before
|
154
|
-
content: ''
|
155
|
-
position: absolute
|
156
|
-
left: 0
|
157
|
-
top: 0
|
158
|
-
width: 100%
|
159
|
-
height: 100%
|
160
|
-
box-shadow: inset 1px 1px 10px rgba(0, 0, 0, .3)
|
161
|
-
&--active,
|
162
|
-
&:hover
|
163
|
-
border-color: $mainColor
|
164
|
-
&__image
|
165
|
-
width: 100%
|
166
|
-
height: 100%
|
167
|
-
object-fit: cover
|
168
|
-
object-position: center
|
169
|
-
display: block
|
170
|
-
&__icon
|
171
|
-
width: 16px
|
172
|
-
height: 16px
|
173
|
-
object-fit: contain
|
174
|
-
object-position: center
|
175
|
-
display: block
|
176
|
-
position: absolute
|
177
|
-
left: 10px
|
178
|
-
bottom: 8px
|
179
|
-
@media (max-width: 630px)
|
180
|
-
width: 12px
|
181
|
-
height: 12px
|
182
|
-
left: 5px
|
183
|
-
bottom: 3px
|
182
|
+
transform: translateY(-50%)
|
@@ -1,4 +1,6 @@
|
|
1
|
+
@import '../fonts/RobotoMono/RobotoMono.css'
|
1
2
|
@import './vars'
|
3
|
+
@import './mixin'
|
2
4
|
|
3
5
|
*, *:before, *:after
|
4
6
|
box-sizing: border-box
|
@@ -17,14 +19,55 @@ html, body
|
|
17
19
|
overflow: hidden
|
18
20
|
position: relative
|
19
21
|
z-index: 1
|
22
|
+
background-color: $white
|
20
23
|
|
21
24
|
*, *:before, *:after
|
22
|
-
font-family: '
|
25
|
+
font-family: 'Roboto Mono', sans-serif
|
23
26
|
-webkit-font-smoothing: antialiased
|
24
27
|
-moz-osx-font-smoothing: grayscale
|
25
28
|
outline: none
|
26
|
-
font-weight:
|
29
|
+
font-weight: 700
|
27
30
|
text-decoration: none
|
31
|
+
color: $text-dark
|
32
|
+
|
33
|
+
.widget-logo
|
34
|
+
position: absolute
|
35
|
+
left: 45px
|
36
|
+
top: 30px
|
37
|
+
z-index: 3
|
38
|
+
@media #{$mobile}
|
39
|
+
left: 20px
|
40
|
+
top: 20px
|
41
|
+
img
|
42
|
+
display: block
|
43
|
+
width: 82px
|
44
|
+
height: 82px
|
45
|
+
object-fit: contain
|
46
|
+
object-position: center
|
47
|
+
@media #{$tablet}
|
48
|
+
width: 65px
|
49
|
+
height: 65px
|
50
|
+
|
51
|
+
.widget-enter-fullscreen,
|
52
|
+
.widget-exit-fullscreen
|
53
|
+
position: absolute
|
54
|
+
right: 45px
|
55
|
+
top: 36px
|
56
|
+
z-index: 3
|
57
|
+
@include customButton
|
58
|
+
padding: 10px
|
59
|
+
@media #{$mobile}
|
60
|
+
right: 20px
|
61
|
+
top: 20px
|
62
|
+
img
|
63
|
+
display: block
|
64
|
+
width: 50px
|
65
|
+
height: 50px
|
66
|
+
object-fit: contain
|
67
|
+
object-position: center
|
68
|
+
@media #{$tablet}
|
69
|
+
width: 40px
|
70
|
+
height: 40px
|
28
71
|
|
29
72
|
.widget-close
|
30
73
|
position: absolute
|
@@ -7,15 +7,13 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
require("core-js/modules/web.dom-collections.iterator.js");
|
9
9
|
|
10
|
-
require("core-js/modules/es.promise.js");
|
11
|
-
|
12
10
|
var _react = _interopRequireWildcard(require("react"));
|
13
11
|
|
14
12
|
var _mobxReactLite = require("mobx-react-lite");
|
15
13
|
|
16
14
|
var _store = _interopRequireDefault(require("../store"));
|
17
15
|
|
18
|
-
var
|
16
|
+
var _fullScreenStore = _interopRequireDefault(require("../store/fullScreenStore"));
|
19
17
|
|
20
18
|
var _ImageTab = _interopRequireDefault(require("./ImageTab"));
|
21
19
|
|
@@ -25,9 +23,9 @@ var _PanoramaTab = _interopRequireDefault(require("./PanoramaTab"));
|
|
25
23
|
|
26
24
|
var _ModelTab = _interopRequireDefault(require("./ModelTab"));
|
27
25
|
|
28
|
-
var
|
26
|
+
var _FullScreenButton = _interopRequireDefault(require("./Buttons/FullScreenButton"));
|
29
27
|
|
30
|
-
var
|
28
|
+
var _TabButton = _interopRequireDefault(require("./Buttons/TabButton"));
|
31
29
|
|
32
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
33
31
|
|
@@ -44,33 +42,6 @@ const Application = (0, _mobxReactLite.observer)(_ref => {
|
|
44
42
|
config
|
45
43
|
} = _store.default;
|
46
44
|
const [currentTab, setCurrentTab] = (0, _react.useState)(config.tabs[0]);
|
47
|
-
const [isTabPanesVisible, setTabPanesState] = (0, _react.useState)(true);
|
48
|
-
|
49
|
-
const showTabPanes = () => {
|
50
|
-
setTabPanesState(true);
|
51
|
-
|
52
|
-
_store.default.dispatchEvent('exitComponent');
|
53
|
-
};
|
54
|
-
|
55
|
-
const hideTabPanes = () => {
|
56
|
-
setTabPanesState(false);
|
57
|
-
|
58
|
-
_store.default.dispatchEvent('enterComponent');
|
59
|
-
};
|
60
|
-
|
61
|
-
const openPanorama = async () => {
|
62
|
-
try {
|
63
|
-
if (DeviceOrientationEvent.requestPermission) {
|
64
|
-
await DeviceOrientationEvent.requestPermission();
|
65
|
-
}
|
66
|
-
} catch (e) {
|
67
|
-
console.error(e);
|
68
|
-
console.log('Device motion not allowed');
|
69
|
-
}
|
70
|
-
|
71
|
-
hideTabPanes();
|
72
|
-
};
|
73
|
-
|
74
45
|
const tabsList = {
|
75
46
|
'planImage': /*#__PURE__*/_react.default.createElement(_ImageTab.default, {
|
76
47
|
image: config.planImage,
|
@@ -84,39 +55,28 @@ const Application = (0, _mobxReactLite.observer)(_ref => {
|
|
84
55
|
image: config.topDownView,
|
85
56
|
alt: "top-down-view"
|
86
57
|
}),
|
87
|
-
'rotation': /*#__PURE__*/_react.default.createElement(
|
88
|
-
|
89
|
-
disabled: !config.rotationImages[0]
|
90
|
-
|
91
|
-
|
92
|
-
text: ['Use mouse to rotate', 'Shift + LMB to move'],
|
93
|
-
onStart: hideTabPanes
|
94
|
-
}, /*#__PURE__*/_react.default.createElement(_RotationTab.default, {
|
95
|
-
images: config.rotationImages
|
96
|
-
})),
|
97
|
-
'panorama': /*#__PURE__*/_react.default.createElement(_TabWrapper.default, {
|
98
|
-
isActive: !isTabPanesVisible,
|
99
|
-
disabled: !_store.default.hallRoomImage,
|
100
|
-
image: _store.default.hallRoomImage,
|
101
|
-
title: "Panoramic tour",
|
102
|
-
text: ['Use mouse to rotate', 'To move through the rooms, click on the layout thumbnail'],
|
103
|
-
onStart: openPanorama
|
104
|
-
}, /*#__PURE__*/_react.default.createElement(_PanoramaTab.default, {
|
58
|
+
'rotation': /*#__PURE__*/_react.default.createElement(_RotationTab.default, {
|
59
|
+
images: config.rotationImages,
|
60
|
+
disabled: !config.rotationImages[0]
|
61
|
+
}),
|
62
|
+
'panorama': /*#__PURE__*/_react.default.createElement(_PanoramaTab.default, {
|
105
63
|
json: config.json,
|
106
64
|
planImage: config.planImage,
|
107
|
-
images: config.panoramaImages
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
text: ['Use mouse to rotate', 'Use the right mouse button to move'],
|
115
|
-
onStart: hideTabPanes
|
116
|
-
}, /*#__PURE__*/_react.default.createElement(_ModelTab.default, {
|
117
|
-
json: config.json
|
118
|
-
}))
|
65
|
+
images: config.panoramaImages,
|
66
|
+
disabled: !config.panoramaImages.length
|
67
|
+
}),
|
68
|
+
'model': /*#__PURE__*/_react.default.createElement(_ModelTab.default, {
|
69
|
+
json: config.json,
|
70
|
+
disabled: !config.json
|
71
|
+
})
|
119
72
|
};
|
73
|
+
const tabButtons = [{
|
74
|
+
tab: 'rotation',
|
75
|
+
text: '2D'
|
76
|
+
}, {
|
77
|
+
tab: 'panorama',
|
78
|
+
text: '3D'
|
79
|
+
}];
|
120
80
|
const appStyle = {
|
121
81
|
width,
|
122
82
|
height
|
@@ -127,6 +87,8 @@ const Application = (0, _mobxReactLite.observer)(_ref => {
|
|
127
87
|
};
|
128
88
|
|
129
89
|
(0, _react.useEffect)(() => {
|
90
|
+
_fullScreenStore.default.init();
|
91
|
+
|
130
92
|
window.addEventListener('resize', setWindowHeight);
|
131
93
|
setWindowHeight();
|
132
94
|
}, []);
|
@@ -134,19 +96,34 @@ const Application = (0, _mobxReactLite.observer)(_ref => {
|
|
134
96
|
if (config.tabs.some(tab => tab === currentTab)) return;
|
135
97
|
setCurrentTab(config.tabs[0]);
|
136
98
|
}, [config, currentTab]);
|
99
|
+
|
100
|
+
const getTabButton = (button, index) => {
|
101
|
+
if (!_store.default.isTabIncluded(button.tab)) return null;
|
102
|
+
return /*#__PURE__*/_react.default.createElement(_TabButton.default, {
|
103
|
+
key: index,
|
104
|
+
text: button.text,
|
105
|
+
active: currentTab === button.tab,
|
106
|
+
onClick: () => setCurrentTab(button.tab)
|
107
|
+
});
|
108
|
+
};
|
109
|
+
|
137
110
|
return /*#__PURE__*/_react.default.createElement("main", {
|
138
111
|
className: "widget-application",
|
112
|
+
id: "widget-application",
|
139
113
|
style: appStyle
|
140
114
|
}, /*#__PURE__*/_react.default.createElement("section", {
|
141
|
-
className: "widget-tab widget-tab--".concat(currentTab
|
142
|
-
}, tabsList[currentTab]),
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
115
|
+
className: "widget-tab widget-tab--".concat(currentTab)
|
116
|
+
}, tabsList[currentTab]), /*#__PURE__*/_react.default.createElement("a", {
|
117
|
+
className: "widget-logo",
|
118
|
+
href: config.logoUrl,
|
119
|
+
target: "_blank",
|
120
|
+
rel: "noreferrer"
|
121
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
122
|
+
src: config.logo,
|
123
|
+
alt: "logo"
|
124
|
+
})), /*#__PURE__*/_react.default.createElement(_FullScreenButton.default, null), /*#__PURE__*/_react.default.createElement("div", {
|
125
|
+
className: "widget-tab-buttons"
|
126
|
+
}, tabButtons.map(getTabButton)));
|
150
127
|
});
|
151
128
|
var _default = Application;
|
152
129
|
exports.default = _default;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _mobxReactLite = require("mobx-react-lite");
|
11
|
+
|
12
|
+
var _fullScreenStore = _interopRequireDefault(require("../../store/fullScreenStore"));
|
13
|
+
|
14
|
+
var _enterFullscreen = _interopRequireDefault(require("../../assets/icons/enter-fullscreen.svg"));
|
15
|
+
|
16
|
+
var _close = _interopRequireDefault(require("../../assets/icons/close.svg"));
|
17
|
+
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
|
+
|
20
|
+
const FullScreenButton = (0, _mobxReactLite.observer)(() => {
|
21
|
+
if (!_fullScreenStore.default.enabled) {
|
22
|
+
return null;
|
23
|
+
}
|
24
|
+
|
25
|
+
if (_fullScreenStore.default.active) {
|
26
|
+
return /*#__PURE__*/_react.default.createElement("button", {
|
27
|
+
type: "button",
|
28
|
+
className: "widget-exit-fullscreen",
|
29
|
+
onClick: () => _fullScreenStore.default.exit()
|
30
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
31
|
+
src: _close.default,
|
32
|
+
alt: "exit-fullscreen"
|
33
|
+
}));
|
34
|
+
}
|
35
|
+
|
36
|
+
return /*#__PURE__*/_react.default.createElement("button", {
|
37
|
+
type: "button",
|
38
|
+
className: "widget-enter-fullscreen",
|
39
|
+
onClick: () => _fullScreenStore.default.enter()
|
40
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
41
|
+
src: _enterFullscreen.default,
|
42
|
+
alt: "enter-fullscreen"
|
43
|
+
}));
|
44
|
+
});
|
45
|
+
var _default = FullScreenButton;
|
46
|
+
exports.default = _default;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
+
|
12
|
+
const TabButton = _ref => {
|
13
|
+
let {
|
14
|
+
active,
|
15
|
+
text,
|
16
|
+
onClick
|
17
|
+
} = _ref;
|
18
|
+
return /*#__PURE__*/_react.default.createElement("button", {
|
19
|
+
type: "button",
|
20
|
+
className: "widget-tab-button ".concat(active ? 'widget-tab-button--active' : ''),
|
21
|
+
onClick: onClick
|
22
|
+
}, text);
|
23
|
+
};
|
24
|
+
|
25
|
+
var _default = TabButton;
|
26
|
+
exports.default = _default;
|
@@ -11,28 +11,39 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
11
11
|
|
12
12
|
const Instructions = _ref => {
|
13
13
|
let {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
steps = [],
|
15
|
+
disabled = false,
|
16
|
+
onClick = () => {},
|
17
|
+
background = null
|
18
18
|
} = _ref;
|
19
19
|
return /*#__PURE__*/_react.default.createElement("div", {
|
20
|
-
className: "widget-instructions"
|
20
|
+
className: "widget-instructions",
|
21
|
+
onClick: onClick,
|
22
|
+
style: {
|
23
|
+
backgroundImage: "url(".concat(background, ")")
|
24
|
+
}
|
21
25
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
22
|
-
className: "widget-instructions__content"
|
26
|
+
className: "widget-instructions__content",
|
27
|
+
onClick: e => e.stopPropagation()
|
23
28
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
24
|
-
className: "widget-
|
25
|
-
},
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
className: "widget-instructions__steps"
|
30
|
+
}, steps.map((_ref2, index) => {
|
31
|
+
let {
|
32
|
+
text,
|
33
|
+
icon
|
34
|
+
} = _ref2;
|
35
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
36
|
+
className: "widget-instructions__step",
|
37
|
+
key: index
|
38
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
39
|
+
src: icon,
|
40
|
+
alt: "step-icon"
|
41
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, text));
|
42
|
+
})), /*#__PURE__*/_react.default.createElement("button", {
|
32
43
|
disabled: disabled,
|
33
44
|
onClick: onClick,
|
34
45
|
type: "button"
|
35
|
-
}, "
|
46
|
+
}, "\u041E\u043A")));
|
36
47
|
};
|
37
48
|
|
38
49
|
var _default = Instructions;
|