@progress/kendo-react-map 12.0.2-develop.1 → 12.0.2-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/dist/cdn/js/kendo-react-map.js +1 -1
- package/index.d.mts +61 -37
- package/index.d.ts +61 -37
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +4 -4
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-react-common"),require("prop-types"),require("@progress/kendo-charts"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-react-common","prop-types","@progress/kendo-charts","@progress/kendo-react-popup","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactMap={},e.React,e.KendoReactCommon,e.PropTypes,e.KendoCharts,e.KendoReactPopup,e.KendoSvgIcons)}(this,(function(e,t,n,r,o,s,a){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var p=i(t);const c=p.createContext(null);c.displayName="MapContext";const l=class extends p.Component{get optionsStore(){var e;return null==(e=this.context)?void 0:e.optionsStore}renderChildren(e,t){const{children:n}=e.props,{_mapKey:r,_parentStore:o}=this.props,s={...e.props,_mapCollectionIdxKey:`${r}_${t}`,_parentStore:o};return p.cloneElement(e,s,n)}render(){const{_mapKey:e,_parentStore:t,children:n}=this.props;return(t||this.optionsStore).dispatch({mapKey:e,payload:[]}),p.Children.map(n,((e,t)=>p.isValidElement(e)?this.renderChildren(e,t):e))}};l.contextType=c;let h=l;const u=e=>{let t,r=[];const o=o=>{t=e(t,o),n.canUseDOM&&r.forEach((e=>e()))};return o({}),{getState:()=>t,dispatch:o,subscribe:e=>(r.push(e),()=>r=r.filter((t=>t!==e)))}},d=(e,t)=>t.mapCollectionIdxKey?v.collectionConfigurationItem(e,t):t.mapKey?v.configurationItem(e,t):{},m=(e,t)=>{if(!t.type)return[];switch(t.type){case"add":return[...e,t.payload];case"remove":return e.filter((e=>e!==t.payload));default:return e}},v={configurationItem:(e,t)=>Object.assign(e,{[t.mapKey]:t.payload}),collectionConfigurationItem(e,t){let n=!1;const[r,o]=t.mapCollectionIdxKey.split("_"),s=e[r].map(((e,r)=>parseInt(o,10)===r?(n=!0,t.payload):e));return!1===n&&s.splice(parseInt(o,10),0,t.payload),Object.assign(e,{[r]:s})},themeItem(e,t){let n={};const r=Object.assign(n,e),{field:o,value:s}=t.payload,a=o.split(".");let i=a.shift();for(;a.length>0;)n=n[i]=n[i]||{},i=a.shift();return n[i]=s,r}},y=class extends p.Component{get optionsStore(){var e;return null==(e=this.context)?void 0:e.optionsStore}constructor(e){super(e),this.childStore=u(d)}render(){const{children:e}=this.props;return void 0!==e?p.Children.map(e,(e=>p.isValidElement(e)?this.renderChildren(e):e)):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_mapKey:e,_mapCollectionIdxKey:t,_parentStore:n,children:r,...o}=this.props;(n||this.optionsStore).dispatch({mapKey:e,mapCollectionIdxKey:t,payload:Object.assign({},o,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,n={...e.props,_parentStore:this.childStore};return p.cloneElement(e,n,t)}};y.contextType=c;let g=y,f=class{constructor(e){this.target=e}},I=class extends f{constructor(e,t){super(t)}},b=class extends f{constructor(e,t){super(t),this.location=e.location,this.originalEvent=e.originalEvent}},E=class extends f{constructor(e,t){super(t),this.marker=e.marker,this.layer=e.layer}},S=class extends f{constructor(e,t){super(t),this.marker=e.marker,this.layer=e.layer}},M=class extends f{constructor(){super(...arguments),this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}},k=class extends M{constructor(e,t){super(t),this.marker=e.marker,this.layer=e.layer}},x=class extends f{constructor(e,t){super(t),this.origin=e.origin,this.center=e.center,this.originalEvent=e.originalEvent}},C=class extends f{constructor(e,t){super(t),this.origin=e.origin,this.center=e.center,this.originalEvent=e.originalEvent}},T=class extends f{constructor(e,t){super(t)}},O=class extends f{constructor(e,t){super(t),this.layer=e.layer,this.shape=e.shape,this.originalEvent=e.originalEvent}},w=class extends f{constructor(e,t){super(t),this.layer=e.layer,this.shape=e.shape,this.location=null,e.shape&&(this.dataItem=e.shape.dataItem,this.location=e.shape.location)}},L=class extends f{constructor(e,t){super(t),this.dataItem=e.dataItem,this.layer=e.layer,this.group=e.group,this.properties=e.properties}},A=class extends f{constructor(e,t){super(t),this.layer=e.layer,this.shape=e.shape,this.originalEvent=e.originalEvent}},K=class extends f{constructor(e,t){super(t),this.layer=e.layer,this.shape=e.shape,this.originalEvent=e.originalEvent}},D=class extends f{constructor(e,t){super(t),this.originalEvent=e.originalEvent}},N=class extends M{constructor(e,t){super(t),this.originalEvent=e.originalEvent}};const _={beforeReset:I,mapClick:b,markerActivate:E,markerClick:S,markerCreated:k,panEnd:x,pan:C,reset:T,shapeClick:O,shapeCreated:w,shapeFeatureCreated:L,shapeMouseEnter:A,shapeMouseLeave:K,zoomEnd:D,zoomStart:N};function P(e,t,n,r){const o=e[t];if(o&&Array.isArray(o))for(const e of o)if(!e.type||e.type!==r)return new Error(`${n} children should be Array of type ${r.displayName}.`);return null}const R={horizontal:"fit",vertical:"fit"},U=["k-tooltip","k-map-tooltip"],j=class extends p.Component{constructor(e){super(e),this.context=null,this.element=null,this.onMapMouseLeave=e=>{const{syntheticEvent:t}=e;return!!function(e,t){let n=e;for(;n&&n!==t;)n=n.parentNode;return!!n}(t.relatedTarget,this.element)},this.mapObserver=new o.InstanceObserver(this,{onMouseLeave:"onMapMouseLeave"})}componentDidMount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"add",payload:this.mapObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:n,popupStyles:r,popupContent:o,className:a}=this.props,i=[...U,a].join(" ").trim();return p.createElement(s.Popup,{animate:!0,popupAlign:t,offset:n,show:e,collision:R,className:"k-tooltip-wrapper"},p.createElement("div",{className:i,style:r,ref:e=>{this.element=e}},o()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.mapObserver})}};j.contextType=c;let z=j;const V=class extends p.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1}}componentDidMount(){this.mapObserver=new o.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.mapObserver})}render(){const{popupContext:e,shared:t,className:n,...r}=this.state;if(!e||!this.state.popupShown)return null;const o=e.layerIndex,s=this.findRenderFunctionByLayer(o);if(!s)return null;const a=`k-map-${e.type}-tooltip`;return p.createElement(z,{...r,popupContent:()=>p.createElement("div",{className:"k-tooltip-content"},s(e)),className:a})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.mapObserver})}onShowTooltip(e){const{anchor:t,className:n}=e,r=this.createTooltipContext(e);this.setState({popupShown:!0,popupAlign:{vertical:"bottom",horizontal:"center"},popupOffset:t,popupContext:r,popupStyles:{position:"relative"},className:n})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createTooltipContext(e){return e}findRenderFunctionByLayer(e){const t=this.context.optionsStore.getState().layers;return void 0!==t&&Array.isArray(t)&&void 0!==t[e]&&t[e].hasOwnProperty("tooltip")&&t[e].tooltip.hasOwnProperty("render")?t[e].tooltip.render:null}};V.contextType=c;let q=V;const W=Object.freeze({name:"@progress/kendo-react-map",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1651750998,version:"12.0.2-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"});let B=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};const F={mapMarkerTargetIcon:a.mapMarkerTargetIcon,mapMarkerIcon:a.mapMarkerIcon,plusIcon:a.plusIcon,minusIcon:a.minusIcon,caretAltUpIcon:a.caretAltUpIcon,caretAltDownIcon:a.caretAltDownIcon,caretAltLeftIcon:a.caretAltLeftIcon,caretAltRightIcon:a.caretAltRightIcon},Z=class extends p.Component{constructor(e){super(e),this.mapInstance=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.observersStore={},this.showLicenseWatermark=!1,this.iconsType="svg",this.svgIcons=F,this.onInit=e=>{this.mapInstance=e.sender},this.onRender=e=>{null!==this.mapInstance&&this.trigger("render",e)},this.onMapMouseLeave=e=>{const t=function(e,t){return new B(e,t)}(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.mapInstance&&this.mapInstance.hideTooltip()},this.showLicenseWatermark=!n.validatePackage(W,{component:"Map"}),this.licenseMessage=n.getLicenseMessage(W),this.optionsStore=u(d),this.observersStore=u(m),this.childrenObserver=new o.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.contextValue={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver},this.mapObserver=new o.InstanceObserver(this,{init:"onInit"})}get element(){return this._element}componentDidMount(){this.instantiateCoreMap(),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this))}componentWillUnmount(){this.optionsUnsubscriber(),null!==this.mapInstance&&(this.mapInstance.destroy(),this.mapInstance=null)}componentDidUpdate(e){const{dir:t,children:n,...r}=this.props;null!==this.mapInstance&&(Object.entries(e).filter((e=>"dir"!==e[0]&&"children"!==e[0])).some((e=>{const[t,n]=e;return!(r.hasOwnProperty(t)&&r[t]===n)}))&&this.refresh(),e.dir)}render(){const{style:e={},className:t,children:r}=this.props,o=Object.assign({},e,{position:"relative"}),s=p.createElement("div",{className:t,style:o,key:"mapElement"},p.createElement("div",{ref:e=>{this._element=e},className:"k-map",onMouseLeave:this.onMapMouseLeave},r));return p.createElement(p.Fragment,null,p.createElement(n.IconsContext.Consumer,null,(e=>p.createElement(c.Provider,{value:this.contextValue},p.createElement(q,{key:"tooltip"}),s,this.setIcons(e)))),this.showLicenseWatermark&&p.createElement(n.WatermarkOverlay,{message:this.licenseMessage}))}getMapOptions(){const{center:e,controls:t,minZoom:n,maxZoom:r,minSize:o,pannable:s,wraparound:a,zoom:i,zoomable:p}=this.props;let c={center:e,controls:t,minZoom:n,maxZoom:r,minSize:o,pannable:s,wraparound:a,zoom:i,zoomable:p,icons:{type:this.iconsType,svgIcons:this.svgIcons}};return c=Object.assign(c,this.optionsStore.getState()),c}get layers(){var e;return null==(e=this.mapInstance)?void 0:e.layers}get extent(){var e;return null==(e=this.mapInstance)?void 0:e.extent()}set extent(e){var t;null==(t=this.mapInstance)||t.extent(e)}resize(){}viewSize(){var e;return null==(e=this.mapInstance)?void 0:e.viewSize()}eventOffset(e){var t;return null==(t=this.mapInstance)?void 0:t.eventOffset(e)}eventToLayer(e){var t;return null==(t=this.mapInstance)?void 0:t.eventToLayer(e)}eventToLocation(e){var t;return null==(t=this.mapInstance)?void 0:t.eventToLocation(e)}eventToView(e){var t;return null==(t=this.mapInstance)?void 0:t.eventToView(e)}layerToLocation(e,t){var n;return null==(n=this.mapInstance)?void 0:n.layerToLocation(e,t)}locationToLayer(e,t){var n;return null==(n=this.mapInstance)?void 0:n.locationToLayer(e,t)}locationToView(e){var t;return null==(t=this.mapInstance)?void 0:t.locationToView(e)}viewToLocation(e,t){var n;return null==(n=this.mapInstance)?void 0:n.viewToLocation(e,t)}loadMarkers(e){const t=this.mapInstance.markers;t&&t._load(e)}refresh(){if(null!==this.mapInstance){const e=this.getMapOptions();this.props.onRefresh?this.props.onRefresh.call(void 0,e,this.mapInstance):this.mapInstance.setOptions(e)}}instantiateCoreMap(){const e=this.getMapOptions();this.mapInstance=new o.Map(this.element,e,{},{observer:this.mapObserver,sender:this})}trigger(e,t){const n="click"===e?"mapClick":e,r=function(e,t,n){if(_[e])return new _[e](t,n)}(n,t,this),o="on"+n.charAt(0).toUpperCase()+n.slice(1),s=this.observersStore.getState();let a=!1;for(let e=0;e<s.length;e++)s[e].trigger(n,t)&&(a=!0);return!1===a&&r&&this.props.hasOwnProperty(o)?(this.props[o].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):a}requiresHandlers(e){for(let t=0;t<e.length;t++){const n=e[t],r="on"+n.charAt(0).toUpperCase()+n.slice(1);if(this.props.hasOwnProperty(r))return!0}return!1}triggerDomEvent(e,t){const n=this.observersStore.getState();let r=!1;for(let o=0;o<n.length;o++)n[o].trigger(e,t)&&(r=!0);return r}setIcons(e){const{type:t,icons:n={}}=e,r={...F},o={mapMarkerTargetIcon:n.mapMarkerTargetIcon,mapMarkerIcon:n.mapMarkerIcon,plusIcon:n.plusIcon,minusIcon:n.minusIcon,caretAltUpIcon:n.caretAltUpIcon,caretAltDownIcon:n.caretAltDownIcon,caretAltLeftIcon:n.caretAltLeftIcon,caretAltRightIcon:n.caretAltRightIcon};let s;for(s in o)if(o[s]){const e=o[s];e&&"string"!=typeof e&&(r[s]=e)}return this.svgIcons=r,this.iconsType=t||"svg",null}};Z.propTypes={dir:r.string},Z.defaultProps={};let $=Z;const H=e=>p.createElement(h,{...e,_mapKey:"layers"});H.propTypes={children:r.node};const G=e=>p.createElement(g,{...e,_mapKey:"tooltip"}),J=e=>p.createElement(g,{type:"shape",...e});J.displayName="MapShapeLayer",J.propTypes={children:function(e,t,n){return P(e,t,n,G)}};const Q=e=>p.createElement(g,{type:"tile",...e});Q.displayName="MapTileLayer";const X=e=>p.createElement(g,{...e,_mapKey:"tooltip"}),Y=e=>p.createElement(g,{type:"bubble",...e});Y.displayName="MapBubbleLayer",Y.propTypes={children:function(e,t,n){return P(e,t,n,X)}};const ee=e=>p.createElement(g,{...e,_mapKey:"tooltip"}),te=e=>p.createElement(g,{type:"marker",...e});te.displayName="MapMarkerLayer",te.propTypes={children:function(e,t,n){return P(e,t,n,ee)}},Object.defineProperty(e,"Extent",{enumerable:!0,get:function(){return o.Extent}}),Object.defineProperty(e,"Location",{enumerable:!0,get:function(){return o.Location}}),e.BeforeResetEvent=I,e.CollectionConfigurationComponent=h,e.ConfigurationComponent=g,e.Map=$,e.MapBubbleLayer=Y,e.MapBubbleLayerTooltip=X,e.MapClickEvent=b,e.MapLayers=H,e.MapMarkerLayer=te,e.MapMarkerLayerTooltip=ee,e.MapShapeLayer=J,e.MapShapeLayerTooltip=G,e.MapTileLayer=Q,e.MapTooltip=q,e.MarkerActivateEvent=E,e.MarkerClickEvent=S,e.MarkerCreatedEvent=k,e.PanEndEvent=x,e.PanEvent=C,e.ResetEvent=T,e.ShapeClickEvent=O,e.ShapeCreatedEvent=w,e.ShapeFeatureCreatedEvent=L,e.ShapeMouseEnterEvent=A,e.ShapeMouseLeaveEvent=K,e.ZoomEndEvent=D,e.ZoomStartEvent=N}));
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-react-common"),require("prop-types"),require("@progress/kendo-charts"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-react-common","prop-types","@progress/kendo-charts","@progress/kendo-react-popup","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactMap={},e.React,e.KendoReactCommon,e.PropTypes,e.KendoCharts,e.KendoReactPopup,e.KendoSvgIcons)}(this,(function(e,t,n,r,o,s,a){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var p=i(t);const c=p.createContext(null);c.displayName="MapContext";const l=class extends p.Component{get optionsStore(){var e;return null==(e=this.context)?void 0:e.optionsStore}renderChildren(e,t){const{children:n}=e.props,{_mapKey:r,_parentStore:o}=this.props,s={...e.props,_mapCollectionIdxKey:`${r}_${t}`,_parentStore:o};return p.cloneElement(e,s,n)}render(){const{_mapKey:e,_parentStore:t,children:n}=this.props;return(t||this.optionsStore).dispatch({mapKey:e,payload:[]}),p.Children.map(n,((e,t)=>p.isValidElement(e)?this.renderChildren(e,t):e))}};l.contextType=c;let h=l;const u=e=>{let t,r=[];const o=o=>{t=e(t,o),n.canUseDOM&&r.forEach((e=>e()))};return o({}),{getState:()=>t,dispatch:o,subscribe:e=>(r.push(e),()=>r=r.filter((t=>t!==e)))}},d=(e,t)=>t.mapCollectionIdxKey?v.collectionConfigurationItem(e,t):t.mapKey?v.configurationItem(e,t):{},m=(e,t)=>{if(!t.type)return[];switch(t.type){case"add":return[...e,t.payload];case"remove":return e.filter((e=>e!==t.payload));default:return e}},v={configurationItem:(e,t)=>Object.assign(e,{[t.mapKey]:t.payload}),collectionConfigurationItem(e,t){let n=!1;const[r,o]=t.mapCollectionIdxKey.split("_"),s=e[r].map(((e,r)=>parseInt(o,10)===r?(n=!0,t.payload):e));return!1===n&&s.splice(parseInt(o,10),0,t.payload),Object.assign(e,{[r]:s})},themeItem(e,t){let n={};const r=Object.assign(n,e),{field:o,value:s}=t.payload,a=o.split(".");let i=a.shift();for(;a.length>0;)n=n[i]=n[i]||{},i=a.shift();return n[i]=s,r}},y=class extends p.Component{get optionsStore(){var e;return null==(e=this.context)?void 0:e.optionsStore}constructor(e){super(e),this.childStore=u(d)}render(){const{children:e}=this.props;return void 0!==e?p.Children.map(e,(e=>p.isValidElement(e)?this.renderChildren(e):e)):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_mapKey:e,_mapCollectionIdxKey:t,_parentStore:n,children:r,...o}=this.props;(n||this.optionsStore).dispatch({mapKey:e,mapCollectionIdxKey:t,payload:Object.assign({},o,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,n={...e.props,_parentStore:this.childStore};return p.cloneElement(e,n,t)}};y.contextType=c;let g=y,f=class{constructor(e){this.target=e}},I=class extends f{constructor(e,t){super(t)}},b=class extends f{constructor(e,t){super(t),this.location=e.location,this.originalEvent=e.originalEvent}},E=class extends f{constructor(e,t){super(t),this.marker=e.marker,this.layer=e.layer}},S=class extends f{constructor(e,t){super(t),this.marker=e.marker,this.layer=e.layer}},M=class extends f{constructor(){super(...arguments),this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}},k=class extends M{constructor(e,t){super(t),this.marker=e.marker,this.layer=e.layer}},x=class extends f{constructor(e,t){super(t),this.origin=e.origin,this.center=e.center,this.originalEvent=e.originalEvent}},C=class extends f{constructor(e,t){super(t),this.origin=e.origin,this.center=e.center,this.originalEvent=e.originalEvent}},T=class extends f{constructor(e,t){super(t)}},O=class extends f{constructor(e,t){super(t),this.layer=e.layer,this.shape=e.shape,this.originalEvent=e.originalEvent}},w=class extends f{constructor(e,t){super(t),this.layer=e.layer,this.shape=e.shape,this.location=null,e.shape&&(this.dataItem=e.shape.dataItem,this.location=e.shape.location)}},L=class extends f{constructor(e,t){super(t),this.dataItem=e.dataItem,this.layer=e.layer,this.group=e.group,this.properties=e.properties}},A=class extends f{constructor(e,t){super(t),this.layer=e.layer,this.shape=e.shape,this.originalEvent=e.originalEvent}},K=class extends f{constructor(e,t){super(t),this.layer=e.layer,this.shape=e.shape,this.originalEvent=e.originalEvent}},D=class extends f{constructor(e,t){super(t),this.originalEvent=e.originalEvent}},N=class extends M{constructor(e,t){super(t),this.originalEvent=e.originalEvent}};const _={beforeReset:I,mapClick:b,markerActivate:E,markerClick:S,markerCreated:k,panEnd:x,pan:C,reset:T,shapeClick:O,shapeCreated:w,shapeFeatureCreated:L,shapeMouseEnter:A,shapeMouseLeave:K,zoomEnd:D,zoomStart:N};function P(e,t,n,r){const o=e[t];if(o&&Array.isArray(o))for(const e of o)if(!e.type||e.type!==r)return new Error(`${n} children should be Array of type ${r.displayName}.`);return null}const R={horizontal:"fit",vertical:"fit"},U=["k-tooltip","k-map-tooltip"],j=class extends p.Component{constructor(e){super(e),this.context=null,this.element=null,this.onMapMouseLeave=e=>{const{syntheticEvent:t}=e;return!!function(e,t){let n=e;for(;n&&n!==t;)n=n.parentNode;return!!n}(t.relatedTarget,this.element)},this.mapObserver=new o.InstanceObserver(this,{onMouseLeave:"onMapMouseLeave"})}componentDidMount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"add",payload:this.mapObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:n,popupStyles:r,popupContent:o,className:a}=this.props,i=[...U,a].join(" ").trim();return p.createElement(s.Popup,{animate:!0,popupAlign:t,offset:n,show:e,collision:R,className:"k-tooltip-wrapper"},p.createElement("div",{className:i,style:r,ref:e=>{this.element=e}},o()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.mapObserver})}};j.contextType=c;let z=j;const V=class extends p.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1}}componentDidMount(){this.mapObserver=new o.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.mapObserver})}render(){const{popupContext:e,shared:t,className:n,...r}=this.state;if(!e||!this.state.popupShown)return null;const o=e.layerIndex,s=this.findRenderFunctionByLayer(o);if(!s)return null;const a=`k-map-${e.type}-tooltip`;return p.createElement(z,{...r,popupContent:()=>p.createElement("div",{className:"k-tooltip-content"},s(e)),className:a})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.mapObserver})}onShowTooltip(e){const{anchor:t,className:n}=e,r=this.createTooltipContext(e);this.setState({popupShown:!0,popupAlign:{vertical:"bottom",horizontal:"center"},popupOffset:t,popupContext:r,popupStyles:{position:"relative"},className:n})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createTooltipContext(e){return e}findRenderFunctionByLayer(e){const t=this.context.optionsStore.getState().layers;return void 0!==t&&Array.isArray(t)&&void 0!==t[e]&&t[e].hasOwnProperty("tooltip")&&t[e].tooltip.hasOwnProperty("render")?t[e].tooltip.render:null}};V.contextType=c;let q=V;const W=Object.freeze({name:"@progress/kendo-react-map",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1651750998,version:"12.0.2-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"});let B=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};const F={mapMarkerTargetIcon:a.mapMarkerTargetIcon,mapMarkerIcon:a.mapMarkerIcon,plusIcon:a.plusIcon,minusIcon:a.minusIcon,caretAltUpIcon:a.caretAltUpIcon,caretAltDownIcon:a.caretAltDownIcon,caretAltLeftIcon:a.caretAltLeftIcon,caretAltRightIcon:a.caretAltRightIcon},Z=class extends p.Component{constructor(e){super(e),this.mapInstance=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.observersStore={},this.showLicenseWatermark=!1,this.iconsType="svg",this.svgIcons=F,this.onInit=e=>{this.mapInstance=e.sender},this.onRender=e=>{null!==this.mapInstance&&this.trigger("render",e)},this.onMapMouseLeave=e=>{const t=function(e,t){return new B(e,t)}(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.mapInstance&&this.mapInstance.hideTooltip()},this.showLicenseWatermark=!n.validatePackage(W,{component:"Map"}),this.licenseMessage=n.getLicenseMessage(W),this.optionsStore=u(d),this.observersStore=u(m),this.childrenObserver=new o.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.contextValue={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver},this.mapObserver=new o.InstanceObserver(this,{init:"onInit"})}get element(){return this._element}componentDidMount(){this.instantiateCoreMap(),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this))}componentWillUnmount(){this.optionsUnsubscriber(),null!==this.mapInstance&&(this.mapInstance.destroy(),this.mapInstance=null)}componentDidUpdate(e){const{dir:t,children:n,...r}=this.props;null!==this.mapInstance&&(Object.entries(e).filter((e=>"dir"!==e[0]&&"children"!==e[0])).some((e=>{const[t,n]=e;return!(r.hasOwnProperty(t)&&r[t]===n)}))&&this.refresh(),e.dir)}render(){const{style:e={},className:t,children:r}=this.props,o=Object.assign({},e,{position:"relative"}),s=p.createElement("div",{className:t,style:o,key:"mapElement"},p.createElement("div",{ref:e=>{this._element=e},className:"k-map",onMouseLeave:this.onMapMouseLeave},r));return p.createElement(p.Fragment,null,p.createElement(n.IconsContext.Consumer,null,(e=>p.createElement(c.Provider,{value:this.contextValue},p.createElement(q,{key:"tooltip"}),s,this.setIcons(e)))),this.showLicenseWatermark&&p.createElement(n.WatermarkOverlay,{message:this.licenseMessage}))}getMapOptions(){const{center:e,controls:t,minZoom:n,maxZoom:r,minSize:o,pannable:s,wraparound:a,zoom:i,zoomable:p}=this.props;let c={center:e,controls:t,minZoom:n,maxZoom:r,minSize:o,pannable:s,wraparound:a,zoom:i,zoomable:p,icons:{type:this.iconsType,svgIcons:this.svgIcons}};return c=Object.assign(c,this.optionsStore.getState()),c}get layers(){var e;return null==(e=this.mapInstance)?void 0:e.layers}get extent(){var e;return null==(e=this.mapInstance)?void 0:e.extent()}set extent(e){var t;null==(t=this.mapInstance)||t.extent(e)}resize(){}viewSize(){var e;return null==(e=this.mapInstance)?void 0:e.viewSize()}eventOffset(e){var t;return null==(t=this.mapInstance)?void 0:t.eventOffset(e)}eventToLayer(e){var t;return null==(t=this.mapInstance)?void 0:t.eventToLayer(e)}eventToLocation(e){var t;return null==(t=this.mapInstance)?void 0:t.eventToLocation(e)}eventToView(e){var t;return null==(t=this.mapInstance)?void 0:t.eventToView(e)}layerToLocation(e,t){var n;return null==(n=this.mapInstance)?void 0:n.layerToLocation(e,t)}locationToLayer(e,t){var n;return null==(n=this.mapInstance)?void 0:n.locationToLayer(e,t)}locationToView(e){var t;return null==(t=this.mapInstance)?void 0:t.locationToView(e)}viewToLocation(e,t){var n;return null==(n=this.mapInstance)?void 0:n.viewToLocation(e,t)}loadMarkers(e){const t=this.mapInstance.markers;t&&t._load(e)}refresh(){if(null!==this.mapInstance){const e=this.getMapOptions();this.props.onRefresh?this.props.onRefresh.call(void 0,e,this.mapInstance):this.mapInstance.setOptions(e)}}instantiateCoreMap(){const e=this.getMapOptions();this.mapInstance=new o.Map(this.element,e,{},{observer:this.mapObserver,sender:this})}trigger(e,t){const n="click"===e?"mapClick":e,r=function(e,t,n){if(_[e])return new _[e](t,n)}(n,t,this),o="on"+n.charAt(0).toUpperCase()+n.slice(1),s=this.observersStore.getState();let a=!1;for(let e=0;e<s.length;e++)s[e].trigger(n,t)&&(a=!0);return!1===a&&r&&this.props.hasOwnProperty(o)?(this.props[o].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):a}requiresHandlers(e){for(let t=0;t<e.length;t++){const n=e[t],r="on"+n.charAt(0).toUpperCase()+n.slice(1);if(this.props.hasOwnProperty(r))return!0}return!1}triggerDomEvent(e,t){const n=this.observersStore.getState();let r=!1;for(let o=0;o<n.length;o++)n[o].trigger(e,t)&&(r=!0);return r}setIcons(e){const{type:t,icons:n={}}=e,r={...F},o={mapMarkerTargetIcon:n.mapMarkerTargetIcon,mapMarkerIcon:n.mapMarkerIcon,plusIcon:n.plusIcon,minusIcon:n.minusIcon,caretAltUpIcon:n.caretAltUpIcon,caretAltDownIcon:n.caretAltDownIcon,caretAltLeftIcon:n.caretAltLeftIcon,caretAltRightIcon:n.caretAltRightIcon};let s;for(s in o)if(o[s]){const e=o[s];e&&"string"!=typeof e&&(r[s]=e)}return this.svgIcons=r,this.iconsType=t||"svg",null}};Z.propTypes={dir:r.string},Z.defaultProps={};let $=Z;const H=e=>p.createElement(h,{...e,_mapKey:"layers"});H.propTypes={children:r.node};const G=e=>p.createElement(g,{...e,_mapKey:"tooltip"}),J=e=>p.createElement(g,{type:"shape",...e});J.displayName="MapShapeLayer",J.propTypes={children:function(e,t,n){return P(e,t,n,G)}};const Q=e=>p.createElement(g,{type:"tile",...e});Q.displayName="MapTileLayer";const X=e=>p.createElement(g,{...e,_mapKey:"tooltip"}),Y=e=>p.createElement(g,{type:"bubble",...e});Y.displayName="MapBubbleLayer",Y.propTypes={children:function(e,t,n){return P(e,t,n,X)}};const ee=e=>p.createElement(g,{...e,_mapKey:"tooltip"}),te=e=>p.createElement(g,{type:"marker",...e});te.displayName="MapMarkerLayer",te.propTypes={children:function(e,t,n){return P(e,t,n,ee)}},Object.defineProperty(e,"Extent",{enumerable:!0,get:function(){return o.Extent}}),Object.defineProperty(e,"Location",{enumerable:!0,get:function(){return o.Location}}),e.BeforeResetEvent=I,e.CollectionConfigurationComponent=h,e.ConfigurationComponent=g,e.Map=$,e.MapBubbleLayer=Y,e.MapBubbleLayerTooltip=X,e.MapClickEvent=b,e.MapLayers=H,e.MapMarkerLayer=te,e.MapMarkerLayerTooltip=ee,e.MapShapeLayer=J,e.MapShapeLayerTooltip=G,e.MapTileLayer=Q,e.MapTooltip=q,e.MarkerActivateEvent=E,e.MarkerClickEvent=S,e.MarkerCreatedEvent=k,e.PanEndEvent=x,e.PanEvent=C,e.ResetEvent=T,e.ShapeClickEvent=O,e.ShapeCreatedEvent=w,e.ShapeFeatureCreatedEvent=L,e.ShapeMouseEnterEvent=A,e.ShapeMouseLeaveEvent=K,e.ZoomEndEvent=D,e.ZoomStartEvent=N}));
|
package/index.d.mts
CHANGED
|
@@ -65,7 +65,7 @@ declare abstract class BaseEvent {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Fires immediately before the map is reset. This event is typically used for cleanup by layer implementers.
|
|
69
69
|
*/
|
|
70
70
|
export declare class BeforeResetEvent extends BaseEvent implements MapBeforeResetEvent {
|
|
71
71
|
/**
|
|
@@ -367,9 +367,15 @@ export declare const MapBubbleLayer: React_2.FunctionComponent<MapBubbleLayerPro
|
|
|
367
367
|
* Represents the props of the KendoReact MapBubbleLayer component.
|
|
368
368
|
*/
|
|
369
369
|
export declare interface MapBubbleLayerProps extends BubbleLayerOptions {
|
|
370
|
+
/**
|
|
371
|
+
* The child tooltip components.
|
|
372
|
+
*/
|
|
370
373
|
children?: React_2.ReactNode;
|
|
371
374
|
}
|
|
372
375
|
|
|
376
|
+
/**
|
|
377
|
+
* Represents the KendoReact MapBubbleLayerTooltip component.
|
|
378
|
+
*/
|
|
373
379
|
export declare const MapBubbleLayerTooltip: React_2.FunctionComponent<MapBubbleLayerTooltipProps>;
|
|
374
380
|
|
|
375
381
|
/**
|
|
@@ -385,7 +391,7 @@ export declare interface MapBubbleLayerTooltipProps {
|
|
|
385
391
|
}
|
|
386
392
|
|
|
387
393
|
/**
|
|
388
|
-
*
|
|
394
|
+
* Fires when the user clicks on the map.
|
|
389
395
|
*/
|
|
390
396
|
export declare class MapClickEvent extends BaseEvent implements MapClickEvent_2 {
|
|
391
397
|
/**
|
|
@@ -436,6 +442,9 @@ export declare const MapLayers: React_2.FunctionComponent<MapLayersProps>;
|
|
|
436
442
|
* Represents the props of the KendoReact MapLayers component.
|
|
437
443
|
*/
|
|
438
444
|
export declare interface MapLayersProps {
|
|
445
|
+
/**
|
|
446
|
+
* The child layer components.
|
|
447
|
+
*/
|
|
439
448
|
children?: React_2.ReactNode;
|
|
440
449
|
}
|
|
441
450
|
|
|
@@ -453,9 +462,15 @@ export declare const MapMarkerLayer: React_2.FunctionComponent<MapMarkerLayerPro
|
|
|
453
462
|
* Represents the props of the KendoReact MapMarkerLayer component.
|
|
454
463
|
*/
|
|
455
464
|
export declare interface MapMarkerLayerProps extends MarkerLayerOptions {
|
|
465
|
+
/**
|
|
466
|
+
* The child components. Supports `MapMarkerLayerTooltip`.
|
|
467
|
+
*/
|
|
456
468
|
children?: React_2.ReactNode;
|
|
457
469
|
}
|
|
458
470
|
|
|
471
|
+
/**
|
|
472
|
+
* Represents the KendoReact MapMarkerLayerTooltip component.
|
|
473
|
+
*/
|
|
459
474
|
export declare const MapMarkerLayerTooltip: React_2.FunctionComponent<MapMarkerLayerTooltipProps>;
|
|
460
475
|
|
|
461
476
|
/**
|
|
@@ -506,29 +521,29 @@ export declare interface MapProps extends MapOptions {
|
|
|
506
521
|
*/
|
|
507
522
|
children?: any;
|
|
508
523
|
/**
|
|
509
|
-
* Fires when the Map is about to refresh.
|
|
524
|
+
* Fires when the Map is about to refresh. You can use the event to prevent the refresh of the Map in specific cases.
|
|
510
525
|
*/
|
|
511
526
|
onRefresh?: (mapOptions: any, mapInstance: any) => void;
|
|
512
527
|
/**
|
|
513
|
-
*
|
|
528
|
+
* Fires immediately before the map is reset. This event is typically used for cleanup by layer implementers.
|
|
514
529
|
*/
|
|
515
530
|
onBeforeReset?: (event: BeforeResetEvent) => void;
|
|
516
531
|
/**
|
|
517
|
-
*
|
|
532
|
+
* Fires when the user clicks on the map.
|
|
518
533
|
*/
|
|
519
534
|
onMapClick?: (event: MapClickEvent) => void;
|
|
520
535
|
/**
|
|
521
|
-
*
|
|
536
|
+
* Fires when a marker has been displayed and has a DOM element assigned.
|
|
522
537
|
*/
|
|
523
538
|
onMarkerActivate?: (event: MarkerActivateEvent) => void;
|
|
524
539
|
/**
|
|
525
|
-
*
|
|
540
|
+
* Fires when a marker has been clicked or tapped.
|
|
526
541
|
*/
|
|
527
542
|
onMarkerClick?: (event: MarkerClickEvent) => void;
|
|
528
543
|
/**
|
|
529
|
-
*
|
|
544
|
+
* Fires when a marker has been created and is about to be displayed.
|
|
530
545
|
*
|
|
531
|
-
* Cancelling the event
|
|
546
|
+
* Cancelling the event prevents the marker from being shown.
|
|
532
547
|
*/
|
|
533
548
|
onMarkerCreated?: (event: MarkerCreatedEvent) => void;
|
|
534
549
|
/**
|
|
@@ -536,49 +551,49 @@ export declare interface MapProps extends MapOptions {
|
|
|
536
551
|
*/
|
|
537
552
|
onPanEnd?: (event: PanEndEvent) => void;
|
|
538
553
|
/**
|
|
539
|
-
*
|
|
554
|
+
* Fires while the map viewport is being moved.
|
|
540
555
|
*/
|
|
541
556
|
onPan?: (event: PanEvent) => void;
|
|
542
557
|
/**
|
|
543
|
-
*
|
|
558
|
+
* Fires when the map is reset.
|
|
544
559
|
*
|
|
545
560
|
* This typically occurs on initial load and after a zoom/center change.
|
|
546
561
|
*/
|
|
547
562
|
onReset?: (event: ResetEvent) => void;
|
|
548
563
|
/**
|
|
549
|
-
*
|
|
564
|
+
* Fires when a shape is clicked or tapped.
|
|
550
565
|
*/
|
|
551
566
|
onShapeClick?: (event: ShapeClickEvent) => void;
|
|
552
567
|
/**
|
|
553
|
-
*
|
|
568
|
+
* Fires when a shape is created, but is not rendered yet.
|
|
554
569
|
*/
|
|
555
570
|
onShapeCreated?: (event: ShapeCreatedEvent) => void;
|
|
556
571
|
/**
|
|
557
|
-
*
|
|
572
|
+
* Fires when a [GeoJSON Feature](https://geojson.org/geojson-spec.html#feature-objects) is created on a shape layer.
|
|
558
573
|
*/
|
|
559
574
|
onShapeFeatureCreated?: (event: ShapeFeatureCreatedEvent) => void;
|
|
560
575
|
/**
|
|
561
|
-
*
|
|
576
|
+
* Fires when the mouse enters a shape.
|
|
562
577
|
*
|
|
563
|
-
* > This event
|
|
578
|
+
* > This event fires reliably only for shapes that have set fill color.
|
|
564
579
|
* > The opacity can still be set to 0 so the shapes appear to have no fill.
|
|
565
580
|
*/
|
|
566
581
|
onShapeMouseEnter?: (event: ShapeMouseEnterEvent) => void;
|
|
567
582
|
/**
|
|
568
|
-
*
|
|
583
|
+
* Fires when the mouse leaves a shape.
|
|
569
584
|
*
|
|
570
|
-
* > This event
|
|
585
|
+
* > This event fires reliably only for shapes that have set fill color.
|
|
571
586
|
* > The opacity can still be set to 0 so the shapes appear to have no fill.
|
|
572
587
|
*/
|
|
573
588
|
onShapeMouseLeave?: (event: ShapeMouseLeaveEvent) => void;
|
|
574
589
|
/**
|
|
575
|
-
*
|
|
590
|
+
* Fires when the map zoom level is about to change.
|
|
576
591
|
*
|
|
577
|
-
* Cancelling the event
|
|
592
|
+
* Cancelling the event prevents the user action.
|
|
578
593
|
*/
|
|
579
594
|
onZoomStart?: (event: ZoomStartEvent) => void;
|
|
580
595
|
/**
|
|
581
|
-
*
|
|
596
|
+
* Fires when the map zoom level has changed.
|
|
582
597
|
*/
|
|
583
598
|
onZoomEnd?: (event: ZoomEndEvent) => void;
|
|
584
599
|
}
|
|
@@ -595,9 +610,15 @@ export declare const MapShapeLayer: React_2.FunctionComponent<MapShapeLayerProps
|
|
|
595
610
|
* Represents the props of the KendoReact MapShapeLayer component.
|
|
596
611
|
*/
|
|
597
612
|
export declare interface MapShapeLayerProps extends ShapeLayerOptions {
|
|
613
|
+
/**
|
|
614
|
+
* The child components. Supports `MapShapeLayerTooltip`.
|
|
615
|
+
*/
|
|
598
616
|
children?: React_2.ReactNode;
|
|
599
617
|
}
|
|
600
618
|
|
|
619
|
+
/**
|
|
620
|
+
* Represents the KendoReact MapShapeLayerTooltip component.
|
|
621
|
+
*/
|
|
601
622
|
export declare const MapShapeLayerTooltip: React_2.FunctionComponent<MapShapeLayerTooltipProps>;
|
|
602
623
|
|
|
603
624
|
/**
|
|
@@ -612,6 +633,9 @@ export declare interface MapShapeLayerTooltipProps {
|
|
|
612
633
|
render?: (props: ShapeTooltipContext) => React_2.ReactNode;
|
|
613
634
|
}
|
|
614
635
|
|
|
636
|
+
/**
|
|
637
|
+
* Represents the KendoReact MapTileLayer component.
|
|
638
|
+
*/
|
|
615
639
|
export declare const MapTileLayer: React_2.FunctionComponent<MapTileLayerProps>;
|
|
616
640
|
|
|
617
641
|
/**
|
|
@@ -651,7 +675,7 @@ declare interface MapTooltipState {
|
|
|
651
675
|
}
|
|
652
676
|
|
|
653
677
|
/**
|
|
654
|
-
*
|
|
678
|
+
* Fires when a marker has been displayed and has a DOM element assigned.
|
|
655
679
|
*/
|
|
656
680
|
export declare class MarkerActivateEvent extends BaseEvent implements MapMarkerActivateEvent {
|
|
657
681
|
/**
|
|
@@ -669,7 +693,7 @@ export declare class MarkerActivateEvent extends BaseEvent implements MapMarkerA
|
|
|
669
693
|
}
|
|
670
694
|
|
|
671
695
|
/**
|
|
672
|
-
*
|
|
696
|
+
* Fires when a marker has been clicked or tapped.
|
|
673
697
|
*/
|
|
674
698
|
export declare class MarkerClickEvent extends BaseEvent implements MapMarkerClickEvent {
|
|
675
699
|
/**
|
|
@@ -687,9 +711,9 @@ export declare class MarkerClickEvent extends BaseEvent implements MapMarkerClic
|
|
|
687
711
|
}
|
|
688
712
|
|
|
689
713
|
/**
|
|
690
|
-
*
|
|
714
|
+
* Fires when a marker has been created and is about to be displayed.
|
|
691
715
|
*
|
|
692
|
-
* Cancelling the event
|
|
716
|
+
* Cancelling the event prevents the marker from being shown.
|
|
693
717
|
*/
|
|
694
718
|
export declare class MarkerCreatedEvent extends PreventableEvent implements MapMarkerCreatedEvent {
|
|
695
719
|
/**
|
|
@@ -751,7 +775,7 @@ export declare class PanEndEvent extends BaseEvent implements MapPanEndEvent {
|
|
|
751
775
|
}
|
|
752
776
|
|
|
753
777
|
/**
|
|
754
|
-
*
|
|
778
|
+
* Fires while the map viewport is being moved.
|
|
755
779
|
*/
|
|
756
780
|
export declare class PanEvent extends BaseEvent implements MapPanEvent {
|
|
757
781
|
/**
|
|
@@ -791,7 +815,7 @@ declare abstract class PreventableEvent extends BaseEvent {
|
|
|
791
815
|
}
|
|
792
816
|
|
|
793
817
|
/**
|
|
794
|
-
*
|
|
818
|
+
* Fires when the map is reset.
|
|
795
819
|
*
|
|
796
820
|
* This typically occurs on initial load and after a zoom/center change.
|
|
797
821
|
*/
|
|
@@ -803,7 +827,7 @@ export declare class ResetEvent extends BaseEvent implements MapResetEvent {
|
|
|
803
827
|
}
|
|
804
828
|
|
|
805
829
|
/**
|
|
806
|
-
*
|
|
830
|
+
* Fires when a shape is clicked or tapped.
|
|
807
831
|
*/
|
|
808
832
|
export declare class ShapeClickEvent extends BaseEvent implements MapShapeClickEvent {
|
|
809
833
|
/**
|
|
@@ -825,7 +849,7 @@ export declare class ShapeClickEvent extends BaseEvent implements MapShapeClickE
|
|
|
825
849
|
}
|
|
826
850
|
|
|
827
851
|
/**
|
|
828
|
-
*
|
|
852
|
+
* Fires when a shape is created, but is not rendered yet.
|
|
829
853
|
*/
|
|
830
854
|
export declare class ShapeCreatedEvent extends BaseEvent implements MapShapeCreatedEvent {
|
|
831
855
|
/**
|
|
@@ -851,7 +875,7 @@ export declare class ShapeCreatedEvent extends BaseEvent implements MapShapeCrea
|
|
|
851
875
|
}
|
|
852
876
|
|
|
853
877
|
/**
|
|
854
|
-
*
|
|
878
|
+
* Fires when a [GeoJSON Feature](https://geojson.org/geojson-spec.html#feature-objects) is created on a shape layer.
|
|
855
879
|
*/
|
|
856
880
|
export declare class ShapeFeatureCreatedEvent extends BaseEvent implements MapShapeFeatureCreatedEvent {
|
|
857
881
|
/**
|
|
@@ -877,9 +901,9 @@ export declare class ShapeFeatureCreatedEvent extends BaseEvent implements MapSh
|
|
|
877
901
|
}
|
|
878
902
|
|
|
879
903
|
/**
|
|
880
|
-
*
|
|
904
|
+
* Fires when the mouse enters a shape.
|
|
881
905
|
*
|
|
882
|
-
* > This event
|
|
906
|
+
* > This event fires reliably only for shapes that have set fill color.
|
|
883
907
|
* > The opacity can still be set to 0 so the shapes appear to have no fill.
|
|
884
908
|
*/
|
|
885
909
|
export declare class ShapeMouseEnterEvent extends BaseEvent implements MapShapeMouseEnterEvent {
|
|
@@ -902,9 +926,9 @@ export declare class ShapeMouseEnterEvent extends BaseEvent implements MapShapeM
|
|
|
902
926
|
}
|
|
903
927
|
|
|
904
928
|
/**
|
|
905
|
-
*
|
|
929
|
+
* Fires when the mouse leaves a shape.
|
|
906
930
|
*
|
|
907
|
-
* > This event
|
|
931
|
+
* > This event fires reliably only for shapes that have set fill color.
|
|
908
932
|
* > The opacity can still be set to 0 so the shapes appear to have no fill.
|
|
909
933
|
*/
|
|
910
934
|
export declare class ShapeMouseLeaveEvent extends BaseEvent implements MapShapeMouseLeaveEvent {
|
|
@@ -968,7 +992,7 @@ export { TileUrlTemplateArgs }
|
|
|
968
992
|
declare type TooltipContext = MarkerTooltipContext | ShapeTooltipContext | BubbleTooltipContext;
|
|
969
993
|
|
|
970
994
|
/**
|
|
971
|
-
*
|
|
995
|
+
* Fires when the map zoom level has changed.
|
|
972
996
|
*/
|
|
973
997
|
export declare class ZoomEndEvent extends BaseEvent implements MapZoomEndEvent {
|
|
974
998
|
/**
|
|
@@ -982,9 +1006,9 @@ export declare class ZoomEndEvent extends BaseEvent implements MapZoomEndEvent {
|
|
|
982
1006
|
}
|
|
983
1007
|
|
|
984
1008
|
/**
|
|
985
|
-
*
|
|
1009
|
+
* Fires when the map zoom level is about to change.
|
|
986
1010
|
*
|
|
987
|
-
* Cancelling the event
|
|
1011
|
+
* Cancelling the event prevents the user action.
|
|
988
1012
|
*/
|
|
989
1013
|
export declare class ZoomStartEvent extends PreventableEvent implements MapZoomStartEvent {
|
|
990
1014
|
/**
|
package/index.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ declare abstract class BaseEvent {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Fires immediately before the map is reset. This event is typically used for cleanup by layer implementers.
|
|
69
69
|
*/
|
|
70
70
|
export declare class BeforeResetEvent extends BaseEvent implements MapBeforeResetEvent {
|
|
71
71
|
/**
|
|
@@ -367,9 +367,15 @@ export declare const MapBubbleLayer: React_2.FunctionComponent<MapBubbleLayerPro
|
|
|
367
367
|
* Represents the props of the KendoReact MapBubbleLayer component.
|
|
368
368
|
*/
|
|
369
369
|
export declare interface MapBubbleLayerProps extends BubbleLayerOptions {
|
|
370
|
+
/**
|
|
371
|
+
* The child tooltip components.
|
|
372
|
+
*/
|
|
370
373
|
children?: React_2.ReactNode;
|
|
371
374
|
}
|
|
372
375
|
|
|
376
|
+
/**
|
|
377
|
+
* Represents the KendoReact MapBubbleLayerTooltip component.
|
|
378
|
+
*/
|
|
373
379
|
export declare const MapBubbleLayerTooltip: React_2.FunctionComponent<MapBubbleLayerTooltipProps>;
|
|
374
380
|
|
|
375
381
|
/**
|
|
@@ -385,7 +391,7 @@ export declare interface MapBubbleLayerTooltipProps {
|
|
|
385
391
|
}
|
|
386
392
|
|
|
387
393
|
/**
|
|
388
|
-
*
|
|
394
|
+
* Fires when the user clicks on the map.
|
|
389
395
|
*/
|
|
390
396
|
export declare class MapClickEvent extends BaseEvent implements MapClickEvent_2 {
|
|
391
397
|
/**
|
|
@@ -436,6 +442,9 @@ export declare const MapLayers: React_2.FunctionComponent<MapLayersProps>;
|
|
|
436
442
|
* Represents the props of the KendoReact MapLayers component.
|
|
437
443
|
*/
|
|
438
444
|
export declare interface MapLayersProps {
|
|
445
|
+
/**
|
|
446
|
+
* The child layer components.
|
|
447
|
+
*/
|
|
439
448
|
children?: React_2.ReactNode;
|
|
440
449
|
}
|
|
441
450
|
|
|
@@ -453,9 +462,15 @@ export declare const MapMarkerLayer: React_2.FunctionComponent<MapMarkerLayerPro
|
|
|
453
462
|
* Represents the props of the KendoReact MapMarkerLayer component.
|
|
454
463
|
*/
|
|
455
464
|
export declare interface MapMarkerLayerProps extends MarkerLayerOptions {
|
|
465
|
+
/**
|
|
466
|
+
* The child components. Supports `MapMarkerLayerTooltip`.
|
|
467
|
+
*/
|
|
456
468
|
children?: React_2.ReactNode;
|
|
457
469
|
}
|
|
458
470
|
|
|
471
|
+
/**
|
|
472
|
+
* Represents the KendoReact MapMarkerLayerTooltip component.
|
|
473
|
+
*/
|
|
459
474
|
export declare const MapMarkerLayerTooltip: React_2.FunctionComponent<MapMarkerLayerTooltipProps>;
|
|
460
475
|
|
|
461
476
|
/**
|
|
@@ -506,29 +521,29 @@ export declare interface MapProps extends MapOptions {
|
|
|
506
521
|
*/
|
|
507
522
|
children?: any;
|
|
508
523
|
/**
|
|
509
|
-
* Fires when the Map is about to refresh.
|
|
524
|
+
* Fires when the Map is about to refresh. You can use the event to prevent the refresh of the Map in specific cases.
|
|
510
525
|
*/
|
|
511
526
|
onRefresh?: (mapOptions: any, mapInstance: any) => void;
|
|
512
527
|
/**
|
|
513
|
-
*
|
|
528
|
+
* Fires immediately before the map is reset. This event is typically used for cleanup by layer implementers.
|
|
514
529
|
*/
|
|
515
530
|
onBeforeReset?: (event: BeforeResetEvent) => void;
|
|
516
531
|
/**
|
|
517
|
-
*
|
|
532
|
+
* Fires when the user clicks on the map.
|
|
518
533
|
*/
|
|
519
534
|
onMapClick?: (event: MapClickEvent) => void;
|
|
520
535
|
/**
|
|
521
|
-
*
|
|
536
|
+
* Fires when a marker has been displayed and has a DOM element assigned.
|
|
522
537
|
*/
|
|
523
538
|
onMarkerActivate?: (event: MarkerActivateEvent) => void;
|
|
524
539
|
/**
|
|
525
|
-
*
|
|
540
|
+
* Fires when a marker has been clicked or tapped.
|
|
526
541
|
*/
|
|
527
542
|
onMarkerClick?: (event: MarkerClickEvent) => void;
|
|
528
543
|
/**
|
|
529
|
-
*
|
|
544
|
+
* Fires when a marker has been created and is about to be displayed.
|
|
530
545
|
*
|
|
531
|
-
* Cancelling the event
|
|
546
|
+
* Cancelling the event prevents the marker from being shown.
|
|
532
547
|
*/
|
|
533
548
|
onMarkerCreated?: (event: MarkerCreatedEvent) => void;
|
|
534
549
|
/**
|
|
@@ -536,49 +551,49 @@ export declare interface MapProps extends MapOptions {
|
|
|
536
551
|
*/
|
|
537
552
|
onPanEnd?: (event: PanEndEvent) => void;
|
|
538
553
|
/**
|
|
539
|
-
*
|
|
554
|
+
* Fires while the map viewport is being moved.
|
|
540
555
|
*/
|
|
541
556
|
onPan?: (event: PanEvent) => void;
|
|
542
557
|
/**
|
|
543
|
-
*
|
|
558
|
+
* Fires when the map is reset.
|
|
544
559
|
*
|
|
545
560
|
* This typically occurs on initial load and after a zoom/center change.
|
|
546
561
|
*/
|
|
547
562
|
onReset?: (event: ResetEvent) => void;
|
|
548
563
|
/**
|
|
549
|
-
*
|
|
564
|
+
* Fires when a shape is clicked or tapped.
|
|
550
565
|
*/
|
|
551
566
|
onShapeClick?: (event: ShapeClickEvent) => void;
|
|
552
567
|
/**
|
|
553
|
-
*
|
|
568
|
+
* Fires when a shape is created, but is not rendered yet.
|
|
554
569
|
*/
|
|
555
570
|
onShapeCreated?: (event: ShapeCreatedEvent) => void;
|
|
556
571
|
/**
|
|
557
|
-
*
|
|
572
|
+
* Fires when a [GeoJSON Feature](https://geojson.org/geojson-spec.html#feature-objects) is created on a shape layer.
|
|
558
573
|
*/
|
|
559
574
|
onShapeFeatureCreated?: (event: ShapeFeatureCreatedEvent) => void;
|
|
560
575
|
/**
|
|
561
|
-
*
|
|
576
|
+
* Fires when the mouse enters a shape.
|
|
562
577
|
*
|
|
563
|
-
* > This event
|
|
578
|
+
* > This event fires reliably only for shapes that have set fill color.
|
|
564
579
|
* > The opacity can still be set to 0 so the shapes appear to have no fill.
|
|
565
580
|
*/
|
|
566
581
|
onShapeMouseEnter?: (event: ShapeMouseEnterEvent) => void;
|
|
567
582
|
/**
|
|
568
|
-
*
|
|
583
|
+
* Fires when the mouse leaves a shape.
|
|
569
584
|
*
|
|
570
|
-
* > This event
|
|
585
|
+
* > This event fires reliably only for shapes that have set fill color.
|
|
571
586
|
* > The opacity can still be set to 0 so the shapes appear to have no fill.
|
|
572
587
|
*/
|
|
573
588
|
onShapeMouseLeave?: (event: ShapeMouseLeaveEvent) => void;
|
|
574
589
|
/**
|
|
575
|
-
*
|
|
590
|
+
* Fires when the map zoom level is about to change.
|
|
576
591
|
*
|
|
577
|
-
* Cancelling the event
|
|
592
|
+
* Cancelling the event prevents the user action.
|
|
578
593
|
*/
|
|
579
594
|
onZoomStart?: (event: ZoomStartEvent) => void;
|
|
580
595
|
/**
|
|
581
|
-
*
|
|
596
|
+
* Fires when the map zoom level has changed.
|
|
582
597
|
*/
|
|
583
598
|
onZoomEnd?: (event: ZoomEndEvent) => void;
|
|
584
599
|
}
|
|
@@ -595,9 +610,15 @@ export declare const MapShapeLayer: React_2.FunctionComponent<MapShapeLayerProps
|
|
|
595
610
|
* Represents the props of the KendoReact MapShapeLayer component.
|
|
596
611
|
*/
|
|
597
612
|
export declare interface MapShapeLayerProps extends ShapeLayerOptions {
|
|
613
|
+
/**
|
|
614
|
+
* The child components. Supports `MapShapeLayerTooltip`.
|
|
615
|
+
*/
|
|
598
616
|
children?: React_2.ReactNode;
|
|
599
617
|
}
|
|
600
618
|
|
|
619
|
+
/**
|
|
620
|
+
* Represents the KendoReact MapShapeLayerTooltip component.
|
|
621
|
+
*/
|
|
601
622
|
export declare const MapShapeLayerTooltip: React_2.FunctionComponent<MapShapeLayerTooltipProps>;
|
|
602
623
|
|
|
603
624
|
/**
|
|
@@ -612,6 +633,9 @@ export declare interface MapShapeLayerTooltipProps {
|
|
|
612
633
|
render?: (props: ShapeTooltipContext) => React_2.ReactNode;
|
|
613
634
|
}
|
|
614
635
|
|
|
636
|
+
/**
|
|
637
|
+
* Represents the KendoReact MapTileLayer component.
|
|
638
|
+
*/
|
|
615
639
|
export declare const MapTileLayer: React_2.FunctionComponent<MapTileLayerProps>;
|
|
616
640
|
|
|
617
641
|
/**
|
|
@@ -651,7 +675,7 @@ declare interface MapTooltipState {
|
|
|
651
675
|
}
|
|
652
676
|
|
|
653
677
|
/**
|
|
654
|
-
*
|
|
678
|
+
* Fires when a marker has been displayed and has a DOM element assigned.
|
|
655
679
|
*/
|
|
656
680
|
export declare class MarkerActivateEvent extends BaseEvent implements MapMarkerActivateEvent {
|
|
657
681
|
/**
|
|
@@ -669,7 +693,7 @@ export declare class MarkerActivateEvent extends BaseEvent implements MapMarkerA
|
|
|
669
693
|
}
|
|
670
694
|
|
|
671
695
|
/**
|
|
672
|
-
*
|
|
696
|
+
* Fires when a marker has been clicked or tapped.
|
|
673
697
|
*/
|
|
674
698
|
export declare class MarkerClickEvent extends BaseEvent implements MapMarkerClickEvent {
|
|
675
699
|
/**
|
|
@@ -687,9 +711,9 @@ export declare class MarkerClickEvent extends BaseEvent implements MapMarkerClic
|
|
|
687
711
|
}
|
|
688
712
|
|
|
689
713
|
/**
|
|
690
|
-
*
|
|
714
|
+
* Fires when a marker has been created and is about to be displayed.
|
|
691
715
|
*
|
|
692
|
-
* Cancelling the event
|
|
716
|
+
* Cancelling the event prevents the marker from being shown.
|
|
693
717
|
*/
|
|
694
718
|
export declare class MarkerCreatedEvent extends PreventableEvent implements MapMarkerCreatedEvent {
|
|
695
719
|
/**
|
|
@@ -751,7 +775,7 @@ export declare class PanEndEvent extends BaseEvent implements MapPanEndEvent {
|
|
|
751
775
|
}
|
|
752
776
|
|
|
753
777
|
/**
|
|
754
|
-
*
|
|
778
|
+
* Fires while the map viewport is being moved.
|
|
755
779
|
*/
|
|
756
780
|
export declare class PanEvent extends BaseEvent implements MapPanEvent {
|
|
757
781
|
/**
|
|
@@ -791,7 +815,7 @@ declare abstract class PreventableEvent extends BaseEvent {
|
|
|
791
815
|
}
|
|
792
816
|
|
|
793
817
|
/**
|
|
794
|
-
*
|
|
818
|
+
* Fires when the map is reset.
|
|
795
819
|
*
|
|
796
820
|
* This typically occurs on initial load and after a zoom/center change.
|
|
797
821
|
*/
|
|
@@ -803,7 +827,7 @@ export declare class ResetEvent extends BaseEvent implements MapResetEvent {
|
|
|
803
827
|
}
|
|
804
828
|
|
|
805
829
|
/**
|
|
806
|
-
*
|
|
830
|
+
* Fires when a shape is clicked or tapped.
|
|
807
831
|
*/
|
|
808
832
|
export declare class ShapeClickEvent extends BaseEvent implements MapShapeClickEvent {
|
|
809
833
|
/**
|
|
@@ -825,7 +849,7 @@ export declare class ShapeClickEvent extends BaseEvent implements MapShapeClickE
|
|
|
825
849
|
}
|
|
826
850
|
|
|
827
851
|
/**
|
|
828
|
-
*
|
|
852
|
+
* Fires when a shape is created, but is not rendered yet.
|
|
829
853
|
*/
|
|
830
854
|
export declare class ShapeCreatedEvent extends BaseEvent implements MapShapeCreatedEvent {
|
|
831
855
|
/**
|
|
@@ -851,7 +875,7 @@ export declare class ShapeCreatedEvent extends BaseEvent implements MapShapeCrea
|
|
|
851
875
|
}
|
|
852
876
|
|
|
853
877
|
/**
|
|
854
|
-
*
|
|
878
|
+
* Fires when a [GeoJSON Feature](https://geojson.org/geojson-spec.html#feature-objects) is created on a shape layer.
|
|
855
879
|
*/
|
|
856
880
|
export declare class ShapeFeatureCreatedEvent extends BaseEvent implements MapShapeFeatureCreatedEvent {
|
|
857
881
|
/**
|
|
@@ -877,9 +901,9 @@ export declare class ShapeFeatureCreatedEvent extends BaseEvent implements MapSh
|
|
|
877
901
|
}
|
|
878
902
|
|
|
879
903
|
/**
|
|
880
|
-
*
|
|
904
|
+
* Fires when the mouse enters a shape.
|
|
881
905
|
*
|
|
882
|
-
* > This event
|
|
906
|
+
* > This event fires reliably only for shapes that have set fill color.
|
|
883
907
|
* > The opacity can still be set to 0 so the shapes appear to have no fill.
|
|
884
908
|
*/
|
|
885
909
|
export declare class ShapeMouseEnterEvent extends BaseEvent implements MapShapeMouseEnterEvent {
|
|
@@ -902,9 +926,9 @@ export declare class ShapeMouseEnterEvent extends BaseEvent implements MapShapeM
|
|
|
902
926
|
}
|
|
903
927
|
|
|
904
928
|
/**
|
|
905
|
-
*
|
|
929
|
+
* Fires when the mouse leaves a shape.
|
|
906
930
|
*
|
|
907
|
-
* > This event
|
|
931
|
+
* > This event fires reliably only for shapes that have set fill color.
|
|
908
932
|
* > The opacity can still be set to 0 so the shapes appear to have no fill.
|
|
909
933
|
*/
|
|
910
934
|
export declare class ShapeMouseLeaveEvent extends BaseEvent implements MapShapeMouseLeaveEvent {
|
|
@@ -968,7 +992,7 @@ export { TileUrlTemplateArgs }
|
|
|
968
992
|
declare type TooltipContext = MarkerTooltipContext | ShapeTooltipContext | BubbleTooltipContext;
|
|
969
993
|
|
|
970
994
|
/**
|
|
971
|
-
*
|
|
995
|
+
* Fires when the map zoom level has changed.
|
|
972
996
|
*/
|
|
973
997
|
export declare class ZoomEndEvent extends BaseEvent implements MapZoomEndEvent {
|
|
974
998
|
/**
|
|
@@ -982,9 +1006,9 @@ export declare class ZoomEndEvent extends BaseEvent implements MapZoomEndEvent {
|
|
|
982
1006
|
}
|
|
983
1007
|
|
|
984
1008
|
/**
|
|
985
|
-
*
|
|
1009
|
+
* Fires when the map zoom level is about to change.
|
|
986
1010
|
*
|
|
987
|
-
* Cancelling the event
|
|
1011
|
+
* Cancelling the event prevents the user action.
|
|
988
1012
|
*/
|
|
989
1013
|
export declare class ZoomStartEvent extends PreventableEvent implements MapZoomStartEvent {
|
|
990
1014
|
/**
|
package/package-metadata.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 e=Object.freeze({name:"@progress/kendo-react-map",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-map",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1757073163,version:"12.0.2-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = Object.freeze({
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "12.0.2-develop.
|
|
13
|
+
publishDate: 1757073163,
|
|
14
|
+
version: "12.0.2-develop.2",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
|
|
16
16
|
});
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-map",
|
|
3
|
-
"version": "12.0.2-develop.
|
|
3
|
+
"version": "12.0.2-develop.2",
|
|
4
4
|
"description": "KendoReact Map package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-drawing": "^1.21.2",
|
|
29
29
|
"@progress/kendo-licensing": "^1.7.0",
|
|
30
|
-
"@progress/kendo-react-common": "12.0.2-develop.
|
|
31
|
-
"@progress/kendo-react-popup": "12.0.2-develop.
|
|
30
|
+
"@progress/kendo-react-common": "12.0.2-develop.2",
|
|
31
|
+
"@progress/kendo-react-popup": "12.0.2-develop.2",
|
|
32
32
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
33
33
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
34
34
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"package": {
|
|
57
57
|
"productName": "KendoReact",
|
|
58
58
|
"productCode": "KENDOUIREACT",
|
|
59
|
-
"publishDate":
|
|
59
|
+
"publishDate": 1757073163,
|
|
60
60
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
|
|
61
61
|
}
|
|
62
62
|
},
|