@progress/kendo-react-map 7.2.4-develop.3 → 7.3.0-develop.1

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 (125) hide show
  1. package/Map.js +8 -0
  2. package/Map.mjs +346 -0
  3. package/MapContext.js +8 -0
  4. package/MapContext.mjs +14 -0
  5. package/components/BubbleLayer.js +8 -0
  6. package/components/BubbleLayer.mjs +22 -0
  7. package/components/BubbleLayerTooltip.js +8 -0
  8. package/components/BubbleLayerTooltip.mjs +14 -0
  9. package/components/Layers.js +8 -0
  10. package/components/Layers.mjs +18 -0
  11. package/components/MarkerLayer.js +8 -0
  12. package/components/MarkerLayer.mjs +22 -0
  13. package/components/MarkerLayerTooltip.js +8 -0
  14. package/components/MarkerLayerTooltip.mjs +14 -0
  15. package/components/ShapeLayer.js +8 -0
  16. package/components/ShapeLayer.mjs +22 -0
  17. package/components/ShapeLayerTooltip.js +8 -0
  18. package/components/ShapeLayerTooltip.mjs +14 -0
  19. package/components/TileLayer.js +8 -0
  20. package/components/TileLayer.mjs +15 -0
  21. package/components/base/CollectionConfigurationComponent.js +8 -0
  22. package/components/base/CollectionConfigurationComponent.mjs +35 -0
  23. package/components/base/ConfigurationComponent.js +8 -0
  24. package/components/base/ConfigurationComponent.mjs +47 -0
  25. package/dist/cdn/js/kendo-react-map.js +8 -5
  26. package/events/base-event.js +8 -0
  27. package/events/base-event.mjs +19 -0
  28. package/events/before-reset-event.js +8 -0
  29. package/events/before-reset-event.mjs +20 -0
  30. package/events/dom-event.js +8 -0
  31. package/events/dom-event.mjs +23 -0
  32. package/events/map-click-event.js +8 -0
  33. package/events/map-click-event.mjs +20 -0
  34. package/events/map-event-builder.js +8 -0
  35. package/events/map-event-builder.mjs +47 -0
  36. package/events/marker-activate-event.js +8 -0
  37. package/events/marker-activate-event.mjs +20 -0
  38. package/events/marker-click-event.js +8 -0
  39. package/events/marker-click-event.mjs +20 -0
  40. package/events/marker-created-event.js +8 -0
  41. package/events/marker-created-event.mjs +20 -0
  42. package/events/pan-end-event.js +8 -0
  43. package/events/pan-end-event.mjs +20 -0
  44. package/events/pan-event.js +8 -0
  45. package/events/pan-event.mjs +20 -0
  46. package/events/preventable-event.js +8 -0
  47. package/events/preventable-event.mjs +33 -0
  48. package/events/reset-event.js +8 -0
  49. package/events/reset-event.mjs +20 -0
  50. package/events/shape-click-event.js +8 -0
  51. package/events/shape-click-event.mjs +20 -0
  52. package/events/shape-created-event.js +8 -0
  53. package/events/shape-created-event.mjs +20 -0
  54. package/events/shape-feature-created-event.js +8 -0
  55. package/events/shape-feature-created-event.mjs +20 -0
  56. package/events/shape-mouse-enter-event.js +8 -0
  57. package/events/shape-mouse-enter-event.mjs +20 -0
  58. package/events/shape-mouse-leave-event.js +8 -0
  59. package/events/shape-mouse-leave-event.mjs +20 -0
  60. package/events/zoom-end-event.js +8 -0
  61. package/events/zoom-end-event.mjs +20 -0
  62. package/events/zoom-start-event.js +8 -0
  63. package/events/zoom-start-event.mjs +20 -0
  64. package/index.d.mts +951 -5
  65. package/index.d.ts +951 -13
  66. package/index.js +8 -5
  67. package/index.mjs +64 -801
  68. package/package-metadata.js +8 -0
  69. package/package-metadata.mjs +19 -0
  70. package/package.json +3 -3
  71. package/store/reducer.js +8 -0
  72. package/store/reducer.mjs +46 -0
  73. package/store/store.js +8 -0
  74. package/store/store.mjs +19 -0
  75. package/tooltip/MapTooltip.js +8 -0
  76. package/tooltip/MapTooltip.mjs +82 -0
  77. package/tooltip/Popup.js +8 -0
  78. package/tooltip/Popup.mjs +60 -0
  79. package/utils/index.js +8 -0
  80. package/utils/index.mjs +29 -0
  81. package/Map.d.ts +0 -192
  82. package/MapContext.d.ts +0 -19
  83. package/MapProps.d.ts +0 -104
  84. package/common/events.d.ts +0 -19
  85. package/common/map-types.d.ts +0 -5
  86. package/components/BubbleLayer.d.ts +0 -14
  87. package/components/BubbleLayerTooltip.d.ts +0 -19
  88. package/components/Layers.d.ts +0 -13
  89. package/components/MarkerLayer.d.ts +0 -14
  90. package/components/MarkerLayerTooltip.d.ts +0 -19
  91. package/components/ShapeLayer.d.ts +0 -14
  92. package/components/ShapeLayerTooltip.d.ts +0 -19
  93. package/components/TileLayer.d.ts +0 -13
  94. package/components/base/CollectionConfigurationComponent.d.ts +0 -23
  95. package/components/base/ConfigurationComponent.d.ts +0 -28
  96. package/components/index.d.ts +0 -13
  97. package/events/base-event.d.ts +0 -18
  98. package/events/before-reset-event.d.ts +0 -16
  99. package/events/dom-event.d.ts +0 -26
  100. package/events/map-click-event.d.ts +0 -24
  101. package/events/map-event-builder.d.ts +0 -10
  102. package/events/marker-activate-event.d.ts +0 -24
  103. package/events/marker-click-event.d.ts +0 -24
  104. package/events/marker-created-event.d.ts +0 -26
  105. package/events/pan-end-event.d.ts +0 -28
  106. package/events/pan-event.d.ts +0 -28
  107. package/events/preventable-event.d.ts +0 -22
  108. package/events/reset-event.d.ts +0 -18
  109. package/events/shape-click-event.d.ts +0 -29
  110. package/events/shape-created-event.d.ts +0 -33
  111. package/events/shape-feature-created-event.d.ts +0 -33
  112. package/events/shape-mouse-enter-event.d.ts +0 -32
  113. package/events/shape-mouse-leave-event.d.ts +0 -32
  114. package/events/zoom-end-event.d.ts +0 -20
  115. package/events/zoom-start-event.d.ts +0 -22
  116. package/package-metadata.d.ts +0 -9
  117. package/store/reducer.d.ts +0 -14
  118. package/store/store.d.ts +0 -26
  119. package/tooltip/BubbleTooltipContext.d.ts +0 -26
  120. package/tooltip/MapTooltip.d.ts +0 -41
  121. package/tooltip/MarkerTooltipContext.d.ts +0 -26
  122. package/tooltip/Popup.d.ts +0 -33
  123. package/tooltip/ShapeTooltipContext.d.ts +0 -22
  124. package/tooltip/index.d.ts +0 -9
  125. package/utils/index.d.ts +0 -13
package/index.mjs CHANGED
@@ -1,804 +1,67 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
5
8
  "use client";
6
- import * as i from "react";
7
- import { canUseDOM as A, validatePackage as _, IconsContext as D } from "@progress/kendo-react-common";
8
- import C from "prop-types";
9
- import { InstanceObserver as m, Map as N } from "@progress/kendo-charts";
10
- import { Extent as Le, Location as Oe } from "@progress/kendo-charts";
11
- import { Popup as U } from "@progress/kendo-react-popup";
12
- import { mapMarkerTargetIcon as K, mapMarkerIcon as R, plusIcon as z, minusIcon as j, caretAltUpIcon as V, caretAltDownIcon as B, caretAltLeftIcon as $, caretAltRightIcon as F } from "@progress/kendo-svg-icons";
13
- const u = i.createContext(null);
14
- u.displayName = "MapContext";
15
- class b extends i.Component {
16
- constructor(e, t) {
17
- super(e, t), this.optionsStore = t.optionsStore;
18
- }
19
- renderChildren(e, t) {
20
- const { children: s } = e.props, { _mapKey: r, _parentStore: a } = this.props, o = {
21
- ...e.props,
22
- _mapCollectionIdxKey: `${r}_${t}`,
23
- _parentStore: a
24
- };
25
- return i.cloneElement(e, o, s);
26
- }
27
- render() {
28
- const { _mapKey: e, _parentStore: t, children: s } = this.props;
29
- return (t || this.optionsStore).dispatch({
30
- mapKey: e,
31
- payload: []
32
- }), i.Children.map(s, (a, o) => i.isValidElement(a) ? this.renderChildren(a, o) : a);
33
- }
34
- }
35
- b.contextType = u;
36
- const W = (n) => {
37
- let e, t = [];
38
- const s = () => e, r = (o) => {
39
- e = n(e, o), A && t.forEach((p) => p());
40
- }, a = (o) => (t.push(o), () => t = t.filter((p) => p !== o));
41
- return r({}), { getState: s, dispatch: r, subscribe: a };
42
- }, y = W, M = (n, e) => e.mapCollectionIdxKey ? g.collectionConfigurationItem(n, e) : e.mapKey ? g.configurationItem(n, e) : {}, Z = (n, e) => {
43
- if (e.type)
44
- switch (e.type) {
45
- case "add":
46
- return [...n, e.payload];
47
- case "remove":
48
- return n.filter((t) => t !== e.payload);
49
- default:
50
- return n;
51
- }
52
- else
53
- return [];
54
- }, g = {
55
- configurationItem(n, e) {
56
- return Object.assign(n, {
57
- [e.mapKey]: e.payload
58
- });
59
- },
60
- collectionConfigurationItem(n, e) {
61
- let t = !1;
62
- const [s, r] = e.mapCollectionIdxKey.split("_"), a = n[s].map((o, p) => parseInt(r, 10) === p ? (t = !0, e.payload) : o);
63
- return t === !1 && a.splice(parseInt(r, 10), 0, e.payload), Object.assign(n, {
64
- [s]: a
65
- });
66
- },
67
- themeItem(n, e) {
68
- let t = {}, s = Object.assign(t, n);
69
- const { field: r, value: a } = e.payload, o = r.split(".");
70
- let p = o.shift();
71
- for (; o.length > 0; )
72
- t = t[p] = t[p] || {}, p = o.shift();
73
- return t[p] = a, s;
74
- }
75
- };
76
- class h extends i.Component {
77
- constructor(e, t) {
78
- super(e, t), this.optionsStore = t.optionsStore, this.childStore = y(M);
79
- }
80
- render() {
81
- const { children: e } = this.props;
82
- return e !== void 0 ? i.Children.map(e, (t) => i.isValidElement(t) ? this.renderChildren(t) : t) : null;
83
- }
84
- componentDidMount() {
85
- this.dispatch();
86
- }
87
- componentDidUpdate() {
88
- this.dispatch();
89
- }
90
- dispatch() {
91
- const { _mapKey: e, _mapCollectionIdxKey: t, _parentStore: s, children: r, ...a } = this.props;
92
- (s || this.optionsStore).dispatch({
93
- mapKey: e,
94
- mapCollectionIdxKey: t,
95
- payload: Object.assign({}, a, this.childStore.getState())
96
- });
97
- }
98
- renderChildren(e) {
99
- const { children: t } = e.props, s = {
100
- ...e.props,
101
- _parentStore: this.childStore
102
- };
103
- return i.cloneElement(e, s, t);
104
- }
105
- }
106
- h.contextType = u;
107
- class c {
108
- /**
109
- * @hidden
110
- */
111
- constructor(e) {
112
- this.target = e;
113
- }
114
- }
115
- class H extends c {
116
- /**
117
- * @hidden
118
- */
119
- constructor(e, t) {
120
- super(t);
121
- }
122
- }
123
- class q extends c {
124
- /**
125
- * @hidden
126
- */
127
- constructor(e, t) {
128
- super(t), this.location = e.location, this.originalEvent = e.originalEvent;
129
- }
130
- }
131
- class G extends c {
132
- /**
133
- * @hidden
134
- */
135
- constructor(e, t) {
136
- super(t), this.marker = e.marker, this.layer = e.layer;
137
- }
138
- }
139
- class J extends c {
140
- /**
141
- * @hidden
142
- */
143
- constructor(e, t) {
144
- super(t), this.marker = e.marker, this.layer = e.layer;
145
- }
146
- }
147
- class x extends c {
148
- constructor() {
149
- super(...arguments), this.prevented = !1;
150
- }
151
- /* eslint-disable max-len */
152
- /**
153
- * Prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.
154
- */
155
- preventDefault() {
156
- this.prevented = !0;
157
- }
158
- /**
159
- * Returns `true` if the event was prevented by any of its subscribers.
160
- *
161
- * @returns `true` if the default action was prevented.
162
- * Otherwise, returns `false`.
163
- */
164
- isDefaultPrevented() {
165
- return this.prevented;
166
- }
167
- }
168
- class Q extends x {
169
- /**
170
- * @hidden
171
- */
172
- constructor(e, t) {
173
- super(t), this.marker = e.marker, this.layer = e.layer;
174
- }
175
- }
176
- class X extends c {
177
- /**
178
- * @hidden
179
- */
180
- constructor(e, t) {
181
- super(t), this.origin = e.origin, this.center = e.center, this.originalEvent = e.originalEvent;
182
- }
183
- }
184
- class Y extends c {
185
- /**
186
- * @hidden
187
- */
188
- constructor(e, t) {
189
- super(t), this.origin = e.origin, this.center = e.center, this.originalEvent = e.originalEvent;
190
- }
191
- }
192
- class ee extends c {
193
- /**
194
- * @hidden
195
- */
196
- constructor(e, t) {
197
- super(t);
198
- }
199
- }
200
- class te extends c {
201
- /**
202
- * @hidden
203
- */
204
- constructor(e, t) {
205
- super(t), this.layer = e.layer, this.shape = e.shape, this.originalEvent = e.originalEvent;
206
- }
207
- }
208
- class ne extends c {
209
- /**
210
- * @hidden
211
- */
212
- constructor(e, t) {
213
- super(t), this.layer = e.layer, this.shape = e.shape, this.location = null, e.shape && (this.dataItem = e.shape.dataItem, this.location = e.shape.location);
214
- }
215
- }
216
- class se extends c {
217
- /**
218
- * @hidden
219
- */
220
- constructor(e, t) {
221
- super(t), this.dataItem = e.dataItem, this.layer = e.layer, this.group = e.group, this.properties = e.properties;
222
- }
223
- }
224
- class re extends c {
225
- /**
226
- * @hidden
227
- */
228
- constructor(e, t) {
229
- super(t), this.layer = e.layer, this.shape = e.shape, this.originalEvent = e.originalEvent;
230
- }
231
- }
232
- class oe extends c {
233
- /**
234
- * @hidden
235
- */
236
- constructor(e, t) {
237
- super(t), this.layer = e.layer, this.shape = e.shape, this.originalEvent = e.originalEvent;
238
- }
239
- }
240
- class ae extends c {
241
- /**
242
- * @hidden
243
- */
244
- constructor(e, t) {
245
- super(t), this.originalEvent = e.originalEvent;
246
- }
247
- }
248
- class ie extends x {
249
- /**
250
- * @hidden
251
- */
252
- constructor(e, t) {
253
- super(t), this.originalEvent = e.originalEvent;
254
- }
255
- }
256
- const I = {
257
- beforeReset: H,
258
- mapClick: q,
259
- markerActivate: G,
260
- markerClick: J,
261
- markerCreated: Q,
262
- panEnd: X,
263
- pan: Y,
264
- reset: ee,
265
- shapeClick: te,
266
- shapeCreated: ne,
267
- shapeFeatureCreated: se,
268
- shapeMouseEnter: re,
269
- shapeMouseLeave: oe,
270
- zoomEnd: ae,
271
- zoomStart: ie
272
- };
273
- function pe(n, e, t) {
274
- if (I[n])
275
- return new I[n](e, t);
276
- }
277
- function ce(n, e) {
278
- let t = n;
279
- for (; t && t !== e; )
280
- t = t.parentNode;
281
- return !!t;
282
- }
283
- function f(n, e, t, s) {
284
- const r = n[e];
285
- if (r && Array.isArray(r)) {
286
- for (let a of r)
287
- if (!a.type || a.type !== s)
288
- return new Error(
289
- `${t} children should be Array of type ${s.displayName}.`
290
- );
291
- }
292
- return null;
293
- }
294
- const le = { horizontal: "fit", vertical: "fit" }, he = ["k-tooltip", "k-map-tooltip"], ue = "k-tooltip-wrapper";
295
- class T extends i.Component {
296
- constructor(e, t) {
297
- super(e, t), this.context = null, this.element = null, this.onMapMouseLeave = (s) => {
298
- const { syntheticEvent: r } = s;
299
- return !!ce(r.relatedTarget, this.element);
300
- }, this.mapObserver = new m(this, {
301
- onMouseLeave: "onMapMouseLeave"
302
- }), t.observersStore.dispatch({
303
- type: "add",
304
- payload: this.mapObserver
305
- });
306
- }
307
- render() {
308
- const { popupShown: e, popupAlign: t, popupOffset: s, popupStyles: r, popupContent: a, className: o } = this.props, p = [...he, o].join(" ").trim();
309
- return /* @__PURE__ */ i.createElement(
310
- U,
311
- {
312
- animate: !0,
313
- popupAlign: t,
314
- offset: s,
315
- show: e,
316
- collision: le,
317
- className: ue
318
- },
319
- /* @__PURE__ */ i.createElement(
320
- "div",
321
- {
322
- className: p,
323
- style: r,
324
- ref: (d) => this.element = d
325
- },
326
- a()
327
- )
328
- );
329
- }
330
- componentWillUnmount() {
331
- this.context.observersStore.dispatch({
332
- type: "remove",
333
- payload: this.mapObserver
334
- });
335
- }
336
- }
337
- T.contextType = u;
338
- class k extends i.Component {
339
- constructor() {
340
- super(...arguments), this.context = null, this.state = {
341
- popupShown: !1
342
- };
343
- }
344
- componentDidMount() {
345
- this.mapObserver = new m(this, {
346
- showTooltip: "onShowTooltip",
347
- hideTooltip: "onHideTooltip"
348
- }), this.context.observersStore.dispatch({
349
- type: "add",
350
- payload: this.mapObserver
351
- });
352
- }
353
- render() {
354
- const { popupContext: e, shared: t, className: s, ...r } = this.state;
355
- if (!e || !this.state.popupShown)
356
- return null;
357
- const a = e.layerIndex, o = this.findRenderFunctionByLayer(a);
358
- if (!o)
359
- return null;
360
- const p = () => /* @__PURE__ */ i.createElement("div", { className: "k-tooltip-content" }, o(e)), l = `k-map-${e.type}-tooltip`;
361
- return /* @__PURE__ */ i.createElement(
362
- T,
363
- {
364
- ...r,
365
- popupContent: p,
366
- className: l
367
- }
368
- );
369
- }
370
- componentWillUnmount() {
371
- this.context.observersStore.dispatch({
372
- type: "remove",
373
- payload: this.mapObserver
374
- });
375
- }
376
- onShowTooltip(e) {
377
- const { anchor: t, className: s } = e;
378
- let r = this.createTooltipContext(e);
379
- this.setState({
380
- popupShown: !0,
381
- popupAlign: { vertical: "bottom", horizontal: "center" },
382
- popupOffset: t,
383
- popupContext: r,
384
- popupStyles: { position: "relative" },
385
- className: s
386
- });
387
- }
388
- onHideTooltip() {
389
- this.setState({
390
- popupShown: !1,
391
- popupStyles: {},
392
- className: void 0
393
- });
394
- }
395
- createTooltipContext(e) {
396
- return e;
397
- }
398
- findRenderFunctionByLayer(e) {
399
- const t = this.context.optionsStore.getState().layers;
400
- return t !== void 0 && Array.isArray(t) && t[e] !== void 0 && t[e].hasOwnProperty("tooltip") && t[e].tooltip.hasOwnProperty("render") ? t[e].tooltip.render : null;
401
- }
402
- }
403
- k.contextType = u;
404
- const me = {
405
- name: "@progress/kendo-react-map",
406
- productName: "KendoReact",
407
- productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
408
- publishDate: 1709632301,
409
- version: "",
410
- licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
411
- };
412
- class de {
413
- /**
414
- * @hidden
415
- */
416
- constructor(e, t) {
417
- this.sender = e, this.syntheticEvent = t;
418
- }
419
- }
420
- function ve(n, e) {
421
- return new de(n, e);
422
- }
423
- const E = {
424
- mapMarkerTargetIcon: K,
425
- mapMarkerIcon: R,
426
- plusIcon: z,
427
- minusIcon: j,
428
- caretAltUpIcon: V,
429
- caretAltDownIcon: B,
430
- caretAltLeftIcon: $,
431
- caretAltRightIcon: F
432
- }, S = "svg";
433
- class L extends i.Component {
434
- constructor(e) {
435
- super(e), this.mapInstance = null, this._element = null, this.optionsStore = {}, this.optionsUnsubscriber = Function.prototype, this.observersStore = {}, this.iconsType = S, this.svgIcons = E, this.onInit = (t) => {
436
- this.mapInstance = t.sender;
437
- }, this.onRender = (t) => {
438
- this.mapInstance !== null && this.trigger("render", t);
439
- }, this.onMapMouseLeave = (t) => {
440
- const s = ve(this, t);
441
- this.triggerDomEvent("onMouseLeave", s) ? t.preventDefault() : this.mapInstance !== null && this.mapInstance.hideTooltip();
442
- }, _(me), this.optionsStore = y(M), this.observersStore = y(Z), this.childrenObserver = new m(this, { onMouseLeave: "onChildMouseLeave" }), this.contextValue = {
443
- optionsStore: this.optionsStore,
444
- observersStore: this.observersStore,
445
- childrenObserver: this.childrenObserver
446
- }, this.mapObserver = new m(this, {
447
- // render: 'onRender',
448
- init: "onInit"
449
- });
450
- }
451
- /**
452
- * @hidden
453
- */
454
- get element() {
455
- return this._element;
456
- }
457
- /**
458
- * @hidden
459
- */
460
- componentDidMount() {
461
- this.instantiateCoreMap(), this.optionsUnsubscriber = this.optionsStore.subscribe(this.refresh.bind(this));
462
- }
463
- /**
464
- * @hidden
465
- */
466
- componentWillUnmount() {
467
- this.optionsUnsubscriber(), this.mapInstance !== null && (this.mapInstance.destroy(), this.mapInstance = null);
468
- }
469
- /**
470
- * @hidden
471
- */
472
- componentDidUpdate(e) {
473
- const { dir: t, children: s, ...r } = this.props;
474
- this.mapInstance !== null && (Object.entries(e).filter((o) => o[0] !== "dir" && o[0] !== "children").some((o) => {
475
- const [p, l] = o;
476
- return !(r.hasOwnProperty(p) && r[p] === l);
477
- }) && this.refresh(), e.dir);
478
- }
479
- /**
480
- * @hidden
481
- */
482
- render() {
483
- const { style: e = {}, className: t, children: s } = this.props, r = Object.assign({}, e, { position: "relative" }), a = i.createElement(
484
- "div",
485
- {
486
- className: t,
487
- style: r,
488
- key: "mapElement"
489
- },
490
- /* @__PURE__ */ i.createElement(
491
- "div",
492
- {
493
- ref: (o) => this._element = o,
494
- className: "k-map",
495
- onMouseLeave: this.onMapMouseLeave
496
- },
497
- s
498
- )
499
- );
500
- return /* @__PURE__ */ i.createElement(D.Consumer, null, (o) => /* @__PURE__ */ i.createElement(u.Provider, { value: this.contextValue }, /* @__PURE__ */ i.createElement(k, { key: "tooltip" }), a, this.setIcons(o)));
501
- }
502
- /**
503
- * @hidden
504
- */
505
- getMapOptions() {
506
- const {
507
- center: e,
508
- controls: t,
509
- minZoom: s,
510
- maxZoom: r,
511
- minSize: a,
512
- pannable: o,
513
- wraparound: p,
514
- zoom: l,
515
- zoomable: d
516
- } = this.props;
517
- let v = {
518
- center: e,
519
- controls: t,
520
- minZoom: s,
521
- maxZoom: r,
522
- minSize: a,
523
- pannable: o,
524
- wraparound: p,
525
- zoom: l,
526
- zoomable: d,
527
- icons: {
528
- type: this.iconsType,
529
- svgIcons: this.svgIcons
530
- }
531
- };
532
- return v = Object.assign(v, this.optionsStore.getState()), v;
533
- }
534
- /**
535
- * The marker layers instances.
536
- */
537
- get layers() {
538
- var e;
539
- return (e = this.mapInstance) == null ? void 0 : e.layers;
540
- }
541
- /**
542
- * Gets the extent (visible area) of the map.
543
- */
544
- get extent() {
545
- var e;
546
- return (e = this.mapInstance) == null ? void 0 : e.extent();
547
- }
548
- /**
549
- * Sets the extent (visible area) of the map.
550
- */
551
- set extent(e) {
552
- var t;
553
- (t = this.mapInstance) == null || t.extent(e);
554
- }
555
- /**
556
- * Detects the size of the container and redraws the Map.
557
- * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
558
- */
559
- resize() {
560
- }
561
- /**
562
- * Retrieves the size of the visible portion of the map.
563
- *
564
- * @returns The size (width and height) of the visible portion of the map.
565
- */
566
- viewSize() {
567
- var e;
568
- return (e = this.mapInstance) == null ? void 0 : e.viewSize();
569
- }
570
- /**
571
- * Returns the event coordinates relative to the map element. Offset coordinates are not synchronized to a particular location on the map.
572
- *
573
- * @param e The mouse event.
574
- * @returns The event coordinates relative to the map element.
575
- */
576
- eventOffset(e) {
577
- var t;
578
- return (t = this.mapInstance) == null ? void 0 : t.eventOffset(e);
579
- }
580
- /**
581
- * Retrieves projected (layer) coordinates that correspond to this mouse event.
582
- * Layer coordinates are absolute and change only when the zoom level is changed.
583
- *
584
- * @param e The mouse event.
585
- * @returns The projected (layer) coordinates that correspond to this event.
586
- */
587
- eventToLayer(e) {
588
- var t;
589
- return (t = this.mapInstance) == null ? void 0 : t.eventToLayer(e);
590
- }
591
- /**
592
- * Retrieves the geographic location that correspond to this mouse event.
593
- *
594
- * @param e The mouse event.
595
- * @returns The geographic location that correspond to this mouse event.
596
- */
597
- eventToLocation(e) {
598
- var t;
599
- return (t = this.mapInstance) == null ? void 0 : t.eventToLocation(e);
600
- }
601
- /**
602
- * Retrieves relative (view) coordinates that correspond to this mouse event.
603
- * Layer elements positioned on these coordinates will appear under the mouse cursor.
604
- * View coordinates are no longer valid after a map reset.
605
- *
606
- * @param e The mouse event.
607
- * @returns The relative (view) coordinates that correspond to this mouse event.
608
- */
609
- eventToView(e) {
610
- var t;
611
- return (t = this.mapInstance) == null ? void 0 : t.eventToView(e);
612
- }
613
- /**
614
- * Transforms layer (projected) coordinates to geographical location.
615
- *
616
- * @param point The layer (projected) coordinates. An array argument is assumed to be in x, y order.
617
- * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
618
- * @returns The geographic location that corresponds to the layer coordinates.
619
- */
620
- layerToLocation(e, t) {
621
- var s;
622
- return (s = this.mapInstance) == null ? void 0 : s.layerToLocation(e, t);
623
- }
624
- /**
625
- * Returns the layer (projected) coordinates that correspond to a geographical location.
626
- *
627
- * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
628
- * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
629
- * @returns The layer (projected) coordinates.
630
- */
631
- locationToLayer(e, t) {
632
- var s;
633
- return (s = this.mapInstance) == null ? void 0 : s.locationToLayer(e, t);
634
- }
635
- /**
636
- * Returns the view (relative) coordinates that correspond to a geographical location.
637
- *
638
- * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
639
- * @returns The view coordinates that correspond to a geographical location.
640
- */
641
- locationToView(e) {
642
- var t;
643
- return (t = this.mapInstance) == null ? void 0 : t.locationToView(e);
644
- }
645
- /**
646
- * Returns the geographical location that correspond to the view (relative) coordinates.
647
- *
648
- * @param point The view coordinates. An array argument is assumed to be in x, y order.
649
- * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
650
- * @returns The geographic location that corresponds to the view coordinates.
651
- */
652
- viewToLocation(e, t) {
653
- var s;
654
- return (s = this.mapInstance) == null ? void 0 : s.viewToLocation(e, t);
655
- }
656
- /**
657
- * Load markers in the Map. This method will clear the current markers and show the new ones.
658
- *
659
- * @param newMarkers An array of markers.
660
- */
661
- loadMarkers(e) {
662
- const t = this.mapInstance.markers;
663
- t && t._load(e);
664
- }
665
- /**
666
- * @hidden
667
- */
668
- refresh() {
669
- if (this.mapInstance !== null) {
670
- const e = this.getMapOptions();
671
- this.props.onRefresh ? this.props.onRefresh.call(void 0, e, this.mapInstance) : this.mapInstance.setOptions(e);
672
- }
673
- }
674
- /**
675
- * @hidden
676
- */
677
- instantiateCoreMap() {
678
- const e = this.getMapOptions();
679
- this.mapInstance = new N(
680
- this.element,
681
- e,
682
- {},
683
- {
684
- // rtl: this.getDirection(dir),
685
- observer: this.mapObserver,
686
- sender: this
687
- }
688
- );
689
- }
690
- /* Triggers public dom event handlers */
691
- /**
692
- * @hidden
693
- */
694
- trigger(e, t) {
695
- const s = e === "click" ? "mapClick" : e, r = pe(s, t, this), a = "on" + s.charAt(0).toUpperCase() + s.slice(1), o = this.observersStore.getState();
696
- let p = !1;
697
- for (let l = 0; l < o.length; l++)
698
- o[l].trigger(s, t) && (p = !0);
699
- return p === !1 && r && this.props.hasOwnProperty(a) ? (this.props[a].call(void 0, r), r.isDefaultPrevented && r.isDefaultPrevented()) : p;
700
- }
701
- /* Used by (event)InstanceObserver to check the wrapper for supported events */
702
- /**
703
- * @hidden
704
- */
705
- requiresHandlers(e) {
706
- for (let t = 0; t < e.length; t++) {
707
- const s = e[t], r = "on" + s.charAt(0).toUpperCase() + s.slice(1);
708
- if (this.props.hasOwnProperty(r))
709
- return !0;
710
- }
711
- return !1;
712
- }
713
- /**
714
- * @hidden
715
- */
716
- triggerDomEvent(e, t) {
717
- const s = this.observersStore.getState();
718
- let r = !1;
719
- for (let a = 0; a < s.length; a++)
720
- s[a].trigger(e, t) && (r = !0);
721
- return r;
722
- }
723
- setIcons(e) {
724
- const { type: t, icons: s = {} } = e, r = { ...E }, a = {
725
- mapMarkerTargetIcon: s.mapMarkerTargetIcon,
726
- mapMarkerIcon: s.mapMarkerIcon,
727
- plusIcon: s.plusIcon,
728
- minusIcon: s.minusIcon,
729
- caretAltUpIcon: s.caretAltUpIcon,
730
- caretAltDownIcon: s.caretAltDownIcon,
731
- caretAltLeftIcon: s.caretAltLeftIcon,
732
- caretAltRightIcon: s.caretAltRightIcon
733
- };
734
- let o;
735
- for (o in a)
736
- if (a[o]) {
737
- const p = a[o];
738
- p && typeof p != "string" && (r[o] = p);
739
- }
740
- return this.svgIcons = r, this.iconsType = t || S, null;
741
- }
742
- }
743
- L.propTypes = {
744
- dir: C.string
745
- };
746
- L.defaultProps = {};
747
- const ye = (n) => /* @__PURE__ */ i.createElement(b, { ...n, _mapKey: "layers" });
748
- ye.propTypes = {
749
- children: C.node
750
- };
751
- const fe = (n) => /* @__PURE__ */ i.createElement(h, { ...n, _mapKey: "tooltip" }), O = (n) => /* @__PURE__ */ i.createElement(h, { type: "shape", ...n });
752
- O.displayName = "MapShapeLayer";
753
- O.propTypes = {
754
- children: function(n, e, t) {
755
- return f(n, e, t, fe);
756
- }
757
- };
758
- const ge = (n) => /* @__PURE__ */ i.createElement(h, { type: "tile", ...n });
759
- ge.displayName = "MapTileLayer";
760
- const Ie = (n) => /* @__PURE__ */ i.createElement(h, { ...n, _mapKey: "tooltip" }), w = (n) => /* @__PURE__ */ i.createElement(h, { type: "bubble", ...n });
761
- w.displayName = "MapBubbleLayer";
762
- w.propTypes = {
763
- children: function(n, e, t) {
764
- return f(n, e, t, Ie);
765
- }
766
- };
767
- const Ee = (n) => /* @__PURE__ */ i.createElement(h, { ...n, _mapKey: "tooltip" }), P = (n) => /* @__PURE__ */ i.createElement(h, { type: "marker", ...n });
768
- P.displayName = "MapMarkerLayer";
769
- P.propTypes = {
770
- children: function(n, e, t) {
771
- return f(n, e, t, Ee);
772
- }
773
- };
9
+ import { default as r } from "./components/base/CollectionConfigurationComponent.mjs";
10
+ import { default as p } from "./components/base/ConfigurationComponent.mjs";
11
+ import { Map as f } from "./Map.mjs";
12
+ import { MapLayers as n } from "./components/Layers.mjs";
13
+ import { MapShapeLayer as E } from "./components/ShapeLayer.mjs";
14
+ import { MapShapeLayerTooltip as v } from "./components/ShapeLayerTooltip.mjs";
15
+ import { MapTileLayer as l } from "./components/TileLayer.mjs";
16
+ import { MapBubbleLayer as u } from "./components/BubbleLayer.mjs";
17
+ import { MapBubbleLayerTooltip as k } from "./components/BubbleLayerTooltip.mjs";
18
+ import { MapMarkerLayer as y } from "./components/MarkerLayer.mjs";
19
+ import { MapMarkerLayerTooltip as c } from "./components/MarkerLayerTooltip.mjs";
20
+ import { Extent as h, Location as T } from "@progress/kendo-charts";
21
+ import { BeforeResetEvent as B } from "./events/before-reset-event.mjs";
22
+ import { MapClickEvent as P } from "./events/map-click-event.mjs";
23
+ import { MarkerActivateEvent as Z } from "./events/marker-activate-event.mjs";
24
+ import { MarkerClickEvent as F } from "./events/marker-click-event.mjs";
25
+ import { MarkerCreatedEvent as q } from "./events/marker-created-event.mjs";
26
+ import { PanEndEvent as z } from "./events/pan-end-event.mjs";
27
+ import { PanEvent as G } from "./events/pan-event.mjs";
28
+ import { ResetEvent as I } from "./events/reset-event.mjs";
29
+ import { ShapeClickEvent as K } from "./events/shape-click-event.mjs";
30
+ import { ShapeCreatedEvent as O } from "./events/shape-created-event.mjs";
31
+ import { ShapeFeatureCreatedEvent as U } from "./events/shape-feature-created-event.mjs";
32
+ import { ShapeMouseEnterEvent as W } from "./events/shape-mouse-enter-event.mjs";
33
+ import { ShapeMouseLeaveEvent as Y } from "./events/shape-mouse-leave-event.mjs";
34
+ import { ZoomEndEvent as $ } from "./events/zoom-end-event.mjs";
35
+ import { ZoomStartEvent as oe } from "./events/zoom-start-event.mjs";
36
+ import { MapTooltip as te } from "./tooltip/MapTooltip.mjs";
774
37
  export {
775
- H as BeforeResetEvent,
776
- b as CollectionConfigurationComponent,
777
- h as ConfigurationComponent,
778
- Le as Extent,
779
- Oe as Location,
780
- L as Map,
781
- w as MapBubbleLayer,
782
- Ie as MapBubbleLayerTooltip,
783
- q as MapClickEvent,
784
- ye as MapLayers,
785
- P as MapMarkerLayer,
786
- Ee as MapMarkerLayerTooltip,
787
- O as MapShapeLayer,
788
- fe as MapShapeLayerTooltip,
789
- ge as MapTileLayer,
790
- k as MapTooltip,
791
- G as MarkerActivateEvent,
792
- J as MarkerClickEvent,
793
- Q as MarkerCreatedEvent,
794
- X as PanEndEvent,
795
- Y as PanEvent,
796
- ee as ResetEvent,
797
- te as ShapeClickEvent,
798
- ne as ShapeCreatedEvent,
799
- se as ShapeFeatureCreatedEvent,
800
- re as ShapeMouseEnterEvent,
801
- oe as ShapeMouseLeaveEvent,
802
- ae as ZoomEndEvent,
803
- ie as ZoomStartEvent
38
+ B as BeforeResetEvent,
39
+ r as CollectionConfigurationComponent,
40
+ p as ConfigurationComponent,
41
+ h as Extent,
42
+ T as Location,
43
+ f as Map,
44
+ u as MapBubbleLayer,
45
+ k as MapBubbleLayerTooltip,
46
+ P as MapClickEvent,
47
+ n as MapLayers,
48
+ y as MapMarkerLayer,
49
+ c as MapMarkerLayerTooltip,
50
+ E as MapShapeLayer,
51
+ v as MapShapeLayerTooltip,
52
+ l as MapTileLayer,
53
+ te as MapTooltip,
54
+ Z as MarkerActivateEvent,
55
+ F as MarkerClickEvent,
56
+ q as MarkerCreatedEvent,
57
+ z as PanEndEvent,
58
+ G as PanEvent,
59
+ I as ResetEvent,
60
+ K as ShapeClickEvent,
61
+ O as ShapeCreatedEvent,
62
+ U as ShapeFeatureCreatedEvent,
63
+ W as ShapeMouseEnterEvent,
64
+ Y as ShapeMouseLeaveEvent,
65
+ $ as ZoomEndEvent,
66
+ oe as ZoomStartEvent
804
67
  };