UNPKG

@progress/kendo-react-map

Version:
9 lines (8 loc) 1.26 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 l=require("react"),u=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 s=d(l),a=class a extends s.Component{get optionsStore(){var e;return(e=this.context)==null?void 0:e.optionsStore}renderChildren(e,t){const{children:r}=e.props,{_mapKey:i,_parentStore:o}=this.props,p={...e.props,_mapCollectionIdxKey:`${i}_${t}`,_parentStore:o};return s.cloneElement(e,p,r)}render(){const{_mapKey:e,_parentStore:t,children:r}=this.props;return(t||this.optionsStore).dispatch({mapKey:e,payload:[]}),s.Children.map(r,(o,p)=>s.isValidElement(o)?this.renderChildren(o,p):o)}};a.contextType=u.MapContext;let c=a;module.exports=c;