@handsontable/react 10.0.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"react-handsontable.min.js","sources":["../src/helpers.tsx","../src/settingsMapper.ts","../src/hotColumn.tsx","../src/portalManager.tsx","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/index.js","../../../node_modules/object-assign/index.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../node_modules/prop-types/index.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../src/hotTable.tsx","../src/baseEditorComponent.tsx"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { HotEditorElement } from './types';\n\nlet bulkComponentContainer = 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 * 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 */\nconst 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) {\n if (typeof console !== 'undefined') {\n console.warn(...args);\n }\n}\n\n/**\n * Filter out and return elements of the provided `type` from the `HotColumn` component's children.\n *\n * @param {React.ReactNode} children HotTable children array.\n * @param {String} type Either `'hot-renderer'` or `'hot-editor'`.\n * @returns {Object|null} A child (React node) or `null`, if no child of that type was found.\n */\nexport function getChildElementByType(children: React.ReactNode, type: string): React.ReactElement | null {\n const childrenArray: React.ReactNode[] = React.Children.toArray(children);\n const childrenCount: number = React.Children.count(children);\n let wantedChild: React.ReactNode | null = null;\n\n if (childrenCount !== 0) {\n if (childrenCount === 1 && (childrenArray[0] as React.ReactElement).props[type]) {\n wantedChild = childrenArray[0];\n\n } else {\n wantedChild = childrenArray.find((child) => {\n return (child as React.ReactElement).props[type] !== void 0;\n });\n }\n }\n\n return (wantedChild as React.ReactElement) || null;\n}\n\n/**\n * Get the reference to the original editor class.\n *\n * @param {React.ReactElement} editorElement React element of the editor class.\n * @returns {Function} Original class of the editor component.\n */\nexport function getOriginalEditorClass(editorElement: HotEditorElement) {\n if (!editorElement) {\n return null;\n }\n\n return editorElement.type.WrappedComponent ? editorElement.type.WrappedComponent : editorElement.type;\n}\n\n/**\n * Remove editor containers from DOM.\n *\n * @param {Document} [doc] Document to be used.\n * @param {Map} editorCache The editor cache reference.\n */\nexport function removeEditorContainers(doc = document): void {\n doc.querySelectorAll(`[class^=\"${DEFAULT_CLASSNAME}\"]`).forEach((domNode) => {\n if (domNode.parentNode) {\n domNode.parentNode.removeChild(domNode);\n }\n });\n}\n\n/**\n * Create an editor portal.\n *\n * @param {Document} [doc] Document to be used.\n * @param {React.ReactElement} editorElement Editor's element.\n * @param {Map} editorCache The editor cache reference.\n * @returns {React.ReactPortal} The portal for the editor.\n */\nexport function createEditorPortal(doc = document, editorElement: HotEditorElement, editorCache: Map<Function, React.Component>): React.ReactPortal {\n if (editorElement === null) {\n return;\n }\n\n const editorContainer = doc.createElement('DIV');\n const {id, className, style} = getContainerAttributesProps(editorElement.props, false);\n\n if (id) {\n editorContainer.id = id;\n }\n\n editorContainer.className = [DEFAULT_CLASSNAME, className].join(' ');\n\n if (style) {\n Object.assign(editorContainer.style, style);\n }\n\n doc.body.appendChild(editorContainer);\n\n return ReactDOM.createPortal(editorElement, editorContainer);\n}\n\n/**\n * Get an editor element extended with a instance-emitting method.\n *\n * @param {React.ReactNode} children Component children.\n * @param {Map} editorCache Component's editor cache.\n * @returns {React.ReactElement} An editor element containing the additional methods.\n */\nexport function getExtendedEditorElement(children: React.ReactNode, editorCache: Map<Function, object>): React.ReactElement | null {\n const editorElement = getChildElementByType(children, 'hot-editor');\n const editorClass = getOriginalEditorClass(editorElement);\n\n if (!editorElement) {\n return null;\n }\n\n return React.cloneElement(editorElement, {\n emitEditorInstance: (editorInstance) => {\n editorCache.set(editorClass, editorInstance);\n },\n isEditor: true\n } as object);\n}\n\n/**\n * Create a react component and render it to an external DOM done.\n *\n * @param {React.ReactElement} rElement React element to be used as a base for the component.\n * @param {Object} props Props to be passed to the cloned element.\n * @param {Function} callback Callback to be called after the component has been mounted.\n * @param {Document} [ownerDocument] The owner document to set the portal up into.\n * @returns {{portal: React.ReactPortal, portalContainer: HTMLElement}} An object containing the portal and its container.\n */\nexport function createPortal(rElement: React.ReactElement, props, callback: Function, ownerDocument: Document = document): {\n portal: React.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 = ownerDocument.createElement('DIV');\n bulkComponentContainer.appendChild(portalContainer);\n\n const extendedRendererElement = React.cloneElement(rElement, {\n key: `${props.row}-${props.col}`,\n ...props\n });\n\n return {\n portal: ReactDOM.createPortal(extendedRendererElement, portalContainer, `${props.row}-${props.col}-${Math.random()}`),\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 {Object} 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, randomizeId: boolean = true): {id: string, className: string, style: object} {\n return {\n id: props.id || (randomizeId ? 'hot-' + Math.random().toString(36).substring(5) : void 0),\n className: props.className || '',\n style: props.style || {},\n }\n}\n\n/**\n * Add the `UNSAFE_` prefixes to the deprecated lifecycle methods for React >= 16.3.\n *\n * @param {Object} instance Instance to have the methods renamed.\n */\nexport function addUnsafePrefixes(instance: {\n UNSAFE_componentWillUpdate?: Function,\n componentWillUpdate: Function,\n UNSAFE_componentWillMount?: Function,\n componentWillMount: Function\n}): void {\n const reactSemverArray = React.version.split('.').map((v) => parseInt(v));\n const shouldPrefix = reactSemverArray[0] >= 16 && reactSemverArray[1] >= 3;\n\n if (shouldPrefix) {\n instance.UNSAFE_componentWillUpdate = instance.componentWillUpdate;\n instance.componentWillUpdate = void 0;\n\n instance.UNSAFE_componentWillMount = instance.componentWillMount;\n instance.componentWillMount = void 0;\n }\n}\n","import Handsontable from 'handsontable';\nimport { HotTableProps } from './types';\n\nexport class SettingsMapper {\n /**\n * Parse component settings into Handosntable-compatible settings.\n *\n * @param {Object} properties Object containing properties from the HotTable object.\n * @returns {Object} Handsontable-compatible settings object.\n */\n static getSettings(properties: HotTableProps): Handsontable.GridSettings {\n let newSettings: Handsontable.GridSettings = {};\n\n if (properties.settings) {\n let settings = properties.settings;\n for (const key in settings) {\n if (settings.hasOwnProperty(key)) {\n newSettings[key] = settings[key];\n }\n }\n }\n\n for (const key in properties) {\n if (key !== 'settings' && key !== 'children' && properties.hasOwnProperty(key)) {\n newSettings[key] = properties[key];\n }\n }\n\n return newSettings;\n }\n}\n","import React, { ReactPortal } from 'react';\nimport { HotTableProps, HotColumnProps } from './types';\nimport {\n addUnsafePrefixes,\n createEditorPortal,\n getExtendedEditorElement\n} from './helpers';\nimport { SettingsMapper } from './settingsMapper';\nimport Handsontable from 'handsontable';\n\nclass HotColumn extends React.Component<HotColumnProps, {}> {\n internalProps: string[];\n columnSettings: Handsontable.ColumnSettings;\n\n /**\n * Local editor portal cache.\n *\n * @private\n * @type {ReactPortal}\n */\n private localEditorPortal: ReactPortal = null;\n\n /**\n * HotColumn class constructor.\n *\n * @param {HotColumnProps} props Component props.\n * @param {*} [context] Component context.\n */\n constructor(props: HotColumnProps, context?: any) {\n super(props, context);\n\n addUnsafePrefixes(this);\n }\n\n /**\n * Get the local editor portal cache property.\n *\n * @return {ReactPortal} Local editor portal.\n */\n getLocalEditorPortal(): ReactPortal {\n return this.localEditorPortal;\n }\n\n /**\n * Set the local editor portal cache property.\n *\n * @param {ReactPortal} portal Local editor portal.\n */\n setLocalEditorPortal(portal): void {\n this.localEditorPortal = portal;\n }\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 getSettingsProps(): HotTableProps {\n this.internalProps = ['__componentRendererColumns', '_emitColumnSettings', '_columnIndex', '_getChildElementByType', '_getRendererWrapper',\n '_getEditorClass', '_getEditorCache', '_getOwnerDocument', 'hot-renderer', 'hot-editor', 'children'];\n\n return Object.keys(this.props)\n .filter(key => {\n return !this.internalProps.includes(key);\n })\n .reduce((obj, key) => {\n obj[key] = this.props[key];\n\n return obj;\n }, {});\n }\n\n /**\n * Check whether the HotColumn component contains a provided prop.\n *\n * @param {String} propName Property name.\n * @returns {Boolean}\n */\n hasProp(propName: string): boolean {\n return !!this.props[propName];\n }\n\n /**\n * Get the editor element for the current column.\n *\n * @returns {React.ReactElement} React editor component element.\n */\n getLocalEditorElement(): React.ReactElement | null {\n return getExtendedEditorElement(this.props.children, this.props._getEditorCache());\n }\n\n /**\n * Create the column settings based on the data provided to the `HotColumn` component and it's child components.\n */\n createColumnSettings(): void {\n const rendererElement: React.ReactElement = this.props._getChildElementByType(this.props.children, 'hot-renderer');\n const editorElement: React.ReactElement = this.getLocalEditorElement();\n\n this.columnSettings = SettingsMapper.getSettings(this.getSettingsProps()) as unknown as Handsontable.ColumnSettings;\n\n if (rendererElement !== null) {\n this.columnSettings.renderer = this.props._getRendererWrapper(rendererElement);\n this.props._componentRendererColumns.set(this.props._columnIndex, true);\n\n } else if (this.hasProp('renderer')) {\n this.columnSettings.renderer = this.props.renderer;\n\n } else {\n this.columnSettings.renderer = void 0;\n }\n\n if (editorElement !== null) {\n this.columnSettings.editor = this.props._getEditorClass(editorElement);\n\n } else if (this.hasProp('editor')) {\n this.columnSettings.editor = this.props.editor;\n\n } else {\n this.columnSettings.editor = void 0;\n }\n }\n\n /**\n * Create the local editor portal and its destination HTML element if needed.\n *\n * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.\n */\n createLocalEditorPortal(children = this.props.children): void {\n const editorCache = this.props._getEditorCache();\n const localEditorElement: React.ReactElement = getExtendedEditorElement(children, editorCache);\n\n if (localEditorElement) {\n this.setLocalEditorPortal(createEditorPortal(this.props._getOwnerDocument(), localEditorElement, editorCache));\n }\n }\n\n /**\n * Emit the column settings to the parent using a prop passed from the parent.\n */\n emitColumnSettings(): void {\n this.props._emitColumnSettings(this.columnSettings, this.props._columnIndex);\n }\n\n /*\n ---------------------------------------\n ------- React lifecycle methods -------\n ---------------------------------------\n */\n\n /**\n * Logic performed before the mounting of the HotColumn component.\n */\n componentWillMount(): void {\n this.createLocalEditorPortal();\n }\n\n /**\n * Logic performed after the mounting of the HotColumn component.\n */\n componentDidMount(): void {\n this.createColumnSettings();\n this.emitColumnSettings();\n }\n\n /**\n * Logic performed before the updating of the HotColumn component.\n */\n componentWillUpdate(nextProps: Readonly<HotColumnProps>, nextState: Readonly<{}>, nextContext: any): void {\n this.createLocalEditorPortal(nextProps.children);\n }\n\n /**\n * Logic performed after the updating of the HotColumn component.\n */\n componentDidUpdate(): void {\n this.createColumnSettings();\n this.emitColumnSettings();\n }\n\n /**\n * Render the portals of the editors, if there are any.\n *\n * @returns {React.ReactElement}\n */\n render(): React.ReactElement {\n return (\n <React.Fragment>\n {this.getLocalEditorPortal()}\n </React.Fragment>\n )\n }\n}\n\nexport { HotColumn };\n","import React from 'react';\n\n/**\n * Component class used to manage the renderer component portals.\n */\nexport class PortalManager extends React.Component<{}, {portals?: React.ReactPortal[]}> {\n constructor(props) {\n super(props);\n\n this.state = {\n portals: []\n };\n }\n\n render(): React.ReactNode {\n return (\n <React.Fragment>\n {this.state.portals}\n </React.Fragment>\n )\n }\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\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';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\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 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 ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\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 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\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","/**\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 from 'react';\nimport Handsontable from 'handsontable';\nimport { SettingsMapper } from './settingsMapper';\nimport { PortalManager } from './portalManager';\nimport { HotColumn } from './hotColumn';\nimport * as packageJson from '../package.json';\nimport {\n HotTableProps,\n HotEditorElement\n} from './types';\nimport {\n HOT_DESTROYED_WARNING,\n AUTOSIZE_WARNING,\n createEditorPortal,\n createPortal,\n getChildElementByType,\n getContainerAttributesProps,\n getExtendedEditorElement,\n getOriginalEditorClass,\n addUnsafePrefixes,\n removeEditorContainers,\n warn\n} from './helpers';\nimport PropTypes from 'prop-types';\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 *\n * @class HotTable\n */\nclass HotTable extends React.Component<HotTableProps, {}> {\n /**\n * The `id` of the main Handsontable DOM element.\n *\n * @type {String}\n */\n id: string = null;\n /**\n * Reference to the Handsontable instance.\n *\n * @private\n * @type {Object}\n */\n __hotInstance: Handsontable | null = null;\n /**\n * Reference to the main Handsontable DOM element.\n *\n * @type {HTMLElement}\n */\n hotElementRef: HTMLElement = null;\n /**\n * Class name added to the component DOM element.\n *\n * @type {String}\n */\n className: string;\n /**\n * Style object passed to the component.\n *\n * @type {React.CSSProperties}\n */\n style: React.CSSProperties;\n\n /**\n * Array of object containing the column settings.\n *\n * @type {Array}\n */\n columnSettings: Handsontable.ColumnSettings[] = [];\n\n /**\n * Component used to manage the renderer portals.\n *\n * @type {React.Component}\n */\n portalManager: PortalManager = null;\n\n /**\n * Array containing the portals cashed to be rendered in bulk after Handsontable's render cycle.\n */\n portalCacheArray: React.ReactPortal[] = [];\n\n /**\n * Global editor portal cache.\n *\n * @private\n * @type {React.ReactPortal}\n */\n private globalEditorPortal: React.ReactPortal = null;\n\n /**\n * The rendered cells cache.\n *\n * @private\n * @type {Map}\n */\n private renderedCellCache: Map<string, HTMLTableCellElement> = new Map();\n\n /**\n * Editor cache.\n *\n * @private\n * @type {Map}\n */\n private editorCache: Map<Function, React.Component> = new Map();\n\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 * @private\n * @type {Map}\n */\n private componentRendererColumns: Map<number | string, boolean> = new Map();\n\n /**\n * HotTable class constructor.\n *\n * @param {HotTableProps} props Component props.\n * @param {*} [context] Component context.\n */\n constructor(props: HotTableProps, context?: any) {\n super(props, context);\n\n addUnsafePrefixes(this);\n }\n\n /**\n * Package version getter.\n *\n * @returns The version number of the package.\n */\n static get version(): string {\n return (packageJson as any).version;\n }\n\n /**\n * Getter for the property storing the Handsontable instance.\n */\n get hotInstance(): Handsontable | null {\n if (!this.__hotInstance || (this.__hotInstance && !this.__hotInstance.isDestroyed)) {\n\n // Will return the Handsontable instance or `null` if it's not yet been created.\n return this.__hotInstance;\n\n } else {\n console.warn(HOT_DESTROYED_WARNING);\n\n return null;\n }\n }\n\n /**\n * Setter for the property storing the Handsontable instance.\n * @param {Handsontable} hotInstance The Handsontable instance.\n */\n set hotInstance(hotInstance) {\n this.__hotInstance = hotInstance;\n }\n\n /**\n * Prop types to be checked at runtime.\n */\n static propTypes: object = {\n style: PropTypes.object,\n id: PropTypes.string,\n className: PropTypes.string\n };\n\n /**\n * Get the rendered table cell cache.\n *\n * @returns {Map}\n */\n getRenderedCellCache(): Map<string, HTMLTableCellElement> {\n return this.renderedCellCache;\n }\n\n /**\n * Get the editor cache and return it.\n *\n * @returns {Map}\n */\n getEditorCache(): Map<Function, React.Component> {\n return this.editorCache;\n }\n\n /**\n * Get the global editor portal property.\n *\n * @return {React.ReactPortal} The global editor portal.\n */\n getGlobalEditorPortal(): React.ReactPortal {\n return this.globalEditorPortal;\n }\n\n /**\n * Set the private editor portal cache property.\n *\n * @param {React.ReactPortal} portal Global editor portal.\n */\n setGlobalEditorPortal(portal: React.ReactPortal): void {\n this.globalEditorPortal = portal;\n }\n\n /**\n * Clear both the editor and the renderer cache.\n */\n clearCache(): void {\n const renderedCellCache = this.getRenderedCellCache();\n\n this.setGlobalEditorPortal(null);\n removeEditorContainers(this.getOwnerDocument());\n this.getEditorCache().clear();\n\n renderedCellCache.clear();\n\n this.componentRendererColumns.clear();\n }\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 getOwnerDocument() {\n return this.hotElementRef ? this.hotElementRef.ownerDocument : document;\n }\n\n /**\n * Set the reference to the main Handsontable DOM element.\n *\n * @param {HTMLElement} element The main Handsontable DOM element.\n */\n private setHotElementRef(element: HTMLElement): void {\n this.hotElementRef = element;\n }\n\n /**\n * Return a renderer wrapper function for the provided renderer component.\n *\n * @param {React.ReactElement} rendererElement React renderer component.\n * @returns {Handsontable.renderers.Base} The Handsontable rendering function.\n */\n getRendererWrapper(rendererElement: React.ReactElement): Handsontable.renderers.Base | any {\n const hotTableComponent = this;\n\n return function (instance, TD, row, col, prop, value, cellProperties) {\n const renderedCellCache = hotTableComponent.getRenderedCellCache();\n\n if (renderedCellCache.has(`${row}-${col}`)) {\n TD.innerHTML = renderedCellCache.get(`${row}-${col}`).innerHTML;\n }\n\n if (TD && !TD.getAttribute('ghost-table')) {\n\n const {portal, portalContainer} = createPortal(rendererElement, {\n TD,\n row,\n col,\n prop,\n value,\n cellProperties,\n isRenderer: true\n }, () => {\n }, TD.ownerDocument);\n\n while (TD.firstChild) {\n TD.removeChild(TD.firstChild);\n }\n\n TD.appendChild(portalContainer);\n\n hotTableComponent.portalCacheArray.push(portal);\n }\n\n renderedCellCache.set(`${row}-${col}`, TD);\n\n return TD;\n };\n }\n\n /**\n * Create a fresh class to be used as an editor, based on the provided editor React element.\n *\n * @param {React.ReactElement} editorElement React editor component.\n * @returns {Function} A class to be passed to the Handsontable editor settings.\n */\n getEditorClass(editorElement: HotEditorElement): typeof Handsontable.editors.BaseEditor {\n const editorClass = getOriginalEditorClass(editorElement);\n const editorCache = this.getEditorCache();\n let cachedComponent: React.Component = editorCache.get(editorClass);\n\n return this.makeEditorClass(cachedComponent);\n }\n\n /**\n * Create a class to be passed to the Handsontable's settings.\n *\n * @param {React.ReactElement} editorComponent React editor component.\n * @returns {Function} A class to be passed to the Handsontable editor settings.\n */\n makeEditorClass(editorComponent: React.Component): typeof Handsontable.editors.BaseEditor {\n const customEditorClass = class CustomEditor extends Handsontable.editors.BaseEditor implements Handsontable._editors.Base {\n editorComponent: React.Component;\n\n constructor(hotInstance, row, col, prop, TD, cellProperties) {\n super(hotInstance, row, col, prop, TD, cellProperties);\n\n (editorComponent as any).hotCustomEditorInstance = this;\n\n this.editorComponent = editorComponent;\n }\n\n focus() {\n }\n\n getValue() {\n }\n\n setValue() {\n }\n\n open() {\n }\n\n close() {\n }\n } as any;\n\n // Fill with the rest of the BaseEditor methods\n Object.getOwnPropertyNames(Handsontable.editors.BaseEditor.prototype).forEach(propName => {\n if (propName === 'constructor') {\n return;\n }\n\n customEditorClass.prototype[propName] = function (...args) {\n return editorComponent[propName].call(editorComponent, ...args);\n }\n });\n\n return customEditorClass;\n }\n\n /**\n * Get the renderer element for the entire HotTable instance.\n *\n * @returns {React.ReactElement} React renderer component element.\n */\n getGlobalRendererElement(): React.ReactElement {\n const hotTableSlots: React.ReactNode = this.props.children;\n\n return getChildElementByType(hotTableSlots, 'hot-renderer');\n }\n\n /**\n * Get the editor element for the entire HotTable instance.\n *\n * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.\n * @returns {React.ReactElement} React editor component element.\n */\n getGlobalEditorElement(children: React.ReactNode = this.props.children): HotEditorElement | null {\n return getExtendedEditorElement(children, this.getEditorCache());\n }\n\n /**\n * Create the global editor portal and its destination HTML element if needed.\n *\n * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.\n */\n createGlobalEditorPortal(children: React.ReactNode = this.props.children): void {\n const globalEditorElement: HotEditorElement = this.getGlobalEditorElement(children);\n\n if (globalEditorElement) {\n this.setGlobalEditorPortal(createEditorPortal(this.getOwnerDocument() ,globalEditorElement, this.getEditorCache()))\n }\n }\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 createNewGlobalSettings(): Handsontable.GridSettings {\n const newSettings = SettingsMapper.getSettings(this.props);\n const globalRendererNode = this.getGlobalRendererElement();\n const globalEditorNode = this.getGlobalEditorElement();\n\n newSettings.columns = this.columnSettings.length ? this.columnSettings : newSettings.columns;\n\n if (globalEditorNode) {\n newSettings.editor = this.getEditorClass(globalEditorNode);\n\n } else {\n newSettings.editor = this.props.editor || (this.props.settings ? this.props.settings.editor : void 0);\n }\n\n if (globalRendererNode) {\n newSettings.renderer = this.getRendererWrapper(globalRendererNode);\n this.componentRendererColumns.set('global', true);\n\n } else {\n newSettings.renderer = this.props.renderer || (this.props.settings ? this.props.settings.renderer : void 0);\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 * @param {Handsontable.GridSettings} newGlobalSettings New global settings passed as Handsontable config.\n */\n displayAutoSizeWarning(newGlobalSettings: Handsontable.GridSettings): void {\n if (\n this.hotInstance &&\n (\n this.hotInstance.getPlugin('autoRowSize').enabled ||\n this.hotInstance.getPlugin('autoColumnSize').enabled\n )\n ){\n if (this.componentRendererColumns.size > 0) {\n warn(AUTOSIZE_WARNING);\n }\n }\n }\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 setHotColumnSettings(columnSettings: Handsontable.ColumnSettings, columnIndex: number): void {\n this.columnSettings[columnIndex] = columnSettings;\n }\n\n /**\n * Handsontable's `beforeViewRender` hook callback.\n */\n handsontableBeforeViewRender(): void {\n this.getRenderedCellCache().clear();\n }\n\n /**\n * Handsontable's `afterViewRender` hook callback.\n */\n handsontableAfterViewRender(): void {\n this.portalManager.setState(() => {\n return Object.assign({}, {\n portals: this.portalCacheArray\n });\n\n }, () => {\n this.portalCacheArray.length = 0;\n });\n }\n\n /**\n * Call the `updateSettings` method for the Handsontable instance.\n *\n * @param {Object} newSettings The settings object.\n */\n private updateHot(newSettings: Handsontable.GridSettings): void {\n if (this.hotInstance) {\n this.hotInstance.updateSettings(newSettings, false);\n }\n }\n\n /**\n * Set the portal manager ref.\n *\n * @param {React.ReactComponent} pmComponent The PortalManager component.\n */\n private setPortalManagerRef(pmComponent: PortalManager): void {\n this.portalManager = pmComponent;\n }\n\n /*\n ---------------------------------------\n ------- React lifecycle methods -------\n ---------------------------------------\n */\n\n /**\n * Logic performed before the mounting of the component.\n */\n componentWillMount(): void {\n this.clearCache();\n this.createGlobalEditorPortal();\n }\n\n /**\n * Initialize Handsontable after the component has mounted.\n */\n componentDidMount(): void {\n const hotTableComponent = this;\n const newGlobalSettings = this.createNewGlobalSettings();\n\n this.hotInstance = new Handsontable.Core(this.hotElementRef, newGlobalSettings);\n\n this.hotInstance.addHook('beforeViewRender', function (isForced) {\n hotTableComponent.handsontableBeforeViewRender();\n });\n\n this.hotInstance.addHook('afterViewRender', function () {\n hotTableComponent.handsontableAfterViewRender();\n });\n\n // `init` missing in Handsontable's type definitions.\n (this.hotInstance as any).init();\n\n this.displayAutoSizeWarning(newGlobalSettings);\n }\n\n /**\n * Logic performed before the component update.\n */\n componentWillUpdate(nextProps: Readonly<HotTableProps>, nextState: Readonly<{}>, nextContext: any): void {\n this.clearCache();\n removeEditorContainers(this.getOwnerDocument());\n this.createGlobalEditorPortal(nextProps.children);\n }\n\n /**\n * Logic performed after the component update.\n */\n componentDidUpdate(): void {\n const newGlobalSettings = this.createNewGlobalSettings();\n this.updateHot(newGlobalSettings);\n\n this.displayAutoSizeWarning(newGlobalSettings);\n }\n\n /**\n * Destroy the Handsontable instance when the parent component unmounts.\n */\n componentWillUnmount(): void {\n if (this.hotInstance) {\n this.hotInstance.destroy();\n }\n\n removeEditorContainers(this.getOwnerDocument());\n }\n\n /**\n * Render the component.\n */\n render(): React.ReactElement {\n const {id, className, style} = getContainerAttributesProps(this.props);\n const isHotColumn = (childNode: any) => childNode.type === HotColumn;\n let children = React.Children.toArray(this.props.children);\n\n // filter out anything that's not a HotColumn\n children = children.filter(function (childNode: any) {\n return isHotColumn(childNode);\n });\n\n // clone the HotColumn nodes and extend them with the callbacks\n let childClones = children.map((childNode: React.ReactElement, columnIndex: number) => {\n return React.cloneElement(childNode, {\n _componentRendererColumns: this.componentRendererColumns,\n _emitColumnSettings: this.setHotColumnSettings.bind(this),\n _columnIndex: columnIndex,\n _getChildElementByType: getChildElementByType.bind(this),\n _getRendererWrapper: this.getRendererWrapper.bind(this),\n _getEditorClass: this.getEditorClass.bind(this),\n _getOwnerDocument: this.getOwnerDocument.bind(this),\n _getEditorCache: this.getEditorCache.bind(this),\n children: childNode.props.children\n } as object);\n });\n\n // add the global editor to the list of children\n childClones.push(this.getGlobalEditorPortal());\n\n return (\n <React.Fragment>\n <div ref={this.setHotElementRef.bind(this)} id={id} className={className} style={style}>\n {childClones}\n </div>\n <PortalManager ref={this.setPortalManagerRef.bind(this)}></PortalManager>\n </React.Fragment>\n )\n }\n}\n\nexport default HotTable;\nexport { HotTable };\n","import React from 'react';\nimport Handsontable from 'handsontable';\nimport { HotEditorProps } from './types';\n\nclass BaseEditorComponent<P = {}, S = {}, SS = any> extends React.Component<P | HotEditorProps, S> implements Handsontable._editors.Base {\n name = 'BaseEditorComponent';\n instance = null;\n row = null;\n col = null;\n prop = null;\n TD = null;\n originalValue = null;\n cellProperties = null;\n state = null;\n hotInstance = null;\n hotCustomEditorInstance = null;\n hot = null;\n\n constructor(props) {\n super(props);\n\n if (props.emitEditorInstance) {\n props.emitEditorInstance(this);\n }\n }\n\n // BaseEditor methods:\n private _fireCallbacks(...args) {\n (Handsontable.editors.BaseEditor.prototype as any)._fireCallbacks.call(this.hotCustomEditorInstance, ...args);\n }\n\n beginEditing(...args) {\n return Handsontable.editors.BaseEditor.prototype.beginEditing.call(this.hotCustomEditorInstance, ...args);\n }\n\n cancelChanges(...args) {\n return Handsontable.editors.BaseEditor.prototype.cancelChanges.call(this.hotCustomEditorInstance, ...args);\n }\n\n checkEditorSection(...args) {\n return Handsontable.editors.BaseEditor.prototype.checkEditorSection.call(this.hotCustomEditorInstance, ...args);\n }\n\n close(...args) {\n return Handsontable.editors.BaseEditor.prototype.close.call(this.hotCustomEditorInstance, ...args);\n }\n\n discardEditor(...args) {\n return Handsontable.editors.BaseEditor.prototype.discardEditor.call(this.hotCustomEditorInstance, ...args);\n }\n\n enableFullEditMode(...args) {\n return Handsontable.editors.BaseEditor.prototype.enableFullEditMode.call(this.hotCustomEditorInstance, ...args);\n }\n\n extend(...args) {\n return Handsontable.editors.BaseEditor.prototype.extend.call(this.hotCustomEditorInstance, ...args);\n }\n\n finishEditing(...args) {\n return Handsontable.editors.BaseEditor.prototype.finishEditing.call(this.hotCustomEditorInstance, ...args);\n }\n\n focus(...args) {\n return Handsontable.editors.BaseEditor.prototype.focus.call(this.hotCustomEditorInstance, ...args);\n }\n\n getValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.getValue.call(this.hotCustomEditorInstance, ...args);\n }\n\n init(...args) {\n return Handsontable.editors.BaseEditor.prototype.init.call(this.hotCustomEditorInstance, ...args);\n }\n\n isInFullEditMode(...args) {\n return Handsontable.editors.BaseEditor.prototype.isInFullEditMode.call(this.hotCustomEditorInstance, ...args);\n }\n\n isOpened(...args) {\n return Handsontable.editors.BaseEditor.prototype.isOpened.call(this.hotCustomEditorInstance, ...args);\n }\n\n isWaiting(...args) {\n return Handsontable.editors.BaseEditor.prototype.isWaiting.call(this.hotCustomEditorInstance, ...args);\n }\n\n open(...args) {\n return Handsontable.editors.BaseEditor.prototype.open.call(this.hotCustomEditorInstance, ...args);\n }\n\n prepare(row, col, prop, TD, originalValue, cellProperties) {\n this.hotInstance = cellProperties.instance;\n this.row = row;\n this.col = col;\n this.prop = prop;\n this.TD = TD;\n this.originalValue = originalValue;\n this.cellProperties = cellProperties;\n\n return Handsontable.editors.BaseEditor.prototype.prepare.call(this.hotCustomEditorInstance, row, col, prop, TD, originalValue, cellProperties);\n }\n\n saveValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.saveValue.call(this.hotCustomEditorInstance, ...args);\n }\n\n setValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.setValue.call(this.hotCustomEditorInstance, ...args);\n }\n\n addHook(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).addHook.call(this.hotCustomEditorInstance, ...args);\n }\n\n removeHooksByKey(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).removeHooksByKey.call(this.hotCustomEditorInstance, ...args);\n }\n\n clearHooks(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).clearHooks.call(this.hotCustomEditorInstance, ...args);\n }\n\n getEditedCell(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).getEditedCell.call(this.hotCustomEditorInstance, ...args);\n }\n\n getEditedCellsZIndex(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).getEditedCellsZIndex.call(this.hotCustomEditorInstance, ...args);\n }\n}\n\nexport default BaseEditorComponent;\nexport { BaseEditorComponent };\n"],"names":["bulkComponentContainer","DEFAULT_CLASSNAME","getChildElementByType","children","type","childrenArray","React","Children","toArray","childrenCount","count","wantedChild","props","find","child","getOriginalEditorClass","editorElement","WrappedComponent","removeEditorContainers","doc","document","querySelectorAll","forEach","domNode","parentNode","removeChild","createEditorPortal","editorContainer","createElement","getContainerAttributesProps","id","className","style","join","Object","assign","body","appendChild","ReactDOM","createPortal","getExtendedEditorElement","editorCache","editorClass","cloneElement","emitEditorInstance","editorInstance","set","isEditor","randomizeId","Math","random","toString","substring","addUnsafePrefixes","instance","reactSemverArray","version","split","map","v","parseInt","UNSAFE_componentWillUpdate","componentWillUpdate","UNSAFE_componentWillMount","componentWillMount","SettingsMapper","properties","newSettings","settings","key","hasOwnProperty","HotColumn","context","this","localEditorPortal","portal","internalProps","keys","filter","_this2","includes","reduce","obj","propName","_getEditorCache","rendererElement","_getChildElementByType","getLocalEditorElement","columnSettings","getSettings","getSettingsProps","renderer","_getRendererWrapper","_componentRendererColumns","_columnIndex","hasProp","editor","_getEditorClass","localEditorElement","setLocalEditorPortal","_getOwnerDocument","_emitColumnSettings","createLocalEditorPortal","createColumnSettings","emitColumnSettings","nextProps","nextState","nextContext","Fragment","getLocalEditorPortal","Component","PortalManager","state","portals","b","Symbol","c","d","e","f","g","h","k","l","m","n","p","q","r","t","w","x","y","z","a","u","$$typeof","A","module","require$$0","test1","String","getOwnPropertyNames","test2","i","fromCharCode","order2","test3","letter","err","shouldUseNative","emptyFunction","emptyFunctionWithReset","Function","call","bind","prototype","resetWarningCache","shim","componentName","location","propFullName","secret","Error","name","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require$$2","HotTable","Map","__hotInstance","isDestroyed","console","warn","hotInstance","renderedCellCache","globalEditorPortal","getRenderedCellCache","setGlobalEditorPortal","getOwnerDocument","getEditorCache","clear","componentRendererColumns","hotElementRef","ownerDocument","hotTableComponent","TD","row","col","prop","value","cellProperties","has","innerHTML","get","getAttribute","rElement","callback","createDocumentFragment","portalContainer","extendedRendererElement","isRenderer","firstChild","portalCacheArray","push","cachedComponent","makeEditorClass","editorComponent","customEditorClass","hotCustomEditorInstance","Handsontable","editors","BaseEditor","args","globalEditorElement","getGlobalEditorElement","globalRendererNode","getGlobalRendererElement","globalEditorNode","columns","length","getEditorClass","getRendererWrapper","newGlobalSettings","getPlugin","enabled","size","columnIndex","portalManager","setState","_this3","updateSettings","pmComponent","clearCache","createGlobalEditorPortal","createNewGlobalSettings","Core","addHook","isForced","handsontableBeforeViewRender","handsontableAfterViewRender","init","displayAutoSizeWarning","updateHot","destroy","childClones","childNode","isHotColumn","_this4","setHotColumnSettings","getGlobalEditorPortal","ref","setHotElementRef","setPortalManagerRef","BaseEditorComponent","_fireCallbacks","beginEditing","cancelChanges","checkEditorSection","close","discardEditor","enableFullEditMode","extend","finishEditing","focus","getValue","isInFullEditMode","isOpened","isWaiting","open","originalValue","prepare","saveValue","setValue","removeHooksByKey","clearHooks","getEditedCell","getEditedCellsZIndex"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23FAIA,IAAIA,EAAyB,KAiBvBC,EAAoB,wCAoBVC,EAAsBC,EAA2BC,OACzDC,EAAmCC,UAAMC,SAASC,QAAQL,GAC1DM,EAAwBH,UAAMC,SAASG,MAAMP,GAC/CQ,EAAsC,YAEpB,IAAlBF,IAEAE,EADoB,IAAlBF,GAAwBJ,EAAc,GAA0BO,MAAMR,GAC1DC,EAAc,GAGdA,EAAcQ,MAAK,SAACC,eACqB,IAA7CA,EAA6BF,MAAMR,OAKzCO,GAAsC,cAShCI,EAAuBC,UAChCA,EAIEA,EAAcZ,KAAKa,iBAAmBD,EAAcZ,KAAKa,iBAAmBD,EAAcZ,KAHxF,cAYKc,QAAuBC,yDAAMC,SAC3CD,EAAIE,oCAA6BpB,SAAuBqB,SAAQ,SAACC,GAC3DA,EAAQC,YACVD,EAAQC,WAAWC,YAAYF,eAarBG,QAAmBP,yDAAMC,SAAUJ,4CAC3B,OAAlBA,OAIEW,EAAkBR,EAAIS,cAAc,SACXC,EAA4Bb,EAAcJ,OAAO,GAAzEkB,IAAAA,GAAIC,IAAAA,UAAWC,IAAAA,aAElBF,IACFH,EAAgBG,GAAKA,GAGvBH,EAAgBI,UAAY,CAAC9B,EAAmB8B,GAAWE,KAAK,KAE5DD,GACFE,OAAOC,OAAOR,EAAgBK,MAAOA,GAGvCb,EAAIiB,KAAKC,YAAYV,GAEdW,UAASC,aAAavB,EAAeW,aAU9Ba,EAAyBrC,EAA2BsC,OAC5DzB,EAAgBd,EAAsBC,EAAU,cAChDuC,EAAc3B,EAAuBC,UAEtCA,EAIEV,UAAMqC,aAAa3B,EAAe,CACvC4B,mBAAoB,SAACC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W7E,UAAUyI,WAAU3I,cAAKjF,KAAK6J,gCAA4BI,4BAGnG,wCAAYA,uBAAAA,2BACHH,UAAaC,QAAQC,WAAW7E,UAAU0I,UAAS5I,cAAKjF,KAAK6J,gCAA4BI,2BAGlG,wCAAWA,uBAAAA,2BACDH,UAAaC,QAAQC,WAAW7E,UAAkBsG,SAAQxG,cAAKjF,KAAK6J,gCAA4BI,oCAG1G,wCAAoBA,uBAAAA,2BACVH,UAAaC,QAAQC,WAAW7E,UAAkB2I,kBAAiB7I,cAAKjF,KAAK6J,gCAA4BI,8BAGnH,wCAAcA,uBAAAA,2BACJH,UAAaC,QAAQC,WAAW7E,UAAkB4I,YAAW9I,cAAKjF,KAAK6J,gCAA4BI,iCAG7G,wCAAiBA,uBAAAA,2BACPH,UAAaC,QAAQC,WAAW7E,UAAkB6I,eAAc/I,cAAKjF,KAAK6J,gCAA4BI,wCAGhH,wCAAwBA,uBAAAA,2BACdH,UAAaC,QAAQC,WAAW7E,UAAkB8I,sBAAqBhJ,cAAKjF,KAAK6J,gCAA4BI,WA5H7DpO,UAAMwG"}
1
+ {"version":3,"file":"react-handsontable.min.js","sources":["../src/helpers.tsx","../src/settingsMapper.ts","../src/hotColumn.tsx","../src/portalManager.tsx","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/index.js","../../../node_modules/object-assign/index.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../node_modules/prop-types/index.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../src/hotTable.tsx","../src/baseEditorComponent.tsx"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport {\n HotEditorCache,\n HotEditorElement\n} from './types';\n\nlet bulkComponentContainer = 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 * 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 * String identifier for the global-scoped editor components.\n */\nexport const GLOBAL_EDITOR_SCOPE = 'global';\n\n/**\n * Default classname given to the wrapper container.\n */\nconst 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) {\n if (typeof console !== 'undefined') {\n console.warn(...args);\n }\n}\n\n/**\n * Filter out and return elements of the provided `type` from the `HotColumn` component's children.\n *\n * @param {React.ReactNode} children HotTable children array.\n * @param {String} type Either `'hot-renderer'` or `'hot-editor'`.\n * @returns {Object|null} A child (React node) or `null`, if no child of that type was found.\n */\nexport function getChildElementByType(children: React.ReactNode, type: string): React.ReactElement | null {\n const childrenArray: React.ReactNode[] = React.Children.toArray(children);\n const childrenCount: number = React.Children.count(children);\n let wantedChild: React.ReactNode | null = null;\n\n if (childrenCount !== 0) {\n if (childrenCount === 1 && (childrenArray[0] as React.ReactElement).props[type]) {\n wantedChild = childrenArray[0];\n\n } else {\n wantedChild = childrenArray.find((child) => {\n return (child as React.ReactElement).props[type] !== void 0;\n });\n }\n }\n\n return (wantedChild as React.ReactElement) || null;\n}\n\n/**\n * Get the reference to the original editor class.\n *\n * @param {React.ReactElement} editorElement React element of the editor class.\n * @returns {Function} Original class of the editor component.\n */\nexport function getOriginalEditorClass(editorElement: HotEditorElement) {\n if (!editorElement) {\n return null;\n }\n\n return editorElement.type.WrappedComponent ? editorElement.type.WrappedComponent : editorElement.type;\n}\n\n/**\n * Remove editor containers from DOM.\n *\n * @param {Document} [doc] Document to be used.\n * @param {Map} editorCache The editor cache reference.\n */\nexport function removeEditorContainers(doc = document): void {\n doc.querySelectorAll(`[class^=\"${DEFAULT_CLASSNAME}\"]`).forEach((domNode) => {\n if (domNode.parentNode) {\n domNode.parentNode.removeChild(domNode);\n }\n });\n}\n\n/**\n * Create an editor portal.\n *\n * @param {Document} [doc] Document to be used.\n * @param {React.ReactElement} editorElement Editor's element.\n * @param {Map} editorCache The editor cache reference.\n * @returns {React.ReactPortal} The portal for the editor.\n */\nexport function createEditorPortal(doc = document, editorElement: HotEditorElement, editorCache: HotEditorCache): React.ReactPortal {\n if (editorElement === null) {\n return;\n }\n\n const editorContainer = doc.createElement('DIV');\n const {id, className, style} = getContainerAttributesProps(editorElement.props, false);\n\n if (id) {\n editorContainer.id = id;\n }\n\n editorContainer.className = [DEFAULT_CLASSNAME, className].join(' ');\n\n if (style) {\n Object.assign(editorContainer.style, style);\n }\n\n doc.body.appendChild(editorContainer);\n\n return ReactDOM.createPortal(editorElement, editorContainer);\n}\n\n/**\n * Get an editor element extended with a instance-emitting method.\n *\n * @param {React.ReactNode} children Component children.\n * @param {Map} editorCache Component's editor cache.\n * @param {string|number} [editorColumnScope] The editor scope (column index or a 'global' string). Defaults to\n * 'global'.\n * @returns {React.ReactElement} An editor element containing the additional methods.\n */\nexport function getExtendedEditorElement(children: React.ReactNode, editorCache: HotEditorCache, editorColumnScope: string | number = GLOBAL_EDITOR_SCOPE): React.ReactElement | null {\n const editorElement = getChildElementByType(children, 'hot-editor');\n const editorClass = getOriginalEditorClass(editorElement);\n\n if (!editorElement) {\n return null;\n }\n\n return React.cloneElement(editorElement, {\n emitEditorInstance: (editorInstance, editorColumnScope) => {\n if (!editorCache.get(editorClass)) {\n editorCache.set(editorClass, new Map());\n }\n\n const cacheEntry = editorCache.get(editorClass);\n\n cacheEntry.set(editorColumnScope ?? GLOBAL_EDITOR_SCOPE, editorInstance);\n },\n editorColumnScope,\n isEditor: true\n } as object);\n}\n\n/**\n * Create a react component and render it to an external DOM done.\n *\n * @param {React.ReactElement} rElement React element to be used as a base for the component.\n * @param {Object} props Props to be passed to the cloned element.\n * @param {Function} callback Callback to be called after the component has been mounted.\n * @param {Document} [ownerDocument] The owner document to set the portal up into.\n * @returns {{portal: React.ReactPortal, portalContainer: HTMLElement}} An object containing the portal and its container.\n */\nexport function createPortal(rElement: React.ReactElement, props, callback: Function, ownerDocument: Document = document): {\n portal: React.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 = ownerDocument.createElement('DIV');\n bulkComponentContainer.appendChild(portalContainer);\n\n const extendedRendererElement = React.cloneElement(rElement, {\n key: `${props.row}-${props.col}`,\n ...props\n });\n\n return {\n portal: ReactDOM.createPortal(extendedRendererElement, portalContainer, `${props.row}-${props.col}-${Math.random()}`),\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 {Object} 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, randomizeId: boolean = true): {id: string, className: string, style: object} {\n return {\n id: props.id || (randomizeId ? 'hot-' + Math.random().toString(36).substring(5) : void 0),\n className: props.className || '',\n style: props.style || {},\n }\n}\n\n/**\n * Add the `UNSAFE_` prefixes to the deprecated lifecycle methods for React >= 16.3.\n *\n * @param {Object} instance Instance to have the methods renamed.\n */\nexport function addUnsafePrefixes(instance: {\n UNSAFE_componentWillUpdate?: Function,\n componentWillUpdate: Function,\n UNSAFE_componentWillMount?: Function,\n componentWillMount: Function\n}): void {\n const reactSemverArray = React.version.split('.').map((v) => parseInt(v));\n const shouldPrefix = reactSemverArray[0] >= 16 && reactSemverArray[1] >= 3;\n\n if (shouldPrefix) {\n instance.UNSAFE_componentWillUpdate = instance.componentWillUpdate;\n instance.componentWillUpdate = void 0;\n\n instance.UNSAFE_componentWillMount = instance.componentWillMount;\n instance.componentWillMount = void 0;\n }\n}\n","import Handsontable from 'handsontable/base';\nimport { HotTableProps } from './types';\n\nexport class SettingsMapper {\n /**\n * Parse component settings into Handosntable-compatible settings.\n *\n * @param {Object} properties Object containing properties from the HotTable object.\n * @returns {Object} Handsontable-compatible settings object.\n */\n static getSettings(properties: HotTableProps): Handsontable.GridSettings {\n let newSettings: Handsontable.GridSettings = {};\n\n if (properties.settings) {\n let settings = properties.settings;\n for (const key in settings) {\n if (settings.hasOwnProperty(key)) {\n newSettings[key] = settings[key];\n }\n }\n }\n\n for (const key in properties) {\n if (key !== 'settings' && key !== 'children' && properties.hasOwnProperty(key)) {\n newSettings[key] = properties[key];\n }\n }\n\n return newSettings;\n }\n}\n","import React, { ReactPortal } from 'react';\nimport { HotTableProps, HotColumnProps } from './types';\nimport {\n addUnsafePrefixes,\n createEditorPortal,\n getExtendedEditorElement\n} from './helpers';\nimport { SettingsMapper } from './settingsMapper';\nimport Handsontable from 'handsontable/base';\n\nclass HotColumn extends React.Component<HotColumnProps, {}> {\n internalProps: string[];\n columnSettings: Handsontable.ColumnSettings;\n\n /**\n * Local editor portal cache.\n *\n * @private\n * @type {ReactPortal}\n */\n private localEditorPortal: ReactPortal = null;\n\n /**\n * HotColumn class constructor.\n *\n * @param {HotColumnProps} props Component props.\n * @param {*} [context] Component context.\n */\n constructor(props: HotColumnProps, context?: any) {\n super(props, context);\n\n addUnsafePrefixes(this);\n }\n\n /**\n * Get the local editor portal cache property.\n *\n * @return {ReactPortal} Local editor portal.\n */\n getLocalEditorPortal(): ReactPortal {\n return this.localEditorPortal;\n }\n\n /**\n * Set the local editor portal cache property.\n *\n * @param {ReactPortal} portal Local editor portal.\n */\n setLocalEditorPortal(portal): void {\n this.localEditorPortal = portal;\n }\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 getSettingsProps(): HotTableProps {\n this.internalProps = ['__componentRendererColumns', '_emitColumnSettings', '_columnIndex', '_getChildElementByType', '_getRendererWrapper',\n '_getEditorClass', '_getEditorCache', '_getOwnerDocument', 'hot-renderer', 'hot-editor', 'children'];\n\n return Object.keys(this.props)\n .filter(key => {\n return !this.internalProps.includes(key);\n })\n .reduce((obj, key) => {\n obj[key] = this.props[key];\n\n return obj;\n }, {});\n }\n\n /**\n * Check whether the HotColumn component contains a provided prop.\n *\n * @param {String} propName Property name.\n * @returns {Boolean}\n */\n hasProp(propName: string): boolean {\n return !!this.props[propName];\n }\n\n /**\n * Get the editor element for the current column.\n *\n * @returns {React.ReactElement} React editor component element.\n */\n getLocalEditorElement(): React.ReactElement | null {\n return getExtendedEditorElement(this.props.children, this.props._getEditorCache(), this.props._columnIndex);\n }\n\n /**\n * Create the column settings based on the data provided to the `HotColumn` component and it's child components.\n */\n createColumnSettings(): void {\n const rendererElement: React.ReactElement = this.props._getChildElementByType(this.props.children, 'hot-renderer');\n const editorElement: React.ReactElement = this.getLocalEditorElement();\n\n this.columnSettings = SettingsMapper.getSettings(this.getSettingsProps()) as unknown as Handsontable.ColumnSettings;\n\n if (rendererElement !== null) {\n this.columnSettings.renderer = this.props._getRendererWrapper(rendererElement);\n this.props._componentRendererColumns.set(this.props._columnIndex, true);\n\n } else if (this.hasProp('renderer')) {\n this.columnSettings.renderer = this.props.renderer;\n\n } else {\n this.columnSettings.renderer = void 0;\n }\n\n if (editorElement !== null) {\n this.columnSettings.editor = this.props._getEditorClass(editorElement, this.props._columnIndex);\n\n } else if (this.hasProp('editor')) {\n this.columnSettings.editor = this.props.editor;\n\n } else {\n this.columnSettings.editor = void 0;\n }\n }\n\n /**\n * Create the local editor portal and its destination HTML element if needed.\n *\n * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.\n */\n createLocalEditorPortal(children = this.props.children): void {\n const editorCache = this.props._getEditorCache();\n const localEditorElement: React.ReactElement = getExtendedEditorElement(children, editorCache, this.props._columnIndex);\n\n if (localEditorElement) {\n this.setLocalEditorPortal(createEditorPortal(this.props._getOwnerDocument(), localEditorElement, editorCache));\n }\n }\n\n /**\n * Emit the column settings to the parent using a prop passed from the parent.\n */\n emitColumnSettings(): void {\n this.props._emitColumnSettings(this.columnSettings, this.props._columnIndex);\n }\n\n /*\n ---------------------------------------\n ------- React lifecycle methods -------\n ---------------------------------------\n */\n\n /**\n * Logic performed before the mounting of the HotColumn component.\n */\n componentWillMount(): void {\n this.createLocalEditorPortal();\n }\n\n /**\n * Logic performed after the mounting of the HotColumn component.\n */\n componentDidMount(): void {\n this.createColumnSettings();\n this.emitColumnSettings();\n }\n\n /**\n * Logic performed before the updating of the HotColumn component.\n */\n componentWillUpdate(nextProps: Readonly<HotColumnProps>, nextState: Readonly<{}>, nextContext: any): void {\n this.createLocalEditorPortal(nextProps.children);\n }\n\n /**\n * Logic performed after the updating of the HotColumn component.\n */\n componentDidUpdate(): void {\n this.createColumnSettings();\n this.emitColumnSettings();\n }\n\n /**\n * Render the portals of the editors, if there are any.\n *\n * @returns {React.ReactElement}\n */\n render(): React.ReactElement {\n return (\n <React.Fragment>\n {this.getLocalEditorPortal()}\n </React.Fragment>\n )\n }\n}\n\nexport { HotColumn };\n","import React from 'react';\n\n/**\n * Component class used to manage the renderer component portals.\n */\nexport class PortalManager extends React.Component<{}, {portals?: React.ReactPortal[]}> {\n constructor(props) {\n super(props);\n\n this.state = {\n portals: []\n };\n }\n\n render(): React.ReactNode {\n return (\n <React.Fragment>\n {this.state.portals}\n </React.Fragment>\n )\n }\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\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';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\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 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 ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\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 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\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","/**\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 from 'react';\nimport Handsontable from 'handsontable/base';\nimport { SettingsMapper } from './settingsMapper';\nimport { PortalManager } from './portalManager';\nimport { HotColumn } from './hotColumn';\nimport * as packageJson from '../package.json';\nimport {\n HotTableProps,\n HotEditorElement,\n HotEditorCache,\n EditorScopeIdentifier\n} from './types';\nimport {\n HOT_DESTROYED_WARNING,\n AUTOSIZE_WARNING,\n GLOBAL_EDITOR_SCOPE,\n createEditorPortal,\n createPortal,\n getChildElementByType,\n getContainerAttributesProps,\n getExtendedEditorElement,\n getOriginalEditorClass,\n addUnsafePrefixes,\n removeEditorContainers,\n warn\n} from './helpers';\nimport PropTypes from 'prop-types';\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 *\n * @class HotTable\n */\nclass HotTable extends React.Component<HotTableProps, {}> {\n /**\n * The `id` of the main Handsontable DOM element.\n *\n * @type {String}\n */\n id: string = null;\n /**\n * Reference to the Handsontable instance.\n *\n * @private\n * @type {Object}\n */\n __hotInstance: Handsontable | null = null;\n /**\n * Reference to the main Handsontable DOM element.\n *\n * @type {HTMLElement}\n */\n hotElementRef: HTMLElement = null;\n /**\n * Class name added to the component DOM element.\n *\n * @type {String}\n */\n className: string;\n /**\n * Style object passed to the component.\n *\n * @type {React.CSSProperties}\n */\n style: React.CSSProperties;\n\n /**\n * Array of object containing the column settings.\n *\n * @type {Array}\n */\n columnSettings: Handsontable.ColumnSettings[] = [];\n\n /**\n * Component used to manage the renderer portals.\n *\n * @type {React.Component}\n */\n portalManager: PortalManager = null;\n\n /**\n * Array containing the portals cashed to be rendered in bulk after Handsontable's render cycle.\n */\n portalCacheArray: React.ReactPortal[] = [];\n\n /**\n * Global editor portal cache.\n *\n * @private\n * @type {React.ReactPortal}\n */\n private globalEditorPortal: React.ReactPortal = null;\n\n /**\n * The rendered cells cache.\n *\n * @private\n * @type {Map}\n */\n private renderedCellCache: Map<string, HTMLTableCellElement> = new Map();\n\n /**\n * Editor cache.\n *\n * @private\n * @type {Map}\n */\n private editorCache: HotEditorCache = new Map();\n\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 * @private\n * @type {Map}\n */\n private componentRendererColumns: Map<number | string, boolean> = new Map();\n\n /**\n * HotTable class constructor.\n *\n * @param {HotTableProps} props Component props.\n * @param {*} [context] Component context.\n */\n constructor(props: HotTableProps, context?: any) {\n super(props, context);\n\n addUnsafePrefixes(this);\n }\n\n /**\n * Package version getter.\n *\n * @returns The version number of the package.\n */\n static get version(): string {\n return (packageJson as any).version;\n }\n\n /**\n * Getter for the property storing the Handsontable instance.\n */\n get hotInstance(): Handsontable | null {\n if (!this.__hotInstance || (this.__hotInstance && !this.__hotInstance.isDestroyed)) {\n\n // Will return the Handsontable instance or `null` if it's not yet been created.\n return this.__hotInstance;\n\n } else {\n console.warn(HOT_DESTROYED_WARNING);\n\n return null;\n }\n }\n\n /**\n * Setter for the property storing the Handsontable instance.\n * @param {Handsontable} hotInstance The Handsontable instance.\n */\n set hotInstance(hotInstance) {\n this.__hotInstance = hotInstance;\n }\n\n /**\n * Prop types to be checked at runtime.\n */\n static propTypes: object = {\n style: PropTypes.object,\n id: PropTypes.string,\n className: PropTypes.string\n };\n\n /**\n * Get the rendered table cell cache.\n *\n * @returns {Map}\n */\n getRenderedCellCache(): Map<string, HTMLTableCellElement> {\n return this.renderedCellCache;\n }\n\n /**\n * Get the editor cache and return it.\n *\n * @returns {Map}\n */\n getEditorCache(): HotEditorCache {\n return this.editorCache;\n }\n\n /**\n * Get the global editor portal property.\n *\n * @return {React.ReactPortal} The global editor portal.\n */\n getGlobalEditorPortal(): React.ReactPortal {\n return this.globalEditorPortal;\n }\n\n /**\n * Set the private editor portal cache property.\n *\n * @param {React.ReactPortal} portal Global editor portal.\n */\n setGlobalEditorPortal(portal: React.ReactPortal): void {\n this.globalEditorPortal = portal;\n }\n\n /**\n * Clear both the editor and the renderer cache.\n */\n clearCache(): void {\n const renderedCellCache = this.getRenderedCellCache();\n\n this.setGlobalEditorPortal(null);\n removeEditorContainers(this.getOwnerDocument());\n this.getEditorCache().clear();\n\n renderedCellCache.clear();\n\n this.componentRendererColumns.clear();\n }\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 getOwnerDocument() {\n return this.hotElementRef ? this.hotElementRef.ownerDocument : document;\n }\n\n /**\n * Set the reference to the main Handsontable DOM element.\n *\n * @param {HTMLElement} element The main Handsontable DOM element.\n */\n private setHotElementRef(element: HTMLElement): void {\n this.hotElementRef = element;\n }\n\n /**\n * Return a renderer wrapper function for the provided renderer component.\n *\n * @param {React.ReactElement} rendererElement React renderer component.\n * @returns {Handsontable.renderers.Base} The Handsontable rendering function.\n */\n getRendererWrapper(rendererElement: React.ReactElement): typeof Handsontable.renderers.BaseRenderer | any {\n const hotTableComponent = this;\n\n return function (instance, TD, row, col, prop, value, cellProperties) {\n const renderedCellCache = hotTableComponent.getRenderedCellCache();\n\n if (renderedCellCache.has(`${row}-${col}`)) {\n TD.innerHTML = renderedCellCache.get(`${row}-${col}`).innerHTML;\n }\n\n if (TD && !TD.getAttribute('ghost-table')) {\n\n const {portal, portalContainer} = createPortal(rendererElement, {\n TD,\n row,\n col,\n prop,\n value,\n cellProperties,\n isRenderer: true\n }, () => {\n }, TD.ownerDocument);\n\n while (TD.firstChild) {\n TD.removeChild(TD.firstChild);\n }\n\n TD.appendChild(portalContainer);\n\n hotTableComponent.portalCacheArray.push(portal);\n }\n\n renderedCellCache.set(`${row}-${col}`, TD);\n\n return TD;\n };\n }\n\n /**\n * Create a fresh class to be used as an editor, based on the provided editor React element.\n *\n * @param {React.ReactElement} editorElement React editor component.\n * @param {string|number} [editorColumnScope] The editor scope (column index or a 'global' string). Defaults to\n * 'global'.\n * @returns {Function} A class to be passed to the Handsontable editor settings.\n */\n getEditorClass(editorElement: HotEditorElement, editorColumnScope: EditorScopeIdentifier = GLOBAL_EDITOR_SCOPE): typeof Handsontable.editors.BaseEditor {\n const editorClass = getOriginalEditorClass(editorElement);\n const editorCache = this.getEditorCache();\n let cachedComponent: React.Component = editorCache.get(editorClass)?.get(editorColumnScope);\n\n return this.makeEditorClass(cachedComponent);\n }\n\n /**\n * Create a class to be passed to the Handsontable's settings.\n *\n * @param {React.ReactElement} editorComponent React editor component.\n * @returns {Function} A class to be passed to the Handsontable editor settings.\n */\n makeEditorClass(editorComponent: React.Component): typeof Handsontable.editors.BaseEditor {\n const customEditorClass = class CustomEditor extends Handsontable.editors.BaseEditor implements Handsontable.editors.BaseEditor {\n editorComponent: React.Component;\n\n constructor(hotInstance) {\n super(hotInstance);\n\n (editorComponent as any).hotCustomEditorInstance = this;\n\n this.editorComponent = editorComponent;\n }\n\n focus() {\n }\n\n getValue() {\n }\n\n setValue() {\n }\n\n open() {\n }\n\n close() {\n }\n } as any;\n\n // Fill with the rest of the BaseEditor methods\n Object.getOwnPropertyNames(Handsontable.editors.BaseEditor.prototype).forEach(propName => {\n if (propName === 'constructor') {\n return;\n }\n\n customEditorClass.prototype[propName] = function (...args) {\n return editorComponent[propName].call(editorComponent, ...args);\n }\n });\n\n return customEditorClass;\n }\n\n /**\n * Get the renderer element for the entire HotTable instance.\n *\n * @returns {React.ReactElement} React renderer component element.\n */\n getGlobalRendererElement(): React.ReactElement {\n const hotTableSlots: React.ReactNode = this.props.children;\n\n return getChildElementByType(hotTableSlots, 'hot-renderer');\n }\n\n /**\n * Get the editor element for the entire HotTable instance.\n *\n * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.\n * @returns {React.ReactElement} React editor component element.\n */\n getGlobalEditorElement(children: React.ReactNode = this.props.children): HotEditorElement | null {\n return getExtendedEditorElement(children, this.getEditorCache());\n }\n\n /**\n * Create the global editor portal and its destination HTML element if needed.\n *\n * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.\n */\n createGlobalEditorPortal(children: React.ReactNode = this.props.children): void {\n const globalEditorElement: HotEditorElement = this.getGlobalEditorElement(children);\n\n if (globalEditorElement) {\n this.setGlobalEditorPortal(createEditorPortal(this.getOwnerDocument(), globalEditorElement, this.getEditorCache()));\n }\n }\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 createNewGlobalSettings(): Handsontable.GridSettings {\n const newSettings = SettingsMapper.getSettings(this.props);\n const globalRendererNode = this.getGlobalRendererElement();\n const globalEditorNode = this.getGlobalEditorElement();\n\n newSettings.columns = this.columnSettings.length ? this.columnSettings : newSettings.columns;\n\n if (globalEditorNode) {\n newSettings.editor = this.getEditorClass(globalEditorNode, GLOBAL_EDITOR_SCOPE);\n\n } else {\n newSettings.editor = this.props.editor || (this.props.settings ? this.props.settings.editor : void 0);\n }\n\n if (globalRendererNode) {\n newSettings.renderer = this.getRendererWrapper(globalRendererNode);\n this.componentRendererColumns.set('global', true);\n\n } else {\n newSettings.renderer = this.props.renderer || (this.props.settings ? this.props.settings.renderer : void 0);\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 * @param {Handsontable.GridSettings} newGlobalSettings New global settings passed as Handsontable config.\n */\n displayAutoSizeWarning(newGlobalSettings: Handsontable.GridSettings): void {\n if (\n this.hotInstance &&\n (\n this.hotInstance.getPlugin('autoRowSize')?.enabled ||\n this.hotInstance.getPlugin('autoColumnSize')?.enabled\n )\n ) {\n if (this.componentRendererColumns.size > 0) {\n warn(AUTOSIZE_WARNING);\n }\n }\n }\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 setHotColumnSettings(columnSettings: Handsontable.ColumnSettings, columnIndex: number): void {\n this.columnSettings[columnIndex] = columnSettings;\n }\n\n /**\n * Handsontable's `beforeViewRender` hook callback.\n */\n handsontableBeforeViewRender(): void {\n this.getRenderedCellCache().clear();\n }\n\n /**\n * Handsontable's `afterViewRender` hook callback.\n */\n handsontableAfterViewRender(): void {\n this.portalManager.setState(() => {\n return Object.assign({}, {\n portals: this.portalCacheArray\n });\n\n }, () => {\n this.portalCacheArray.length = 0;\n });\n }\n\n /**\n * Call the `updateSettings` method for the Handsontable instance.\n *\n * @param {Object} newSettings The settings object.\n */\n private updateHot(newSettings: Handsontable.GridSettings): void {\n if (this.hotInstance) {\n this.hotInstance.updateSettings(newSettings, false);\n }\n }\n\n /**\n * Set the portal manager ref.\n *\n * @param {React.ReactComponent} pmComponent The PortalManager component.\n */\n private setPortalManagerRef(pmComponent: PortalManager): void {\n this.portalManager = pmComponent;\n }\n\n /*\n ---------------------------------------\n ------- React lifecycle methods -------\n ---------------------------------------\n */\n\n /**\n * Logic performed before the mounting of the component.\n */\n componentWillMount(): void {\n this.clearCache();\n this.createGlobalEditorPortal();\n }\n\n /**\n * Initialize Handsontable after the component has mounted.\n */\n componentDidMount(): void {\n const hotTableComponent = this;\n const newGlobalSettings = this.createNewGlobalSettings();\n\n this.hotInstance = new Handsontable.Core(this.hotElementRef, newGlobalSettings);\n\n this.hotInstance.addHook('beforeViewRender', function (isForced) {\n hotTableComponent.handsontableBeforeViewRender();\n });\n\n this.hotInstance.addHook('afterViewRender', function () {\n hotTableComponent.handsontableAfterViewRender();\n });\n\n // `init` missing in Handsontable's type definitions.\n (this.hotInstance as any).init();\n\n this.displayAutoSizeWarning(newGlobalSettings);\n }\n\n /**\n * Logic performed before the component update.\n */\n componentWillUpdate(nextProps: Readonly<HotTableProps>, nextState: Readonly<{}>, nextContext: any): void {\n this.clearCache();\n removeEditorContainers(this.getOwnerDocument());\n this.createGlobalEditorPortal(nextProps.children);\n }\n\n /**\n * Logic performed after the component update.\n */\n componentDidUpdate(): void {\n const newGlobalSettings = this.createNewGlobalSettings();\n this.updateHot(newGlobalSettings);\n\n this.displayAutoSizeWarning(newGlobalSettings);\n }\n\n /**\n * Destroy the Handsontable instance when the parent component unmounts.\n */\n componentWillUnmount(): void {\n if (this.hotInstance) {\n this.hotInstance.destroy();\n }\n\n removeEditorContainers(this.getOwnerDocument());\n }\n\n /**\n * Render the component.\n */\n render(): React.ReactElement {\n const {id, className, style} = getContainerAttributesProps(this.props);\n const isHotColumn = (childNode: any) => childNode.type === HotColumn;\n let children = React.Children.toArray(this.props.children);\n\n // filter out anything that's not a HotColumn\n children = children.filter(function (childNode: any) {\n return isHotColumn(childNode);\n });\n\n // clone the HotColumn nodes and extend them with the callbacks\n let childClones = children.map((childNode: React.ReactElement, columnIndex: number) => {\n return React.cloneElement(childNode, {\n _componentRendererColumns: this.componentRendererColumns,\n _emitColumnSettings: this.setHotColumnSettings.bind(this),\n _columnIndex: columnIndex,\n _getChildElementByType: getChildElementByType.bind(this),\n _getRendererWrapper: this.getRendererWrapper.bind(this),\n _getEditorClass: this.getEditorClass.bind(this),\n _getOwnerDocument: this.getOwnerDocument.bind(this),\n _getEditorCache: this.getEditorCache.bind(this),\n children: childNode.props.children\n } as object);\n });\n\n // add the global editor to the list of children\n childClones.push(this.getGlobalEditorPortal());\n\n return (\n <React.Fragment>\n <div ref={this.setHotElementRef.bind(this)} id={id} className={className} style={style}>\n {childClones}\n </div>\n <PortalManager ref={this.setPortalManagerRef.bind(this)}></PortalManager>\n </React.Fragment>\n )\n }\n}\n\nexport default HotTable;\nexport { HotTable };\n","import React from 'react';\nimport Handsontable from 'handsontable/base';\nimport { HotEditorProps } from './types';\n\nclass BaseEditorComponent<P = {}, S = {}, SS = any> extends React.Component<P | HotEditorProps, S> implements Handsontable.editors.BaseEditor {\n name = 'BaseEditorComponent';\n instance = null;\n row = null;\n col = null;\n prop = null;\n TD = null;\n originalValue = null;\n cellProperties = null;\n state = null;\n hotInstance = null;\n hotCustomEditorInstance = null;\n hot = null;\n\n constructor(props) {\n super(props);\n\n if (props.emitEditorInstance) {\n props.emitEditorInstance(this, props.editorColumnScope);\n }\n }\n\n // BaseEditor methods:\n private _fireCallbacks(...args) {\n (Handsontable.editors.BaseEditor.prototype as any)._fireCallbacks.call(this.hotCustomEditorInstance, ...args);\n }\n\n beginEditing(...args) {\n return Handsontable.editors.BaseEditor.prototype.beginEditing.call(this.hotCustomEditorInstance, ...args);\n }\n\n cancelChanges(...args) {\n return Handsontable.editors.BaseEditor.prototype.cancelChanges.call(this.hotCustomEditorInstance, ...args);\n }\n\n checkEditorSection(...args) {\n return Handsontable.editors.BaseEditor.prototype.checkEditorSection.call(this.hotCustomEditorInstance, ...args);\n }\n\n close(...args) {\n return Handsontable.editors.BaseEditor.prototype.close.call(this.hotCustomEditorInstance, ...args);\n }\n\n discardEditor(...args) {\n return Handsontable.editors.BaseEditor.prototype.discardEditor.call(this.hotCustomEditorInstance, ...args);\n }\n\n enableFullEditMode(...args) {\n return Handsontable.editors.BaseEditor.prototype.enableFullEditMode.call(this.hotCustomEditorInstance, ...args);\n }\n\n extend(...args) {\n return Handsontable.editors.BaseEditor.prototype.extend.call(this.hotCustomEditorInstance, ...args);\n }\n\n finishEditing(...args) {\n return Handsontable.editors.BaseEditor.prototype.finishEditing.call(this.hotCustomEditorInstance, ...args);\n }\n\n focus(...args) {\n return Handsontable.editors.BaseEditor.prototype.focus.call(this.hotCustomEditorInstance, ...args);\n }\n\n getValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.getValue.call(this.hotCustomEditorInstance, ...args);\n }\n\n init(...args) {\n return Handsontable.editors.BaseEditor.prototype.init.call(this.hotCustomEditorInstance, ...args);\n }\n\n isInFullEditMode(...args) {\n return Handsontable.editors.BaseEditor.prototype.isInFullEditMode.call(this.hotCustomEditorInstance, ...args);\n }\n\n isOpened(...args) {\n return Handsontable.editors.BaseEditor.prototype.isOpened.call(this.hotCustomEditorInstance, ...args);\n }\n\n isWaiting(...args) {\n return Handsontable.editors.BaseEditor.prototype.isWaiting.call(this.hotCustomEditorInstance, ...args);\n }\n\n open(...args) {\n return Handsontable.editors.BaseEditor.prototype.open.call(this.hotCustomEditorInstance, ...args);\n }\n\n prepare(row, col, prop, TD, originalValue, cellProperties) {\n this.hotInstance = cellProperties.instance;\n this.row = row;\n this.col = col;\n this.prop = prop;\n this.TD = TD;\n this.originalValue = originalValue;\n this.cellProperties = cellProperties;\n\n return Handsontable.editors.BaseEditor.prototype.prepare.call(this.hotCustomEditorInstance, row, col, prop, TD, originalValue, cellProperties);\n }\n\n saveValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.saveValue.call(this.hotCustomEditorInstance, ...args);\n }\n\n setValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.setValue.call(this.hotCustomEditorInstance, ...args);\n }\n\n addHook(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).addHook.call(this.hotCustomEditorInstance, ...args);\n }\n\n removeHooksByKey(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).removeHooksByKey.call(this.hotCustomEditorInstance, ...args);\n }\n\n clearHooks(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).clearHooks.call(this.hotCustomEditorInstance, ...args);\n }\n\n getEditedCell(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).getEditedCell.call(this.hotCustomEditorInstance, ...args);\n }\n\n getEditedCellsZIndex(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).getEditedCellsZIndex.call(this.hotCustomEditorInstance, ...args);\n }\n}\n\nexport default BaseEditorComponent;\nexport { BaseEditorComponent };\n"],"names":["bulkComponentContainer","GLOBAL_EDITOR_SCOPE","DEFAULT_CLASSNAME","getChildElementByType","children","type","childrenArray","React","Children","toArray","childrenCount","count","wantedChild","props","find","child","getOriginalEditorClass","editorElement","WrappedComponent","removeEditorContainers","doc","document","querySelectorAll","forEach","domNode","parentNode","removeChild","createEditorPortal","editorContainer","createElement","getContainerAttributesProps","id","className","style","join","Object","assign","body","appendChild","ReactDOM","createPortal","getExtendedEditorElement","editorCache","editorColumnScope","editorClass","cloneElement","emitEditorInstance","editorInstance","get","set","Map","isEditor","randomizeId","Math","random","toString","substring","addUnsafePrefixes","instance","reactSemverArray","version","split","map","v","parseInt","UNSAFE_componentWillUpdate","componentWillUpdate","UNSAFE_componentWillMount","componentWillMount","SettingsMapper","properties","newSettings","settings","key","hasOwnProperty","HotColumn","context","this","localEditorPortal","portal","internalProps","keys","filter","_this2","includes","reduce","obj","propName","_getEditorCache","_columnIndex","rendererElement","_getChildElementByType","getLocalEditorElement","columnSettings","getSettings","getSettingsProps","renderer","_getRendererWrapper","_componentRendererColumns","hasProp","editor","_getEditorClass","localEditorElement","setLocalEditorPortal","_getOwnerDocument","_emitColumnSettings","createLocalEditorPortal","createColumnSettings","emitColumnSettings","nextProps","nextState","nextContext","Fragment","getLocalEditorPortal","Component","PortalManager","state","portals","b","Symbol","c","d","e","f","g","h","k","l","m","n","p","q","r","t","w","x","y","z","a","u","$$typeof","A","module","require$$0","test1","String","getOwnPropertyNames","test2","i","fromCharCode","order2","test3","letter","err","shouldUseNative","emptyFunction","emptyFunctionWithReset","Function","call","bind","prototype","resetWarningCache","shim","componentName","location","propFullName","secret","Error","name","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require$$2","HotTable","__hotInstance","isDestroyed","console","warn","hotInstance","renderedCellCache","globalEditorPortal","getRenderedCellCache","setGlobalEditorPortal","getOwnerDocument","getEditorCache","clear","componentRendererColumns","hotElementRef","ownerDocument","hotTableComponent","TD","row","col","prop","value","cellProperties","has","innerHTML","getAttribute","rElement","callback","createDocumentFragment","portalContainer","extendedRendererElement","isRenderer","firstChild","portalCacheArray","push","cachedComponent","_editorCache$get","makeEditorClass","editorComponent","customEditorClass","hotCustomEditorInstance","Handsontable","editors","BaseEditor","args","globalEditorElement","getGlobalEditorElement","globalRendererNode","getGlobalRendererElement","globalEditorNode","columns","length","getEditorClass","getRendererWrapper","newGlobalSettings","getPlugin","enabled","_this$hotInstance$get2","size","columnIndex","portalManager","setState","_this3","updateSettings","pmComponent","clearCache","createGlobalEditorPortal","createNewGlobalSettings","Core","addHook","isForced","handsontableBeforeViewRender","handsontableAfterViewRender","init","displayAutoSizeWarning","updateHot","destroy","childClones","childNode","isHotColumn","_this4","setHotColumnSettings","getGlobalEditorPortal","ref","setHotElementRef","setPortalManagerRef","BaseEditorComponent","_fireCallbacks","beginEditing","cancelChanges","checkEditorSection","close","discardEditor","enableFullEditMode","extend","finishEditing","focus","getValue","isInFullEditMode","isOpened","isWaiting","open","originalValue","prepare","saveValue","setValue","removeHooksByKey","clearHooks","getEditedCell","getEditedCellsZIndex"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;q4FAOA,IAAIA,EAAyB,KAiBhBC,EAAsB,SAK7BC,EAAoB,wCAoBVC,EAAsBC,EAA2BC,OACzDC,EAAmCC,UAAMC,SAASC,QAAQL,GAC1DM,EAAwBH,UAAMC,SAASG,MAAMP,GAC/CQ,EAAsC,YAEpB,IAAlBF,IAEAE,EADoB,IAAlBF,GAAwBJ,EAAc,GAA0BO,MAAMR,GAC1DC,EAAc,GAGdA,EAAcQ,MAAK,SAACC,eACqB,IAA7CA,EAA6BF,MAAMR,OAKzCO,GAAsC,cAShCI,EAAuBC,UAChCA,EAIEA,EAAcZ,KAAKa,iBAAmBD,EAAcZ,KAAKa,iBAAmBD,EAAcZ,KAHxF,cAYKc,QAAuBC,yDAAMC,SAC3CD,EAAIE,oCAA6BpB,SAAuBqB,SAAQ,SAACC,GAC3DA,EAAQC,YACVD,EAAQC,WAAWC,YAAYF,eAarBG,QAAmBP,yDAAMC,SAAUJ,4CAC3B,OAAlBA,OAIEW,EAAkBR,EAAIS,cAAc,SACXC,EAA4Bb,EAAcJ,OAAO,GAAzEkB,IAAAA,GAAIC,IAAAA,UAAWC,IAAAA,aAElBF,IACFH,EAAgBG,GAAKA,GAGvBH,EAAgBI,UAAY,CAAC9B,EAAmB8B,GAAWE,KAAK,KAE5DD,GACFE,OAAOC,OAAOR,EAAgBK,MAAOA,GAGvCb,EAAIiB,KAAKC,YAAYV,GAEdW,UAASC,aAAavB,EAAeW,aAY9Ba,EAAyBrC,EAA2BsC,OAA6BC,yDAAqC1C,EAC9HgB,EAAgBd,EAAsBC,EAAU,cAChDwC,EAAc5B,EAAuBC,UAEtCA,EAIEV,UAAMsC,aAAa5B,EAAe,CACvC6B,mBAAoB,SAACC,EAAgBJ,GAC9BD,EAAYM,IAAIJ,IACnBF,EAAYO,IAA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A,OAChBhF,eAAiBA,EAEfmB,UAAaC,QAAQC,WAAW5E,UAAUwI,QAAQ1I,KAAKjF,KAAK4J,wBAAyBtB,EAAKC,EAAKC,EAAMH,EAAIqF,EAAehF,4BAGjI,wCAAasB,uBAAAA,2BACJH,UAAaC,QAAQC,WAAW5E,UAAUyI,WAAU3I,cAAKjF,KAAK4J,gCAA4BI,4BAGnG,wCAAYA,uBAAAA,2BACHH,UAAaC,QAAQC,WAAW5E,UAAU0I,UAAS5I,cAAKjF,KAAK4J,gCAA4BI,2BAGlG,wCAAWA,uBAAAA,2BACDH,UAAaC,QAAQC,WAAW5E,UAAkBsG,SAAQxG,cAAKjF,KAAK4J,gCAA4BI,oCAG1G,wCAAoBA,uBAAAA,2BACVH,UAAaC,QAAQC,WAAW5E,UAAkB2I,kBAAiB7I,cAAKjF,KAAK4J,gCAA4BI,8BAGnH,wCAAcA,uBAAAA,2BACJH,UAAaC,QAAQC,WAAW5E,UAAkB4I,YAAW9I,cAAKjF,KAAK4J,gCAA4BI,iCAG7G,wCAAiBA,uBAAAA,2BACPH,UAAaC,QAAQC,WAAW5E,UAAkB6I,eAAc/I,cAAKjF,KAAK4J,gCAA4BI,wCAGhH,wCAAwBA,uBAAAA,2BACdH,UAAaC,QAAQC,WAAW5E,UAAkB8I,sBAAqBhJ,cAAKjF,KAAK4J,gCAA4BI,WA5H7DtO,UAAM2G"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import ReactDOM from 'react-dom';
3
- import Handsontable from 'handsontable';
3
+ import Handsontable from 'handsontable/base';
4
4
 
5
5
  function ownKeys(object, enumerableOnly) {
6
6
  var keys = Object.keys(object);
@@ -185,6 +185,11 @@ var AUTOSIZE_WARNING = 'Your `HotTable` configuration includes `autoRowSize`/`au
185
185
  */
186
186
 
187
187
  var HOT_DESTROYED_WARNING = 'The Handsontable instance bound to this component was destroyed and cannot be' + ' used properly.';
188
+ /**
189
+ * String identifier for the global-scoped editor components.
190
+ */
191
+
192
+ var GLOBAL_EDITOR_SCOPE = 'global';
188
193
  /**
189
194
  * Default classname given to the wrapper container.
190
195
  */
@@ -299,10 +304,13 @@ function createEditorPortal() {
299
304
  *
300
305
  * @param {React.ReactNode} children Component children.
301
306
  * @param {Map} editorCache Component's editor cache.
307
+ * @param {string|number} [editorColumnScope] The editor scope (column index or a 'global' string). Defaults to
308
+ * 'global'.
302
309
  * @returns {React.ReactElement} An editor element containing the additional methods.
303
310
  */
304
311
 
305
312
  function getExtendedEditorElement(children, editorCache) {
313
+ var editorColumnScope = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : GLOBAL_EDITOR_SCOPE;
306
314
  var editorElement = getChildElementByType(children, 'hot-editor');
307
315
  var editorClass = getOriginalEditorClass(editorElement);
308
316
 
@@ -311,9 +319,15 @@ function getExtendedEditorElement(children, editorCache) {
311
319
  }
312
320
 
313
321
  return React.cloneElement(editorElement, {
314
- emitEditorInstance: function emitEditorInstance(editorInstance) {
315
- editorCache.set(editorClass, editorInstance);
322
+ emitEditorInstance: function emitEditorInstance(editorInstance, editorColumnScope) {
323
+ if (!editorCache.get(editorClass)) {
324
+ editorCache.set(editorClass, new Map());
325
+ }
326
+
327
+ var cacheEntry = editorCache.get(editorClass);
328
+ cacheEntry.set(editorColumnScope !== null && editorColumnScope !== void 0 ? editorColumnScope : GLOBAL_EDITOR_SCOPE, editorInstance);
316
329
  },
330
+ editorColumnScope: editorColumnScope,
317
331
  isEditor: true
318
332
  });
319
333
  }
@@ -517,7 +531,7 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
517
531
  }, {
518
532
  key: "getLocalEditorElement",
519
533
  value: function getLocalEditorElement() {
520
- return getExtendedEditorElement(this.props.children, this.props._getEditorCache());
534
+ return getExtendedEditorElement(this.props.children, this.props._getEditorCache(), this.props._columnIndex);
521
535
  }
522
536
  /**
523
537
  * Create the column settings based on the data provided to the `HotColumn` component and it's child components.
@@ -542,7 +556,7 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
542
556
  }
543
557
 
544
558
  if (editorElement !== null) {
545
- this.columnSettings.editor = this.props._getEditorClass(editorElement);
559
+ this.columnSettings.editor = this.props._getEditorClass(editorElement, this.props._columnIndex);
546
560
  } else if (this.hasProp('editor')) {
547
561
  this.columnSettings.editor = this.props.editor;
548
562
  } else {
@@ -562,7 +576,7 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
562
576
 
563
577
  var editorCache = this.props._getEditorCache();
564
578
 
565
- var localEditorElement = getExtendedEditorElement(children, editorCache);
579
+ var localEditorElement = getExtendedEditorElement(children, editorCache, this.props._columnIndex);
566
580
 
567
581
  if (localEditorElement) {
568
582
  this.setLocalEditorPortal(createEditorPortal(this.props._getOwnerDocument(), localEditorElement, editorCache));
@@ -668,7 +682,7 @@ var PortalManager = /*#__PURE__*/function (_React$Component) {
668
682
  return PortalManager;
669
683
  }(React.Component);
670
684
 
671
- var version="10.0.0";
685
+ var version="11.0.0";
672
686
 
673
687
  function createCommonjsModule(fn, module) {
674
688
  return module = { exports: {} }, fn(module, module.exports), module.exports;
@@ -2225,15 +2239,20 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2225
2239
  * Create a fresh class to be used as an editor, based on the provided editor React element.
2226
2240
  *
2227
2241
  * @param {React.ReactElement} editorElement React editor component.
2242
+ * @param {string|number} [editorColumnScope] The editor scope (column index or a 'global' string). Defaults to
2243
+ * 'global'.
2228
2244
  * @returns {Function} A class to be passed to the Handsontable editor settings.
2229
2245
  */
2230
2246
 
2231
2247
  }, {
2232
2248
  key: "getEditorClass",
2233
2249
  value: function getEditorClass(editorElement) {
2250
+ var _editorCache$get;
2251
+
2252
+ var editorColumnScope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GLOBAL_EDITOR_SCOPE;
2234
2253
  var editorClass = getOriginalEditorClass(editorElement);
2235
2254
  var editorCache = this.getEditorCache();
2236
- var cachedComponent = editorCache.get(editorClass);
2255
+ var cachedComponent = (_editorCache$get = editorCache.get(editorClass)) === null || _editorCache$get === void 0 ? void 0 : _editorCache$get.get(editorColumnScope);
2237
2256
  return this.makeEditorClass(cachedComponent);
2238
2257
  }
2239
2258
  /**
@@ -2251,12 +2270,12 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2251
2270
 
2252
2271
  var _super2 = _createSuper(CustomEditor);
2253
2272
 
2254
- function CustomEditor(hotInstance, row, col, prop, TD, cellProperties) {
2273
+ function CustomEditor(hotInstance) {
2255
2274
  var _this2;
2256
2275
 
2257
2276
  _classCallCheck(this, CustomEditor);
2258
2277
 
2259
- _this2 = _super2.call(this, hotInstance, row, col, prop, TD, cellProperties);
2278
+ _this2 = _super2.call(this, hotInstance);
2260
2279
  editorComponent.hotCustomEditorInstance = _assertThisInitialized(_this2);
2261
2280
  _this2.editorComponent = editorComponent;
2262
2281
  return _this2;
@@ -2356,7 +2375,7 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2356
2375
  newSettings.columns = this.columnSettings.length ? this.columnSettings : newSettings.columns;
2357
2376
 
2358
2377
  if (globalEditorNode) {
2359
- newSettings.editor = this.getEditorClass(globalEditorNode);
2378
+ newSettings.editor = this.getEditorClass(globalEditorNode, GLOBAL_EDITOR_SCOPE);
2360
2379
  } else {
2361
2380
  newSettings.editor = this.props.editor || (this.props.settings ? this.props.settings.editor : void 0);
2362
2381
  }
@@ -2379,7 +2398,9 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2379
2398
  }, {
2380
2399
  key: "displayAutoSizeWarning",
2381
2400
  value: function displayAutoSizeWarning(newGlobalSettings) {
2382
- if (this.hotInstance && (this.hotInstance.getPlugin('autoRowSize').enabled || this.hotInstance.getPlugin('autoColumnSize').enabled)) {
2401
+ var _this$hotInstance$get, _this$hotInstance$get2;
2402
+
2403
+ if (this.hotInstance && ((_this$hotInstance$get = this.hotInstance.getPlugin('autoRowSize')) !== null && _this$hotInstance$get !== void 0 && _this$hotInstance$get.enabled || (_this$hotInstance$get2 = this.hotInstance.getPlugin('autoColumnSize')) !== null && _this$hotInstance$get2 !== void 0 && _this$hotInstance$get2.enabled)) {
2383
2404
  if (this.componentRendererColumns.size > 0) {
2384
2405
  warn(AUTOSIZE_WARNING);
2385
2406
  }
@@ -2611,7 +2632,7 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
2611
2632
  _this.hot = null;
2612
2633
 
2613
2634
  if (props.emitEditorInstance) {
2614
- props.emitEditorInstance(_assertThisInitialized(_this));
2635
+ props.emitEditorInstance(_assertThisInitialized(_this), props.editorColumnScope);
2615
2636
  }
2616
2637
 
2617
2638
  return _this;