UNPKG

@progress/kendo-react-map

Version:
36 lines (35 loc) 1.16 kB
/** * @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 r from "react"; import { MapContext as c } from "../../MapContext.mjs"; const n = class n extends r.Component { get optionsStore() { var e; return (e = this.context) == null ? void 0 : e.optionsStore; } renderChildren(e, s) { const { children: o } = e.props, { _mapKey: a, _parentStore: t } = this.props, p = { ...e.props, _mapCollectionIdxKey: `${a}_${s}`, _parentStore: t }; return r.cloneElement(e, p, o); } render() { const { _mapKey: e, _parentStore: s, children: o } = this.props; return (s || this.optionsStore).dispatch({ mapKey: e, payload: [] }), r.Children.map(o, (t, p) => r.isValidElement(t) ? this.renderChildren(t, p) : t); } }; n.contextType = c; let i = n; export { i as default };