@woosmap/ui 2.9.0 → 2.13.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/.eslintrc CHANGED
@@ -26,6 +26,7 @@
26
26
  ],
27
27
  "react/forbid-prop-types": 0,
28
28
  "react/jsx-props-no-spreading": 0,
29
+ "react/jsx-no-bind": 0,
29
30
  "react/prefer-stateless-function": 0,
30
31
  "react/jsx-filename-extension": [
31
32
  1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "2.9.0",
3
+ "version": "2.13.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -186,7 +186,7 @@ export default class AddressDemo extends Component {
186
186
 
187
187
  const useCaseChoice = {
188
188
  key: 'usecase',
189
- label: tr('Usecase'),
189
+ label: tr('Use case'),
190
190
  component: (
191
191
  <ButtonGroup isLight key="usecase">
192
192
  <Button
@@ -1,40 +1,25 @@
1
1
  /* eslint-disable jsx-a11y/click-events-have-key-events */
2
2
  import React, { Component } from 'react';
3
3
  import axios from 'axios';
4
- import cl from 'classnames';
4
+ import PropTypes from 'prop-types';
5
5
  import GoogleMapReact from 'google-map-react';
6
6
  import Demo from './SkeletonDemo';
7
7
  import AddressAutocomplete from '../Woosmap/AddressAutocomplete';
8
8
  import Marker from '../Map/Marker';
9
9
  import Constants from '../../Constants';
10
10
  import { viewpoint } from '../Map/drawOnMap';
11
- import Button from '../Button/Button';
12
- import ButtonGroup from '../Button/ButtonGroup';
13
11
  import CountrySelect from '../Select/CountrySelect';
14
12
  import { tr } from '../utils/locale';
15
13
  import Input from '../Input/Input';
16
14
 
17
- const languages = [
18
- { value: 'fr', label: 'French' },
19
- { value: 'gb', label: 'English' },
20
- { value: 'es', label: 'Spanish' },
21
- { value: 'it', label: 'Italian' },
22
- { value: 'de', label: 'German' },
23
- { value: 'nl', label: 'Dutch' },
24
- ];
25
-
26
15
  export default class LocalitiesAddressDemo extends Component {
27
16
  constructor(props) {
28
17
  super(props);
29
- const lang = navigator.language || navigator.userLanguage;
30
- const defaultLang = languages.find((item) => lang.startsWith(item.value));
31
-
32
18
  this.state = {
33
19
  response: null,
34
20
  error: null,
35
21
  input: '',
36
22
  countries: [],
37
- language: (defaultLang || languages[1]).value,
38
23
  geometry: false,
39
24
  showDetails: false,
40
25
  };
@@ -84,11 +69,10 @@ export default class LocalitiesAddressDemo extends Component {
84
69
  };
85
70
 
86
71
  requestAddressDetails = (result) => {
87
- const { language, geometry } = this.state;
72
+ const { geometry } = this.state;
88
73
  const params = {
89
74
  public_id: result.id,
90
75
  key: Constants.woosmapKey,
91
- language,
92
76
  };
93
77
  if (geometry) {
94
78
  params.fields = 'geometry';
@@ -114,7 +98,7 @@ export default class LocalitiesAddressDemo extends Component {
114
98
  };
115
99
 
116
100
  getRequestparams = () => {
117
- const { input, selectedLocality, language, countries, showDetails, geometry } = this.state;
101
+ const { input, selectedLocality, countries, showDetails, geometry } = this.state;
118
102
  if (showDetails) {
119
103
  const detailsParam = {
120
104
  key: Constants.woosmapKey,
@@ -127,7 +111,6 @@ export default class LocalitiesAddressDemo extends Component {
127
111
  }
128
112
  const params = {
129
113
  key: Constants.woosmapKey,
130
- language,
131
114
  };
132
115
  if (countries && countries.length > 0) {
133
116
  params.components = countries.map((item) => `country:${item.value}`).join('|');
@@ -166,7 +149,8 @@ export default class LocalitiesAddressDemo extends Component {
166
149
  };
167
150
 
168
151
  renderHeaderFilters = () => {
169
- const { language, countries } = this.state;
152
+ const { countries } = this.state;
153
+ const { usecaseFilter } = this.props;
170
154
  let components = null;
171
155
  if (countries && countries.length > 0) {
172
156
  components = countries.map((item) => `country:${item.value}`).join('|');
@@ -182,18 +166,17 @@ export default class LocalitiesAddressDemo extends Component {
182
166
  woosmapKey={Constants.woosmapKey}
183
167
  placeholder="Start to type in an address"
184
168
  defaultLocality={this.defaultOrigin}
185
- language={language}
186
169
  componentsLocalities={components}
187
170
  callback={this.requestAddressDetails}
188
171
  inputChangeCb={this.onAutocompleteInputChangeCb}
189
172
  />
190
173
  ),
191
174
  };
192
- return [inputFilter];
175
+ return [usecaseFilter, inputFilter];
193
176
  };
194
177
 
195
178
  renderFooterFilters = () => {
196
- const { language, geometry } = this.state;
179
+ const { geometry } = this.state;
197
180
  const filterTypes = {
198
181
  label: tr('Filter by'),
199
182
  component: (
@@ -220,27 +203,7 @@ export default class LocalitiesAddressDemo extends Component {
220
203
  />
221
204
  ),
222
205
  };
223
-
224
- const filterCountries = {
225
- label: tr('Language'),
226
- component: (
227
- <ButtonGroup isLight key="language">
228
- {languages.map((item) => (
229
- <Button
230
- type="group"
231
- key={item.value}
232
- active={language === item.value}
233
- onClick={() => {
234
- this.setState({ language: item.value }, this.requestAddress);
235
- }}
236
- >
237
- <span className={cl('flag', `flag-${item.value}`)} title={item.label} />
238
- </Button>
239
- ))}
240
- </ButtonGroup>
241
- ),
242
- };
243
- return [filterGeometry, filterTypes, filterCountries];
206
+ return [filterGeometry, filterTypes];
244
207
  };
245
208
 
246
209
  renderAddress = () => {
@@ -368,14 +331,17 @@ export default class LocalitiesAddressDemo extends Component {
368
331
 
369
332
  render() {
370
333
  const { response, error, showDetails } = this.state;
334
+ const { noheader, headerLabels, subHeader } = this.props;
371
335
  let request = this.requestUrl;
372
336
  if (showDetails) {
373
337
  request = this.requestDetailsUrl;
374
338
  }
375
339
  return (
376
340
  <Demo
377
- noheader
378
- id="localitiesaddress-demo"
341
+ noheader={noheader}
342
+ header={headerLabels}
343
+ subHeader={subHeader}
344
+ id="localities-demo"
379
345
  className="demo--localitiesaddress"
380
346
  footerFilters={this.renderFooterFilters()}
381
347
  headerFilters={this.renderHeaderFilters()}
@@ -389,3 +355,16 @@ export default class LocalitiesAddressDemo extends Component {
389
355
  );
390
356
  }
391
357
  }
358
+
359
+ LocalitiesAddressDemo.defaultProps = {
360
+ noheader: false,
361
+ headerLabels: {},
362
+ usecaseFilter: null,
363
+ subHeader: null,
364
+ };
365
+ LocalitiesAddressDemo.propTypes = {
366
+ noheader: PropTypes.bool,
367
+ headerLabels: PropTypes.object,
368
+ usecaseFilter: PropTypes.object,
369
+ subHeader: PropTypes.object,
370
+ };
@@ -0,0 +1,83 @@
1
+ /* eslint-disable jsx-a11y/click-events-have-key-events */
2
+ import React, { Component } from 'react';
3
+ import LocalitiesDemo from './LocalitiesDemo';
4
+ import Button from '../Button/Button';
5
+ import ButtonGroup from '../Button/ButtonGroup';
6
+ import LocalitiesAddressDemo from './LocalitiesAddressDemo';
7
+ import { tr } from '../utils/locale';
8
+
9
+ export default class LocalitiesAllDemo extends Component {
10
+ constructor(props) {
11
+ super(props);
12
+ this.state = { usecase: 'localities' };
13
+ }
14
+
15
+ renderSubHeader = () => (
16
+ <p>
17
+ {tr('You can select bewteen 2 use cases:')}
18
+ <ul className="demo__desc__list">
19
+ <li>{tr('Store Locator integration: autocomplete on city names, suburb names, postcodes...')}</li>
20
+ <li>
21
+ {tr(
22
+ 'Checkout integration: on full addresses, renders the right part of the address in the right form fields'
23
+ )}
24
+ </li>
25
+ </ul>
26
+ </p>
27
+ );
28
+
29
+ renderUsecaseFilter = () => {
30
+ const { usecase } = this.state;
31
+ return {
32
+ key: 'usecase',
33
+ label: tr('Use case'),
34
+ component: (
35
+ <ButtonGroup isLight key="usecase">
36
+ <Button
37
+ type="group"
38
+ key="localities"
39
+ active={usecase === 'localities'}
40
+ onClick={() => {
41
+ this.setState({ usecase: 'localities' });
42
+ }}
43
+ label={tr('Store Locator')}
44
+ />
45
+ <Button
46
+ type="group"
47
+ key="addresses"
48
+ active={usecase === 'addresses'}
49
+ onClick={() => {
50
+ this.setState({ usecase: 'addresses' });
51
+ }}
52
+ label={tr('Checkout')}
53
+ />
54
+ </ButtonGroup>
55
+ ),
56
+ };
57
+ };
58
+
59
+ render() {
60
+ const { usecase } = this.state;
61
+ const headerLabels = {
62
+ title: tr('Localities API'),
63
+ desc: tr(
64
+ 'Woosmap Localities sorts and displays the 5 most relevant results, with priority to the most likely results, recognises common abbreviations and apostrophes, with high tolerance for typos.'
65
+ ),
66
+ };
67
+ return usecase === 'localities' ? (
68
+ <LocalitiesDemo
69
+ noheader={false}
70
+ headerLabels={headerLabels}
71
+ usecaseFilter={this.renderUsecaseFilter()}
72
+ subHeader={this.renderSubHeader()}
73
+ />
74
+ ) : (
75
+ <LocalitiesAddressDemo
76
+ noheader={false}
77
+ headerLabels={headerLabels}
78
+ usecaseFilter={this.renderUsecaseFilter()}
79
+ subHeader={this.renderSubHeader()}
80
+ />
81
+ );
82
+ }
83
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import LocalitiesAllDemo from './LocalitiesAllDemo';
3
+
4
+ const Story = {
5
+ title: 'demo/LocalitiesAll',
6
+ component: LocalitiesAllDemo,
7
+ };
8
+
9
+ export default Story;
10
+
11
+ const TemplateLocalitiesAll = () => <LocalitiesAllDemo />;
12
+ export const Localities = TemplateLocalitiesAll.bind({});
@@ -194,6 +194,7 @@ export default class LocalitiesDemo extends Component {
194
194
 
195
195
  renderHeaderFilters = () => {
196
196
  const { input } = this.state;
197
+ const { usecaseFilter } = this.props;
197
198
  const inputFilter = {
198
199
  label: tr('Type in '),
199
200
  component: (
@@ -205,7 +206,7 @@ export default class LocalitiesDemo extends Component {
205
206
  />
206
207
  ),
207
208
  };
208
- return [inputFilter];
209
+ return [usecaseFilter, inputFilter];
209
210
  };
210
211
 
211
212
  renderFooterFilters = () => {
@@ -256,17 +257,12 @@ export default class LocalitiesDemo extends Component {
256
257
 
257
258
  render() {
258
259
  const { localities, error } = this.state;
259
- const { noheader } = this.props;
260
- const headerLabels = {
261
- title: tr('Localities API'),
262
- desc: tr(
263
- 'Offer autocomplete on city names, suburb names, postcodes and full addresses in some countries. Accelerate customer journey by searching on full words as well as substrings, with high flexibility on typos.'
264
- ),
265
- };
260
+ const { noheader, headerLabels, subHeader } = this.props;
266
261
  return (
267
262
  <Demo
268
263
  id="localities-demo"
269
264
  header={headerLabels}
265
+ subHeader={subHeader}
270
266
  docLink="https://developers.woosmap.com/products/localities/get-started/"
271
267
  className="demo--localities"
272
268
  footerFilters={this.renderFooterFilters()}
@@ -285,7 +281,13 @@ export default class LocalitiesDemo extends Component {
285
281
 
286
282
  LocalitiesDemo.defaultProps = {
287
283
  noheader: false,
284
+ headerLabels: {},
285
+ usecaseFilter: null,
286
+ subHeader: null,
288
287
  };
289
288
  LocalitiesDemo.propTypes = {
290
289
  noheader: PropTypes.bool,
290
+ headerLabels: PropTypes.object,
291
+ usecaseFilter: PropTypes.object,
292
+ subHeader: PropTypes.object,
291
293
  };
@@ -234,12 +234,10 @@ export default class MerchantDemo extends Component {
234
234
  if (!transaction) {
235
235
  return JSON.stringify(
236
236
  {
237
- merchants: [
238
- request.merchants.map((item) => ({
239
- dirty_name: item.dirty_name,
240
- country: item.country,
241
- })),
242
- ],
237
+ merchants: request.merchants.map((item) => ({
238
+ dirty_name: item.dirty_name,
239
+ country: item.country,
240
+ })),
243
241
  },
244
242
  null,
245
243
  2
@@ -1,7 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  import DistanceDemo from './DistanceDemo';
3
3
  import GeolocationDemo from './GeolocationDemo';
4
- import LocalitiesDemo from './LocalitiesDemo';
4
+ import LocalitiesDemo from './LocalitiesAllDemo';
5
5
  import MerchantDemo from './MerchantDemo';
6
6
  import MapDemo from './MapDemo';
7
7
  import SearchDemo from './SearchDemo';
@@ -123,12 +123,15 @@ export default class SkeletonDemo extends Component {
123
123
  if (!headerFilters) {
124
124
  return null;
125
125
  }
126
- return headerFilters.map((filter) => (
127
- <div key={filter.label || filter.key} className="demo__input-container">
128
- {filter.label ? <p className="demo__label">{filter.label}</p> : false}
129
- {filter.component}
130
- </div>
131
- ));
126
+ return headerFilters.map(
127
+ (filter) =>
128
+ filter && (
129
+ <div key={filter.label || filter.key} className={cl('demo__input-container', filter.className)}>
130
+ {filter.label ? <p className="demo__label">{filter.label}</p> : false}
131
+ {filter.component}
132
+ </div>
133
+ )
134
+ );
132
135
  };
133
136
 
134
137
  renderFooterFilters = () => {
@@ -162,6 +165,7 @@ export default class SkeletonDemo extends Component {
162
165
  docLink,
163
166
  docLabel,
164
167
  renderCode,
168
+ subHeader,
165
169
  } = this.props;
166
170
  const { copied } = this.state;
167
171
  return (
@@ -192,6 +196,7 @@ export default class SkeletonDemo extends Component {
192
196
  {docLabel || tr('Go to documentation')}
193
197
  </a>
194
198
  </p>
199
+ <div className="demo__desc">{subHeader}</div>
195
200
  </div>
196
201
  )}
197
202
  </div>
@@ -285,6 +290,7 @@ SkeletonDemo.defaultProps = {
285
290
  body: '',
286
291
  method: '',
287
292
  header: null,
293
+ subHeader: null,
288
294
  };
289
295
  SkeletonDemo.propTypes = {
290
296
  id: PropTypes.string,
@@ -305,5 +311,6 @@ SkeletonDemo.propTypes = {
305
311
  referer: PropTypes.string,
306
312
  body: PropTypes.string,
307
313
  method: PropTypes.string,
314
+ subHeader: PropTypes.object,
308
315
  response: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
309
316
  };
@@ -7,13 +7,17 @@ export default function withClickOutside(WrappedComponent, ignoreQuerySelector)
7
7
  super(props);
8
8
  const { forwardedRef } = this.props;
9
9
  this.ref = forwardedRef || React.createRef();
10
- document.addEventListener('mousedown', this.listener);
11
- document.addEventListener('touchstart', this.listener);
10
+ if (typeof window === 'object') {
11
+ document.addEventListener('mousedown', this.listener);
12
+ document.addEventListener('touchstart', this.listener);
13
+ }
12
14
  }
13
15
 
14
16
  componentWillUnmount() {
15
- document.removeEventListener('mousedown', this.listener);
16
- document.removeEventListener('touchstart', this.listener);
17
+ if (typeof window === 'object') {
18
+ document.removeEventListener('mousedown', this.listener);
19
+ document.removeEventListener('touchstart', this.listener);
20
+ }
17
21
  }
18
22
 
19
23
  listener = (event) => {
@@ -65,7 +69,7 @@ export default function withClickOutside(WrappedComponent, ignoreQuerySelector)
65
69
  disableCloseOutside: false,
66
70
  };
67
71
  WithClickOutside.propTypes = {
68
- forwardedRef: PropTypes.object,
72
+ forwardedRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
69
73
  disableCloseOutside: PropTypes.bool,
70
74
  };
71
75
 
@@ -15,6 +15,8 @@
15
15
  "Bose Reseller Store": "Bose Reseller Store",
16
16
  "Bose Store": "Bose Store",
17
17
  "Cancel": "Cancel",
18
+ "Checkout": "Checkout",
19
+ "Checkout integration: on full addresses, renders the right part of the address in the right form fields": "Checkout integration: on full addresses, renders the right part of the address in the right form fields",
18
20
  "Choose your style": "Choose your style",
19
21
  "Code": "Code",
20
22
  "Coming step": "Coming step",
@@ -60,7 +62,6 @@
60
62
  "New": "New",
61
63
  "No locality found": "No locality found",
62
64
  "No route found": "No route found",
63
- "Offer autocomplete on city names, suburb names, postcodes and full addresses in some countries. Accelerate customer journey by searching on full words as well as substrings, with high flexibility on typos.": "Offer autocomplete on city names, suburb names, postcodes and full addresses in some countries. Accelerate customer journey by searching on full words as well as substrings, with high flexibility on typos.",
64
65
  "Origin": "Origin",
65
66
  "Parking": "Parking",
66
67
  "Point of interest": "Point of interest",
@@ -79,6 +80,8 @@
79
80
  "Should be at least {{count}} chars long__plural": "Should be at least {{count}} chars long",
80
81
  "Should be at most {{count}} chars long": "Should be at most {{count}} char long",
81
82
  "Should be at most {{count}} chars long__plural": "Should be at most {{count}} chars long",
83
+ "Store Locator": "Store Locator",
84
+ "Store Locator integration: autocomplete on city names, suburb names, postcodes...": "Store Locator integration: autocomplete on city names, suburb names, postcodes...",
82
85
  "Store Search API": "Store Search API",
83
86
  "The Woosmap Distance API delivers road distance and travel time between origins and destinations, to plan a simple journey (up to 25 waypoints) or for matrix computations (up to 200 elements).": "The Woosmap Distance API delivers road distance and travel time between origins and destinations, to plan a simple journey (up to 25 waypoints) or for matrix computations (up to 200 elements).",
84
87
  "The value you’ve entered is already in the list": "The value you’ve entered is already in the list",
@@ -93,11 +96,13 @@
93
96
  "Type in an address": "Type in an address",
94
97
  "Type in an address ": "Type in an address ",
95
98
  "Types": "Types",
96
- "Usecase": "Usecase",
99
+ "Use case": "Use case",
97
100
  "Validate": "Validate",
98
101
  "Wheelchair Access": "Wheelchair Access",
102
+ "Woosmap Localities sorts and displays the 5 most relevant results, with priority to the most likely results, recognises common abbreviations and apostrophes, with high tolerance for typos.": "Woosmap Localities sorts and displays the 5 most relevant results, with priority to the most likely results, recognises common abbreviations and apostrophes, with high tolerance for typos.",
99
103
  "Woosmap Map is a vector tiles map based, which guarantees smooth zooming and panning transitions, a mobile-optimised loading and clear rendering at every scale. It provides a worldwide cover, cutting edge details and ability to display 3D buildings at closest/street zoom levels.": "Woosmap Map is a vector tiles map based, which guarantees smooth zooming and panning transitions, a mobile-optimised loading and clear rendering at every scale. It provides a worldwide cover, cutting edge details and ability to display 3D buildings at closest/street zoom levels.",
100
104
  "YOUR_KEY_HERE": "YOUR_KEY_HERE",
105
+ "You can select bewteen 2 use cases:": "You can select bewteen 2 use cases:",
101
106
  "Zoos": "Zoos",
102
107
  "http://developers.woosmap.com": "http://developers.woosmap.com",
103
108
  "near ... ": "near ... ",
@@ -15,9 +15,11 @@
15
15
  "Bose Reseller Store": "Revendeur Bose",
16
16
  "Bose Store": "Magasin Bose",
17
17
  "Cancel": "Annuler",
18
+ "Checkout": "Checkout",
19
+ "Checkout integration: on full addresses, renders the right part of the address in the right form fields": "Cas d’usage type Checkout : autocompletion sur une adresse complète pour pré-remplir les champs d’un formulaire",
18
20
  "Choose your style": "Choisir le style",
19
21
  "Code": "Code",
20
- "Coming step": "",
22
+ "Coming step": "Prochaine étape",
21
23
  "Confirm": "Confirmer",
22
24
  "Continent": "Continent",
23
25
  "Copied!": "Copié !",
@@ -60,7 +62,6 @@
60
62
  "New": "Nouveau",
61
63
  "No locality found": "Aucune localité correspondante",
62
64
  "No route found": "Aucune route correspondante",
63
- "Offer autocomplete on city names, suburb names, postcodes and full addresses in some countries. Accelerate customer journey by searching on full words as well as substrings, with high flexibility on typos.": "Woosmap Localities API permet de proposer de l’autocomplétion sur les noms de ville, les codes postaux, aéroports, stations de métro, centres commerciaux et les adresses postales complètes dans certains pays.",
64
65
  "Origin": "Départ",
65
66
  "Parking": "Parking",
66
67
  "Point of interest": "Points d'intérêt",
@@ -79,6 +80,8 @@
79
80
  "Should be at least {{count}} chars long__plural": "Ce champ doit être d'au moins {{count}} caractères",
80
81
  "Should be at most {{count}} chars long": "Ce champ doit être d'au plus {{count}} caractère",
81
82
  "Should be at most {{count}} chars long__plural": "Ce champ doit être d'au plus {{count}} caractères",
83
+ "Store Locator": "Store Locator",
84
+ "Store Locator integration: autocomplete on city names, suburb names, postcodes...": "Cas d’usage type Store Locator : autocomplétion sur les noms de ville, les codes postaux, les aéroports, les stations de métro, les centres commerciaux...",
82
85
  "Store Search API": "Store Search API",
83
86
  "The Woosmap Distance API delivers road distance and travel time between origins and destinations, to plan a simple journey (up to 25 waypoints) or for matrix computations (up to 200 elements).": "L'API Woosmap Distance fournit la distance et le temps de parcours entre 2 coordonnées géographiques pour un trajet simple (avec jusqu’à 25 points de passage) ou pour des calculs matriciels (jusqu’à 200 éléments).",
84
87
  "The value you’ve entered is already in the list": "La valeur saisie est déjà dans la liste",
@@ -93,11 +96,13 @@
93
96
  "Type in an address": "Adresse",
94
97
  "Type in an address ": "Saisir une adresse",
95
98
  "Types": "Types",
96
- "Usecase": "Cas d'utilisation",
99
+ "Use case": "Cas d'usage",
97
100
  "Validate": "Valider",
98
101
  "Wheelchair Access": "Accès handicapés",
102
+ "Woosmap Localities sorts and displays the 5 most relevant results, with priority to the most likely results, recognises common abbreviations and apostrophes, with high tolerance for typos.": "Woosmap Localities trie et affiche les 5 résultats les plus pertinents, avec en priorité les résultats les plus probables, sait reconnaître les abréviations courantes et les apostrophes en intégrant une grande tolérance aux fautes de frappe.",
99
103
  "Woosmap Map is a vector tiles map based, which guarantees smooth zooming and panning transitions, a mobile-optimised loading and clear rendering at every scale. It provides a worldwide cover, cutting edge details and ability to display 3D buildings at closest/street zoom levels.": "Woosmap Map est une carte vectorielle qui garantit une navigation fluide, sans impact sur les performances du navigateur et un téléchargement plus rapide et optimisé pour mobile.",
100
104
  "YOUR_KEY_HERE": "VOTRE_CLE_ICI",
105
+ "You can select bewteen 2 use cases:": "Vous pouvez selectionner l'un des deux cas d'usage suivants :",
101
106
  "Zoos": "Zoos",
102
107
  "http://developers.woosmap.com": "http://developers.woosmap.com",
103
108
  "near ... ": "à proximité de ... ",
@@ -251,178 +251,25 @@ $light1 = rgba(255, 255, 255, .01)
251
251
 
252
252
  $localitiesDark = rgba(0, 152, 220, 1) // #00b0ff
253
253
  $localities = rgba(0, 176, 255, 1) // #00B0FF
254
- $localities95 = rgba(0, 176, 255, .95)
255
- $localities90 = rgba(0, 176, 255, .9)
256
- $localities85 = rgba(0, 176, 255, .85)
257
- $localities80 = rgba(0, 176, 255, .8)
258
- $localities75 = rgba(0, 176, 255, .75)
259
- $localities70 = rgba(0, 176, 255, .7)
260
- $localities65 = rgba(0, 176, 255, .65)
261
- $localities60 = rgba(0, 176, 255, .6)
262
- $localities55 = rgba(0, 176, 255, .55)
263
- $localities50 = rgba(0, 176, 255, .5)
264
- $localities45 = rgba(0, 176, 255, .45)
265
- $localities40 = rgba(0, 176, 255, .4)
266
- $localities35 = rgba(0, 176, 255, .35)
267
- $localities30 = rgba(0, 176, 255, .3)
268
- $localities25 = rgba(0, 176, 255, .25)
269
- $localities20 = rgba(0, 176, 255, .2)
270
- $localities15 = rgba(0, 176, 255, .15)
271
- $localities10 = rgba(0, 176, 255, .1)
272
- $localities5 = rgba(0, 176, 255, .05)
273
254
 
274
255
  $geolocationDark = rgba(1, 175, 73, 1) // #01af49
275
- $geolocation = rgba(0, 200, 83, 1) // #81C784
276
- $geolocation95 = rgba(0, 200, 83, .95)
277
- $geolocation90 = rgba(0, 200, 83, .9)
278
- $geolocation85 = rgba(0, 200, 83, .85)
279
- $geolocation80 = rgba(0, 200, 83, .8)
280
- $geolocation75 = rgba(0, 200, 83, .75)
281
- $geolocation70 = rgba(0, 200, 83, .7)
282
- $geolocation65 = rgba(0, 200, 83, .65)
283
- $geolocation60 = rgba(0, 200, 83, .6)
284
- $geolocation55 = rgba(0, 200, 83, .55)
285
- $geolocation50 = rgba(0, 200, 83, .5)
286
- $geolocation45 = rgba(0, 200, 83, .45)
287
- $geolocation40 = rgba(0, 200, 83, .4)
288
- $geolocation35 = rgba(0, 200, 83, .35)
289
- $geolocation30 = rgba(0, 200, 83, .3)
290
- $geolocation25 = rgba(0, 200, 83, .25)
291
- $geolocation20 = rgba(0, 200, 83, .2)
292
- $geolocation15 = rgba(0, 200, 83, .15)
293
- $geolocation10 = rgba(0, 200, 83, .1)
294
- $geolocation5 = rgba(0, 200, 83, .05)
256
+ $geolocation = rgba(0, 200, 83, 1) // #00c853
295
257
 
296
258
  $distanceDark = rgba(255, 115, 0, 1) // #FF7300
297
259
  $distance = rgba(255, 145, 0, 1) // #FF9100
298
- $distance95 = rgba(255, 145, 0, .95)
299
- $distance90 = rgba(255, 145, 0, .9)
300
- $distance85 = rgba(255, 145, 0, .85)
301
- $distance80 = rgba(255, 145, 0, .8)
302
- $distance75 = rgba(255, 145, 0, .75)
303
- $distance70 = rgba(255, 145, 0, .7)
304
- $distance65 = rgba(255, 145, 0, .65)
305
- $distance60 = rgba(255, 145, 0, .6)
306
- $distance55 = rgba(255, 145, 0, .55)
307
- $distance50 = rgba(255, 145, 0, .5)
308
- $distance45 = rgba(255, 145, 0, .45)
309
- $distance40 = rgba(255, 145, 0, .4)
310
- $distance35 = rgba(255, 145, 0, .35)
311
- $distance30 = rgba(255, 145, 0, .3)
312
- $distance25 = rgba(255, 145, 0, .25)
313
- $distance20 = rgba(255, 145, 0, .2)
314
- $distance15 = rgba(255, 145, 0, .15)
315
- $distance10 = rgba(255, 145, 0, .1)
316
- $distance5 = rgba(255, 145, 0, .05)
317
260
 
318
261
  $storesDark = rgba(37, 109, 212, 1) // #256dd4
319
- $stores = rgba(56, 138, 255, 1) // #448AFF
320
- $stores95 = rgba(56, 138, 255, .95)
321
- $stores90 = rgba(56, 138, 255, .9)
322
- $stores85 = rgba(56, 138, 255, .85)
323
- $stores80 = rgba(56, 138, 255, .8)
324
- $stores75 = rgba(56, 138, 255, .75)
325
- $stores70 = rgba(56, 138, 255, .7)
326
- $stores65 = rgba(56, 138, 255, .65)
327
- $stores60 = rgba(56, 138, 255, .6)
328
- $stores55 = rgba(56, 138, 255, .55)
329
- $stores50 = rgba(56, 138, 255, .5)
330
- $stores45 = rgba(56, 138, 255, .45)
331
- $stores40 = rgba(56, 138, 255, .4)
332
- $stores35 = rgba(56, 138, 255, .35)
333
- $stores30 = rgba(56, 138, 255, .3)
334
- $stores25 = rgba(56, 138, 255, .25)
335
- $stores20 = rgba(56, 138, 255, .2)
336
- $stores15 = rgba(56, 138, 255, .15)
337
- $stores10 = rgba(56, 138, 255, .1)
338
- $stores5 = rgba(56, 138, 255, .05)
262
+ $stores = rgba(56, 138, 255, 1) // #388aff
339
263
 
340
264
  $addressDark = rgba(59, 179, 195, 1) // #38b3c3
341
- $address = rgba(77, 208, 255, 1) // #4DD0E1
342
- $address95 = rgba(77, 208, 255, .95)
343
- $address90 = rgba(77, 208, 255, .9)
344
- $address85 = rgba(77, 208, 255, .85)
345
- $address80 = rgba(77, 208, 255, .8)
346
- $address75 = rgba(77, 208, 255, .75)
347
- $address70 = rgba(77, 208, 255, .7)
348
- $address65 = rgba(77, 208, 255, .65)
349
- $address60 = rgba(77, 208, 255, .6)
350
- $address55 = rgba(77, 208, 255, .55)
351
- $address50 = rgba(77, 208, 255, .5)
352
- $address45 = rgba(77, 208, 255, .45)
353
- $address40 = rgba(77, 208, 255, .4)
354
- $address35 = rgba(77, 208, 255, .35)
355
- $address30 = rgba(77, 208, 255, .3)
356
- $address25 = rgba(77, 208, 255, .25)
357
- $address20 = rgba(77, 208, 255, .2)
358
- $address15 = rgba(77, 208, 255, .15)
359
- $address10 = rgba(77, 208, 255, .1)
360
- $address5 = rgba(77, 208, 255, .05)
265
+ $address = rgba(77, 208, 255, 1) // #4dd0ff
361
266
 
362
267
  $mapDark = rgba(134, 106, 96, 1) // #866a60
363
268
  $map = rgba(161, 136, 127, 1) // #A1887F
364
- $map95 = rgba(161, 136, 127, .95)
365
- $map90 = rgba(161, 136, 127, .9)
366
- $map85 = rgba(161, 136, 127, .85)
367
- $map80 = rgba(161, 136, 127, .8)
368
- $map75 = rgba(161, 136, 127, .75)
369
- $map70 = rgba(161, 136, 127, .7)
370
- $map65 = rgba(161, 136, 127, .65)
371
- $map60 = rgba(161, 136, 127, .6)
372
- $map55 = rgba(161, 136, 127, .55)
373
- $map50 = rgba(161, 136, 127, .5)
374
- $map45 = rgba(161, 136, 127, .45)
375
- $map40 = rgba(161, 136, 127, .4)
376
- $map35 = rgba(161, 136, 127, .35)
377
- $map30 = rgba(161, 136, 127, .3)
378
- $map25 = rgba(161, 136, 127, .25)
379
- $map20 = rgba(161, 136, 127, .2)
380
- $map15 = rgba(161, 136, 127, .15)
381
- $map10 = rgba(161, 136, 127, .1)
382
- $map5 = rgba(161, 136, 127, .05)
383
-
384
269
 
385
270
 
386
271
  $merchantDark = rgba(81, 107, 119, 1) // #516b77
387
272
  $merchant = rgba(120, 144, 156, 1) // #78909C
388
- $merchant95 = rgba(120, 144, 156, .95)
389
- $merchant90 = rgba(120, 144, 156, .9)
390
- $merchant85 = rgba(120, 144, 156, .85)
391
- $merchant80 = rgba(120, 144, 156, .8)
392
- $merchant75 = rgba(120, 144, 156, .75)
393
- $merchant70 = rgba(120, 144, 156, .7)
394
- $merchant65 = rgba(120, 144, 156, .65)
395
- $merchant60 = rgba(120, 144, 156, .6)
396
- $merchant55 = rgba(120, 144, 156, .55)
397
- $merchant50 = rgba(120, 144, 156, .5)
398
- $merchant45 = rgba(120, 144, 156, .45)
399
- $merchant40 = rgba(120, 144, 156, .4)
400
- $merchant35 = rgba(120, 144, 156, .35)
401
- $merchant30 = rgba(120, 144, 156, .3)
402
- $merchant25 = rgba(120, 144, 156, .25)
403
- $merchant20 = rgba(120, 144, 156, .2)
404
- $merchant15 = rgba(120, 144, 156, .15)
405
- $merchant10 = rgba(120, 144, 156, .1)
406
- $merchant5 = rgba(120, 144, 156, .05)
407
273
 
408
274
  $trafficDark = rgba(2165, 46, 111, 1)// #D82E6F
409
- $traffic = rgba(255, 124, 129, 1) // #FF4081
410
- $traffic95 = rgba(255, 124, 129, .95)
411
- $traffic90 = rgba(255, 124, 129, .9)
412
- $traffic85 = rgba(255, 124, 129, .85)
413
- $traffic80 = rgba(255, 124, 129, .8)
414
- $traffic75 = rgba(255, 124, 129, .75)
415
- $traffic70 = rgba(255, 124, 129, .7)
416
- $traffic65 = rgba(255, 124, 129, .65)
417
- $traffic60 = rgba(255, 124, 129, .6)
418
- $traffic55 = rgba(255, 124, 129, .55)
419
- $traffic50 = rgba(255, 124, 129, .5)
420
- $traffic45 = rgba(255, 124, 129, .45)
421
- $traffic40 = rgba(255, 124, 129, .4)
422
- $traffic35 = rgba(255, 124, 129, .35)
423
- $traffic30 = rgba(255, 124, 129, .3)
424
- $traffic25 = rgba(255, 124, 129, .25)
425
- $traffic20 = rgba(255, 124, 129, .2)
426
- $traffic15 = rgba(255, 124, 129, .15)
427
- $traffic10 = rgba(255, 124, 129, .1)
428
- $traffic5 = rgba(255, 124, 129, .05)
275
+ $traffic = rgba(255, 124, 129, 1) // #ff7c81
@@ -62,6 +62,7 @@ $mapHeight = 36rem
62
62
  max-height 49.1rem!important
63
63
  .demo__map
64
64
  height 54rem
65
+ width 50rem
65
66
  &--map
66
67
  .demo__map
67
68
  width 55rem
@@ -89,7 +90,13 @@ $mapHeight = 36rem
89
90
  a
90
91
  color $primary
91
92
  font-weight 600
92
- cursor pointer
93
+ cursor pointer
94
+ &__list
95
+ margin-left 6rem
96
+ li
97
+ list-style disc
98
+ list-style-position inside
99
+ margin-bottom 1rem
93
100
  &__cost
94
101
  display block
95
102
  margin-bottom 1rem
@@ -417,6 +424,10 @@ $mapHeight = 36rem
417
424
  .demo
418
425
  &__input-container
419
426
  margin-right 0
427
+ .demo--localities &
428
+ .demo__input-container
429
+ &:first-child
430
+ margin-bottom 3rem
420
431
  &__input-container
421
432
  align-items flex-start
422
433
  flex-direction column
@@ -495,6 +506,12 @@ $mapHeight = 36rem
495
506
  font-size 80% !important
496
507
  .demo--merchant &
497
508
  justify-content center
509
+ &.demo--localities
510
+ .demo
511
+ &__content-header
512
+ flex-direction column
513
+ &__input-container
514
+ margin-right 0
498
515
  @media screen and (max-width 440px)
499
516
  .demo
500
517
  &.demo--distance
@@ -548,6 +565,9 @@ $mapHeight = 36rem
548
565
  font-size 1.4rem
549
566
  height 3.6rem
550
567
  padding 0 .8rem
568
+ &__desc
569
+ &__list
570
+ margin-left 2rem
551
571
 
552
572
  @media screen and (max-width 370px)
553
573
  .demo
@@ -2,6 +2,7 @@
2
2
  $mapWidth = 40rem
3
3
  $mapWidthSmall = 40rem
4
4
  $mapHeight = 36rem
5
+ $bigMapHeight = 59.5rem
5
6
 
6
7
  // Overall style
7
8
  .demo
@@ -27,6 +28,10 @@ $mapHeight = 36rem
27
28
  max-height 57rem
28
29
  .demo__label
29
30
  white-space normal
31
+ &--localities
32
+ .tab__content
33
+ height 55rem
34
+ max-height 55rem
30
35
  &--map
31
36
  .tab__content
32
37
  height 49.6rem
@@ -95,10 +100,18 @@ $mapHeight = 36rem
95
100
  font-weight 400
96
101
  line-height 3.2rem
97
102
  margin-bottom 3rem
103
+ &__list
104
+ margin-left 60px
105
+ li
106
+ list-style disc
107
+ list-style-position inside
108
+ margin 5px 0 5px 0
98
109
  a
99
110
  color $primary
100
111
  font-weight 600
101
- cursor pointer
112
+ cursor pointer
113
+ p
114
+ margin-bottom 20px
102
115
  &__cost
103
116
  display block
104
117
  margin-bottom 1rem
@@ -147,14 +160,13 @@ $mapHeight = 36rem
147
160
  .demo--distance &
148
161
  .demo--address &
149
162
  .demo--localitiesaddress &
163
+ .demo--localities &
150
164
  margin-bottom 1rem
151
165
  .demo__input-container
152
166
  margin-bottom 2rem
153
- .demo--localitiesaddress &
154
- .demo__input-container
155
- width 100%
156
167
  .demo--address &
157
168
  .demo--localitiesaddress &
169
+ .demo--localities &
158
170
  mbi(4)
159
171
  flex-wrap nowrap
160
172
  > :nth-child(2)
@@ -215,6 +227,8 @@ $mapHeight = 36rem
215
227
  button
216
228
  &:focus
217
229
  box-shadow 0 0 0 .1rem $focus
230
+ .demo--localities &
231
+ height $bigMapHeight
218
232
  &__results
219
233
  background $result
220
234
  width 30rem
@@ -222,6 +236,8 @@ $mapHeight = 36rem
222
236
  max-height $mapHeight
223
237
  box-shadow 0 0 1rem $dark15
224
238
  z-index 2
239
+ .demo--localities &
240
+ max-height unset
225
241
  .demo--localities--uk &
226
242
  width 50rem
227
243
  max-height unset
@@ -280,6 +296,7 @@ $mapHeight = 36rem
280
296
  background-color #f3f9fd
281
297
  .demo--address &
282
298
  .demo--localitiesaddress &
299
+ .demo--localities &
283
300
  height auto
284
301
  .localities-matched
285
302
  background-color $resultMatch
@@ -402,9 +419,6 @@ $mapHeight = 36rem
402
419
  width 100%
403
420
  flexAxis()
404
421
  @media screen and (max-width 960px)
405
- .demo.demo--localities
406
- .demo__input-container
407
- margin-right 0
408
422
  .demo
409
423
  &__results
410
424
  &__content
@@ -446,6 +460,12 @@ $mapHeight = 36rem
446
460
  font-size $inputFontSize - .2
447
461
  .demo--merchant &
448
462
  justify-content center
463
+ &.demo--localities
464
+ .demo
465
+ &__content-header
466
+ flex-direction column
467
+ &__input-container
468
+ margin-right 0
449
469
  @media screen and (max-width 440px)
450
470
  .demo
451
471
  &.demo--distance
@@ -498,7 +518,9 @@ $mapHeight = 36rem
498
518
  font-size 1.4rem
499
519
  height 3.6rem
500
520
  padding 0 .8rem
501
-
521
+ &__desc
522
+ &__list
523
+ margin-left 20px
502
524
  @media screen and (max-width 370px)
503
525
  .demo
504
526
  &.demo--merchant