@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.
- package/LICENSE.md +1 -1
- package/{dist/es/Map.d.ts → Map.d.ts} +4 -1
- package/{dist/npm/MapContext.d.ts → MapContext.d.ts} +4 -0
- package/{dist/es/MapProps.d.ts → MapProps.d.ts} +4 -0
- package/{dist/es/common → common}/events.d.ts +4 -0
- package/common/map-types.d.ts +5 -0
- package/{dist/es/components → components}/BubbleLayer.d.ts +4 -0
- package/{dist/es/components → components}/BubbleLayerTooltip.d.ts +4 -0
- package/components/Layers.d.ts +13 -0
- package/{dist/es/components → components}/MarkerLayer.d.ts +4 -0
- package/{dist/es/components → components}/MarkerLayerTooltip.d.ts +4 -0
- package/{dist/npm/components → components}/ShapeLayer.d.ts +4 -0
- package/{dist/npm/components → components}/ShapeLayerTooltip.d.ts +4 -0
- package/components/TileLayer.d.ts +13 -0
- package/{dist/npm/components → components}/base/CollectionConfigurationComponent.d.ts +4 -0
- package/{dist/es/components → components}/base/ConfigurationComponent.d.ts +4 -0
- package/components/index.d.ts +13 -0
- package/dist/cdn/js/kendo-react-map.js +5 -1
- package/events/base-event.d.ts +18 -0
- package/{dist/npm/events → events}/before-reset-event.d.ts +4 -0
- package/{dist/npm/events → events}/dom-event.d.ts +4 -1
- package/{dist/npm/events → events}/map-click-event.d.ts +4 -0
- package/events/map-event-builder.d.ts +10 -0
- package/{dist/npm/events → events}/marker-activate-event.d.ts +4 -0
- package/{dist/npm/events → events}/marker-click-event.d.ts +4 -0
- package/{dist/npm/events → events}/marker-created-event.d.ts +4 -0
- package/{dist/es/events → events}/pan-end-event.d.ts +4 -0
- package/{dist/es/events → events}/pan-event.d.ts +4 -0
- package/{dist/es/events → events}/preventable-event.d.ts +4 -0
- package/{dist/es/events → events}/reset-event.d.ts +4 -0
- package/{dist/npm/events → events}/shape-click-event.d.ts +4 -0
- package/{dist/npm/events → events}/shape-created-event.d.ts +4 -0
- package/{dist/es/events → events}/shape-feature-created-event.d.ts +4 -0
- package/{dist/es/events → events}/shape-mouse-enter-event.d.ts +4 -0
- package/{dist/npm/events → events}/shape-mouse-leave-event.d.ts +4 -0
- package/{dist/es/events → events}/zoom-end-event.d.ts +4 -0
- package/{dist/npm/events → events}/zoom-start-event.d.ts +4 -0
- package/index.d.ts +13 -0
- package/index.js +5 -0
- package/index.mjs +803 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +29 -40
- package/store/reducer.d.ts +14 -0
- package/{dist/npm/store → store}/store.d.ts +4 -0
- package/{dist/npm/tooltip → tooltip}/BubbleTooltipContext.d.ts +5 -1
- package/{dist/npm/tooltip → tooltip}/MapTooltip.d.ts +6 -2
- package/{dist/npm/tooltip → tooltip}/MarkerTooltipContext.d.ts +5 -1
- package/{dist/es/tooltip → tooltip}/Popup.d.ts +5 -1
- package/tooltip/ShapeTooltipContext.d.ts +22 -0
- package/tooltip/index.d.ts +9 -0
- package/utils/index.d.ts +13 -0
- package/about.md +0 -3
- package/dist/es/Map.js +0 -469
- package/dist/es/MapContext.d.ts +0 -15
- package/dist/es/MapContext.js +0 -6
- package/dist/es/MapProps.js +0 -1
- package/dist/es/common/events.js +0 -16
- package/dist/es/common/map-types.d.ts +0 -1
- package/dist/es/common/map-types.js +0 -2
- package/dist/es/components/BubbleLayer.js +0 -25
- package/dist/es/components/BubbleLayerTooltip.js +0 -17
- package/dist/es/components/Layers.d.ts +0 -9
- package/dist/es/components/Layers.js +0 -21
- package/dist/es/components/MarkerLayer.js +0 -25
- package/dist/es/components/MarkerLayerTooltip.js +0 -17
- package/dist/es/components/ShapeLayer.d.ts +0 -10
- package/dist/es/components/ShapeLayer.js +0 -25
- package/dist/es/components/ShapeLayerTooltip.d.ts +0 -15
- package/dist/es/components/ShapeLayerTooltip.js +0 -17
- package/dist/es/components/TileLayer.d.ts +0 -9
- package/dist/es/components/TileLayer.js +0 -18
- package/dist/es/components/base/CollectionConfigurationComponent.d.ts +0 -19
- package/dist/es/components/base/CollectionConfigurationComponent.js +0 -63
- package/dist/es/components/base/ConfigurationComponent.js +0 -86
- package/dist/es/components/main.d.ts +0 -9
- package/dist/es/components/main.js +0 -9
- package/dist/es/defaults.d.ts +0 -1
- package/dist/es/defaults.js +0 -15
- package/dist/es/events/base-event.d.ts +0 -14
- package/dist/es/events/base-event.js +0 -13
- package/dist/es/events/before-reset-event.d.ts +0 -12
- package/dist/es/events/before-reset-event.js +0 -30
- package/dist/es/events/dom-event.d.ts +0 -23
- package/dist/es/events/dom-event.js +0 -21
- package/dist/es/events/map-click-event.d.ts +0 -20
- package/dist/es/events/map-click-event.js +0 -33
- package/dist/es/events/map-event-builder.d.ts +0 -6
- package/dist/es/events/map-event-builder.js +0 -27
- package/dist/es/events/marker-activate-event.d.ts +0 -20
- package/dist/es/events/marker-activate-event.js +0 -33
- package/dist/es/events/marker-click-event.d.ts +0 -20
- package/dist/es/events/marker-click-event.js +0 -33
- package/dist/es/events/marker-created-event.d.ts +0 -22
- package/dist/es/events/marker-created-event.js +0 -35
- package/dist/es/events/pan-end-event.js +0 -34
- package/dist/es/events/pan-event.js +0 -34
- package/dist/es/events/preventable-event.js +0 -46
- package/dist/es/events/reset-event.js +0 -32
- package/dist/es/events/shape-click-event.d.ts +0 -25
- package/dist/es/events/shape-click-event.js +0 -34
- package/dist/es/events/shape-created-event.d.ts +0 -29
- package/dist/es/events/shape-created-event.js +0 -38
- package/dist/es/events/shape-feature-created-event.js +0 -35
- package/dist/es/events/shape-mouse-enter-event.js +0 -37
- package/dist/es/events/shape-mouse-leave-event.d.ts +0 -28
- package/dist/es/events/shape-mouse-leave-event.js +0 -37
- package/dist/es/events/zoom-end-event.js +0 -32
- package/dist/es/events/zoom-start-event.d.ts +0 -18
- package/dist/es/events/zoom-start-event.js +0 -34
- package/dist/es/main.d.ts +0 -9
- package/dist/es/main.js +0 -8
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/store/reducer.d.ts +0 -10
- package/dist/es/store/reducer.js +0 -84
- package/dist/es/store/store.d.ts +0 -22
- package/dist/es/store/store.js +0 -22
- package/dist/es/tooltip/BubbleTooltipContext.d.ts +0 -22
- package/dist/es/tooltip/BubbleTooltipContext.js +0 -1
- package/dist/es/tooltip/MapTooltip.d.ts +0 -37
- package/dist/es/tooltip/MapTooltip.js +0 -123
- package/dist/es/tooltip/MarkerTooltipContext.d.ts +0 -22
- package/dist/es/tooltip/MarkerTooltipContext.js +0 -1
- package/dist/es/tooltip/Popup.js +0 -76
- package/dist/es/tooltip/ShapeTooltipContext.d.ts +0 -18
- package/dist/es/tooltip/ShapeTooltipContext.js +0 -1
- package/dist/es/tooltip/main.d.ts +0 -5
- package/dist/es/tooltip/main.js +0 -2
- package/dist/es/utils/main.d.ts +0 -10
- package/dist/es/utils/main.js +0 -28
- package/dist/npm/Map.d.ts +0 -189
- package/dist/npm/Map.js +0 -472
- package/dist/npm/MapContext.js +0 -9
- package/dist/npm/MapProps.d.ts +0 -100
- package/dist/npm/MapProps.js +0 -2
- package/dist/npm/common/events.d.ts +0 -15
- package/dist/npm/common/events.js +0 -34
- package/dist/npm/common/map-types.d.ts +0 -1
- package/dist/npm/common/map-types.js +0 -7
- package/dist/npm/components/BubbleLayer.d.ts +0 -10
- package/dist/npm/components/BubbleLayer.js +0 -28
- package/dist/npm/components/BubbleLayerTooltip.d.ts +0 -15
- package/dist/npm/components/BubbleLayerTooltip.js +0 -20
- package/dist/npm/components/Layers.d.ts +0 -9
- package/dist/npm/components/Layers.js +0 -24
- package/dist/npm/components/MarkerLayer.d.ts +0 -10
- package/dist/npm/components/MarkerLayer.js +0 -28
- package/dist/npm/components/MarkerLayerTooltip.d.ts +0 -15
- package/dist/npm/components/MarkerLayerTooltip.js +0 -20
- package/dist/npm/components/ShapeLayer.js +0 -28
- package/dist/npm/components/ShapeLayerTooltip.js +0 -20
- package/dist/npm/components/TileLayer.d.ts +0 -9
- package/dist/npm/components/TileLayer.js +0 -21
- package/dist/npm/components/base/CollectionConfigurationComponent.js +0 -65
- package/dist/npm/components/base/ConfigurationComponent.d.ts +0 -24
- package/dist/npm/components/base/ConfigurationComponent.js +0 -88
- package/dist/npm/components/main.d.ts +0 -9
- package/dist/npm/components/main.js +0 -19
- package/dist/npm/defaults.d.ts +0 -1
- package/dist/npm/defaults.js +0 -17
- package/dist/npm/events/base-event.d.ts +0 -14
- package/dist/npm/events/base-event.js +0 -16
- package/dist/npm/events/before-reset-event.js +0 -33
- package/dist/npm/events/dom-event.js +0 -24
- package/dist/npm/events/map-click-event.js +0 -36
- package/dist/npm/events/map-event-builder.d.ts +0 -6
- package/dist/npm/events/map-event-builder.js +0 -30
- package/dist/npm/events/marker-activate-event.js +0 -36
- package/dist/npm/events/marker-click-event.js +0 -36
- package/dist/npm/events/marker-created-event.js +0 -38
- package/dist/npm/events/pan-end-event.d.ts +0 -24
- package/dist/npm/events/pan-end-event.js +0 -37
- package/dist/npm/events/pan-event.d.ts +0 -24
- package/dist/npm/events/pan-event.js +0 -37
- package/dist/npm/events/preventable-event.d.ts +0 -18
- package/dist/npm/events/preventable-event.js +0 -49
- package/dist/npm/events/reset-event.d.ts +0 -14
- package/dist/npm/events/reset-event.js +0 -35
- package/dist/npm/events/shape-click-event.js +0 -37
- package/dist/npm/events/shape-created-event.js +0 -41
- package/dist/npm/events/shape-feature-created-event.d.ts +0 -29
- package/dist/npm/events/shape-feature-created-event.js +0 -38
- package/dist/npm/events/shape-mouse-enter-event.d.ts +0 -28
- package/dist/npm/events/shape-mouse-enter-event.js +0 -40
- package/dist/npm/events/shape-mouse-leave-event.js +0 -40
- package/dist/npm/events/zoom-end-event.d.ts +0 -16
- package/dist/npm/events/zoom-end-event.js +0 -35
- package/dist/npm/events/zoom-start-event.js +0 -37
- package/dist/npm/main.d.ts +0 -9
- package/dist/npm/main.js +0 -27
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/store/reducer.d.ts +0 -10
- package/dist/npm/store/reducer.js +0 -88
- package/dist/npm/store/store.js +0 -24
- package/dist/npm/tooltip/BubbleTooltipContext.js +0 -2
- package/dist/npm/tooltip/MapTooltip.js +0 -126
- package/dist/npm/tooltip/MarkerTooltipContext.js +0 -2
- package/dist/npm/tooltip/Popup.d.ts +0 -29
- package/dist/npm/tooltip/Popup.js +0 -79
- package/dist/npm/tooltip/ShapeTooltipContext.d.ts +0 -18
- package/dist/npm/tooltip/ShapeTooltipContext.js +0 -2
- package/dist/npm/tooltip/main.d.ts +0 -5
- package/dist/npm/tooltip/main.js +0 -5
- package/dist/npm/utils/main.d.ts +0 -10
- package/dist/npm/utils/main.js +0 -32
- package/dist/systemjs/kendo-react-map.js +0 -1
- package/e2e-next/basic.tests.ts +0 -24
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ZoomEndEvent = void 0;
|
|
19
|
-
var base_event_1 = require("./base-event");
|
|
20
|
-
/**
|
|
21
|
-
* Fired when the map zoom level has changed.
|
|
22
|
-
*/
|
|
23
|
-
var ZoomEndEvent = /** @class */ (function (_super) {
|
|
24
|
-
__extends(ZoomEndEvent, _super);
|
|
25
|
-
/**
|
|
26
|
-
* @hidden
|
|
27
|
-
*/
|
|
28
|
-
function ZoomEndEvent(e, target) {
|
|
29
|
-
var _this = _super.call(this, target) || this;
|
|
30
|
-
_this.originalEvent = e.originalEvent;
|
|
31
|
-
return _this;
|
|
32
|
-
}
|
|
33
|
-
return ZoomEndEvent;
|
|
34
|
-
}(base_event_1.BaseEvent));
|
|
35
|
-
exports.ZoomEndEvent = ZoomEndEvent;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ZoomStartEvent = void 0;
|
|
19
|
-
var preventable_event_1 = require("./preventable-event");
|
|
20
|
-
/**
|
|
21
|
-
* Fired when the map zoom level is about to change.
|
|
22
|
-
*
|
|
23
|
-
* Cancelling the event will prevent the user action.
|
|
24
|
-
*/
|
|
25
|
-
var ZoomStartEvent = /** @class */ (function (_super) {
|
|
26
|
-
__extends(ZoomStartEvent, _super);
|
|
27
|
-
/**
|
|
28
|
-
* @hidden
|
|
29
|
-
*/
|
|
30
|
-
function ZoomStartEvent(e, target) {
|
|
31
|
-
var _this = _super.call(this, target) || this;
|
|
32
|
-
_this.originalEvent = e.originalEvent;
|
|
33
|
-
return _this;
|
|
34
|
-
}
|
|
35
|
-
return ZoomStartEvent;
|
|
36
|
-
}(preventable_event_1.PreventableEvent));
|
|
37
|
-
exports.ZoomStartEvent = ZoomStartEvent;
|
package/dist/npm/main.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import CollectionConfigurationComponent from './components/base/CollectionConfigurationComponent';
|
|
2
|
-
import ConfigurationComponent from './components/base/ConfigurationComponent';
|
|
3
|
-
export { CollectionConfigurationComponent, ConfigurationComponent };
|
|
4
|
-
export { Map } from './Map';
|
|
5
|
-
export { MapProps } from './MapProps';
|
|
6
|
-
export * from './components/main';
|
|
7
|
-
export * from './common/map-types';
|
|
8
|
-
export * from './common/events';
|
|
9
|
-
export * from './tooltip/main';
|
package/dist/npm/main.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Map = exports.ConfigurationComponent = exports.CollectionConfigurationComponent = void 0;
|
|
18
|
-
var CollectionConfigurationComponent_1 = require("./components/base/CollectionConfigurationComponent");
|
|
19
|
-
exports.CollectionConfigurationComponent = CollectionConfigurationComponent_1.default;
|
|
20
|
-
var ConfigurationComponent_1 = require("./components/base/ConfigurationComponent");
|
|
21
|
-
exports.ConfigurationComponent = ConfigurationComponent_1.default;
|
|
22
|
-
var Map_1 = require("./Map");
|
|
23
|
-
Object.defineProperty(exports, "Map", { enumerable: true, get: function () { return Map_1.Map; } });
|
|
24
|
-
__exportStar(require("./components/main"), exports);
|
|
25
|
-
__exportStar(require("./common/map-types"), exports);
|
|
26
|
-
__exportStar(require("./common/events"), exports);
|
|
27
|
-
__exportStar(require("./tooltip/main"), exports);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.packageMetadata = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
exports.packageMetadata = {
|
|
8
|
-
name: '@progress/kendo-react-map',
|
|
9
|
-
productName: 'KendoReact',
|
|
10
|
-
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate: 1700064852,
|
|
12
|
-
version: '',
|
|
13
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StoreAction } from './store';
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
declare const optionsReducer: (currentState: any, action: StoreAction) => object;
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
declare const observersReducer: (currentState: any, action: StoreAction) => any;
|
|
10
|
-
export { optionsReducer, observersReducer };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
-
if (ar || !(i in from)) {
|
|
5
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
-
ar[i] = from[i];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.observersReducer = exports.optionsReducer = void 0;
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
var optionsReducer = function (currentState, action) {
|
|
17
|
-
if (action.mapCollectionIdxKey) {
|
|
18
|
-
return reducers.collectionConfigurationItem(currentState, action);
|
|
19
|
-
}
|
|
20
|
-
else if (action.mapKey) {
|
|
21
|
-
return reducers.configurationItem(currentState, action);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.optionsReducer = optionsReducer;
|
|
28
|
-
/**
|
|
29
|
-
* @hidden
|
|
30
|
-
*/
|
|
31
|
-
var observersReducer = function (currentState, action) {
|
|
32
|
-
if (action.type) {
|
|
33
|
-
switch (action.type) {
|
|
34
|
-
case 'add':
|
|
35
|
-
return __spreadArray(__spreadArray([], currentState, true), [action.payload], false);
|
|
36
|
-
case 'remove':
|
|
37
|
-
return currentState.filter(function (element) { return element !== action.payload; });
|
|
38
|
-
default:
|
|
39
|
-
return currentState;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
exports.observersReducer = observersReducer;
|
|
47
|
-
/**
|
|
48
|
-
* @hidden
|
|
49
|
-
*/
|
|
50
|
-
var reducers = {
|
|
51
|
-
configurationItem: function (currentState, action) {
|
|
52
|
-
var _a;
|
|
53
|
-
return Object.assign(currentState, (_a = {},
|
|
54
|
-
_a[action.mapKey] = action.payload,
|
|
55
|
-
_a));
|
|
56
|
-
},
|
|
57
|
-
collectionConfigurationItem: function (currentState, action) {
|
|
58
|
-
var _a;
|
|
59
|
-
var inCollection = false;
|
|
60
|
-
var _b = action.mapCollectionIdxKey.split('_'), collectionName = _b[0], collectionIdx = _b[1];
|
|
61
|
-
var collection = currentState[collectionName].map(function (item, index) {
|
|
62
|
-
if (parseInt(collectionIdx, 10) === index) {
|
|
63
|
-
inCollection = true;
|
|
64
|
-
return action.payload;
|
|
65
|
-
}
|
|
66
|
-
return item;
|
|
67
|
-
});
|
|
68
|
-
if (inCollection === false) {
|
|
69
|
-
collection.splice(parseInt(collectionIdx, 10), 0, action.payload);
|
|
70
|
-
}
|
|
71
|
-
return Object.assign(currentState, (_a = {},
|
|
72
|
-
_a[collectionName] = collection,
|
|
73
|
-
_a));
|
|
74
|
-
},
|
|
75
|
-
themeItem: function (currentState, action) {
|
|
76
|
-
var store = {};
|
|
77
|
-
var nextStore = Object.assign(store, currentState);
|
|
78
|
-
var _a = action.payload, field = _a.field, value = _a.value;
|
|
79
|
-
var parts = field.split('.');
|
|
80
|
-
var key = parts.shift();
|
|
81
|
-
while (parts.length > 0) {
|
|
82
|
-
store = store[key] = store[key] || {};
|
|
83
|
-
key = parts.shift();
|
|
84
|
-
}
|
|
85
|
-
store[key] = value;
|
|
86
|
-
return nextStore;
|
|
87
|
-
}
|
|
88
|
-
};
|
package/dist/npm/store/store.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
var createStore = function (reducer) {
|
|
8
|
-
var state;
|
|
9
|
-
var listeners = [];
|
|
10
|
-
var getState = function () { return state; };
|
|
11
|
-
var dispatch = function (action) {
|
|
12
|
-
state = reducer(state, action);
|
|
13
|
-
if (kendo_react_common_1.canUseDOM) {
|
|
14
|
-
listeners.forEach(function (l) { return l(); });
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
var subscribe = function (listener) {
|
|
18
|
-
listeners.push(listener);
|
|
19
|
-
return function () { return listeners = listeners.filter(function (l) { return l !== listener; }); };
|
|
20
|
-
};
|
|
21
|
-
dispatch({});
|
|
22
|
-
return { getState: getState, dispatch: dispatch, subscribe: subscribe };
|
|
23
|
-
};
|
|
24
|
-
exports.default = createStore;
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
29
|
-
var t = {};
|
|
30
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
31
|
-
t[p] = s[p];
|
|
32
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
33
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
-
t[p[i]] = s[p[i]];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.MapTooltip = void 0;
|
|
41
|
-
var React = require("react");
|
|
42
|
-
var kendo_charts_1 = require("@progress/kendo-charts");
|
|
43
|
-
var Popup_1 = require("./Popup");
|
|
44
|
-
var MapContext_1 = require("../MapContext");
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
var MapTooltip = /** @class */ (function (_super) {
|
|
49
|
-
__extends(MapTooltip, _super);
|
|
50
|
-
function MapTooltip() {
|
|
51
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
52
|
-
_this.context = null;
|
|
53
|
-
_this.state = {
|
|
54
|
-
popupShown: false
|
|
55
|
-
};
|
|
56
|
-
return _this;
|
|
57
|
-
}
|
|
58
|
-
MapTooltip.prototype.componentDidMount = function () {
|
|
59
|
-
this.mapObserver = new kendo_charts_1.InstanceObserver(this, {
|
|
60
|
-
showTooltip: 'onShowTooltip',
|
|
61
|
-
hideTooltip: 'onHideTooltip'
|
|
62
|
-
});
|
|
63
|
-
this.context.observersStore.dispatch({
|
|
64
|
-
type: 'add',
|
|
65
|
-
payload: this.mapObserver
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
MapTooltip.prototype.render = function () {
|
|
69
|
-
var _a = this.state, popupContext = _a.popupContext, shared = _a.shared, className = _a.className, tooltipProps = __rest(_a, ["popupContext", "shared", "className"]);
|
|
70
|
-
if (!popupContext || !this.state.popupShown) {
|
|
71
|
-
// Popup closed.
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
var layerIndex = popupContext.layerIndex;
|
|
75
|
-
var render = this.findRenderFunctionByLayer(layerIndex);
|
|
76
|
-
if (!render) {
|
|
77
|
-
// No renderer set for layer tooltip.
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
var tooltipContent = function () { return (React.createElement("div", { className: "k-tooltip-content" }, render(popupContext))); };
|
|
81
|
-
var popupContainerClassName = "k-map-".concat(popupContext.type, "-tooltip");
|
|
82
|
-
return (React.createElement(Popup_1.TooltipPopup, __assign({}, tooltipProps, { popupContent: tooltipContent, className: popupContainerClassName })));
|
|
83
|
-
};
|
|
84
|
-
MapTooltip.prototype.componentWillUnmount = function () {
|
|
85
|
-
this.context.observersStore.dispatch({
|
|
86
|
-
type: 'remove',
|
|
87
|
-
payload: this.mapObserver
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
MapTooltip.prototype.onShowTooltip = function (e) {
|
|
91
|
-
var anchor = e.anchor, className = e.className;
|
|
92
|
-
var context = this.createTooltipContext(e);
|
|
93
|
-
this.setState({
|
|
94
|
-
popupShown: true,
|
|
95
|
-
popupAlign: { vertical: 'bottom', horizontal: 'center' },
|
|
96
|
-
popupOffset: anchor,
|
|
97
|
-
popupContext: context,
|
|
98
|
-
popupStyles: { position: 'relative' },
|
|
99
|
-
className: className
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
MapTooltip.prototype.onHideTooltip = function () {
|
|
103
|
-
this.setState({
|
|
104
|
-
popupShown: false,
|
|
105
|
-
popupStyles: {},
|
|
106
|
-
className: undefined
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
MapTooltip.prototype.createTooltipContext = function (e) {
|
|
110
|
-
return e;
|
|
111
|
-
};
|
|
112
|
-
MapTooltip.prototype.findRenderFunctionByLayer = function (layerIndex) {
|
|
113
|
-
var layers = this.context.optionsStore.getState().layers;
|
|
114
|
-
if (layers !== undefined
|
|
115
|
-
&& Array.isArray(layers)
|
|
116
|
-
&& layers[layerIndex] !== undefined
|
|
117
|
-
&& layers[layerIndex].hasOwnProperty('tooltip')
|
|
118
|
-
&& layers[layerIndex].tooltip.hasOwnProperty('render')) {
|
|
119
|
-
return layers[layerIndex].tooltip.render;
|
|
120
|
-
}
|
|
121
|
-
return null;
|
|
122
|
-
};
|
|
123
|
-
MapTooltip.contextType = MapContext_1.MapContext;
|
|
124
|
-
return MapTooltip;
|
|
125
|
-
}(React.Component));
|
|
126
|
-
exports.MapTooltip = MapTooltip;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { InstanceObserver } from '@progress/kendo-charts';
|
|
3
|
-
import { DomEvent } from './../events/dom-event';
|
|
4
|
-
import { Align, Offset } from '@progress/kendo-react-popup';
|
|
5
|
-
import { MapContext } from '../MapContext';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export interface TooltipPopupProps {
|
|
10
|
-
className?: string | undefined;
|
|
11
|
-
popupShown: boolean;
|
|
12
|
-
popupAlign?: Align;
|
|
13
|
-
popupOffset?: Offset;
|
|
14
|
-
popupStyles?: any;
|
|
15
|
-
popupContent: Function;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export declare class TooltipPopup extends React.Component<TooltipPopupProps, {}> {
|
|
21
|
-
static contextType: React.Context<import("../MapContext").MapContextType | null>;
|
|
22
|
-
context: React.ContextType<typeof MapContext>;
|
|
23
|
-
mapObserver: InstanceObserver;
|
|
24
|
-
element: HTMLDivElement | null;
|
|
25
|
-
constructor(props: TooltipPopupProps, context: any);
|
|
26
|
-
render(): JSX.Element;
|
|
27
|
-
componentWillUnmount(): void;
|
|
28
|
-
onMapMouseLeave: (e: DomEvent<React.MouseEvent<HTMLDivElement>>) => boolean;
|
|
29
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
18
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
19
|
-
if (ar || !(i in from)) {
|
|
20
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
21
|
-
ar[i] = from[i];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.TooltipPopup = void 0;
|
|
28
|
-
var React = require("react");
|
|
29
|
-
var kendo_charts_1 = require("@progress/kendo-charts");
|
|
30
|
-
var main_1 = require("../utils/main");
|
|
31
|
-
var kendo_react_popup_1 = require("@progress/kendo-react-popup");
|
|
32
|
-
var MapContext_1 = require("../MapContext");
|
|
33
|
-
var COLLISION = { horizontal: 'fit', vertical: 'fit' };
|
|
34
|
-
var TOOLTIP_CLASSES = ['k-tooltip', 'k-map-tooltip'];
|
|
35
|
-
var POPUP_WRAPPER_CLASS = 'k-tooltip-wrapper';
|
|
36
|
-
/**
|
|
37
|
-
* @hidden
|
|
38
|
-
*/
|
|
39
|
-
var TooltipPopup = /** @class */ (function (_super) {
|
|
40
|
-
__extends(TooltipPopup, _super);
|
|
41
|
-
function TooltipPopup(props, context) {
|
|
42
|
-
var _this = _super.call(this, props, context) || this;
|
|
43
|
-
_this.context = null;
|
|
44
|
-
_this.element = null;
|
|
45
|
-
_this.onMapMouseLeave = function (e) {
|
|
46
|
-
var syntheticEvent = e.syntheticEvent;
|
|
47
|
-
if ((0, main_1.hasParent)(syntheticEvent.relatedTarget, _this.element)) {
|
|
48
|
-
/* prevent default behavior so that the tooltip won't be hidden */
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
return false;
|
|
52
|
-
};
|
|
53
|
-
_this.mapObserver = new kendo_charts_1.InstanceObserver(_this, {
|
|
54
|
-
onMouseLeave: 'onMapMouseLeave'
|
|
55
|
-
});
|
|
56
|
-
context.observersStore.dispatch({
|
|
57
|
-
type: 'add',
|
|
58
|
-
payload: _this.mapObserver
|
|
59
|
-
});
|
|
60
|
-
return _this;
|
|
61
|
-
}
|
|
62
|
-
TooltipPopup.prototype.render = function () {
|
|
63
|
-
var _this = this;
|
|
64
|
-
var _a = this.props, popupShown = _a.popupShown, popupAlign = _a.popupAlign, popupOffset = _a.popupOffset, popupStyles = _a.popupStyles, popupContent = _a.popupContent, className = _a.className;
|
|
65
|
-
var wrapperClass = __spreadArray(__spreadArray([], TOOLTIP_CLASSES, true), [className], false).join(' ').trim();
|
|
66
|
-
var popupComponent = (React.createElement(kendo_react_popup_1.Popup, { animate: true, popupAlign: popupAlign, offset: popupOffset, show: popupShown, collision: COLLISION, className: POPUP_WRAPPER_CLASS },
|
|
67
|
-
React.createElement("div", { className: wrapperClass, style: popupStyles, ref: function (el) { return _this.element = el; } }, popupContent())));
|
|
68
|
-
return popupComponent;
|
|
69
|
-
};
|
|
70
|
-
TooltipPopup.prototype.componentWillUnmount = function () {
|
|
71
|
-
this.context.observersStore.dispatch({
|
|
72
|
-
type: 'remove',
|
|
73
|
-
payload: this.mapObserver
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
TooltipPopup.contextType = MapContext_1.MapContext;
|
|
77
|
-
return TooltipPopup;
|
|
78
|
-
}(React.Component));
|
|
79
|
-
exports.TooltipPopup = TooltipPopup;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Location } from '../main';
|
|
2
|
-
/**
|
|
3
|
-
* Context object for shape layer tooltips.
|
|
4
|
-
*/
|
|
5
|
-
export interface ShapeTooltipContext {
|
|
6
|
-
/**
|
|
7
|
-
* The original GeoJSON data item used to create the shape.
|
|
8
|
-
*/
|
|
9
|
-
dataItem: any;
|
|
10
|
-
/**
|
|
11
|
-
* The index of the shape layer in the map.
|
|
12
|
-
*/
|
|
13
|
-
layerIndex: number;
|
|
14
|
-
/**
|
|
15
|
-
* The location (center point) of the shape.
|
|
16
|
-
*/
|
|
17
|
-
location: Location;
|
|
18
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { MapTooltip } from './MapTooltip';
|
|
2
|
-
import { MarkerTooltipContext } from './MarkerTooltipContext';
|
|
3
|
-
import { BubbleTooltipContext } from './BubbleTooltipContext';
|
|
4
|
-
import { ShapeTooltipContext } from './ShapeTooltipContext';
|
|
5
|
-
export { BubbleTooltipContext, MarkerTooltipContext, MapTooltip, ShapeTooltipContext };
|
package/dist/npm/tooltip/main.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MapTooltip = void 0;
|
|
4
|
-
var MapTooltip_1 = require("./MapTooltip");
|
|
5
|
-
Object.defineProperty(exports, "MapTooltip", { enumerable: true, get: function () { return MapTooltip_1.MapTooltip; } });
|
package/dist/npm/utils/main.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
declare function hasParent(element: any, parent: any): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
declare function validateChildren<P>(props: P, propName: string, componentName: string, childType: React.FunctionComponent): Error | null;
|
|
10
|
-
export { hasParent, validateChildren };
|
package/dist/npm/utils/main.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateChildren = exports.hasParent = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
function hasParent(element, parent) {
|
|
8
|
-
var current = element;
|
|
9
|
-
while (current && current !== parent) {
|
|
10
|
-
current = current.parentNode;
|
|
11
|
-
}
|
|
12
|
-
return current ? true : false;
|
|
13
|
-
}
|
|
14
|
-
exports.hasParent = hasParent;
|
|
15
|
-
/**
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
function validateChildren(props, propName, componentName, childType) {
|
|
19
|
-
var prop = props[propName];
|
|
20
|
-
if (prop) {
|
|
21
|
-
if (Array.isArray(prop)) {
|
|
22
|
-
for (var _i = 0, prop_1 = prop; _i < prop_1.length; _i++) {
|
|
23
|
-
var value = prop_1[_i];
|
|
24
|
-
if (!value.type || value.type !== childType) {
|
|
25
|
-
return new Error("".concat(componentName, " children should be Array of type ").concat(childType.displayName, "."));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
exports.validateChildren = validateChildren;
|