@handsontable/react-wrapper 0.0.0-next-7cc7ef7-20241028

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/LICENSE.txt +25 -0
  2. package/README.md +136 -0
  3. package/commonjs/react-handsontable.js +2139 -0
  4. package/commonjs/src/helpers.d.ts +105 -0
  5. package/commonjs/src/hotColumn.d.ts +5 -0
  6. package/commonjs/src/hotColumnContext.d.ts +16 -0
  7. package/commonjs/src/hotEditor.d.ts +33 -0
  8. package/commonjs/src/hotTable.d.ts +29 -0
  9. package/commonjs/src/hotTableContext.d.ts +55 -0
  10. package/commonjs/src/hotTableInner.d.ts +5 -0
  11. package/commonjs/src/index.d.ts +5 -0
  12. package/commonjs/src/renderersPortalManager.d.ts +6 -0
  13. package/commonjs/src/settingsMapper.d.ts +18 -0
  14. package/commonjs/src/types.d.ts +78 -0
  15. package/dist/react-handsontable.js +1133 -0
  16. package/dist/react-handsontable.js.map +1 -0
  17. package/dist/react-handsontable.min.js +31 -0
  18. package/dist/react-handsontable.min.js.map +1 -0
  19. package/dist/src/helpers.d.ts +105 -0
  20. package/dist/src/hotColumn.d.ts +5 -0
  21. package/dist/src/hotColumnContext.d.ts +16 -0
  22. package/dist/src/hotEditor.d.ts +33 -0
  23. package/dist/src/hotTable.d.ts +29 -0
  24. package/dist/src/hotTableContext.d.ts +55 -0
  25. package/dist/src/hotTableInner.d.ts +5 -0
  26. package/dist/src/index.d.ts +5 -0
  27. package/dist/src/renderersPortalManager.d.ts +6 -0
  28. package/dist/src/settingsMapper.d.ts +18 -0
  29. package/dist/src/types.d.ts +78 -0
  30. package/es/react-handsontable.mjs +2125 -0
  31. package/handsontable-non-commercial-license.pdf +0 -0
  32. package/helpers.d.ts +105 -0
  33. package/hotColumn.d.ts +5 -0
  34. package/hotColumnContext.d.ts +16 -0
  35. package/hotEditor.d.ts +33 -0
  36. package/hotTable.d.ts +29 -0
  37. package/hotTableContext.d.ts +55 -0
  38. package/hotTableInner.d.ts +5 -0
  39. package/index.d.ts +5 -0
  40. package/package.json +130 -0
  41. package/renderersPortalManager.d.ts +6 -0
  42. package/settingsMapper.d.ts +18 -0
  43. package/types.d.ts +78 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-handsontable.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/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.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\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\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\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","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","AUTOSIZE_WARNING","OBSOLETE_HOTRENDERER_WARNING","OBSOLETE_HOTEDITOR_WARNING","UNEXPECTED_HOTTABLE_CHILDREN_WARNING","UNEXPECTED_HOTCOLUMN_CHILDREN_WARNING","HOT_DESTROYED_WARNING","DEFAULT_CLASSNAME","warn","console","_console","apply","arguments","displayObsoleteRenderersEditorsWarning","children","hasChildElementOfType","displayChildrenOfTypeWarning","Component","childrenArray","React","Children","toArray","some","child","type","displayAnyChildrenWarning","length","props","createEditorPortal","doc","Editor","editorElement","createElement","containerProps","getContainerAttributesProps","className","concat","ReactDOM","createPortal","body","rElement","ownerDocument","document","portalKey","undefined","cachedContainer","createDocumentFragment","portalContainer","appendChild","portal","randomizeId","id","Math","random","toString","substring","style","isCSR","window","useUpdateEffect","effect","deps","notInitialRender","useRef","useEffect","current","SettingsMapper","_classCallCheck","_createClass","key","value","getSettings","properties","_ref","_ref$prevProps","prevProps","_ref$isInit","isInit","_ref$initOnlySettingK","initOnlySettingKeys","shouldSkipProp","includes","newSettings","hasOwnProperty","HotTableContext","createContext","HotTableContextProvider","columnsSettings","setHotColumnSettings","useCallback","columnSettings","columnIndex","componentRendererColumns","Map","renderedCellCache","clearRenderedCellCache","clear","portalCache","clearPortalCache","portalContainerCache","getRendererWrapper","Renderer","__internalRenderer","instance","TD","row","col","prop","cellProperties","instanceGuid","guid","portalContainerKey","has","innerHTML","get","getAttribute","cachedPortal","cachedPortalContainer","firstChild","removeChild","rendererElement","_createPortal","set","renderersPortalManager","setRenderersPortalManagerRef","pmComponent","pushCellPortalsIntoPortalManager","_toConsumableArray","values","contextImpl","useMemo","emitColumnSettings","Provider","useHotTableContext","useContext","HotColumnContext","HotColumnContextProvider","getOwnerDocument","useHotColumnContext","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","_len","args","Array","_key","call","_hooksRef$current$Met","bind","_inherits","getValue","setValue","newValue","EditorContext","EditorContextProvider","hotCustomEditorInstanceRef","useHotEditor","overriddenHooks","_useContext","_useState","useState","_useState2","_slicedToArray","rerenderTrigger","setRerenderTrigger","_useState3","_useState4","editorValue","setEditorValue","deferredValue","useDeferredValue","useImperativeHandle","_objectSpread","onOpen","_hotCustomEditorInsta","_overriddenHooks$onOp","t","_hotCustomEditorInsta2","isOpen","_hotCustomEditorInsta3","_hotCustomEditorInsta4","isOpened","finishEditing","_hotCustomEditorInsta5","_hotCustomEditorInsta6","_hotCustomEditorInsta7","isHotColumn","childNode","HotColumn","internalProps","_useHotTableContext","_useHotColumnContext","localEditorHooksRef","localEditorClassInstance","getSettingsProps","keys","filter","reduce","obj","createColumnSettings","renderer","hotRenderer","editor","hotEditor","editorPortal","RenderersPortalManager","forwardRef","_","ref","portals","setPortals","Fragment","ReactPropTypesSecret","ReactPropTypesSecret_1","require$$0","emptyFunction","emptyFunctionWithReset","resetWarningCache","factoryWithThrowingShims","shim","componentName","location","propFullName","secret","err","Error","name","isRequired","getShim","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","propTypesModule","exports","require$$2","HotTableInner","__hotInstance","hotElementRef","globalEditorHooksRef","globalEditorClassInstance","context","getHotInstance","isDestroyed","isHotInstanceDestroyed","clearCache","createNewGlobalSettings","_getHotInstance","init","_initOnlySettings","columns","getRenderer","getEditor","displayAutoSizeWarning","_hotInstance$getPlugi","_hotInstance$getPlugi2","getPlugin","enabled","size","newGlobalSettings","Core","addHook","_getHotInstance2","destroy","updateSettings","hotColumnWrapped","map","assign","propTypes","HotTable","_props$id","_objectWithoutProperties","_excluded","componentId","useId","version","packageJson"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA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AAA,CAAAA,GAAAA,SAAA,GAAII,WAAK,EAAE,CAAA;AAEvC,EAAA,OACExS,wCAACmE,uBAAuB,EAAA,IAAA,EACtBnE,yBAAA,CAAAa,aAAA,CAACqP,aAAa,EAAC3H,MAAA,CAAA0J,MAAA,CAAA;AAAAjQ,IAAAA,EAAE,EAAEuQ,WAAAA;KAAiB/R,KAAK,EAAA;AAAE4M,IAAAA,GAAG,EAAEA,GAAAA;AAC7C,GAAA,CAAA,EAAAzN,QAAQ,CACK,CACQ,CAAA;AAE9B,CAAC,EAAC;AAEF;;;;AAIG;AACHwS,QAAQ,CAACM,OAAO,GAAIC,OAA2B;;;;;;;;;;;;;;","x_google_ignoreList":[7,8,9]}
@@ -0,0 +1,31 @@
1
+ /*!
2
+ * Copyright (c) HANDSONCODE sp. z o. o.
3
+ *
4
+ * HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o., a Polish corporation based in
5
+ * Gdynia, Poland, at Aleja Zwyciestwa 96-98, registered by the District Court in Gdansk under number
6
+ * 538651, EU tax ID number: PL5862294002, share capital: PLN 62,800.00.
7
+ *
8
+ * This software is protected by applicable copyright laws, including international treaties, and dual-
9
+ * licensed - depending on whether your use for commercial purposes, meaning intended for or
10
+ * resulting in commercial advantage or monetary compensation, or not.
11
+ *
12
+ * If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing
13
+ * the suitability, performance, and usefulness of this software outside the production environment,
14
+ * you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.
15
+ *
16
+ * Your use of this software for commercial purposes is subject to the terms included in an applicable
17
+ * license agreement.
18
+ *
19
+ * In any case, you must not make any such use of this software as to develop software which may be
20
+ * considered competitive with this software.
21
+ *
22
+ * UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"
23
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO
24
+ * LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
25
+ * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
+ * USE OR INABILITY TO USE THIS SOFTWARE.
27
+ *
28
+ * Version: 0.0.0-next-7cc7ef7-20241028 (built at Mon Oct 28 2024 11:28:20 GMT+0100 (Central European Standard Time))
29
+ */
30
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("handsontable/base"),require("handsontable/renderers/registry"),require("handsontable/editors/registry")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","handsontable/base","handsontable/renderers/registry","handsontable/editors/registry"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Handsontable=e.Handsontable||{},e.Handsontable.react={}),e.React,e.ReactDOM,e.Handsontable,e.Handsontable.renderers,e.Handsontable.editors)}(this,(function(e,t,n,r,o,u){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(t),l=a(n),c=a(r),s=null;function d(){var e;void 0!==console&&(e=console).warn.apply(e,arguments)}function f(e){return p(e,"hot-renderer")?(d("Providing a component-based renderer using `hot-renderer`-annotated component is no longer supported. Pass your component using `renderer` prop of the `HotTable` or `HotColumn` component instead."),!0):!!p(e,"hot-editor")&&(d("Providing a component-based editor using `hot-editor`-annotated component is no longer supported. Pass your component using `editor` prop of the `HotTable` or `HotColumn` component instead."),!0)}function p(e,t){return i.default.Children.toArray(e).some((function(e){return void 0!==e.props[t]}))}function m(e,t){if(!e||!t)return null;var n=i.default.createElement(t,null),r=v({},!1);return r.className="".concat("hot-wrapper-editor-container"," ").concat(r.className),l.default.createPortal(i.default.createElement("div",Object.assign({},r),n),e.body)}function v(e){return{id:e.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function h(e,t,n){return t=w(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,R()?Reflect.construct(t,n||[],w(e).constructor):t.apply(e,n))}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function O(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,u,a,i=[],l=!0,c=!1;try{if(u=(n=n.call(e)).next,0===t);else for(;!(l=(r=u.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}(e,t)||H(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||H(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function H(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}var T=function(){return O((function e(){b(this,e)}),null,[{key:"getSettings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.prevProps,r=void 0===n?{}:n,o=t.isInit,u=void 0!==o&&o,a=t.initOnlySettingKeys,i=void 0===a?[]:a,l=function(t){return!(u||!i.includes(t))&&r[t]===e[t]},c={};for(var s in e)"children"!==s&&!l(s)&&e.hasOwnProperty(s)&&(c[s]=e[s]);return c}}])}(),x=t.createContext(void 0),_=function(e){var n=e.children,r=t.useRef([]),o=t.useCallback((function(e,t){r.current[t]=e}),[]),u=t.useRef(new Map),a=t.useRef(new Map),c=t.useCallback((function(){return a.current.clear()}),[]),d=t.useRef(new Map),f=t.useCallback((function(){return d.current.clear()}),[]),p=t.useRef(new Map),m=t.useCallback((function(e){return function(t,n,r,o,u,c,f){var m="".concat(r,"-").concat(o),v=t.guid,y="".concat(v,"-").concat(m),h="".concat(m,"-").concat(v);if(a.current.has(m)&&(n.innerHTML=a.current.get(m).innerHTML),n&&!n.getAttribute("ghost-table")){for(var b=d.current.get(h),g=p.current.get(y);n.firstChild;)n.removeChild(n.firstChild);if(b&&g)n.appendChild(g);else{var O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;t||(t=document),s||(s=t.createDocumentFragment());var o=null!=r?r:t.createElement("DIV");return s.appendChild(o),{portal:l.default.createPortal(e,o,n),portalContainer:o}}(i.default.createElement(e,{instance:t,TD:n,row:r,col:o,prop:u,value:c,cellProperties:f}),n.ownerDocument,h,g),C=O.portal,w=O.portalContainer;p.current.set(y,w),n.appendChild(w),d.current.set(h,C)}}return a.current.set("".concat(r,"-").concat(o),n),n}}),[]),v=t.useRef((function(){})),y=t.useCallback((function(e){v.current=e}),[]),h=t.useCallback((function(){v.current(k(d.current.values()))}),[]),b=t.useMemo((function(){return{componentRendererColumns:u.current,columnsSettings:r.current,emitColumnSettings:o,getRendererWrapper:m,clearPortalCache:f,clearRenderedCellCache:c,setRenderersPortalManagerRef:y,pushCellPortalsIntoPortalManager:h}}),[o,m,c,y,h]);return i.default.createElement(x.Provider,{value:b},n)};function D(){return t.useContext(x)}var M=t.createContext(void 0),A=function(e){var n=e.columnIndex,r=e.getOwnerDocument,o=e.children,u=t.useMemo((function(){return{columnIndex:n,getOwnerDocument:r}}),[n,r]);return i.default.createElement(M.Provider,{value:u},o)},V=["close","focus","open"],N=["getValue","setValue"],z={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function q(e,t){return function(n){function r(n){var o;return b(this,r),o=h(this,r,[n]),t.current=o,Object.getOwnPropertyNames(c.default.editors.BaseEditor.prototype).forEach((function(t){if("constructor"!==t&&!N.includes(t)){var n=c.default.editors.BaseEditor.prototype[t];r.prototype[t]=function(){for(var r,o,u,a=arguments.length,i=Array(a),l=0;a>l;l++)i[l]=arguments[l];(V.includes(t)||(o=n.call.apply(n,[this].concat(i))),z[t]&&null!==(r=e.current)&&void 0!==r&&r[z[t]])&&(o=(u=e.current[z[t]]).call.apply(u,[this].concat(i)));return o}.bind(o)}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(r,n),O(r,[{key:"focus",value:function(){}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(e){this.value=e}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(c.default.editors.BaseEditor)}var B=t.createContext(void 0),W=function(e){return i.default.createElement(B.Provider,{value:{hooksRef:e.hooksRef,hotCustomEditorInstanceRef:e.hotCustomEditorInstanceRef}},e.children)};var F=function(e){return e.type===L},U=["_columnIndex","_getOwnerDocument","children"],L=function(e){var n=D(),r=n.componentRendererColumns,o=n.emitColumnSettings,u=n.getRendererWrapper,a=t.useContext(M),l=a.columnIndex,c=a.getOwnerDocument,s=t.useRef(null),p=t.useRef(null);t.useEffect((function(){var t=function(){var t=T.getSettings(Object.keys(e).filter((function(e){return!U.includes(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}));return e.renderer?(t.renderer=u(e.renderer),r.set(l,!0)):e.hotRenderer&&(t.renderer=e.hotRenderer),e.editor?t.editor=q(s,p):e.hotEditor&&(t.editor=e.hotEditor),t}();o(t,l),f(e.children)||i.default.Children.toArray(e.children).length&&d("Unexpected children nodes found in HotColumn component. HotColumn components do not support any children.")}));var v=m(c(),e.editor);return i.default.createElement(W,{hooksRef:s,hotCustomEditorInstanceRef:p},v)},K=t.forwardRef((function(e,n){var r=S(t.useState([]),2),o=r[0],u=r[1];return t.useImperativeHandle(n,(function(){return u})),i.default.createElement(t.Fragment,null,o)}));function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $,G,J,Q,X={exports:{}};X.exports=function(){if(Q)return J;Q=1;var e=G?$:(G=1,$="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,J=function(){function r(t,n,r,o,u,a){if(a!==e){var i=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function o(){return r}r.isRequired=r;var u={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return u.PropTypes=u,u}}()();var Z=Y(X.exports),ee=t.forwardRef((function(e,n){var r,a,l,s=t.useRef(null),p=t.useRef(null),y=t.useRef(null),h=t.useRef(null),b=t.useRef(),g=D(),O=t.useCallback((function(){return s.current&&s.current.isDestroyed?(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null):s.current}),[s]),C=t.useCallback((function(){return!s.current||s.current.isDestroyed}),[s]),w=t.useCallback((function(){g.clearRenderedCellCache(),g.componentRendererColumns.clear()}),[g]),R=t.useCallback((function(){return"undefined"!=typeof window?p.current?p.current.ownerDocument:document:null}),[p]),P=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=C()?[]:(null===(t=O())||void 0===t||null===(t=t.getSettings())||void 0===t?void 0:t._initOnlySettings)||[],i=T.getSettings(e,{prevProps:r,isInit:n,initOnlySettingKeys:a});return i.columns=g.columnsSettings.length?g.columnsSettings:i.columns,e.renderer?(i.renderer=g.getRendererWrapper(e.renderer),g.componentRendererColumns.set("global",!0)):i.renderer=e.hotRenderer||o.getRenderer("text"),i.editor=e.editor?q(y,h):e.hotEditor||u.getEditor("text"),i},E=function(e){var t,n;e&&(null!==(t=e.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||null!==(n=e.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&g.componentRendererColumns.size>0&&d("Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.")};t.useEffect((function(){var t,n=P(!0);return b.current=e,s.current=new c.default.Core(p.current,n),s.current.addHook("beforeViewRender",(function(){g.clearPortalCache(),g.clearRenderedCellCache()})),s.current.addHook("afterViewRender",(function(){g.pushCellPortalsIntoPortalManager()})),s.current.init(),E(s.current),f(e.children)||(t=L,i.default.Children.toArray(e.children).some((function(e){return e.type!==t}))&&d("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var e;w(),null===(e=O())||void 0===e||e.destroy()}}),[]),r=function(){w();var t=O(),n=P(!1,b.current);b.current=e,null==t||t.updateSettings(n,!1),E(t),f(e.children)},l=i.default.useRef(!1),t.useEffect((function(){if(l.current)return r();l.current=!0}),a),t.useImperativeHandle(n,(function(){return{get hotElementRef(){return p.current},get hotInstance(){return O()}}}));var j=t.Children.toArray(e.children).filter(F).map((function(e,t){return i.default.createElement(A,{columnIndex:t,getOwnerDocument:R,key:t},e)})),S=v(e),k=m(R(),e.editor);return i.default.createElement(t.Fragment,null,i.default.createElement("div",Object.assign({ref:p},S),j),i.default.createElement(K,{ref:g.setRenderersPortalManagerRef}),i.default.createElement(W,{hooksRef:y,hotCustomEditorInstanceRef:h},k))}));ee.propTypes={style:Z.object,id:Z.string,className:Z.string};var te=["children"],ne=t.forwardRef((function(e,n){var r,o=e.children,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;u.length>r;r++)t.includes(n=u[r])||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,te),a=null!==(r=u.id)&&void 0!==r?r:t.useId();return i.default.createElement(_,null,i.default.createElement(ee,Object.assign({id:a},u,{ref:n}),o))}));ne.version="0.0.0-next-7cc7ef7-20241028",e.HotColumn=L,e.HotTable=ne,e.default=ne,e.isHotColumn=F,e.useHotEditor=function(e,n){var r=t.useContext(B),o=r.hooksRef,u=r.hotCustomEditorInstanceRef,a=S(t.useState(0),2),i=a[0],l=a[1],c=S(t.useState(),2),s=c[1],d=t.useDeferredValue(c[0]);return t.useImperativeHandle(o,(function(){return E(E({},e),{},{onOpen:function(){var t,n;s(null===(t=u.current)||void 0===t?void 0:t.getValue()),null==e||null===(n=e.onOpen)||void 0===n||n.call(e),l((function(e){return e+1}))}})}),n),t.useMemo((function(){return{get value(){return d},setValue:function(e){var t;s(e),null===(t=u.current)||void 0===t||t.setValue(e)},get isOpen(){var e,t;return null!==(e=null===(t=u.current)||void 0===t?void 0:t.isOpened())&&void 0!==e&&e},finishEditing:function(){var e;null===(e=u.current)||void 0===e||e.finishEditing()},get row(){var e;return null===(e=u.current)||void 0===e?void 0:e.row},get col(){var e;return null===(e=u.current)||void 0===e?void 0:e.col}}}),[i,u,d])},Object.defineProperty(e,"__esModule",{value:!0})}));
31
+ //# sourceMappingURL=react-handsontable.min.js.map
@@ -0,0 +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,EAAK,QAACC,SAASC,QAAQL,GAErCM,MAAK,SAACC,GACvB,YAAqD,IAA7CA,EAA6BC,MAAMN,EAC/C,GACF,CASgB,SAAAO,EAAmBC,EAAsBC,GACvD,IAAKD,IAAQC,EACX,OAAO,KAGT,IAAMC,EAAgBT,EAAC,QAAAU,cAAAF,QACjBG,EAAiBC,EAA4B,CAAE,GAAE,GAIvD,OAFAD,EAAeE,UAASC,GAAAA,OAhGO,+BAgGgBA,KAAAA,OAAIH,EAAeE,WAE3DE,EAAQ,QAACC,aACdhB,+CAASW,GACNF,GAEDF,EAAIU,KACV,UAyCgBL,EAA4BP,GAC1C,MAAO,CACLa,GAAIb,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_google_ignoreList":[7,8,9]}
@@ -0,0 +1,105 @@
1
+ import React, { ComponentType, CSSProperties, DependencyList, EffectCallback, ReactNode, ReactPortal } from 'react';
2
+ import { HotTableProps } from './types';
3
+ /**
4
+ * Warning message for the `autoRowSize`/`autoColumnSize` compatibility check.
5
+ */
6
+ export declare const AUTOSIZE_WARNING: string;
7
+ /**
8
+ * Warning message for the `hot-renderer` obsolete renderer passing method.
9
+ */
10
+ export declare const OBSOLETE_HOTRENDERER_WARNING: string;
11
+ /**
12
+ * Warning message for the `hot-editor` obsolete editor passing method.
13
+ */
14
+ export declare const OBSOLETE_HOTEDITOR_WARNING: string;
15
+ /**
16
+ * Warning message for the unexpected children of HotTable component.
17
+ */
18
+ export declare const UNEXPECTED_HOTTABLE_CHILDREN_WARNING: string;
19
+ /**
20
+ * Warning message for the unexpected children of HotColumn component.
21
+ */
22
+ export declare const UNEXPECTED_HOTCOLUMN_CHILDREN_WARNING: string;
23
+ /**
24
+ * Message for the warning thrown if the Handsontable instance has been destroyed.
25
+ */
26
+ export declare const HOT_DESTROYED_WARNING: string;
27
+ /**
28
+ * Default classname given to the wrapper container.
29
+ */
30
+ export declare const DEFAULT_CLASSNAME = "hot-wrapper-editor-container";
31
+ /**
32
+ * Logs warn to the console if the `console` object is exposed.
33
+ *
34
+ * @param {...*} args Values which will be logged.
35
+ */
36
+ export declare function warn(...args: any[]): void;
37
+ /**
38
+ * Detect if `hot-renderer` or `hot-editor` is defined, and if so, throw an incompatibility warning.
39
+ *
40
+ * @returns {boolean} 'true' if the warning was issued
41
+ */
42
+ export declare function displayObsoleteRenderersEditorsWarning(children: ReactNode): boolean;
43
+ /**
44
+ * Detect if children of specified type are defined, and if so, throw an incompatibility warning.
45
+ *
46
+ * @param {ReactNode} children Component children nodes
47
+ * @param {ComponentType} Component Component type to check
48
+ * @returns {boolean} 'true' if the warning was issued
49
+ */
50
+ export declare function displayChildrenOfTypeWarning(children: ReactNode, Component: ComponentType): boolean;
51
+ /**
52
+ * Detect if children is defined, and if so, throw an incompatibility warning.
53
+ *
54
+ * @param {ReactNode} children Component children nodes
55
+ * @returns {boolean} 'true' if the warning was issued
56
+ */
57
+ export declare function displayAnyChildrenWarning(children: ReactNode): boolean;
58
+ /**
59
+ * Create an editor portal.
60
+ *
61
+ * @param {Document} doc Document to be used.
62
+ * @param {ComponentType} Editor Editor component or render function.
63
+ * @returns {ReactPortal} The portal for the editor.
64
+ */
65
+ export declare function createEditorPortal(doc: Document | null, Editor: HotTableProps['editor'] | undefined): ReactPortal | null;
66
+ /**
67
+ * Render a cell component to an external DOM node.
68
+ *
69
+ * @param {React.ReactElement} rElement React element to be used as a base for the component.
70
+ * @param {Document} [ownerDocument] The owner document to set the portal up into.
71
+ * @param {String} portalKey The key to be used for the portal.
72
+ * @param {HTMLElement} [cachedContainer] The cached container to be used for the portal.
73
+ * @returns {{portal: ReactPortal, portalContainer: HTMLElement}} An object containing the portal and its container.
74
+ */
75
+ export declare function createPortal(rElement: React.ReactElement, ownerDocument: Document | null | undefined, portalKey: string, cachedContainer?: HTMLElement): {
76
+ portal: ReactPortal;
77
+ portalContainer: HTMLElement;
78
+ };
79
+ /**
80
+ * Get an object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the
81
+ * component.
82
+ *
83
+ * @param {HotTableProps} props Object containing the React element props.
84
+ * @param {Boolean} randomizeId If set to `true`, the function will randomize the `id` property when no `id` was present in the `prop` object.
85
+ * @returns An object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the
86
+ * component.
87
+ */
88
+ export declare function getContainerAttributesProps(props: HotTableProps, randomizeId?: boolean): {
89
+ id?: string;
90
+ className: string;
91
+ style: CSSProperties;
92
+ };
93
+ /**
94
+ * Checks if the environment that the code runs in is a browser.
95
+ *
96
+ * @returns {boolean}
97
+ */
98
+ export declare function isCSR(): boolean;
99
+ /**
100
+ * A variant of useEffect hook that does not trigger on initial mount, only updates
101
+ *
102
+ * @param effect Effect function
103
+ * @param deps Effect dependencies
104
+ */
105
+ export declare function useUpdateEffect(effect: EffectCallback, deps?: DependencyList): void;
@@ -0,0 +1,5 @@
1
+ import React, { FC } from 'react';
2
+ import { HotColumnProps } from './types';
3
+ declare const isHotColumn: (childNode: any) => childNode is React.ReactElement<any, string | ((props: any, deprecatedLegacyContext?: any) => React.ReactElement<any, any> | null) | (new (props: any, deprecatedLegacyContext?: any) => React.Component<any, any, any>)>;
4
+ declare const HotColumn: FC<HotColumnProps>;
5
+ export { HotColumn, isHotColumn };
@@ -0,0 +1,16 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ export interface HotColumnContextImpl {
3
+ /**
4
+ * Column index within a HotTable.
5
+ */
6
+ readonly columnIndex: number;
7
+ /**
8
+ * Get the `Document` object corresponding to the main component element.
9
+ *
10
+ * @returns The `Document` object used by the component.
11
+ */
12
+ readonly getOwnerDocument: () => Document | null;
13
+ }
14
+ declare const HotColumnContextProvider: FC<PropsWithChildren<HotColumnContextImpl>>;
15
+ declare const useHotColumnContext: () => HotColumnContextImpl;
16
+ export { useHotColumnContext, HotColumnContextProvider };
@@ -0,0 +1,33 @@
1
+ import { DependencyList, FC, MutableRefObject, ReactNode, Ref, RefObject } from 'react';
2
+ import Handsontable from 'handsontable/base';
3
+ import { HotEditorHooks, UseHotEditorImpl } from './types';
4
+ /**
5
+ * Create a class to be passed to the Handsontable's settings.
6
+ *
7
+ * @param {RefObject<HotEditorHooks>} hooksRef Reference to component-based editor overridden hooks object.
8
+ * @param {RefObject} instanceRef Reference to Handsontable-native custom editor class instance.
9
+ * @returns {Function} A class to be passed to the Handsontable editor settings.
10
+ */
11
+ export declare function makeEditorClass(hooksRef: MutableRefObject<HotEditorHooks | null>, instanceRef: MutableRefObject<Handsontable.editors.BaseEditor | null>): typeof Handsontable.editors.BaseEditor;
12
+ interface EditorContextProviderProps {
13
+ hooksRef: Ref<HotEditorHooks>;
14
+ hotCustomEditorInstanceRef: RefObject<Handsontable.editors.BaseEditor>;
15
+ children: ReactNode;
16
+ }
17
+ /**
18
+ * Provider of the context that exposes Handsontable-native editor instance and passes hooks object
19
+ * for custom editor components.
20
+ *
21
+ * @param {Ref} hooksRef Reference for component-based editor overridden hooks object.
22
+ * @param {RefObject} hotCustomEditorInstanceRef Reference to Handsontable-native editor instance.
23
+ */
24
+ export declare const EditorContextProvider: FC<EditorContextProviderProps>;
25
+ /**
26
+ * Hook that allows encapsulating custom behaviours of component-based editor by customizing passed ref with overridden hooks object.
27
+ *
28
+ * @param {HotEditorHooks} overriddenHooks Overrides specific for the custom editor.
29
+ * @param {DependencyList} deps Overridden hooks object React dependency list.
30
+ * @returns {UseHotEditorImpl} Editor API methods
31
+ */
32
+ export declare function useHotEditor<T>(overriddenHooks?: HotEditorHooks, deps?: DependencyList): UseHotEditorImpl<T>;
33
+ export {};
@@ -0,0 +1,29 @@
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ import { HotTableProps, HotTableRef } from './types';
3
+ interface Version {
4
+ version?: string;
5
+ }
6
+ declare type HotTable = ForwardRefExoticComponent<HotTableProps & RefAttributes<HotTableRef>> & Version;
7
+ /**
8
+ * A Handsontable-ReactJS wrapper.
9
+ *
10
+ * To implement, use the `HotTable` tag with properties corresponding to Handsontable options.
11
+ * For example:
12
+ *
13
+ * ```js
14
+ * <HotTable id="hot" data={dataObject} contextMenu={true} colHeaders={true} width={600} height={300} stretchH="all" />
15
+ *
16
+ * // is analogous to
17
+ * let hot = new Handsontable(document.getElementById('hot'), {
18
+ * data: dataObject,
19
+ * contextMenu: true,
20
+ * colHeaders: true,
21
+ * width: 600
22
+ * height: 300
23
+ * });
24
+ *
25
+ * ```
26
+ */
27
+ declare const HotTable: HotTable;
28
+ export default HotTable;
29
+ export { HotTable };