@progress/kendo-react-map 6.1.1 → 7.0.0-develop.2

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 (208) hide show
  1. package/LICENSE.md +1 -1
  2. package/{dist/es/Map.d.ts → Map.d.ts} +4 -1
  3. package/{dist/npm/MapContext.d.ts → MapContext.d.ts} +4 -0
  4. package/{dist/es/MapProps.d.ts → MapProps.d.ts} +4 -0
  5. package/{dist/es/common → common}/events.d.ts +4 -0
  6. package/common/map-types.d.ts +5 -0
  7. package/{dist/es/components → components}/BubbleLayer.d.ts +4 -0
  8. package/{dist/es/components → components}/BubbleLayerTooltip.d.ts +4 -0
  9. package/components/Layers.d.ts +13 -0
  10. package/{dist/es/components → components}/MarkerLayer.d.ts +4 -0
  11. package/{dist/es/components → components}/MarkerLayerTooltip.d.ts +4 -0
  12. package/{dist/npm/components → components}/ShapeLayer.d.ts +4 -0
  13. package/{dist/npm/components → components}/ShapeLayerTooltip.d.ts +4 -0
  14. package/components/TileLayer.d.ts +13 -0
  15. package/{dist/npm/components → components}/base/CollectionConfigurationComponent.d.ts +4 -0
  16. package/{dist/es/components → components}/base/ConfigurationComponent.d.ts +4 -0
  17. package/components/index.d.ts +13 -0
  18. package/dist/cdn/js/kendo-react-map.js +5 -1
  19. package/events/base-event.d.ts +18 -0
  20. package/{dist/npm/events → events}/before-reset-event.d.ts +4 -0
  21. package/{dist/npm/events → events}/dom-event.d.ts +4 -1
  22. package/{dist/npm/events → events}/map-click-event.d.ts +4 -0
  23. package/events/map-event-builder.d.ts +10 -0
  24. package/{dist/npm/events → events}/marker-activate-event.d.ts +4 -0
  25. package/{dist/npm/events → events}/marker-click-event.d.ts +4 -0
  26. package/{dist/npm/events → events}/marker-created-event.d.ts +4 -0
  27. package/{dist/es/events → events}/pan-end-event.d.ts +4 -0
  28. package/{dist/es/events → events}/pan-event.d.ts +4 -0
  29. package/{dist/es/events → events}/preventable-event.d.ts +4 -0
  30. package/{dist/es/events → events}/reset-event.d.ts +4 -0
  31. package/{dist/npm/events → events}/shape-click-event.d.ts +4 -0
  32. package/{dist/npm/events → events}/shape-created-event.d.ts +4 -0
  33. package/{dist/es/events → events}/shape-feature-created-event.d.ts +4 -0
  34. package/{dist/es/events → events}/shape-mouse-enter-event.d.ts +4 -0
  35. package/{dist/npm/events → events}/shape-mouse-leave-event.d.ts +4 -0
  36. package/{dist/es/events → events}/zoom-end-event.d.ts +4 -0
  37. package/{dist/npm/events → events}/zoom-start-event.d.ts +4 -0
  38. package/index.d.ts +13 -0
  39. package/index.js +5 -0
  40. package/index.mjs +803 -0
  41. package/package-metadata.d.ts +9 -0
  42. package/package.json +29 -40
  43. package/store/reducer.d.ts +14 -0
  44. package/{dist/npm/store → store}/store.d.ts +4 -0
  45. package/{dist/npm/tooltip → tooltip}/BubbleTooltipContext.d.ts +5 -1
  46. package/{dist/npm/tooltip → tooltip}/MapTooltip.d.ts +6 -2
  47. package/{dist/npm/tooltip → tooltip}/MarkerTooltipContext.d.ts +5 -1
  48. package/{dist/es/tooltip → tooltip}/Popup.d.ts +5 -1
  49. package/tooltip/ShapeTooltipContext.d.ts +22 -0
  50. package/tooltip/index.d.ts +9 -0
  51. package/utils/index.d.ts +13 -0
  52. package/about.md +0 -3
  53. package/dist/es/Map.js +0 -469
  54. package/dist/es/MapContext.d.ts +0 -15
  55. package/dist/es/MapContext.js +0 -6
  56. package/dist/es/MapProps.js +0 -1
  57. package/dist/es/common/events.js +0 -16
  58. package/dist/es/common/map-types.d.ts +0 -1
  59. package/dist/es/common/map-types.js +0 -2
  60. package/dist/es/components/BubbleLayer.js +0 -25
  61. package/dist/es/components/BubbleLayerTooltip.js +0 -17
  62. package/dist/es/components/Layers.d.ts +0 -9
  63. package/dist/es/components/Layers.js +0 -21
  64. package/dist/es/components/MarkerLayer.js +0 -25
  65. package/dist/es/components/MarkerLayerTooltip.js +0 -17
  66. package/dist/es/components/ShapeLayer.d.ts +0 -10
  67. package/dist/es/components/ShapeLayer.js +0 -25
  68. package/dist/es/components/ShapeLayerTooltip.d.ts +0 -15
  69. package/dist/es/components/ShapeLayerTooltip.js +0 -17
  70. package/dist/es/components/TileLayer.d.ts +0 -9
  71. package/dist/es/components/TileLayer.js +0 -18
  72. package/dist/es/components/base/CollectionConfigurationComponent.d.ts +0 -19
  73. package/dist/es/components/base/CollectionConfigurationComponent.js +0 -63
  74. package/dist/es/components/base/ConfigurationComponent.js +0 -86
  75. package/dist/es/components/main.d.ts +0 -9
  76. package/dist/es/components/main.js +0 -9
  77. package/dist/es/defaults.d.ts +0 -1
  78. package/dist/es/defaults.js +0 -15
  79. package/dist/es/events/base-event.d.ts +0 -14
  80. package/dist/es/events/base-event.js +0 -13
  81. package/dist/es/events/before-reset-event.d.ts +0 -12
  82. package/dist/es/events/before-reset-event.js +0 -30
  83. package/dist/es/events/dom-event.d.ts +0 -23
  84. package/dist/es/events/dom-event.js +0 -21
  85. package/dist/es/events/map-click-event.d.ts +0 -20
  86. package/dist/es/events/map-click-event.js +0 -33
  87. package/dist/es/events/map-event-builder.d.ts +0 -6
  88. package/dist/es/events/map-event-builder.js +0 -27
  89. package/dist/es/events/marker-activate-event.d.ts +0 -20
  90. package/dist/es/events/marker-activate-event.js +0 -33
  91. package/dist/es/events/marker-click-event.d.ts +0 -20
  92. package/dist/es/events/marker-click-event.js +0 -33
  93. package/dist/es/events/marker-created-event.d.ts +0 -22
  94. package/dist/es/events/marker-created-event.js +0 -35
  95. package/dist/es/events/pan-end-event.js +0 -34
  96. package/dist/es/events/pan-event.js +0 -34
  97. package/dist/es/events/preventable-event.js +0 -46
  98. package/dist/es/events/reset-event.js +0 -32
  99. package/dist/es/events/shape-click-event.d.ts +0 -25
  100. package/dist/es/events/shape-click-event.js +0 -34
  101. package/dist/es/events/shape-created-event.d.ts +0 -29
  102. package/dist/es/events/shape-created-event.js +0 -38
  103. package/dist/es/events/shape-feature-created-event.js +0 -35
  104. package/dist/es/events/shape-mouse-enter-event.js +0 -37
  105. package/dist/es/events/shape-mouse-leave-event.d.ts +0 -28
  106. package/dist/es/events/shape-mouse-leave-event.js +0 -37
  107. package/dist/es/events/zoom-end-event.js +0 -32
  108. package/dist/es/events/zoom-start-event.d.ts +0 -18
  109. package/dist/es/events/zoom-start-event.js +0 -34
  110. package/dist/es/main.d.ts +0 -9
  111. package/dist/es/main.js +0 -8
  112. package/dist/es/package-metadata.d.ts +0 -5
  113. package/dist/es/package-metadata.js +0 -11
  114. package/dist/es/store/reducer.d.ts +0 -10
  115. package/dist/es/store/reducer.js +0 -84
  116. package/dist/es/store/store.d.ts +0 -22
  117. package/dist/es/store/store.js +0 -22
  118. package/dist/es/tooltip/BubbleTooltipContext.d.ts +0 -22
  119. package/dist/es/tooltip/BubbleTooltipContext.js +0 -1
  120. package/dist/es/tooltip/MapTooltip.d.ts +0 -37
  121. package/dist/es/tooltip/MapTooltip.js +0 -123
  122. package/dist/es/tooltip/MarkerTooltipContext.d.ts +0 -22
  123. package/dist/es/tooltip/MarkerTooltipContext.js +0 -1
  124. package/dist/es/tooltip/Popup.js +0 -76
  125. package/dist/es/tooltip/ShapeTooltipContext.d.ts +0 -18
  126. package/dist/es/tooltip/ShapeTooltipContext.js +0 -1
  127. package/dist/es/tooltip/main.d.ts +0 -5
  128. package/dist/es/tooltip/main.js +0 -2
  129. package/dist/es/utils/main.d.ts +0 -10
  130. package/dist/es/utils/main.js +0 -28
  131. package/dist/npm/Map.d.ts +0 -189
  132. package/dist/npm/Map.js +0 -472
  133. package/dist/npm/MapContext.js +0 -9
  134. package/dist/npm/MapProps.d.ts +0 -100
  135. package/dist/npm/MapProps.js +0 -2
  136. package/dist/npm/common/events.d.ts +0 -15
  137. package/dist/npm/common/events.js +0 -34
  138. package/dist/npm/common/map-types.d.ts +0 -1
  139. package/dist/npm/common/map-types.js +0 -7
  140. package/dist/npm/components/BubbleLayer.d.ts +0 -10
  141. package/dist/npm/components/BubbleLayer.js +0 -28
  142. package/dist/npm/components/BubbleLayerTooltip.d.ts +0 -15
  143. package/dist/npm/components/BubbleLayerTooltip.js +0 -20
  144. package/dist/npm/components/Layers.d.ts +0 -9
  145. package/dist/npm/components/Layers.js +0 -24
  146. package/dist/npm/components/MarkerLayer.d.ts +0 -10
  147. package/dist/npm/components/MarkerLayer.js +0 -28
  148. package/dist/npm/components/MarkerLayerTooltip.d.ts +0 -15
  149. package/dist/npm/components/MarkerLayerTooltip.js +0 -20
  150. package/dist/npm/components/ShapeLayer.js +0 -28
  151. package/dist/npm/components/ShapeLayerTooltip.js +0 -20
  152. package/dist/npm/components/TileLayer.d.ts +0 -9
  153. package/dist/npm/components/TileLayer.js +0 -21
  154. package/dist/npm/components/base/CollectionConfigurationComponent.js +0 -65
  155. package/dist/npm/components/base/ConfigurationComponent.d.ts +0 -24
  156. package/dist/npm/components/base/ConfigurationComponent.js +0 -88
  157. package/dist/npm/components/main.d.ts +0 -9
  158. package/dist/npm/components/main.js +0 -19
  159. package/dist/npm/defaults.d.ts +0 -1
  160. package/dist/npm/defaults.js +0 -17
  161. package/dist/npm/events/base-event.d.ts +0 -14
  162. package/dist/npm/events/base-event.js +0 -16
  163. package/dist/npm/events/before-reset-event.js +0 -33
  164. package/dist/npm/events/dom-event.js +0 -24
  165. package/dist/npm/events/map-click-event.js +0 -36
  166. package/dist/npm/events/map-event-builder.d.ts +0 -6
  167. package/dist/npm/events/map-event-builder.js +0 -30
  168. package/dist/npm/events/marker-activate-event.js +0 -36
  169. package/dist/npm/events/marker-click-event.js +0 -36
  170. package/dist/npm/events/marker-created-event.js +0 -38
  171. package/dist/npm/events/pan-end-event.d.ts +0 -24
  172. package/dist/npm/events/pan-end-event.js +0 -37
  173. package/dist/npm/events/pan-event.d.ts +0 -24
  174. package/dist/npm/events/pan-event.js +0 -37
  175. package/dist/npm/events/preventable-event.d.ts +0 -18
  176. package/dist/npm/events/preventable-event.js +0 -49
  177. package/dist/npm/events/reset-event.d.ts +0 -14
  178. package/dist/npm/events/reset-event.js +0 -35
  179. package/dist/npm/events/shape-click-event.js +0 -37
  180. package/dist/npm/events/shape-created-event.js +0 -41
  181. package/dist/npm/events/shape-feature-created-event.d.ts +0 -29
  182. package/dist/npm/events/shape-feature-created-event.js +0 -38
  183. package/dist/npm/events/shape-mouse-enter-event.d.ts +0 -28
  184. package/dist/npm/events/shape-mouse-enter-event.js +0 -40
  185. package/dist/npm/events/shape-mouse-leave-event.js +0 -40
  186. package/dist/npm/events/zoom-end-event.d.ts +0 -16
  187. package/dist/npm/events/zoom-end-event.js +0 -35
  188. package/dist/npm/events/zoom-start-event.js +0 -37
  189. package/dist/npm/main.d.ts +0 -9
  190. package/dist/npm/main.js +0 -27
  191. package/dist/npm/package-metadata.d.ts +0 -5
  192. package/dist/npm/package-metadata.js +0 -14
  193. package/dist/npm/store/reducer.d.ts +0 -10
  194. package/dist/npm/store/reducer.js +0 -88
  195. package/dist/npm/store/store.js +0 -24
  196. package/dist/npm/tooltip/BubbleTooltipContext.js +0 -2
  197. package/dist/npm/tooltip/MapTooltip.js +0 -126
  198. package/dist/npm/tooltip/MarkerTooltipContext.js +0 -2
  199. package/dist/npm/tooltip/Popup.d.ts +0 -29
  200. package/dist/npm/tooltip/Popup.js +0 -79
  201. package/dist/npm/tooltip/ShapeTooltipContext.d.ts +0 -18
  202. package/dist/npm/tooltip/ShapeTooltipContext.js +0 -2
  203. package/dist/npm/tooltip/main.d.ts +0 -5
  204. package/dist/npm/tooltip/main.js +0 -5
  205. package/dist/npm/utils/main.d.ts +0 -10
  206. package/dist/npm/utils/main.js +0 -32
  207. package/dist/systemjs/kendo-react-map.js +0 -1
  208. package/e2e-next/basic.tests.ts +0 -24
package/dist/es/Map.js DELETED
@@ -1,469 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var __assign = (this && this.__assign) || function () {
17
- __assign = Object.assign || function(t) {
18
- for (var s, i = 1, n = arguments.length; i < n; i++) {
19
- s = arguments[i];
20
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
- t[p] = s[p];
22
- }
23
- return t;
24
- };
25
- return __assign.apply(this, arguments);
26
- };
27
- var __rest = (this && this.__rest) || function (s, e) {
28
- var t = {};
29
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
- t[p] = s[p];
31
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
- t[p[i]] = s[p[i]];
35
- }
36
- return t;
37
- };
38
- import * as React from 'react';
39
- import * as PropTypes from 'prop-types';
40
- import { InstanceObserver, Map as KendoMap } from '@progress/kendo-charts';
41
- import { create as createEvent } from './events/map-event-builder';
42
- import createStore from './store/store';
43
- import { optionsReducer, observersReducer } from './store/reducer';
44
- import './defaults';
45
- import { MapContext } from './MapContext';
46
- import { MapTooltip } from './tooltip/MapTooltip';
47
- import { validatePackage, IconsContext } from '@progress/kendo-react-common';
48
- import { packageMetadata } from './package-metadata';
49
- import { toDomEvent } from './events/dom-event';
50
- import { mapMarkerTargetIcon, mapMarkerIcon, plusIcon, minusIcon, caretAltUpIcon, caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon } from '@progress/kendo-svg-icons';
51
- var svgIcons = {
52
- mapMarkerTargetIcon: mapMarkerTargetIcon,
53
- mapMarkerIcon: mapMarkerIcon,
54
- plusIcon: plusIcon,
55
- minusIcon: minusIcon,
56
- caretAltUpIcon: caretAltUpIcon,
57
- caretAltDownIcon: caretAltDownIcon,
58
- caretAltLeftIcon: caretAltLeftIcon,
59
- caretAltRightIcon: caretAltRightIcon
60
- };
61
- var defaultIconsType = 'svg';
62
- /**
63
- * Represents the [KendoReact Map component]({% slug overview_map %}).
64
- */
65
- var Map = /** @class */ (function (_super) {
66
- __extends(Map, _super);
67
- function Map(props) {
68
- var _this = _super.call(this, props) || this;
69
- /**
70
- * @hidden
71
- */
72
- _this.mapInstance = null;
73
- _this._element = null;
74
- _this.optionsStore = {};
75
- _this.optionsUnsubscriber = Function.prototype;
76
- _this.observersStore = {};
77
- _this.iconsType = defaultIconsType;
78
- _this.svgIcons = svgIcons;
79
- /* Map handlers */
80
- /**
81
- * @hidden
82
- */
83
- _this.onInit = function (e) {
84
- _this.mapInstance = e.sender;
85
- };
86
- /**
87
- * @hidden
88
- */
89
- _this.onRender = function (e) {
90
- if (_this.mapInstance !== null) {
91
- _this.trigger('render', e);
92
- }
93
- };
94
- /* Dom event handlers */
95
- /**
96
- * @hidden
97
- */
98
- _this.onMapMouseLeave = function (e) {
99
- var domEvent = toDomEvent(_this, e);
100
- var isDefaultPrevented = _this.triggerDomEvent('onMouseLeave', domEvent);
101
- if (isDefaultPrevented) {
102
- e.preventDefault();
103
- }
104
- else if (_this.mapInstance !== null) {
105
- _this.mapInstance.hideTooltip();
106
- }
107
- };
108
- validatePackage(packageMetadata);
109
- _this.optionsStore = createStore(optionsReducer);
110
- _this.observersStore = createStore(observersReducer);
111
- _this.childrenObserver = new InstanceObserver(_this, { onMouseLeave: 'onChildMouseLeave' });
112
- _this.contextValue = {
113
- optionsStore: _this.optionsStore,
114
- observersStore: _this.observersStore,
115
- childrenObserver: _this.childrenObserver
116
- };
117
- _this.mapObserver = new InstanceObserver(_this, {
118
- // render: 'onRender',
119
- init: 'onInit'
120
- });
121
- return _this;
122
- }
123
- Object.defineProperty(Map.prototype, "element", {
124
- /**
125
- * @hidden
126
- */
127
- get: function () {
128
- return this._element;
129
- },
130
- enumerable: false,
131
- configurable: true
132
- });
133
- /**
134
- * @hidden
135
- */
136
- Map.prototype.componentDidMount = function () {
137
- this.instantiateCoreMap();
138
- this.optionsUnsubscriber = this.optionsStore.subscribe(this.refresh.bind(this));
139
- };
140
- /**
141
- * @hidden
142
- */
143
- Map.prototype.componentWillUnmount = function () {
144
- this.optionsUnsubscriber();
145
- if (this.mapInstance !== null) {
146
- this.mapInstance.destroy();
147
- this.mapInstance = null;
148
- }
149
- };
150
- /**
151
- * @hidden
152
- */
153
- Map.prototype.componentDidUpdate = function (prevProps) {
154
- var _a = this.props, dir = _a.dir, children = _a.children, spreadProps = __rest(_a, ["dir", "children"]);
155
- if (this.mapInstance !== null) {
156
- var shouldUpdate = Object.entries(prevProps)
157
- .filter(function (keyValue) { return (keyValue[0] !== 'dir' && keyValue[0] !== 'children'); })
158
- .some(function (keyValue) {
159
- var key = keyValue[0], value = keyValue[1];
160
- return !(spreadProps.hasOwnProperty(key) && spreadProps[key] === value);
161
- });
162
- if (shouldUpdate) {
163
- this.refresh();
164
- }
165
- if (prevProps.dir !== dir) {
166
- // TODO: Set k-rtl instead
167
- // this.mapInstance.setDirection(this.getDirection(dir));
168
- }
169
- }
170
- };
171
- /**
172
- * @hidden
173
- */
174
- Map.prototype.render = function () {
175
- var _this = this;
176
- var _a = this.props, _b = _a.style, style = _b === void 0 ? {} : _b, className = _a.className, children = _a.children;
177
- var mapStyles = Object.assign({}, style, { position: 'relative' });
178
- var content = React.createElement('div', {
179
- className: className,
180
- style: mapStyles,
181
- key: 'mapElement'
182
- }, (React.createElement("div", { ref: function (el) { return _this._element = el; }, className: "k-map", onMouseLeave: this.onMapMouseLeave }, children)));
183
- return (React.createElement(IconsContext.Consumer, null, function (value) { return (React.createElement(MapContext.Provider, { value: _this.contextValue },
184
- React.createElement(MapTooltip, { key: "tooltip" }),
185
- content,
186
- _this.setIcons(value))); }));
187
- };
188
- /**
189
- * @hidden
190
- */
191
- Map.prototype.getMapOptions = function () {
192
- var _a = this.props, center = _a.center, controls = _a.controls, minZoom = _a.minZoom, maxZoom = _a.maxZoom, minSize = _a.minSize, pannable = _a.pannable, wraparound = _a.wraparound, zoom = _a.zoom, zoomable = _a.zoomable;
193
- var mapOptions = {
194
- center: center,
195
- controls: controls,
196
- minZoom: minZoom,
197
- maxZoom: maxZoom,
198
- minSize: minSize,
199
- pannable: pannable,
200
- wraparound: wraparound,
201
- zoom: zoom,
202
- zoomable: zoomable,
203
- icons: {
204
- type: this.iconsType,
205
- svgIcons: this.svgIcons
206
- }
207
- };
208
- mapOptions = Object.assign(mapOptions, this.optionsStore.getState());
209
- return mapOptions;
210
- };
211
- Object.defineProperty(Map.prototype, "layers", {
212
- /**
213
- * The marker layers instances.
214
- */
215
- get: function () {
216
- var _a;
217
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.layers;
218
- },
219
- enumerable: false,
220
- configurable: true
221
- });
222
- Object.defineProperty(Map.prototype, "extent", {
223
- /**
224
- * Gets the extent (visible area) of the map.
225
- */
226
- get: function () {
227
- var _a;
228
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.extent();
229
- },
230
- /**
231
- * Sets the extent (visible area) of the map.
232
- */
233
- set: function (extent) {
234
- var _a;
235
- (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.extent(extent);
236
- },
237
- enumerable: false,
238
- configurable: true
239
- });
240
- /**
241
- * Detects the size of the container and redraws the Map.
242
- * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
243
- */
244
- Map.prototype.resize = function () {
245
- // this.mapInstance?.resize();
246
- };
247
- /**
248
- * Retrieves the size of the visible portion of the map.
249
- *
250
- * @returns The size (width and height) of the visible portion of the map.
251
- */
252
- Map.prototype.viewSize = function () {
253
- var _a;
254
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.viewSize();
255
- };
256
- /**
257
- * Returns the event coordinates relative to the map element. Offset coordinates are not synchronized to a particular location on the map.
258
- *
259
- * @param e The mouse event.
260
- * @returns The event coordinates relative to the map element.
261
- */
262
- Map.prototype.eventOffset = function (e) {
263
- var _a;
264
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventOffset(e);
265
- };
266
- /**
267
- * Retrieves projected (layer) coordinates that correspond to this mouse event.
268
- * Layer coordinates are absolute and change only when the zoom level is changed.
269
- *
270
- * @param e The mouse event.
271
- * @returns The projected (layer) coordinates that correspond to this event.
272
- */
273
- Map.prototype.eventToLayer = function (e) {
274
- var _a;
275
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventToLayer(e);
276
- };
277
- /**
278
- * Retrieves the geographic location that correspond to this mouse event.
279
- *
280
- * @param e The mouse event.
281
- * @returns The geographic location that correspond to this mouse event.
282
- */
283
- Map.prototype.eventToLocation = function (e) {
284
- var _a;
285
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventToLocation(e);
286
- };
287
- /**
288
- * Retrieves relative (view) coordinates that correspond to this mouse event.
289
- * Layer elements positioned on these coordinates will appear under the mouse cursor.
290
- * View coordinates are no longer valid after a map reset.
291
- *
292
- * @param e The mouse event.
293
- * @returns The relative (view) coordinates that correspond to this mouse event.
294
- */
295
- Map.prototype.eventToView = function (e) {
296
- var _a;
297
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventToView(e);
298
- };
299
- /**
300
- * Transforms layer (projected) coordinates to geographical location.
301
- *
302
- * @param point The layer (projected) coordinates. An array argument is assumed to be in x, y order.
303
- * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
304
- * @returns The geographic location that corresponds to the layer coordinates.
305
- */
306
- Map.prototype.layerToLocation = function (point, zoom) {
307
- var _a;
308
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.layerToLocation(point, zoom);
309
- };
310
- /**
311
- * Returns the layer (projected) coordinates that correspond to a geographical location.
312
- *
313
- * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
314
- * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
315
- * @returns The layer (projected) coordinates.
316
- */
317
- Map.prototype.locationToLayer = function (location, zoom) {
318
- var _a;
319
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.locationToLayer(location, zoom);
320
- };
321
- /**
322
- * Returns the view (relative) coordinates that correspond to a geographical location.
323
- *
324
- * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
325
- * @returns The view coordinates that correspond to a geographical location.
326
- */
327
- Map.prototype.locationToView = function (location) {
328
- var _a;
329
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.locationToView(location);
330
- };
331
- /**
332
- * Returns the geographical location that correspond to the view (relative) coordinates.
333
- *
334
- * @param point The view coordinates. An array argument is assumed to be in x, y order.
335
- * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
336
- * @returns The geographic location that corresponds to the view coordinates.
337
- */
338
- Map.prototype.viewToLocation = function (point, zoom) {
339
- var _a;
340
- return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.viewToLocation(point, zoom);
341
- };
342
- /**
343
- * Load markers in the Map. This method will clear the current markers and show the new ones.
344
- *
345
- * @param newMarkers An array of markers.
346
- */
347
- Map.prototype.loadMarkers = function (newMarkers) {
348
- var markers = this.mapInstance.markers;
349
- if (markers) {
350
- markers._load(newMarkers);
351
- }
352
- };
353
- /**
354
- * @hidden
355
- */
356
- Map.prototype.refresh = function () {
357
- if (this.mapInstance !== null) {
358
- var mapOptions = this.getMapOptions();
359
- if (this.props.onRefresh) {
360
- this.props.onRefresh.call(undefined, mapOptions, this.mapInstance);
361
- }
362
- else {
363
- this.mapInstance.setOptions(mapOptions);
364
- }
365
- }
366
- };
367
- /**
368
- * @hidden
369
- */
370
- Map.prototype.instantiateCoreMap = function () {
371
- // const { dir } = this.props;
372
- var mapOptions = this.getMapOptions();
373
- this.mapInstance = new KendoMap(this.element, mapOptions, {}, {
374
- // rtl: this.getDirection(dir),
375
- observer: this.mapObserver,
376
- sender: this
377
- });
378
- };
379
- /* Triggers public dom event handlers */
380
- /**
381
- * @hidden
382
- */
383
- Map.prototype.trigger = function (name, e) {
384
- var alias = name === 'click' ? 'mapClick' : name;
385
- var target = this;
386
- var eventObject = createEvent(alias, e, target);
387
- var handler = 'on' + alias.charAt(0).toUpperCase() + alias.slice(1);
388
- var observers = this.observersStore.getState();
389
- var isDefaultPrevented = false;
390
- for (var idx = 0; idx < observers.length; idx++) {
391
- if (observers[idx].trigger(alias, e)) {
392
- isDefaultPrevented = true;
393
- }
394
- }
395
- /* We have not prevented the event internally, now pass it to the user */
396
- if (isDefaultPrevented === false
397
- && eventObject
398
- && this.props.hasOwnProperty(handler)) {
399
- this.props[handler].call(undefined, eventObject);
400
- return eventObject.isDefaultPrevented && eventObject.isDefaultPrevented();
401
- }
402
- return isDefaultPrevented;
403
- };
404
- /* Used by (event)InstanceObserver to check the wrapper for supported events */
405
- /**
406
- * @hidden
407
- */
408
- Map.prototype.requiresHandlers = function (names) {
409
- for (var idx = 0; idx < names.length; idx++) {
410
- var name_1 = names[idx];
411
- var handler = 'on' + name_1.charAt(0).toUpperCase() + name_1.slice(1);
412
- if (this.props.hasOwnProperty(handler)) {
413
- return true;
414
- }
415
- }
416
- return false;
417
- };
418
- /**
419
- * @hidden
420
- */
421
- Map.prototype.triggerDomEvent = function (name, e) {
422
- var observers = this.observersStore.getState();
423
- var isDefaultPrevented = false;
424
- for (var idx = 0; idx < observers.length; idx++) {
425
- if (observers[idx].trigger(name, e)) {
426
- isDefaultPrevented = true;
427
- }
428
- }
429
- return isDefaultPrevented;
430
- };
431
- Map.prototype.setIcons = function (iconsContextValue) {
432
- var type = iconsContextValue.type, _a = iconsContextValue.icons, icons = _a === void 0 ? {} : _a;
433
- var svgIconsResult = __assign({}, svgIcons);
434
- var overrides = {
435
- mapMarkerTargetIcon: icons.mapMarkerTargetIcon,
436
- mapMarkerIcon: icons.mapMarkerIcon,
437
- plusIcon: icons.plusIcon,
438
- minusIcon: icons.minusIcon,
439
- caretAltUpIcon: icons.caretAltUpIcon,
440
- caretAltDownIcon: icons.caretAltDownIcon,
441
- caretAltLeftIcon: icons.caretAltLeftIcon,
442
- caretAltRightIcon: icons.caretAltRightIcon
443
- };
444
- var key;
445
- for (key in overrides) {
446
- if (overrides[key]) {
447
- var icon = overrides[key];
448
- if (icon && typeof icon !== 'string') {
449
- svgIconsResult[key] = icon;
450
- }
451
- }
452
- }
453
- this.svgIcons = svgIconsResult;
454
- this.iconsType = type || defaultIconsType;
455
- return null;
456
- };
457
- /**
458
- * @hidden
459
- */
460
- Map.propTypes = {
461
- dir: PropTypes.string
462
- };
463
- /**
464
- * @hidden
465
- */
466
- Map.defaultProps = {};
467
- return Map;
468
- }(React.Component));
469
- export { Map };
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import { Store } from './store/store';
3
- import { InstanceObserver } from '@progress/kendo-charts';
4
- /**
5
- * @hidden
6
- */
7
- export interface MapContextType {
8
- optionsStore: Store;
9
- observersStore: Store;
10
- childrenObserver: InstanceObserver;
11
- }
12
- /**
13
- * @hidden
14
- */
15
- export declare const MapContext: React.Context<MapContextType | null>;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * @hidden
4
- */
5
- export var MapContext = React.createContext(null);
6
- MapContext.displayName = 'MapContext';
@@ -1 +0,0 @@
1
- export {};
@@ -1,16 +0,0 @@
1
- // Re-export event types
2
- export { BeforeResetEvent } from '../events/before-reset-event';
3
- export { MapClickEvent } from '../events/map-click-event';
4
- export { MarkerActivateEvent } from '../events/marker-activate-event';
5
- export { MarkerClickEvent } from '../events/marker-click-event';
6
- export { MarkerCreatedEvent } from '../events/marker-created-event';
7
- export { PanEndEvent } from '../events/pan-end-event';
8
- export { PanEvent } from '../events/pan-event';
9
- export { ResetEvent } from '../events/reset-event';
10
- export { ShapeClickEvent } from '../events/shape-click-event';
11
- export { ShapeCreatedEvent } from '../events/shape-created-event';
12
- export { ShapeFeatureCreatedEvent } from '../events/shape-feature-created-event';
13
- export { ShapeMouseEnterEvent } from '../events/shape-mouse-enter-event';
14
- export { ShapeMouseLeaveEvent } from '../events/shape-mouse-leave-event';
15
- export { ZoomEndEvent } from '../events/zoom-end-event';
16
- export { ZoomStartEvent } from '../events/zoom-start-event';
@@ -1 +0,0 @@
1
- export { MapLayer, MapLayerOptions, MapMarker, BubbleLayerSymbolArgs, BubbleLayerSymbol, MapControls, MapControlsPosition, TileUrlTemplateArgs, Location, Extent } from '@progress/kendo-charts';
@@ -1,2 +0,0 @@
1
- // Re-export Map types
2
- export { Location, Extent } from '@progress/kendo-charts';
@@ -1,25 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import * as React from 'react';
13
- import { validateChildren } from '../utils/main';
14
- import ConfigurationComponent from './base/ConfigurationComponent';
15
- import { MapBubbleLayerTooltip } from './BubbleLayerTooltip';
16
- var MapBubbleLayer = function (props) {
17
- return (React.createElement(ConfigurationComponent, __assign({ type: "bubble" }, props)));
18
- };
19
- MapBubbleLayer.displayName = 'MapBubbleLayer';
20
- MapBubbleLayer.propTypes = {
21
- children: function (props, propName, componentName) {
22
- return validateChildren(props, propName, componentName, MapBubbleLayerTooltip);
23
- }
24
- };
25
- export { MapBubbleLayer };
@@ -1,17 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import * as React from 'react';
13
- import ConfigurationComponent from './base/ConfigurationComponent';
14
- var MapBubbleLayerTooltip = function (props) {
15
- return (React.createElement(ConfigurationComponent, __assign({}, props, { _mapKey: "tooltip" })));
16
- };
17
- export { MapBubbleLayerTooltip };
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * Represents the props of the KendoReact MapLayers component.
4
- */
5
- export interface MapLayersProps {
6
- children?: React.ReactNode;
7
- }
8
- declare const MapLayers: React.FunctionComponent<MapLayersProps>;
9
- export { MapLayers };
@@ -1,21 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import * as React from 'react';
13
- import * as PropTypes from 'prop-types';
14
- import CollectionConfigurationComponent from './base/CollectionConfigurationComponent';
15
- var MapLayers = function (props) {
16
- return (React.createElement(CollectionConfigurationComponent, __assign({}, props, { _mapKey: "layers" })));
17
- };
18
- MapLayers.propTypes = {
19
- children: PropTypes.node
20
- };
21
- export { MapLayers };
@@ -1,25 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import * as React from 'react';
13
- import { validateChildren } from '../utils/main';
14
- import ConfigurationComponent from './base/ConfigurationComponent';
15
- import { MapMarkerLayerTooltip } from './MarkerLayerTooltip';
16
- var MapMarkerLayer = function (props) {
17
- return (React.createElement(ConfigurationComponent, __assign({ type: "marker" }, props)));
18
- };
19
- MapMarkerLayer.displayName = 'MapMarkerLayer';
20
- MapMarkerLayer.propTypes = {
21
- children: function (props, propName, componentName) {
22
- return validateChildren(props, propName, componentName, MapMarkerLayerTooltip);
23
- }
24
- };
25
- export { MapMarkerLayer };
@@ -1,17 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import * as React from 'react';
13
- import ConfigurationComponent from './base/ConfigurationComponent';
14
- var MapMarkerLayerTooltip = function (props) {
15
- return (React.createElement(ConfigurationComponent, __assign({}, props, { _mapKey: "tooltip" })));
16
- };
17
- export { MapMarkerLayerTooltip };
@@ -1,10 +0,0 @@
1
- import { ShapeLayerOptions } from '@progress/kendo-charts';
2
- import * as React from 'react';
3
- /**
4
- * Represents the props of the KendoReact MapShapeLayer component.
5
- */
6
- export interface MapShapeLayerProps extends ShapeLayerOptions {
7
- children?: React.ReactNode;
8
- }
9
- declare const MapShapeLayer: React.FunctionComponent<MapShapeLayerProps>;
10
- export { MapShapeLayer };
@@ -1,25 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import * as React from 'react';
13
- import { validateChildren } from '../utils/main';
14
- import ConfigurationComponent from './base/ConfigurationComponent';
15
- import { MapShapeLayerTooltip } from './ShapeLayerTooltip';
16
- var MapShapeLayer = function (props) {
17
- return (React.createElement(ConfigurationComponent, __assign({ type: "shape" }, props)));
18
- };
19
- MapShapeLayer.displayName = 'MapShapeLayer';
20
- MapShapeLayer.propTypes = {
21
- children: function (props, propName, componentName) {
22
- return validateChildren(props, propName, componentName, MapShapeLayerTooltip);
23
- }
24
- };
25
- export { MapShapeLayer };