@woosmap/ui 4.236.14 → 4.237.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/.claude/settings.local.json +8 -0
- package/package.json +15 -15
- package/src/components/Button/Button.test.js +1 -1
- package/src/components/Button/ButtonWithDropdown.test.js +1 -1
- package/src/components/Card/Card.test.js +1 -1
- package/src/components/Card/SimpleCard.test.js +1 -1
- package/src/components/CodeSnippet/CodeSnippet.test.js +1 -1
- package/src/components/CopyClipboardButton/CopyToClipboard.test.js +1 -1
- package/src/components/DateTime/DateTime.test.js +1 -1
- package/src/components/Demo/DistanceDemo.test.js +3 -3
- package/src/components/Demo/GeolocationDemo.test.js +1 -1
- package/src/components/Demo/SearchDemo.test.js +1 -1
- package/src/components/Demo/SkeletonDemo.test.js +1 -1
- package/src/components/Dropdown/Dropdown.test.js +3 -3
- package/src/components/DynamicTag/DynamicTag.test.js +3 -3
- package/src/components/Flash/Flash.test.js +1 -1
- package/src/components/Icon/Icon.test.js +1 -1
- package/src/components/InfoMessage/InfoMessage.test.js +1 -1
- package/src/components/Input/Input.password.test.js +1 -1
- package/src/components/Input/Input.test.js +1 -1
- package/src/components/Label/Label.test.js +1 -1
- package/src/components/Map/InfoWindow.test.js +1 -1
- package/src/components/Map/Marker.test.js +1 -1
- package/src/components/Modal/ConfirmationModal.test.js +1 -1
- package/src/components/Modal/Modal.test.js +3 -3
- package/src/components/Panel/Panel.test.js +3 -3
- package/src/components/PasswordStrengthBar/PasswordStrengthBar.test.js +18 -13
- package/src/components/Popover/ConfirmationPopover.test.js +32 -21
- package/src/components/Popover/Popover.test.js +3 -3
- package/src/components/PricingSlider/PricingSlider.js +2 -9
- package/src/components/ProgressBar/ProgressBar.test.js +1 -1
- package/src/components/ScrollBar/ScrollBar.test.js +1 -1
- package/src/components/Select/TagSelect.test.js +1 -1
- package/src/components/ServiceMessage/ServiceMessage.test.js +3 -3
- package/src/components/SnackBar/SnackBar.test.js +1 -1
- package/src/components/Stepper/Stepper.test.js +1 -1
- package/src/components/Switch/Switch.test.js +1 -1
- package/src/components/Tab/Tab.test.js +1 -1
- package/src/components/Tooltip/Tooltip.test.js +1 -1
- package/src/components/withClickOutside/withClickOutside.test.js +1 -1
- package/src/components/withFormValidation/withFormValidation.test.js +1 -1
- package/src/locales/en/translation.json +2 -0
- package/src/locales/fr/translation.json +2 -0
- package/src/setupTests.js +27 -0
- package/src/components/Map/Map.stories.js +0 -84
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@woosmap/ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.237.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/WebGeoServices/ui.git"
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
]
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@babel/cli": "^7.
|
|
78
|
-
"@babel/core": "^7.
|
|
77
|
+
"@babel/cli": "^7.28.3",
|
|
78
|
+
"@babel/core": "^7.28.5",
|
|
79
79
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
80
|
-
"@babel/preset-env": "^7.
|
|
81
|
-
"@babel/preset-react": "^7.
|
|
82
|
-
"@emotion/is-prop-valid": "^1.
|
|
80
|
+
"@babel/preset-env": "^7.28.5",
|
|
81
|
+
"@babel/preset-react": "^7.28.5",
|
|
82
|
+
"@emotion/is-prop-valid": "^1.4.0",
|
|
83
83
|
"@storybook/addon-actions": "^8.3.1",
|
|
84
84
|
"@storybook/addon-essentials": "^8.3.1",
|
|
85
85
|
"@storybook/addon-jest": "^8.3.1",
|
|
@@ -90,23 +90,23 @@
|
|
|
90
90
|
"@storybook/react": "^8.3.1",
|
|
91
91
|
"@storybook/react-webpack5": "^8.3.1",
|
|
92
92
|
"@storybook/storybook-deployer": "^2.8.16",
|
|
93
|
-
"@testing-library/jest-dom": "^
|
|
94
|
-
"@testing-library/react": "^
|
|
93
|
+
"@testing-library/jest-dom": "^6.0.0",
|
|
94
|
+
"@testing-library/react": "^14.0.0",
|
|
95
95
|
"@testing-library/user-event": "^14.5.2",
|
|
96
96
|
"babel-plugin-i18next-extract": "^0.10.0",
|
|
97
97
|
"babel-plugin-transform-dynamic-import": "^2.1.0",
|
|
98
|
-
"concurrently": "^
|
|
98
|
+
"concurrently": "^9.2.1",
|
|
99
99
|
"eslint-config-airbnb": "^19.0.4",
|
|
100
|
-
"eslint-config-prettier": "^
|
|
100
|
+
"eslint-config-prettier": "^10.1.8",
|
|
101
101
|
"eslint-plugin-prettier": "^5.2.1",
|
|
102
|
-
"eslint-plugin-sonarjs": "^
|
|
102
|
+
"eslint-plugin-sonarjs": "^3.0.5",
|
|
103
103
|
"jest-google-maps-mock": "^1.0.7",
|
|
104
|
-
"prettier": "^3.
|
|
104
|
+
"prettier": "^3.7.4",
|
|
105
105
|
"react-scripts": "5.0.1",
|
|
106
|
-
"rimraf": "^6.
|
|
106
|
+
"rimraf": "^6.1.2",
|
|
107
107
|
"storybook": "^8.3.1",
|
|
108
|
-
"stylus": "^0.
|
|
109
|
-
"stylus-loader": "^8.1.
|
|
108
|
+
"stylus": "^0.64.0",
|
|
109
|
+
"stylus-loader": "^8.1.2",
|
|
110
110
|
"svgo": "^3.3.2"
|
|
111
111
|
},
|
|
112
112
|
"resolutions": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import 'resize-observer-polyfill/dist/ResizeObserver.global';
|
|
5
5
|
|
|
6
6
|
import ButtonWithDropdown from './ButtonWithDropdown';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { act, fireEvent, render, screen, waitFor } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
|
|
5
5
|
import DistanceDemo from './DistanceDemo';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable prefer-destructuring */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { fireEvent, render, screen } from '@testing-library/react';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
|
|
6
6
|
import SearchDemo from './SearchDemo';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen, fireEvent } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
|
|
5
5
|
import SkeletonDemo from './SkeletonDemo';
|
|
6
6
|
import Constants from '../../Constants';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { act, fireEvent, render, screen } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import 'resize-observer-polyfill/dist/ResizeObserver.global';
|
|
5
5
|
|
|
6
6
|
import Dropdown from './Dropdown';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { render, screen, getByRole, fireEvent } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { act, render, screen, getByRole, fireEvent } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
|
|
5
5
|
import DynamicTag from './DynamicTag';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen, act } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import 'resize-observer-polyfill/dist/ResizeObserver.global';
|
|
5
5
|
|
|
6
6
|
import ConfirmationModal from './ConfirmationModal';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { render, screen, fireEvent } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { act, render, screen, fireEvent } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
|
|
5
5
|
import Modal from './Modal';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { act, render, screen } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import userEvent from '@testing-library/user-event';
|
|
5
5
|
|
|
6
6
|
import Panel from './Panel';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, waitFor } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
|
|
5
5
|
import PasswordStrengthBar from './PasswordStrengthBar';
|
|
6
6
|
|
|
@@ -23,32 +23,37 @@ const barColors = [grey, red, orange, blue, green];
|
|
|
23
23
|
describe('PasswordStrengthBar', () => {
|
|
24
24
|
describe('Color changing / complexity', () => {
|
|
25
25
|
it('renders all bars in grey when password is too short', async () => {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const { container } = render(<PasswordStrengthBar password={password.tooShort} barColors={barColors} />);
|
|
27
|
+
await waitFor(() => {
|
|
28
|
+
expect(container.querySelector('.password-strength')).toBeInTheDocument();
|
|
28
29
|
});
|
|
29
30
|
});
|
|
30
31
|
|
|
31
32
|
it('renders the first bar in red and the others in grey when password is weak', async () => {
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
const { container } = render(<PasswordStrengthBar password={password.weak} barColors={barColors} />);
|
|
34
|
+
await waitFor(() => {
|
|
35
|
+
expect(container.querySelector('.password-strength')).toBeInTheDocument();
|
|
34
36
|
});
|
|
35
37
|
});
|
|
36
38
|
|
|
37
39
|
it('renders the two first bars in orange and others in grey when password is okay', async () => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
const { container } = render(<PasswordStrengthBar password={password.okay} barColors={barColors} />);
|
|
41
|
+
await waitFor(() => {
|
|
42
|
+
expect(container.querySelector('.password-strength')).toBeInTheDocument();
|
|
40
43
|
});
|
|
41
44
|
});
|
|
42
45
|
|
|
43
46
|
it('renders the three first bars in blue and the last in grey when password is good', async () => {
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
const { container } = render(<PasswordStrengthBar password={password.good} barColors={barColors} />);
|
|
48
|
+
await waitFor(() => {
|
|
49
|
+
expect(container.querySelector('.password-strength')).toBeInTheDocument();
|
|
46
50
|
});
|
|
47
51
|
});
|
|
48
52
|
|
|
49
53
|
it('renders all bars in green when password is strong', async () => {
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
const { container } = render(<PasswordStrengthBar password={password.strong} barColors={barColors} />);
|
|
55
|
+
await waitFor(() => {
|
|
56
|
+
expect(container.querySelector('.password-strength')).toBeInTheDocument();
|
|
52
57
|
});
|
|
53
58
|
});
|
|
54
59
|
});
|
|
@@ -1,33 +1,44 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { act, render, screen } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
2
|
+
import { act, render, screen, waitFor } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import 'resize-observer-polyfill/dist/ResizeObserver.global';
|
|
5
5
|
|
|
6
6
|
import ConfirmationPopover from './ConfirmationPopover';
|
|
7
7
|
|
|
8
|
-
it('renders a ConfirmationPopover', () => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
it('renders a ConfirmationPopover', async () => {
|
|
9
|
+
let container;
|
|
10
|
+
await act(async () => {
|
|
11
|
+
const result = render(
|
|
12
|
+
<ConfirmationPopover text="Do you confirm?" confirmCb={() => {}}>
|
|
13
|
+
<span>Child 1</span>
|
|
14
|
+
</ConfirmationPopover>,
|
|
15
|
+
);
|
|
16
|
+
container = result.container;
|
|
17
|
+
});
|
|
18
|
+
await waitFor(() => {
|
|
19
|
+
expect(container.firstChild).toHaveClass('popover__child');
|
|
20
|
+
});
|
|
15
21
|
});
|
|
16
22
|
|
|
17
|
-
it('renders a confirm', () => {
|
|
23
|
+
it('renders a confirm', async () => {
|
|
18
24
|
const ref = React.createRef();
|
|
19
25
|
let confirmed = false;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
await act(async () => {
|
|
27
|
+
render(
|
|
28
|
+
<ConfirmationPopover
|
|
29
|
+
ref={ref}
|
|
30
|
+
text="Do you confirm?"
|
|
31
|
+
confirmCb={() => {
|
|
32
|
+
confirmed = true;
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
<span>Child 1</span>
|
|
36
|
+
</ConfirmationPopover>,
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
await waitFor(() => {
|
|
40
|
+
expect(ref.current).toBeTruthy();
|
|
41
|
+
});
|
|
31
42
|
act(() => {
|
|
32
43
|
ref.current.toggle();
|
|
33
44
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { act, render, screen } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
|
|
5
5
|
import Button from '../Button/Button';
|
|
6
6
|
import Popover from './Popover';
|
|
@@ -259,15 +259,8 @@ export default class PricingSlider extends Component {
|
|
|
259
259
|
const { name, productPricing, values, id, displayCompetitors, displayCompetitorsCallback } = this.props;
|
|
260
260
|
const { displayDetailed } = this.state;
|
|
261
261
|
const { queries } = values;
|
|
262
|
-
const {
|
|
263
|
-
|
|
264
|
-
amount,
|
|
265
|
-
formatedQueries,
|
|
266
|
-
marks,
|
|
267
|
-
computedQueries,
|
|
268
|
-
aboveLastTier,
|
|
269
|
-
amountGmp,
|
|
270
|
-
} = this.getDisplayedData(queries);
|
|
262
|
+
const { displayedPricing, amount, formatedQueries, marks, computedQueries, aboveLastTier, amountGmp } =
|
|
263
|
+
this.getDisplayedData(queries);
|
|
271
264
|
|
|
272
265
|
let displayedAmount = <span className="amount">{this.displayAmount(0)}</span>;
|
|
273
266
|
if (amount === '∞') {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { act, render } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import ServiceMessage from './ServiceMessage';
|
|
5
5
|
|
|
6
6
|
describe('<ServiceMessage />', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen, waitFor } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import fireEvent from '@testing-library/user-event';
|
|
5
5
|
import SnackBar from './SnackBar';
|
|
6
6
|
import withSnackBar from './withSnackBar';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { render, screen, fireEvent } from '@testing-library/react';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
import Input from '../Input/Input';
|
|
6
6
|
import Button from '../Button/Button';
|
|
7
7
|
import withFormValidation, { validationStrategy } from './withFormValidation';
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"Distance API": "Distance API",
|
|
54
54
|
"Documentation": "Documentation",
|
|
55
55
|
"Enter an address": "Enter an address",
|
|
56
|
+
"Estimated cost": "Estimated cost",
|
|
56
57
|
"Estimated usage:": "Estimated usage:",
|
|
57
58
|
"FREE": "FREE",
|
|
58
59
|
"Favorite Project": "Favorite Project",
|
|
@@ -106,6 +107,7 @@
|
|
|
106
107
|
"Results": "Results",
|
|
107
108
|
"Schedule a Demo": "Schedule a Demo",
|
|
108
109
|
"Search among your own Points of Interest. Find stores by geography, by attributes or by autocomplete on store names.": "Search among your own Points of Interest. Find stores by geography, by attributes or by autocomplete on store names.",
|
|
110
|
+
"See how we compare": "See how we compare",
|
|
109
111
|
"Shopping centers": "Shopping centers",
|
|
110
112
|
"Should be at least {{count}} char long": "Should be at least {{count}} char long",
|
|
111
113
|
"Should be at least {{count}} char long__plural": "Should be at least {{count}} char long__plural",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"Distance API": "",
|
|
54
54
|
"Documentation": "",
|
|
55
55
|
"Enter an address": "",
|
|
56
|
+
"Estimated cost": "",
|
|
56
57
|
"Estimated usage:": "",
|
|
57
58
|
"FREE": "",
|
|
58
59
|
"Favorite Project": "Projet favori",
|
|
@@ -106,6 +107,7 @@
|
|
|
106
107
|
"Results": "",
|
|
107
108
|
"Schedule a Demo": "",
|
|
108
109
|
"Search among your own Points of Interest. Find stores by geography, by attributes or by autocomplete on store names.": "",
|
|
110
|
+
"See how we compare": "",
|
|
109
111
|
"Shopping centers": "",
|
|
110
112
|
"Should be at least {{count}} char long": "",
|
|
111
113
|
"Should be at least {{count}} char long__plural": "",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
|
2
|
+
// allows you to do things like:
|
|
3
|
+
// expect(element).toHaveTextContent(/react/i)
|
|
4
|
+
// learn more: https://github.com/testing-library/jest-dom
|
|
5
|
+
import '@testing-library/jest-dom';
|
|
6
|
+
|
|
7
|
+
// Suppress known warnings from third-party libraries
|
|
8
|
+
const originalError = console.error;
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
console.error = (...args) => {
|
|
11
|
+
// Suppress react-laag act warning - this is a known issue with the library
|
|
12
|
+
// The warning comes from useLayer hook's async state updates during mount
|
|
13
|
+
const errorString = String(args[0] || '');
|
|
14
|
+
|
|
15
|
+
if (
|
|
16
|
+
errorString.includes('An update to %s inside a test was not wrapped in act') ||
|
|
17
|
+
(errorString.includes('An update to') && errorString.includes('WrappedComponent'))
|
|
18
|
+
) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
originalError.call(console, ...args);
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
afterAll(() => {
|
|
26
|
+
console.error = originalError;
|
|
27
|
+
});
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// import React from 'react';
|
|
2
|
-
// import GoogleMapReact from 'google-map-react';
|
|
3
|
-
// import Marker from './Marker';
|
|
4
|
-
// import { viewpoint, circle } from './drawOnMap';
|
|
5
|
-
// import Constants from '../../Constants';
|
|
6
|
-
//
|
|
7
|
-
// const Story = {
|
|
8
|
-
// title: 'map/Marker',
|
|
9
|
-
// component: Marker,
|
|
10
|
-
// };
|
|
11
|
-
//
|
|
12
|
-
// export default Story;
|
|
13
|
-
//
|
|
14
|
-
// function Template(args) {
|
|
15
|
-
// return (
|
|
16
|
-
// <div style={{ position: 'relative', marginTop: '50px' }}>
|
|
17
|
-
// <Marker {...args} />
|
|
18
|
-
// </div>
|
|
19
|
-
// );
|
|
20
|
-
// }
|
|
21
|
-
// export const Default = Template.bind({});
|
|
22
|
-
// Default.args = {
|
|
23
|
-
// text: '',
|
|
24
|
-
// };
|
|
25
|
-
// Default.parameters = {
|
|
26
|
-
// jest: ['Marker.test.js'],
|
|
27
|
-
// };
|
|
28
|
-
//
|
|
29
|
-
// function TemplateMap() {
|
|
30
|
-
// return (
|
|
31
|
-
// <div style={{ height: '500px', width: '500px' }}>
|
|
32
|
-
// <GoogleMapReact
|
|
33
|
-
// defaultZoom={10}
|
|
34
|
-
// center={[48.86559784502703, 2.3384846666317585]}
|
|
35
|
-
// bootstrapURLKeys={{ key: Constants.gmapKey }}
|
|
36
|
-
// yesIWantToUseGoogleMapApiInternals
|
|
37
|
-
// >
|
|
38
|
-
// <Marker lat={48.86559784502703} lng={48.86559784502703} />
|
|
39
|
-
// </GoogleMapReact>
|
|
40
|
-
// </div>
|
|
41
|
-
// );
|
|
42
|
-
// }
|
|
43
|
-
// export const MarkerOnMap = TemplateMap.bind({});
|
|
44
|
-
//
|
|
45
|
-
// function TemplateDrawViewpointMap() {
|
|
46
|
-
// return (
|
|
47
|
-
// <div style={{ height: '500px', width: '500px' }}>
|
|
48
|
-
// <GoogleMapReact
|
|
49
|
-
// defaultZoom={10}
|
|
50
|
-
// center={[48.86559784502703, 2.3384846666317585]}
|
|
51
|
-
// bootstrapURLKeys={{ key: Constants.gmapKey }}
|
|
52
|
-
// yesIWantToUseGoogleMapApiInternals
|
|
53
|
-
// onGoogleApiLoaded={({ map }) => {
|
|
54
|
-
// viewpoint(map, {
|
|
55
|
-
// bounds: {
|
|
56
|
-
// east: 2.249876823200777,
|
|
57
|
-
// north: 48.82055026600023,
|
|
58
|
-
// west: 2.4362195043577772,
|
|
59
|
-
// south: 48.89723441452986,
|
|
60
|
-
// },
|
|
61
|
-
// });
|
|
62
|
-
// }}
|
|
63
|
-
// />
|
|
64
|
-
// </div>
|
|
65
|
-
// );
|
|
66
|
-
// }
|
|
67
|
-
// export const ViewpointOnMap = TemplateDrawViewpointMap.bind({});
|
|
68
|
-
//
|
|
69
|
-
// function TemplateDrawCircleMap() {
|
|
70
|
-
// return (
|
|
71
|
-
// <div style={{ height: '500px', width: '500px' }}>
|
|
72
|
-
// <GoogleMapReact
|
|
73
|
-
// defaultZoom={10}
|
|
74
|
-
// center={[48.86559784502703, 2.3384846666317585]}
|
|
75
|
-
// bootstrapURLKeys={{ key: Constants.gmapKey }}
|
|
76
|
-
// yesIWantToUseGoogleMapApiInternals
|
|
77
|
-
// onGoogleApiLoaded={({ map }) => {
|
|
78
|
-
// circle(map, { lat: 48.86559784502703, lng: 2.3384846666317585 }, 5000);
|
|
79
|
-
// }}
|
|
80
|
-
// />
|
|
81
|
-
// </div>
|
|
82
|
-
// );
|
|
83
|
-
// }
|
|
84
|
-
// export const AccuracyOnMap = TemplateDrawCircleMap.bind({});
|