@woosmap/ui 4.221.0 → 4.222.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.
Files changed (137) hide show
  1. package/package.json +108 -120
  2. package/src/components/Button/Button.js +2 -2
  3. package/src/components/Button/Button.stories.js +5 -5
  4. package/src/components/Button/Button.test.js +1 -1
  5. package/src/components/Button/ButtonSwitch.js +1 -1
  6. package/src/components/Button/ButtonWithDropdown.js +3 -3
  7. package/src/components/Button/ButtonWithDropdown.test.js +1 -1
  8. package/src/components/Card/Card.js +29 -29
  9. package/src/components/Card/Card.stories.js +6 -6
  10. package/src/components/Card/Card.test.js +1 -1
  11. package/src/components/Card/SimpleCard.js +2 -2
  12. package/src/components/Card/SimpleCard.test.js +1 -1
  13. package/src/components/CodeSnippet/CodeSnippet.stories.js +1 -1
  14. package/src/components/CodeSnippet/CodeSnippet.test.js +1 -1
  15. package/src/components/CopyClipboardButton/CopyClipboardButton.js +3 -3
  16. package/src/components/CopyClipboardButton/CopyToClipboard.stories.js +1 -1
  17. package/src/components/CopyClipboardButton/CopyToClipboard.test.js +1 -1
  18. package/src/components/DateTime/DateTime.stories.js +1 -1
  19. package/src/components/DateTime/DateTime.test.js +1 -1
  20. package/src/components/Demo/AddressDemo.js +10 -10
  21. package/src/components/Demo/AddressDemo.stories.js +1 -1
  22. package/src/components/Demo/AutocompleteAddressDemo.js +10 -10
  23. package/src/components/Demo/AutocompleteAddressDemo.stories.js +2 -2
  24. package/src/components/Demo/DistanceDemo.js +12 -12
  25. package/src/components/Demo/DistanceDemo.stories.js +1 -1
  26. package/src/components/Demo/DistanceDemo.test.js +1 -1
  27. package/src/components/Demo/GeolocationDemo.js +7 -7
  28. package/src/components/Demo/GeolocationDemo.stories.js +1 -1
  29. package/src/components/Demo/GeolocationDemo.test.js +1 -1
  30. package/src/components/Demo/LocalitiesAddressDemo.js +8 -8
  31. package/src/components/Demo/LocalitiesAddressDemo.stories.js +1 -1
  32. package/src/components/Demo/LocalitiesAllDemo.js +5 -5
  33. package/src/components/Demo/LocalitiesAllDemo.stories.js +1 -1
  34. package/src/components/Demo/LocalitiesDemo.js +10 -10
  35. package/src/components/Demo/LocalitiesDemo.stories.js +1 -1
  36. package/src/components/Demo/LocalitiesFRAddressDemo.js +239 -261
  37. package/src/components/Demo/LocalitiesFRAddressDemo.stories.js +2 -2
  38. package/src/components/Demo/LocalitiesUKAddressDemo.js +271 -294
  39. package/src/components/Demo/LocalitiesUKAddressDemo.stories.js +1 -1
  40. package/src/components/Demo/MapDemo.js +231 -233
  41. package/src/components/Demo/MapDemo.stories.js +1 -1
  42. package/src/components/Demo/SearchDemo.js +9 -9
  43. package/src/components/Demo/SearchDemo.stories.js +1 -1
  44. package/src/components/Demo/SearchDemo.test.js +1 -1
  45. package/src/components/Demo/Showcase.stories.js +7 -7
  46. package/src/components/Demo/SkeletonDemo.js +8 -8
  47. package/src/components/Demo/SkeletonDemo.stories.js +2 -2
  48. package/src/components/Demo/SkeletonDemo.test.js +2 -2
  49. package/src/components/Demo/W3WDemo.js +9 -9
  50. package/src/components/Demo/W3WDemo.stories.js +2 -2
  51. package/src/components/Dropdown/Dropdown.js +4 -4
  52. package/src/components/Dropdown/Dropdown.stories.js +1 -1
  53. package/src/components/Dropdown/Dropdown.test.js +1 -1
  54. package/src/components/DynamicTag/DynamicTag.js +5 -5
  55. package/src/components/DynamicTag/DynamicTag.stories.js +1 -1
  56. package/src/components/DynamicTag/DynamicTag.test.js +1 -1
  57. package/src/components/Flash/Flash.js +1 -1
  58. package/src/components/Flash/Flash.stories.js +1 -1
  59. package/src/components/Flash/Flash.test.js +1 -1
  60. package/src/components/Icon/Icon.js +409 -409
  61. package/src/components/Icon/Icon.stories.js +1 -1
  62. package/src/components/Icon/Icon.test.js +1 -1
  63. package/src/components/Icon/WebSiteIcon.js +231 -231
  64. package/src/components/InfoMessage/Flash.js +1 -1
  65. package/src/components/InfoMessage/InfoMessage.js +2 -2
  66. package/src/components/InfoMessage/InfoMessage.stories.js +1 -1
  67. package/src/components/InfoMessage/InfoMessage.test.js +1 -1
  68. package/src/components/Input/Input.js +2 -2
  69. package/src/components/Input/Input.password.test.js +1 -1
  70. package/src/components/Input/Input.stories.js +1 -1
  71. package/src/components/Input/Input.test.js +1 -1
  72. package/src/components/Label/Label.js +1 -1
  73. package/src/components/Label/Label.stories.js +1 -1
  74. package/src/components/Label/Label.test.js +1 -1
  75. package/src/components/Map/InfoWindow.test.js +1 -1
  76. package/src/components/Map/Map.stories.js +3 -3
  77. package/src/components/Map/Marker.test.js +1 -1
  78. package/src/components/Map/drawOnMap.test.js +2 -10
  79. package/src/components/Modal/ConfirmationModal.js +2 -2
  80. package/src/components/Modal/ConfirmationModal.test.js +1 -1
  81. package/src/components/Modal/Modal.js +6 -6
  82. package/src/components/Modal/Modal.stories.js +3 -3
  83. package/src/components/Modal/Modal.test.js +1 -1
  84. package/src/components/OfflineChatBot/OfflineChatBot.js +4 -4
  85. package/src/components/OfflineChatBot/OfflineChatBot.stories.js +2 -2
  86. package/src/components/Panel/Panel.js +2 -2
  87. package/src/components/Panel/Panel.stories.js +2 -2
  88. package/src/components/Panel/Panel.test.js +1 -1
  89. package/src/components/PasswordStrengthBar/PasswordStrengthBar.stories.js +1 -1
  90. package/src/components/PasswordStrengthBar/PasswordStrengthBar.test.js +1 -1
  91. package/src/components/Popover/ConfirmationPopover.js +3 -3
  92. package/src/components/Popover/ConfirmationPopover.test.js +1 -1
  93. package/src/components/Popover/Popover.js +1 -1
  94. package/src/components/Popover/Popover.stories.js +3 -3
  95. package/src/components/Popover/Popover.test.js +2 -2
  96. package/src/components/PricingSlider/PricingData.js +97 -107
  97. package/src/components/PricingSlider/PricingSimulator.js +3 -3
  98. package/src/components/PricingSlider/PricingSimulator.stories.js +1 -1
  99. package/src/components/PricingSlider/PricingSlider.js +4 -5
  100. package/src/components/ProgressBar/ProgressBar.js +1 -1
  101. package/src/components/ProgressBar/ProgressBar.stories.js +1 -1
  102. package/src/components/ProgressBar/ProgressBar.test.js +1 -1
  103. package/src/components/ScrollBar/ScrollBar.stories.js +1 -1
  104. package/src/components/ScrollBar/ScrollBar.test.js +1 -1
  105. package/src/components/Select/Select.stories.js +4 -4
  106. package/src/components/Select/TagSelect.test.js +1 -1
  107. package/src/components/ServiceMessage/ServiceMessage.js +1 -1
  108. package/src/components/ServiceMessage/ServiceMessage.stories.js +2 -2
  109. package/src/components/SnackBar/SnackBar.js +2 -2
  110. package/src/components/SnackBar/SnackBar.stories.js +3 -3
  111. package/src/components/SnackBar/SnackBar.test.js +3 -3
  112. package/src/components/SnackBar/withSnackBar.js +1 -1
  113. package/src/components/Stepper/Stepper.js +2 -2
  114. package/src/components/Stepper/Stepper.stories.js +1 -1
  115. package/src/components/Switch/Switch.stories.js +1 -1
  116. package/src/components/Switch/Switch.test.js +1 -1
  117. package/src/components/Tab/Tab.js +1 -1
  118. package/src/components/Tab/Tab.stories.js +1 -1
  119. package/src/components/Tooltip/Tooltip.stories.js +1 -1
  120. package/src/components/Tooltip/Tooltip.test.js +1 -1
  121. package/src/components/UseCase/UseCase.js +9 -9
  122. package/src/components/UseCase/UseCase.stories.js +4 -4
  123. package/src/components/Woosmap/AddressAutocomplete.js +3 -3
  124. package/src/components/Woosmap/LocalitiesAutocomplete.js +1 -1
  125. package/src/components/Woosmap/Woosmap.stories.js +3 -3
  126. package/src/components/utils/Script.test.js +1 -1
  127. package/src/components/utils/locale.js +2 -2
  128. package/src/components/withClickOutside/withClickOutside.test.js +1 -1
  129. package/src/components/withFormValidation/withFormValidation.js +2 -2
  130. package/src/components/withFormValidation/withFormValidation.stories.js +2 -2
  131. package/src/components/withFormValidation/withFormValidation.test.js +2 -2
  132. package/src/index.js +61 -61
  133. package/src/locales/en/translation.json +143 -128
  134. package/src/locales/fr/translation.json +143 -128
  135. package/src/styles/console/pricing-slider-back.styl +593 -0
  136. package/src/website.js +25 -25
  137. package/craco.config.js +0 -9
@@ -1,58 +1,58 @@
1
1
  /* eslint-disable */
2
- import React, { Component } from "react";
3
- import PropTypes from "prop-types";
4
- import Demo from "@/components/Demo/SkeletonDemo";
5
- import Button from "@/components/Button/Button";
6
- import ButtonGroup from "@/components/Button/ButtonGroup";
7
- import marker from "@/images/marker.png";
8
- import markerAlt from "@/images/marker-alt.png";
9
- import { tr } from "@/components/utils/locale";
10
- import Input from "@/components/Input/Input";
2
+ import React, { Component } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import Demo from './SkeletonDemo';
5
+ import Button from '../Button/Button';
6
+ import ButtonGroup from '../Button/ButtonGroup';
7
+ import marker from '../../images/marker.png';
8
+ import markerAlt from '../../images/marker-alt.png';
9
+ import { tr } from '../utils/locale';
10
+ import Input from '../Input/Input';
11
11
 
12
12
  export default class MapDemo extends Component {
13
- constructor(props) {
14
- super(props);
15
- this.state = {
16
- style: "default",
17
- hasStores: false,
18
- hasPois: true,
19
- };
20
- this.map = null;
21
- this.marker = null;
22
- this.mounted = true;
23
- this.viewport = null;
24
- this.demoRef = React.createRef();
25
- }
13
+ constructor(props) {
14
+ super(props);
15
+ this.state = {
16
+ style: 'default',
17
+ hasStores: false,
18
+ hasPois: true,
19
+ };
20
+ this.map = null;
21
+ this.marker = null;
22
+ this.mounted = true;
23
+ this.viewport = null;
24
+ this.demoRef = React.createRef();
25
+ }
26
26
 
27
- componentDidMount() {
28
- this.displayMap();
29
- }
27
+ componentDidMount() {
28
+ this.displayMap();
29
+ }
30
30
 
31
- componentWillUnmount() {
32
- this.mounted = false;
33
- }
31
+ componentWillUnmount() {
32
+ this.mounted = false;
33
+ }
34
34
 
35
- renderCode = () => {
36
- const { style, hasStores, hasPois } = this.state;
35
+ renderCode = () => {
36
+ const { style, hasStores, hasPois } = this.state;
37
37
 
38
- let styleColor = "";
39
- if (style === "grey") {
40
- styleColor = `
38
+ let styleColor = '';
39
+ if (style === 'grey') {
40
+ styleColor = `
41
41
  {featureType: "all", stylers:[{"saturation": -100, "lightness": -30}]},`;
42
- }
43
- if (style === "lightgrey") {
44
- styleColor = `
42
+ }
43
+ if (style === 'lightgrey') {
44
+ styleColor = `
45
45
  {featureType: "all", stylers:[{"saturation": -100}]},`;
46
- }
47
- if (style === "blue") {
48
- styleColor = `
46
+ }
47
+ if (style === 'blue') {
48
+ styleColor = `
49
49
  {featureType: "all", stylers:[{"hue": "#4998ff"}, {gamma:0.5}]},`;
50
- }
51
- const styleConf = `[${styleColor}
52
- {featureType: "poi", stylers:[{"visibility":"${hasPois ? "on" : "off"}"}]}
50
+ }
51
+ const styleConf = `[${styleColor}
52
+ {featureType: "poi", stylers:[{"visibility":"${hasPois ? 'on' : 'off'}"}]}
53
53
  ]`;
54
- const stores = hasStores
55
- ? `
54
+ const stores = hasStores
55
+ ? `
56
56
  const storesOverlay = new window.woosmap.map.StoresOverlay({
57
57
  breakPoint: 14,
58
58
  rules: [],
@@ -78,9 +78,9 @@ const storesOverlay = new window.woosmap.map.StoresOverlay({
78
78
  });
79
79
  storesOverlay.setMap(map);
80
80
  `
81
- : "";
81
+ : '';
82
82
 
83
- return `const map = new window.woosmap.map.Map(document.getElementById('map'), {
83
+ return `const map = new window.woosmap.map.Map(document.getElementById('map'), {
84
84
  styles: ${styleConf},
85
85
  center: {
86
86
  lat: 51.52,
@@ -91,216 +91,214 @@ storesOverlay.setMap(map);
91
91
 
92
92
  ${stores}
93
93
  `;
94
- };
95
-
96
- renderHeaderFilters = () => {
97
- const { style } = this.state;
98
-
99
- const styleChoice = {
100
- key: "usecase",
101
- label: tr("Choose your style"),
102
- component: (
103
- <ButtonGroup isLight key="usecase">
104
- <Button
105
- type="group"
106
- active={style === "default"}
107
- onClick={() => {
108
- this.setState({ style: "default" }, this.displayMap);
109
- }}
110
- label={tr("Default")}
111
- />
112
- <Button
113
- type="group"
114
- active={style === "blue"}
115
- onClick={() => {
116
- this.setState({ style: "blue" }, this.displayMap);
117
- }}
118
- label={tr("Blue")}
119
- />
120
- <Button
121
- type="group"
122
- active={style === "lightgrey"}
123
- onClick={() => {
124
- this.setState({ style: "lightgrey" }, this.displayMap);
125
- }}
126
- label={tr("Light Grey")}
127
- />
128
- <Button
129
- type="group"
130
- active={style === "grey"}
131
- onClick={() => {
132
- this.setState({ style: "grey" }, this.displayMap);
133
- }}
134
- label={tr("Grey")}
135
- />
136
- </ButtonGroup>
137
- ),
138
94
  };
139
95
 
140
- return [styleChoice];
141
- };
96
+ renderHeaderFilters = () => {
97
+ const { style } = this.state;
142
98
 
143
- renderFooterFilters = () => {
144
- const { hasStores, hasPois } = this.state;
145
- const filterPois = {
146
- label: "",
147
- key: "pois",
148
- component: (
149
- <Input
150
- label={tr("Display Map POIs")}
151
- type="checkbox"
152
- checked={hasPois}
153
- onChange={(e) => {
154
- this.setState({ hasPois: e.target.checked }, this.displayMap);
155
- }}
156
- />
157
- ),
158
- };
99
+ const styleChoice = {
100
+ key: 'usecase',
101
+ label: tr('Choose your style'),
102
+ component: (
103
+ <ButtonGroup isLight key="usecase">
104
+ <Button
105
+ type="group"
106
+ active={style === 'default'}
107
+ onClick={() => {
108
+ this.setState({ style: 'default' }, this.displayMap);
109
+ }}
110
+ label={tr('Default')}
111
+ />
112
+ <Button
113
+ type="group"
114
+ active={style === 'blue'}
115
+ onClick={() => {
116
+ this.setState({ style: 'blue' }, this.displayMap);
117
+ }}
118
+ label={tr('Blue')}
119
+ />
120
+ <Button
121
+ type="group"
122
+ active={style === 'lightgrey'}
123
+ onClick={() => {
124
+ this.setState({ style: 'lightgrey' }, this.displayMap);
125
+ }}
126
+ label={tr('Light Grey')}
127
+ />
128
+ <Button
129
+ type="group"
130
+ active={style === 'grey'}
131
+ onClick={() => {
132
+ this.setState({ style: 'grey' }, this.displayMap);
133
+ }}
134
+ label={tr('Grey')}
135
+ />
136
+ </ButtonGroup>
137
+ ),
138
+ };
159
139
 
160
- const filterStores = {
161
- label: "",
162
- key: "stores",
163
- component: (
164
- <Input
165
- label={tr("Display Woosmap Stores overlay")}
166
- type="checkbox"
167
- checked={hasStores}
168
- onChange={(e) => {
169
- this.setState({ hasStores: e.target.checked }, this.displayMap);
170
- }}
171
- />
172
- ),
140
+ return [styleChoice];
173
141
  };
174
- return [filterPois, filterStores];
175
- };
176
142
 
177
- displayMap = () => {
178
- const { style, hasStores, hasPois } = this.state;
143
+ renderFooterFilters = () => {
144
+ const { hasStores, hasPois } = this.state;
145
+ const filterPois = {
146
+ label: '',
147
+ key: 'pois',
148
+ component: (
149
+ <Input
150
+ label={tr('Display Map POIs')}
151
+ type="checkbox"
152
+ checked={hasPois}
153
+ onChange={(e) => {
154
+ this.setState({ hasPois: e.target.checked }, this.displayMap);
155
+ }}
156
+ />
157
+ ),
158
+ };
179
159
 
180
- if (this.timeoutMap) {
181
- clearTimeout(this.timeoutMap);
182
- }
160
+ const filterStores = {
161
+ label: '',
162
+ key: 'stores',
163
+ component: (
164
+ <Input
165
+ label={tr('Display Woosmap Stores overlay')}
166
+ type="checkbox"
167
+ checked={hasStores}
168
+ onChange={(e) => {
169
+ this.setState({ hasStores: e.target.checked }, this.displayMap);
170
+ }}
171
+ />
172
+ ),
173
+ };
174
+ return [filterPois, filterStores];
175
+ };
183
176
 
184
- const MapHTMLElement = this.demoRef?.current?.getMap();
177
+ displayMap = () => {
178
+ const { style, hasStores, hasPois } = this.state;
185
179
 
186
- if (window?.woosmap?.map && MapHTMLElement) {
187
- window.woosmap.map.config.setApiKey(
188
- "woos-48c80350-88aa-333e-835a-07f4b658a9a4",
189
- );
180
+ if (this.timeoutMap) {
181
+ clearTimeout(this.timeoutMap);
182
+ }
190
183
 
191
- if (!this.storesOverlay) {
192
- this.storesOverlay = new window.woosmap.map.StoresOverlay({
193
- breakPoint: 14,
194
- rules: [],
195
- default: {
196
- color: "#5586f7",
197
- size: 8,
198
- minSize: 1,
199
- icon: {
200
- url: marker,
201
- scaledSize: {
202
- height: 46,
203
- width: 30,
204
- },
205
- },
206
- selectedIcon: {
207
- url: markerAlt,
208
- scaledSize: {
209
- height: 46,
210
- width: 30,
211
- },
212
- },
213
- },
214
- });
215
- }
184
+ const MapHTMLElement = this.demoRef?.current?.getMap();
216
185
 
217
- const styles = [
218
- {
219
- featureType: "point_of_interest",
220
- stylers: [{ visibility: hasPois ? "on" : "off" }],
221
- },
222
- ];
223
- const colorStyle = this.applyStyle(style);
186
+ if (window?.woosmap?.map && MapHTMLElement) {
187
+ window.woosmap.map.config.setApiKey('woos-48c80350-88aa-333e-835a-07f4b658a9a4');
224
188
 
225
- if (colorStyle) {
226
- styles.push(colorStyle);
227
- }
228
- if (!this.map) {
229
- this.map = new window.woosmap.map.Map(MapHTMLElement, {
230
- styles,
231
- center: {
232
- lat: 51.51,
233
- lng: -0.12,
234
- },
235
- zoom: 15,
236
- });
237
- } else {
238
- this.map._style.setMapStyle(styles);
239
- }
189
+ if (!this.storesOverlay) {
190
+ this.storesOverlay = new window.woosmap.map.StoresOverlay({
191
+ breakPoint: 14,
192
+ rules: [],
193
+ default: {
194
+ color: '#5586f7',
195
+ size: 8,
196
+ minSize: 1,
197
+ icon: {
198
+ url: marker,
199
+ scaledSize: {
200
+ height: 46,
201
+ width: 30,
202
+ },
203
+ },
204
+ selectedIcon: {
205
+ url: markerAlt,
206
+ scaledSize: {
207
+ height: 46,
208
+ width: 30,
209
+ },
210
+ },
211
+ },
212
+ });
213
+ }
240
214
 
241
- if (hasStores) {
242
- this.storesOverlay.setMap(this.map);
243
- } else {
244
- this.storesOverlay.setMap(null);
245
- }
215
+ const styles = [
216
+ {
217
+ featureType: 'point_of_interest',
218
+ stylers: [{ visibility: hasPois ? 'on' : 'off' }],
219
+ },
220
+ ];
221
+ const colorStyle = this.applyStyle(style);
246
222
 
247
- this.forceUpdate();
248
- } else {
249
- this.timeoutMap = setTimeout(this.displayMap, 300);
250
- }
251
- };
223
+ if (colorStyle) {
224
+ styles.push(colorStyle);
225
+ }
226
+ if (!this.map) {
227
+ this.map = new window.woosmap.map.Map(MapHTMLElement, {
228
+ styles,
229
+ center: {
230
+ lat: 51.51,
231
+ lng: -0.12,
232
+ },
233
+ zoom: 15,
234
+ });
235
+ } else {
236
+ this.map._style.setMapStyle(styles);
237
+ }
252
238
 
253
- applyStyle = (style) => {
254
- if (style === "grey") {
255
- return {
256
- featureType: "all",
257
- stylers: [{ saturation: -100, lightness: -30 }],
258
- };
259
- }
260
- if (style === "lightgrey") {
261
- return { featureType: "all", stylers: [{ saturation: -100 }] };
262
- }
263
- if (style === "blue") {
264
- return {
265
- featureType: "all",
266
- stylers: [{ hue: "#4998ff" }, { gamma: 0.3 }],
267
- };
268
- }
269
- return null;
270
- };
239
+ if (hasStores) {
240
+ this.storesOverlay.setMap(this.map);
241
+ } else {
242
+ this.storesOverlay.setMap(null);
243
+ }
271
244
 
272
- render() {
273
- const { noheader } = this.props;
245
+ this.forceUpdate();
246
+ } else {
247
+ this.timeoutMap = setTimeout(this.displayMap, 300);
248
+ }
249
+ };
274
250
 
275
- const headerLabels = {
276
- title: tr("Map API"),
277
- desc: tr(
278
- "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.",
279
- ),
251
+ applyStyle = (style) => {
252
+ if (style === 'grey') {
253
+ return {
254
+ featureType: 'all',
255
+ stylers: [{ saturation: -100, lightness: -30 }],
256
+ };
257
+ }
258
+ if (style === 'lightgrey') {
259
+ return { featureType: 'all', stylers: [{ saturation: -100 }] };
260
+ }
261
+ if (style === 'blue') {
262
+ return {
263
+ featureType: 'all',
264
+ stylers: [{ hue: '#4998ff' }, { gamma: 0.3 }],
265
+ };
266
+ }
267
+ return null;
280
268
  };
281
269
 
282
- return (
283
- <Demo
284
- ref={this.demoRef}
285
- header={headerLabels}
286
- id="map-demo"
287
- className="demo--map"
288
- footerFilters={this.renderFooterFilters()}
289
- headerFilters={this.renderHeaderFilters()}
290
- renderCode={this.renderCode}
291
- noheader={noheader}
292
- referer="http://localhost/"
293
- withMap
294
- response={null}
295
- />
296
- );
297
- }
270
+ render() {
271
+ const { noheader } = this.props;
272
+
273
+ const headerLabels = {
274
+ title: tr('Map API'),
275
+ desc: tr(
276
+ '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.'
277
+ ),
278
+ };
279
+
280
+ return (
281
+ <Demo
282
+ ref={this.demoRef}
283
+ header={headerLabels}
284
+ id="map-demo"
285
+ className="demo--map"
286
+ footerFilters={this.renderFooterFilters()}
287
+ headerFilters={this.renderHeaderFilters()}
288
+ renderCode={this.renderCode}
289
+ noheader={noheader}
290
+ referer="http://localhost/"
291
+ withMap
292
+ response={null}
293
+ />
294
+ );
295
+ }
298
296
  }
299
297
 
300
298
  MapDemo.defaultProps = {
301
- noheader: false,
299
+ noheader: false,
302
300
  };
303
301
 
304
302
  MapDemo.propTypes = {
305
- noheader: PropTypes.bool,
303
+ noheader: PropTypes.bool,
306
304
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import MapDemo from '@/components/Demo/MapDemo';
2
+ import MapDemo from './MapDemo';
3
3
 
4
4
  const Story = {
5
5
  title: 'demo/Map',
@@ -2,17 +2,17 @@ import axios from 'axios';
2
2
  import cl from 'classnames';
3
3
  import React, { Component } from 'react';
4
4
  import PropTypes from 'prop-types';
5
- import markerIcon from '@/images/marker.png';
6
- import markerIconAlt from '@/images/marker-alt.png';
7
- import Demo from '@/components/Demo/SkeletonDemo';
8
- import Input from '@/components/Input/Input';
9
- import Constants from '@/Constants';
5
+ import markerIcon from '../../images/marker.png';
6
+ import markerIconAlt from '../../images/marker-alt.png';
7
+ import Demo from './SkeletonDemo';
8
+ import Input from '../Input/Input';
9
+ import Constants from '../../Constants';
10
10
  /* eslint-disable import/no-named-as-default */
11
11
  /* eslint-disable import/no-named-as-default-member */
12
- import FilterSelect from '@/components/Select/FilterSelect';
13
- import LocalitiesAutocomplete from '@/components/Woosmap/LocalitiesAutocomplete';
14
- import { tr } from '@/components/utils/locale';
15
- import { createWoosmapMap } from '@/components/Map/drawOnMap';
12
+ import FilterSelect from '../Select/FilterSelect';
13
+ import LocalitiesAutocomplete from '../Woosmap/LocalitiesAutocomplete';
14
+ import { tr } from '../utils/locale';
15
+ import { createWoosmapMap } from '../Map/drawOnMap';
16
16
  import 'resize-observer-polyfill/dist/ResizeObserver.global';
17
17
 
18
18
  export default class SearchDemo extends Component {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import SearchDemo from '@/components/Demo/SearchDemo';
2
+ import SearchDemo from './SearchDemo';
3
3
 
4
4
  const Story = {
5
5
  title: 'demo/Search',
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { fireEvent, render, screen } from '@testing-library/react';
4
4
  import '@testing-library/jest-dom/extend-expect';
5
5
 
6
- import SearchDemo from '@/components/Demo/SearchDemo';
6
+ import SearchDemo from './SearchDemo';
7
7
 
8
8
  it('renders a SearchDemo', () => {
9
9
  const { container } = render(<SearchDemo />);
@@ -1,11 +1,11 @@
1
1
  import React, { Component } from 'react';
2
- import { changeLanguage } from '@/components/utils/locale';
3
- import TrackEventContext from '@/components/utils/TrackEventContext';
4
- import DistanceDemo from '@/components/Demo/DistanceDemo';
5
- import GeolocationDemo from '@/components/Demo/GeolocationDemo';
6
- import LocalitiesDemo from '@/components/Demo/LocalitiesAllDemo';
7
- import MapDemo from '@/components/Demo/MapDemo';
8
- import SearchDemo from '@/components/Demo/SearchDemo';
2
+ import { changeLanguage } from '../utils/locale';
3
+ import TrackEventContext from '../utils/TrackEventContext';
4
+ import DistanceDemo from './DistanceDemo';
5
+ import GeolocationDemo from './GeolocationDemo';
6
+ import LocalitiesDemo from './LocalitiesAllDemo';
7
+ import MapDemo from './MapDemo';
8
+ import SearchDemo from './SearchDemo';
9
9
 
10
10
  const trackEvent = {
11
11
  trackEvent: (category, action, label) => {
@@ -2,14 +2,14 @@
2
2
  import React, { Component } from 'react';
3
3
  import cl from 'classnames';
4
4
  import PropTypes from 'prop-types';
5
- import copy from '@/components/utils/CopyToClipoard';
6
- import Constants from '@/Constants';
7
- import { tr } from '@/components/utils/locale';
8
- import Tab from '@/components/Tab/Tab';
9
- import CodeSnippet from '@/components/CodeSnippet/CodeSnippet';
10
- import uniqueid from '@/components/uniqueid';
11
- import TrackEventContext from '@/components/utils/TrackEventContext';
12
- import Script from '@/components/utils/Script';
5
+ import copy from '../utils/CopyToClipoard';
6
+ import Constants from '../../Constants';
7
+ import { tr } from '../utils/locale';
8
+ import Tab from '../Tab/Tab';
9
+ import CodeSnippet from '../CodeSnippet/CodeSnippet';
10
+ import uniqueid from '../uniqueid';
11
+ import TrackEventContext from '../utils/TrackEventContext';
12
+ import Script from '../utils/Script';
13
13
 
14
14
  const MAP_CLASSNAME = 'map';
15
15
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import GoogleMapReact from 'google-map-react';
3
- import Demo from '@/components/Demo/SkeletonDemo';
4
- import Input from '@/components/Input/Input';
3
+ import Demo from './SkeletonDemo';
4
+ import Input from '../Input/Input';
5
5
 
6
6
  const Story = {
7
7
  title: 'demo/Skeleton',
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import { render, screen, fireEvent } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom/extend-expect';
4
4
 
5
- import SkeletonDemo from '@/components/Demo/SkeletonDemo';
6
- import Constants from '@/Constants';
5
+ import SkeletonDemo from './SkeletonDemo';
6
+ import Constants from '../../Constants';
7
7
 
8
8
  const mockScript = jest.fn();
9
9
  jest.mock(
@@ -3,15 +3,15 @@ import axios from 'axios';
3
3
  import cl from 'classnames';
4
4
  import React, { Component } from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import Demo from '@/components/Demo/SkeletonDemo';
7
- import Input from '@/components/Input/Input';
8
- import Button from '@/components/Button/Button';
9
- import ButtonGroup from '@/components/Button/ButtonGroup';
10
- import Constants from '@/Constants';
11
- import { tr } from '@/components/utils/locale';
12
- import markerIcon from '@/images/marker.png';
13
- import markerIconAlt from '@/images/marker-alt.png';
14
- import { createWoosmapMap } from '@/components/Map/drawOnMap';
6
+ import Demo from './SkeletonDemo';
7
+ import Input from '../Input/Input';
8
+ import Button from '../Button/Button';
9
+ import ButtonGroup from '../Button/ButtonGroup';
10
+ import Constants from '../../Constants';
11
+ import { tr } from '../utils/locale';
12
+ import markerIcon from '../../images/marker.png';
13
+ import markerIconAlt from '../../images/marker-alt.png';
14
+ import { createWoosmapMap } from '../Map/drawOnMap';
15
15
 
16
16
  const languages = [
17
17
  { value: 'fr', label: 'French' },