@progress/kendo-react-map 9.4.0-develop.2 → 9.4.0-develop.21
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/Map.js +1 -1
- package/Map.mjs +0 -1
- package/MapContext.js +1 -1
- package/MapContext.mjs +0 -1
- package/NOTICE.txt +40 -51
- package/components/BubbleLayer.js +1 -1
- package/components/BubbleLayer.mjs +2 -3
- package/components/BubbleLayerTooltip.js +1 -1
- package/components/BubbleLayerTooltip.mjs +0 -1
- package/components/Layers.js +1 -1
- package/components/Layers.mjs +2 -3
- package/components/MarkerLayer.js +1 -1
- package/components/MarkerLayer.mjs +0 -1
- package/components/MarkerLayerTooltip.js +1 -1
- package/components/MarkerLayerTooltip.mjs +0 -1
- package/components/ShapeLayer.js +1 -1
- package/components/ShapeLayer.mjs +2 -3
- package/components/ShapeLayerTooltip.js +1 -1
- package/components/ShapeLayerTooltip.mjs +0 -1
- package/components/TileLayer.js +1 -1
- package/components/TileLayer.mjs +0 -1
- package/components/base/CollectionConfigurationComponent.js +1 -1
- package/components/base/CollectionConfigurationComponent.mjs +0 -1
- package/components/base/ConfigurationComponent.js +1 -1
- package/components/base/ConfigurationComponent.mjs +0 -1
- package/dist/cdn/js/kendo-react-map.js +8 -1
- package/events/base-event.js +1 -1
- package/events/base-event.mjs +2 -3
- package/events/before-reset-event.js +1 -1
- package/events/before-reset-event.mjs +1 -2
- package/events/dom-event.js +1 -1
- package/events/dom-event.mjs +7 -8
- package/events/map-click-event.js +1 -1
- package/events/map-click-event.mjs +5 -6
- package/events/map-event-builder.js +1 -1
- package/events/map-event-builder.mjs +12 -13
- package/events/marker-activate-event.js +1 -1
- package/events/marker-activate-event.mjs +4 -5
- package/events/marker-click-event.js +1 -1
- package/events/marker-click-event.mjs +2 -3
- package/events/marker-created-event.js +1 -1
- package/events/marker-created-event.mjs +2 -3
- package/events/pan-end-event.js +1 -1
- package/events/pan-end-event.mjs +3 -4
- package/events/pan-event.js +1 -1
- package/events/pan-event.mjs +3 -4
- package/events/preventable-event.js +1 -1
- package/events/preventable-event.mjs +0 -1
- package/events/reset-event.js +1 -1
- package/events/reset-event.mjs +2 -3
- package/events/shape-click-event.js +1 -1
- package/events/shape-click-event.mjs +2 -3
- package/events/shape-created-event.js +1 -1
- package/events/shape-created-event.mjs +3 -4
- package/events/shape-feature-created-event.js +1 -1
- package/events/shape-feature-created-event.mjs +0 -1
- package/events/shape-mouse-enter-event.js +1 -1
- package/events/shape-mouse-enter-event.mjs +2 -3
- package/events/shape-mouse-leave-event.js +1 -1
- package/events/shape-mouse-leave-event.mjs +0 -1
- package/events/zoom-end-event.js +1 -1
- package/events/zoom-end-event.mjs +2 -3
- package/events/zoom-start-event.js +1 -1
- package/events/zoom-start-event.mjs +2 -3
- package/index.js +2 -1
- package/index.mjs +8 -8
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +5 -5
- package/store/reducer.js +1 -1
- package/store/reducer.mjs +3 -4
- package/store/store.js +1 -1
- package/store/store.mjs +7 -8
- package/tooltip/MapTooltip.js +1 -1
- package/tooltip/MapTooltip.mjs +10 -11
- package/tooltip/Popup.js +1 -1
- package/tooltip/Popup.mjs +8 -9
- package/utils/index.js +1 -1
- package/utils/index.mjs +0 -1
package/store/store.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";const i=require("@progress/kendo-react-common"),u=o=>{let s,t=[];const n=()=>s,c=e=>{s=o(s,e),i.canUseDOM&&t.forEach(r=>r())},a=e=>(t.push(e),()=>t=t.filter(r=>r!==e));return c({}),{getState:n,dispatch:c,subscribe:a}};module.exports=u;
|
package/store/store.mjs
CHANGED
|
@@ -5,15 +5,14 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, n = (e) => (t.push(e), () => t = t.filter((r) => r !== e));
|
|
8
|
+
import { canUseDOM as f } from "@progress/kendo-react-common";
|
|
9
|
+
const u = (o) => {
|
|
10
|
+
let r, t = [];
|
|
11
|
+
const a = () => r, c = (e) => {
|
|
12
|
+
r = o(r, e), f && t.forEach((s) => s());
|
|
13
|
+
}, n = (e) => (t.push(e), () => t = t.filter((s) => s !== e));
|
|
15
14
|
return c({}), { getState: a, dispatch: c, subscribe: n };
|
|
16
15
|
};
|
|
17
16
|
export {
|
|
18
|
-
|
|
17
|
+
u as default
|
|
19
18
|
};
|
package/tooltip/MapTooltip.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react"),d=require("@progress/kendo-charts"),m=require("./Popup.js"),y=require("../MapContext.js");function f(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const s=f(h),i=class i extends s.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1}}componentDidMount(){this.mapObserver=new d.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.mapObserver})}render(){const{popupContext:t,shared:e,className:n,...r}=this.state;if(!t||!this.state.popupShown)return null;const c=t.layerIndex,a=this.findRenderFunctionByLayer(c);if(!a)return null;const l=()=>s.createElement("div",{className:"k-tooltip-content"},a(t)),u=`k-map-${t.type}-tooltip`;return s.createElement(m.TooltipPopup,{...r,popupContent:l,className:u})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.mapObserver})}onShowTooltip(t){const{anchor:e,className:n}=t,r=this.createTooltipContext(t);this.setState({popupShown:!0,popupAlign:{vertical:"bottom",horizontal:"center"},popupOffset:e,popupContext:r,popupStyles:{position:"relative"},className:n})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createTooltipContext(t){return t}findRenderFunctionByLayer(t){const e=this.context.optionsStore.getState().layers;return e!==void 0&&Array.isArray(e)&&e[t]!==void 0&&e[t].hasOwnProperty("tooltip")&&e[t].tooltip.hasOwnProperty("render")?e[t].tooltip.render:null}};i.contextType=y.MapContext;let p=i;exports.MapTooltip=p;
|
package/tooltip/MapTooltip.mjs
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as n from "react";
|
|
10
|
-
import { InstanceObserver as
|
|
11
|
-
import { TooltipPopup as
|
|
9
|
+
import { InstanceObserver as h } from "@progress/kendo-charts";
|
|
10
|
+
import { TooltipPopup as u } from "./Popup.mjs";
|
|
12
11
|
import { MapContext as m } from "../MapContext.mjs";
|
|
13
12
|
const p = class p extends n.Component {
|
|
14
13
|
constructor() {
|
|
@@ -17,7 +16,7 @@ const p = class p extends n.Component {
|
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
18
|
componentDidMount() {
|
|
20
|
-
this.mapObserver = new
|
|
19
|
+
this.mapObserver = new h(this, {
|
|
21
20
|
showTooltip: "onShowTooltip",
|
|
22
21
|
hideTooltip: "onHideTooltip"
|
|
23
22
|
}), this.context.observersStore.dispatch({
|
|
@@ -26,14 +25,14 @@ const p = class p extends n.Component {
|
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
27
|
render() {
|
|
29
|
-
const { popupContext: t, shared: o, className:
|
|
28
|
+
const { popupContext: t, shared: o, className: r, ...e } = this.state;
|
|
30
29
|
if (!t || !this.state.popupShown)
|
|
31
30
|
return null;
|
|
32
|
-
const a = t.layerIndex,
|
|
33
|
-
if (!
|
|
31
|
+
const a = t.layerIndex, s = this.findRenderFunctionByLayer(a);
|
|
32
|
+
if (!s)
|
|
34
33
|
return null;
|
|
35
|
-
const l = () => /* @__PURE__ */ n.createElement("div", { className: "k-tooltip-content" },
|
|
36
|
-
return /* @__PURE__ */ n.createElement(
|
|
34
|
+
const l = () => /* @__PURE__ */ n.createElement("div", { className: "k-tooltip-content" }, s(t)), c = `k-map-${t.type}-tooltip`;
|
|
35
|
+
return /* @__PURE__ */ n.createElement(u, { ...e, popupContent: l, className: c });
|
|
37
36
|
}
|
|
38
37
|
componentWillUnmount() {
|
|
39
38
|
this.context.observersStore.dispatch({
|
|
@@ -42,14 +41,14 @@ const p = class p extends n.Component {
|
|
|
42
41
|
});
|
|
43
42
|
}
|
|
44
43
|
onShowTooltip(t) {
|
|
45
|
-
const { anchor: o, className:
|
|
44
|
+
const { anchor: o, className: r } = t, e = this.createTooltipContext(t);
|
|
46
45
|
this.setState({
|
|
47
46
|
popupShown: !0,
|
|
48
47
|
popupAlign: { vertical: "bottom", horizontal: "center" },
|
|
49
48
|
popupOffset: o,
|
|
50
49
|
popupContext: e,
|
|
51
50
|
popupStyles: { position: "relative" },
|
|
52
|
-
className:
|
|
51
|
+
className: r
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
onHideTooltip() {
|
package/tooltip/Popup.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),d=require("@progress/kendo-charts"),h=require("../utils/index.js"),f=require("@progress/kendo-react-popup"),O=require("../MapContext.js");function v(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const s=v(m),b={horizontal:"fit",vertical:"fit"},S=["k-tooltip","k-map-tooltip"],y="k-tooltip-wrapper",p=class p extends s.Component{constructor(t,e){super(t,e),this.context=null,this.element=null,this.onMapMouseLeave=o=>{const{syntheticEvent:r}=o;return!!h.hasParent(r.relatedTarget,this.element)},this.mapObserver=new d.InstanceObserver(this,{onMouseLeave:"onMapMouseLeave"}),e.observersStore.dispatch({type:"add",payload:this.mapObserver})}render(){const{popupShown:t,popupAlign:e,popupOffset:o,popupStyles:r,popupContent:c,className:i}=this.props,l=[...S,i].join(" ").trim();return s.createElement(f.Popup,{animate:!0,popupAlign:e,offset:o,show:t,collision:b,className:y},s.createElement("div",{className:l,style:r,ref:u=>this.element=u},c()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.mapObserver})}};p.contextType=O.MapContext;let a=p;exports.TooltipPopup=a;
|
package/tooltip/Popup.mjs
CHANGED
|
@@ -5,17 +5,16 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as r from "react";
|
|
10
9
|
import { InstanceObserver as c } from "@progress/kendo-charts";
|
|
11
|
-
import { hasParent as
|
|
12
|
-
import { Popup as
|
|
10
|
+
import { hasParent as h } from "../utils/index.mjs";
|
|
11
|
+
import { Popup as u } from "@progress/kendo-react-popup";
|
|
13
12
|
import { MapContext as f } from "../MapContext.mjs";
|
|
14
|
-
const v = { horizontal: "fit", vertical: "fit" }, d = ["k-tooltip", "k-map-tooltip"], O = "k-tooltip-wrapper",
|
|
13
|
+
const v = { horizontal: "fit", vertical: "fit" }, d = ["k-tooltip", "k-map-tooltip"], O = "k-tooltip-wrapper", p = class p extends r.Component {
|
|
15
14
|
constructor(t, e) {
|
|
16
15
|
super(t, e), this.context = null, this.element = null, this.onMapMouseLeave = (o) => {
|
|
17
16
|
const { syntheticEvent: s } = o;
|
|
18
|
-
return !!
|
|
17
|
+
return !!h(s.relatedTarget, this.element);
|
|
19
18
|
}, this.mapObserver = new c(this, {
|
|
20
19
|
onMouseLeave: "onMapMouseLeave"
|
|
21
20
|
}), e.observersStore.dispatch({
|
|
@@ -26,7 +25,7 @@ const v = { horizontal: "fit", vertical: "fit" }, d = ["k-tooltip", "k-map-toolt
|
|
|
26
25
|
render() {
|
|
27
26
|
const { popupShown: t, popupAlign: e, popupOffset: o, popupStyles: s, popupContent: a, className: i } = this.props, m = [...d, i].join(" ").trim();
|
|
28
27
|
return /* @__PURE__ */ r.createElement(
|
|
29
|
-
|
|
28
|
+
u,
|
|
30
29
|
{
|
|
31
30
|
animate: !0,
|
|
32
31
|
popupAlign: e,
|
|
@@ -45,8 +44,8 @@ const v = { horizontal: "fit", vertical: "fit" }, d = ["k-tooltip", "k-map-toolt
|
|
|
45
44
|
});
|
|
46
45
|
}
|
|
47
46
|
};
|
|
48
|
-
|
|
49
|
-
let
|
|
47
|
+
p.contextType = f;
|
|
48
|
+
let n = p;
|
|
50
49
|
export {
|
|
51
|
-
|
|
50
|
+
n as TooltipPopup
|
|
52
51
|
};
|
package/utils/index.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function l(r,t){let e=r;for(;e&&e!==t;)e=e.parentNode;return!!e}function o(r,t,e,a){const n=r[t];if(n&&Array.isArray(n)){for(const i of n)if(!i.type||i.type!==a)return new Error(`${e} children should be Array of type ${a.displayName}.`)}return null}exports.hasParent=l;exports.validateChildren=o;
|
package/utils/index.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
function i(e, t) {
|
|
10
9
|
let r = e;
|
|
11
10
|
for (; r && r !== t; )
|