@handsontable/react 0.0.0-next-9ec04ce-20221121

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.
@@ -0,0 +1,1768 @@
1
+ /*!
2
+ * Copyright (c) HANDSONCODE sp. z o. o.
3
+ *
4
+ * HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o., a Polish corporation based in
5
+ * Gdynia, Poland, at Aleja Zwycięstwa 96-98, registered by the District Court in Gdansk under number
6
+ * 538651, EU tax ID number: PL5862294002, share capital: PLN 62,800.00.
7
+ *
8
+ * This software is protected by applicable copyright laws, including international treaties, and dual-
9
+ * licensed – depending on whether your use for commercial purposes, meaning intended for or
10
+ * resulting in commercial advantage or monetary compensation, or not.
11
+ *
12
+ * If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing
13
+ * the suitability, performance, and usefulness of this software outside the production environment,
14
+ * you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.
15
+ *
16
+ * Your use of this software for commercial purposes is subject to the terms included in an applicable
17
+ * license agreement.
18
+ *
19
+ * In any case, you must not make any such use of this software as to develop software which may be
20
+ * considered competitive with this software.
21
+ *
22
+ * UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"
23
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO
24
+ * LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
25
+ * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
+ * USE OR INABILITY TO USE THIS SOFTWARE.
27
+ *
28
+ * Version: 0.0.0-next-9ec04ce-20221121 (built at Mon Nov 21 2022 14:48:09 GMT+0000 (Coordinated Universal Time))
29
+ */
30
+ (function (global, factory) {
31
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom'), require('handsontable/base')) :
32
+ typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom', 'handsontable/base'], factory) :
33
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.Handsontable = global.Handsontable || {}, global.Handsontable.react = {}), global.React, global.ReactDOM, global.Handsontable));
34
+ })(this, (function (exports, React, ReactDOM, Handsontable) { 'use strict';
35
+
36
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
37
+
38
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
39
+ var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
40
+ var Handsontable__default = /*#__PURE__*/_interopDefaultLegacy(Handsontable);
41
+
42
+ function ownKeys(object, enumerableOnly) {
43
+ var keys = Object.keys(object);
44
+ if (Object.getOwnPropertySymbols) {
45
+ var symbols = Object.getOwnPropertySymbols(object);
46
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
47
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
48
+ })), keys.push.apply(keys, symbols);
49
+ }
50
+ return keys;
51
+ }
52
+ function _objectSpread2(target) {
53
+ for (var i = 1; i < arguments.length; i++) {
54
+ var source = null != arguments[i] ? arguments[i] : {};
55
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
56
+ _defineProperty(target, key, source[key]);
57
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
58
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
59
+ });
60
+ }
61
+ return target;
62
+ }
63
+ function _typeof(obj) {
64
+ "@babel/helpers - typeof";
65
+
66
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
67
+ return typeof obj;
68
+ } : function (obj) {
69
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
70
+ }, _typeof(obj);
71
+ }
72
+ function _classCallCheck(instance, Constructor) {
73
+ if (!(instance instanceof Constructor)) {
74
+ throw new TypeError("Cannot call a class as a function");
75
+ }
76
+ }
77
+ function _defineProperties(target, props) {
78
+ for (var i = 0; i < props.length; i++) {
79
+ var descriptor = props[i];
80
+ descriptor.enumerable = descriptor.enumerable || false;
81
+ descriptor.configurable = true;
82
+ if ("value" in descriptor) descriptor.writable = true;
83
+ Object.defineProperty(target, descriptor.key, descriptor);
84
+ }
85
+ }
86
+ function _createClass(Constructor, protoProps, staticProps) {
87
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
88
+ if (staticProps) _defineProperties(Constructor, staticProps);
89
+ Object.defineProperty(Constructor, "prototype", {
90
+ writable: false
91
+ });
92
+ return Constructor;
93
+ }
94
+ function _defineProperty(obj, key, value) {
95
+ if (key in obj) {
96
+ Object.defineProperty(obj, key, {
97
+ value: value,
98
+ enumerable: true,
99
+ configurable: true,
100
+ writable: true
101
+ });
102
+ } else {
103
+ obj[key] = value;
104
+ }
105
+ return obj;
106
+ }
107
+ function _inherits(subClass, superClass) {
108
+ if (typeof superClass !== "function" && superClass !== null) {
109
+ throw new TypeError("Super expression must either be null or a function");
110
+ }
111
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
112
+ constructor: {
113
+ value: subClass,
114
+ writable: true,
115
+ configurable: true
116
+ }
117
+ });
118
+ Object.defineProperty(subClass, "prototype", {
119
+ writable: false
120
+ });
121
+ if (superClass) _setPrototypeOf(subClass, superClass);
122
+ }
123
+ function _getPrototypeOf(o) {
124
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
125
+ return o.__proto__ || Object.getPrototypeOf(o);
126
+ };
127
+ return _getPrototypeOf(o);
128
+ }
129
+ function _setPrototypeOf(o, p) {
130
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
131
+ o.__proto__ = p;
132
+ return o;
133
+ };
134
+ return _setPrototypeOf(o, p);
135
+ }
136
+ function _isNativeReflectConstruct() {
137
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
138
+ if (Reflect.construct.sham) return false;
139
+ if (typeof Proxy === "function") return true;
140
+ try {
141
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
142
+ return true;
143
+ } catch (e) {
144
+ return false;
145
+ }
146
+ }
147
+ function _assertThisInitialized(self) {
148
+ if (self === void 0) {
149
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
150
+ }
151
+ return self;
152
+ }
153
+ function _possibleConstructorReturn(self, call) {
154
+ if (call && (typeof call === "object" || typeof call === "function")) {
155
+ return call;
156
+ } else if (call !== void 0) {
157
+ throw new TypeError("Derived constructors may only return object or undefined");
158
+ }
159
+ return _assertThisInitialized(self);
160
+ }
161
+ function _createSuper(Derived) {
162
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
163
+ return function _createSuperInternal() {
164
+ var Super = _getPrototypeOf(Derived),
165
+ result;
166
+ if (hasNativeReflectConstruct) {
167
+ var NewTarget = _getPrototypeOf(this).constructor;
168
+ result = Reflect.construct(Super, arguments, NewTarget);
169
+ } else {
170
+ result = Super.apply(this, arguments);
171
+ }
172
+ return _possibleConstructorReturn(this, result);
173
+ };
174
+ }
175
+
176
+ var bulkComponentContainer = null;
177
+ /**
178
+ * Warning message for the `autoRowSize`/`autoColumnSize` compatibility check.
179
+ */
180
+ var AUTOSIZE_WARNING = 'Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with ' + ' the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.';
181
+ /**
182
+ * Message for the warning thrown if the Handsontable instance has been destroyed.
183
+ */
184
+ var HOT_DESTROYED_WARNING = 'The Handsontable instance bound to this component was destroyed and cannot be' + ' used properly.';
185
+ /**
186
+ * String identifier for the global-scoped editor components.
187
+ */
188
+ var GLOBAL_EDITOR_SCOPE = 'global';
189
+ /**
190
+ * Default classname given to the wrapper container.
191
+ */
192
+ var DEFAULT_CLASSNAME = 'hot-wrapper-editor-container';
193
+ /**
194
+ * Logs warn to the console if the `console` object is exposed.
195
+ *
196
+ * @param {...*} args Values which will be logged.
197
+ */
198
+ function warn() {
199
+ if (typeof console !== 'undefined') {
200
+ var _console;
201
+ (_console = console).warn.apply(_console, arguments);
202
+ }
203
+ }
204
+ /**
205
+ * Filter out and return elements of the provided `type` from the `HotColumn` component's children.
206
+ *
207
+ * @param {React.ReactNode} children HotTable children array.
208
+ * @param {String} type Either `'hot-renderer'` or `'hot-editor'`.
209
+ * @returns {Object|null} A child (React node) or `null`, if no child of that type was found.
210
+ */
211
+ function getChildElementByType(children, type) {
212
+ var childrenArray = React__default["default"].Children.toArray(children);
213
+ var childrenCount = React__default["default"].Children.count(children);
214
+ var wantedChild = null;
215
+ if (childrenCount !== 0) {
216
+ if (childrenCount === 1 && childrenArray[0].props[type]) {
217
+ wantedChild = childrenArray[0];
218
+ } else {
219
+ wantedChild = childrenArray.find(function (child) {
220
+ return child.props[type] !== void 0;
221
+ });
222
+ }
223
+ }
224
+ return wantedChild || null;
225
+ }
226
+ /**
227
+ * Get the reference to the original editor class.
228
+ *
229
+ * @param {React.ReactElement} editorElement React element of the editor class.
230
+ * @returns {Function} Original class of the editor component.
231
+ */
232
+ function getOriginalEditorClass(editorElement) {
233
+ if (!editorElement) {
234
+ return null;
235
+ }
236
+ return editorElement.type.WrappedComponent ? editorElement.type.WrappedComponent : editorElement.type;
237
+ }
238
+ /**
239
+ * Remove editor containers from DOM.
240
+ *
241
+ * @param {Document} [doc] Document to be used.
242
+ * @param {Map} editorCache The editor cache reference.
243
+ */
244
+ function removeEditorContainers() {
245
+ var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
246
+ doc.querySelectorAll("[class^=\"".concat(DEFAULT_CLASSNAME, "\"]")).forEach(function (domNode) {
247
+ if (domNode.parentNode) {
248
+ domNode.parentNode.removeChild(domNode);
249
+ }
250
+ });
251
+ }
252
+ /**
253
+ * Create an editor portal.
254
+ *
255
+ * @param {Document} [doc] Document to be used.
256
+ * @param {React.ReactElement} editorElement Editor's element.
257
+ * @param {Map} editorCache The editor cache reference.
258
+ * @returns {React.ReactPortal} The portal for the editor.
259
+ */
260
+ function createEditorPortal() {
261
+ var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
262
+ var editorElement = arguments.length > 1 ? arguments[1] : undefined;
263
+ if (editorElement === null) {
264
+ return;
265
+ }
266
+ var editorContainer = doc.createElement('DIV');
267
+ var _getContainerAttribut = getContainerAttributesProps(editorElement.props, false),
268
+ id = _getContainerAttribut.id,
269
+ className = _getContainerAttribut.className,
270
+ style = _getContainerAttribut.style;
271
+ if (id) {
272
+ editorContainer.id = id;
273
+ }
274
+ editorContainer.className = [DEFAULT_CLASSNAME, className].join(' ');
275
+ if (style) {
276
+ Object.assign(editorContainer.style, style);
277
+ }
278
+ doc.body.appendChild(editorContainer);
279
+ return ReactDOM__default["default"].createPortal(editorElement, editorContainer);
280
+ }
281
+ /**
282
+ * Get an editor element extended with a instance-emitting method.
283
+ *
284
+ * @param {React.ReactNode} children Component children.
285
+ * @param {Map} editorCache Component's editor cache.
286
+ * @param {string|number} [editorColumnScope] The editor scope (column index or a 'global' string). Defaults to
287
+ * 'global'.
288
+ * @returns {React.ReactElement} An editor element containing the additional methods.
289
+ */
290
+ function getExtendedEditorElement(children, editorCache) {
291
+ var editorColumnScope = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : GLOBAL_EDITOR_SCOPE;
292
+ var editorElement = getChildElementByType(children, 'hot-editor');
293
+ var editorClass = getOriginalEditorClass(editorElement);
294
+ if (!editorElement) {
295
+ return null;
296
+ }
297
+ return React__default["default"].cloneElement(editorElement, {
298
+ emitEditorInstance: function emitEditorInstance(editorInstance, editorColumnScope) {
299
+ if (!editorCache.get(editorClass)) {
300
+ editorCache.set(editorClass, new Map());
301
+ }
302
+ var cacheEntry = editorCache.get(editorClass);
303
+ cacheEntry.set(editorColumnScope !== null && editorColumnScope !== void 0 ? editorColumnScope : GLOBAL_EDITOR_SCOPE, editorInstance);
304
+ },
305
+ editorColumnScope: editorColumnScope,
306
+ isEditor: true
307
+ });
308
+ }
309
+ /**
310
+ * Create a react component and render it to an external DOM done.
311
+ *
312
+ * @param {React.ReactElement} rElement React element to be used as a base for the component.
313
+ * @param {Object} props Props to be passed to the cloned element.
314
+ * @param {Function} callback Callback to be called after the component has been mounted.
315
+ * @param {Document} [ownerDocument] The owner document to set the portal up into.
316
+ * @returns {{portal: React.ReactPortal, portalContainer: HTMLElement}} An object containing the portal and its container.
317
+ */
318
+ function createPortal(rElement, props, callback) {
319
+ var ownerDocument = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : document;
320
+ if (!ownerDocument) {
321
+ ownerDocument = document;
322
+ }
323
+ if (!bulkComponentContainer) {
324
+ bulkComponentContainer = ownerDocument.createDocumentFragment();
325
+ }
326
+ var portalContainer = ownerDocument.createElement('DIV');
327
+ bulkComponentContainer.appendChild(portalContainer);
328
+ var extendedRendererElement = React__default["default"].cloneElement(rElement, _objectSpread2({
329
+ key: "".concat(props.row, "-").concat(props.col)
330
+ }, props));
331
+ return {
332
+ portal: ReactDOM__default["default"].createPortal(extendedRendererElement, portalContainer, "".concat(props.row, "-").concat(props.col, "-").concat(Math.random())),
333
+ portalContainer: portalContainer
334
+ };
335
+ }
336
+ /**
337
+ * Get an object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the
338
+ * component.
339
+ *
340
+ * @param {Object} props Object containing the react element props.
341
+ * @param {Boolean} randomizeId If set to `true`, the function will randomize the `id` property when no `id` was present in the `prop` object.
342
+ * @returns An object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the
343
+ * component.
344
+ */
345
+ function getContainerAttributesProps(props) {
346
+ var randomizeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
347
+ return {
348
+ id: props.id || (randomizeId ? 'hot-' + Math.random().toString(36).substring(5) : void 0),
349
+ className: props.className || '',
350
+ style: props.style || {}
351
+ };
352
+ }
353
+ /**
354
+ * Add the `UNSAFE_` prefixes to the deprecated lifecycle methods for React >= 16.3.
355
+ *
356
+ * @param {Object} instance Instance to have the methods renamed.
357
+ */
358
+ function addUnsafePrefixes(instance) {
359
+ var reactSemverArray = React__default["default"].version.split('.').map(function (v) {
360
+ return parseInt(v);
361
+ });
362
+ var shouldPrefix = reactSemverArray[0] >= 16 && reactSemverArray[1] >= 3 || reactSemverArray[0] >= 17;
363
+ if (shouldPrefix) {
364
+ instance.UNSAFE_componentWillUpdate = instance.componentWillUpdate;
365
+ instance.componentWillUpdate = void 0;
366
+ instance.UNSAFE_componentWillMount = instance.componentWillMount;
367
+ instance.componentWillMount = void 0;
368
+ }
369
+ }
370
+
371
+ var SettingsMapper = /*#__PURE__*/function () {
372
+ function SettingsMapper() {
373
+ _classCallCheck(this, SettingsMapper);
374
+ }
375
+ _createClass(SettingsMapper, null, [{
376
+ key: "getSettings",
377
+ value:
378
+ /**
379
+ * Parse component settings into Handosntable-compatible settings.
380
+ *
381
+ * @param {Object} properties Object containing properties from the HotTable object.
382
+ * @returns {Object} Handsontable-compatible settings object.
383
+ */
384
+ function getSettings(properties) {
385
+ var newSettings = {};
386
+ if (properties.settings) {
387
+ var settings = properties.settings;
388
+ for (var key in settings) {
389
+ if (settings.hasOwnProperty(key)) {
390
+ newSettings[key] = settings[key];
391
+ }
392
+ }
393
+ }
394
+ for (var _key in properties) {
395
+ if (_key !== 'settings' && _key !== 'children' && properties.hasOwnProperty(_key)) {
396
+ newSettings[_key] = properties[_key];
397
+ }
398
+ }
399
+ return newSettings;
400
+ }
401
+ }]);
402
+ return SettingsMapper;
403
+ }();
404
+
405
+ var HotColumn = /*#__PURE__*/function (_React$Component) {
406
+ _inherits(HotColumn, _React$Component);
407
+ var _super = _createSuper(HotColumn);
408
+ /**
409
+ * HotColumn class constructor.
410
+ *
411
+ * @param {HotColumnProps} props Component props.
412
+ * @param {*} [context] Component context.
413
+ */
414
+ function HotColumn(props, context) {
415
+ var _this;
416
+ _classCallCheck(this, HotColumn);
417
+ _this = _super.call(this, props, context);
418
+ /**
419
+ * Local editor portal cache.
420
+ *
421
+ * @private
422
+ * @type {ReactPortal}
423
+ */
424
+ _this.localEditorPortal = null;
425
+ addUnsafePrefixes(_assertThisInitialized(_this));
426
+ return _this;
427
+ }
428
+ /**
429
+ * Get the local editor portal cache property.
430
+ *
431
+ * @return {ReactPortal} Local editor portal.
432
+ */
433
+ _createClass(HotColumn, [{
434
+ key: "getLocalEditorPortal",
435
+ value: function getLocalEditorPortal() {
436
+ return this.localEditorPortal;
437
+ }
438
+ /**
439
+ * Set the local editor portal cache property.
440
+ *
441
+ * @param {ReactPortal} portal Local editor portal.
442
+ */
443
+ }, {
444
+ key: "setLocalEditorPortal",
445
+ value: function setLocalEditorPortal(portal) {
446
+ this.localEditorPortal = portal;
447
+ }
448
+ /**
449
+ * Filter out all the internal properties and return an object with just the Handsontable-related props.
450
+ *
451
+ * @returns {Object}
452
+ */
453
+ }, {
454
+ key: "getSettingsProps",
455
+ value: function getSettingsProps() {
456
+ var _this2 = this;
457
+ this.internalProps = ['__componentRendererColumns', '_emitColumnSettings', '_columnIndex', '_getChildElementByType', '_getRendererWrapper', '_getEditorClass', '_getEditorCache', '_getOwnerDocument', 'hot-renderer', 'hot-editor', 'children'];
458
+ return Object.keys(this.props).filter(function (key) {
459
+ return !_this2.internalProps.includes(key);
460
+ }).reduce(function (obj, key) {
461
+ obj[key] = _this2.props[key];
462
+ return obj;
463
+ }, {});
464
+ }
465
+ /**
466
+ * Get the editor element for the current column.
467
+ *
468
+ * @returns {React.ReactElement} React editor component element.
469
+ */
470
+ }, {
471
+ key: "getLocalEditorElement",
472
+ value: function getLocalEditorElement() {
473
+ return getExtendedEditorElement(this.props.children, this.props._getEditorCache(), this.props._columnIndex);
474
+ }
475
+ /**
476
+ * Create the column settings based on the data provided to the `HotColumn` component and it's child components.
477
+ */
478
+ }, {
479
+ key: "createColumnSettings",
480
+ value: function createColumnSettings() {
481
+ var rendererElement = this.props._getChildElementByType(this.props.children, 'hot-renderer');
482
+ var editorElement = this.getLocalEditorElement();
483
+ this.columnSettings = SettingsMapper.getSettings(this.getSettingsProps());
484
+ if (rendererElement !== null) {
485
+ this.columnSettings.renderer = this.props._getRendererWrapper(rendererElement);
486
+ this.props._componentRendererColumns.set(this.props._columnIndex, true);
487
+ }
488
+ if (editorElement !== null) {
489
+ this.columnSettings.editor = this.props._getEditorClass(editorElement, this.props._columnIndex);
490
+ }
491
+ }
492
+ /**
493
+ * Create the local editor portal and its destination HTML element if needed.
494
+ *
495
+ * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.
496
+ */
497
+ }, {
498
+ key: "createLocalEditorPortal",
499
+ value: function createLocalEditorPortal() {
500
+ var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.children;
501
+ var editorCache = this.props._getEditorCache();
502
+ var localEditorElement = getExtendedEditorElement(children, editorCache, this.props._columnIndex);
503
+ if (localEditorElement) {
504
+ this.setLocalEditorPortal(createEditorPortal(this.props._getOwnerDocument(), localEditorElement, editorCache));
505
+ }
506
+ }
507
+ /**
508
+ * Emit the column settings to the parent using a prop passed from the parent.
509
+ */
510
+ }, {
511
+ key: "emitColumnSettings",
512
+ value: function emitColumnSettings() {
513
+ this.props._emitColumnSettings(this.columnSettings, this.props._columnIndex);
514
+ }
515
+ /*
516
+ ---------------------------------------
517
+ ------- React lifecycle methods -------
518
+ ---------------------------------------
519
+ */
520
+ /**
521
+ * Logic performed before the mounting of the HotColumn component.
522
+ */
523
+ }, {
524
+ key: "componentWillMount",
525
+ value: function componentWillMount() {
526
+ this.createLocalEditorPortal();
527
+ }
528
+ /**
529
+ * Logic performed after the mounting of the HotColumn component.
530
+ */
531
+ }, {
532
+ key: "componentDidMount",
533
+ value: function componentDidMount() {
534
+ this.createColumnSettings();
535
+ this.emitColumnSettings();
536
+ }
537
+ /**
538
+ * Logic performed before the updating of the HotColumn component.
539
+ */
540
+ }, {
541
+ key: "componentWillUpdate",
542
+ value: function componentWillUpdate(nextProps, nextState, nextContext) {
543
+ this.createLocalEditorPortal(nextProps.children);
544
+ }
545
+ /**
546
+ * Logic performed after the updating of the HotColumn component.
547
+ */
548
+ }, {
549
+ key: "componentDidUpdate",
550
+ value: function componentDidUpdate() {
551
+ this.createColumnSettings();
552
+ this.emitColumnSettings();
553
+ }
554
+ /**
555
+ * Render the portals of the editors, if there are any.
556
+ *
557
+ * @returns {React.ReactElement}
558
+ */
559
+ }, {
560
+ key: "render",
561
+ value: function render() {
562
+ return React__default["default"].createElement(React__default["default"].Fragment, null, this.getLocalEditorPortal());
563
+ }
564
+ }]);
565
+ return HotColumn;
566
+ }(React__default["default"].Component);
567
+
568
+ /**
569
+ * Component class used to manage the renderer component portals.
570
+ */
571
+ var PortalManager = /*#__PURE__*/function (_React$Component) {
572
+ _inherits(PortalManager, _React$Component);
573
+ var _super = _createSuper(PortalManager);
574
+ function PortalManager(props) {
575
+ var _this;
576
+ _classCallCheck(this, PortalManager);
577
+ _this = _super.call(this, props);
578
+ _this.state = {
579
+ portals: []
580
+ };
581
+ return _this;
582
+ }
583
+ _createClass(PortalManager, [{
584
+ key: "render",
585
+ value: function render() {
586
+ return React__default["default"].createElement(React__default["default"].Fragment, null, this.state.portals);
587
+ }
588
+ }]);
589
+ return PortalManager;
590
+ }(React__default["default"].Component);
591
+
592
+ var version="0.0.0-next-9ec04ce-20221121";
593
+
594
+ function createCommonjsModule(fn, module) {
595
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
596
+ }
597
+
598
+ /** @license React v16.13.1
599
+ * react-is.production.min.js
600
+ *
601
+ * Copyright (c) Facebook, Inc. and its affiliates.
602
+ *
603
+ * This source code is licensed under the MIT license found in the
604
+ * LICENSE file in the root directory of this source tree.
605
+ */
606
+ var b = "function" === typeof Symbol && Symbol["for"],
607
+ c = b ? Symbol["for"]("react.element") : 60103,
608
+ d = b ? Symbol["for"]("react.portal") : 60106,
609
+ e = b ? Symbol["for"]("react.fragment") : 60107,
610
+ f = b ? Symbol["for"]("react.strict_mode") : 60108,
611
+ g = b ? Symbol["for"]("react.profiler") : 60114,
612
+ h = b ? Symbol["for"]("react.provider") : 60109,
613
+ k = b ? Symbol["for"]("react.context") : 60110,
614
+ l = b ? Symbol["for"]("react.async_mode") : 60111,
615
+ m = b ? Symbol["for"]("react.concurrent_mode") : 60111,
616
+ n = b ? Symbol["for"]("react.forward_ref") : 60112,
617
+ p = b ? Symbol["for"]("react.suspense") : 60113,
618
+ q = b ? Symbol["for"]("react.suspense_list") : 60120,
619
+ r = b ? Symbol["for"]("react.memo") : 60115,
620
+ t = b ? Symbol["for"]("react.lazy") : 60116,
621
+ v = b ? Symbol["for"]("react.block") : 60121,
622
+ w = b ? Symbol["for"]("react.fundamental") : 60117,
623
+ x = b ? Symbol["for"]("react.responder") : 60118,
624
+ y = b ? Symbol["for"]("react.scope") : 60119;
625
+ function z(a) {
626
+ if ("object" === _typeof(a) && null !== a) {
627
+ var u = a.$$typeof;
628
+ switch (u) {
629
+ case c:
630
+ switch (a = a.type, a) {
631
+ case l:
632
+ case m:
633
+ case e:
634
+ case g:
635
+ case f:
636
+ case p:
637
+ return a;
638
+ default:
639
+ switch (a = a && a.$$typeof, a) {
640
+ case k:
641
+ case n:
642
+ case t:
643
+ case r:
644
+ case h:
645
+ return a;
646
+ default:
647
+ return u;
648
+ }
649
+ }
650
+ case d:
651
+ return u;
652
+ }
653
+ }
654
+ }
655
+ function A(a) {
656
+ return z(a) === m;
657
+ }
658
+ var AsyncMode = l;
659
+ var ConcurrentMode = m;
660
+ var ContextConsumer = k;
661
+ var ContextProvider = h;
662
+ var Element = c;
663
+ var ForwardRef = n;
664
+ var Fragment = e;
665
+ var Lazy = t;
666
+ var Memo = r;
667
+ var Portal = d;
668
+ var Profiler = g;
669
+ var StrictMode = f;
670
+ var Suspense = p;
671
+ var isAsyncMode = function isAsyncMode(a) {
672
+ return A(a) || z(a) === l;
673
+ };
674
+ var isConcurrentMode = A;
675
+ var isContextConsumer = function isContextConsumer(a) {
676
+ return z(a) === k;
677
+ };
678
+ var isContextProvider = function isContextProvider(a) {
679
+ return z(a) === h;
680
+ };
681
+ var isElement = function isElement(a) {
682
+ return "object" === _typeof(a) && null !== a && a.$$typeof === c;
683
+ };
684
+ var isForwardRef = function isForwardRef(a) {
685
+ return z(a) === n;
686
+ };
687
+ var isFragment = function isFragment(a) {
688
+ return z(a) === e;
689
+ };
690
+ var isLazy = function isLazy(a) {
691
+ return z(a) === t;
692
+ };
693
+ var isMemo = function isMemo(a) {
694
+ return z(a) === r;
695
+ };
696
+ var isPortal = function isPortal(a) {
697
+ return z(a) === d;
698
+ };
699
+ var isProfiler = function isProfiler(a) {
700
+ return z(a) === g;
701
+ };
702
+ var isStrictMode = function isStrictMode(a) {
703
+ return z(a) === f;
704
+ };
705
+ var isSuspense = function isSuspense(a) {
706
+ return z(a) === p;
707
+ };
708
+ var isValidElementType = function isValidElementType(a) {
709
+ 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);
710
+ };
711
+ var typeOf = z;
712
+ var reactIs_production_min = {
713
+ AsyncMode: AsyncMode,
714
+ ConcurrentMode: ConcurrentMode,
715
+ ContextConsumer: ContextConsumer,
716
+ ContextProvider: ContextProvider,
717
+ Element: Element,
718
+ ForwardRef: ForwardRef,
719
+ Fragment: Fragment,
720
+ Lazy: Lazy,
721
+ Memo: Memo,
722
+ Portal: Portal,
723
+ Profiler: Profiler,
724
+ StrictMode: StrictMode,
725
+ Suspense: Suspense,
726
+ isAsyncMode: isAsyncMode,
727
+ isConcurrentMode: isConcurrentMode,
728
+ isContextConsumer: isContextConsumer,
729
+ isContextProvider: isContextProvider,
730
+ isElement: isElement,
731
+ isForwardRef: isForwardRef,
732
+ isFragment: isFragment,
733
+ isLazy: isLazy,
734
+ isMemo: isMemo,
735
+ isPortal: isPortal,
736
+ isProfiler: isProfiler,
737
+ isStrictMode: isStrictMode,
738
+ isSuspense: isSuspense,
739
+ isValidElementType: isValidElementType,
740
+ typeOf: typeOf
741
+ };
742
+
743
+ var reactIs_development = createCommonjsModule(function (module, exports) {
744
+ });
745
+ reactIs_development.AsyncMode;
746
+ reactIs_development.ConcurrentMode;
747
+ reactIs_development.ContextConsumer;
748
+ reactIs_development.ContextProvider;
749
+ reactIs_development.Element;
750
+ reactIs_development.ForwardRef;
751
+ reactIs_development.Fragment;
752
+ reactIs_development.Lazy;
753
+ reactIs_development.Memo;
754
+ reactIs_development.Portal;
755
+ reactIs_development.Profiler;
756
+ reactIs_development.StrictMode;
757
+ reactIs_development.Suspense;
758
+ reactIs_development.isAsyncMode;
759
+ reactIs_development.isConcurrentMode;
760
+ reactIs_development.isContextConsumer;
761
+ reactIs_development.isContextProvider;
762
+ reactIs_development.isElement;
763
+ reactIs_development.isForwardRef;
764
+ reactIs_development.isFragment;
765
+ reactIs_development.isLazy;
766
+ reactIs_development.isMemo;
767
+ reactIs_development.isPortal;
768
+ reactIs_development.isProfiler;
769
+ reactIs_development.isStrictMode;
770
+ reactIs_development.isSuspense;
771
+ reactIs_development.isValidElementType;
772
+ reactIs_development.typeOf;
773
+
774
+ createCommonjsModule(function (module) {
775
+
776
+ {
777
+ module.exports = reactIs_production_min;
778
+ }
779
+ });
780
+
781
+ /*
782
+ object-assign
783
+ (c) Sindre Sorhus
784
+ @license MIT
785
+ */
786
+
787
+ /* eslint-disable no-unused-vars */
788
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
789
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
790
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
791
+ function toObject(val) {
792
+ if (val === null || val === undefined) {
793
+ throw new TypeError('Object.assign cannot be called with null or undefined');
794
+ }
795
+ return Object(val);
796
+ }
797
+ function shouldUseNative() {
798
+ try {
799
+ if (!Object.assign) {
800
+ return false;
801
+ }
802
+
803
+ // Detect buggy property enumeration order in older V8 versions.
804
+
805
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
806
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
807
+ test1[5] = 'de';
808
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
809
+ return false;
810
+ }
811
+
812
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
813
+ var test2 = {};
814
+ for (var i = 0; i < 10; i++) {
815
+ test2['_' + String.fromCharCode(i)] = i;
816
+ }
817
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
818
+ return test2[n];
819
+ });
820
+ if (order2.join('') !== '0123456789') {
821
+ return false;
822
+ }
823
+
824
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
825
+ var test3 = {};
826
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
827
+ test3[letter] = letter;
828
+ });
829
+ if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
830
+ return false;
831
+ }
832
+ return true;
833
+ } catch (err) {
834
+ // We don't expect any of the above to throw, but better to be safe.
835
+ return false;
836
+ }
837
+ }
838
+ shouldUseNative() ? Object.assign : function (target, source) {
839
+ var from;
840
+ var to = toObject(target);
841
+ var symbols;
842
+ for (var s = 1; s < arguments.length; s++) {
843
+ from = Object(arguments[s]);
844
+ for (var key in from) {
845
+ if (hasOwnProperty.call(from, key)) {
846
+ to[key] = from[key];
847
+ }
848
+ }
849
+ if (getOwnPropertySymbols) {
850
+ symbols = getOwnPropertySymbols(from);
851
+ for (var i = 0; i < symbols.length; i++) {
852
+ if (propIsEnumerable.call(from, symbols[i])) {
853
+ to[symbols[i]] = from[symbols[i]];
854
+ }
855
+ }
856
+ }
857
+ }
858
+ return to;
859
+ };
860
+
861
+ /**
862
+ * Copyright (c) 2013-present, Facebook, Inc.
863
+ *
864
+ * This source code is licensed under the MIT license found in the
865
+ * LICENSE file in the root directory of this source tree.
866
+ */
867
+
868
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
869
+ var ReactPropTypesSecret_1 = ReactPropTypesSecret;
870
+
871
+ Function.call.bind(Object.prototype.hasOwnProperty);
872
+
873
+ function emptyFunction() {}
874
+ function emptyFunctionWithReset() {}
875
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
876
+ var factoryWithThrowingShims = function factoryWithThrowingShims() {
877
+ function shim(props, propName, componentName, location, propFullName, secret) {
878
+ if (secret === ReactPropTypesSecret_1) {
879
+ // It is still safe when called from React.
880
+ return;
881
+ }
882
+ var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
883
+ err.name = 'Invariant Violation';
884
+ throw err;
885
+ }
886
+ shim.isRequired = shim;
887
+ function getShim() {
888
+ return shim;
889
+ }
890
+ // Important!
891
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
892
+ var ReactPropTypes = {
893
+ array: shim,
894
+ bigint: shim,
895
+ bool: shim,
896
+ func: shim,
897
+ number: shim,
898
+ object: shim,
899
+ string: shim,
900
+ symbol: shim,
901
+ any: shim,
902
+ arrayOf: getShim,
903
+ element: shim,
904
+ elementType: shim,
905
+ instanceOf: getShim,
906
+ node: shim,
907
+ objectOf: getShim,
908
+ oneOf: getShim,
909
+ oneOfType: getShim,
910
+ shape: getShim,
911
+ exact: getShim,
912
+ checkPropTypes: emptyFunctionWithReset,
913
+ resetWarningCache: emptyFunction
914
+ };
915
+ ReactPropTypes.PropTypes = ReactPropTypes;
916
+ return ReactPropTypes;
917
+ };
918
+
919
+ var propTypes = createCommonjsModule(function (module) {
920
+ /**
921
+ * Copyright (c) 2013-present, Facebook, Inc.
922
+ *
923
+ * This source code is licensed under the MIT license found in the
924
+ * LICENSE file in the root directory of this source tree.
925
+ */
926
+
927
+ {
928
+ // By explicitly using `prop-types` you are opting into new production behavior.
929
+ // http://fb.me/prop-types-in-prod
930
+ module.exports = factoryWithThrowingShims();
931
+ }
932
+ });
933
+ var PropTypes = propTypes;
934
+
935
+ /**
936
+ * A Handsontable-ReactJS wrapper.
937
+ *
938
+ * To implement, use the `HotTable` tag with properties corresponding to Handsontable options.
939
+ * For example:
940
+ *
941
+ * ```js
942
+ * <HotTable id="hot" data={dataObject} contextMenu={true} colHeaders={true} width={600} height={300} stretchH="all" />
943
+ *
944
+ * // is analogous to
945
+ * let hot = new Handsontable(document.getElementById('hot'), {
946
+ * data: dataObject,
947
+ * contextMenu: true,
948
+ * colHeaders: true,
949
+ * width: 600
950
+ * height: 300
951
+ * });
952
+ *
953
+ * ```
954
+ *
955
+ * @class HotTable
956
+ */
957
+ var HotTable = /*#__PURE__*/function (_React$Component) {
958
+ _inherits(HotTable, _React$Component);
959
+ var _super = _createSuper(HotTable);
960
+ /**
961
+ * HotTable class constructor.
962
+ *
963
+ * @param {HotTableProps} props Component props.
964
+ * @param {*} [context] Component context.
965
+ */
966
+ function HotTable(props, context) {
967
+ var _this;
968
+ _classCallCheck(this, HotTable);
969
+ _this = _super.call(this, props, context);
970
+ /**
971
+ * The `id` of the main Handsontable DOM element.
972
+ *
973
+ * @type {String}
974
+ */
975
+ _this.id = null;
976
+ /**
977
+ * Reference to the Handsontable instance.
978
+ *
979
+ * @private
980
+ * @type {Object}
981
+ */
982
+ _this.__hotInstance = null;
983
+ /**
984
+ * Reference to the main Handsontable DOM element.
985
+ *
986
+ * @type {HTMLElement}
987
+ */
988
+ _this.hotElementRef = null;
989
+ /**
990
+ * Array of object containing the column settings.
991
+ *
992
+ * @type {Array}
993
+ */
994
+ _this.columnSettings = [];
995
+ /**
996
+ * Component used to manage the renderer portals.
997
+ *
998
+ * @type {React.Component}
999
+ */
1000
+ _this.portalManager = null;
1001
+ /**
1002
+ * Array containing the portals cashed to be rendered in bulk after Handsontable's render cycle.
1003
+ */
1004
+ _this.portalCacheArray = [];
1005
+ /**
1006
+ * Global editor portal cache.
1007
+ *
1008
+ * @private
1009
+ * @type {React.ReactPortal}
1010
+ */
1011
+ _this.globalEditorPortal = null;
1012
+ /**
1013
+ * The rendered cells cache.
1014
+ *
1015
+ * @private
1016
+ * @type {Map}
1017
+ */
1018
+ _this.renderedCellCache = new Map();
1019
+ /**
1020
+ * Editor cache.
1021
+ *
1022
+ * @private
1023
+ * @type {Map}
1024
+ */
1025
+ _this.editorCache = new Map();
1026
+ /**
1027
+ * Map with column indexes (or a string = 'global') as keys, and booleans as values. Each key represents a component-based editor
1028
+ * declared for the used column index, or a global one, if the key is the `global` string.
1029
+ *
1030
+ * @private
1031
+ * @type {Map}
1032
+ */
1033
+ _this.componentRendererColumns = new Map();
1034
+ addUnsafePrefixes(_assertThisInitialized(_this));
1035
+ return _this;
1036
+ }
1037
+ /**
1038
+ * Package version getter.
1039
+ *
1040
+ * @returns The version number of the package.
1041
+ */
1042
+ _createClass(HotTable, [{
1043
+ key: "hotInstance",
1044
+ get:
1045
+ /**
1046
+ * Getter for the property storing the Handsontable instance.
1047
+ */
1048
+ function get() {
1049
+ if (!this.__hotInstance || this.__hotInstance && !this.__hotInstance.isDestroyed) {
1050
+ // Will return the Handsontable instance or `null` if it's not yet been created.
1051
+ return this.__hotInstance;
1052
+ } else {
1053
+ console.warn(HOT_DESTROYED_WARNING);
1054
+ return null;
1055
+ }
1056
+ }
1057
+ /**
1058
+ * Setter for the property storing the Handsontable instance.
1059
+ * @param {Handsontable} hotInstance The Handsontable instance.
1060
+ */,
1061
+ set: function set(hotInstance) {
1062
+ this.__hotInstance = hotInstance;
1063
+ }
1064
+ /**
1065
+ * Get the rendered table cell cache.
1066
+ *
1067
+ * @returns {Map}
1068
+ */
1069
+ }, {
1070
+ key: "getRenderedCellCache",
1071
+ value: function getRenderedCellCache() {
1072
+ return this.renderedCellCache;
1073
+ }
1074
+ /**
1075
+ * Get the editor cache and return it.
1076
+ *
1077
+ * @returns {Map}
1078
+ */
1079
+ }, {
1080
+ key: "getEditorCache",
1081
+ value: function getEditorCache() {
1082
+ return this.editorCache;
1083
+ }
1084
+ /**
1085
+ * Get the global editor portal property.
1086
+ *
1087
+ * @return {React.ReactPortal} The global editor portal.
1088
+ */
1089
+ }, {
1090
+ key: "getGlobalEditorPortal",
1091
+ value: function getGlobalEditorPortal() {
1092
+ return this.globalEditorPortal;
1093
+ }
1094
+ /**
1095
+ * Set the private editor portal cache property.
1096
+ *
1097
+ * @param {React.ReactPortal} portal Global editor portal.
1098
+ */
1099
+ }, {
1100
+ key: "setGlobalEditorPortal",
1101
+ value: function setGlobalEditorPortal(portal) {
1102
+ this.globalEditorPortal = portal;
1103
+ }
1104
+ /**
1105
+ * Clear both the editor and the renderer cache.
1106
+ */
1107
+ }, {
1108
+ key: "clearCache",
1109
+ value: function clearCache() {
1110
+ var renderedCellCache = this.getRenderedCellCache();
1111
+ this.setGlobalEditorPortal(null);
1112
+ removeEditorContainers(this.getOwnerDocument());
1113
+ this.getEditorCache().clear();
1114
+ renderedCellCache.clear();
1115
+ this.componentRendererColumns.clear();
1116
+ }
1117
+ /**
1118
+ * Get the `Document` object corresponding to the main component element.
1119
+ *
1120
+ * @returns The `Document` object used by the component.
1121
+ */
1122
+ }, {
1123
+ key: "getOwnerDocument",
1124
+ value: function getOwnerDocument() {
1125
+ return this.hotElementRef ? this.hotElementRef.ownerDocument : document;
1126
+ }
1127
+ /**
1128
+ * Set the reference to the main Handsontable DOM element.
1129
+ *
1130
+ * @param {HTMLElement} element The main Handsontable DOM element.
1131
+ */
1132
+ }, {
1133
+ key: "setHotElementRef",
1134
+ value: function setHotElementRef(element) {
1135
+ this.hotElementRef = element;
1136
+ }
1137
+ /**
1138
+ * Return a renderer wrapper function for the provided renderer component.
1139
+ *
1140
+ * @param {React.ReactElement} rendererElement React renderer component.
1141
+ * @returns {Handsontable.renderers.Base} The Handsontable rendering function.
1142
+ */
1143
+ }, {
1144
+ key: "getRendererWrapper",
1145
+ value: function getRendererWrapper(rendererElement) {
1146
+ var hotTableComponent = this;
1147
+ return function (instance, TD, row, col, prop, value, cellProperties) {
1148
+ var renderedCellCache = hotTableComponent.getRenderedCellCache();
1149
+ if (renderedCellCache.has("".concat(row, "-").concat(col))) {
1150
+ TD.innerHTML = renderedCellCache.get("".concat(row, "-").concat(col)).innerHTML;
1151
+ }
1152
+ if (TD && !TD.getAttribute('ghost-table')) {
1153
+ var _createPortal = createPortal(rendererElement, {
1154
+ TD: TD,
1155
+ row: row,
1156
+ col: col,
1157
+ prop: prop,
1158
+ value: value,
1159
+ cellProperties: cellProperties,
1160
+ isRenderer: true
1161
+ }, function () {}, TD.ownerDocument),
1162
+ portal = _createPortal.portal,
1163
+ portalContainer = _createPortal.portalContainer;
1164
+ while (TD.firstChild) {
1165
+ TD.removeChild(TD.firstChild);
1166
+ }
1167
+ TD.appendChild(portalContainer);
1168
+ hotTableComponent.portalCacheArray.push(portal);
1169
+ }
1170
+ renderedCellCache.set("".concat(row, "-").concat(col), TD);
1171
+ return TD;
1172
+ };
1173
+ }
1174
+ /**
1175
+ * Create a fresh class to be used as an editor, based on the provided editor React element.
1176
+ *
1177
+ * @param {React.ReactElement} editorElement React editor component.
1178
+ * @param {string|number} [editorColumnScope] The editor scope (column index or a 'global' string). Defaults to
1179
+ * 'global'.
1180
+ * @returns {Function} A class to be passed to the Handsontable editor settings.
1181
+ */
1182
+ }, {
1183
+ key: "getEditorClass",
1184
+ value: function getEditorClass(editorElement) {
1185
+ var _editorCache$get;
1186
+ var editorColumnScope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GLOBAL_EDITOR_SCOPE;
1187
+ var editorClass = getOriginalEditorClass(editorElement);
1188
+ var editorCache = this.getEditorCache();
1189
+ var cachedComponent = (_editorCache$get = editorCache.get(editorClass)) === null || _editorCache$get === void 0 ? void 0 : _editorCache$get.get(editorColumnScope);
1190
+ return this.makeEditorClass(cachedComponent);
1191
+ }
1192
+ /**
1193
+ * Create a class to be passed to the Handsontable's settings.
1194
+ *
1195
+ * @param {React.ReactElement} editorComponent React editor component.
1196
+ * @returns {Function} A class to be passed to the Handsontable editor settings.
1197
+ */
1198
+ }, {
1199
+ key: "makeEditorClass",
1200
+ value: function makeEditorClass(editorComponent) {
1201
+ var customEditorClass = /*#__PURE__*/function (_Handsontable$editors) {
1202
+ _inherits(CustomEditor, _Handsontable$editors);
1203
+ var _super2 = _createSuper(CustomEditor);
1204
+ function CustomEditor(hotInstance) {
1205
+ var _this2;
1206
+ _classCallCheck(this, CustomEditor);
1207
+ _this2 = _super2.call(this, hotInstance);
1208
+ editorComponent.hotCustomEditorInstance = _assertThisInitialized(_this2);
1209
+ _this2.editorComponent = editorComponent;
1210
+ return _this2;
1211
+ }
1212
+ _createClass(CustomEditor, [{
1213
+ key: "focus",
1214
+ value: function focus() {}
1215
+ }, {
1216
+ key: "getValue",
1217
+ value: function getValue() {}
1218
+ }, {
1219
+ key: "setValue",
1220
+ value: function setValue() {}
1221
+ }, {
1222
+ key: "open",
1223
+ value: function open() {}
1224
+ }, {
1225
+ key: "close",
1226
+ value: function close() {}
1227
+ }]);
1228
+ return CustomEditor;
1229
+ }(Handsontable__default["default"].editors.BaseEditor);
1230
+ // Fill with the rest of the BaseEditor methods
1231
+ Object.getOwnPropertyNames(Handsontable__default["default"].editors.BaseEditor.prototype).forEach(function (propName) {
1232
+ if (propName === 'constructor') {
1233
+ return;
1234
+ }
1235
+ customEditorClass.prototype[propName] = function () {
1236
+ var _editorComponent$prop;
1237
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1238
+ args[_key] = arguments[_key];
1239
+ }
1240
+ return (_editorComponent$prop = editorComponent[propName]).call.apply(_editorComponent$prop, [editorComponent].concat(args));
1241
+ };
1242
+ });
1243
+ return customEditorClass;
1244
+ }
1245
+ /**
1246
+ * Get the renderer element for the entire HotTable instance.
1247
+ *
1248
+ * @returns {React.ReactElement} React renderer component element.
1249
+ */
1250
+ }, {
1251
+ key: "getGlobalRendererElement",
1252
+ value: function getGlobalRendererElement() {
1253
+ var hotTableSlots = this.props.children;
1254
+ return getChildElementByType(hotTableSlots, 'hot-renderer');
1255
+ }
1256
+ /**
1257
+ * Get the editor element for the entire HotTable instance.
1258
+ *
1259
+ * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.
1260
+ * @returns {React.ReactElement} React editor component element.
1261
+ */
1262
+ }, {
1263
+ key: "getGlobalEditorElement",
1264
+ value: function getGlobalEditorElement() {
1265
+ var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.children;
1266
+ return getExtendedEditorElement(children, this.getEditorCache());
1267
+ }
1268
+ /**
1269
+ * Create the global editor portal and its destination HTML element if needed.
1270
+ *
1271
+ * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.
1272
+ */
1273
+ }, {
1274
+ key: "createGlobalEditorPortal",
1275
+ value: function createGlobalEditorPortal() {
1276
+ var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.children;
1277
+ var globalEditorElement = this.getGlobalEditorElement(children);
1278
+ if (globalEditorElement) {
1279
+ this.setGlobalEditorPortal(createEditorPortal(this.getOwnerDocument(), globalEditorElement, this.getEditorCache()));
1280
+ }
1281
+ }
1282
+ /**
1283
+ * Create a new settings object containing the column settings and global editors and renderers.
1284
+ *
1285
+ * @returns {Handsontable.GridSettings} New global set of settings for Handsontable.
1286
+ */
1287
+ }, {
1288
+ key: "createNewGlobalSettings",
1289
+ value: function createNewGlobalSettings() {
1290
+ var newSettings = SettingsMapper.getSettings(this.props);
1291
+ var globalRendererNode = this.getGlobalRendererElement();
1292
+ var globalEditorNode = this.getGlobalEditorElement();
1293
+ newSettings.columns = this.columnSettings.length ? this.columnSettings : newSettings.columns;
1294
+ if (globalEditorNode) {
1295
+ newSettings.editor = this.getEditorClass(globalEditorNode, GLOBAL_EDITOR_SCOPE);
1296
+ } else {
1297
+ newSettings.editor = this.props.editor || (this.props.settings ? this.props.settings.editor : void 0);
1298
+ }
1299
+ if (globalRendererNode) {
1300
+ newSettings.renderer = this.getRendererWrapper(globalRendererNode);
1301
+ this.componentRendererColumns.set('global', true);
1302
+ } else {
1303
+ newSettings.renderer = this.props.renderer || (this.props.settings ? this.props.settings.renderer : void 0);
1304
+ }
1305
+ return newSettings;
1306
+ }
1307
+ /**
1308
+ * Detect if `autoRowSize` or `autoColumnSize` is defined, and if so, throw an incompatibility warning.
1309
+ *
1310
+ * @param {Handsontable.GridSettings} newGlobalSettings New global settings passed as Handsontable config.
1311
+ */
1312
+ }, {
1313
+ key: "displayAutoSizeWarning",
1314
+ value: function displayAutoSizeWarning(newGlobalSettings) {
1315
+ var _this$hotInstance$get, _this$hotInstance$get2;
1316
+ 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)) {
1317
+ if (this.componentRendererColumns.size > 0) {
1318
+ warn(AUTOSIZE_WARNING);
1319
+ }
1320
+ }
1321
+ }
1322
+ /**
1323
+ * Sets the column settings based on information received from HotColumn.
1324
+ *
1325
+ * @param {HotTableProps} columnSettings Column settings object.
1326
+ * @param {Number} columnIndex Column index.
1327
+ */
1328
+ }, {
1329
+ key: "setHotColumnSettings",
1330
+ value: function setHotColumnSettings(columnSettings, columnIndex) {
1331
+ this.columnSettings[columnIndex] = columnSettings;
1332
+ }
1333
+ /**
1334
+ * Handsontable's `beforeViewRender` hook callback.
1335
+ */
1336
+ }, {
1337
+ key: "handsontableBeforeViewRender",
1338
+ value: function handsontableBeforeViewRender() {
1339
+ this.getRenderedCellCache().clear();
1340
+ }
1341
+ /**
1342
+ * Handsontable's `afterViewRender` hook callback.
1343
+ */
1344
+ }, {
1345
+ key: "handsontableAfterViewRender",
1346
+ value: function handsontableAfterViewRender() {
1347
+ var _this3 = this;
1348
+ this.portalManager.setState(function () {
1349
+ return Object.assign({}, {
1350
+ portals: _this3.portalCacheArray
1351
+ });
1352
+ }, function () {
1353
+ _this3.portalCacheArray.length = 0;
1354
+ });
1355
+ }
1356
+ /**
1357
+ * Call the `updateSettings` method for the Handsontable instance.
1358
+ *
1359
+ * @param {Object} newSettings The settings object.
1360
+ */
1361
+ }, {
1362
+ key: "updateHot",
1363
+ value: function updateHot(newSettings) {
1364
+ if (this.hotInstance) {
1365
+ this.hotInstance.updateSettings(newSettings, false);
1366
+ }
1367
+ }
1368
+ /**
1369
+ * Set the portal manager ref.
1370
+ *
1371
+ * @param {React.ReactComponent} pmComponent The PortalManager component.
1372
+ */
1373
+ }, {
1374
+ key: "setPortalManagerRef",
1375
+ value: function setPortalManagerRef(pmComponent) {
1376
+ this.portalManager = pmComponent;
1377
+ }
1378
+ /*
1379
+ ---------------------------------------
1380
+ ------- React lifecycle methods -------
1381
+ ---------------------------------------
1382
+ */
1383
+ /**
1384
+ * Logic performed before the mounting of the component.
1385
+ */
1386
+ }, {
1387
+ key: "componentWillMount",
1388
+ value: function componentWillMount() {
1389
+ this.clearCache();
1390
+ this.createGlobalEditorPortal();
1391
+ }
1392
+ /**
1393
+ * Initialize Handsontable after the component has mounted.
1394
+ */
1395
+ }, {
1396
+ key: "componentDidMount",
1397
+ value: function componentDidMount() {
1398
+ var hotTableComponent = this;
1399
+ var newGlobalSettings = this.createNewGlobalSettings();
1400
+ this.hotInstance = new Handsontable__default["default"].Core(this.hotElementRef, newGlobalSettings);
1401
+ this.hotInstance.addHook('beforeViewRender', function (isForced) {
1402
+ hotTableComponent.handsontableBeforeViewRender();
1403
+ });
1404
+ this.hotInstance.addHook('afterViewRender', function () {
1405
+ hotTableComponent.handsontableAfterViewRender();
1406
+ });
1407
+ // `init` missing in Handsontable's type definitions.
1408
+ this.hotInstance.init();
1409
+ this.displayAutoSizeWarning(newGlobalSettings);
1410
+ }
1411
+ /**
1412
+ * Logic performed before the component update.
1413
+ */
1414
+ }, {
1415
+ key: "componentWillUpdate",
1416
+ value: function componentWillUpdate(nextProps, nextState, nextContext) {
1417
+ this.clearCache();
1418
+ removeEditorContainers(this.getOwnerDocument());
1419
+ this.createGlobalEditorPortal(nextProps.children);
1420
+ }
1421
+ /**
1422
+ * Logic performed after the component update.
1423
+ */
1424
+ }, {
1425
+ key: "componentDidUpdate",
1426
+ value: function componentDidUpdate() {
1427
+ var newGlobalSettings = this.createNewGlobalSettings();
1428
+ this.updateHot(newGlobalSettings);
1429
+ this.displayAutoSizeWarning(newGlobalSettings);
1430
+ }
1431
+ /**
1432
+ * Destroy the Handsontable instance when the parent component unmounts.
1433
+ */
1434
+ }, {
1435
+ key: "componentWillUnmount",
1436
+ value: function componentWillUnmount() {
1437
+ if (this.hotInstance) {
1438
+ this.hotInstance.destroy();
1439
+ }
1440
+ removeEditorContainers(this.getOwnerDocument());
1441
+ }
1442
+ /**
1443
+ * Render the component.
1444
+ */
1445
+ }, {
1446
+ key: "render",
1447
+ value: function render() {
1448
+ var _this4 = this;
1449
+ var _getContainerAttribut = getContainerAttributesProps(this.props),
1450
+ id = _getContainerAttribut.id,
1451
+ className = _getContainerAttribut.className,
1452
+ style = _getContainerAttribut.style;
1453
+ var isHotColumn = function isHotColumn(childNode) {
1454
+ return childNode.type === HotColumn;
1455
+ };
1456
+ var children = React__default["default"].Children.toArray(this.props.children);
1457
+ // filter out anything that's not a HotColumn
1458
+ children = children.filter(function (childNode) {
1459
+ return isHotColumn(childNode);
1460
+ });
1461
+ // clone the HotColumn nodes and extend them with the callbacks
1462
+ var childClones = children.map(function (childNode, columnIndex) {
1463
+ return React__default["default"].cloneElement(childNode, {
1464
+ _componentRendererColumns: _this4.componentRendererColumns,
1465
+ _emitColumnSettings: _this4.setHotColumnSettings.bind(_this4),
1466
+ _columnIndex: columnIndex,
1467
+ _getChildElementByType: getChildElementByType.bind(_this4),
1468
+ _getRendererWrapper: _this4.getRendererWrapper.bind(_this4),
1469
+ _getEditorClass: _this4.getEditorClass.bind(_this4),
1470
+ _getOwnerDocument: _this4.getOwnerDocument.bind(_this4),
1471
+ _getEditorCache: _this4.getEditorCache.bind(_this4),
1472
+ children: childNode.props.children
1473
+ });
1474
+ });
1475
+ // add the global editor to the list of children
1476
+ childClones.push(this.getGlobalEditorPortal());
1477
+ return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("div", {
1478
+ ref: this.setHotElementRef.bind(this),
1479
+ id: id,
1480
+ className: className,
1481
+ style: style
1482
+ }, childClones), React__default["default"].createElement(PortalManager, {
1483
+ ref: this.setPortalManagerRef.bind(this)
1484
+ }));
1485
+ }
1486
+ }], [{
1487
+ key: "version",
1488
+ get: function get() {
1489
+ return version;
1490
+ }
1491
+ }]);
1492
+ return HotTable;
1493
+ }(React__default["default"].Component);
1494
+ /**
1495
+ * Prop types to be checked at runtime.
1496
+ */
1497
+ HotTable.propTypes = {
1498
+ style: PropTypes.object,
1499
+ id: PropTypes.string,
1500
+ className: PropTypes.string
1501
+ };
1502
+
1503
+ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
1504
+ _inherits(BaseEditorComponent, _React$Component);
1505
+ var _super = _createSuper(BaseEditorComponent);
1506
+ function BaseEditorComponent(props) {
1507
+ var _this;
1508
+ _classCallCheck(this, BaseEditorComponent);
1509
+ _this = _super.call(this, props);
1510
+ _this.name = 'BaseEditorComponent';
1511
+ _this.instance = null;
1512
+ _this.row = null;
1513
+ _this.col = null;
1514
+ _this.prop = null;
1515
+ _this.TD = null;
1516
+ _this.originalValue = null;
1517
+ _this.cellProperties = null;
1518
+ _this.state = null;
1519
+ _this.hotInstance = null;
1520
+ _this.hotCustomEditorInstance = null;
1521
+ _this.hot = null;
1522
+ if (props.emitEditorInstance) {
1523
+ props.emitEditorInstance(_assertThisInitialized(_this), props.editorColumnScope);
1524
+ }
1525
+ return _this;
1526
+ }
1527
+ // BaseEditor methods:
1528
+ _createClass(BaseEditorComponent, [{
1529
+ key: "_fireCallbacks",
1530
+ value: function _fireCallbacks() {
1531
+ var _Handsontable$editors;
1532
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1533
+ args[_key] = arguments[_key];
1534
+ }
1535
+ (_Handsontable$editors = Handsontable__default["default"].editors.BaseEditor.prototype._fireCallbacks).call.apply(_Handsontable$editors, [this.hotCustomEditorInstance].concat(args));
1536
+ }
1537
+ }, {
1538
+ key: "beginEditing",
1539
+ value: function beginEditing() {
1540
+ var _Handsontable$editors2;
1541
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1542
+ args[_key2] = arguments[_key2];
1543
+ }
1544
+ return (_Handsontable$editors2 = Handsontable__default["default"].editors.BaseEditor.prototype.beginEditing).call.apply(_Handsontable$editors2, [this.hotCustomEditorInstance].concat(args));
1545
+ }
1546
+ }, {
1547
+ key: "cancelChanges",
1548
+ value: function cancelChanges() {
1549
+ var _Handsontable$editors3;
1550
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
1551
+ args[_key3] = arguments[_key3];
1552
+ }
1553
+ return (_Handsontable$editors3 = Handsontable__default["default"].editors.BaseEditor.prototype.cancelChanges).call.apply(_Handsontable$editors3, [this.hotCustomEditorInstance].concat(args));
1554
+ }
1555
+ }, {
1556
+ key: "checkEditorSection",
1557
+ value: function checkEditorSection() {
1558
+ var _Handsontable$editors4;
1559
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
1560
+ args[_key4] = arguments[_key4];
1561
+ }
1562
+ return (_Handsontable$editors4 = Handsontable__default["default"].editors.BaseEditor.prototype.checkEditorSection).call.apply(_Handsontable$editors4, [this.hotCustomEditorInstance].concat(args));
1563
+ }
1564
+ }, {
1565
+ key: "close",
1566
+ value: function close() {
1567
+ var _Handsontable$editors5;
1568
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
1569
+ args[_key5] = arguments[_key5];
1570
+ }
1571
+ return (_Handsontable$editors5 = Handsontable__default["default"].editors.BaseEditor.prototype.close).call.apply(_Handsontable$editors5, [this.hotCustomEditorInstance].concat(args));
1572
+ }
1573
+ }, {
1574
+ key: "discardEditor",
1575
+ value: function discardEditor() {
1576
+ var _Handsontable$editors6;
1577
+ for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
1578
+ args[_key6] = arguments[_key6];
1579
+ }
1580
+ return (_Handsontable$editors6 = Handsontable__default["default"].editors.BaseEditor.prototype.discardEditor).call.apply(_Handsontable$editors6, [this.hotCustomEditorInstance].concat(args));
1581
+ }
1582
+ }, {
1583
+ key: "enableFullEditMode",
1584
+ value: function enableFullEditMode() {
1585
+ var _Handsontable$editors7;
1586
+ for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
1587
+ args[_key7] = arguments[_key7];
1588
+ }
1589
+ return (_Handsontable$editors7 = Handsontable__default["default"].editors.BaseEditor.prototype.enableFullEditMode).call.apply(_Handsontable$editors7, [this.hotCustomEditorInstance].concat(args));
1590
+ }
1591
+ }, {
1592
+ key: "extend",
1593
+ value: function extend() {
1594
+ var _Handsontable$editors8;
1595
+ for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
1596
+ args[_key8] = arguments[_key8];
1597
+ }
1598
+ return (_Handsontable$editors8 = Handsontable__default["default"].editors.BaseEditor.prototype.extend).call.apply(_Handsontable$editors8, [this.hotCustomEditorInstance].concat(args));
1599
+ }
1600
+ }, {
1601
+ key: "finishEditing",
1602
+ value: function finishEditing() {
1603
+ var _Handsontable$editors9;
1604
+ for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
1605
+ args[_key9] = arguments[_key9];
1606
+ }
1607
+ return (_Handsontable$editors9 = Handsontable__default["default"].editors.BaseEditor.prototype.finishEditing).call.apply(_Handsontable$editors9, [this.hotCustomEditorInstance].concat(args));
1608
+ }
1609
+ }, {
1610
+ key: "focus",
1611
+ value: function focus() {
1612
+ var _Handsontable$editors10;
1613
+ for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
1614
+ args[_key10] = arguments[_key10];
1615
+ }
1616
+ return (_Handsontable$editors10 = Handsontable__default["default"].editors.BaseEditor.prototype.focus).call.apply(_Handsontable$editors10, [this.hotCustomEditorInstance].concat(args));
1617
+ }
1618
+ }, {
1619
+ key: "getValue",
1620
+ value: function getValue() {
1621
+ var _Handsontable$editors11;
1622
+ for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
1623
+ args[_key11] = arguments[_key11];
1624
+ }
1625
+ return (_Handsontable$editors11 = Handsontable__default["default"].editors.BaseEditor.prototype.getValue).call.apply(_Handsontable$editors11, [this.hotCustomEditorInstance].concat(args));
1626
+ }
1627
+ }, {
1628
+ key: "init",
1629
+ value: function init() {
1630
+ var _Handsontable$editors12;
1631
+ for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
1632
+ args[_key12] = arguments[_key12];
1633
+ }
1634
+ return (_Handsontable$editors12 = Handsontable__default["default"].editors.BaseEditor.prototype.init).call.apply(_Handsontable$editors12, [this.hotCustomEditorInstance].concat(args));
1635
+ }
1636
+ }, {
1637
+ key: "isInFullEditMode",
1638
+ value: function isInFullEditMode() {
1639
+ var _Handsontable$editors13;
1640
+ for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
1641
+ args[_key13] = arguments[_key13];
1642
+ }
1643
+ return (_Handsontable$editors13 = Handsontable__default["default"].editors.BaseEditor.prototype.isInFullEditMode).call.apply(_Handsontable$editors13, [this.hotCustomEditorInstance].concat(args));
1644
+ }
1645
+ }, {
1646
+ key: "isOpened",
1647
+ value: function isOpened() {
1648
+ var _Handsontable$editors14;
1649
+ for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
1650
+ args[_key14] = arguments[_key14];
1651
+ }
1652
+ return (_Handsontable$editors14 = Handsontable__default["default"].editors.BaseEditor.prototype.isOpened).call.apply(_Handsontable$editors14, [this.hotCustomEditorInstance].concat(args));
1653
+ }
1654
+ }, {
1655
+ key: "isWaiting",
1656
+ value: function isWaiting() {
1657
+ var _Handsontable$editors15;
1658
+ for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
1659
+ args[_key15] = arguments[_key15];
1660
+ }
1661
+ return (_Handsontable$editors15 = Handsontable__default["default"].editors.BaseEditor.prototype.isWaiting).call.apply(_Handsontable$editors15, [this.hotCustomEditorInstance].concat(args));
1662
+ }
1663
+ }, {
1664
+ key: "open",
1665
+ value: function open() {
1666
+ var _Handsontable$editors16;
1667
+ for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
1668
+ args[_key16] = arguments[_key16];
1669
+ }
1670
+ return (_Handsontable$editors16 = Handsontable__default["default"].editors.BaseEditor.prototype.open).call.apply(_Handsontable$editors16, [this.hotCustomEditorInstance].concat(args));
1671
+ }
1672
+ }, {
1673
+ key: "prepare",
1674
+ value: function prepare(row, col, prop, TD, originalValue, cellProperties) {
1675
+ this.hotInstance = cellProperties.instance;
1676
+ this.row = row;
1677
+ this.col = col;
1678
+ this.prop = prop;
1679
+ this.TD = TD;
1680
+ this.originalValue = originalValue;
1681
+ this.cellProperties = cellProperties;
1682
+ return Handsontable__default["default"].editors.BaseEditor.prototype.prepare.call(this.hotCustomEditorInstance, row, col, prop, TD, originalValue, cellProperties);
1683
+ }
1684
+ }, {
1685
+ key: "saveValue",
1686
+ value: function saveValue() {
1687
+ var _Handsontable$editors17;
1688
+ for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {
1689
+ args[_key17] = arguments[_key17];
1690
+ }
1691
+ return (_Handsontable$editors17 = Handsontable__default["default"].editors.BaseEditor.prototype.saveValue).call.apply(_Handsontable$editors17, [this.hotCustomEditorInstance].concat(args));
1692
+ }
1693
+ }, {
1694
+ key: "setValue",
1695
+ value: function setValue() {
1696
+ var _Handsontable$editors18;
1697
+ for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {
1698
+ args[_key18] = arguments[_key18];
1699
+ }
1700
+ return (_Handsontable$editors18 = Handsontable__default["default"].editors.BaseEditor.prototype.setValue).call.apply(_Handsontable$editors18, [this.hotCustomEditorInstance].concat(args));
1701
+ }
1702
+ }, {
1703
+ key: "addHook",
1704
+ value: function addHook() {
1705
+ var _Handsontable$editors19;
1706
+ for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {
1707
+ args[_key19] = arguments[_key19];
1708
+ }
1709
+ return (_Handsontable$editors19 = Handsontable__default["default"].editors.BaseEditor.prototype.addHook).call.apply(_Handsontable$editors19, [this.hotCustomEditorInstance].concat(args));
1710
+ }
1711
+ }, {
1712
+ key: "removeHooksByKey",
1713
+ value: function removeHooksByKey() {
1714
+ var _Handsontable$editors20;
1715
+ for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {
1716
+ args[_key20] = arguments[_key20];
1717
+ }
1718
+ return (_Handsontable$editors20 = Handsontable__default["default"].editors.BaseEditor.prototype.removeHooksByKey).call.apply(_Handsontable$editors20, [this.hotCustomEditorInstance].concat(args));
1719
+ }
1720
+ }, {
1721
+ key: "clearHooks",
1722
+ value: function clearHooks() {
1723
+ var _Handsontable$editors21;
1724
+ for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {
1725
+ args[_key21] = arguments[_key21];
1726
+ }
1727
+ return (_Handsontable$editors21 = Handsontable__default["default"].editors.BaseEditor.prototype.clearHooks).call.apply(_Handsontable$editors21, [this.hotCustomEditorInstance].concat(args));
1728
+ }
1729
+ }, {
1730
+ key: "getEditedCell",
1731
+ value: function getEditedCell() {
1732
+ var _Handsontable$editors22;
1733
+ for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {
1734
+ args[_key22] = arguments[_key22];
1735
+ }
1736
+ return (_Handsontable$editors22 = Handsontable__default["default"].editors.BaseEditor.prototype.getEditedCell).call.apply(_Handsontable$editors22, [this.hotCustomEditorInstance].concat(args));
1737
+ }
1738
+ }, {
1739
+ key: "getEditedCellRect",
1740
+ value: function getEditedCellRect() {
1741
+ var _Handsontable$editors23;
1742
+ for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {
1743
+ args[_key23] = arguments[_key23];
1744
+ }
1745
+ return (_Handsontable$editors23 = Handsontable__default["default"].editors.BaseEditor.prototype.getEditedCellRect).call.apply(_Handsontable$editors23, [this.hotCustomEditorInstance].concat(args));
1746
+ }
1747
+ }, {
1748
+ key: "getEditedCellsZIndex",
1749
+ value: function getEditedCellsZIndex() {
1750
+ var _Handsontable$editors24;
1751
+ for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {
1752
+ args[_key24] = arguments[_key24];
1753
+ }
1754
+ return (_Handsontable$editors24 = Handsontable__default["default"].editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(_Handsontable$editors24, [this.hotCustomEditorInstance].concat(args));
1755
+ }
1756
+ }]);
1757
+ return BaseEditorComponent;
1758
+ }(React__default["default"].Component);
1759
+
1760
+ exports.BaseEditorComponent = BaseEditorComponent;
1761
+ exports.HotColumn = HotColumn;
1762
+ exports.HotTable = HotTable;
1763
+ exports["default"] = HotTable;
1764
+
1765
+ Object.defineProperty(exports, '__esModule', { value: true });
1766
+
1767
+ }));
1768
+ //# sourceMappingURL=react-handsontable.js.map