@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/Map.js ADDED
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),O=require("prop-types"),m=require("@progress/kendo-charts"),T=require("./events/map-event-builder.js"),d=require("./store/store.js"),v=require("./store/reducer.js"),k=require("./MapContext.js"),S=require("./tooltip/MapTooltip.js"),f=require("@progress/kendo-react-common"),w=require("./package-metadata.js"),L=require("./events/dom-event.js"),a=require("@progress/kendo-svg-icons");function A(p){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const t in p)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(p,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>p[t]})}}return e.default=p,Object.freeze(e)}const l=A(M),g={mapMarkerTargetIcon:a.mapMarkerTargetIcon,mapMarkerIcon:a.mapMarkerIcon,plusIcon:a.plusIcon,minusIcon:a.minusIcon,caretAltUpIcon:a.caretAltUpIcon,caretAltDownIcon:a.caretAltDownIcon,caretAltLeftIcon:a.caretAltLeftIcon,caretAltRightIcon:a.caretAltRightIcon},b="svg",h=class h extends l.Component{constructor(e){super(e),this.mapInstance=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.observersStore={},this.iconsType=b,this.svgIcons=g,this.onInit=t=>{this.mapInstance=t.sender},this.onRender=t=>{this.mapInstance!==null&&this.trigger("render",t)},this.onMapMouseLeave=t=>{const n=L.toDomEvent(this,t);this.triggerDomEvent("onMouseLeave",n)?t.preventDefault():this.mapInstance!==null&&this.mapInstance.hideTooltip()},f.validatePackage(w.packageMetadata),this.optionsStore=d(v.optionsReducer),this.observersStore=d(v.observersReducer),this.childrenObserver=new m.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.contextValue={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver},this.mapObserver=new m.InstanceObserver(this,{init:"onInit"})}get element(){return this._element}componentDidMount(){this.instantiateCoreMap(),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this))}componentWillUnmount(){this.optionsUnsubscriber(),this.mapInstance!==null&&(this.mapInstance.destroy(),this.mapInstance=null)}componentDidUpdate(e){const{dir:t,children:n,...s}=this.props;this.mapInstance!==null&&(Object.entries(e).filter(r=>r[0]!=="dir"&&r[0]!=="children").some(r=>{const[i,c]=r;return!(s.hasOwnProperty(i)&&s[i]===c)})&&this.refresh(),e.dir)}render(){const{style:e={},className:t,children:n}=this.props,s=Object.assign({},e,{position:"relative"}),o=l.createElement("div",{className:t,style:s,key:"mapElement"},l.createElement("div",{ref:r=>this._element=r,className:"k-map",onMouseLeave:this.onMapMouseLeave},n));return l.createElement(f.IconsContext.Consumer,null,r=>l.createElement(k.MapContext.Provider,{value:this.contextValue},l.createElement(S.MapTooltip,{key:"tooltip"}),o,this.setIcons(r)))}getMapOptions(){const{center:e,controls:t,minZoom:n,maxZoom:s,minSize:o,pannable:r,wraparound:i,zoom:c,zoomable:y}=this.props;let u={center:e,controls:t,minZoom:n,maxZoom:s,minSize:o,pannable:r,wraparound:i,zoom:c,zoomable:y,icons:{type:this.iconsType,svgIcons:this.svgIcons}};return u=Object.assign(u,this.optionsStore.getState()),u}get layers(){var e;return(e=this.mapInstance)==null?void 0:e.layers}get extent(){var e;return(e=this.mapInstance)==null?void 0:e.extent()}set extent(e){var t;(t=this.mapInstance)==null||t.extent(e)}resize(){}viewSize(){var e;return(e=this.mapInstance)==null?void 0:e.viewSize()}eventOffset(e){var t;return(t=this.mapInstance)==null?void 0:t.eventOffset(e)}eventToLayer(e){var t;return(t=this.mapInstance)==null?void 0:t.eventToLayer(e)}eventToLocation(e){var t;return(t=this.mapInstance)==null?void 0:t.eventToLocation(e)}eventToView(e){var t;return(t=this.mapInstance)==null?void 0:t.eventToView(e)}layerToLocation(e,t){var n;return(n=this.mapInstance)==null?void 0:n.layerToLocation(e,t)}locationToLayer(e,t){var n;return(n=this.mapInstance)==null?void 0:n.locationToLayer(e,t)}locationToView(e){var t;return(t=this.mapInstance)==null?void 0:t.locationToView(e)}viewToLocation(e,t){var n;return(n=this.mapInstance)==null?void 0:n.viewToLocation(e,t)}loadMarkers(e){const t=this.mapInstance.markers;t&&t._load(e)}refresh(){if(this.mapInstance!==null){const e=this.getMapOptions();this.props.onRefresh?this.props.onRefresh.call(void 0,e,this.mapInstance):this.mapInstance.setOptions(e)}}instantiateCoreMap(){const e=this.getMapOptions();this.mapInstance=new m.Map(this.element,e,{},{observer:this.mapObserver,sender:this})}trigger(e,t){const n=e==="click"?"mapClick":e,s=T.create(n,t,this),o="on"+n.charAt(0).toUpperCase()+n.slice(1),r=this.observersStore.getState();let i=!1;for(let c=0;c<r.length;c++)r[c].trigger(n,t)&&(i=!0);return i===!1&&s&&this.props.hasOwnProperty(o)?(this.props[o].call(void 0,s),s.isDefaultPrevented&&s.isDefaultPrevented()):i}requiresHandlers(e){for(let t=0;t<e.length;t++){const n=e[t],s="on"+n.charAt(0).toUpperCase()+n.slice(1);if(this.props.hasOwnProperty(s))return!0}return!1}triggerDomEvent(e,t){const n=this.observersStore.getState();let s=!1;for(let o=0;o<n.length;o++)n[o].trigger(e,t)&&(s=!0);return s}setIcons(e){const{type:t,icons:n={}}=e,s={...g},o={mapMarkerTargetIcon:n.mapMarkerTargetIcon,mapMarkerIcon:n.mapMarkerIcon,plusIcon:n.plusIcon,minusIcon:n.minusIcon,caretAltUpIcon:n.caretAltUpIcon,caretAltDownIcon:n.caretAltDownIcon,caretAltLeftIcon:n.caretAltLeftIcon,caretAltRightIcon:n.caretAltRightIcon};let r;for(r in o)if(o[r]){const i=o[r];i&&typeof i!="string"&&(s[r]=i)}return this.svgIcons=s,this.iconsType=t||b,null}};h.propTypes={dir:O.string},h.defaultProps={};let I=h;exports.Map=I;
package/Map.mjs ADDED
@@ -0,0 +1,346 @@
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
+ */
8
+ "use client";
9
+ import * as c from "react";
10
+ import d from "prop-types";
11
+ import { InstanceObserver as h, Map as g } from "@progress/kendo-charts";
12
+ import { create as b } from "./events/map-event-builder.mjs";
13
+ import m from "./store/store.mjs";
14
+ import { optionsReducer as y, observersReducer as T } from "./store/reducer.mjs";
15
+ import { MapContext as M } from "./MapContext.mjs";
16
+ import { MapTooltip as O } from "./tooltip/MapTooltip.mjs";
17
+ import { validatePackage as S, IconsContext as L } from "@progress/kendo-react-common";
18
+ import { packageMetadata as w } from "./package-metadata.mjs";
19
+ import { toDomEvent as k } from "./events/dom-event.mjs";
20
+ import { mapMarkerTargetIcon as D, mapMarkerIcon as x, plusIcon as A, minusIcon as P, caretAltUpIcon as U, caretAltDownIcon as C, caretAltLeftIcon as E, caretAltRightIcon as R } from "@progress/kendo-svg-icons";
21
+ const u = {
22
+ mapMarkerTargetIcon: D,
23
+ mapMarkerIcon: x,
24
+ plusIcon: A,
25
+ minusIcon: P,
26
+ caretAltUpIcon: U,
27
+ caretAltDownIcon: C,
28
+ caretAltLeftIcon: E,
29
+ caretAltRightIcon: R
30
+ }, I = "svg", p = class p extends c.Component {
31
+ constructor(e) {
32
+ super(e), this.mapInstance = null, this._element = null, this.optionsStore = {}, this.optionsUnsubscriber = Function.prototype, this.observersStore = {}, this.iconsType = I, this.svgIcons = u, this.onInit = (t) => {
33
+ this.mapInstance = t.sender;
34
+ }, this.onRender = (t) => {
35
+ this.mapInstance !== null && this.trigger("render", t);
36
+ }, this.onMapMouseLeave = (t) => {
37
+ const s = k(this, t);
38
+ this.triggerDomEvent("onMouseLeave", s) ? t.preventDefault() : this.mapInstance !== null && this.mapInstance.hideTooltip();
39
+ }, S(w), this.optionsStore = m(y), this.observersStore = m(T), this.childrenObserver = new h(this, { onMouseLeave: "onChildMouseLeave" }), this.contextValue = {
40
+ optionsStore: this.optionsStore,
41
+ observersStore: this.observersStore,
42
+ childrenObserver: this.childrenObserver
43
+ }, this.mapObserver = new h(this, {
44
+ // render: 'onRender',
45
+ init: "onInit"
46
+ });
47
+ }
48
+ /**
49
+ * @hidden
50
+ */
51
+ get element() {
52
+ return this._element;
53
+ }
54
+ /**
55
+ * @hidden
56
+ */
57
+ componentDidMount() {
58
+ this.instantiateCoreMap(), this.optionsUnsubscriber = this.optionsStore.subscribe(this.refresh.bind(this));
59
+ }
60
+ /**
61
+ * @hidden
62
+ */
63
+ componentWillUnmount() {
64
+ this.optionsUnsubscriber(), this.mapInstance !== null && (this.mapInstance.destroy(), this.mapInstance = null);
65
+ }
66
+ /**
67
+ * @hidden
68
+ */
69
+ componentDidUpdate(e) {
70
+ const { dir: t, children: s, ...n } = this.props;
71
+ this.mapInstance !== null && (Object.entries(e).filter((o) => o[0] !== "dir" && o[0] !== "children").some((o) => {
72
+ const [i, a] = o;
73
+ return !(n.hasOwnProperty(i) && n[i] === a);
74
+ }) && this.refresh(), e.dir);
75
+ }
76
+ /**
77
+ * @hidden
78
+ */
79
+ render() {
80
+ const { style: e = {}, className: t, children: s } = this.props, n = Object.assign({}, e, { position: "relative" }), r = c.createElement(
81
+ "div",
82
+ {
83
+ className: t,
84
+ style: n,
85
+ key: "mapElement"
86
+ },
87
+ /* @__PURE__ */ c.createElement(
88
+ "div",
89
+ {
90
+ ref: (o) => this._element = o,
91
+ className: "k-map",
92
+ onMouseLeave: this.onMapMouseLeave
93
+ },
94
+ s
95
+ )
96
+ );
97
+ return /* @__PURE__ */ c.createElement(L.Consumer, null, (o) => /* @__PURE__ */ c.createElement(M.Provider, { value: this.contextValue }, /* @__PURE__ */ c.createElement(O, { key: "tooltip" }), r, this.setIcons(o)));
98
+ }
99
+ /**
100
+ * @hidden
101
+ */
102
+ getMapOptions() {
103
+ const {
104
+ center: e,
105
+ controls: t,
106
+ minZoom: s,
107
+ maxZoom: n,
108
+ minSize: r,
109
+ pannable: o,
110
+ wraparound: i,
111
+ zoom: a,
112
+ zoomable: f
113
+ } = this.props;
114
+ let l = {
115
+ center: e,
116
+ controls: t,
117
+ minZoom: s,
118
+ maxZoom: n,
119
+ minSize: r,
120
+ pannable: o,
121
+ wraparound: i,
122
+ zoom: a,
123
+ zoomable: f,
124
+ icons: {
125
+ type: this.iconsType,
126
+ svgIcons: this.svgIcons
127
+ }
128
+ };
129
+ return l = Object.assign(l, this.optionsStore.getState()), l;
130
+ }
131
+ /**
132
+ * The marker layers instances.
133
+ */
134
+ get layers() {
135
+ var e;
136
+ return (e = this.mapInstance) == null ? void 0 : e.layers;
137
+ }
138
+ /**
139
+ * Gets the extent (visible area) of the map.
140
+ */
141
+ get extent() {
142
+ var e;
143
+ return (e = this.mapInstance) == null ? void 0 : e.extent();
144
+ }
145
+ /**
146
+ * Sets the extent (visible area) of the map.
147
+ */
148
+ set extent(e) {
149
+ var t;
150
+ (t = this.mapInstance) == null || t.extent(e);
151
+ }
152
+ /**
153
+ * Detects the size of the container and redraws the Map.
154
+ * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
155
+ */
156
+ resize() {
157
+ }
158
+ /**
159
+ * Retrieves the size of the visible portion of the map.
160
+ *
161
+ * @returns The size (width and height) of the visible portion of the map.
162
+ */
163
+ viewSize() {
164
+ var e;
165
+ return (e = this.mapInstance) == null ? void 0 : e.viewSize();
166
+ }
167
+ /**
168
+ * Returns the event coordinates relative to the map element. Offset coordinates are not synchronized to a particular location on the map.
169
+ *
170
+ * @param e The mouse event.
171
+ * @returns The event coordinates relative to the map element.
172
+ */
173
+ eventOffset(e) {
174
+ var t;
175
+ return (t = this.mapInstance) == null ? void 0 : t.eventOffset(e);
176
+ }
177
+ /**
178
+ * Retrieves projected (layer) coordinates that correspond to this mouse event.
179
+ * Layer coordinates are absolute and change only when the zoom level is changed.
180
+ *
181
+ * @param e The mouse event.
182
+ * @returns The projected (layer) coordinates that correspond to this event.
183
+ */
184
+ eventToLayer(e) {
185
+ var t;
186
+ return (t = this.mapInstance) == null ? void 0 : t.eventToLayer(e);
187
+ }
188
+ /**
189
+ * Retrieves the geographic location that correspond to this mouse event.
190
+ *
191
+ * @param e The mouse event.
192
+ * @returns The geographic location that correspond to this mouse event.
193
+ */
194
+ eventToLocation(e) {
195
+ var t;
196
+ return (t = this.mapInstance) == null ? void 0 : t.eventToLocation(e);
197
+ }
198
+ /**
199
+ * Retrieves relative (view) coordinates that correspond to this mouse event.
200
+ * Layer elements positioned on these coordinates will appear under the mouse cursor.
201
+ * View coordinates are no longer valid after a map reset.
202
+ *
203
+ * @param e The mouse event.
204
+ * @returns The relative (view) coordinates that correspond to this mouse event.
205
+ */
206
+ eventToView(e) {
207
+ var t;
208
+ return (t = this.mapInstance) == null ? void 0 : t.eventToView(e);
209
+ }
210
+ /**
211
+ * Transforms layer (projected) coordinates to geographical location.
212
+ *
213
+ * @param point The layer (projected) coordinates. An array argument is assumed to be in x, y order.
214
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
215
+ * @returns The geographic location that corresponds to the layer coordinates.
216
+ */
217
+ layerToLocation(e, t) {
218
+ var s;
219
+ return (s = this.mapInstance) == null ? void 0 : s.layerToLocation(e, t);
220
+ }
221
+ /**
222
+ * Returns the layer (projected) coordinates that correspond to a geographical location.
223
+ *
224
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
225
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
226
+ * @returns The layer (projected) coordinates.
227
+ */
228
+ locationToLayer(e, t) {
229
+ var s;
230
+ return (s = this.mapInstance) == null ? void 0 : s.locationToLayer(e, t);
231
+ }
232
+ /**
233
+ * Returns the view (relative) coordinates that correspond to a geographical location.
234
+ *
235
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
236
+ * @returns The view coordinates that correspond to a geographical location.
237
+ */
238
+ locationToView(e) {
239
+ var t;
240
+ return (t = this.mapInstance) == null ? void 0 : t.locationToView(e);
241
+ }
242
+ /**
243
+ * Returns the geographical location that correspond to the view (relative) coordinates.
244
+ *
245
+ * @param point The view coordinates. An array argument is assumed to be in x, y order.
246
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
247
+ * @returns The geographic location that corresponds to the view coordinates.
248
+ */
249
+ viewToLocation(e, t) {
250
+ var s;
251
+ return (s = this.mapInstance) == null ? void 0 : s.viewToLocation(e, t);
252
+ }
253
+ /**
254
+ * Load markers in the Map. This method will clear the current markers and show the new ones.
255
+ *
256
+ * @param newMarkers An array of markers.
257
+ */
258
+ loadMarkers(e) {
259
+ const t = this.mapInstance.markers;
260
+ t && t._load(e);
261
+ }
262
+ /**
263
+ * @hidden
264
+ */
265
+ refresh() {
266
+ if (this.mapInstance !== null) {
267
+ const e = this.getMapOptions();
268
+ this.props.onRefresh ? this.props.onRefresh.call(void 0, e, this.mapInstance) : this.mapInstance.setOptions(e);
269
+ }
270
+ }
271
+ /**
272
+ * @hidden
273
+ */
274
+ instantiateCoreMap() {
275
+ const e = this.getMapOptions();
276
+ this.mapInstance = new g(
277
+ this.element,
278
+ e,
279
+ {},
280
+ {
281
+ // rtl: this.getDirection(dir),
282
+ observer: this.mapObserver,
283
+ sender: this
284
+ }
285
+ );
286
+ }
287
+ /* Triggers public dom event handlers */
288
+ /**
289
+ * @hidden
290
+ */
291
+ trigger(e, t) {
292
+ const s = e === "click" ? "mapClick" : e, n = b(s, t, this), r = "on" + s.charAt(0).toUpperCase() + s.slice(1), o = this.observersStore.getState();
293
+ let i = !1;
294
+ for (let a = 0; a < o.length; a++)
295
+ o[a].trigger(s, t) && (i = !0);
296
+ return i === !1 && n && this.props.hasOwnProperty(r) ? (this.props[r].call(void 0, n), n.isDefaultPrevented && n.isDefaultPrevented()) : i;
297
+ }
298
+ /* Used by (event)InstanceObserver to check the wrapper for supported events */
299
+ /**
300
+ * @hidden
301
+ */
302
+ requiresHandlers(e) {
303
+ for (let t = 0; t < e.length; t++) {
304
+ const s = e[t], n = "on" + s.charAt(0).toUpperCase() + s.slice(1);
305
+ if (this.props.hasOwnProperty(n))
306
+ return !0;
307
+ }
308
+ return !1;
309
+ }
310
+ /**
311
+ * @hidden
312
+ */
313
+ triggerDomEvent(e, t) {
314
+ const s = this.observersStore.getState();
315
+ let n = !1;
316
+ for (let r = 0; r < s.length; r++)
317
+ s[r].trigger(e, t) && (n = !0);
318
+ return n;
319
+ }
320
+ setIcons(e) {
321
+ const { type: t, icons: s = {} } = e, n = { ...u }, r = {
322
+ mapMarkerTargetIcon: s.mapMarkerTargetIcon,
323
+ mapMarkerIcon: s.mapMarkerIcon,
324
+ plusIcon: s.plusIcon,
325
+ minusIcon: s.minusIcon,
326
+ caretAltUpIcon: s.caretAltUpIcon,
327
+ caretAltDownIcon: s.caretAltDownIcon,
328
+ caretAltLeftIcon: s.caretAltLeftIcon,
329
+ caretAltRightIcon: s.caretAltRightIcon
330
+ };
331
+ let o;
332
+ for (o in r)
333
+ if (r[o]) {
334
+ const i = r[o];
335
+ i && typeof i != "string" && (n[o] = i);
336
+ }
337
+ return this.svgIcons = n, this.iconsType = t || I, null;
338
+ }
339
+ };
340
+ p.propTypes = {
341
+ dir: d.string
342
+ }, p.defaultProps = {};
343
+ let v = p;
344
+ export {
345
+ v as Map
346
+ };
package/MapContext.js ADDED
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react");function c(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=c(a),r=l.createContext(null);r.displayName="MapContext";exports.MapContext=r;
package/MapContext.mjs ADDED
@@ -0,0 +1,14 @@
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
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ const e = t.createContext(null);
11
+ e.displayName = "MapContext";
12
+ export {
13
+ e as MapContext
14
+ };
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),u=require("../utils/index.js"),c=require("./base/ConfigurationComponent.js"),i=require("./BubbleLayerTooltip.js");function l(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const b=l(a),n=e=>b.createElement(c,{type:"bubble",...e});n.displayName="MapBubbleLayer";n.propTypes={children:function(e,r,t){return u.validateChildren(e,r,t,i.MapBubbleLayerTooltip)}};exports.MapBubbleLayer=n;
@@ -0,0 +1,22 @@
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
+ */
8
+ "use client";
9
+ import * as p from "react";
10
+ import { validateChildren as a } from "../utils/index.mjs";
11
+ import i from "./base/ConfigurationComponent.mjs";
12
+ import { MapBubbleLayerTooltip as n } from "./BubbleLayerTooltip.mjs";
13
+ const r = (e) => /* @__PURE__ */ p.createElement(i, { type: "bubble", ...e });
14
+ r.displayName = "MapBubbleLayer";
15
+ r.propTypes = {
16
+ children: function(e, o, t) {
17
+ return a(e, o, t, n);
18
+ }
19
+ };
20
+ export {
21
+ r as MapBubbleLayer
22
+ };
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),a=require("./base/ConfigurationComponent.js");function c(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=c(r),l=e=>i.createElement(a,{...e,_mapKey:"tooltip"});exports.MapBubbleLayerTooltip=l;
@@ -0,0 +1,14 @@
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
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ import e from "./base/ConfigurationComponent.mjs";
11
+ const r = (o) => /* @__PURE__ */ t.createElement(e, { ...o, _mapKey: "tooltip" });
12
+ export {
13
+ r as MapBubbleLayerTooltip
14
+ };
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),a=require("prop-types"),i=require("./base/CollectionConfigurationComponent.js");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const l=s(c),o=e=>l.createElement(i,{...e,_mapKey:"layers"});o.propTypes={children:a.node};exports.MapLayers=o;
@@ -0,0 +1,18 @@
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
+ */
8
+ "use client";
9
+ import * as o from "react";
10
+ import r from "prop-types";
11
+ import p from "./base/CollectionConfigurationComponent.mjs";
12
+ const t = (e) => /* @__PURE__ */ o.createElement(p, { ...e, _mapKey: "layers" });
13
+ t.propTypes = {
14
+ children: r.node
15
+ };
16
+ export {
17
+ t as MapLayers
18
+ };
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),c=require("../utils/index.js"),i=require("./base/ConfigurationComponent.js"),u=require("./MarkerLayerTooltip.js");function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const p=l(o),a=e=>p.createElement(i,{type:"marker",...e});a.displayName="MapMarkerLayer";a.propTypes={children:function(e,t,r){return c.validateChildren(e,t,r,u.MapMarkerLayerTooltip)}};exports.MapMarkerLayer=a;
@@ -0,0 +1,22 @@
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
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ import { validateChildren as p } from "../utils/index.mjs";
11
+ import i from "./base/ConfigurationComponent.mjs";
12
+ import { MapMarkerLayerTooltip as m } from "./MarkerLayerTooltip.mjs";
13
+ const e = (r) => /* @__PURE__ */ t.createElement(i, { type: "marker", ...r });
14
+ e.displayName = "MapMarkerLayer";
15
+ e.propTypes = {
16
+ children: function(r, a, o) {
17
+ return p(r, a, o, m);
18
+ }
19
+ };
20
+ export {
21
+ e as MapMarkerLayer
22
+ };
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),a=require("./base/ConfigurationComponent.js");function c(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=c(n),l=e=>i.createElement(a,{...e,_mapKey:"tooltip"});exports.MapMarkerLayerTooltip=l;
@@ -0,0 +1,14 @@
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
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ import e from "./base/ConfigurationComponent.mjs";
11
+ const a = (o) => /* @__PURE__ */ t.createElement(e, { ...o, _mapKey: "tooltip" });
12
+ export {
13
+ a as MapMarkerLayerTooltip
14
+ };
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),c=require("../utils/index.js"),i=require("./base/ConfigurationComponent.js"),p=require("./ShapeLayerTooltip.js");function u(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const l=u(o),a=e=>l.createElement(i,{type:"shape",...e});a.displayName="MapShapeLayer";a.propTypes={children:function(e,r,t){return c.validateChildren(e,r,t,p.MapShapeLayerTooltip)}};exports.MapShapeLayer=a;
@@ -0,0 +1,22 @@
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
+ */
8
+ "use client";
9
+ import * as o from "react";
10
+ import { validateChildren as t } from "../utils/index.mjs";
11
+ import i from "./base/ConfigurationComponent.mjs";
12
+ import { MapShapeLayerTooltip as n } from "./ShapeLayerTooltip.mjs";
13
+ const p = (e) => /* @__PURE__ */ o.createElement(i, { type: "shape", ...e });
14
+ p.displayName = "MapShapeLayer";
15
+ p.propTypes = {
16
+ children: function(e, r, a) {
17
+ return t(e, r, a, n);
18
+ }
19
+ };
20
+ export {
21
+ p as MapShapeLayer
22
+ };
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),a=require("./base/ConfigurationComponent.js");function c(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=c(r),l=e=>i.createElement(a,{...e,_mapKey:"tooltip"});exports.MapShapeLayerTooltip=l;
@@ -0,0 +1,14 @@
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
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ import e from "./base/ConfigurationComponent.mjs";
11
+ const a = (o) => /* @__PURE__ */ t.createElement(e, { ...o, _mapKey: "tooltip" });
12
+ export {
13
+ a as MapShapeLayerTooltip
14
+ };
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),c=require("./base/ConfigurationComponent.js");function i(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const l=i(o),a=e=>l.createElement(c,{type:"tile",...e});a.displayName="MapTileLayer";exports.MapTileLayer=a;
@@ -0,0 +1,15 @@
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
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ import a from "./base/ConfigurationComponent.mjs";
11
+ const o = (e) => /* @__PURE__ */ t.createElement(a, { type: "tile", ...e });
12
+ o.displayName = "MapTileLayer";
13
+ export {
14
+ o as MapTileLayer
15
+ };
@@ -0,0 +1,8 @@
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
+ */
8
+ "use client";"use strict";const u=require("react"),l=require("../../MapContext.js");function d(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const o=d(u),a=class a extends o.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore}renderChildren(e,t){const{children:r}=e.props,{_mapKey:i,_parentStore:s}=this.props,p={...e.props,_mapCollectionIdxKey:`${i}_${t}`,_parentStore:s};return o.cloneElement(e,p,r)}render(){const{_mapKey:e,_parentStore:t,children:r}=this.props;return(t||this.optionsStore).dispatch({mapKey:e,payload:[]}),o.Children.map(r,(s,p)=>o.isValidElement(s)?this.renderChildren(s,p):s)}};a.contextType=l.MapContext;let c=a;module.exports=c;