UNPKG

@progress/kendo-react-map

Version:
9 lines (8 loc) 1.25 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";const u=require("react"),l=require("../../MapContext.js");function d(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const o=d(u),a=class a extends o.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore}renderChildren(e,t){const{children:r}=e.props,{_mapKey:i,_parentStore:s}=this.props,p={...e.props,_mapCollectionIdxKey:`${i}_${t}`,_parentStore:s};return o.cloneElement(e,p,r)}render(){const{_mapKey:e,_parentStore:t,children:r}=this.props;return(t||this.optionsStore).dispatch({mapKey:e,payload:[]}),o.Children.map(r,(s,p)=>o.isValidElement(s)?this.renderChildren(s,p):s)}};a.contextType=l.MapContext;let c=a;module.exports=c;