@pnp/spfx-controls-react 3.22.0-beta.1640331 → 3.22.0-beta.1642191
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/CHANGELOG.json +2 -1
- package/CHANGELOG.md +5 -1
- package/lib/WorldMap.d.ts +2 -0
- package/lib/WorldMap.d.ts.map +1 -0
- package/lib/WorldMap.js +2 -0
- package/lib/WorldMap.js.map +1 -0
- package/lib/common/telemetry/version.js +1 -1
- package/lib/controls/worldMap/IData.d.ts +36 -0
- package/lib/controls/worldMap/IData.d.ts.map +1 -0
- package/lib/controls/worldMap/IData.js +2 -0
- package/lib/controls/worldMap/IData.js.map +1 -0
- package/lib/controls/worldMap/IMaplibreWorldMapProps.d.ts +220 -0
- package/lib/controls/worldMap/IMaplibreWorldMapProps.d.ts.map +1 -0
- package/lib/controls/worldMap/IMaplibreWorldMapProps.js +2 -0
- package/lib/controls/worldMap/IMaplibreWorldMapProps.js.map +1 -0
- package/lib/controls/worldMap/IMarker.d.ts +10 -0
- package/lib/controls/worldMap/IMarker.d.ts.map +1 -0
- package/lib/controls/worldMap/IMarker.js +2 -0
- package/lib/controls/worldMap/IMarker.js.map +1 -0
- package/lib/controls/worldMap/IMarkerProps.d.ts +7 -0
- package/lib/controls/worldMap/IMarkerProps.d.ts.map +1 -0
- package/lib/controls/worldMap/IMarkerProps.js +2 -0
- package/lib/controls/worldMap/IMarkerProps.js.map +1 -0
- package/lib/controls/worldMap/IWorldMapProps.d.ts +14 -0
- package/lib/controls/worldMap/IWorldMapProps.d.ts.map +1 -0
- package/lib/controls/worldMap/IWorldMapProps.js +2 -0
- package/lib/controls/worldMap/IWorldMapProps.js.map +1 -0
- package/lib/controls/worldMap/MapNavigation.d.ts +14 -0
- package/lib/controls/worldMap/MapNavigation.d.ts.map +1 -0
- package/lib/controls/worldMap/MapNavigation.js +41 -0
- package/lib/controls/worldMap/MapNavigation.js.map +1 -0
- package/lib/controls/worldMap/Marker.d.ts +5 -0
- package/lib/controls/worldMap/Marker.d.ts.map +1 -0
- package/lib/controls/worldMap/Marker.js +41 -0
- package/lib/controls/worldMap/Marker.js.map +1 -0
- package/lib/controls/worldMap/TooltipContent.d.ts +8 -0
- package/lib/controls/worldMap/TooltipContent.d.ts.map +1 -0
- package/lib/controls/worldMap/TooltipContent.js +31 -0
- package/lib/controls/worldMap/TooltipContent.js.map +1 -0
- package/lib/controls/worldMap/WorldMap.d.ts +5 -0
- package/lib/controls/worldMap/WorldMap.d.ts.map +1 -0
- package/lib/controls/worldMap/WorldMap.js +95 -0
- package/lib/controls/worldMap/WorldMap.js.map +1 -0
- package/lib/controls/worldMap/WorldMapControl.d.ts +10 -0
- package/lib/controls/worldMap/WorldMapControl.d.ts.map +1 -0
- package/lib/controls/worldMap/WorldMapControl.js +210 -0
- package/lib/controls/worldMap/WorldMapControl.js.map +1 -0
- package/lib/controls/worldMap/examples.d.ts +10 -0
- package/lib/controls/worldMap/examples.d.ts.map +1 -0
- package/lib/controls/worldMap/examples.js +153 -0
- package/lib/controls/worldMap/examples.js.map +1 -0
- package/lib/controls/worldMap/index.d.ts +6 -0
- package/lib/controls/worldMap/index.d.ts.map +1 -0
- package/lib/controls/worldMap/index.js +6 -0
- package/lib/controls/worldMap/index.js.map +1 -0
- package/lib/controls/worldMap/useCleanMapStyle.d.ts +6 -0
- package/lib/controls/worldMap/useCleanMapStyle.d.ts.map +1 -0
- package/lib/controls/worldMap/useCleanMapStyle.js +75 -0
- package/lib/controls/worldMap/useCleanMapStyle.js.map +1 -0
- package/lib/controls/worldMap/worldMap.md +416 -0
- package/lib/loc/bg-bg.js +13 -0
- package/lib/loc/bg-bg.js.map +1 -1
- package/lib/loc/ca-es.js +13 -0
- package/lib/loc/ca-es.js.map +1 -1
- package/lib/loc/cs-cz.js +13 -0
- package/lib/loc/cs-cz.js.map +1 -1
- package/lib/loc/da-dk.js +13 -0
- package/lib/loc/da-dk.js.map +1 -1
- package/lib/loc/de-de.js +13 -0
- package/lib/loc/de-de.js.map +1 -1
- package/lib/loc/el-gr.js +13 -0
- package/lib/loc/el-gr.js.map +1 -1
- package/lib/loc/en-us.d.ts.map +1 -1
- package/lib/loc/en-us.js +16 -0
- package/lib/loc/en-us.js.map +1 -1
- package/lib/loc/es-es.js +13 -0
- package/lib/loc/es-es.js.map +1 -1
- package/lib/loc/et-ee.js +13 -0
- package/lib/loc/et-ee.js.map +1 -1
- package/lib/loc/eu-es.js +13 -0
- package/lib/loc/eu-es.js.map +1 -1
- package/lib/loc/fi-fi.js +13 -0
- package/lib/loc/fi-fi.js.map +1 -1
- package/lib/loc/fr-ca.js +13 -0
- package/lib/loc/fr-ca.js.map +1 -1
- package/lib/loc/fr-fr.js +13 -0
- package/lib/loc/fr-fr.js.map +1 -1
- package/lib/loc/it-it.js +13 -0
- package/lib/loc/it-it.js.map +1 -1
- package/lib/loc/ja-jp.js +13 -0
- package/lib/loc/ja-jp.js.map +1 -1
- package/lib/loc/lt-lt.js +13 -0
- package/lib/loc/lt-lt.js.map +1 -1
- package/lib/loc/lv-lv.js +13 -0
- package/lib/loc/lv-lv.js.map +1 -1
- package/lib/loc/nb-no.js +13 -0
- package/lib/loc/nb-no.js.map +1 -1
- package/lib/loc/nl-nl.js +13 -0
- package/lib/loc/nl-nl.js.map +1 -1
- package/lib/loc/pl-pl.js +80 -106
- package/lib/loc/pl-pl.js.map +1 -1
- package/lib/loc/pt-br.js +13 -0
- package/lib/loc/pt-br.js.map +1 -1
- package/lib/loc/pt-pt.js +16 -3
- package/lib/loc/pt-pt.js.map +1 -1
- package/lib/loc/ro-ro.js +13 -0
- package/lib/loc/ro-ro.js.map +1 -1
- package/lib/loc/ru-ru.js +13 -0
- package/lib/loc/ru-ru.js.map +1 -1
- package/lib/loc/sk-sk.js +13 -0
- package/lib/loc/sk-sk.js.map +1 -1
- package/lib/loc/sr-latn-rs.js +13 -0
- package/lib/loc/sr-latn-rs.js.map +1 -1
- package/lib/loc/sv-se.js +13 -0
- package/lib/loc/sv-se.js.map +1 -1
- package/lib/loc/tr-tr.js +13 -0
- package/lib/loc/tr-tr.js.map +1 -1
- package/lib/loc/vi-vn.js +13 -0
- package/lib/loc/vi-vn.js.map +1 -1
- package/lib/loc/zh-cn.js +13 -0
- package/lib/loc/zh-cn.js.map +1 -1
- package/lib/loc/zh-tw.js +13 -0
- package/lib/loc/zh-tw.js.map +1 -1
- package/package.json +5 -1
- package/release/component-dependency-audit/sp-dev-fx-controls-react.json +65 -65
- package/release/manifests/45165954-80f9-44c1-9967-cd38ae92a33b.manifest.json +10 -9
package/CHANGELOG.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"version": "3.22.0",
|
|
5
5
|
"changes": {
|
|
6
6
|
"new": [
|
|
7
|
-
|
|
7
|
+
"`WorldMap`: new control `WorldMap` [#2023](https://github.com/pnp/sp-dev-fx-controls-react/pull/2023)"
|
|
8
8
|
],
|
|
9
9
|
"enhancements": [
|
|
10
10
|
"SharePoint Framework v1.21.1 support [#1998](https://github.com/pnp/sp-dev-fx-controls-react/pull/1998)",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"[Antanina Druzhkina](https://github.com/Ateina)",
|
|
37
37
|
"[Floris Pleegzorg Oost-Vlaanderen](https://github.com/Floris-Pleegzorg-Oost-Vlaanderen)",
|
|
38
38
|
"[Guido Zambarda](https://github.com/GuidoZam)",
|
|
39
|
+
"[joaojmendes](https://github.com/joaojmendes)",
|
|
39
40
|
"[Joseph Jang](https://github.com/heesungjang)",
|
|
40
41
|
"[Michał Kornet](https://github.com/mkm17)",
|
|
41
42
|
"[Michaël Maillot](https://github.com/michaelmaillot)",
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## 3.22.0
|
|
4
4
|
|
|
5
|
+
### New control(s)
|
|
6
|
+
|
|
7
|
+
- `WorldMap`: new control `WorldMap` [#2023](https://github.com/pnp/sp-dev-fx-controls-react/pull/2023)
|
|
8
|
+
|
|
5
9
|
### Enhancements
|
|
6
10
|
|
|
7
11
|
- SharePoint Framework v1.21.1 support [#1998](https://github.com/pnp/sp-dev-fx-controls-react/pull/1998)
|
|
@@ -29,7 +33,7 @@
|
|
|
29
33
|
|
|
30
34
|
### Contributors
|
|
31
35
|
|
|
32
|
-
Special thanks to our contributors (in alphabetical order): [Alberto Gutierrez Perez](https://github.com/albegut), [Alex Terentiev](https://github.com/AJIXuMuK), [Antanina Druzhkina](https://github.com/Ateina), [Floris Pleegzorg Oost-Vlaanderen](https://github.com/Floris-Pleegzorg-Oost-Vlaanderen), [Guido Zambarda](https://github.com/GuidoZam), [Joseph Jang](https://github.com/heesungjang), [Michał Kornet](https://github.com/mkm17), [Michaël Maillot](https://github.com/michaelmaillot), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Patrik Hellgren](https://github.com/PatrikHellgren), [Sandeep P S](https://github.com/Sandeep-FED), [Valeras Narbutas](https://github.com/ValerasNarbutas), [wuxiaojun514](https://github.com/wuxiaojun514).
|
|
36
|
+
Special thanks to our contributors (in alphabetical order): [Alberto Gutierrez Perez](https://github.com/albegut), [Alex Terentiev](https://github.com/AJIXuMuK), [Antanina Druzhkina](https://github.com/Ateina), [Floris Pleegzorg Oost-Vlaanderen](https://github.com/Floris-Pleegzorg-Oost-Vlaanderen), [Guido Zambarda](https://github.com/GuidoZam), [joaojmendes](https://github.com/joaojmendes), [Joseph Jang](https://github.com/heesungjang), [Michał Kornet](https://github.com/mkm17), [Michaël Maillot](https://github.com/michaelmaillot), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Patrik Hellgren](https://github.com/PatrikHellgren), [Sandeep P S](https://github.com/Sandeep-FED), [Valeras Narbutas](https://github.com/ValerasNarbutas), [wuxiaojun514](https://github.com/wuxiaojun514).
|
|
33
37
|
|
|
34
38
|
## 3.21.0
|
|
35
39
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorldMap.d.ts","sourceRoot":"","sources":["../src/WorldMap.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
package/lib/WorldMap.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorldMap.js","sourceRoot":"","sources":["../src/WorldMap.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export var version = "3.22.0-beta.
|
|
1
|
+
export var version = "3.22.0-beta.1642191";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data structure for map location items.
|
|
3
|
+
* Represents a location point with metadata for display on the world map.
|
|
4
|
+
*/
|
|
5
|
+
export interface IData {
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier for the location.
|
|
8
|
+
* @example "nyc-001" or "location-1"
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Display name of the location.
|
|
13
|
+
* Used for search functionality and marker tooltips.
|
|
14
|
+
* @example "New York City" or "Eiffel Tower"
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* URL to an image representing this location.
|
|
19
|
+
* Used for marker display or in tooltips.
|
|
20
|
+
* @example "https://example.com/nyc-skyline.jpg"
|
|
21
|
+
*/
|
|
22
|
+
imageUrl: string;
|
|
23
|
+
/**
|
|
24
|
+
* URL link associated with this location.
|
|
25
|
+
* Can be used for navigation when marker is clicked.
|
|
26
|
+
* @example "https://example.com/locations/new-york" or "/details/nyc"
|
|
27
|
+
*/
|
|
28
|
+
link: string;
|
|
29
|
+
/**
|
|
30
|
+
* Geographic coordinates as [longitude, latitude] tuple.
|
|
31
|
+
* Used to position the marker on the map.
|
|
32
|
+
* @example [-74.006, 40.7128] // New York City coordinates
|
|
33
|
+
*/
|
|
34
|
+
coordinates: [number, number];
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=IData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IData.d.ts","sourceRoot":"","sources":["../../../src/controls/worldMap/IData.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IData.js","sourceRoot":"","sources":["../../../src/controls/worldMap/IData.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { IData } from "./IData";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Theme } from "@fluentui/react-components";
|
|
4
|
+
/** Props for the world map component. */
|
|
5
|
+
export interface IMaplibreWorldMapProps {
|
|
6
|
+
/**
|
|
7
|
+
* Array of location data to display on the map. Each item must include coordinates as [longitude, latitude].
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const data = [
|
|
11
|
+
* { id: '1', name: 'New York', coordinates: [-74.006, 40.7128], imageUrl: '...', link: '...' }
|
|
12
|
+
* ];
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
data: IData[];
|
|
16
|
+
/**
|
|
17
|
+
* Callback function triggered when a marker is clicked.
|
|
18
|
+
* @param c - The data item associated with the clicked marker
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* onClick={(location) => console.log('Clicked:', location.name)}
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
onClick?: (c: IData) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Custom map style URL. If provided with mapKey, the key will be automatically appended.
|
|
27
|
+
* If provided without mapKey, the URL will be used as-is.
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* mapStyleUrl="https://api.maptiler.com/maps/satellite/style.json"
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
mapStyleUrl?: string;
|
|
34
|
+
/**
|
|
35
|
+
* MapTiler API key for accessing premium map styles.
|
|
36
|
+
* If provided alone, uses MapTiler streets style by default.
|
|
37
|
+
* If not provided, falls back to free demo map.
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* mapKey="your-maptiler-api-key-here"
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
mapKey?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Custom CSS styles for the map container.
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* style={{ width: '100%', height: '500px', border: '1px solid #ccc' }}
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
style?: React.CSSProperties;
|
|
52
|
+
/**
|
|
53
|
+
* Padding (in pixels) around the map when fitting bounds to show all markers.
|
|
54
|
+
* @default 20
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* fitPadding={50} // Adds 50px padding around markers when auto-fitting
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
fitPadding?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Title displayed above the map. Can be a string or React element.
|
|
63
|
+
* @default 'World Map'
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* title="My Custom Map"
|
|
67
|
+
* // or
|
|
68
|
+
* title={<h2>Interactive Location Map</h2>}
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
title?: string | React.ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* Description text displayed below the title (not currently implemented in UI).
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* description="Click on markers to view location details"
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
description?: string | React.ReactNode;
|
|
80
|
+
/**
|
|
81
|
+
* CSS class name applied to the root container.
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* className="my-custom-map-class"
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
className?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Configuration options for map markers appearance and behavior.
|
|
90
|
+
*/
|
|
91
|
+
marker?: {
|
|
92
|
+
/**
|
|
93
|
+
* CSS class name applied to marker elements.
|
|
94
|
+
* @example "custom-marker-style"
|
|
95
|
+
*/
|
|
96
|
+
markerClassName?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Custom CSS styles applied to marker elements.
|
|
99
|
+
* @example {{ backgroundColor: 'red', borderRadius: '50%' }}
|
|
100
|
+
*/
|
|
101
|
+
markerStyle?: React.CSSProperties;
|
|
102
|
+
/**
|
|
103
|
+
* Size of marker images in pixels.
|
|
104
|
+
* @default 40
|
|
105
|
+
* @example 60
|
|
106
|
+
*/
|
|
107
|
+
imageSize?: number;
|
|
108
|
+
/**
|
|
109
|
+
* Custom function to render tooltip content for markers.
|
|
110
|
+
* @param c - The data item for the marker
|
|
111
|
+
* @returns React element to display in tooltip
|
|
112
|
+
* @example
|
|
113
|
+
* ```tsx
|
|
114
|
+
* renderToolTip={(item) => <div><strong>{item.name}</strong><br/>{item.description}</div>}
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
renderToolTip?: (c: IData) => React.ReactNode;
|
|
118
|
+
/**
|
|
119
|
+
* CSS class name applied to tooltip elements.
|
|
120
|
+
* @example "custom-tooltip-style"
|
|
121
|
+
*/
|
|
122
|
+
tooltipClassName?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Custom CSS styles applied to tooltip elements.
|
|
125
|
+
* @example {{ backgroundColor: 'black', color: 'white', padding: '8px' }}
|
|
126
|
+
*/
|
|
127
|
+
tooltipStyle?: React.CSSProperties;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Configuration options for the search functionality.
|
|
131
|
+
*/
|
|
132
|
+
search?: {
|
|
133
|
+
/**
|
|
134
|
+
* Enable or disable the search feature.
|
|
135
|
+
* @default true
|
|
136
|
+
* @example
|
|
137
|
+
* ```tsx
|
|
138
|
+
* search={{ enabled: false }} // Disables search
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
enabled?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Placeholder text displayed in the search input.
|
|
144
|
+
* @default "Search locations..."
|
|
145
|
+
* @example
|
|
146
|
+
* ```tsx
|
|
147
|
+
* search={{ placeholder: "Find a city or landmark..." }}
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
placeholder?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Callback function triggered when search term changes or results are filtered.
|
|
153
|
+
* @param searchTerm - The current search term
|
|
154
|
+
* @param filteredData - Array of data items matching the search
|
|
155
|
+
* @example
|
|
156
|
+
* ```tsx
|
|
157
|
+
* onSearchChange={(term, results) => {
|
|
158
|
+
* console.log(`Search: "${term}" found ${results.length} results`);
|
|
159
|
+
* }}
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
onSearchChange?: (searchTerm: string, filteredData: IData[]) => void;
|
|
163
|
+
/**
|
|
164
|
+
* Field to search on or a custom function to extract the search term from data items.
|
|
165
|
+
* @default "name"
|
|
166
|
+
* @example
|
|
167
|
+
* ```tsx
|
|
168
|
+
* // Search by specific field
|
|
169
|
+
* searchField: "id"
|
|
170
|
+
*
|
|
171
|
+
* // Custom search function
|
|
172
|
+
* searchField: (item) => `${item.name} ${item.description}`
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
searchField?: keyof IData | ((item: IData) => string);
|
|
176
|
+
/**
|
|
177
|
+
* Zoom level to use when focusing on search results.
|
|
178
|
+
* @default 8
|
|
179
|
+
* @example
|
|
180
|
+
* ```tsx
|
|
181
|
+
* search={{ zoomLevel: 12 }} // Closer zoom for search results
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
zoomLevel?: number;
|
|
185
|
+
/**
|
|
186
|
+
* Position of the search overlay on the map.
|
|
187
|
+
* @default { top: '10px', left: '10px' }
|
|
188
|
+
* @example
|
|
189
|
+
* ```tsx
|
|
190
|
+
* // Top-right position
|
|
191
|
+
* search={{ position: { top: '10px', right: '10px' } }}
|
|
192
|
+
*
|
|
193
|
+
* // Bottom-left position
|
|
194
|
+
* search={{ position: { bottom: '20px', left: '20px' } }}
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
position?: {
|
|
198
|
+
/** Distance from the top edge of the map */
|
|
199
|
+
top?: string;
|
|
200
|
+
/** Distance from the left edge of the map */
|
|
201
|
+
left?: string;
|
|
202
|
+
/** Distance from the right edge of the map */
|
|
203
|
+
right?: string;
|
|
204
|
+
/** Distance from the bottom edge of the map */
|
|
205
|
+
bottom?: string;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* Fluent UI theme object for consistent styling.
|
|
210
|
+
* @example
|
|
211
|
+
* ```tsx
|
|
212
|
+
* import { useTheme } from '@fluentui/react-components';
|
|
213
|
+
*
|
|
214
|
+
* const theme = useTheme();
|
|
215
|
+
* <MaplibreWorldMap theme={theme} />
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
theme?: Theme;
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=IMaplibreWorldMapProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMaplibreWorldMapProps.d.ts","sourceRoot":"","sources":["../../../src/controls/worldMap/IMaplibreWorldMapProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAA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AC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,IAAI,CAAC;QAErE;;;;;;;;;;;WAWG;QACH,WAAW,CAAC,EAAE,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC,CAAC;QAEtD;;;;;;;WAOG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;;;;;;;;;;WAWG;QACH,QAAQ,CAAC,EAAE;YACT,4CAA4C;YAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;YACb,6CAA6C;YAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,8CAA8C;YAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,+CAA+C;YAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAA;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,KAAK,CAAA;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMaplibreWorldMapProps.js","sourceRoot":"","sources":["../../../src/controls/worldMap/IMaplibreWorldMapProps.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IData } from "./IData";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface IMarker {
|
|
4
|
+
markerClassName?: string;
|
|
5
|
+
markerStyle?: React.CSSProperties;
|
|
6
|
+
renderToolTip?: (c: IData) => React.ReactNode;
|
|
7
|
+
tooltipClassName?: string;
|
|
8
|
+
tooltipStyle?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=IMarker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMarker.d.ts","sourceRoot":"","sources":["../../../src/controls/worldMap/IMarker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,OAAO;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAClC,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMarker.js","sourceRoot":"","sources":["../../../src/controls/worldMap/IMarker.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMarkerProps.d.ts","sourceRoot":"","sources":["../../../src/controls/worldMap/IMarkerProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,YAAa,SAAQ,OAAO;IAC3C,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMarkerProps.js","sourceRoot":"","sources":["../../../src/controls/worldMap/IMarkerProps.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Theme } from "@fluentui/react-components";
|
|
3
|
+
export interface IWorldMapProps {
|
|
4
|
+
description: string;
|
|
5
|
+
isDarkTheme: boolean;
|
|
6
|
+
hasTeamsContext: boolean;
|
|
7
|
+
title: string;
|
|
8
|
+
theme?: Theme;
|
|
9
|
+
styles?: React.CSSProperties;
|
|
10
|
+
className?: string;
|
|
11
|
+
mapStyleUrl?: string;
|
|
12
|
+
fitPadding?: number;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=IWorldMapProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorldMapProps.d.ts","sourceRoot":"","sources":["../../../src/controls/worldMap/IWorldMapProps.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorldMapProps.js","sourceRoot":"","sources":["../../../src/controls/worldMap/IWorldMapProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MapRef } from 'react-map-gl/maplibre';
|
|
3
|
+
export interface MapNavigationProps {
|
|
4
|
+
mapRef: React.RefObject<MapRef>;
|
|
5
|
+
initialViewState?: {
|
|
6
|
+
longitude: number;
|
|
7
|
+
latitude: number;
|
|
8
|
+
zoom: number;
|
|
9
|
+
};
|
|
10
|
+
vertical?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const MapNavigation: React.FC<MapNavigationProps>;
|
|
13
|
+
export default MapNavigation;
|
|
14
|
+
//# sourceMappingURL=MapNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapNavigation.d.ts","sourceRoot":"","sources":["../../../src/controls/worldMap/MapNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAI/C,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,gBAAgB,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAyBD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkDtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { ArrowReset24Regular, ZoomIn24Regular, ZoomOut24Regular, } from '@fluentui/react-icons';
|
|
7
|
+
import { Button, Tooltip, shorthands, } from '@fluentui/react-components';
|
|
8
|
+
import { css } from '@emotion/css';
|
|
9
|
+
import strings from 'ControlStrings';
|
|
10
|
+
var navStyle = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 16px;\n right: 16px;\n z-index: 2;\n background: tokens.colorNeutralBackground1;\n border-radius: 8px;\n box-shadow: tokens.shadow4;\n padding: 4px;\n display: flex;\n gap: 8px;\n"], ["\n position: absolute;\n top: 16px;\n right: 16px;\n z-index: 2;\n background: tokens.colorNeutralBackground1;\n border-radius: 8px;\n box-shadow: tokens.shadow4;\n padding: 4px;\n display: flex;\n gap: 8px;\n"])));
|
|
11
|
+
var navStyleVertical = css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex-direction: column;\n"], ["\n flex-direction: column;\n"])));
|
|
12
|
+
var buttonStyle = css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n min-width: 32px;\n min-height: 32px;\n ", "\n"], ["\n min-width: 32px;\n min-height: 32px;\n ", "\n"])), shorthands.padding('4px'));
|
|
13
|
+
export var MapNavigation = function (_a) {
|
|
14
|
+
var mapRef = _a.mapRef, _b = _a.initialViewState, initialViewState = _b === void 0 ? { longitude: 0, latitude: 20, zoom: 1 } : _b, _c = _a.vertical, vertical = _c === void 0 ? true : _c;
|
|
15
|
+
var handleZoomIn = React.useCallback(function () {
|
|
16
|
+
var _a;
|
|
17
|
+
(_a = mapRef.current) === null || _a === void 0 ? void 0 : _a.getMap().zoomIn();
|
|
18
|
+
}, [mapRef]);
|
|
19
|
+
var handleZoomOut = React.useCallback(function () {
|
|
20
|
+
var _a;
|
|
21
|
+
(_a = mapRef.current) === null || _a === void 0 ? void 0 : _a.getMap().zoomOut();
|
|
22
|
+
}, [mapRef]);
|
|
23
|
+
var handleReset = React.useCallback(function () {
|
|
24
|
+
var _a;
|
|
25
|
+
(_a = mapRef.current) === null || _a === void 0 ? void 0 : _a.flyTo({
|
|
26
|
+
center: [initialViewState.longitude, initialViewState.latitude],
|
|
27
|
+
zoom: initialViewState.zoom,
|
|
28
|
+
essential: true,
|
|
29
|
+
});
|
|
30
|
+
}, [mapRef, initialViewState]);
|
|
31
|
+
return (React.createElement("div", { className: vertical ? "".concat(navStyle, " ").concat(navStyleVertical) : navStyle },
|
|
32
|
+
React.createElement(Tooltip, { content: strings.worldMapZoomContent, relationship: "label" },
|
|
33
|
+
React.createElement(Button, { appearance: "subtle", icon: React.createElement(ZoomIn24Regular, null), "aria-label": strings.worldMapZoomIn, className: buttonStyle, onClick: handleZoomIn })),
|
|
34
|
+
React.createElement(Tooltip, { content: strings.worldMapZoomOut, relationship: "label" },
|
|
35
|
+
React.createElement(Button, { appearance: "subtle", icon: React.createElement(ZoomOut24Regular, null), "aria-label": strings.worldMapZoomOut, className: buttonStyle, onClick: handleZoomOut })),
|
|
36
|
+
React.createElement(Tooltip, { content: strings.worldMapResetMap, relationship: "label" },
|
|
37
|
+
React.createElement(Button, { appearance: "subtle", icon: React.createElement(ArrowReset24Regular, null), "aria-label": strings.worldMapReset, className: buttonStyle, onClick: handleReset }))));
|
|
38
|
+
};
|
|
39
|
+
export default MapNavigation;
|
|
40
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
41
|
+
//# sourceMappingURL=MapNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapNavigation.js","sourceRoot":"","sources":["../../../src/controls/worldMap/MapNavigation.tsx"],"names":[],"mappings":";;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,MAAM,EACN,OAAO,EACP,UAAU,GACX,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAQrC,IAAM,QAAQ,GAAG,GAAG,gSAAA,6NAWnB,IAAA,CAAC;AAEF,IAAM,gBAAgB,GAAG,GAAG,kGAAA,+BAE3B,IAAA,CAAC;AAEF,IAAM,WAAW,GAAG,GAAG,wHAAA,+CAGnB,EAAyB,IAC5B,KADG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAC5B,CAAC;AAEF,MAAM,CAAC,IAAM,aAAa,GAAiC,UAAC,EAI3D;QAHC,MAAM,YAAA,EACN,wBAA0D,EAA1D,gBAAgB,mBAAG,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAA,EAC1D,gBAAe,EAAf,QAAQ,mBAAG,IAAI,KAAA;IAEf,IAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC;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AAC,OAAO,EAAE,OAAO,CAAC,gBAAgB,EAAE,YAAY,EAAC,OAAO;YAC9D,oBAAC,MAAM,IACL,UAAU,EAAC,QAAQ,EACnB,IAAI,EAAE,oBAAC,mBAAmB,OAAG,gBACjB,OAAO,CAAC,aAAa,EACjC,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,WAAW,GACpB,CACM,CACN,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Marker.d.ts","sourceRoot":"","sources":["../../../src/controls/worldMap/Marker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAwB9C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAuCzC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import * as React from 'react';
|
|
17
|
+
import { Tooltip, tokens } from '@fluentui/react-components';
|
|
18
|
+
import { Marker as MapMarker } from 'react-map-gl/maplibre';
|
|
19
|
+
import TooltipContent from './TooltipContent';
|
|
20
|
+
import { css } from '@emotion/css';
|
|
21
|
+
import strings from 'ControlStrings';
|
|
22
|
+
var useStyles = function () {
|
|
23
|
+
return {
|
|
24
|
+
flag: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 22px;\n height: 10px;\n border-radius: 4px;\n box-shadow: '", ";\n border: 1px solid ", ";\n cursor: pointer;\n display: block;\n margin: 0 auto;\n "], ["\n width: 22px;\n height: 10px;\n border-radius: 4px;\n box-shadow: '", ";\n border: 1px solid ", ";\n cursor: pointer;\n display: block;\n margin: 0 auto;\n "])), tokens.shadow4, tokens.colorNeutralStroke2),
|
|
25
|
+
tooltipContent: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n "], ["\n background-color: ", ";\n "])), tokens.colorBrandBackground2),
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export var Marker = function (_a) {
|
|
29
|
+
var data = _a.data, onClick = _a.onClick, markerClassName = _a.markerClassName, markerStyle = _a.markerStyle, renderToolTip = _a.renderToolTip, tooltipClassName = _a.tooltipClassName, tooltipStyle = _a.tooltipStyle;
|
|
30
|
+
var styles = useStyles();
|
|
31
|
+
return (React.createElement(MapMarker, { longitude: data.coordinates[0], latitude: data.coordinates[1], anchor: "bottom", onClick: function () { return onClick && onClick(data); }, className: markerClassName !== null && markerClassName !== void 0 ? markerClassName : styles.flag, style: markerStyle !== null && markerStyle !== void 0 ? markerStyle : undefined },
|
|
32
|
+
React.createElement(Tooltip, { content: {
|
|
33
|
+
children: renderToolTip !== null && renderToolTip !== void 0 ? renderToolTip : React.createElement(TooltipContent, { data: data }),
|
|
34
|
+
style: __assign({}, tooltipStyle),
|
|
35
|
+
className: tooltipClassName !== null && tooltipClassName !== void 0 ? tooltipClassName : styles.tooltipContent,
|
|
36
|
+
}, relationship: "label" },
|
|
37
|
+
React.createElement("img", { src: data.imageUrl, alt: "".concat(data.name, " ").concat(strings.worldMapFlag), onMouseEnter: function (e) { return (e.currentTarget.style.transform = 'scale(1.1)'); }, onMouseLeave: function (e) { return (e.currentTarget.style.transform = ''); }, style: { cursor: 'pointer' } }))));
|
|
38
|
+
};
|
|
39
|
+
export default Marker;
|
|
40
|
+
var templateObject_1, templateObject_2;
|
|
41
|
+
//# sourceMappingURL=Marker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Marker.js","sourceRoot":"","sources":["../../../src/controls/worldMap/Marker.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAG7D,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,IAAM,SAAS,GAAG;IAChB,OAAO;QACL,IAAI,EAAE,GAAG,8QAAA,2FAIQ,EAAc,6BACT,EAA0B,+EAI/C,KALgB,MAAM,CAAC,OAAO,EACT,MAAM,CAAC,mBAAmB,CAI/C;QACD,cAAc,EAAE,GAAG,0GAAA,4BACG,EAA4B,SACjD,KADqB,MAAM,CAAC,qBAAqB,CACjD;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,MAAM,GAA2B,UAAC,EAS9C;QARC,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,eAAe,qBAAA,EACf,WAAW,iBAAA,EAEX,aAAa,mBAAA,EACb,gBAAgB,sBAAA,EAChB,YAAY,kBAAA;IAEZ,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,CACL,oBAAC,SAAS,IACR,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAC9B,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAC7B,MAAM,EAAC,QAAQ,EACf,OAAO,EAAE,cAAM,OAAA,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,EAAxB,CAAwB,EACvC,SAAS,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,MAAM,CAAC,IAAI,EACzC,KAAK,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,SAAS;QAE/B,oBAAC,OAAO,IACN,OAAO,EAAE;gBACP,QAAQ,EAAE,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,oBAAC,cAAc,IAAC,IAAI,EAAE,IAAI,GAAI;gBACzD,KAAK,eAAO,YAAY,CAAE;gBAC1B,SAAS,EAAE,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,MAAM,CAAC,cAAc;aACrD,EACD,YAAY,EAAC,OAAO;YAEpB,6BACE,GAAG,EAAE,IAAI,CAAC,QAAQ,EAClB,GAAG,EAAE,UAAG,IAAI,CAAC,IAAI,cAAI,OAAO,CAAC,YAAY,CAAE,EAC3C,YAAY,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,EAAhD,CAAgD,EACrE,YAAY,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC,EAAtC,CAAsC,EAC3D,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,GAC5B,CACM,CACA,CACb,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { IData } from "./IData";
|
|
3
|
+
export interface CountryTooltipContentProps {
|
|
4
|
+
data: IData;
|
|
5
|
+
}
|
|
6
|
+
export declare const TooltipContent: React.FC<CountryTooltipContentProps>;
|
|
7
|
+
export default TooltipContent;
|
|
8
|
+
//# sourceMappingURL=TooltipContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipContent.d.ts","sourceRoot":"","sources":["../../../src/controls/worldMap/TooltipContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIhC,MAAM,WAAW,0BAA0B;IAC1C,IAAI,EAAE,KAAK,CAAC;CACZ;AAsCD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAoB/D,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { Text, tokens, } from "@fluentui/react-components";
|
|
7
|
+
import { css } from "@emotion/css";
|
|
8
|
+
import strings from "ControlStrings";
|
|
9
|
+
var stackStyles = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n min-width: 160px;\n\n display: flex;\n flex-direction: column;\n gap: 4px;\n align-items: flex-start;\n background-color: ", ";\n padding: 0;\n min-width: 100px;\n"], ["\n min-width: 160px;\n\n display: flex;\n flex-direction: column;\n gap: 4px;\n align-items: flex-start;\n background-color: ", ";\n padding: 0;\n min-width: 100px;\n"])), tokens.colorBrandBackground2);
|
|
10
|
+
var rowStyles = css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 8px;\n"], ["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));
|
|
11
|
+
var imageStyles = css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 32px;\n height: 20px;\n display: block;\n border-radius: 4px;\n box-shadow: '", ";\n"], ["\n width: 32px;\n height: 20px;\n display: block;\n border-radius: 4px;\n box-shadow: '", ";\n"])), tokens.shadow4);
|
|
12
|
+
var titleStyles = css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-weight: 600;\n font-size: 1rem;\n"], ["\n font-weight: 600;\n font-size: 1rem;\n"])));
|
|
13
|
+
var subTitleStyles = css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: '", ";\n font-size: 0.92rem;\n"], ["\n color: '", ";\n font-size: 0.92rem;\n"])), tokens.colorNeutralForeground2);
|
|
14
|
+
export var TooltipContent = function (_a) {
|
|
15
|
+
var data = _a.data;
|
|
16
|
+
return (React.createElement("div", { className: stackStyles },
|
|
17
|
+
React.createElement("div", { className: rowStyles },
|
|
18
|
+
React.createElement("img", { src: data.imageUrl, alt: "".concat(data.name, " ").concat(strings.worldMapFlag), className: imageStyles }),
|
|
19
|
+
React.createElement(Text, { className: titleStyles }, data.name)),
|
|
20
|
+
React.createElement("div", { className: rowStyles },
|
|
21
|
+
React.createElement(Text, { className: subTitleStyles }, strings.worldMapCoord),
|
|
22
|
+
React.createElement(Text, null,
|
|
23
|
+
data.coordinates[1].toFixed(2),
|
|
24
|
+
strings.worldMapN),
|
|
25
|
+
React.createElement(Text, null,
|
|
26
|
+
data.coordinates[0].toFixed(2),
|
|
27
|
+
strings.worldMapE))));
|
|
28
|
+
};
|
|
29
|
+
export default TooltipContent;
|
|
30
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
31
|
+
//# sourceMappingURL=TooltipContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipContent.js","sourceRoot":"","sources":["../../../src/controls/worldMap/TooltipContent.tsx"],"names":[],"mappings":";;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,IAAI,EACJ,MAAM,GACP,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,GAA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