hart-estate-widget 0.0.62 → 0.0.65
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 +33 -23
- package/build/assets/css/app.css +1 -1
- package/build/assets/css/app.css.map +1 -1
- package/build/assets/icons/arrow-left.svg +4 -0
- package/build/assets/icons/arrow-right.svg +4 -0
- package/build/assets/icons/plan.svg +5 -0
- package/build/assets/icons/render.svg +7 -0
- package/build/assets/icons/surface.svg +5 -0
- package/build/assets/sass/components/instructions.sass +10 -10
- package/build/assets/sass/components/loader.sass +33 -32
- package/build/assets/sass/components/model.sass +1 -1
- package/build/assets/sass/components/panorama.sass +14 -16
- package/build/assets/sass/components/rotation.sass +202 -0
- package/build/assets/sass/components/tabs.sass +6 -112
- package/build/assets/sass/index.sass +13 -40
- package/build/assets/sass/mixin.sass +37 -1
- package/build/assets/sass/vars.sass +4 -5
- package/build/components/Application.js +22 -20
- package/build/components/PanoramaTab.js +34 -60
- package/build/components/RotationTab/DefaultView.js +124 -0
- package/build/components/RotationTab/ThreesixtyView.js +45 -0
- package/build/components/{RotationTab.js → RotationTab/index.js} +90 -55
- package/build/components/Widget.js +38 -22
- package/build/config/defaultConfig.js +8 -4
- package/build/enums/deviceWidth.js +12 -3
- package/build/enums/rotationModes.js +11 -0
- package/build/index.js +8 -8
- package/build/store/apiStore.js +51 -19
- package/build/store/fullScreenStore.js +36 -1
- package/build/store/index.js +13 -1
- package/build/store/modelStore.js +10 -5
- package/package.json +1 -1
- package/build/components/ImageTab.js +0 -23
@@ -0,0 +1,202 @@
|
|
1
|
+
@import '../mixin'
|
2
|
+
@import '../vars'
|
3
|
+
|
4
|
+
.widget-application
|
5
|
+
.widget-tab
|
6
|
+
&__rotation
|
7
|
+
width: 100%
|
8
|
+
height: 100%
|
9
|
+
&-start
|
10
|
+
@include customButton
|
11
|
+
position: absolute
|
12
|
+
left: 50%
|
13
|
+
bottom: 35px
|
14
|
+
transform: translateX(-50%)
|
15
|
+
display: flex
|
16
|
+
align-items: center
|
17
|
+
justify-content: center
|
18
|
+
padding: 0 25px 0 10px
|
19
|
+
background-color: $gray
|
20
|
+
border-radius: 38px
|
21
|
+
height: 72px
|
22
|
+
width: 202px
|
23
|
+
@include media($tablet)
|
24
|
+
height: 60px
|
25
|
+
width: 166px
|
26
|
+
padding: 0 20px 0 8px
|
27
|
+
bottom: 35px
|
28
|
+
@include media($mobile)
|
29
|
+
height: 44px
|
30
|
+
width: 115px
|
31
|
+
padding: 0 10px 0 6px
|
32
|
+
@include media($smallMobile)
|
33
|
+
height: 36px
|
34
|
+
width: 85px
|
35
|
+
padding: 0 8px 0 6px
|
36
|
+
bottom: 30px
|
37
|
+
&-icon
|
38
|
+
display: flex
|
39
|
+
align-items: center
|
40
|
+
justify-content: center
|
41
|
+
border-radius: 50%
|
42
|
+
background-color: $white
|
43
|
+
margin-right: 18px
|
44
|
+
padding: 10px
|
45
|
+
@include media($tablet)
|
46
|
+
padding: 7px
|
47
|
+
margin-right: 15px
|
48
|
+
@include media($mobile)
|
49
|
+
margin-right: 7px
|
50
|
+
@include media($smallMobile)
|
51
|
+
padding: 6px
|
52
|
+
margin-right: 5px
|
53
|
+
img
|
54
|
+
display: block
|
55
|
+
position: relative
|
56
|
+
top: 2px
|
57
|
+
width: 34px
|
58
|
+
@include media($tablet)
|
59
|
+
width: 30px
|
60
|
+
top: 1px
|
61
|
+
@include media($mobile)
|
62
|
+
width: 19px
|
63
|
+
top: 0
|
64
|
+
@include media($smallMobile)
|
65
|
+
width: 15px
|
66
|
+
span
|
67
|
+
font-size: 24px
|
68
|
+
font-weight: bold
|
69
|
+
color: $text-dark
|
70
|
+
text-transform: uppercase
|
71
|
+
width: 100%
|
72
|
+
display: block
|
73
|
+
text-align: center
|
74
|
+
position: relative
|
75
|
+
top: 1px
|
76
|
+
@include media($tablet)
|
77
|
+
font-size: 20px
|
78
|
+
@include media($mobile)
|
79
|
+
font-size: 14px
|
80
|
+
@include media($smallMobile)
|
81
|
+
font-size: 10px
|
82
|
+
top: 0
|
83
|
+
|
84
|
+
&__threesixty,
|
85
|
+
&__isometry
|
86
|
+
width: 100%
|
87
|
+
height: 100%
|
88
|
+
@include noTouch
|
89
|
+
&-container
|
90
|
+
width: 100% !important
|
91
|
+
height: 100% !important
|
92
|
+
position: relative
|
93
|
+
background-image: none !important
|
94
|
+
img
|
95
|
+
position: absolute
|
96
|
+
left: 50%
|
97
|
+
top: 50%
|
98
|
+
transform: translate(-50%, -50%)
|
99
|
+
max-width: 100%
|
100
|
+
max-height: 100%
|
101
|
+
width: 600px
|
102
|
+
height: 600px
|
103
|
+
object-fit: contain
|
104
|
+
opacity: 0
|
105
|
+
pointer-events: none
|
106
|
+
@include noSelect
|
107
|
+
&.active
|
108
|
+
opacity: 1
|
109
|
+
|
110
|
+
&__threesixty
|
111
|
+
&--active
|
112
|
+
cursor: move
|
113
|
+
|
114
|
+
&__isometry
|
115
|
+
&-arrows
|
116
|
+
position: absolute
|
117
|
+
z-index: 3
|
118
|
+
left: 50%
|
119
|
+
bottom: 35px
|
120
|
+
transform: translateX(-50%)
|
121
|
+
height: 72px
|
122
|
+
display: flex
|
123
|
+
align-items: center
|
124
|
+
justify-content: center
|
125
|
+
@include media($tablet)
|
126
|
+
bottom: 35px
|
127
|
+
height: 60px
|
128
|
+
@include media($mobile)
|
129
|
+
height: 44px
|
130
|
+
@include media($smallMobile)
|
131
|
+
bottom: 30px
|
132
|
+
height: 36px
|
133
|
+
span
|
134
|
+
font-size: 28px
|
135
|
+
font-weight: bold
|
136
|
+
display: block
|
137
|
+
margin: 0 9px
|
138
|
+
@include media($tablet)
|
139
|
+
font-size: 22px
|
140
|
+
@include media($mobile)
|
141
|
+
font-size: 17px
|
142
|
+
margin: 0 3px
|
143
|
+
@include media($smallMobile)
|
144
|
+
font-size: 14px
|
145
|
+
margin: 0
|
146
|
+
&-arrow
|
147
|
+
@include customButton
|
148
|
+
display: flex
|
149
|
+
align-items: center
|
150
|
+
justify-content: center
|
151
|
+
padding: 5px
|
152
|
+
img
|
153
|
+
width: 32px
|
154
|
+
@include media($tablet)
|
155
|
+
width: 24px
|
156
|
+
@include media($mobile)
|
157
|
+
width: 18px
|
158
|
+
@include media($smallMobile)
|
159
|
+
width: 14px
|
160
|
+
&-buttons
|
161
|
+
position: absolute
|
162
|
+
z-index: 3
|
163
|
+
left: 44px
|
164
|
+
bottom: 35px
|
165
|
+
display: flex
|
166
|
+
align-items: center
|
167
|
+
justify-content: flex-end
|
168
|
+
@include media($tablet)
|
169
|
+
left: 20px
|
170
|
+
bottom: 35px
|
171
|
+
@include media($smallMobile)
|
172
|
+
bottom: 30px
|
173
|
+
&-button
|
174
|
+
@include customButton
|
175
|
+
width: 72px
|
176
|
+
height: 72px
|
177
|
+
border-radius: 50%
|
178
|
+
display: flex
|
179
|
+
align-items: center
|
180
|
+
justify-content: center
|
181
|
+
background-color: $gray
|
182
|
+
margin-top: 40px
|
183
|
+
@include media($tablet)
|
184
|
+
margin-top: 20px
|
185
|
+
width: 60px
|
186
|
+
height: 60px
|
187
|
+
@include media($mobile)
|
188
|
+
margin-top: 10px
|
189
|
+
width: 44px
|
190
|
+
height: 44px
|
191
|
+
@include media($smallMobile)
|
192
|
+
width: 36px
|
193
|
+
height: 36px
|
194
|
+
img
|
195
|
+
display: block
|
196
|
+
width: 50px
|
197
|
+
@include media($tablet)
|
198
|
+
width: 40px
|
199
|
+
@include media($mobile)
|
200
|
+
width: 30px
|
201
|
+
@include media($smallMobile)
|
202
|
+
width: 25px
|
@@ -10,10 +10,10 @@
|
|
10
10
|
display: flex
|
11
11
|
align-items: center
|
12
12
|
justify-content: flex-end
|
13
|
-
@media
|
13
|
+
@include media($tablet)
|
14
14
|
right: 20px
|
15
15
|
bottom: 35px
|
16
|
-
@media
|
16
|
+
@include media($smallMobile)
|
17
17
|
bottom: 30px
|
18
18
|
.widget-tab-button
|
19
19
|
@include customButton
|
@@ -29,17 +29,17 @@
|
|
29
29
|
line-height: 120%
|
30
30
|
font-weight: bold
|
31
31
|
margin-left: 40px
|
32
|
-
@media
|
32
|
+
@include media($tablet)
|
33
33
|
margin-left: 20px
|
34
34
|
width: 60px
|
35
35
|
height: 60px
|
36
36
|
font-size: 22px
|
37
|
-
@media
|
37
|
+
@include media($mobile)
|
38
38
|
margin-left: 10px
|
39
39
|
font-size: 17px
|
40
40
|
width: 44px
|
41
41
|
height: 44px
|
42
|
-
@media
|
42
|
+
@include media($smallMobile)
|
43
43
|
width: 36px
|
44
44
|
height: 36px
|
45
45
|
font-size: 14px
|
@@ -53,114 +53,8 @@
|
|
53
53
|
align-items: center
|
54
54
|
justify-content: center
|
55
55
|
padding: 60px 30px
|
56
|
-
@media
|
56
|
+
@include media($smallMobile)
|
57
57
|
padding: 60px 20px
|
58
|
-
&__image
|
59
|
-
max-width: 100%
|
60
|
-
max-height: 100%
|
61
|
-
object-fit: contain
|
62
|
-
display: block
|
63
|
-
&__threesixty
|
64
|
-
width: 100%
|
65
|
-
height: 100%
|
66
|
-
@include noTouch
|
67
|
-
&-start
|
68
|
-
@include customButton
|
69
|
-
position: absolute
|
70
|
-
left: 50%
|
71
|
-
bottom: 35px
|
72
|
-
transform: translateX(-50%)
|
73
|
-
display: flex
|
74
|
-
align-items: center
|
75
|
-
justify-content: center
|
76
|
-
padding: 0 25px 0 10px
|
77
|
-
background-color: $gray
|
78
|
-
border-radius: 38px
|
79
|
-
height: 72px
|
80
|
-
width: 202px
|
81
|
-
@media #{$tablet}
|
82
|
-
height: 60px
|
83
|
-
width: 166px
|
84
|
-
padding: 0 20px 0 8px
|
85
|
-
bottom: 35px
|
86
|
-
@media #{$mobile}
|
87
|
-
height: 44px
|
88
|
-
width: 115px
|
89
|
-
padding: 0 10px 0 6px
|
90
|
-
@media #{$w-374}
|
91
|
-
height: 36px
|
92
|
-
width: 94px
|
93
|
-
padding: 0 8px 0 6px
|
94
|
-
bottom: 30px
|
95
|
-
&-icon
|
96
|
-
display: flex
|
97
|
-
align-items: center
|
98
|
-
justify-content: center
|
99
|
-
border-radius: 50%
|
100
|
-
background-color: $white
|
101
|
-
margin-right: 18px
|
102
|
-
padding: 10px
|
103
|
-
@media #{$tablet}
|
104
|
-
padding: 7px
|
105
|
-
margin-right: 15px
|
106
|
-
@media #{$mobile}
|
107
|
-
margin-right: 7px
|
108
|
-
@media #{$w-374}
|
109
|
-
padding: 6px
|
110
|
-
margin-right: 5px
|
111
|
-
img
|
112
|
-
display: block
|
113
|
-
position: relative
|
114
|
-
top: 2px
|
115
|
-
width: 34px
|
116
|
-
@media #{$tablet}
|
117
|
-
width: 30px
|
118
|
-
top: 1px
|
119
|
-
@media #{$mobile}
|
120
|
-
width: 19px
|
121
|
-
top: 0
|
122
|
-
@media #{$w-374}
|
123
|
-
width: 15px
|
124
|
-
span
|
125
|
-
font-size: 24px
|
126
|
-
font-weight: bold
|
127
|
-
color: $text-dark
|
128
|
-
text-transform: uppercase
|
129
|
-
width: 100%
|
130
|
-
display: block
|
131
|
-
text-align: center
|
132
|
-
position: relative
|
133
|
-
top: 1px
|
134
|
-
@media #{$tablet}
|
135
|
-
font-size: 20px
|
136
|
-
@media #{$mobile}
|
137
|
-
font-size: 14px
|
138
|
-
@media #{$w-374}
|
139
|
-
font-size: 12px
|
140
|
-
&-container
|
141
|
-
width: 100% !important
|
142
|
-
height: 100% !important
|
143
|
-
position: relative
|
144
|
-
background-image: none !important
|
145
|
-
img
|
146
|
-
position: absolute
|
147
|
-
left: 50%
|
148
|
-
top: 50%
|
149
|
-
transform: translate(-50%, -50%)
|
150
|
-
max-width: 100%
|
151
|
-
max-height: 100%
|
152
|
-
width: 600px
|
153
|
-
height: 600px
|
154
|
-
object-fit: contain
|
155
|
-
opacity: 0
|
156
|
-
pointer-events: none
|
157
|
-
@include noSelect
|
158
|
-
&.active
|
159
|
-
opacity: 1
|
160
|
-
&--active
|
161
|
-
.widget-tab__threesixty-container
|
162
|
-
cursor: move
|
163
|
-
|
164
58
|
&-menu
|
165
59
|
position: absolute
|
166
60
|
z-index: 3
|
@@ -2,10 +2,9 @@
|
|
2
2
|
@import './mixin'
|
3
3
|
|
4
4
|
.widget-application
|
5
|
-
--vh: 100vh
|
6
|
-
|
7
5
|
width: 100%
|
8
|
-
height:
|
6
|
+
height: 100%
|
7
|
+
flex: none
|
9
8
|
overflow: hidden
|
10
9
|
position: relative
|
11
10
|
z-index: 1
|
@@ -30,10 +29,10 @@
|
|
30
29
|
left: 45px
|
31
30
|
top: 30px
|
32
31
|
z-index: 3
|
33
|
-
@media
|
32
|
+
@include media($tablet)
|
34
33
|
left: 20px
|
35
34
|
top: 30px
|
36
|
-
@media
|
35
|
+
@include media($smallMobile)
|
37
36
|
top: 25px
|
38
37
|
img
|
39
38
|
display: block
|
@@ -41,52 +40,26 @@
|
|
41
40
|
height: 82px
|
42
41
|
object-fit: contain
|
43
42
|
object-position: center
|
44
|
-
@media
|
43
|
+
@include media($tablet)
|
45
44
|
width: 65px
|
46
45
|
height: 65px
|
47
|
-
@media
|
46
|
+
@include media($mobile)
|
48
47
|
width: 42px
|
49
48
|
height: 42px
|
50
|
-
@media
|
49
|
+
@include media($smallMobile)
|
51
50
|
width: 36px
|
52
51
|
height: 36px
|
53
52
|
|
54
|
-
.widget-tab__panorama-close-map
|
55
|
-
|
53
|
+
.widget-tab__panorama-close-map
|
54
|
+
@include rightActionButton
|
55
|
+
.widget-enter-fullscreen
|
56
|
+
@include rightActionButton
|
56
57
|
.widget-exit-fullscreen
|
57
|
-
|
58
|
-
right: 45px
|
59
|
-
top: 36px
|
60
|
-
z-index: 3
|
61
|
-
padding: 10px
|
62
|
-
touch-action: none
|
63
|
-
@include customButton
|
64
|
-
@media #{$tablet}
|
65
|
-
right: 17px
|
66
|
-
top: 35px
|
67
|
-
@media #{$mobile}
|
68
|
-
padding: 5px
|
69
|
-
right: 20px
|
70
|
-
@media #{$w-374}
|
71
|
-
top: 25px
|
72
|
-
img
|
73
|
-
display: block
|
74
|
-
width: 50px
|
75
|
-
height: 50px
|
76
|
-
object-fit: contain
|
77
|
-
object-position: center
|
78
|
-
@media #{$tablet}
|
79
|
-
width: 40px
|
80
|
-
height: 40px
|
81
|
-
@media #{$mobile}
|
82
|
-
width: 32px
|
83
|
-
height: 32px
|
84
|
-
@media #{$w-374}
|
85
|
-
width: 26px
|
86
|
-
height: 26px
|
58
|
+
@include rightActionButton
|
87
59
|
|
88
60
|
@import './components/tabs'
|
89
61
|
@import './components/instructions'
|
90
62
|
@import './components/panorama'
|
63
|
+
@import './components/rotation'
|
91
64
|
@import './components/loader'
|
92
65
|
@import './components/model'
|
@@ -9,4 +9,40 @@
|
|
9
9
|
backdrop-filter: blur($blur)
|
10
10
|
-moz-backdrop-filter: blur($blur)
|
11
11
|
-webkit-backdrop-filter: blur($blur)
|
12
|
-
|
12
|
+
|
13
|
+
@mixin media($device)
|
14
|
+
$this: &
|
15
|
+
@at-root .widget-application--#{$device}#{$this}
|
16
|
+
@content
|
17
|
+
|
18
|
+
@mixin rightActionButton
|
19
|
+
position: absolute
|
20
|
+
right: 45px
|
21
|
+
top: 36px
|
22
|
+
z-index: 3
|
23
|
+
padding: 10px
|
24
|
+
touch-action: none
|
25
|
+
@include customButton
|
26
|
+
@include media($tablet)
|
27
|
+
right: 17px
|
28
|
+
top: 35px
|
29
|
+
@include media($mobile)
|
30
|
+
padding: 5px
|
31
|
+
right: 20px
|
32
|
+
@include media($smallMobile)
|
33
|
+
top: 25px
|
34
|
+
img
|
35
|
+
display: block
|
36
|
+
width: 50px
|
37
|
+
height: 50px
|
38
|
+
object-fit: contain
|
39
|
+
object-position: center
|
40
|
+
@include media($tablet)
|
41
|
+
width: 40px
|
42
|
+
height: 40px
|
43
|
+
@include media($mobile)
|
44
|
+
width: 32px
|
45
|
+
height: 32px
|
46
|
+
@include media($smallMobile)
|
47
|
+
width: 26px
|
48
|
+
height: 26px
|
@@ -1,8 +1,7 @@
|
|
1
|
-
$
|
2
|
-
$mobile: "
|
3
|
-
$tablet: "
|
4
|
-
$laptop: "
|
5
|
-
$desktop: "only screen and (min-width: 1441px)"
|
1
|
+
$smallMobile: "smallMobile"
|
2
|
+
$mobile: "mobile"
|
3
|
+
$tablet: "tablet"
|
4
|
+
$laptop: "laptop"
|
6
5
|
|
7
6
|
$white: #FFFFFF
|
8
7
|
$black: #000000
|
@@ -15,6 +15,8 @@ var _store = _interopRequireDefault(require("../store"));
|
|
15
15
|
|
16
16
|
var _fullScreenStore = _interopRequireDefault(require("../store/fullScreenStore"));
|
17
17
|
|
18
|
+
var _deviceWidth = require("../enums/deviceWidth");
|
19
|
+
|
18
20
|
var _RotationTab = _interopRequireDefault(require("./RotationTab"));
|
19
21
|
|
20
22
|
var _PanoramaTab = _interopRequireDefault(require("./PanoramaTab"));
|
@@ -43,13 +45,11 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
43
45
|
|
44
46
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
45
47
|
|
46
|
-
var Application = (0, _mobxReactLite.observer)(function (
|
47
|
-
var width = _ref.width,
|
48
|
-
height = _ref.height;
|
48
|
+
var Application = (0, _mobxReactLite.observer)(function () {
|
49
49
|
var config = _store.default.config;
|
50
50
|
var appStyle = {
|
51
|
-
width: width,
|
52
|
-
height: height
|
51
|
+
width: config.width,
|
52
|
+
height: config.height
|
53
53
|
};
|
54
54
|
|
55
55
|
var _useState = (0, _react.useState)(config.tabs[0]),
|
@@ -59,18 +59,21 @@ var Application = (0, _mobxReactLite.observer)(function (_ref) {
|
|
59
59
|
|
60
60
|
var tabsList = {
|
61
61
|
'rotation': /*#__PURE__*/_react.default.createElement(_RotationTab.default, {
|
62
|
+
disabled: !config.rotationImages[0],
|
63
|
+
topViewImage: config.topViewImage,
|
62
64
|
images: config.rotationImages,
|
63
|
-
|
65
|
+
planImage: config.planImage,
|
66
|
+
mode: config.rotationMode
|
64
67
|
}),
|
65
68
|
'panorama': /*#__PURE__*/_react.default.createElement(_PanoramaTab.default, {
|
66
|
-
|
67
|
-
planImage: config.planImage,
|
69
|
+
disabled: !config.panoramaImages.length,
|
68
70
|
images: config.panoramaImages,
|
69
|
-
|
71
|
+
planImage: config.planImage,
|
72
|
+
json: config.json
|
70
73
|
}),
|
71
74
|
'model': /*#__PURE__*/_react.default.createElement(_ModelTab.default, {
|
72
|
-
|
73
|
-
|
75
|
+
disabled: !config.json,
|
76
|
+
json: config.json
|
74
77
|
})
|
75
78
|
};
|
76
79
|
var tabButtons = [{
|
@@ -80,16 +83,8 @@ var Application = (0, _mobxReactLite.observer)(function (_ref) {
|
|
80
83
|
tab: 'panorama',
|
81
84
|
text: '3D'
|
82
85
|
}];
|
83
|
-
|
84
|
-
var setWindowHeight = function setWindowHeight() {
|
85
|
-
document.querySelector('.widget-application').style.setProperty('--vh', window.innerHeight / 100 + 'px');
|
86
|
-
};
|
87
|
-
|
88
86
|
(0, _react.useEffect)(function () {
|
89
87
|
_fullScreenStore.default.init();
|
90
|
-
|
91
|
-
window.addEventListener('resize', setWindowHeight);
|
92
|
-
setWindowHeight();
|
93
88
|
}, []);
|
94
89
|
(0, _react.useEffect)(function () {
|
95
90
|
if (config.tabs.some(function (tab) {
|
@@ -111,8 +106,15 @@ var Application = (0, _mobxReactLite.observer)(function (_ref) {
|
|
111
106
|
});
|
112
107
|
};
|
113
108
|
|
109
|
+
var getAppClass = function getAppClass() {
|
110
|
+
var className = (0, _deviceWidth.getDevicesByWidth)(config.width).reduce(function (acc, device) {
|
111
|
+
return acc += " widget-application--".concat(device);
|
112
|
+
}, 'widget-application');
|
113
|
+
return className;
|
114
|
+
};
|
115
|
+
|
114
116
|
return /*#__PURE__*/_react.default.createElement("main", {
|
115
|
-
className:
|
117
|
+
className: getAppClass(),
|
116
118
|
id: "widget-application",
|
117
119
|
style: appStyle
|
118
120
|
}, /*#__PURE__*/_react.default.createElement("section", {
|