@rio-cloud/rio-uikit 2.3.0 → 2.4.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/MapPreviousViewportButton.d.ts +2 -0
- package/MapPreviousViewportButton.js +5 -0
- package/MapPreviousViewportButton.js.map +1 -0
- package/Table.js +15 -14
- package/TableNext.js +15 -14
- package/components/map/components/Map.js +175 -157
- package/components/map/components/Map.js.map +1 -1
- package/components/map/components/MapContext.d.ts +2 -0
- package/components/map/components/MapContext.js +8 -6
- package/components/map/components/MapContext.js.map +1 -1
- package/components/map/components/MapPosition.d.ts +1 -1
- package/components/map/components/MapPosition.js +20 -13
- package/components/map/components/MapPosition.js.map +1 -1
- package/components/map/components/features/MapZoom.d.ts +0 -1
- package/components/map/components/features/MapZoom.js +12 -20
- package/components/map/components/features/MapZoom.js.map +1 -1
- package/components/map/components/features/settings/MapSettingsTile.d.ts +27 -0
- package/components/map/components/features/settings/MapSettingsTile.js +17 -17
- package/components/map/components/features/settings/MapSettingsTile.js.map +1 -1
- package/components/map/components/features/settings/buttons/MapPreviousViewportButton.d.ts +10 -0
- package/components/map/components/features/settings/buttons/MapPreviousViewportButton.js +23 -0
- package/components/map/components/features/settings/buttons/MapPreviousViewportButton.js.map +1 -0
- package/components/map/hooks/useMapViewportHistory.d.ts +19 -0
- package/components/map/hooks/useMapViewportHistory.js +116 -0
- package/components/map/hooks/useMapViewportHistory.js.map +1 -0
- package/components/map/icons/MapIcon.d.ts +1 -0
- package/components/map/icons/MapIcon.js +46 -37
- package/components/map/icons/MapIcon.js.map +1 -1
- package/components/map/utils/mapTypes.d.ts +6 -0
- package/components/map/utils/mapTypes.js.map +1 -1
- package/components/selects/Multiselect.d.ts +6 -0
- package/components/selects/Multiselect.js +85 -83
- package/components/selects/Multiselect.js.map +1 -1
- package/components/selects/Select.d.ts +6 -0
- package/components/selects/Select.js +79 -71
- package/components/selects/Select.js.map +1 -1
- package/components/table/Table.d.ts +2 -0
- package/components/table/Table.js +162 -158
- package/components/table/Table.js.map +1 -1
- package/components/table/Table.types.d.ts +6 -0
- package/components/table/TableExpandAllGroupsButton.d.ts +25 -0
- package/components/table/TableExpandAllGroupsButton.js +27 -0
- package/components/table/TableExpandAllGroupsButton.js.map +1 -0
- package/components/table/TableExpandedRow.js +77 -63
- package/components/table/TableExpandedRow.js.map +1 -1
- package/components/table/TableExpanderButton.js +11 -11
- package/components/table/TableExpanderButton.js.map +1 -1
- package/components/table/TableGroupRow.d.ts +13 -1
- package/components/table/TableGroupRow.js +57 -23
- package/components/table/TableGroupRow.js.map +1 -1
- package/components/table/TableHeader.js +40 -39
- package/components/table/TableHeader.js.map +1 -1
- package/components/table/TableRow.js +66 -52
- package/components/table/TableRow.js.map +1 -1
- package/components/table/context/TableRenderConfigContext.d.ts +2 -1
- package/components/table/context/TableRenderConfigContext.js.map +1 -1
- package/components/table/render/header/TableHeaderCellContent.js +4 -4
- package/components/table/render/header/TableHeaderCellContent.js.map +1 -1
- package/components/table/render/header/TableHeaderSelectionCell.d.ts +2 -0
- package/components/table/render/header/TableHeaderSelectionCell.js +22 -12
- package/components/table/render/header/TableHeaderSelectionCell.js.map +1 -1
- package/components/table/runtime/useRenderDraftState.js +1 -0
- package/components/table/runtime/useRenderDraftState.js.map +1 -1
- package/components/table/selection/useInternalTableSelectionState.js +12 -10
- package/components/table/selection/useInternalTableSelectionState.js.map +1 -1
- package/package.json +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { useState as d, useRef as D, useCallback as T, useEffect as _ } from "react";
|
|
2
|
+
const V = 5, A = 100, p = 0.1, H = 180, k = 6371e3, y = {
|
|
3
|
+
entries: [],
|
|
4
|
+
canGoBack: !1,
|
|
5
|
+
goBack: () => {
|
|
6
|
+
}
|
|
7
|
+
}, R = (e) => e * Math.PI / 180, C = (e, n) => {
|
|
8
|
+
const o = R(n.lat - e.lat), u = R(n.lng - e.lng), l = R(e.lat), s = R(n.lat), a = Math.sin(o / 2) ** 2 + Math.cos(l) * Math.cos(s) * Math.sin(u / 2) ** 2;
|
|
9
|
+
return 2 * k * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
10
|
+
}, f = (e) => {
|
|
11
|
+
const n = e.getCenter(), { zoom: o = 0 } = e.getViewModel().getLookAtData();
|
|
12
|
+
return {
|
|
13
|
+
center: {
|
|
14
|
+
lat: n.lat,
|
|
15
|
+
lng: n.lng
|
|
16
|
+
},
|
|
17
|
+
zoom: o
|
|
18
|
+
};
|
|
19
|
+
}, z = (e, n, o, u) => {
|
|
20
|
+
if (!(e && n))
|
|
21
|
+
return !1;
|
|
22
|
+
const l = C(e.center, n.center), s = Math.abs(e.zoom - n.zoom);
|
|
23
|
+
return l >= o || s >= u;
|
|
24
|
+
}, I = (e, n) => e?.center.lat === n?.center.lat && e?.center.lng === n?.center.lng && e?.zoom === n?.zoom, B = (e, {
|
|
25
|
+
maxEntries: n = V,
|
|
26
|
+
centerDistanceThresholdMeters: o = A,
|
|
27
|
+
zoomThreshold: u = p,
|
|
28
|
+
zoomAnimation: l = !1,
|
|
29
|
+
controlledViewport: s
|
|
30
|
+
} = {}) => {
|
|
31
|
+
const [a, M] = d({
|
|
32
|
+
entries: [],
|
|
33
|
+
currentViewport: s,
|
|
34
|
+
isRestoring: !1
|
|
35
|
+
}), m = D(), g = D(), w = T(
|
|
36
|
+
(t, c) => z(t, c, o, u),
|
|
37
|
+
[o, u]
|
|
38
|
+
), h = T(
|
|
39
|
+
(t, c) => {
|
|
40
|
+
const r = t[0];
|
|
41
|
+
return r && !w(c, r) ? t : [c, ...t].slice(0, n);
|
|
42
|
+
},
|
|
43
|
+
[w, n]
|
|
44
|
+
), i = T(
|
|
45
|
+
(t, { replace: c = !1 } = {}) => {
|
|
46
|
+
M((r) => {
|
|
47
|
+
if (c)
|
|
48
|
+
return {
|
|
49
|
+
...r,
|
|
50
|
+
currentViewport: t,
|
|
51
|
+
isRestoring: !1
|
|
52
|
+
};
|
|
53
|
+
if (r.isRestoring)
|
|
54
|
+
return {
|
|
55
|
+
...r,
|
|
56
|
+
currentViewport: t,
|
|
57
|
+
isRestoring: !1
|
|
58
|
+
};
|
|
59
|
+
const { currentViewport: E } = r;
|
|
60
|
+
return E ? I(E, t) ? r : w(E, t) ? {
|
|
61
|
+
...r,
|
|
62
|
+
entries: h(r.entries, E),
|
|
63
|
+
currentViewport: t
|
|
64
|
+
} : {
|
|
65
|
+
...r,
|
|
66
|
+
currentViewport: t
|
|
67
|
+
} : {
|
|
68
|
+
...r,
|
|
69
|
+
currentViewport: t
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
[h, w]
|
|
74
|
+
), L = T(() => {
|
|
75
|
+
const t = e?.map, c = a.entries[0];
|
|
76
|
+
t && c && (window.clearTimeout(m.current), window.clearTimeout(g.current), M((r) => ({
|
|
77
|
+
...r,
|
|
78
|
+
entries: r.entries.slice(1),
|
|
79
|
+
currentViewport: c,
|
|
80
|
+
isRestoring: !0
|
|
81
|
+
})), t.getViewModel().setLookAtData(
|
|
82
|
+
{
|
|
83
|
+
position: c.center,
|
|
84
|
+
zoom: c.zoom
|
|
85
|
+
},
|
|
86
|
+
l
|
|
87
|
+
), m.current = window.setTimeout(() => {
|
|
88
|
+
i(f(t), { replace: !0 }), m.current = void 0;
|
|
89
|
+
}, 750));
|
|
90
|
+
}, [e?.map, i, a.entries, l]);
|
|
91
|
+
return _(() => {
|
|
92
|
+
s && i(s);
|
|
93
|
+
}, [i, s]), _(() => {
|
|
94
|
+
const t = e?.map;
|
|
95
|
+
if (!t)
|
|
96
|
+
return;
|
|
97
|
+
i(f(t), { replace: !0 });
|
|
98
|
+
const c = () => {
|
|
99
|
+
window.clearTimeout(g.current), g.current = window.setTimeout(() => {
|
|
100
|
+
g.current = void 0, i(f(t));
|
|
101
|
+
}, H);
|
|
102
|
+
};
|
|
103
|
+
return t.addEventListener("mapviewchangeend", c), () => {
|
|
104
|
+
t.removeEventListener("mapviewchangeend", c), window.clearTimeout(m.current), window.clearTimeout(g.current), m.current = void 0, g.current = void 0;
|
|
105
|
+
};
|
|
106
|
+
}, [e?.map, i]), {
|
|
107
|
+
entries: a.entries,
|
|
108
|
+
canGoBack: a.entries.length > 0,
|
|
109
|
+
goBack: L
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
y as defaultMapViewportHistory,
|
|
114
|
+
B as useMapViewportHistory
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=useMapViewportHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMapViewportHistory.js","sources":["../../../../src/components/map/hooks/useMapViewportHistory.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { MapApi, Position } from '../utils/mapTypes';\n\nexport type MapViewport = {\n center: Position;\n zoom: number;\n};\n\nexport type MapViewportHistory = {\n entries: MapViewport[];\n canGoBack: boolean;\n goBack: () => void;\n};\n\nexport type UseMapViewportHistoryOptions = {\n maxEntries?: number;\n centerDistanceThresholdMeters?: number;\n zoomThreshold?: number;\n zoomAnimation?: boolean;\n controlledViewport?: MapViewport;\n};\n\nconst DEFAULT_MAX_ENTRIES = 5;\n\nconst DEFAULT_CENTER_DISTANCE_THRESHOLD_METERS = 100;\nconst DEFAULT_ZOOM_THRESHOLD = 0.1;\nconst VIEWPORT_CHANGE_SETTLE_DELAY_MS = 180;\nconst EARTH_RADIUS_METERS = 6371000;\n\nexport const defaultMapViewportHistory: MapViewportHistory = {\n entries: [],\n canGoBack: false,\n goBack: () => {},\n};\n\nconst toRadians = (degrees: number) => (degrees * Math.PI) / 180;\n\nconst getDistanceMeters = (first: Position, second: Position) => {\n const latDistance = toRadians(second.lat - first.lat);\n const lngDistance = toRadians(second.lng - first.lng);\n const firstLat = toRadians(first.lat);\n const secondLat = toRadians(second.lat);\n\n const haversine =\n Math.sin(latDistance / 2) ** 2 + Math.cos(firstLat) * Math.cos(secondLat) * Math.sin(lngDistance / 2) ** 2;\n\n return 2 * EARTH_RADIUS_METERS * Math.atan2(Math.sqrt(haversine), Math.sqrt(1 - haversine));\n};\n\nconst getViewport = (map: H.Map): MapViewport => {\n const center = map.getCenter();\n const { zoom = 0 } = map.getViewModel().getLookAtData();\n\n return {\n center: {\n lat: center.lat,\n lng: center.lng,\n },\n zoom,\n };\n};\n\nconst hasRelevantViewportChange = (\n first: MapViewport | undefined,\n second: MapViewport | undefined,\n centerDistanceThresholdMeters: number,\n zoomThreshold: number\n) => {\n if (!(first && second)) {\n return false;\n }\n\n const centerDistance = getDistanceMeters(first.center, second.center);\n const zoomDistance = Math.abs(first.zoom - second.zoom);\n\n return centerDistance >= centerDistanceThresholdMeters || zoomDistance >= zoomThreshold;\n};\n\nconst hasSameViewport = (first: MapViewport | undefined, second: MapViewport | undefined) =>\n first?.center.lat === second?.center.lat &&\n first?.center.lng === second?.center.lng &&\n first?.zoom === second?.zoom;\n\ntype MapViewportHistoryState = {\n entries: MapViewport[];\n currentViewport?: MapViewport;\n isRestoring: boolean;\n};\n\nexport const useMapViewportHistory = (\n api: MapApi | undefined,\n {\n maxEntries = DEFAULT_MAX_ENTRIES,\n centerDistanceThresholdMeters = DEFAULT_CENTER_DISTANCE_THRESHOLD_METERS,\n zoomThreshold = DEFAULT_ZOOM_THRESHOLD,\n zoomAnimation = false,\n controlledViewport,\n }: UseMapViewportHistoryOptions = {}\n): MapViewportHistory => {\n const [state, setState] = useState<MapViewportHistoryState>({\n entries: [],\n currentViewport: controlledViewport,\n isRestoring: false,\n });\n const restoreFallbackTimeoutRef = useRef<number>();\n const commitHistoryTimeoutRef = useRef<number>();\n\n const isRelevantChange = useCallback(\n (first: MapViewport | undefined, second: MapViewport | undefined) =>\n hasRelevantViewportChange(first, second, centerDistanceThresholdMeters, zoomThreshold),\n [centerDistanceThresholdMeters, zoomThreshold]\n );\n\n const getEntriesWithViewport = useCallback(\n (entries: MapViewport[], viewport: MapViewport) => {\n const latestEntry = entries[0];\n\n if (latestEntry && !isRelevantChange(viewport, latestEntry)) {\n return entries;\n }\n\n return [viewport, ...entries].slice(0, maxEntries);\n },\n [isRelevantChange, maxEntries]\n );\n\n const commitViewport = useCallback(\n (nextViewport: MapViewport, { replace = false } = {}) => {\n setState(previousState => {\n if (replace) {\n return {\n ...previousState,\n currentViewport: nextViewport,\n isRestoring: false,\n };\n }\n\n if (previousState.isRestoring) {\n return {\n ...previousState,\n currentViewport: nextViewport,\n isRestoring: false,\n };\n }\n\n const { currentViewport } = previousState;\n\n if (!currentViewport) {\n return {\n ...previousState,\n currentViewport: nextViewport,\n };\n }\n\n if (hasSameViewport(currentViewport, nextViewport)) {\n return previousState;\n }\n\n if (!isRelevantChange(currentViewport, nextViewport)) {\n return {\n ...previousState,\n currentViewport: nextViewport,\n };\n }\n\n return {\n ...previousState,\n entries: getEntriesWithViewport(previousState.entries, currentViewport),\n currentViewport: nextViewport,\n };\n });\n },\n [getEntriesWithViewport, isRelevantChange]\n );\n\n const goBack = useCallback(() => {\n const map = api?.map;\n const targetViewport = state.entries[0];\n\n if (!(map && targetViewport)) {\n return;\n }\n\n window.clearTimeout(restoreFallbackTimeoutRef.current);\n window.clearTimeout(commitHistoryTimeoutRef.current);\n setState(previousState => ({\n ...previousState,\n entries: previousState.entries.slice(1),\n currentViewport: targetViewport,\n isRestoring: true,\n }));\n\n map.getViewModel().setLookAtData(\n {\n position: targetViewport.center,\n zoom: targetViewport.zoom,\n },\n zoomAnimation\n );\n\n restoreFallbackTimeoutRef.current = window.setTimeout(() => {\n commitViewport(getViewport(map), { replace: true });\n restoreFallbackTimeoutRef.current = undefined;\n }, 750);\n }, [api?.map, commitViewport, state.entries, zoomAnimation]);\n\n useEffect(() => {\n if (controlledViewport) {\n commitViewport(controlledViewport);\n }\n }, [commitViewport, controlledViewport]);\n\n useEffect(() => {\n const map = api?.map;\n\n if (!map) {\n return;\n }\n\n commitViewport(getViewport(map), { replace: true });\n\n const handleMapViewChangeEnd = () => {\n window.clearTimeout(commitHistoryTimeoutRef.current);\n\n commitHistoryTimeoutRef.current = window.setTimeout(() => {\n commitHistoryTimeoutRef.current = undefined;\n commitViewport(getViewport(map));\n }, VIEWPORT_CHANGE_SETTLE_DELAY_MS);\n };\n\n map.addEventListener('mapviewchangeend', handleMapViewChangeEnd as EventListener);\n\n return () => {\n map.removeEventListener('mapviewchangeend', handleMapViewChangeEnd as EventListener);\n window.clearTimeout(restoreFallbackTimeoutRef.current);\n window.clearTimeout(commitHistoryTimeoutRef.current);\n restoreFallbackTimeoutRef.current = undefined;\n commitHistoryTimeoutRef.current = undefined;\n };\n }, [api?.map, commitViewport]);\n\n return {\n entries: state.entries,\n canGoBack: state.entries.length > 0,\n goBack,\n };\n};\n"],"names":["DEFAULT_MAX_ENTRIES","DEFAULT_CENTER_DISTANCE_THRESHOLD_METERS","DEFAULT_ZOOM_THRESHOLD","VIEWPORT_CHANGE_SETTLE_DELAY_MS","EARTH_RADIUS_METERS","defaultMapViewportHistory","toRadians","degrees","getDistanceMeters","first","second","latDistance","lngDistance","firstLat","secondLat","haversine","getViewport","map","center","zoom","hasRelevantViewportChange","centerDistanceThresholdMeters","zoomThreshold","centerDistance","zoomDistance","hasSameViewport","useMapViewportHistory","api","maxEntries","zoomAnimation","controlledViewport","state","setState","useState","restoreFallbackTimeoutRef","useRef","commitHistoryTimeoutRef","isRelevantChange","useCallback","getEntriesWithViewport","entries","viewport","latestEntry","commitViewport","nextViewport","replace","previousState","currentViewport","goBack","targetViewport","useEffect","handleMapViewChangeEnd"],"mappings":";AAuBA,MAAMA,IAAsB,GAEtBC,IAA2C,KAC3CC,IAAyB,KACzBC,IAAkC,KAClCC,IAAsB,QAEfC,IAAgD;AAAA,EACzD,SAAS,CAAA;AAAA,EACT,WAAW;AAAA,EACX,QAAQ,MAAM;AAAA,EAAC;AACnB,GAEMC,IAAY,CAACC,MAAqBA,IAAU,KAAK,KAAM,KAEv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M;AACT,MAAAlC,EAAI,oBAAoB,oBAAoBkC,CAAuC,GACnF,OAAO,aAAajB,EAA0B,OAAO,GACrD,OAAO,aAAaE,EAAwB,OAAO,GACnDF,EAA0B,UAAU,QACpCE,EAAwB,UAAU;AAAA,IACtC;AAAA,EACJ,GAAG,CAACT,GAAK,KAAKgB,CAAc,CAAC,GAEtB;AAAA,IACH,SAASZ,EAAM;AAAA,IACf,WAAWA,EAAM,QAAQ,SAAS;AAAA,IAClC,QAAAiB;AAAA,EAAA;AAER;"}
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { jsx as l, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
const { className:
|
|
5
|
-
return h.includes("rioglyph") ? /* @__PURE__ */ l(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import e from "react";
|
|
3
|
+
const r = (m) => {
|
|
4
|
+
const { className: a = "", name: h = "", pairName: t, height: v = 40, width: i = 40 } = m;
|
|
5
|
+
return h.includes("rioglyph") ? /* @__PURE__ */ l(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
className: `height-40 width-40 text-size-16 display-grid place-items-center hover-scale-110 ${a}`,
|
|
9
|
+
children: t ? /* @__PURE__ */ c("span", { className: "rioglyph-icon-pair text-size-200pct", children: [
|
|
10
|
+
/* @__PURE__ */ l("span", { className: `rioglyph ${h}` }),
|
|
11
|
+
/* @__PURE__ */ l("span", { className: `rioglyph ${t}` })
|
|
12
|
+
] }) : /* @__PURE__ */ l("span", { className: `rioglyph ${h} text-size-200pct` })
|
|
13
|
+
}
|
|
14
|
+
) : e.cloneElement(s[h], {
|
|
15
|
+
className: a,
|
|
16
|
+
height: v,
|
|
17
|
+
width: i
|
|
9
18
|
});
|
|
10
|
-
},
|
|
19
|
+
}, d = "zoomIn", w = "zoomOut", o = "boundingBoxActive", g = "boundingBoxInactive", p = "clusterActive", Z = "clusterInactive", A = "constructionActive", M = "constructionInactive", f = "lockActive", L = "lockInactive", T = "mapTypeFlatActive", I = "mapTypeFlatInactive", C = "mapTypeFlatTruckActive", H = "mapTypeFlatTruckInactive", B = "mapTypeSatelliteActive", F = "mapTypeSatelliteInactive", V = "mapTypeTerrainActive", _ = "mapTypeTerrainInactive", x = "mapTypeNightActive", E = "mapTypeNightInactive", y = "noClusterActive", N = "noClusterInactive", u = "roadRestrictionsActive", R = "roadRestrictionsInactive", P = "systemPoisActive", O = "systemPoisInactive", S = "trafficActive", k = "trafficInactive", D = "workshopPoisActive", Y = "workshopPoisInactive", s = {
|
|
11
20
|
zoomIn: /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", children: /* @__PURE__ */ l("path", { fill: "#A7AFBB", d: "M9.5 1v5.5H15v3H9.5V15h-3V9.5H1v-3h5.5V1z" }) }),
|
|
12
21
|
zoomOut: /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", children: /* @__PURE__ */ l("path", { fill: "#A7AFBB", d: "M7.177 9.5H1v-3h14v3H8.823z" }) }),
|
|
13
22
|
boundingBoxActive: /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", width: "40", height: "40", children: /* @__PURE__ */ l(
|
|
@@ -422,36 +431,36 @@ const z = (a) => {
|
|
|
422
431
|
) })
|
|
423
432
|
};
|
|
424
433
|
export {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
434
|
+
o as BOUNDING_BOX_ACTIVE,
|
|
435
|
+
g as BOUNDING_BOX_INACTIVE,
|
|
436
|
+
p as CLUSTER_ACTIVE,
|
|
428
437
|
Z as CLUSTER_INACTIVE,
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
438
|
+
A as CONSTRUCTION_ACTIVE,
|
|
439
|
+
M as CONSTRUCTION_INACTIVE,
|
|
440
|
+
f as LOCK_ACTIVE,
|
|
441
|
+
L as LOCK_INACTIVE,
|
|
442
|
+
T as MAP_TYPE_FLAT_ACTIVE,
|
|
443
|
+
I as MAP_TYPE_FLAT_INACTIVE,
|
|
444
|
+
C as MAP_TYPE_FLAT_TRUCK_ACTIVE,
|
|
445
|
+
H as MAP_TYPE_FLAT_TRUCK_INACTIVE,
|
|
446
|
+
x as MAP_TYPE_NIGHT_ACTIVE,
|
|
447
|
+
E as MAP_TYPE_NIGHT_INACTIVE,
|
|
448
|
+
B as MAP_TYPE_SATELLITE_ACTIVE,
|
|
449
|
+
F as MAP_TYPE_SATELLITE_INACTIVE,
|
|
450
|
+
V as MAP_TYPE_TERRAIN_ACTIVE,
|
|
451
|
+
_ as MAP_TYPE_TERRAIN_INACTIVE,
|
|
452
|
+
r as MapIcon,
|
|
453
|
+
y as NO_CLUSTER_ACTIVE,
|
|
454
|
+
N as NO_CLUSTER_INACTIVE,
|
|
455
|
+
u as ROAD_RESTRICTIONS_ACTIVE,
|
|
447
456
|
R as ROAD_RESTRICTIONS_INACTIVE,
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
457
|
+
P as SYSTEM_POIS_ACTIVE,
|
|
458
|
+
O as SYSTEM_POIS_INACTIVE,
|
|
459
|
+
S as TRAFFIC_ACTIVE,
|
|
460
|
+
k as TRAFFIC_INACTIVE,
|
|
461
|
+
D as WORKSHOP_POIS_ACTIVE,
|
|
462
|
+
Y as WORKSHOP_POIS_INACTIVE,
|
|
463
|
+
d as ZOOM_IN,
|
|
464
|
+
w as ZOOM_OUT
|
|
456
465
|
};
|
|
457
466
|
//# sourceMappingURL=MapIcon.js.map
|