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