@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.
Files changed (69) hide show
  1. package/MapPreviousViewportButton.d.ts +2 -0
  2. package/MapPreviousViewportButton.js +5 -0
  3. package/MapPreviousViewportButton.js.map +1 -0
  4. package/Table.js +15 -14
  5. package/TableNext.js +15 -14
  6. package/components/map/components/Map.js +175 -157
  7. package/components/map/components/Map.js.map +1 -1
  8. package/components/map/components/MapContext.d.ts +2 -0
  9. package/components/map/components/MapContext.js +8 -6
  10. package/components/map/components/MapContext.js.map +1 -1
  11. package/components/map/components/MapPosition.d.ts +1 -1
  12. package/components/map/components/MapPosition.js +20 -13
  13. package/components/map/components/MapPosition.js.map +1 -1
  14. package/components/map/components/features/MapZoom.d.ts +0 -1
  15. package/components/map/components/features/MapZoom.js +12 -20
  16. package/components/map/components/features/MapZoom.js.map +1 -1
  17. package/components/map/components/features/settings/MapSettingsTile.d.ts +27 -0
  18. package/components/map/components/features/settings/MapSettingsTile.js +17 -17
  19. package/components/map/components/features/settings/MapSettingsTile.js.map +1 -1
  20. package/components/map/components/features/settings/buttons/MapPreviousViewportButton.d.ts +10 -0
  21. package/components/map/components/features/settings/buttons/MapPreviousViewportButton.js +23 -0
  22. package/components/map/components/features/settings/buttons/MapPreviousViewportButton.js.map +1 -0
  23. package/components/map/hooks/useMapViewportHistory.d.ts +19 -0
  24. package/components/map/hooks/useMapViewportHistory.js +116 -0
  25. package/components/map/hooks/useMapViewportHistory.js.map +1 -0
  26. package/components/map/icons/MapIcon.d.ts +1 -0
  27. package/components/map/icons/MapIcon.js +46 -37
  28. package/components/map/icons/MapIcon.js.map +1 -1
  29. package/components/map/utils/mapTypes.d.ts +6 -0
  30. package/components/map/utils/mapTypes.js.map +1 -1
  31. package/components/selects/Multiselect.d.ts +6 -0
  32. package/components/selects/Multiselect.js +85 -83
  33. package/components/selects/Multiselect.js.map +1 -1
  34. package/components/selects/Select.d.ts +6 -0
  35. package/components/selects/Select.js +79 -71
  36. package/components/selects/Select.js.map +1 -1
  37. package/components/table/Table.d.ts +2 -0
  38. package/components/table/Table.js +162 -158
  39. package/components/table/Table.js.map +1 -1
  40. package/components/table/Table.types.d.ts +6 -0
  41. package/components/table/TableExpandAllGroupsButton.d.ts +25 -0
  42. package/components/table/TableExpandAllGroupsButton.js +27 -0
  43. package/components/table/TableExpandAllGroupsButton.js.map +1 -0
  44. package/components/table/TableExpandedRow.js +77 -63
  45. package/components/table/TableExpandedRow.js.map +1 -1
  46. package/components/table/TableExpanderButton.js +11 -11
  47. package/components/table/TableExpanderButton.js.map +1 -1
  48. package/components/table/TableGroupRow.d.ts +13 -1
  49. package/components/table/TableGroupRow.js +57 -23
  50. package/components/table/TableGroupRow.js.map +1 -1
  51. package/components/table/TableHeader.js +40 -39
  52. package/components/table/TableHeader.js.map +1 -1
  53. package/components/table/TableRow.js +66 -52
  54. package/components/table/TableRow.js.map +1 -1
  55. package/components/table/context/TableRenderConfigContext.d.ts +2 -1
  56. package/components/table/context/TableRenderConfigContext.js.map +1 -1
  57. package/components/table/render/header/TableHeaderCellContent.js +4 -4
  58. package/components/table/render/header/TableHeaderCellContent.js.map +1 -1
  59. package/components/table/render/header/TableHeaderSelectionCell.d.ts +2 -0
  60. package/components/table/render/header/TableHeaderSelectionCell.js +22 -12
  61. package/components/table/render/header/TableHeaderSelectionCell.js.map +1 -1
  62. package/components/table/runtime/useRenderDraftState.js +1 -0
  63. package/components/table/runtime/useRenderDraftState.js.map +1 -1
  64. package/components/table/selection/useInternalTableSelectionState.js +12 -10
  65. package/components/table/selection/useInternalTableSelectionState.js.map +1 -1
  66. package/package.json +1 -1
  67. package/version.d.ts +1 -1
  68. package/version.js +1 -1
  69. package/version.js.map +1 -1
@@ -0,0 +1,2 @@
1
+ export { default } from './components/map/components/features/settings/buttons/MapPreviousViewportButton';
2
+ export * from './components/map/components/features/settings/buttons/MapPreviousViewportButton';
@@ -0,0 +1,5 @@
1
+ import { default as o } from "./components/map/components/features/settings/buttons/MapPreviousViewportButton.js";
2
+ export {
3
+ o as default
4
+ };
5
+ //# sourceMappingURL=MapPreviousViewportButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapPreviousViewportButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/Table.js CHANGED
@@ -1,24 +1,25 @@
1
- import { TableBatchDropdown as a, TableBody as l, TableColumn as b, TableColumnFilter as T, TableColumnsDropdown as r, TableExpandedContentRow as t, TableExpandedRow as n, TableExpanderButton as d, TableFooter as u, TableGroupFooterRow as p, TableGroupRow as w, TableHeader as R, TableHeaderColumn as m, TableHeaderRow as x, TableRow as C, TableSpacerRow as c, TableStickyRowButton as f, default as B } from "./components/table/Table.js";
2
- import { default as s } from "./components/table/selection/useTableSelection.js";
1
+ import { TableBatchDropdown as a, TableBody as l, TableColumn as b, TableColumnFilter as T, TableColumnsDropdown as t, TableExpandAllGroupsButton as r, TableExpandedContentRow as n, TableExpandedRow as d, TableExpanderButton as u, TableFooter as p, TableGroupFooterRow as w, TableGroupRow as R, TableHeader as m, TableHeaderColumn as x, TableHeaderRow as B, TableRow as C, TableSpacerRow as c, TableStickyRowButton as f, default as s } from "./components/table/Table.js";
2
+ import { default as i } from "./components/table/selection/useTableSelection.js";
3
3
  export {
4
4
  a as TableBatchDropdown,
5
5
  l as TableBody,
6
6
  b as TableColumn,
7
7
  T as TableColumnFilter,
8
- r as TableColumnsDropdown,
9
- t as TableExpandedContentRow,
10
- n as TableExpandedRow,
11
- d as TableExpanderButton,
12
- u as TableFooter,
13
- p as TableGroupFooterRow,
14
- w as TableGroupRow,
15
- R as TableHeader,
16
- m as TableHeaderColumn,
17
- x as TableHeaderRow,
8
+ t as TableColumnsDropdown,
9
+ r as TableExpandAllGroupsButton,
10
+ n as TableExpandedContentRow,
11
+ d as TableExpandedRow,
12
+ u as TableExpanderButton,
13
+ p as TableFooter,
14
+ w as TableGroupFooterRow,
15
+ R as TableGroupRow,
16
+ m as TableHeader,
17
+ x as TableHeaderColumn,
18
+ B as TableHeaderRow,
18
19
  C as TableRow,
19
20
  c as TableSpacerRow,
20
21
  f as TableStickyRowButton,
21
- B as default,
22
- s as useTableSelection
22
+ s as default,
23
+ i as useTableSelection
23
24
  };
24
25
  //# sourceMappingURL=Table.js.map
package/TableNext.js CHANGED
@@ -1,24 +1,25 @@
1
- import { TableBatchDropdown as a, TableBody as l, TableColumn as b, TableColumnFilter as T, TableColumnsDropdown as r, TableExpandedContentRow as t, TableExpandedRow as n, TableExpanderButton as d, TableFooter as u, TableGroupFooterRow as p, TableGroupRow as w, TableHeader as R, TableHeaderColumn as m, TableHeaderRow as x, TableRow as C, TableSpacerRow as c, TableStickyRowButton as f, default as B } from "./components/table/Table.js";
2
- import { default as s } from "./components/table/selection/useTableSelection.js";
1
+ import { TableBatchDropdown as a, TableBody as l, TableColumn as b, TableColumnFilter as T, TableColumnsDropdown as t, TableExpandAllGroupsButton as r, TableExpandedContentRow as n, TableExpandedRow as d, TableExpanderButton as u, TableFooter as p, TableGroupFooterRow as w, TableGroupRow as R, TableHeader as m, TableHeaderColumn as x, TableHeaderRow as B, TableRow as C, TableSpacerRow as c, TableStickyRowButton as f, default as s } from "./components/table/Table.js";
2
+ import { default as i } from "./components/table/selection/useTableSelection.js";
3
3
  export {
4
4
  a as TableBatchDropdown,
5
5
  l as TableBody,
6
6
  b as TableColumn,
7
7
  T as TableColumnFilter,
8
- r as TableColumnsDropdown,
9
- t as TableExpandedContentRow,
10
- n as TableExpandedRow,
11
- d as TableExpanderButton,
12
- u as TableFooter,
13
- p as TableGroupFooterRow,
14
- w as TableGroupRow,
15
- R as TableHeader,
16
- m as TableHeaderColumn,
17
- x as TableHeaderRow,
8
+ t as TableColumnsDropdown,
9
+ r as TableExpandAllGroupsButton,
10
+ n as TableExpandedContentRow,
11
+ d as TableExpandedRow,
12
+ u as TableExpanderButton,
13
+ p as TableFooter,
14
+ w as TableGroupFooterRow,
15
+ R as TableGroupRow,
16
+ m as TableHeader,
17
+ x as TableHeaderColumn,
18
+ B as TableHeaderRow,
18
19
  C as TableRow,
19
20
  c as TableSpacerRow,
20
21
  f as TableStickyRowButton,
21
- B as default,
22
- s as useTableSelection
22
+ s as default,
23
+ i as useTableSelection
23
24
  };
24
25
  //# sourceMappingURL=TableNext.js.map
@@ -1,40 +1,41 @@
1
- import { jsx as c, jsxs as Fe } from "react/jsx-runtime";
2
- import { useRef as I, useState as i, useEffect as l } from "react";
3
- import { isEmpty as Be } from "es-toolkit/compat";
4
- import { isEqual as ke } from "es-toolkit/predicate";
5
- import { DEFAULT_MAX_ZOOM as ce, MAP_TYPE_DEFAULT as y, DEFAULT_PIXEL_RATIO as He, DEFAULT_MIN_ZOOM as Ue, MAP_LAYER_ROAD_RESTRICTIONS as pe, MAP_TYPE_NIGHT as k, MAP_TYPE_FLEET_STYLE as ze, MAP_TYPE_SATELLITE as je, MAP_TYPE_TERRAIN as Ve, MAP_LAYER_INCIDENTS as We, MAP_LAYER_TRAFFIC as qe } from "./constants.js";
6
- import { removeEventListenerMap as Ge, addEventListenerMap as Ke } from "../utils/eventHandling.js";
7
- import { MapContext as Xe } from "./MapContext.js";
8
- import { getMapBounds as $e, createUtils as Je } from "../utils/mapUtils.js";
9
- import { getHereUi as Qe } from "../utils/mapUi.js";
10
- import et from "../../../hooks/useDarkMode.js";
11
- import tt from "./features/MapZoom.js";
12
- import nt from "./features/layers/MapOverlayLayers.js";
13
- import at from "./MapSize.js";
14
- import ot from "./MapPosition.js";
15
- import rt from "./MapElements.js";
16
- import { getPlatform as st, getBaseLayer as it, getEngineType as lt } from "../utils/rendering.js";
17
- const mt = "map-disable-marker-pointer-events", ct = 140, s = (ue) => {
1
+ import { jsx as p, jsxs as He } from "react/jsx-runtime";
2
+ import { useRef as S, useState as i, useMemo as Ue, useEffect as l } from "react";
3
+ import { isEmpty as ze } from "es-toolkit/compat";
4
+ import { isEqual as Ve } from "es-toolkit/predicate";
5
+ import { DEFAULT_MAX_ZOOM as ce, MAP_TYPE_DEFAULT as w, DEFAULT_PIXEL_RATIO as je, DEFAULT_MIN_ZOOM as We, MAP_LAYER_ROAD_RESTRICTIONS as pe, MAP_TYPE_NIGHT as V, MAP_TYPE_FLEET_STYLE as qe, MAP_TYPE_SATELLITE as Ge, MAP_TYPE_TERRAIN as Ke, MAP_LAYER_INCIDENTS as Xe, MAP_LAYER_TRAFFIC as $e } from "./constants.js";
6
+ import { removeEventListenerMap as Je, addEventListenerMap as Qe } from "../utils/eventHandling.js";
7
+ import { MapContext as et } from "./MapContext.js";
8
+ import { getMapBounds as tt, createUtils as ot } from "../utils/mapUtils.js";
9
+ import { getHereUi as nt } from "../utils/mapUi.js";
10
+ import rt from "../../../hooks/useDarkMode.js";
11
+ import at from "./features/MapZoom.js";
12
+ import st from "./features/layers/MapOverlayLayers.js";
13
+ import it from "./MapSize.js";
14
+ import lt from "./MapPosition.js";
15
+ import mt from "./MapElements.js";
16
+ import { getPlatform as ct, getBaseLayer as pt, getEngineType as ut } from "../utils/rendering.js";
17
+ import { useMapViewportHistory as Et } from "../hooks/useMapViewportHistory.js";
18
+ const dt = "map-disable-marker-pointer-events", vt = 140, s = (ue) => {
18
19
  const {
19
20
  children: Ee,
20
- credentials: U,
21
- width: z,
22
- height: j,
21
+ credentials: j,
22
+ width: W,
23
+ height: q,
23
24
  language: de = "en",
24
- center: V,
25
- zoom: W,
26
- zoomAnimation: q = !1,
27
- boundingBox: S,
25
+ center: m,
26
+ zoom: u,
27
+ zoomAnimation: b = !1,
28
+ boundingBox: O,
28
29
  hideClusterSettings: ve = !1,
29
30
  hideMapLayerSettings: fe = !1,
30
31
  disableMapEvents: G,
31
32
  disableBehavior: K = !1,
32
33
  disableZoomMomentum: X = !0,
33
- enableFractionalZoom: b = !1,
34
+ enableFractionalZoom: x = !1,
34
35
  eventListenerMap: he,
35
- mapType: L = y,
36
- mapLayer: p = [],
37
- showCluster: w = !0,
36
+ mapType: g = w,
37
+ mapLayer: E = [],
38
+ showCluster: D = !0,
38
39
  showScaleBar: Me = !1,
39
40
  onMapLayerChange: Le = () => {
40
41
  },
@@ -48,195 +49,212 @@ const mt = "map-disable-marker-pointer-events", ct = 140, s = (ue) => {
48
49
  },
49
50
  onIncidentsChange: Re = () => {
50
51
  },
51
- mapSettingsTooltip: Pe,
52
+ mapSettingsTooltip: ye,
52
53
  mapSettings: $,
53
- enableWebGL: u = !0,
54
+ maxViewportHistoryEntries: Pe,
55
+ enableWebGL: d = !0,
54
56
  enableDevicePixelRatio: J = !0,
55
57
  enableMarkerIconCache: Ce = !0,
56
- disableMarkerPointerEventsWhileZooming: E = !1,
57
- pixelRatio: Q = He,
58
- minZoom: T = Ue,
59
- maxZoom: O = ce
58
+ disableMarkerPointerEventsWhileZooming: v = !1,
59
+ pixelRatio: Q = je,
60
+ minZoom: _ = We,
61
+ maxZoom: N = ce
60
62
  } = ue;
61
- let D = O;
62
- T > O && (D = ce, console.error("Invalid condition for zoom limits: min <= max)"));
63
- const g = I(null), d = I(), ee = I(!1), N = I(E), [Ie, ye] = i(!1), [Se, _] = i(!1), [t, be] = i(), [o, we] = i(L), [r, te] = i(p), [ne, ae] = i(w), oe = J && window.devicePixelRatio || Q, m = /* @__PURE__ */ ((e) => e === "nb" ? "no" : e)(de.split("-")[0].toLowerCase()), v = (e) => {
64
- if (e && !N.current)
63
+ let Y = N;
64
+ _ > N && (Y = ce, console.error("Invalid condition for zoom limits: min <= max)"));
65
+ const A = S(null), f = S(), ee = S(!1), Z = S(v), [Ie, Se] = i(!1), [we, R] = i(!1), [t, be] = i(), [r, Oe] = i(g), [a, te] = i(E), [oe, ne] = i(D), xe = Ue(
66
+ () => m && u !== void 0 ? { center: m, zoom: u } : void 0,
67
+ [m?.lat, m?.lng, u]
68
+ ), De = Et(t, {
69
+ maxEntries: Pe,
70
+ zoomAnimation: b,
71
+ controlledViewport: xe
72
+ }), re = J && window.devicePixelRatio || Q, c = /* @__PURE__ */ ((e) => e === "nb" ? "no" : e)(de.split("-")[0].toLowerCase()), h = (e) => {
73
+ if (e && !Z.current)
65
74
  return;
66
- const a = g.current;
67
- a && (a.classList.toggle(mt, e), ee.current = e);
68
- }, f = () => {
69
- d.current !== void 0 && (window.clearTimeout(d.current), d.current = void 0);
70
- }, re = () => {
71
- f(), d.current = window.setTimeout(() => {
72
- v(!1), _(!1), d.current = void 0;
73
- }, ct);
75
+ const n = A.current;
76
+ n && (n.classList.toggle(dt, e), ee.current = e);
77
+ }, M = () => {
78
+ f.current !== void 0 && (window.clearTimeout(f.current), f.current = void 0);
79
+ }, ae = () => {
80
+ M(), f.current = window.setTimeout(() => {
81
+ h(!1), R(!1), f.current = void 0;
82
+ }, vt);
74
83
  }, se = () => {
75
- _(!0), f(), N.current && !ee.current && v(!0);
84
+ R(!0), M(), Z.current && !ee.current && h(!0);
76
85
  };
77
86
  l(() => {
78
- N.current = E;
79
- }, [E]), l(() => {
80
- const e = g.current;
87
+ Z.current = v;
88
+ }, [v]), l(() => {
89
+ const e = A.current;
81
90
  if (!e)
82
91
  return;
83
- const a = () => {
84
- se(), re();
92
+ const n = () => {
93
+ se(), ae();
85
94
  };
86
- return e.addEventListener("wheel", a, { passive: !0, capture: !0 }), () => {
87
- e.removeEventListener("wheel", a, { capture: !0 });
95
+ return e.addEventListener("wheel", n, { passive: !0, capture: !0 }), () => {
96
+ e.removeEventListener("wheel", n, { capture: !0 });
88
97
  };
89
98
  }, []), l(() => {
90
- let e = [], a = () => {
99
+ let e = [], n = () => {
91
100
  };
92
- t?.map ? (e = t.map.getObjects(), console.debug("re-initialize here map")) : console.debug("initialize here map"), t?.map && (console.debug("disposing previous map"), Ge(t.map), t.mapEvents && t.mapEvents.dispose(), t.map.dispose());
93
- const P = S && $e(S), h = st(U), M = lt(o, u), x = h.createDefaultLayers({ engineType: M, lg: m, pois: !0 });
94
- return it({
95
- baseLayerName: o,
96
- defaultLayers: x,
97
- enableWebGL: u,
98
- platform: h,
99
- engineType: M,
100
- vehicleRestrictions: r.includes(pe),
101
- language: m,
102
- minZoom: T,
103
- maxZoom: D
104
- }).then((F) => {
101
+ t?.map ? (e = t.map.getObjects(), console.debug("re-initialize here map")) : console.debug("initialize here map"), t?.map && (console.debug("disposing previous map"), Je(t.map), t.mapEvents && t.mapEvents.dispose(), t.map.dispose());
102
+ const C = O && tt(O), L = ct(j), T = ut(r, d), k = L.createDefaultLayers({ engineType: T, lg: c, pois: !0 });
103
+ return pt({
104
+ baseLayerName: r,
105
+ defaultLayers: k,
106
+ enableWebGL: d,
107
+ platform: L,
108
+ engineType: T,
109
+ vehicleRestrictions: a.includes(pe),
110
+ language: c,
111
+ minZoom: _,
112
+ maxZoom: Y
113
+ }).then((U) => {
105
114
  const le = () => {
106
115
  se();
107
116
  }, me = () => {
108
- re();
109
- }, n = new H.Map(g.current, F.baseLayer, {
110
- zoom: W,
111
- center: V,
112
- bounds: P,
113
- engineType: M,
114
- pixelRatio: oe,
117
+ ae();
118
+ }, o = new H.Map(A.current, U.baseLayer, {
119
+ zoom: u,
120
+ center: m,
121
+ bounds: C,
122
+ engineType: T,
123
+ pixelRatio: re,
115
124
  fixedCenter: !0
116
125
  });
117
- F.overlayLayer && n.addLayer(F.overlayLayer), ye(!0);
118
- let B = !1, C;
119
- G || (B = new H.mapevents.MapEvents(n)), G || K || (C = new H.mapevents.Behavior(B), b || C.disable(H.mapevents.Behavior.Feature.FRACTIONAL_ZOOM), X && C.disable(H.mapevents.Behavior.Feature.ZOOM_MOMENTUM)), Ke(n, he, n), n.addEventListener("mapviewchangestart", le), n.addEventListener("mapviewchangeend", me);
120
- const xe = Qe(n, x, Me, m);
126
+ U.overlayLayer && o.addLayer(U.overlayLayer), Se(!0);
127
+ let z = !1, I;
128
+ G || (z = new H.mapevents.MapEvents(o)), G || K || (I = new H.mapevents.Behavior(z), x || I.disable(H.mapevents.Behavior.Feature.FRACTIONAL_ZOOM), X && I.disable(H.mapevents.Behavior.Feature.ZOOM_MOMENTUM)), Qe(o, he, o), o.addEventListener("mapviewchangestart", le), o.addEventListener("mapviewchangeend", me);
129
+ const ke = nt(o, k, Me, c);
121
130
  be({
122
- credentials: U,
123
- defaultLayers: x,
124
- map: n,
125
- mapEvents: B,
126
- behavior: C,
127
- platform: h,
128
- ui: xe,
129
- utils: Je(n),
131
+ credentials: j,
132
+ defaultLayers: k,
133
+ map: o,
134
+ mapEvents: z,
135
+ behavior: I,
136
+ platform: L,
137
+ ui: ke,
138
+ utils: ot(o),
130
139
  // Put settings back into the map API object so the invoking service
131
140
  // can check on these settings for instance inside a test
132
141
  settings: {
133
- enableWebGL: u,
134
- baseLayer: o,
135
- activeLayers: r,
136
- showCluster: ne,
137
- minZoom: T,
138
- maxZoom: D
142
+ enableWebGL: d,
143
+ baseLayer: r,
144
+ activeLayers: a,
145
+ showCluster: oe,
146
+ minZoom: _,
147
+ maxZoom: Y
139
148
  }
140
- }), e && n.addObjects(e), a = () => {
141
- n.removeEventListener("mapviewchangestart", le), n.removeEventListener("mapviewchangeend", me);
149
+ }), e && o.addObjects(e), n = () => {
150
+ o.removeEventListener("mapviewchangestart", le), o.removeEventListener("mapviewchangeend", me);
142
151
  };
143
152
  }), () => {
144
- a(), f(), v(!1), _(!1);
153
+ n(), M(), h(!1), R(!1);
145
154
  };
146
155
  }, [
147
- u,
156
+ d,
148
157
  J,
149
- m,
150
- o,
151
- T,
152
- O,
158
+ c,
159
+ r,
160
+ _,
161
+ N,
153
162
  X,
154
- b
155
- ]), l(() => (E || (f(), v(!1)), () => {
156
- f(), v(!1), _(!1);
157
- }), [E]);
158
- const Y = et();
163
+ x
164
+ ]), l(() => (v || (M(), h(!1)), () => {
165
+ M(), h(!1), R(!1);
166
+ }), [v]);
167
+ const F = rt();
159
168
  l(() => {
160
- Y && o === y ? A(k) : !Y && o === k && A(y);
161
- }, [Y, m]), l(() => A(L), [L]);
162
- const [Oe, De] = i(p);
163
- ke(p, Oe) || (te(p), De(p)), l(() => ae(w), [w]);
164
- const A = (e) => {
165
- we(e), Te(e, L);
166
- }, Ne = (e) => {
167
- const a = (h) => r.filter((M) => M !== h), P = r.includes(e) ? a(e) : [...r, e];
168
- te(P), Le(P, r);
169
- }, Ye = (e) => {
170
- ae(e), ge(e);
169
+ F && r === w ? y(V) : !F && r === V && y(w);
170
+ }, [F, c]), l(() => y(g), [g]);
171
+ const [Ne, Ye] = i(E);
172
+ Ve(E, Ne) || (te(E), Ye(E)), l(() => ne(D), [D]);
173
+ const y = (e) => {
174
+ Oe(e), Te(e, g);
175
+ }, Ze = (e) => {
176
+ const n = (L) => a.filter((T) => T !== L), C = a.includes(e) ? n(e) : [...a, e];
177
+ te(C), Le(C, a);
178
+ }, Fe = (e) => {
179
+ ne(e), ge(e);
171
180
  }, ie = () => {
172
181
  document.querySelector(".AssetTree")?.classList.add("pointer-events-none");
173
- }, Z = () => {
182
+ }, B = () => {
174
183
  document.querySelector(".AssetTree")?.classList.remove("pointer-events-none");
175
- }, R = {};
176
- j && (R.height = j), z && (R.width = z);
177
- const Ze = Be(R) ? "height-100pct" : "";
178
- return /* @__PURE__ */ c(
184
+ }, P = {};
185
+ q && (P.height = q), W && (P.width = W);
186
+ const Be = ze(P) ? "height-100pct" : "";
187
+ return /* @__PURE__ */ p(
179
188
  "div",
180
189
  {
181
- className: `Map position-relative map-type-${o.toLowerCase()} ${Ze}`,
182
- style: R,
183
- ref: g,
190
+ className: `Map position-relative map-type-${r.toLowerCase()} ${Be}`,
191
+ style: P,
192
+ ref: A,
184
193
  onTouchStart: ie,
185
- onTouchEnd: Z,
194
+ onTouchEnd: B,
186
195
  onMouseEnter: ie,
187
- onMouseOut: Z,
188
- onBlur: Z,
189
- children: Ie && t && /* @__PURE__ */ Fe(
190
- Xe.Provider,
196
+ onMouseOut: B,
197
+ onBlur: B,
198
+ children: Ie && t && /* @__PURE__ */ He(
199
+ et.Provider,
191
200
  {
192
201
  value: {
193
202
  api: t,
194
- language: m,
195
- enableWebGL: u,
203
+ language: c,
204
+ enableWebGL: d,
196
205
  enableMarkerIconCache: Ce,
197
- enableFractionalZoom: b,
198
- isZoomInteractionActive: Se,
199
- showCluster: ne,
200
- activeLayers: r,
201
- baseLayer: o,
206
+ enableFractionalZoom: x,
207
+ isZoomInteractionActive: we,
208
+ showCluster: oe,
209
+ activeLayers: a,
210
+ baseLayer: r,
202
211
  hideMapLayerSettings: fe,
203
212
  hideClusterSettings: ve,
204
- onMapTypeChange: A,
205
- onMapLayerChange: Ne,
206
- onShowClusterChange: Ye,
207
- mapSettingsTooltip: Pe,
213
+ viewportHistory: De,
214
+ onMapTypeChange: y,
215
+ onMapLayerChange: Ze,
216
+ onShowClusterChange: Fe,
217
+ mapSettingsTooltip: ye,
208
218
  onIncidentsChange: Re,
209
- devicePixelRatio: oe
219
+ devicePixelRatio: re
210
220
  },
211
221
  children: [
212
- /* @__PURE__ */ c(ot, { api: t, boundingBox: S, center: V, zoomAnimation: q }),
213
- /* @__PURE__ */ c(at, { api: t }),
214
- /* @__PURE__ */ c(
215
- tt,
222
+ /* @__PURE__ */ p(
223
+ lt,
224
+ {
225
+ api: t,
226
+ boundingBox: O,
227
+ center: m,
228
+ zoom: u,
229
+ zoomAnimation: b
230
+ }
231
+ ),
232
+ /* @__PURE__ */ p(it, { api: t }),
233
+ /* @__PURE__ */ p(
234
+ at,
216
235
  {
217
- zoom: W,
218
236
  hideZoomButtons: K,
219
237
  onZoomIn: _e,
220
238
  onZoomOut: Ae,
221
- zoomAnimation: q
239
+ zoomAnimation: b
222
240
  }
223
241
  ),
224
242
  $ && $,
225
- /* @__PURE__ */ c(nt, { layers: r }),
226
- /* @__PURE__ */ c(rt, { api: t, children: Ee })
243
+ /* @__PURE__ */ p(st, { layers: a }),
244
+ /* @__PURE__ */ p(mt, { api: t, children: Ee })
227
245
  ]
228
246
  }
229
247
  )
230
248
  }
231
249
  );
232
250
  };
233
- s.TYPE_DEFAULT = y;
234
- s.TYPE_FLEET_STYLE = ze;
235
- s.TYPE_SATELLITE = je;
236
- s.TYPE_TERRAIN = Ve;
237
- s.TYPE_NIGHT = k;
238
- s.LAYER_INCIDENTS = We;
239
- s.LAYER_TRAFFIC = qe;
251
+ s.TYPE_DEFAULT = w;
252
+ s.TYPE_FLEET_STYLE = qe;
253
+ s.TYPE_SATELLITE = Ge;
254
+ s.TYPE_TERRAIN = Ke;
255
+ s.TYPE_NIGHT = V;
256
+ s.LAYER_INCIDENTS = Xe;
257
+ s.LAYER_TRAFFIC = $e;
240
258
  s.LAYER_ROAD_RESTRICTIONS = pe;
241
259
  export {
242
260
  s as default