@progress/kendo-react-map
Version:
KendoReact Map package
35 lines (34 loc) • 1.14 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import * as s from "react";
import { MapContext as c } from "../../MapContext.mjs";
const n = class n extends s.Component {
constructor(e, t) {
super(e, t), this.optionsStore = t.optionsStore;
}
renderChildren(e, t) {
const { children: o } = e.props, { _mapKey: a, _parentStore: r } = this.props, p = {
...e.props,
_mapCollectionIdxKey: `${a}_${t}`,
_parentStore: r
};
return s.cloneElement(e, p, o);
}
render() {
const { _mapKey: e, _parentStore: t, children: o } = this.props;
return (t || this.optionsStore).dispatch({
mapKey: e,
payload: []
}), s.Children.map(o, (r, p) => s.isValidElement(r) ? this.renderChildren(r, p) : r);
}
};
n.contextType = c;
let i = n;
export {
i as default
};