@handsontable/react-wrapper 15.0.1-next-ab94a4c-20250207 → 15.1.0-next-dfdf994-20250206

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.
@@ -1 +1 @@
1
- {"version":3,"file":"react-handsontable.min.js","sources":["../src/helpers.tsx","../src/settingsMapper.ts","../src/hotTableContext.tsx","../src/hotColumnContext.tsx","../src/hotEditor.tsx","../src/hotColumn.tsx","../src/renderersPortalManager.tsx","../../../node_modules/prop-types/index.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../src/hotTableInner.tsx","../src/hotTable.tsx"],"sourcesContent":["import React, {\n ComponentType,\n CSSProperties,\n DependencyList,\n EffectCallback,\n ReactNode,\n ReactPortal,\n useEffect,\n} from 'react';\nimport ReactDOM from 'react-dom';\nimport { HotTableProps } from './types';\n\nlet bulkComponentContainer: DocumentFragment | null = null;\n\n/**\n * Warning message for the `autoRowSize`/`autoColumnSize` compatibility check.\n */\nexport const AUTOSIZE_WARNING = 'Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with ' +\n ' the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.';\n\n/**\n * Warning message for the `hot-renderer` obsolete renderer passing method.\n */\nexport const OBSOLETE_HOTRENDERER_WARNING = 'Providing a component-based renderer using `hot-renderer`-annotated component is no longer supported. ' +\n 'Pass your component using `renderer` prop of the `HotTable` or `HotColumn` component instead.';\n\n/**\n * Warning message for the `hot-editor` obsolete editor passing method.\n */\nexport const OBSOLETE_HOTEDITOR_WARNING = 'Providing a component-based editor using `hot-editor`-annotated component is no longer supported. ' +\n 'Pass your component using `editor` prop of the `HotTable` or `HotColumn` component instead.';\n\n/**\n * Warning message for the unexpected children of HotTable component.\n */\nexport const UNEXPECTED_HOTTABLE_CHILDREN_WARNING = 'Unexpected children nodes found in HotTable component. ' +\n 'Only HotColumn components are allowed.';\n\n/**\n * Warning message for the unexpected children of HotColumn component.\n */\nexport const UNEXPECTED_HOTCOLUMN_CHILDREN_WARNING = 'Unexpected children nodes found in HotColumn component. ' +\n 'HotColumn components do not support any children.';\n\n/**\n * Message for the warning thrown if the Handsontable instance has been destroyed.\n */\nexport const HOT_DESTROYED_WARNING = 'The Handsontable instance bound to this component was destroyed and cannot be' +\n ' used properly.';\n\n/**\n * Default classname given to the wrapper container.\n */\nexport const DEFAULT_CLASSNAME = 'hot-wrapper-editor-container';\n\n/**\n * Logs warn to the console if the `console` object is exposed.\n *\n * @param {...*} args Values which will be logged.\n */\nexport function warn(...args: any[]) {\n if (typeof console !== 'undefined') {\n console.warn(...args);\n }\n}\n\n/**\n * Detect if `hot-renderer` or `hot-editor` is defined, and if so, throw an incompatibility warning.\n *\n * @returns {boolean} 'true' if the warning was issued\n */\nexport function displayObsoleteRenderersEditorsWarning(children: ReactNode): boolean {\n if (hasChildElementOfType(children, 'hot-renderer')) {\n warn(OBSOLETE_HOTRENDERER_WARNING);\n return true;\n }\n if (hasChildElementOfType(children, 'hot-editor')) {\n warn(OBSOLETE_HOTEDITOR_WARNING);\n return true;\n }\n\n return false\n}\n\n/**\n * Detect if children of specified type are defined, and if so, throw an incompatibility warning.\n *\n * @param {ReactNode} children Component children nodes\n * @param {ComponentType} Component Component type to check\n * @returns {boolean} 'true' if the warning was issued\n */\nexport function displayChildrenOfTypeWarning(children: ReactNode, Component: ComponentType): boolean {\n const childrenArray: ReactNode[] = React.Children.toArray(children);\n\n if (childrenArray.some((child) => (child as React.ReactElement).type !== Component)) {\n warn(UNEXPECTED_HOTTABLE_CHILDREN_WARNING);\n return true;\n }\n\n return false\n}\n\n/**\n * Detect if children is defined, and if so, throw an incompatibility warning.\n *\n * @param {ReactNode} children Component children nodes\n * @returns {boolean} 'true' if the warning was issued\n */\nexport function displayAnyChildrenWarning(children: ReactNode): boolean {\n const childrenArray: ReactNode[] = React.Children.toArray(children);\n\n if (childrenArray.length) {\n warn(UNEXPECTED_HOTCOLUMN_CHILDREN_WARNING);\n return true;\n }\n\n return false\n}\n\n/**\n * Check the existence of elements of the provided `type` from the `HotColumn` component's children.\n *\n * @param {ReactNode} children HotTable children array.\n * @param {String} type Either `'hot-renderer'` or `'hot-editor'`.\n * @returns {boolean} `true` if the child of that type was found, `false` otherwise.\n */\nfunction hasChildElementOfType(children: ReactNode, type: 'hot-renderer' | 'hot-editor'): boolean {\n const childrenArray: ReactNode[] = React.Children.toArray(children);\n\n return childrenArray.some((child) => {\n return (child as React.ReactElement).props[type] !== void 0;\n });\n}\n\n/**\n * Create an editor portal.\n *\n * @param {Document} doc Document to be used.\n * @param {ComponentType} Editor Editor component or render function.\n * @returns {ReactPortal} The portal for the editor.\n */\nexport function createEditorPortal(doc: Document | null, Editor: HotTableProps['editor'] | undefined): ReactPortal | null {\n if (!doc || !Editor) {\n return null;\n }\n\n const editorElement = <Editor />;\n const containerProps = getContainerAttributesProps({}, false);\n\n containerProps.className = `${DEFAULT_CLASSNAME} ${containerProps.className}`;\n\n return ReactDOM.createPortal(\n <div {...containerProps}>\n {editorElement}\n </div>\n , doc.body);\n}\n\n/**\n * Render a cell component to an external DOM node.\n *\n * @param {React.ReactElement} rElement React element to be used as a base for the component.\n * @param {Document} [ownerDocument] The owner document to set the portal up into.\n * @param {String} portalKey The key to be used for the portal.\n * @param {HTMLElement} [cachedContainer] The cached container to be used for the portal.\n * @returns {{portal: ReactPortal, portalContainer: HTMLElement}} An object containing the portal and its container.\n */\nexport function createPortal(rElement: React.ReactElement, ownerDocument: Document | null = document, portalKey: string, cachedContainer?: HTMLElement): {\n portal: ReactPortal,\n portalContainer: HTMLElement,\n} {\n if (!ownerDocument) {\n ownerDocument = document;\n }\n\n if (!bulkComponentContainer) {\n bulkComponentContainer = ownerDocument.createDocumentFragment();\n }\n\n const portalContainer = cachedContainer ?? ownerDocument.createElement('DIV');\n bulkComponentContainer.appendChild(portalContainer);\n\n return {\n portal: ReactDOM.createPortal(rElement, portalContainer, portalKey),\n portalContainer\n };\n}\n\n/**\n * Get an object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the\n * component.\n *\n * @param {HotTableProps} props Object containing the React element props.\n * @param {Boolean} randomizeId If set to `true`, the function will randomize the `id` property when no `id` was present in the `prop` object.\n * @returns An object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the\n * component.\n */\nexport function getContainerAttributesProps(props: HotTableProps, randomizeId: boolean = true): {id?: string, className: string, style: CSSProperties} {\n return {\n id: props.id || (randomizeId ? 'hot-' + Math.random().toString(36).substring(5) : undefined),\n className: props.className || '',\n style: props.style || {},\n };\n}\n\n/**\n * Checks if the environment that the code runs in is a browser.\n *\n * @returns {boolean}\n */\nexport function isCSR(): boolean {\n return typeof window !== 'undefined';\n}\n\n/**\n * A variant of useEffect hook that does not trigger on initial mount, only updates\n *\n * @param effect Effect function\n * @param deps Effect dependencies\n */\nexport function useUpdateEffect(effect: EffectCallback, deps?: DependencyList): void {\n const notInitialRender = React.useRef(false);\n\n useEffect(() => {\n if (notInitialRender.current) {\n return effect();\n } else {\n notInitialRender.current = true;\n }\n }, deps);\n}\n","import Handsontable from 'handsontable/base';\nimport { HotTableProps } from './types';\n\nexport class SettingsMapper {\n /**\n * Parse component settings into Handsontable-compatible settings.\n *\n * @param {Object} properties Object containing properties from the HotTable object.\n * @param {Object} additionalSettings Additional settings.\n * @param {boolean} additionalSettings.isInit Flag determining whether the settings are being set during initialization.\n * @param {string[]} additionalSettings.initOnlySettingKeys Array of keys that can be set only during initialization.\n * @returns {Object} Handsontable-compatible settings object.\n */\n static getSettings(\n properties: HotTableProps,\n {\n prevProps = {},\n isInit = false,\n initOnlySettingKeys = []\n }: {\n prevProps?: HotTableProps;\n isInit?: boolean;\n initOnlySettingKeys?: Array<keyof Handsontable.GridSettings>\n } = {}): Handsontable.GridSettings {\n const shouldSkipProp = (key: keyof Handsontable.GridSettings) => {\n // Omit settings that can be set only during initialization and are intentionally modified.\n if (!isInit && initOnlySettingKeys.includes(key)) {\n return prevProps[key] === properties[key];\n }\n return false;\n };\n let newSettings: Handsontable.GridSettings = {};\n\n for (const key in properties) {\n if (\n key !== 'children' &&\n !shouldSkipProp(key as keyof Handsontable.GridSettings) &&\n properties.hasOwnProperty(key)\n ) {\n (newSettings as any)[key] = properties[key as keyof HotTableProps];\n }\n }\n\n return newSettings;\n }\n}\n","import Handsontable from 'handsontable/base';\nimport React, {\n ComponentType,\n FC,\n PropsWithChildren,\n ReactPortal,\n createContext,\n useCallback,\n useRef,\n useMemo,\n useContext,\n} from 'react';\nimport { ScopeIdentifier, HotRendererProps } from './types'\nimport { createPortal } from './helpers'\nimport { RenderersPortalManagerRef } from './renderersPortalManager'\n\nexport interface HotTableContextImpl {\n /**\n * Map with column indexes (or a string = 'global') as keys, and booleans as values. Each key represents a component-based editor\n * declared for the used column index, or a global one, if the key is the `global` string.\n */\n readonly componentRendererColumns: Map<ScopeIdentifier, boolean>;\n\n /**\n * Array of object containing the column settings.\n */\n readonly columnsSettings: Handsontable.ColumnSettings[];\n\n /**\n * Sets the column settings based on information received from HotColumn.\n *\n * @param {HotTableProps} columnSettings Column settings object.\n * @param {Number} columnIndex Column index.\n */\n readonly emitColumnSettings: (columnSettings: Handsontable.ColumnSettings, columnIndex: number) => void;\n\n /**\n * Return a renderer wrapper function for the provided renderer component.\n *\n * @param {ComponentType<HotRendererProps>} Renderer React renderer component.\n * @returns {Handsontable.renderers.BaseRenderer} The Handsontable rendering function.\n */\n readonly getRendererWrapper: (Renderer: ComponentType<HotRendererProps>) => typeof Handsontable.renderers.BaseRenderer;\n\n /**\n * Clears portals cache.\n */\n readonly clearPortalCache: () => void;\n\n /**\n * Clears rendered cells cache.\n */\n readonly clearRenderedCellCache: () => void;\n\n /**\n * Set the renderers portal manager dispatch function.\n *\n * @param {RenderersPortalManagerRef} pm The PortalManager dispatch function.\n */\n readonly setRenderersPortalManagerRef: (pm: RenderersPortalManagerRef) => void;\n\n /**\n * Puts cell portals into portal manager and purges portals cache.\n */\n readonly pushCellPortalsIntoPortalManager: () => void;\n}\n\nconst HotTableContext = createContext<HotTableContextImpl | undefined>(undefined);\n\nconst HotTableContextProvider: FC<PropsWithChildren> = ({ children }) => {\n const columnsSettings = useRef<Handsontable.ColumnSettings[]>([]);\n\n const setHotColumnSettings = useCallback((columnSettings: Handsontable.ColumnSettings, columnIndex: number) => {\n columnsSettings.current[columnIndex] = columnSettings;\n }, [])\n\n const componentRendererColumns = useRef<Map<number | 'global', boolean>>(new Map());\n const renderedCellCache = useRef<Map<string, HTMLTableCellElement>>(new Map());\n const clearRenderedCellCache = useCallback(() => renderedCellCache.current.clear(), []);\n const portalCache = useRef<Map<string, ReactPortal>>(new Map());\n const clearPortalCache = useCallback(() => portalCache.current.clear(), []);\n const portalContainerCache = useRef<Map<string, HTMLElement>>(new Map());\n\n const getRendererWrapper = useCallback((Renderer: ComponentType<HotRendererProps>): typeof Handsontable.renderers.BaseRenderer => {\n return function __internalRenderer(instance, TD, row, col, prop, value, cellProperties) {\n const key = `${row}-${col}`;\n\n // Handsontable.Core type is missing guid\n const instanceGuid = (instance as unknown as { guid: string }).guid;\n\n const portalContainerKey = `${instanceGuid}-${key}`\n const portalKey = `${key}-${instanceGuid}`\n\n if (renderedCellCache.current.has(key)) {\n TD.innerHTML = renderedCellCache.current.get(key)!.innerHTML;\n }\n\n if (TD && !TD.getAttribute('ghost-table')) {\n const cachedPortal = portalCache.current.get(portalKey);\n const cachedPortalContainer = portalContainerCache.current.get(portalContainerKey);\n\n while (TD.firstChild) {\n TD.removeChild(TD.firstChild);\n }\n\n // if portal already exists, do not recreate\n if (cachedPortal && cachedPortalContainer) {\n TD.appendChild(cachedPortalContainer);\n } else {\n const rendererElement = (\n <Renderer instance={instance}\n TD={TD}\n row={row}\n col={col}\n prop={prop}\n value={value}\n cellProperties={cellProperties}/>\n );\n\n const {portal, portalContainer} = createPortal(rendererElement, TD.ownerDocument, portalKey, cachedPortalContainer);\n\n portalContainerCache.current.set(portalContainerKey, portalContainer);\n TD.appendChild(portalContainer);\n\n portalCache.current.set(portalKey, portal);\n }\n }\n\n renderedCellCache.current.set(`${row}-${col}`, TD);\n return TD;\n };\n }, []);\n\n const renderersPortalManager = useRef<RenderersPortalManagerRef>(() => undefined);\n\n const setRenderersPortalManagerRef = useCallback((pmComponent: RenderersPortalManagerRef) => {\n renderersPortalManager.current = pmComponent;\n }, []);\n\n const pushCellPortalsIntoPortalManager = useCallback(() => {\n renderersPortalManager.current!([...portalCache.current.values()]);\n }, []);\n\n const contextImpl: HotTableContextImpl = useMemo(() => ({\n componentRendererColumns: componentRendererColumns.current,\n columnsSettings: columnsSettings.current,\n emitColumnSettings: setHotColumnSettings,\n getRendererWrapper,\n clearPortalCache,\n clearRenderedCellCache,\n setRenderersPortalManagerRef,\n pushCellPortalsIntoPortalManager\n }), [setHotColumnSettings, getRendererWrapper, clearRenderedCellCache, setRenderersPortalManagerRef, pushCellPortalsIntoPortalManager]);\n\n return (\n <HotTableContext.Provider value={contextImpl}>{children}</HotTableContext.Provider>\n );\n};\n\n/**\n * Exposes the table context object to components\n *\n * @returns HotTableContext\n */\nfunction useHotTableContext(): HotTableContextImpl {\n return useContext(HotTableContext)!;\n}\n\nexport { HotTableContextProvider, useHotTableContext };\n","import React, {\n FC,\n PropsWithChildren,\n createContext,\n useContext,\n useMemo,\n} from 'react';\n\nexport interface HotColumnContextImpl {\n /**\n * Column index within a HotTable.\n */\n readonly columnIndex: number;\n\n /**\n * Get the `Document` object corresponding to the main component element.\n *\n * @returns The `Document` object used by the component.\n */\n readonly getOwnerDocument: () => Document | null;\n}\n\nconst HotColumnContext = createContext<HotColumnContextImpl | undefined>(undefined);\n\nconst HotColumnContextProvider: FC<PropsWithChildren<HotColumnContextImpl>> = ({ columnIndex, getOwnerDocument, children }) => {\n\n const contextImpl: HotColumnContextImpl = useMemo(() => ({\n columnIndex,\n getOwnerDocument\n }), [columnIndex, getOwnerDocument]);\n\n return (\n <HotColumnContext.Provider value={contextImpl}>{children}</HotColumnContext.Provider>\n );\n};\n\nconst useHotColumnContext = () => useContext(HotColumnContext)!;\n\nexport { useHotColumnContext, HotColumnContextProvider };\n","import React, {\n DependencyList,\n FC,\n MutableRefObject,\n ReactNode,\n Ref,\n RefObject,\n createContext,\n useContext,\n useDeferredValue,\n useImperativeHandle,\n useMemo,\n useState,\n} from 'react';\nimport Handsontable from 'handsontable/base';\nimport { HotEditorHooks, UseHotEditorImpl } from './types';\n\ntype HookPropName = keyof Handsontable.editors.BaseEditor | 'constructor';\n\nconst AbstractMethods: (keyof Handsontable.editors.BaseEditor)[] = [\n 'close',\n 'focus',\n 'open',\n];\nconst ExcludedMethods: (keyof Handsontable.editors.BaseEditor)[] = [\n 'getValue',\n 'setValue',\n];\n\nconst MethodsMap: Partial<\n Record<keyof Handsontable.editors.BaseEditor, keyof HotEditorHooks>\n> = {\n open: 'onOpen',\n close: 'onClose',\n prepare: 'onPrepare',\n focus: 'onFocus',\n};\n\n/**\n * Create a class to be passed to the Handsontable's settings.\n *\n * @param {RefObject<HotEditorHooks>} hooksRef Reference to component-based editor overridden hooks object.\n * @param {RefObject} instanceRef Reference to Handsontable-native custom editor class instance.\n * @returns {Function} A class to be passed to the Handsontable editor settings.\n */\nexport function makeEditorClass(\n hooksRef: MutableRefObject<HotEditorHooks | null>,\n instanceRef: MutableRefObject<Handsontable.editors.BaseEditor | null>\n): typeof Handsontable.editors.BaseEditor {\n return class CustomEditor\n extends Handsontable.editors.BaseEditor\n implements Handsontable.editors.BaseEditor\n {\n private value: any;\n\n constructor(hotInstance: Handsontable.Core) {\n super(hotInstance);\n instanceRef.current = this;\n\n (\n Object.getOwnPropertyNames(\n Handsontable.editors.BaseEditor.prototype\n ) as HookPropName[]\n ).forEach((propName) => {\n if (propName === 'constructor' || ExcludedMethods.includes(propName)) {\n return;\n }\n\n const baseMethod = Handsontable.editors.BaseEditor.prototype[propName];\n (CustomEditor.prototype as any)[propName] = function (\n this: CustomEditor,\n ...args: any[]\n ) {\n let result;\n\n if (!AbstractMethods.includes(propName)) {\n result = baseMethod.call(this, ...args); // call super\n }\n\n if (\n MethodsMap[propName] &&\n hooksRef.current?.[MethodsMap[propName]!]\n ) {\n result = (hooksRef.current[MethodsMap[propName]!] as any).call(\n this,\n ...args\n );\n }\n\n return result;\n }.bind(this);\n });\n }\n\n focus() {}\n\n getValue() {\n return this.value;\n }\n\n setValue(newValue: any) {\n this.value = newValue;\n }\n\n open() {}\n\n close() {}\n };\n}\n\ninterface EditorContextType {\n hooksRef: Ref<HotEditorHooks>;\n hotCustomEditorInstanceRef: RefObject<Handsontable.editors.BaseEditor>;\n}\n\n/**\n * Context to provide Handsontable-native custom editor class instance to overridden hooks object.\n */\nconst EditorContext = createContext<EditorContextType | undefined>(\n undefined\n);\n\ninterface EditorContextProviderProps {\n hooksRef: Ref<HotEditorHooks>;\n hotCustomEditorInstanceRef: RefObject<Handsontable.editors.BaseEditor>;\n children: ReactNode;\n}\n\n/**\n * Provider of the context that exposes Handsontable-native editor instance and passes hooks object\n * for custom editor components.\n *\n * @param {Ref} hooksRef Reference for component-based editor overridden hooks object.\n * @param {RefObject} hotCustomEditorInstanceRef Reference to Handsontable-native editor instance.\n */\nexport const EditorContextProvider: FC<EditorContextProviderProps> = ({\n hooksRef,\n hotCustomEditorInstanceRef,\n children,\n}) => {\n return (\n <EditorContext.Provider value={{ hooksRef, hotCustomEditorInstanceRef }}>\n {children}\n </EditorContext.Provider>\n );\n};\n\n/**\n * Hook that allows encapsulating custom behaviours of component-based editor by customizing passed ref with overridden hooks object.\n *\n * @param {HotEditorHooks} overriddenHooks Overrides specific for the custom editor.\n * @param {DependencyList} deps Overridden hooks object React dependency list.\n * @returns {UseHotEditorImpl} Editor API methods\n */\nexport function useHotEditor<T>(\n overriddenHooks?: HotEditorHooks,\n deps?: DependencyList\n): UseHotEditorImpl<T> {\n const { hooksRef, hotCustomEditorInstanceRef } =\n useContext(EditorContext)!;\n const [rerenderTrigger, setRerenderTrigger] = useState(0);\n const [editorValue, setEditorValue] = useState<T>();\n\n // return a deferred value that allows for optimizing performance by delaying the update of a value until the next render.\n const deferredValue = useDeferredValue(editorValue);\n\n useImperativeHandle(\n hooksRef,\n () => ({\n ...overriddenHooks,\n onOpen() {\n setEditorValue(hotCustomEditorInstanceRef.current?.getValue());\n overriddenHooks?.onOpen?.();\n setRerenderTrigger((t) => t + 1);\n },\n }),\n deps\n );\n\n return useMemo(\n () => ({\n get value(): T | undefined {\n return deferredValue;\n },\n setValue(newValue) {\n setEditorValue(newValue);\n hotCustomEditorInstanceRef.current?.setValue(newValue);\n },\n get isOpen() {\n return hotCustomEditorInstanceRef.current?.isOpened() ?? false;\n },\n finishEditing() {\n hotCustomEditorInstanceRef.current?.finishEditing();\n },\n get row() {\n return hotCustomEditorInstanceRef.current?.row;\n },\n get col() {\n return hotCustomEditorInstanceRef.current?.col;\n },\n }),\n [rerenderTrigger, hotCustomEditorInstanceRef, deferredValue]\n );\n}\n","import React, {\n FC,\n ReactElement,\n useEffect,\n useRef,\n} from 'react';\nimport { HotTableProps, HotColumnProps, HotEditorHooks } from './types';\nimport {\n createEditorPortal,\n displayAnyChildrenWarning,\n displayObsoleteRenderersEditorsWarning\n} from './helpers';\nimport { SettingsMapper } from './settingsMapper';\nimport Handsontable from 'handsontable/base';\nimport { useHotTableContext } from './hotTableContext'\nimport { useHotColumnContext } from './hotColumnContext'\nimport { EditorContextProvider, makeEditorClass } from './hotEditor';\n\nconst isHotColumn = (childNode: any): childNode is ReactElement => childNode.type === HotColumn;\n\nconst internalProps = ['_columnIndex', '_getOwnerDocument', 'children'];\n\nconst HotColumn: FC<HotColumnProps> = (props) => {\n const { componentRendererColumns, emitColumnSettings, getRendererWrapper } = useHotTableContext();\n const { columnIndex, getOwnerDocument } = useHotColumnContext();\n\n /**\n * Reference to component-based editor overridden hooks object.\n */\n const localEditorHooksRef = useRef<HotEditorHooks | null>(null);\n\n /**\n * Reference to HOT-native custom editor class instance.\n */\n const localEditorClassInstance = useRef<Handsontable.editors.BaseEditor | null>(null);\n\n /**\n * Logic performed after mounting & updating of the HotColumn component.\n */\n useEffect(() => {\n\n /**\n * Filter out all the internal properties and return an object with just the Handsontable-related props.\n *\n * @returns {Object}\n */\n const getSettingsProps = (): HotTableProps => {\n return Object.keys(props)\n .filter(key => !internalProps.includes(key))\n .reduce<HotTableProps>((obj, key) => {\n (obj as any)[key] = props[key];\n return obj;\n }, {});\n };\n\n /**\n * Create the column settings based on the data provided to the `HotColumn` component and its child components.\n */\n const createColumnSettings = (): Handsontable.ColumnSettings => {\n const columnSettings = SettingsMapper.getSettings(getSettingsProps()) as unknown as Handsontable.ColumnSettings;\n\n if (props.renderer) {\n columnSettings.renderer = getRendererWrapper(props.renderer);\n componentRendererColumns.set(columnIndex, true);\n } else if (props.hotRenderer) {\n columnSettings.renderer = props.hotRenderer;\n }\n\n if (props.editor) {\n columnSettings.editor = makeEditorClass(localEditorHooksRef, localEditorClassInstance);\n } else if (props.hotEditor) {\n columnSettings.editor = props.hotEditor;\n }\n\n return columnSettings\n };\n\n const columnSettings = createColumnSettings();\n emitColumnSettings(columnSettings, columnIndex);\n\n if (!displayObsoleteRenderersEditorsWarning(props.children)) {\n displayAnyChildrenWarning(props.children);\n }\n });\n\n const editorPortal = createEditorPortal(getOwnerDocument(), props.editor);\n\n /**\n * Render the portals of the editors, if there are any.\n *\n * @returns {ReactElement}\n */\n return (\n <EditorContextProvider hooksRef={localEditorHooksRef}\n hotCustomEditorInstanceRef={localEditorClassInstance}>\n {editorPortal}\n </EditorContextProvider>\n )\n}\n\nexport { HotColumn, isHotColumn };\n","import React, {\n Dispatch,\n ReactPortal,\n forwardRef,\n Fragment,\n useImperativeHandle,\n useState,\n} from 'react';\n\nexport type RenderersPortalManagerRef = Dispatch<ReactPortal[]>;\n\n/**\n * Component used to manage the renderer component portals.\n */\nexport const RenderersPortalManager = forwardRef<RenderersPortalManagerRef, {}>((_, ref) => {\n const [portals, setPortals] = useState<ReactPortal[]>([]);\n useImperativeHandle(ref, () => setPortals);\n\n return (\n <Fragment>\n {portals}\n </Fragment>\n );\n});\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","import React, {\n Children,\n Fragment,\n useEffect,\n useCallback,\n useImperativeHandle,\n useRef,\n forwardRef\n} from 'react';\nimport Handsontable from 'handsontable/base';\nimport { SettingsMapper } from './settingsMapper';\nimport { RenderersPortalManager } from './renderersPortalManager';\nimport { HotColumn, isHotColumn } from './hotColumn';\nimport { HotEditorHooks, HotTableProps, HotTableRef } from './types';\nimport {\n HOT_DESTROYED_WARNING,\n AUTOSIZE_WARNING,\n createEditorPortal,\n getContainerAttributesProps,\n isCSR,\n warn,\n displayObsoleteRenderersEditorsWarning,\n useUpdateEffect,\n displayChildrenOfTypeWarning\n} from './helpers';\nimport PropTypes from 'prop-types';\nimport { getRenderer } from 'handsontable/renderers/registry';\nimport { getEditor } from 'handsontable/editors/registry';\nimport { useHotTableContext } from './hotTableContext'\nimport { HotColumnContextProvider } from './hotColumnContext'\nimport { EditorContextProvider, makeEditorClass } from './hotEditor';\n\nconst HotTableInner = forwardRef<\n HotTableRef,\n HotTableProps\n>((props, ref) => {\n\n /**\n * Reference to the Handsontable instance.\n */\n const __hotInstance = useRef<Handsontable | null>(null);\n\n /**\n * Reference to the main Handsontable DOM element.\n */\n const hotElementRef = useRef<HTMLDivElement>(null);\n\n /**\n * Reference to component-based editor overridden hooks object.\n */\n const globalEditorHooksRef = useRef<HotEditorHooks | null>(null);\n\n /**\n * Reference to HOT-native custom editor class instance.\n */\n const globalEditorClassInstance = useRef<Handsontable.editors.BaseEditor | null>(null);\n\n /**\n * Reference to the previous props object.\n */\n const prevProps = useRef<HotTableProps>();\n\n /**\n * HotTable context exposing helper functions.\n */\n const context = useHotTableContext();\n\n /**\n * Getter for the property storing the Handsontable instance.\n */\n const getHotInstance = useCallback((): Handsontable | null => {\n if (!__hotInstance.current || !__hotInstance.current.isDestroyed) {\n\n // Will return the Handsontable instance or `null` if it's not yet been created.\n return __hotInstance.current;\n\n } else {\n console.warn(HOT_DESTROYED_WARNING);\n\n return null;\n }\n }, [__hotInstance]);\n\n const isHotInstanceDestroyed = useCallback((): boolean => {\n return !__hotInstance.current || __hotInstance.current.isDestroyed;\n }, [__hotInstance]);\n\n /**\n * Clear both the editor and the renderer cache.\n */\n const clearCache = useCallback((): void => {\n context.clearRenderedCellCache();\n context.componentRendererColumns.clear();\n }, [context]);\n\n /**\n * Get the `Document` object corresponding to the main component element.\n *\n * @returns The `Document` object used by the component.\n */\n const getOwnerDocument = useCallback((): Document | null => {\n if (isCSR()) {\n return hotElementRef.current ? hotElementRef.current.ownerDocument : document;\n }\n\n return null;\n }, [hotElementRef]);\n\n /**\n * Create a new settings object containing the column settings and global editors and renderers.\n *\n * @returns {Handsontable.GridSettings} New global set of settings for Handsontable.\n */\n const createNewGlobalSettings = (init: boolean = false, prevProps: HotTableProps = {}): Handsontable.GridSettings => {\n const initOnlySettingKeys = !isHotInstanceDestroyed() ? // Needed for React's double-rendering.\n ((getHotInstance()?.getSettings() as any)?._initOnlySettings || []) :\n [];\n const newSettings = SettingsMapper.getSettings(\n props, {\n prevProps,\n isInit: init,\n initOnlySettingKeys\n }\n );\n\n newSettings.columns = context.columnsSettings.length ? context.columnsSettings : newSettings.columns;\n\n if (props.renderer) {\n newSettings.renderer = context.getRendererWrapper(props.renderer);\n context.componentRendererColumns.set('global', true);\n } else {\n newSettings.renderer = props.hotRenderer || getRenderer('text');\n }\n\n if (props.editor) {\n newSettings.editor = makeEditorClass(globalEditorHooksRef, globalEditorClassInstance);\n } else {\n newSettings.editor = props.hotEditor || getEditor('text');\n }\n\n return newSettings;\n };\n\n /**\n * Detect if `autoRowSize` or `autoColumnSize` is defined, and if so, throw an incompatibility warning.\n */\n const displayAutoSizeWarning = (hotInstance: Handsontable | null): void => {\n if (\n hotInstance &&\n (\n hotInstance.getPlugin('autoRowSize')?.enabled ||\n hotInstance.getPlugin('autoColumnSize')?.enabled\n )\n ) {\n if (context.componentRendererColumns.size > 0) {\n warn(AUTOSIZE_WARNING);\n }\n }\n };\n\n /**\n * Initialize Handsontable after the component has mounted.\n */\n useEffect(() => {\n const newGlobalSettings = createNewGlobalSettings(true);\n\n // Update prevProps with the current props\n prevProps.current = props;\n\n __hotInstance.current = new Handsontable.Core(hotElementRef.current!, newGlobalSettings);\n\n /**\n * Handsontable's `beforeViewRender` hook callback.\n */\n __hotInstance.current.addHook('beforeViewRender', () => {\n context.clearPortalCache();\n context.clearRenderedCellCache();\n });\n\n /**\n * Handsontable's `afterViewRender` hook callback.\n */\n __hotInstance.current.addHook('afterViewRender', () => {\n context.pushCellPortalsIntoPortalManager();\n });\n\n __hotInstance.current.init();\n\n displayAutoSizeWarning(__hotInstance.current);\n\n if (!displayObsoleteRenderersEditorsWarning(props.children)) {\n displayChildrenOfTypeWarning(props.children, HotColumn);\n }\n\n /**\n * Destroy the Handsontable instance when the parent component unmounts.\n */\n return () => {\n clearCache();\n getHotInstance()?.destroy();\n }\n }, []);\n\n /**\n * Logic performed after the component update.\n */\n useUpdateEffect((): void => {\n clearCache();\n\n const hotInstance = getHotInstance();\n\n const newGlobalSettings = createNewGlobalSettings(false, prevProps.current);\n\n // Update prevProps with the current props\n prevProps.current = props;\n\n hotInstance?.updateSettings(newGlobalSettings, false);\n\n displayAutoSizeWarning(hotInstance);\n displayObsoleteRenderersEditorsWarning(props.children);\n });\n\n /**\n * Interface exposed to parent components by HotTable instance via React ref\n */\n useImperativeHandle(ref, () => ({\n get hotElementRef() {\n return hotElementRef.current!;\n },\n get hotInstance() {\n return getHotInstance();\n }\n }));\n\n /**\n * Render the component.\n */\n const hotColumnWrapped = Children.toArray(props.children)\n .filter(isHotColumn)\n .map((childNode, columnIndex) => (\n <HotColumnContextProvider columnIndex={columnIndex}\n getOwnerDocument={getOwnerDocument}\n key={columnIndex}>\n {childNode}\n </HotColumnContextProvider>\n ));\n\n const containerProps = getContainerAttributesProps(props);\n const editorPortal = createEditorPortal(getOwnerDocument(), props.editor);\n\n return (\n <Fragment>\n <div ref={hotElementRef} {...containerProps}>\n {hotColumnWrapped}\n </div>\n <RenderersPortalManager ref={context.setRenderersPortalManagerRef} />\n <EditorContextProvider hooksRef={globalEditorHooksRef}\n hotCustomEditorInstanceRef={globalEditorClassInstance}>\n {editorPortal}\n </EditorContextProvider>\n </Fragment>\n );\n});\n\n/**\n * Prop types to be checked at runtime.\n */\nHotTableInner.propTypes = {\n style: PropTypes.object,\n id: PropTypes.string,\n className: PropTypes.string\n};\n\nexport default HotTableInner;\nexport { HotTableInner };\n","import React, {\n ForwardRefExoticComponent,\n RefAttributes,\n useId,\n forwardRef,\n} from 'react';\nimport * as packageJson from '../package.json';\nimport { HotTableInner } from './hotTableInner';\nimport { HotTableProps, HotTableRef } from './types';\nimport { HotTableContextProvider } from './hotTableContext';\n\ninterface Version {\n version?: string;\n}\n\ntype HotTable = ForwardRefExoticComponent<HotTableProps & RefAttributes<HotTableRef>> & Version;\n\n/**\n * A Handsontable-ReactJS wrapper.\n *\n * To implement, use the `HotTable` tag with properties corresponding to Handsontable options.\n * For example:\n *\n * ```js\n * <HotTable id=\"hot\" data={dataObject} contextMenu={true} colHeaders={true} width={600} height={300} stretchH=\"all\" />\n *\n * // is analogous to\n * let hot = new Handsontable(document.getElementById('hot'), {\n * data: dataObject,\n * contextMenu: true,\n * colHeaders: true,\n * width: 600\n * height: 300\n * });\n *\n * ```\n */\nconst HotTable: HotTable = forwardRef<HotTableRef, HotTableProps>(({ children, ...props }, ref) => {\n const componentId = props.id ?? useId();\n\n return (\n <HotTableContextProvider>\n <HotTableInner id={componentId} {...props} ref={ref}>\n {children}\n </HotTableInner>\n </HotTableContextProvider>\n );\n})\n\n/**\n * Package version.\n *\n * @returns The version number of the package.\n */\nHotTable.version = (packageJson as any).version;\n\nexport default HotTable;\nexport { HotTable };\n"],"names":["bulkComponentContainer","warn","_console","console","apply","arguments","displayObsoleteRenderersEditorsWarning","children","hasChildElementOfType","type","React","Children","toArray","some","child","props","createEditorPortal","doc","Editor","editorElement","createElement","containerProps","getContainerAttributesProps","className","concat","ReactDOM","createPortal","body","id","Math","random","toString","substring","undefined","style","SettingsMapper","_createClass","_classCallCheck","key","value","properties","_ref","length","_ref$prevProps","prevProps","_ref$isInit","isInit","_ref$initOnlySettingK","initOnlySettingKeys","shouldSkipProp","includes","newSettings","hasOwnProperty","HotTableContext","createContext","HotTableContextProvider","columnsSettings","useRef","setHotColumnSettings","useCallback","columnSettings","columnIndex","current","componentRendererColumns","Map","renderedCellCache","clearRenderedCellCache","clear","portalCache","clearPortalCache","portalContainerCache","getRendererWrapper","Renderer","instance","TD","row","col","prop","cellProperties","instanceGuid","guid","portalContainerKey","portalKey","has","innerHTML","get","getAttribute","cachedPortal","cachedPortalContainer","firstChild","removeChild","appendChild","_createPortal","rElement","ownerDocument","document","cachedContainer","createDocumentFragment","portalContainer","portal","set","renderersPortalManager","setRenderersPortalManagerRef","pmComponent","pushCellPortalsIntoPortalManager","_toConsumableArray","values","contextImpl","useMemo","emitColumnSettings","Provider","useHotTableContext","useContext","HotColumnContext","HotColumnContextProvider","getOwnerDocument","AbstractMethods","ExcludedMethods","MethodsMap","open","close","prepare","focus","makeEditorClass","hooksRef","instanceRef","_Handsontable$editors","CustomEditor","hotInstance","_this","_callSuper","Object","getOwnPropertyNames","Handsontable","editors","BaseEditor","prototype","forEach","propName","baseMethod","_hooksRef$current","result","_hooksRef$current$Met","_len","args","Array","_key","call","this","bind","_inherits","newValue","EditorContext","EditorContextProvider","hotCustomEditorInstanceRef","isHotColumn","childNode","HotColumn","internalProps","_useHotTableContext","_useHotColumnContext","localEditorHooksRef","localEditorClassInstance","useEffect","getSettings","keys","filter","reduce","obj","renderer","hotRenderer","editor","hotEditor","createColumnSettings","editorPortal","RenderersPortalManager","forwardRef","_","ref","_useState2","_slicedToArray","useState","portals","setPortals","useImperativeHandle","Fragment","propTypesModule","exports","ReactPropTypesSecret","ReactPropTypesSecret_1","emptyFunction","emptyFunctionWithReset","resetWarningCache","factoryWithThrowingShims","shim","componentName","location","propFullName","secret","err","Error","name","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require$$2","HotTableInner","effect","deps","notInitialRender","__hotInstance","hotElementRef","globalEditorHooksRef","globalEditorClassInstance","context","getHotInstance","isDestroyed","isHotInstanceDestroyed","clearCache","window","createNewGlobalSettings","_getHotInstance","init","_initOnlySettings","columns","getRenderer","getEditor","displayAutoSizeWarning","_hotInstance$getPlugi","_hotInstance$getPlugi2","getPlugin","enabled","size","Component","newGlobalSettings","Core","addHook","_getHotInstance2","destroy","updateSettings","hotColumnWrapped","map","assign","propTypes","HotTable","_props$id","_objectWithoutProperties","_excluded","componentId","useId","version","overriddenHooks","_useContext","rerenderTrigger","setRerenderTrigger","_useState4","setEditorValue","deferredValue","useDeferredValue","_objectSpread","onOpen","_hotCustomEditorInsta","_overriddenHooks$onOp","getValue","t","setValue","_hotCustomEditorInsta2","isOpen","_hotCustomEditorInsta3","_hotCustomEditorInsta4","isOpened","finishEditing","_hotCustomEditorInsta5","_hotCustomEditorInsta6","_hotCustomEditorInsta7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;4tBAYIA,EAAkD,KAgDtC,SAAAC,IACsB,IAAAC,OAAb,IAAZC,UACTD,EAAAC,SAAQF,KAAIG,MAAAF,EAAAG,UAEhB,CAOM,SAAUC,EAAuCC,GACrD,OAAIC,EAAsBD,EAAU,iBAClCN,EAlDwC,wMAmDjC,KAELO,EAAsBD,EAAU,gBAClCN,EAhDsC,kMAiD/B,EAIX,CA4CA,SAASO,EAAsBD,EAAqBE,GAGlD,OAFmCC,EAA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AAAC,EAAAC,EACR,OAAqD,QAArDD,UAAAC,EAAOxI,EAA2B5F,eAAO,IAAAoO,OAAA,EAAlCA,EAAoCC,kBAAUF,IAAAA,GAAAA,CACtD,EACDG,cAAa,WAAA,IAAAC,EACuB,QAAlCA,EAAA3I,EAA2B5F,eAAO,IAAAuO,GAAlCA,EAAoCD,eACrC,EACD,OAAIzN,GAAG,IAAA2N,EACL,eAAAA,EAAO5I,EAA2B5F,eAAO,IAAAwO,OAAA,EAAlCA,EAAoC3N,GAC5C,EACD,OAAIC,GAAG,IAAA2N,EACL,eAAAA,EAAO7I,EAA2B5F,eAAO,IAAAyO,OAAA,EAAlCA,EAAoC3N,GAC7C,EACA,GACF,CAACsM,EAAiBxH,EAA4B4H,GAElD","x_google_ignoreList":[7,8,9]}
1
+ {"version":3,"file":"react-handsontable.min.js","sources":["../src/helpers.tsx","../src/settingsMapper.ts","../src/hotTableContext.tsx","../src/hotColumnContext.tsx","../src/hotEditor.tsx","../src/hotColumn.tsx","../src/renderersPortalManager.tsx","../../../node_modules/prop-types/index.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../src/hotTableInner.tsx","../src/hotTable.tsx"],"sourcesContent":["import React, {\n ComponentType,\n CSSProperties,\n DependencyList,\n EffectCallback,\n ReactNode,\n ReactPortal,\n useEffect,\n} from 'react';\nimport ReactDOM from 'react-dom';\nimport { HotTableProps } from './types';\n\nlet bulkComponentContainer: DocumentFragment | null = null;\n\n/**\n * Warning message for the `autoRowSize`/`autoColumnSize` compatibility check.\n */\nexport const AUTOSIZE_WARNING = 'Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with ' +\n ' the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.';\n\n/**\n * Warning message for the `hot-renderer` obsolete renderer passing method.\n */\nexport const OBSOLETE_HOTRENDERER_WARNING = 'Providing a component-based renderer using `hot-renderer`-annotated component is no longer supported. ' +\n 'Pass your component using `renderer` prop of the `HotTable` or `HotColumn` component instead.';\n\n/**\n * Warning message for the `hot-editor` obsolete editor passing method.\n */\nexport const OBSOLETE_HOTEDITOR_WARNING = 'Providing a component-based editor using `hot-editor`-annotated component is no longer supported. ' +\n 'Pass your component using `editor` prop of the `HotTable` or `HotColumn` component instead.';\n\n/**\n * Warning message for the unexpected children of HotTable component.\n */\nexport const UNEXPECTED_HOTTABLE_CHILDREN_WARNING = 'Unexpected children nodes found in HotTable component. ' +\n 'Only HotColumn components are allowed.';\n\n/**\n * Warning message for the unexpected children of HotColumn component.\n */\nexport const UNEXPECTED_HOTCOLUMN_CHILDREN_WARNING = 'Unexpected children nodes found in HotColumn component. ' +\n 'HotColumn components do not support any children.';\n\n/**\n * Message for the warning thrown if the Handsontable instance has been destroyed.\n */\nexport const HOT_DESTROYED_WARNING = 'The Handsontable instance bound to this component was destroyed and cannot be' +\n ' used properly.';\n\n/**\n * Default classname given to the wrapper container.\n */\nexport const DEFAULT_CLASSNAME = 'hot-wrapper-editor-container';\n\n/**\n * Logs warn to the console if the `console` object is exposed.\n *\n * @param {...*} args Values which will be logged.\n */\nexport function warn(...args: any[]) {\n if (typeof console !== 'undefined') {\n console.warn(...args);\n }\n}\n\n/**\n * Detect if `hot-renderer` or `hot-editor` is defined, and if so, throw an incompatibility warning.\n *\n * @returns {boolean} 'true' if the warning was issued\n */\nexport function displayObsoleteRenderersEditorsWarning(children: ReactNode): boolean {\n if (hasChildElementOfType(children, 'hot-renderer')) {\n warn(OBSOLETE_HOTRENDERER_WARNING);\n return true;\n }\n if (hasChildElementOfType(children, 'hot-editor')) {\n warn(OBSOLETE_HOTEDITOR_WARNING);\n return true;\n }\n\n return false\n}\n\n/**\n * Detect if children of specified type are defined, and if so, throw an incompatibility warning.\n *\n * @param {ReactNode} children Component children nodes\n * @param {ComponentType} Component Component type to check\n * @returns {boolean} 'true' if the warning was issued\n */\nexport function displayChildrenOfTypeWarning(children: ReactNode, Component: ComponentType): boolean {\n const childrenArray: ReactNode[] = React.Children.toArray(children);\n\n if (childrenArray.some((child) => (child as React.ReactElement).type !== Component)) {\n warn(UNEXPECTED_HOTTABLE_CHILDREN_WARNING);\n return true;\n }\n\n return false\n}\n\n/**\n * Detect if children is defined, and if so, throw an incompatibility warning.\n *\n * @param {ReactNode} children Component children nodes\n * @returns {boolean} 'true' if the warning was issued\n */\nexport function displayAnyChildrenWarning(children: ReactNode): boolean {\n const childrenArray: ReactNode[] = React.Children.toArray(children);\n\n if (childrenArray.length) {\n warn(UNEXPECTED_HOTCOLUMN_CHILDREN_WARNING);\n return true;\n }\n\n return false\n}\n\n/**\n * Check the existence of elements of the provided `type` from the `HotColumn` component's children.\n *\n * @param {ReactNode} children HotTable children array.\n * @param {String} type Either `'hot-renderer'` or `'hot-editor'`.\n * @returns {boolean} `true` if the child of that type was found, `false` otherwise.\n */\nfunction hasChildElementOfType(children: ReactNode, type: 'hot-renderer' | 'hot-editor'): boolean {\n const childrenArray: ReactNode[] = React.Children.toArray(children);\n\n return childrenArray.some((child) => {\n return (child as React.ReactElement).props[type] !== void 0;\n });\n}\n\n/**\n * Create an editor portal.\n *\n * @param {Document} doc Document to be used.\n * @param {ComponentType} Editor Editor component or render function.\n * @returns {ReactPortal} The portal for the editor.\n */\nexport function createEditorPortal(doc: Document | null, Editor: HotTableProps['editor'] | undefined): ReactPortal | null {\n if (!doc || !Editor) {\n return null;\n }\n\n const editorElement = <Editor />;\n const containerProps = getContainerAttributesProps({}, false);\n\n containerProps.className = `${DEFAULT_CLASSNAME} ${containerProps.className}`;\n\n return ReactDOM.createPortal(\n <div {...containerProps}>\n {editorElement}\n </div>\n , doc.body);\n}\n\n/**\n * Render a cell component to an external DOM node.\n *\n * @param {React.ReactElement} rElement React element to be used as a base for the component.\n * @param {Document} [ownerDocument] The owner document to set the portal up into.\n * @param {String} portalKey The key to be used for the portal.\n * @param {HTMLElement} [cachedContainer] The cached container to be used for the portal.\n * @returns {{portal: ReactPortal, portalContainer: HTMLElement}} An object containing the portal and its container.\n */\nexport function createPortal(rElement: React.ReactElement, ownerDocument: Document | null = document, portalKey: string, cachedContainer?: HTMLElement): {\n portal: ReactPortal,\n portalContainer: HTMLElement,\n} {\n if (!ownerDocument) {\n ownerDocument = document;\n }\n\n if (!bulkComponentContainer) {\n bulkComponentContainer = ownerDocument.createDocumentFragment();\n }\n\n const portalContainer = cachedContainer ?? ownerDocument.createElement('DIV');\n bulkComponentContainer.appendChild(portalContainer);\n\n return {\n portal: ReactDOM.createPortal(rElement, portalContainer, portalKey),\n portalContainer\n };\n}\n\n/**\n * Get an object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the\n * component.\n *\n * @param {HotTableProps} props Object containing the React element props.\n * @param {Boolean} randomizeId If set to `true`, the function will randomize the `id` property when no `id` was present in the `prop` object.\n * @returns An object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the\n * component.\n */\nexport function getContainerAttributesProps(props: HotTableProps, randomizeId: boolean = true): {id?: string, className: string, style: CSSProperties} {\n return {\n id: props.id || (randomizeId ? 'hot-' + Math.random().toString(36).substring(5) : undefined),\n className: props.className || '',\n style: props.style || {},\n };\n}\n\n/**\n * Checks if the environment that the code runs in is a browser.\n *\n * @returns {boolean}\n */\nexport function isCSR(): boolean {\n return typeof window !== 'undefined';\n}\n\n/**\n * A variant of useEffect hook that does not trigger on initial mount, only updates\n *\n * @param effect Effect function\n * @param deps Effect dependencies\n */\nexport function useUpdateEffect(effect: EffectCallback, deps?: DependencyList): void {\n const notInitialRender = React.useRef(false);\n\n useEffect(() => {\n if (notInitialRender.current) {\n return effect();\n } else {\n notInitialRender.current = true;\n }\n }, deps);\n}\n","import Handsontable from 'handsontable/base';\nimport { HotTableProps } from './types';\n\nexport class SettingsMapper {\n /**\n * Parse component settings into Handsontable-compatible settings.\n *\n * @param {Object} properties Object containing properties from the HotTable object.\n * @param {Object} additionalSettings Additional settings.\n * @param {boolean} additionalSettings.isInit Flag determining whether the settings are being set during initialization.\n * @param {string[]} additionalSettings.initOnlySettingKeys Array of keys that can be set only during initialization.\n * @returns {Object} Handsontable-compatible settings object.\n */\n static getSettings(\n properties: HotTableProps,\n {\n prevProps = {},\n isInit = false,\n initOnlySettingKeys = []\n }: {\n prevProps?: HotTableProps;\n isInit?: boolean;\n initOnlySettingKeys?: Array<keyof Handsontable.GridSettings>\n } = {}): Handsontable.GridSettings {\n const shouldSkipProp = (key: keyof Handsontable.GridSettings) => {\n // Omit settings that can be set only during initialization and are intentionally modified.\n if (!isInit && initOnlySettingKeys.includes(key)) {\n return prevProps[key] === properties[key];\n }\n return false;\n };\n let newSettings: Handsontable.GridSettings = {};\n\n for (const key in properties) {\n if (\n key !== 'children' &&\n !shouldSkipProp(key as keyof Handsontable.GridSettings) &&\n properties.hasOwnProperty(key)\n ) {\n (newSettings as any)[key] = properties[key as keyof HotTableProps];\n }\n }\n\n return newSettings;\n }\n}\n","import Handsontable from 'handsontable/base';\nimport React, {\n ComponentType,\n FC,\n PropsWithChildren,\n ReactPortal,\n createContext,\n useCallback,\n useRef,\n useMemo,\n useContext,\n} from 'react';\nimport { ScopeIdentifier, HotRendererProps } from './types'\nimport { createPortal } from './helpers'\nimport { RenderersPortalManagerRef } from './renderersPortalManager'\n\nexport interface HotTableContextImpl {\n /**\n * Map with column indexes (or a string = 'global') as keys, and booleans as values. Each key represents a component-based editor\n * declared for the used column index, or a global one, if the key is the `global` string.\n */\n readonly componentRendererColumns: Map<ScopeIdentifier, boolean>;\n\n /**\n * Array of object containing the column settings.\n */\n readonly columnsSettings: Handsontable.ColumnSettings[];\n\n /**\n * Sets the column settings based on information received from HotColumn.\n *\n * @param {HotTableProps} columnSettings Column settings object.\n * @param {Number} columnIndex Column index.\n */\n readonly emitColumnSettings: (columnSettings: Handsontable.ColumnSettings, columnIndex: number) => void;\n\n /**\n * Return a renderer wrapper function for the provided renderer component.\n *\n * @param {ComponentType<HotRendererProps>} Renderer React renderer component.\n * @returns {Handsontable.renderers.BaseRenderer} The Handsontable rendering function.\n */\n readonly getRendererWrapper: (Renderer: ComponentType<HotRendererProps>) => typeof Handsontable.renderers.BaseRenderer;\n\n /**\n * Clears portals cache.\n */\n readonly clearPortalCache: () => void;\n\n /**\n * Clears rendered cells cache.\n */\n readonly clearRenderedCellCache: () => void;\n\n /**\n * Set the renderers portal manager dispatch function.\n *\n * @param {RenderersPortalManagerRef} pm The PortalManager dispatch function.\n */\n readonly setRenderersPortalManagerRef: (pm: RenderersPortalManagerRef) => void;\n\n /**\n * Puts cell portals into portal manager and purges portals cache.\n */\n readonly pushCellPortalsIntoPortalManager: () => void;\n}\n\nconst HotTableContext = createContext<HotTableContextImpl | undefined>(undefined);\n\nconst HotTableContextProvider: FC<PropsWithChildren> = ({ children }) => {\n const columnsSettings = useRef<Handsontable.ColumnSettings[]>([]);\n\n const setHotColumnSettings = useCallback((columnSettings: Handsontable.ColumnSettings, columnIndex: number) => {\n columnsSettings.current[columnIndex] = columnSettings;\n }, [])\n\n const componentRendererColumns = useRef<Map<number | 'global', boolean>>(new Map());\n const renderedCellCache = useRef<Map<string, HTMLTableCellElement>>(new Map());\n const clearRenderedCellCache = useCallback(() => renderedCellCache.current.clear(), []);\n const portalCache = useRef<Map<string, ReactPortal>>(new Map());\n const clearPortalCache = useCallback(() => portalCache.current.clear(), []);\n const portalContainerCache = useRef<Map<string, HTMLElement>>(new Map());\n\n const getRendererWrapper = useCallback((Renderer: ComponentType<HotRendererProps>): typeof Handsontable.renderers.BaseRenderer => {\n return function __internalRenderer(instance, TD, row, col, prop, value, cellProperties) {\n const key = `${row}-${col}`;\n\n // Handsontable.Core type is missing guid\n const instanceGuid = (instance as unknown as { guid: string }).guid;\n\n const portalContainerKey = `${instanceGuid}-${key}`\n const portalKey = `${key}-${instanceGuid}`\n\n if (renderedCellCache.current.has(key)) {\n TD.innerHTML = renderedCellCache.current.get(key)!.innerHTML;\n }\n\n if (TD && !TD.getAttribute('ghost-table')) {\n const cachedPortal = portalCache.current.get(portalKey);\n const cachedPortalContainer = portalContainerCache.current.get(portalContainerKey);\n\n while (TD.firstChild) {\n TD.removeChild(TD.firstChild);\n }\n\n // if portal already exists, do not recreate\n if (cachedPortal && cachedPortalContainer) {\n TD.appendChild(cachedPortalContainer);\n } else {\n const rendererElement = (\n <Renderer instance={instance}\n TD={TD}\n row={row}\n col={col}\n prop={prop}\n value={value}\n cellProperties={cellProperties}/>\n );\n\n const {portal, portalContainer} = createPortal(rendererElement, TD.ownerDocument, portalKey, cachedPortalContainer);\n\n portalContainerCache.current.set(portalContainerKey, portalContainer);\n TD.appendChild(portalContainer);\n\n portalCache.current.set(portalKey, portal);\n }\n }\n\n renderedCellCache.current.set(`${row}-${col}`, TD);\n return TD;\n };\n }, []);\n\n const renderersPortalManager = useRef<RenderersPortalManagerRef>(() => undefined);\n\n const setRenderersPortalManagerRef = useCallback((pmComponent: RenderersPortalManagerRef) => {\n renderersPortalManager.current = pmComponent;\n }, []);\n\n const pushCellPortalsIntoPortalManager = useCallback(() => {\n renderersPortalManager.current!([...portalCache.current.values()]);\n }, []);\n\n const contextImpl: HotTableContextImpl = useMemo(() => ({\n componentRendererColumns: componentRendererColumns.current,\n columnsSettings: columnsSettings.current,\n emitColumnSettings: setHotColumnSettings,\n getRendererWrapper,\n clearPortalCache,\n clearRenderedCellCache,\n setRenderersPortalManagerRef,\n pushCellPortalsIntoPortalManager\n }), [setHotColumnSettings, getRendererWrapper, clearRenderedCellCache, setRenderersPortalManagerRef, pushCellPortalsIntoPortalManager]);\n\n return (\n <HotTableContext.Provider value={contextImpl}>{children}</HotTableContext.Provider>\n );\n};\n\n/**\n * Exposes the table context object to components\n *\n * @returns HotTableContext\n */\nfunction useHotTableContext(): HotTableContextImpl {\n return useContext(HotTableContext)!;\n}\n\nexport { HotTableContextProvider, useHotTableContext };\n","import React, {\n FC,\n PropsWithChildren,\n createContext,\n useContext,\n useMemo,\n} from 'react';\n\nexport interface HotColumnContextImpl {\n /**\n * Column index within a HotTable.\n */\n readonly columnIndex: number;\n\n /**\n * Get the `Document` object corresponding to the main component element.\n *\n * @returns The `Document` object used by the component.\n */\n readonly getOwnerDocument: () => Document | null;\n}\n\nconst HotColumnContext = createContext<HotColumnContextImpl | undefined>(undefined);\n\nconst HotColumnContextProvider: FC<PropsWithChildren<HotColumnContextImpl>> = ({ columnIndex, getOwnerDocument, children }) => {\n\n const contextImpl: HotColumnContextImpl = useMemo(() => ({\n columnIndex,\n getOwnerDocument\n }), [columnIndex, getOwnerDocument]);\n\n return (\n <HotColumnContext.Provider value={contextImpl}>{children}</HotColumnContext.Provider>\n );\n};\n\nconst useHotColumnContext = () => useContext(HotColumnContext)!;\n\nexport { useHotColumnContext, HotColumnContextProvider };\n","import React, {\n DependencyList,\n FC,\n MutableRefObject,\n ReactNode,\n Ref,\n RefObject,\n createContext,\n useContext,\n useDeferredValue,\n useImperativeHandle,\n useMemo,\n useState,\n} from 'react';\nimport Handsontable from 'handsontable/base';\nimport { HotEditorHooks, UseHotEditorImpl } from './types';\n\ntype HookPropName = keyof Handsontable.editors.BaseEditor | 'constructor';\n\nconst AbstractMethods: (keyof Handsontable.editors.BaseEditor)[] = [\n 'close',\n 'focus',\n 'open',\n];\nconst ExcludedMethods: (keyof Handsontable.editors.BaseEditor)[] = [\n 'getValue',\n 'setValue',\n];\n\nconst MethodsMap: Partial<\n Record<keyof Handsontable.editors.BaseEditor, keyof HotEditorHooks>\n> = {\n open: 'onOpen',\n close: 'onClose',\n prepare: 'onPrepare',\n focus: 'onFocus',\n};\n\n/**\n * Create a class to be passed to the Handsontable's settings.\n *\n * @param {RefObject<HotEditorHooks>} hooksRef Reference to component-based editor overridden hooks object.\n * @param {RefObject} instanceRef Reference to Handsontable-native custom editor class instance.\n * @returns {Function} A class to be passed to the Handsontable editor settings.\n */\nexport function makeEditorClass(\n hooksRef: MutableRefObject<HotEditorHooks | null>,\n instanceRef: MutableRefObject<Handsontable.editors.BaseEditor | null>\n): typeof Handsontable.editors.BaseEditor {\n return class CustomEditor\n extends Handsontable.editors.BaseEditor\n implements Handsontable.editors.BaseEditor\n {\n private value: any;\n\n constructor(hotInstance: Handsontable.Core) {\n super(hotInstance);\n instanceRef.current = this;\n\n (\n Object.getOwnPropertyNames(\n Handsontable.editors.BaseEditor.prototype\n ) as HookPropName[]\n ).forEach((propName) => {\n if (propName === 'constructor' || ExcludedMethods.includes(propName)) {\n return;\n }\n\n const baseMethod = Handsontable.editors.BaseEditor.prototype[propName];\n (CustomEditor.prototype as any)[propName] = function (\n this: CustomEditor,\n ...args: any[]\n ) {\n let result;\n\n if (!AbstractMethods.includes(propName)) {\n result = baseMethod.call(this, ...args); // call super\n }\n\n if (\n MethodsMap[propName] &&\n hooksRef.current?.[MethodsMap[propName]!]\n ) {\n result = (hooksRef.current[MethodsMap[propName]!] as any).call(\n this,\n ...args\n );\n }\n\n return result;\n }.bind(this);\n });\n }\n\n focus() {}\n\n getValue() {\n return this.value;\n }\n\n setValue(newValue: any) {\n this.value = newValue;\n }\n\n open() {}\n\n close() {}\n };\n}\n\ninterface EditorContextType {\n hooksRef: Ref<HotEditorHooks>;\n hotCustomEditorInstanceRef: RefObject<Handsontable.editors.BaseEditor>;\n}\n\n/**\n * Context to provide Handsontable-native custom editor class instance to overridden hooks object.\n */\nconst EditorContext = createContext<EditorContextType | undefined>(\n undefined\n);\n\ninterface EditorContextProviderProps {\n hooksRef: Ref<HotEditorHooks>;\n hotCustomEditorInstanceRef: RefObject<Handsontable.editors.BaseEditor>;\n children: ReactNode;\n}\n\n/**\n * Provider of the context that exposes Handsontable-native editor instance and passes hooks object\n * for custom editor components.\n *\n * @param {Ref} hooksRef Reference for component-based editor overridden hooks object.\n * @param {RefObject} hotCustomEditorInstanceRef Reference to Handsontable-native editor instance.\n */\nexport const EditorContextProvider: FC<EditorContextProviderProps> = ({\n hooksRef,\n hotCustomEditorInstanceRef,\n children,\n}) => {\n return (\n <EditorContext.Provider value={{ hooksRef, hotCustomEditorInstanceRef }}>\n {children}\n </EditorContext.Provider>\n );\n};\n\n/**\n * Hook that allows encapsulating custom behaviours of component-based editor by customizing passed ref with overridden hooks object.\n *\n * @param {HotEditorHooks} overriddenHooks Overrides specific for the custom editor.\n * @param {DependencyList} deps Overridden hooks object React dependency list.\n * @returns {UseHotEditorImpl} Editor API methods\n */\nexport function useHotEditor<T>(\n overriddenHooks?: HotEditorHooks,\n deps?: DependencyList\n): UseHotEditorImpl<T> {\n const { hooksRef, hotCustomEditorInstanceRef } =\n useContext(EditorContext)!;\n const [rerenderTrigger, setRerenderTrigger] = useState(0);\n const [editorValue, setEditorValue] = useState<T>();\n\n // return a deferred value that allows for optimizing performance by delaying the update of a value until the next render.\n const deferredValue = useDeferredValue(editorValue);\n\n useImperativeHandle(\n hooksRef,\n () => ({\n ...overriddenHooks,\n onOpen() {\n setEditorValue(hotCustomEditorInstanceRef.current?.getValue());\n overriddenHooks?.onOpen?.();\n setRerenderTrigger((t) => t + 1);\n },\n }),\n deps\n );\n\n return useMemo(\n () => ({\n get value(): T | undefined {\n return deferredValue;\n },\n setValue(newValue) {\n setEditorValue(newValue);\n hotCustomEditorInstanceRef.current?.setValue(newValue);\n },\n get isOpen() {\n return hotCustomEditorInstanceRef.current?.isOpened() ?? false;\n },\n finishEditing() {\n hotCustomEditorInstanceRef.current?.finishEditing();\n },\n get row() {\n return hotCustomEditorInstanceRef.current?.row;\n },\n get col() {\n return hotCustomEditorInstanceRef.current?.col;\n },\n }),\n [rerenderTrigger, hotCustomEditorInstanceRef, deferredValue]\n );\n}\n","import React, {\n FC,\n ReactElement,\n useEffect,\n useRef,\n} from 'react';\nimport { HotTableProps, HotColumnProps, HotEditorHooks } from './types';\nimport {\n createEditorPortal,\n displayAnyChildrenWarning,\n displayObsoleteRenderersEditorsWarning\n} from './helpers';\nimport { SettingsMapper } from './settingsMapper';\nimport Handsontable from 'handsontable/base';\nimport { useHotTableContext } from './hotTableContext'\nimport { useHotColumnContext } from './hotColumnContext'\nimport { EditorContextProvider, makeEditorClass } from './hotEditor';\n\nconst isHotColumn = (childNode: any): childNode is ReactElement => childNode.type === HotColumn;\n\nconst internalProps = ['_columnIndex', '_getOwnerDocument', 'children'];\n\nconst HotColumn: FC<HotColumnProps> = (props) => {\n const { componentRendererColumns, emitColumnSettings, getRendererWrapper } = useHotTableContext();\n const { columnIndex, getOwnerDocument } = useHotColumnContext();\n\n /**\n * Reference to component-based editor overridden hooks object.\n */\n const localEditorHooksRef = useRef<HotEditorHooks | null>(null);\n\n /**\n * Reference to HOT-native custom editor class instance.\n */\n const localEditorClassInstance = useRef<Handsontable.editors.BaseEditor | null>(null);\n\n /**\n * Logic performed after mounting & updating of the HotColumn component.\n */\n useEffect(() => {\n\n /**\n * Filter out all the internal properties and return an object with just the Handsontable-related props.\n *\n * @returns {Object}\n */\n const getSettingsProps = (): HotTableProps => {\n return Object.keys(props)\n .filter(key => !internalProps.includes(key))\n .reduce<HotTableProps>((obj, key) => {\n (obj as any)[key] = props[key];\n return obj;\n }, {});\n };\n\n /**\n * Create the column settings based on the data provided to the `HotColumn` component and its child components.\n */\n const createColumnSettings = (): Handsontable.ColumnSettings => {\n const columnSettings = SettingsMapper.getSettings(getSettingsProps()) as unknown as Handsontable.ColumnSettings;\n\n if (props.renderer) {\n columnSettings.renderer = getRendererWrapper(props.renderer);\n componentRendererColumns.set(columnIndex, true);\n } else if (props.hotRenderer) {\n columnSettings.renderer = props.hotRenderer;\n }\n\n if (props.editor) {\n columnSettings.editor = makeEditorClass(localEditorHooksRef, localEditorClassInstance);\n } else if (props.hotEditor) {\n columnSettings.editor = props.hotEditor;\n }\n\n return columnSettings\n };\n\n const columnSettings = createColumnSettings();\n emitColumnSettings(columnSettings, columnIndex);\n\n if (!displayObsoleteRenderersEditorsWarning(props.children)) {\n displayAnyChildrenWarning(props.children);\n }\n });\n\n const editorPortal = createEditorPortal(getOwnerDocument(), props.editor);\n\n /**\n * Render the portals of the editors, if there are any.\n *\n * @returns {ReactElement}\n */\n return (\n <EditorContextProvider hooksRef={localEditorHooksRef}\n hotCustomEditorInstanceRef={localEditorClassInstance}>\n {editorPortal}\n </EditorContextProvider>\n )\n}\n\nexport { HotColumn, isHotColumn };\n","import React, {\n Dispatch,\n ReactPortal,\n forwardRef,\n Fragment,\n useImperativeHandle,\n useState,\n} from 'react';\n\nexport type RenderersPortalManagerRef = Dispatch<ReactPortal[]>;\n\n/**\n * Component used to manage the renderer component portals.\n */\nexport const RenderersPortalManager = forwardRef<RenderersPortalManagerRef, {}>((_, ref) => {\n const [portals, setPortals] = useState<ReactPortal[]>([]);\n useImperativeHandle(ref, () => setPortals);\n\n return (\n <Fragment>\n {portals}\n </Fragment>\n );\n});\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","import React, {\n Children,\n Fragment,\n useEffect,\n useCallback,\n useImperativeHandle,\n useRef,\n forwardRef\n} from 'react';\nimport Handsontable from 'handsontable/base';\nimport { SettingsMapper } from './settingsMapper';\nimport { RenderersPortalManager } from './renderersPortalManager';\nimport { HotColumn, isHotColumn } from './hotColumn';\nimport { HotEditorHooks, HotTableProps, HotTableRef } from './types';\nimport {\n HOT_DESTROYED_WARNING,\n AUTOSIZE_WARNING,\n createEditorPortal,\n getContainerAttributesProps,\n isCSR,\n warn,\n displayObsoleteRenderersEditorsWarning,\n useUpdateEffect,\n displayChildrenOfTypeWarning\n} from './helpers';\nimport PropTypes from 'prop-types';\nimport { getRenderer } from 'handsontable/renderers/registry';\nimport { getEditor } from 'handsontable/editors/registry';\nimport { useHotTableContext } from './hotTableContext'\nimport { HotColumnContextProvider } from './hotColumnContext'\nimport { EditorContextProvider, makeEditorClass } from './hotEditor';\n\nconst HotTableInner = forwardRef<\n HotTableRef,\n HotTableProps\n>((props, ref) => {\n\n /**\n * Reference to the Handsontable instance.\n */\n const __hotInstance = useRef<Handsontable | null>(null);\n\n /**\n * Reference to the main Handsontable DOM element.\n */\n const hotElementRef = useRef<HTMLDivElement>(null);\n\n /**\n * Reference to component-based editor overridden hooks object.\n */\n const globalEditorHooksRef = useRef<HotEditorHooks | null>(null);\n\n /**\n * Reference to HOT-native custom editor class instance.\n */\n const globalEditorClassInstance = useRef<Handsontable.editors.BaseEditor | null>(null);\n\n /**\n * Reference to the previous props object.\n */\n const prevProps = useRef<HotTableProps>();\n\n /**\n * HotTable context exposing helper functions.\n */\n const context = useHotTableContext();\n\n /**\n * Getter for the property storing the Handsontable instance.\n */\n const getHotInstance = useCallback((): Handsontable | null => {\n if (!__hotInstance.current || !__hotInstance.current.isDestroyed) {\n\n // Will return the Handsontable instance or `null` if it's not yet been created.\n return __hotInstance.current;\n\n } else {\n console.warn(HOT_DESTROYED_WARNING);\n\n return null;\n }\n }, [__hotInstance]);\n\n const isHotInstanceDestroyed = useCallback((): boolean => {\n return !__hotInstance.current || __hotInstance.current.isDestroyed;\n }, [__hotInstance]);\n\n /**\n * Clear both the editor and the renderer cache.\n */\n const clearCache = useCallback((): void => {\n context.clearRenderedCellCache();\n context.componentRendererColumns.clear();\n }, [context]);\n\n /**\n * Get the `Document` object corresponding to the main component element.\n *\n * @returns The `Document` object used by the component.\n */\n const getOwnerDocument = useCallback((): Document | null => {\n if (isCSR()) {\n return hotElementRef.current ? hotElementRef.current.ownerDocument : document;\n }\n\n return null;\n }, [hotElementRef]);\n\n /**\n * Create a new settings object containing the column settings and global editors and renderers.\n *\n * @returns {Handsontable.GridSettings} New global set of settings for Handsontable.\n */\n const createNewGlobalSettings = (init: boolean = false, prevProps: HotTableProps = {}): Handsontable.GridSettings => {\n const initOnlySettingKeys = !isHotInstanceDestroyed() ? // Needed for React's double-rendering.\n ((getHotInstance()?.getSettings() as any)?._initOnlySettings || []) :\n [];\n const newSettings = SettingsMapper.getSettings(\n props, {\n prevProps,\n isInit: init,\n initOnlySettingKeys\n }\n );\n\n newSettings.columns = context.columnsSettings.length ? context.columnsSettings : newSettings.columns;\n\n if (props.renderer) {\n newSettings.renderer = context.getRendererWrapper(props.renderer);\n context.componentRendererColumns.set('global', true);\n } else {\n newSettings.renderer = props.hotRenderer || getRenderer('text');\n }\n\n if (props.editor) {\n newSettings.editor = makeEditorClass(globalEditorHooksRef, globalEditorClassInstance);\n } else {\n newSettings.editor = props.hotEditor || getEditor('text');\n }\n\n return newSettings;\n };\n\n /**\n * Detect if `autoRowSize` or `autoColumnSize` is defined, and if so, throw an incompatibility warning.\n */\n const displayAutoSizeWarning = (hotInstance: Handsontable | null): void => {\n if (\n hotInstance &&\n (\n hotInstance.getPlugin('autoRowSize')?.enabled ||\n hotInstance.getPlugin('autoColumnSize')?.enabled\n )\n ) {\n if (context.componentRendererColumns.size > 0) {\n warn(AUTOSIZE_WARNING);\n }\n }\n };\n\n /**\n * Initialize Handsontable after the component has mounted.\n */\n useEffect(() => {\n const newGlobalSettings = createNewGlobalSettings(true);\n\n // Update prevProps with the current props\n prevProps.current = props;\n\n __hotInstance.current = new Handsontable.Core(hotElementRef.current!, newGlobalSettings);\n\n /**\n * Handsontable's `beforeViewRender` hook callback.\n */\n __hotInstance.current.addHook('beforeViewRender', () => {\n context.clearPortalCache();\n context.clearRenderedCellCache();\n });\n\n /**\n * Handsontable's `afterViewRender` hook callback.\n */\n __hotInstance.current.addHook('afterViewRender', () => {\n context.pushCellPortalsIntoPortalManager();\n });\n\n __hotInstance.current.init();\n\n displayAutoSizeWarning(__hotInstance.current);\n\n if (!displayObsoleteRenderersEditorsWarning(props.children)) {\n displayChildrenOfTypeWarning(props.children, HotColumn);\n }\n\n /**\n * Destroy the Handsontable instance when the parent component unmounts.\n */\n return () => {\n clearCache();\n getHotInstance()?.destroy();\n }\n }, []);\n\n /**\n * Logic performed after the component update.\n */\n useUpdateEffect((): void => {\n clearCache();\n\n const hotInstance = getHotInstance();\n\n const newGlobalSettings = createNewGlobalSettings(false, prevProps.current);\n\n // Update prevProps with the current props\n prevProps.current = props;\n\n hotInstance?.updateSettings(newGlobalSettings, false);\n\n displayAutoSizeWarning(hotInstance);\n displayObsoleteRenderersEditorsWarning(props.children);\n });\n\n /**\n * Interface exposed to parent components by HotTable instance via React ref\n */\n useImperativeHandle(ref, () => ({\n get hotElementRef() {\n return hotElementRef.current!;\n },\n get hotInstance() {\n return getHotInstance();\n }\n }));\n\n /**\n * Render the component.\n */\n const hotColumnWrapped = Children.toArray(props.children)\n .filter(isHotColumn)\n .map((childNode, columnIndex) => (\n <HotColumnContextProvider columnIndex={columnIndex}\n getOwnerDocument={getOwnerDocument}\n key={columnIndex}>\n {childNode}\n </HotColumnContextProvider>\n ));\n\n const containerProps = getContainerAttributesProps(props);\n const editorPortal = createEditorPortal(getOwnerDocument(), props.editor);\n\n return (\n <Fragment>\n <div ref={hotElementRef} {...containerProps}>\n {hotColumnWrapped}\n </div>\n <RenderersPortalManager ref={context.setRenderersPortalManagerRef} />\n <EditorContextProvider hooksRef={globalEditorHooksRef}\n hotCustomEditorInstanceRef={globalEditorClassInstance}>\n {editorPortal}\n </EditorContextProvider>\n </Fragment>\n );\n});\n\n/**\n * Prop types to be checked at runtime.\n */\nHotTableInner.propTypes = {\n style: PropTypes.object,\n id: PropTypes.string,\n className: PropTypes.string\n};\n\nexport default HotTableInner;\nexport { HotTableInner };\n","import React, {\n ForwardRefExoticComponent,\n RefAttributes,\n useId,\n forwardRef,\n} from 'react';\nimport * as packageJson from '../package.json';\nimport { HotTableInner } from './hotTableInner';\nimport { HotTableProps, HotTableRef } from './types';\nimport { HotTableContextProvider } from './hotTableContext';\n\ninterface Version {\n version?: string;\n}\n\ntype HotTable = ForwardRefExoticComponent<HotTableProps & RefAttributes<HotTableRef>> & Version;\n\n/**\n * A Handsontable-ReactJS wrapper.\n *\n * To implement, use the `HotTable` tag with properties corresponding to Handsontable options.\n * For example:\n *\n * ```js\n * <HotTable id=\"hot\" data={dataObject} contextMenu={true} colHeaders={true} width={600} height={300} stretchH=\"all\" />\n *\n * // is analogous to\n * let hot = new Handsontable(document.getElementById('hot'), {\n * data: dataObject,\n * contextMenu: true,\n * colHeaders: true,\n * width: 600\n * height: 300\n * });\n *\n * ```\n */\nconst HotTable: HotTable = forwardRef<HotTableRef, HotTableProps>(({ children, ...props }, ref) => {\n const componentId = props.id ?? useId();\n\n return (\n <HotTableContextProvider>\n <HotTableInner id={componentId} {...props} ref={ref}>\n {children}\n </HotTableInner>\n </HotTableContextProvider>\n );\n})\n\n/**\n * Package version.\n *\n * @returns The version number of the package.\n */\nHotTable.version = (packageJson as any).version;\n\nexport default HotTable;\nexport { HotTable };\n"],"names":["bulkComponentContainer","warn","_console","console","apply","arguments","displayObsoleteRenderersEditorsWarning","children","hasChildElementOfType","type","React","Children","toArray","some","child","undefined","props","createEditorPortal","doc","Editor","editorElement","createElement","containerProps","getContainerAttributesProps","className","concat","ReactDOM","createPortal","body","id","Math","random","toString","substring","style","SettingsMapper","_createClass","_classCallCheck","key","value","properties","_ref","length","_ref$prevProps","prevProps","_ref$isInit","isInit","_ref$initOnlySettingK","initOnlySettingKeys","shouldSkipProp","includes","newSettings","hasOwnProperty","HotTableContext","createContext","HotTableContextProvider","columnsSettings","useRef","setHotColumnSettings","useCallback","columnSettings","columnIndex","current","componentRendererColumns","Map","renderedCellCache","clearRenderedCellCache","clear","portalCache","clearPortalCache","portalContainerCache","getRendererWrapper","Renderer","instance","TD","row","col","prop","cellProperties","instanceGuid","guid","portalContainerKey","portalKey","has","innerHTML","get","getAttribute","cachedPortal","cachedPortalContainer","firstChild","removeChild","appendChild","_createPortal","rElement","ownerDocument","document","cachedContainer","createDocumentFragment","portalContainer","portal","set","renderersPortalManager","setRenderersPortalManagerRef","pmComponent","pushCellPortalsIntoPortalManager","_toConsumableArray","values","contextImpl","useMemo","emitColumnSettings","Provider","useHotTableContext","useContext","HotColumnContext","HotColumnContextProvider","getOwnerDocument","AbstractMethods","ExcludedMethods","MethodsMap","open","close","prepare","focus","makeEditorClass","hooksRef","instanceRef","_Handsontable$editors","CustomEditor","hotInstance","_this","_callSuper","Object","getOwnPropertyNames","Handsontable","editors","BaseEditor","prototype","forEach","propName","baseMethod","_hooksRef$current","result","_hooksRef$current$Met","_len","args","Array","_key","call","this","bind","_inherits","newValue","EditorContext","EditorContextProvider","hotCustomEditorInstanceRef","isHotColumn","childNode","HotColumn","internalProps","_useHotTableContext","_useHotColumnContext","localEditorHooksRef","localEditorClassInstance","useEffect","getSettings","keys","filter","reduce","obj","renderer","hotRenderer","editor","hotEditor","createColumnSettings","editorPortal","RenderersPortalManager","forwardRef","_","ref","_useState2","_slicedToArray","useState","portals","setPortals","useImperativeHandle","Fragment","propTypesModule","exports","ReactPropTypesSecret","ReactPropTypesSecret_1","emptyFunction","emptyFunctionWithReset","resetWarningCache","factoryWithThrowingShims","shim","componentName","location","propFullName","secret","err","Error","name","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require$$2","HotTableInner","effect","deps","notInitialRender","__hotInstance","hotElementRef","globalEditorHooksRef","globalEditorClassInstance","context","getHotInstance","isDestroyed","isHotInstanceDestroyed","clearCache","window","createNewGlobalSettings","_getHotInstance","init","_initOnlySettings","columns","getRenderer","getEditor","displayAutoSizeWarning","_hotInstance$getPlugi","_hotInstance$getPlugi2","getPlugin","enabled","size","Component","newGlobalSettings","Core","addHook","_getHotInstance2","destroy","updateSettings","hotColumnWrapped","map","assign","propTypes","HotTable","_props$id","_objectWithoutProperties","_excluded","componentId","useId","version","overriddenHooks","_useContext","rerenderTrigger","setRerenderTrigger","_useState4","setEditorValue","deferredValue","useDeferredValue","_objectSpread","onOpen","_hotCustomEditorInsta","_overriddenHooks$onOp","getValue","t","setValue","_hotCustomEditorInsta2","isOpen","_hotCustomEditorInsta3","_hotCustomEditorInsta4","isOpened","finishEditing","_hotCustomEditorInsta5","_hotCustomEditorInsta6","_hotCustomEditorInsta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AAlC2Q,EAAoCE,YACnDZ,SAAuBW,QAARA,EAAfX,EAAiBS,kBAAME,GAAvBA,EAAAxI,KAAA6H,GACAG,GAAmB,SAACU,GAAC,OAAKA,EAAI,IAChC,GACA,GACFxD,GAGKzH,EAAOA,SACZ,WAAA,MAAO,CACL,SAAIrE,GACF,OAAO+O,CACR,EACDQ,SAAAA,SAASvI,GAAQ,IAAAwI,EACfV,EAAe9H,GACmB,QAAlCwI,EAAArI,EAA2B5F,eAAO/C,IAAAgR,GAAlCA,EAAoCD,SAASvI,EAC9C,EACD,UAAIyI,GAAM,IAAAC,EAAAC,EACR,OAAqD,QAArDD,UAAAC,EAAOxI,EAA2B5F,eAAO/C,IAAAmR,OAAAnR,EAAlCmR,EAAoCC,kBAAUF,IAAAA,GAAAA,CACtD,EACDG,cAAa,WAAA,IAAAC,EACuB,QAAlCA,EAAA3I,EAA2B5F,eAAO/C,IAAAsR,GAAlCA,EAAoCD,eACrC,EACD,OAAIzN,GAAG,IAAA2N,EACL,eAAAA,EAAO5I,EAA2B5F,eAAO/C,IAAAuR,OAAAvR,EAAlCuR,EAAoC3N,GAC5C,EACD,OAAIC,GAAG,IAAA2N,EACL,eAAAA,EAAO7I,EAA2B5F,eAAO/C,IAAAwR,OAAAxR,EAAlCwR,EAAoC3N,GAC7C,EACA,GACF,CAACsM,EAAiBxH,EAA4B4H,GAElD","x_google_ignoreList":[7,8,9]}
@@ -1,4 +1,4 @@
1
- import React, { useEffect, createContext, useRef, useCallback, useMemo, useContext, useState, useDeferredValue, useImperativeHandle, forwardRef, Fragment, Children, useId } from 'react';
1
+ import React, { useEffect, createContext, useContext, useRef, useCallback, useMemo, useState, useDeferredValue, useImperativeHandle, forwardRef, Fragment, Children, useId } from 'react';
2
2
  import ReactDOM from 'react-dom';
3
3
  import Handsontable from 'handsontable/base';
4
4
  import { getRenderer } from 'handsontable/renderers/registry';
@@ -101,7 +101,7 @@ function displayAnyChildrenWarning(children) {
101
101
  function hasChildElementOfType(children, type) {
102
102
  var childrenArray = React.Children.toArray(children);
103
103
  return childrenArray.some(function (child) {
104
- return child.props[type] !== void 0;
104
+ return child.props[type] !== undefined;
105
105
  });
106
106
  }
107
107
  /**
@@ -139,7 +139,7 @@ function createPortal(rElement) {
139
139
  if (!bulkComponentContainer) {
140
140
  bulkComponentContainer = ownerDocument.createDocumentFragment();
141
141
  }
142
- var portalContainer = cachedContainer !== null && cachedContainer !== void 0 ? cachedContainer : ownerDocument.createElement('DIV');
142
+ var portalContainer = cachedContainer !== null && cachedContainer !== undefined ? cachedContainer : ownerDocument.createElement('DIV');
143
143
  bulkComponentContainer.appendChild(portalContainer);
144
144
  return {
145
145
  portal: ReactDOM.createPortal(rElement, portalContainer, portalKey),
@@ -200,7 +200,7 @@ function _arrayWithoutHoles(r) {
200
200
  if (Array.isArray(r)) return _arrayLikeToArray(r);
201
201
  }
202
202
  function _assertThisInitialized(e) {
203
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
203
+ if (undefined === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
204
204
  return e;
205
205
  }
206
206
  function _callSuper(t, o, e) {
@@ -212,20 +212,20 @@ function _classCallCheck(a, n) {
212
212
  function _defineProperties(e, r) {
213
213
  for (var t = 0; t < r.length; t++) {
214
214
  var o = r[t];
215
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
215
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
216
216
  }
217
217
  }
218
218
  function _createClass(e, r, t) {
219
219
  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
220
- writable: !1
220
+ writable: false
221
221
  }), e;
222
222
  }
223
223
  function _defineProperty(e, r, t) {
224
224
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
225
225
  value: t,
226
- enumerable: !0,
227
- configurable: !0,
228
- writable: !0
226
+ enumerable: true,
227
+ configurable: true,
228
+ writable: true
229
229
  }) : e[r] = t, e;
230
230
  }
231
231
  function _getPrototypeOf(t) {
@@ -238,11 +238,11 @@ function _inherits(t, e) {
238
238
  t.prototype = Object.create(e && e.prototype, {
239
239
  constructor: {
240
240
  value: t,
241
- writable: !0,
242
- configurable: !0
241
+ writable: true,
242
+ configurable: true
243
243
  }
244
244
  }), Object.defineProperty(t, "prototype", {
245
- writable: !1
245
+ writable: false
246
246
  }), e && _setPrototypeOf(t, e);
247
247
  }
248
248
  function _isNativeReflectConstruct() {
@@ -264,12 +264,12 @@ function _iterableToArrayLimit(r, l) {
264
264
  i,
265
265
  u,
266
266
  a = [],
267
- f = !0,
268
- o = !1;
267
+ f = true,
268
+ o = false;
269
269
  try {
270
270
  if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
271
271
  } catch (r) {
272
- o = !0, n = r;
272
+ o = true, n = r;
273
273
  } finally {
274
274
  try {
275
275
  if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
@@ -299,7 +299,7 @@ function ownKeys(e, r) {
299
299
  function _objectSpread2(e) {
300
300
  for (var r = 1; r < arguments.length; r++) {
301
301
  var t = null != arguments[r] ? arguments[r] : {};
302
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
302
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
303
303
  _defineProperty(e, r, t[r]);
304
304
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
305
305
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
@@ -313,8 +313,8 @@ function _objectWithoutProperties(e, t) {
313
313
  r,
314
314
  i = _objectWithoutPropertiesLoose(e, t);
315
315
  if (Object.getOwnPropertySymbols) {
316
- var s = Object.getOwnPropertySymbols(e);
317
- for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
316
+ var n = Object.getOwnPropertySymbols(e);
317
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
318
318
  }
319
319
  return i;
320
320
  }
@@ -322,14 +322,14 @@ function _objectWithoutPropertiesLoose(r, e) {
322
322
  if (null == r) return {};
323
323
  var t = {};
324
324
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
325
- if (e.includes(n)) continue;
325
+ if (-1 !== e.indexOf(n)) continue;
326
326
  t[n] = r[n];
327
327
  }
328
328
  return t;
329
329
  }
330
330
  function _possibleConstructorReturn(t, e) {
331
331
  if (e && ("object" == typeof e || "function" == typeof e)) return e;
332
- if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
332
+ if (undefined !== e) throw new TypeError("Derived constructors may only return object or undefined");
333
333
  return _assertThisInitialized(t);
334
334
  }
335
335
  function _setPrototypeOf(t, e) {
@@ -346,12 +346,12 @@ function _toConsumableArray(r) {
346
346
  function _toPrimitive(t, r) {
347
347
  if ("object" != typeof t || !t) return t;
348
348
  var e = t[Symbol.toPrimitive];
349
- if (void 0 !== e) {
350
- var i = e.call(t, r || "default");
349
+ if (undefined !== e) {
350
+ var i = e.call(t, r);
351
351
  if ("object" != typeof i) return i;
352
352
  throw new TypeError("@@toPrimitive must return a primitive value.");
353
353
  }
354
- return ("string" === r ? String : Number)(t);
354
+ return (String )(t);
355
355
  }
356
356
  function _toPropertyKey(t) {
357
357
  var i = _toPrimitive(t, "string");
@@ -370,7 +370,7 @@ function _unsupportedIterableToArray(r, a) {
370
370
  if (r) {
371
371
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
372
372
  var t = {}.toString.call(r).slice(8, -1);
373
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
373
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined;
374
374
  }
375
375
  }
376
376
 
@@ -393,11 +393,11 @@ var SettingsMapper = /*#__PURE__*/function () {
393
393
  function getSettings(properties) {
394
394
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
395
395
  _ref$prevProps = _ref.prevProps,
396
- prevProps = _ref$prevProps === void 0 ? {} : _ref$prevProps,
396
+ prevProps = _ref$prevProps === undefined ? {} : _ref$prevProps,
397
397
  _ref$isInit = _ref.isInit,
398
- isInit = _ref$isInit === void 0 ? false : _ref$isInit,
398
+ isInit = _ref$isInit === undefined ? false : _ref$isInit,
399
399
  _ref$initOnlySettingK = _ref.initOnlySettingKeys,
400
- initOnlySettingKeys = _ref$initOnlySettingK === void 0 ? [] : _ref$initOnlySettingK;
400
+ initOnlySettingKeys = _ref$initOnlySettingK === undefined ? [] : _ref$initOnlySettingK;
401
401
  var shouldSkipProp = function shouldSkipProp(key) {
402
402
  // Omit settings that can be set only during initialization and are intentionally modified.
403
403
  if (!isInit && initOnlySettingKeys.includes(key)) {
@@ -563,7 +563,7 @@ function makeEditorClass(hooksRef, instanceRef) {
563
563
  if (!AbstractMethods.includes(propName)) {
564
564
  result = baseMethod.call.apply(baseMethod, [this].concat(args)); // call super
565
565
  }
566
- if (MethodsMap[propName] && (_hooksRef$current = hooksRef.current) !== null && _hooksRef$current !== void 0 && _hooksRef$current[MethodsMap[propName]]) {
566
+ if (MethodsMap[propName] && (_hooksRef$current = hooksRef.current) !== null && _hooksRef$current !== undefined && _hooksRef$current[MethodsMap[propName]]) {
567
567
  var _hooksRef$current$Met;
568
568
  result = (_hooksRef$current$Met = hooksRef.current[MethodsMap[propName]]).call.apply(_hooksRef$current$Met, [this].concat(args));
569
569
  }
@@ -642,8 +642,8 @@ function useHotEditor(overriddenHooks, deps) {
642
642
  return _objectSpread2(_objectSpread2({}, overriddenHooks), {}, {
643
643
  onOpen: function onOpen() {
644
644
  var _hotCustomEditorInsta, _overriddenHooks$onOp;
645
- setEditorValue((_hotCustomEditorInsta = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta === void 0 ? void 0 : _hotCustomEditorInsta.getValue());
646
- overriddenHooks === null || overriddenHooks === void 0 || (_overriddenHooks$onOp = overriddenHooks.onOpen) === null || _overriddenHooks$onOp === void 0 || _overriddenHooks$onOp.call(overriddenHooks);
645
+ setEditorValue((_hotCustomEditorInsta = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta === undefined ? undefined : _hotCustomEditorInsta.getValue());
646
+ overriddenHooks === null || overriddenHooks === undefined || (_overriddenHooks$onOp = overriddenHooks.onOpen) === null || _overriddenHooks$onOp === undefined || _overriddenHooks$onOp.call(overriddenHooks);
647
647
  setRerenderTrigger(function (t) {
648
648
  return t + 1;
649
649
  });
@@ -658,23 +658,23 @@ function useHotEditor(overriddenHooks, deps) {
658
658
  setValue: function setValue(newValue) {
659
659
  var _hotCustomEditorInsta2;
660
660
  setEditorValue(newValue);
661
- (_hotCustomEditorInsta2 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta2 === void 0 || _hotCustomEditorInsta2.setValue(newValue);
661
+ (_hotCustomEditorInsta2 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta2 === undefined || _hotCustomEditorInsta2.setValue(newValue);
662
662
  },
663
663
  get isOpen() {
664
664
  var _hotCustomEditorInsta3, _hotCustomEditorInsta4;
665
- return (_hotCustomEditorInsta3 = (_hotCustomEditorInsta4 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta4 === void 0 ? void 0 : _hotCustomEditorInsta4.isOpened()) !== null && _hotCustomEditorInsta3 !== void 0 ? _hotCustomEditorInsta3 : false;
665
+ return (_hotCustomEditorInsta3 = (_hotCustomEditorInsta4 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta4 === undefined ? undefined : _hotCustomEditorInsta4.isOpened()) !== null && _hotCustomEditorInsta3 !== undefined ? _hotCustomEditorInsta3 : false;
666
666
  },
667
667
  finishEditing: function finishEditing() {
668
668
  var _hotCustomEditorInsta5;
669
- (_hotCustomEditorInsta5 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta5 === void 0 || _hotCustomEditorInsta5.finishEditing();
669
+ (_hotCustomEditorInsta5 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta5 === undefined || _hotCustomEditorInsta5.finishEditing();
670
670
  },
671
671
  get row() {
672
672
  var _hotCustomEditorInsta6;
673
- return (_hotCustomEditorInsta6 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta6 === void 0 ? void 0 : _hotCustomEditorInsta6.row;
673
+ return (_hotCustomEditorInsta6 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta6 === undefined ? undefined : _hotCustomEditorInsta6.row;
674
674
  },
675
675
  get col() {
676
676
  var _hotCustomEditorInsta7;
677
- return (_hotCustomEditorInsta7 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta7 === void 0 ? void 0 : _hotCustomEditorInsta7.col;
677
+ return (_hotCustomEditorInsta7 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta7 === undefined ? undefined : _hotCustomEditorInsta7.col;
678
678
  }
679
679
  };
680
680
  }, [rerenderTrigger, hotCustomEditorInstanceRef, deferredValue]);
@@ -753,7 +753,7 @@ var HotColumn = function HotColumn(props) {
753
753
  }, editorPortal);
754
754
  };
755
755
 
756
- var version="15.0.1-next-ab94a4c-20250207";
756
+ var version="15.1.0-next-dfdf994-20250206";
757
757
 
758
758
  /**
759
759
  * Component used to manage the renderer component portals.
@@ -1591,7 +1591,7 @@ function requireFactoryWithTypeCheckers() {
1591
1591
  }
1592
1592
  function createUnionTypeChecker(arrayOfTypeCheckers) {
1593
1593
  if (!Array.isArray(arrayOfTypeCheckers)) {
1594
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
1594
+ process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;
1595
1595
  return emptyFunctionThatReturnsNull;
1596
1596
  }
1597
1597
  for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
@@ -1961,7 +1961,7 @@ var HotTableInner = forwardRef(function (props, ref) {
1961
1961
  var prevProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1962
1962
  var initOnlySettingKeys = !isHotInstanceDestroyed() ?
1963
1963
  // Needed for React's double-rendering.
1964
- ((_getHotInstance = getHotInstance()) === null || _getHotInstance === void 0 || (_getHotInstance = _getHotInstance.getSettings()) === null || _getHotInstance === void 0 ? void 0 : _getHotInstance._initOnlySettings) || [] : [];
1964
+ ((_getHotInstance = getHotInstance()) === null || _getHotInstance === undefined || (_getHotInstance = _getHotInstance.getSettings()) === null || _getHotInstance === undefined ? undefined : _getHotInstance._initOnlySettings) || [] : [];
1965
1965
  var newSettings = SettingsMapper.getSettings(props, {
1966
1966
  prevProps: prevProps,
1967
1967
  isInit: init,
@@ -1986,7 +1986,7 @@ var HotTableInner = forwardRef(function (props, ref) {
1986
1986
  */
1987
1987
  var displayAutoSizeWarning = function displayAutoSizeWarning(hotInstance) {
1988
1988
  var _hotInstance$getPlugi, _hotInstance$getPlugi2;
1989
- if (hotInstance && ((_hotInstance$getPlugi = hotInstance.getPlugin('autoRowSize')) !== null && _hotInstance$getPlugi !== void 0 && _hotInstance$getPlugi.enabled || (_hotInstance$getPlugi2 = hotInstance.getPlugin('autoColumnSize')) !== null && _hotInstance$getPlugi2 !== void 0 && _hotInstance$getPlugi2.enabled)) {
1989
+ if (hotInstance && ((_hotInstance$getPlugi = hotInstance.getPlugin('autoRowSize')) !== null && _hotInstance$getPlugi !== undefined && _hotInstance$getPlugi.enabled || (_hotInstance$getPlugi2 = hotInstance.getPlugin('autoColumnSize')) !== null && _hotInstance$getPlugi2 !== undefined && _hotInstance$getPlugi2.enabled)) {
1990
1990
  if (context.componentRendererColumns.size > 0) {
1991
1991
  warn(AUTOSIZE_WARNING);
1992
1992
  }
@@ -2024,7 +2024,7 @@ var HotTableInner = forwardRef(function (props, ref) {
2024
2024
  return function () {
2025
2025
  var _getHotInstance2;
2026
2026
  clearCache();
2027
- (_getHotInstance2 = getHotInstance()) === null || _getHotInstance2 === void 0 || _getHotInstance2.destroy();
2027
+ (_getHotInstance2 = getHotInstance()) === null || _getHotInstance2 === undefined || _getHotInstance2.destroy();
2028
2028
  };
2029
2029
  }, []);
2030
2030
  /**
@@ -2036,7 +2036,7 @@ var HotTableInner = forwardRef(function (props, ref) {
2036
2036
  var newGlobalSettings = createNewGlobalSettings(false, prevProps.current);
2037
2037
  // Update prevProps with the current props
2038
2038
  prevProps.current = props;
2039
- hotInstance === null || hotInstance === void 0 || hotInstance.updateSettings(newGlobalSettings, false);
2039
+ hotInstance === null || hotInstance === undefined || hotInstance.updateSettings(newGlobalSettings, false);
2040
2040
  displayAutoSizeWarning(hotInstance);
2041
2041
  displayObsoleteRenderersEditorsWarning(props.children);
2042
2042
  });
@@ -2108,7 +2108,7 @@ var HotTable = forwardRef(function (_ref, ref) {
2108
2108
  var _props$id;
2109
2109
  var children = _ref.children,
2110
2110
  props = _objectWithoutProperties(_ref, _excluded);
2111
- var componentId = (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : useId();
2111
+ var componentId = (_props$id = props.id) !== null && _props$id !== undefined ? _props$id : useId();
2112
2112
  return React.createElement(HotTableContextProvider, null, React.createElement(HotTableInner, Object.assign({
2113
2113
  id: componentId
2114
2114
  }, props, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handsontable/react-wrapper",
3
- "version": "15.0.1-next-ab94a4c-20250207",
3
+ "version": "15.1.0-next-dfdf994-20250206",
4
4
  "description": "Best Data Grid for React with Spreadsheet Look and Feel.",
5
5
  "author": "Handsoncode <hello@handsoncode.net> (https://handsoncode.net)",
6
6
  "homepage": "https://handsontable.com",
@@ -71,7 +71,7 @@
71
71
  "@types/react-dom": "^18.2.0",
72
72
  "@types/react-redux": "^7.1.7",
73
73
  "cross-env": "^7.0.3",
74
- "handsontable": "15.0.1-next-ab94a4c-20250207",
74
+ "handsontable": "15.1.0-next-dfdf994-20250206",
75
75
  "jest": "^29.7.0",
76
76
  "prop-types": "^15.7.2",
77
77
  "react": "^18.2.0",
@@ -86,7 +86,7 @@
86
86
  "uglify-js": "^3.4.9"
87
87
  },
88
88
  "peerDependencies": {
89
- "handsontable": "15.0.1-next-ab94a4c-20250207"
89
+ "handsontable": "15.1.0-next-dfdf994-20250206"
90
90
  },
91
91
  "scripts": {
92
92
  "build": "npm run clean && npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:min && npm run prepare:types",