@woosmap/ui 3.23.0 → 3.27.0
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 +1 -1
- package/src/components/Demo/DistanceDemo.js +5 -1
- package/src/components/Demo/GeolocationDemo.js +2 -1
- package/src/components/Demo/LocalitiesAddressDemo.js +2 -1
- package/src/components/Demo/LocalitiesDemo.js +2 -1
- package/src/components/Demo/MapDemo.js +1 -2
- package/src/components/Demo/SearchDemo.js +3 -2
- package/src/components/Demo/SkeletonDemo.js +6 -4
- package/src/components/Dropdown/Dropdown.js +1 -1
- package/src/components/Map/drawOnMap.js +1 -0
- package/src/index.js +1 -0
- package/src/styles/commons/base.styl +0 -2
- package/src/styles/console/input.styl +2 -0
- package/src/styles/console/select.styl +2 -0
- package/src/styles/next-website/demo.styl +21 -13
- package/src/styles/next-website/input.styl +2 -0
- package/src/styles/next-website/mixins.styl +1 -1
- package/src/styles/next-website/select.styl +2 -0
- package/src/styles/next-website/variables.styl +1 -0
- package/src/styles/website/input.styl +2 -0
- package/src/styles/website/select.styl +2 -0
package/package.json
CHANGED
|
@@ -210,6 +210,7 @@ export default class DistanceDemo extends Component {
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
if (window.woosmap && window.woosmap.map && this.demoRef.current) {
|
|
213
|
+
window.woosmap.map.config.setApiKey(Constants.woosmapKey);
|
|
213
214
|
this.map = createWoosmapMap(this.demoRef.current.getMap());
|
|
214
215
|
this.requestDistance();
|
|
215
216
|
} else {
|
|
@@ -218,6 +219,9 @@ export default class DistanceDemo extends Component {
|
|
|
218
219
|
};
|
|
219
220
|
|
|
220
221
|
localitiesOnChangeCallBack = (type) => (item) => {
|
|
222
|
+
if (!item) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
221
225
|
const newState = {};
|
|
222
226
|
newState[`${type}Location`] = item ? item.location : {};
|
|
223
227
|
this.setState(newState, this.requestDistance);
|
|
@@ -346,7 +350,7 @@ export default class DistanceDemo extends Component {
|
|
|
346
350
|
};
|
|
347
351
|
return (
|
|
348
352
|
<>
|
|
349
|
-
<Script url=
|
|
353
|
+
<Script url="https://sdk.woosmap.com/map/map.js" />
|
|
350
354
|
<Demo
|
|
351
355
|
id="distance-demo"
|
|
352
356
|
className="demo--distance"
|
|
@@ -180,6 +180,7 @@ export default class GeolocationDemo extends Component {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
if (window.woosmap && window.woosmap.map && this.demoRef.current) {
|
|
183
|
+
window.woosmap.map.config.setApiKey(Constants.geolocationWoosmapSearchKey);
|
|
183
184
|
this.map = createWoosmapMap(this.demoRef.current.getMap());
|
|
184
185
|
this.requestGeolocation();
|
|
185
186
|
} else {
|
|
@@ -211,7 +212,7 @@ export default class GeolocationDemo extends Component {
|
|
|
211
212
|
}
|
|
212
213
|
return (
|
|
213
214
|
<>
|
|
214
|
-
<Script url=
|
|
215
|
+
<Script url="https://sdk.woosmap.com/map/map.js" />
|
|
215
216
|
<Demo
|
|
216
217
|
className="demo--geolocation"
|
|
217
218
|
docLink="https://developers.woosmap.com/products/geolocation-api/location/"
|
|
@@ -328,6 +328,7 @@ export default class LocalitiesAddressDemo extends Component {
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
if (window.woosmap && window.woosmap.map && this.demoRef.current) {
|
|
331
|
+
window.woosmap.map.config.setApiKey(Constants.woosmapKey);
|
|
331
332
|
this.map = createWoosmapMap(this.demoRef.current.getMap());
|
|
332
333
|
this.requestAddress();
|
|
333
334
|
} else {
|
|
@@ -344,7 +345,7 @@ export default class LocalitiesAddressDemo extends Component {
|
|
|
344
345
|
}
|
|
345
346
|
return (
|
|
346
347
|
<>
|
|
347
|
-
<Script url=
|
|
348
|
+
<Script url="https://sdk.woosmap.com/map/map.js" />
|
|
348
349
|
<Demo
|
|
349
350
|
noheader={noheader}
|
|
350
351
|
header={headerLabels}
|
|
@@ -195,6 +195,7 @@ export default class LocalitiesDemo extends Component {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
if (window.woosmap && window.woosmap.map && this.demoRef.current) {
|
|
198
|
+
window.woosmap.map.config.setApiKey(Constants.woosmapKey);
|
|
198
199
|
this.map = createWoosmapMap(this.demoRef.current.getMap());
|
|
199
200
|
this.requestLocalities();
|
|
200
201
|
} else {
|
|
@@ -268,7 +269,7 @@ export default class LocalitiesDemo extends Component {
|
|
|
268
269
|
const { noheader, headerLabels, subHeader } = this.props;
|
|
269
270
|
return (
|
|
270
271
|
<>
|
|
271
|
-
<Script url=
|
|
272
|
+
<Script url="https://sdk.woosmap.com/map/map.js" />
|
|
272
273
|
<Demo
|
|
273
274
|
id="localities-demo"
|
|
274
275
|
header={headerLabels}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import Demo from './SkeletonDemo';
|
|
5
|
-
import Constants from '../../Constants';
|
|
6
5
|
import Button from '../Button/Button';
|
|
7
6
|
import ButtonGroup from '../Button/ButtonGroup';
|
|
8
7
|
import marker from '../../images/marker.png';
|
|
@@ -253,7 +252,7 @@ storesOverlay.setMap(map);
|
|
|
253
252
|
};
|
|
254
253
|
return (
|
|
255
254
|
<>
|
|
256
|
-
<Script url=
|
|
255
|
+
<Script url="https://sdk.woosmap.com/map/map.js" />
|
|
257
256
|
<Demo
|
|
258
257
|
ref={this.demoRef}
|
|
259
258
|
header={headerLabels}
|
|
@@ -73,7 +73,7 @@ export default class SearchDemo extends Component {
|
|
|
73
73
|
key: Constants.woosmapKey,
|
|
74
74
|
lat: location.lat,
|
|
75
75
|
lng: location.lng,
|
|
76
|
-
stores_by_page: maxStore,
|
|
76
|
+
stores_by_page: maxStore || '5',
|
|
77
77
|
query,
|
|
78
78
|
};
|
|
79
79
|
};
|
|
@@ -190,6 +190,7 @@ export default class SearchDemo extends Component {
|
|
|
190
190
|
if (this.timeoutMap) clearTimeout(this.timeoutMap);
|
|
191
191
|
|
|
192
192
|
if (window.woosmap && window.woosmap.map && this.demoRef.current) {
|
|
193
|
+
window.woosmap.map.config.setApiKey(Constants.woosmapKey);
|
|
193
194
|
this.map = createWoosmapMap(this.demoRef.current.getMap());
|
|
194
195
|
this.requestSearch();
|
|
195
196
|
} else {
|
|
@@ -310,7 +311,7 @@ export default class SearchDemo extends Component {
|
|
|
310
311
|
};
|
|
311
312
|
return (
|
|
312
313
|
<>
|
|
313
|
-
<Script url=
|
|
314
|
+
<Script url="https://sdk.woosmap.com/map/map.js" />
|
|
314
315
|
<Demo
|
|
315
316
|
id="search-demo"
|
|
316
317
|
className="demo--search"
|
|
@@ -176,10 +176,12 @@ export default class SkeletonDemo extends Component {
|
|
|
176
176
|
{filters2}
|
|
177
177
|
</div>
|
|
178
178
|
)}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
{withMap && (
|
|
180
|
+
<div className="demo__map">
|
|
181
|
+
<div className="map" ref={this.mapDivRef} />
|
|
182
|
+
</div>
|
|
183
|
+
)}
|
|
184
|
+
{mainContent && <div className="demo__content">{mainContent}</div>}
|
|
183
185
|
</div>
|
|
184
186
|
<div className="demo__data">
|
|
185
187
|
{result && (
|
package/src/index.js
CHANGED
|
@@ -46,6 +46,7 @@ export { default as withClickOutside } from './components/withClickOutside/withC
|
|
|
46
46
|
export { default as withFormValidation } from './components/withFormValidation/withFormValidation';
|
|
47
47
|
export { default as Marker } from './components/Map/Marker';
|
|
48
48
|
export { default as LocalitiesDemo } from './components/Demo/LocalitiesDemo';
|
|
49
|
+
export { default as LocalitiesAllDemo } from './components/Demo/LocalitiesAllDemo';
|
|
49
50
|
export { default as MerchantDemo } from './components/Demo/MerchantDemo';
|
|
50
51
|
export { default as GeolocationDemo } from './components/Demo/GeolocationDemo';
|
|
51
52
|
export { default as DistanceDemo } from './components/Demo/DistanceDemo';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
.demo
|
|
3
3
|
fullwh()
|
|
4
|
-
margin
|
|
4
|
+
margin auto
|
|
5
5
|
color $secondary
|
|
6
6
|
.title
|
|
7
7
|
font-size $title3
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
.map
|
|
45
45
|
width 100%
|
|
46
46
|
height 100%
|
|
47
|
+
background-color $inputDemoBgColor
|
|
47
48
|
&__results
|
|
48
49
|
width $demofilterWidth
|
|
49
50
|
display flex
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
br($demoBr)
|
|
94
95
|
background-color $inputDemoBgColor !important
|
|
95
96
|
border-color $inputDemoBorderColor
|
|
96
|
-
font-size $inputFontSizeDemo
|
|
97
|
+
font-size $inputFontSizeDemo !important
|
|
97
98
|
height $inputDemoHeight
|
|
98
99
|
padding 0 1rem 0 1rem
|
|
99
100
|
.mbi
|
|
@@ -101,15 +102,15 @@
|
|
|
101
102
|
.input
|
|
102
103
|
&__label
|
|
103
104
|
inputFont()
|
|
104
|
-
font-size $inputFontSizeDemo
|
|
105
|
+
font-size $inputFontSizeDemo !important
|
|
105
106
|
.select
|
|
106
107
|
.asyncselect
|
|
107
|
-
inputFont()
|
|
108
|
-
font-size $inputFontSizeDemo
|
|
109
108
|
&__control
|
|
109
|
+
inputFont()
|
|
110
|
+
font-size $inputFontSizeDemo !important
|
|
110
111
|
border-radius $demoBr !important
|
|
111
112
|
background-color $inputDemoBgColor !important
|
|
112
|
-
min-height
|
|
113
|
+
min-height $inputDemoHeight !important
|
|
113
114
|
height auto !important
|
|
114
115
|
&:not(.select__control--is-focused):not(.asyncselect__control--is-focused)
|
|
115
116
|
border-color $inputDemoBorderColor !important
|
|
@@ -167,7 +168,7 @@
|
|
|
167
168
|
&__filters
|
|
168
169
|
.btn
|
|
169
170
|
br(.2)
|
|
170
|
-
font-size $inputFontSizeDemo
|
|
171
|
+
font-size $inputFontSizeDemo !important
|
|
171
172
|
line-height 2.2rem
|
|
172
173
|
padding 0 .8rem
|
|
173
174
|
height $inputDemoHeight
|
|
@@ -193,18 +194,18 @@
|
|
|
193
194
|
color $inputDemoBgColor
|
|
194
195
|
&.language
|
|
195
196
|
&.transportation
|
|
196
|
-
mbi(.
|
|
197
|
+
mbi(.6)
|
|
197
198
|
.btn
|
|
198
199
|
br(.3)
|
|
199
200
|
border 0
|
|
200
|
-
height
|
|
201
|
-
padding .
|
|
201
|
+
height 2.2rem
|
|
202
|
+
padding .4rem
|
|
202
203
|
&.active
|
|
203
204
|
background-color $light
|
|
204
205
|
box-shadow 0 0 .1rem .1rem $activeColorDark
|
|
205
206
|
.flag
|
|
206
|
-
width 2.
|
|
207
|
-
height 1.
|
|
207
|
+
width 2.4rem
|
|
208
|
+
height 1.6rem
|
|
208
209
|
&.transportation
|
|
209
210
|
.btn
|
|
210
211
|
height 2.8rem
|
|
@@ -232,9 +233,16 @@
|
|
|
232
233
|
br(2)
|
|
233
234
|
inputFont()
|
|
234
235
|
padding 0 1rem
|
|
235
|
-
font-size $inputFontSizeDemo
|
|
236
|
+
font-size $inputFontSizeDemo !important
|
|
236
237
|
border .1rem solid $activeColor
|
|
237
238
|
color darken($activeColor, 20%)
|
|
239
|
+
&--address
|
|
240
|
+
&__formcontainer
|
|
241
|
+
mbib(.9)
|
|
242
|
+
.input
|
|
243
|
+
&__label
|
|
244
|
+
margin-bottom .2rem
|
|
245
|
+
|
|
238
246
|
@media screen and (max-width 769px)
|
|
239
247
|
.demo__showcase
|
|
240
248
|
max-height 100%
|