@handsontable/react 12.1.3 → 12.3.0-next-bb1a7c2-20221208

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.
@@ -4,17 +4,14 @@ import Handsontable from 'handsontable/base';
4
4
 
5
5
  function ownKeys(object, enumerableOnly) {
6
6
  var keys = Object.keys(object);
7
-
8
7
  if (Object.getOwnPropertySymbols) {
9
8
  var symbols = Object.getOwnPropertySymbols(object);
10
9
  enumerableOnly && (symbols = symbols.filter(function (sym) {
11
10
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
12
11
  })), keys.push.apply(keys, symbols);
13
12
  }
14
-
15
13
  return keys;
16
14
  }
17
-
18
15
  function _objectSpread2(target) {
19
16
  for (var i = 1; i < arguments.length; i++) {
20
17
  var source = null != arguments[i] ? arguments[i] : {};
@@ -24,10 +21,8 @@ function _objectSpread2(target) {
24
21
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
25
22
  });
26
23
  }
27
-
28
24
  return target;
29
25
  }
30
-
31
26
  function _typeof(obj) {
32
27
  "@babel/helpers - typeof";
33
28
 
@@ -37,23 +32,20 @@ function _typeof(obj) {
37
32
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
38
33
  }, _typeof(obj);
39
34
  }
40
-
41
35
  function _classCallCheck(instance, Constructor) {
42
36
  if (!(instance instanceof Constructor)) {
43
37
  throw new TypeError("Cannot call a class as a function");
44
38
  }
45
39
  }
46
-
47
40
  function _defineProperties(target, props) {
48
41
  for (var i = 0; i < props.length; i++) {
49
42
  var descriptor = props[i];
50
43
  descriptor.enumerable = descriptor.enumerable || false;
51
44
  descriptor.configurable = true;
52
45
  if ("value" in descriptor) descriptor.writable = true;
53
- Object.defineProperty(target, descriptor.key, descriptor);
46
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
54
47
  }
55
48
  }
56
-
57
49
  function _createClass(Constructor, protoProps, staticProps) {
58
50
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
59
51
  if (staticProps) _defineProperties(Constructor, staticProps);
@@ -62,8 +54,8 @@ function _createClass(Constructor, protoProps, staticProps) {
62
54
  });
63
55
  return Constructor;
64
56
  }
65
-
66
57
  function _defineProperty(obj, key, value) {
58
+ key = _toPropertyKey(key);
67
59
  if (key in obj) {
68
60
  Object.defineProperty(obj, key, {
69
61
  value: value,
@@ -74,15 +66,12 @@ function _defineProperty(obj, key, value) {
74
66
  } else {
75
67
  obj[key] = value;
76
68
  }
77
-
78
69
  return obj;
79
70
  }
80
-
81
71
  function _inherits(subClass, superClass) {
82
72
  if (typeof superClass !== "function" && superClass !== null) {
83
73
  throw new TypeError("Super expression must either be null or a function");
84
74
  }
85
-
86
75
  subClass.prototype = Object.create(superClass && superClass.prototype, {
87
76
  constructor: {
88
77
  value: subClass,
@@ -95,14 +84,12 @@ function _inherits(subClass, superClass) {
95
84
  });
96
85
  if (superClass) _setPrototypeOf(subClass, superClass);
97
86
  }
98
-
99
87
  function _getPrototypeOf(o) {
100
88
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
101
89
  return o.__proto__ || Object.getPrototypeOf(o);
102
90
  };
103
91
  return _getPrototypeOf(o);
104
92
  }
105
-
106
93
  function _setPrototypeOf(o, p) {
107
94
  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
108
95
  o.__proto__ = p;
@@ -110,12 +97,10 @@ function _setPrototypeOf(o, p) {
110
97
  };
111
98
  return _setPrototypeOf(o, p);
112
99
  }
113
-
114
100
  function _isNativeReflectConstruct() {
115
101
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
116
102
  if (Reflect.construct.sham) return false;
117
103
  if (typeof Proxy === "function") return true;
118
-
119
104
  try {
120
105
  Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
121
106
  return true;
@@ -123,75 +108,74 @@ function _isNativeReflectConstruct() {
123
108
  return false;
124
109
  }
125
110
  }
126
-
127
111
  function _assertThisInitialized(self) {
128
112
  if (self === void 0) {
129
113
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
130
114
  }
131
-
132
115
  return self;
133
116
  }
134
-
135
117
  function _possibleConstructorReturn(self, call) {
136
118
  if (call && (typeof call === "object" || typeof call === "function")) {
137
119
  return call;
138
120
  } else if (call !== void 0) {
139
121
  throw new TypeError("Derived constructors may only return object or undefined");
140
122
  }
141
-
142
123
  return _assertThisInitialized(self);
143
124
  }
144
-
145
125
  function _createSuper(Derived) {
146
126
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
147
-
148
127
  return function _createSuperInternal() {
149
128
  var Super = _getPrototypeOf(Derived),
150
- result;
151
-
129
+ result;
152
130
  if (hasNativeReflectConstruct) {
153
131
  var NewTarget = _getPrototypeOf(this).constructor;
154
-
155
132
  result = Reflect.construct(Super, arguments, NewTarget);
156
133
  } else {
157
134
  result = Super.apply(this, arguments);
158
135
  }
159
-
160
136
  return _possibleConstructorReturn(this, result);
161
137
  };
162
138
  }
139
+ function _toPrimitive(input, hint) {
140
+ if (typeof input !== "object" || input === null) return input;
141
+ var prim = input[Symbol.toPrimitive];
142
+ if (prim !== undefined) {
143
+ var res = prim.call(input, hint || "default");
144
+ if (typeof res !== "object") return res;
145
+ throw new TypeError("@@toPrimitive must return a primitive value.");
146
+ }
147
+ return (hint === "string" ? String : Number)(input);
148
+ }
149
+ function _toPropertyKey(arg) {
150
+ var key = _toPrimitive(arg, "string");
151
+ return typeof key === "symbol" ? key : String(key);
152
+ }
163
153
 
164
154
  var bulkComponentContainer = null;
165
155
  /**
166
156
  * Warning message for the `autoRowSize`/`autoColumnSize` compatibility check.
167
157
  */
168
-
169
158
  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.';
170
159
  /**
171
160
  * Message for the warning thrown if the Handsontable instance has been destroyed.
172
161
  */
173
-
174
162
  var HOT_DESTROYED_WARNING = 'The Handsontable instance bound to this component was destroyed and cannot be' + ' used properly.';
175
163
  /**
176
164
  * String identifier for the global-scoped editor components.
177
165
  */
178
-
179
166
  var GLOBAL_EDITOR_SCOPE = 'global';
180
167
  /**
181
168
  * Default classname given to the wrapper container.
182
169
  */
183
-
184
170
  var DEFAULT_CLASSNAME = 'hot-wrapper-editor-container';
185
171
  /**
186
172
  * Logs warn to the console if the `console` object is exposed.
187
173
  *
188
174
  * @param {...*} args Values which will be logged.
189
175
  */
190
-
191
176
  function warn() {
192
177
  if (typeof console !== 'undefined') {
193
178
  var _console;
194
-
195
179
  (_console = console).warn.apply(_console, arguments);
196
180
  }
197
181
  }
@@ -202,12 +186,10 @@ function warn() {
202
186
  * @param {String} type Either `'hot-renderer'` or `'hot-editor'`.
203
187
  * @returns {Object|null} A child (React node) or `null`, if no child of that type was found.
204
188
  */
205
-
206
189
  function getChildElementByType(children, type) {
207
190
  var childrenArray = React.Children.toArray(children);
208
191
  var childrenCount = React.Children.count(children);
209
192
  var wantedChild = null;
210
-
211
193
  if (childrenCount !== 0) {
212
194
  if (childrenCount === 1 && childrenArray[0].props[type]) {
213
195
  wantedChild = childrenArray[0];
@@ -217,7 +199,6 @@ function getChildElementByType(children, type) {
217
199
  });
218
200
  }
219
201
  }
220
-
221
202
  return wantedChild || null;
222
203
  }
223
204
  /**
@@ -226,12 +207,10 @@ function getChildElementByType(children, type) {
226
207
  * @param {React.ReactElement} editorElement React element of the editor class.
227
208
  * @returns {Function} Original class of the editor component.
228
209
  */
229
-
230
210
  function getOriginalEditorClass(editorElement) {
231
211
  if (!editorElement) {
232
212
  return null;
233
213
  }
234
-
235
214
  return editorElement.type.WrappedComponent ? editorElement.type.WrappedComponent : editorElement.type;
236
215
  }
237
216
  /**
@@ -240,7 +219,6 @@ function getOriginalEditorClass(editorElement) {
240
219
  * @param {Document} [doc] Document to be used.
241
220
  * @param {Map} editorCache The editor cache reference.
242
221
  */
243
-
244
222
  function removeEditorContainers() {
245
223
  var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
246
224
  doc.querySelectorAll("[class^=\"".concat(DEFAULT_CLASSNAME, "\"]")).forEach(function (domNode) {
@@ -257,32 +235,24 @@ function removeEditorContainers() {
257
235
  * @param {Map} editorCache The editor cache reference.
258
236
  * @returns {React.ReactPortal} The portal for the editor.
259
237
  */
260
-
261
238
  function createEditorPortal() {
262
239
  var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
263
240
  var editorElement = arguments.length > 1 ? arguments[1] : undefined;
264
-
265
241
  if (editorElement === null) {
266
242
  return;
267
243
  }
268
-
269
244
  var editorContainer = doc.createElement('DIV');
270
-
271
245
  var _getContainerAttribut = getContainerAttributesProps(editorElement.props, false),
272
- id = _getContainerAttribut.id,
273
- className = _getContainerAttribut.className,
274
- style = _getContainerAttribut.style;
275
-
246
+ id = _getContainerAttribut.id,
247
+ className = _getContainerAttribut.className,
248
+ style = _getContainerAttribut.style;
276
249
  if (id) {
277
250
  editorContainer.id = id;
278
251
  }
279
-
280
252
  editorContainer.className = [DEFAULT_CLASSNAME, className].join(' ');
281
-
282
253
  if (style) {
283
254
  Object.assign(editorContainer.style, style);
284
255
  }
285
-
286
256
  doc.body.appendChild(editorContainer);
287
257
  return ReactDOM.createPortal(editorElement, editorContainer);
288
258
  }
@@ -295,22 +265,18 @@ function createEditorPortal() {
295
265
  * 'global'.
296
266
  * @returns {React.ReactElement} An editor element containing the additional methods.
297
267
  */
298
-
299
268
  function getExtendedEditorElement(children, editorCache) {
300
269
  var editorColumnScope = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : GLOBAL_EDITOR_SCOPE;
301
270
  var editorElement = getChildElementByType(children, 'hot-editor');
302
271
  var editorClass = getOriginalEditorClass(editorElement);
303
-
304
272
  if (!editorElement) {
305
273
  return null;
306
274
  }
307
-
308
275
  return React.cloneElement(editorElement, {
309
276
  emitEditorInstance: function emitEditorInstance(editorInstance, editorColumnScope) {
310
277
  if (!editorCache.get(editorClass)) {
311
278
  editorCache.set(editorClass, new Map());
312
279
  }
313
-
314
280
  var cacheEntry = editorCache.get(editorClass);
315
281
  cacheEntry.set(editorColumnScope !== null && editorColumnScope !== void 0 ? editorColumnScope : GLOBAL_EDITOR_SCOPE, editorInstance);
316
282
  },
@@ -327,18 +293,14 @@ function getExtendedEditorElement(children, editorCache) {
327
293
  * @param {Document} [ownerDocument] The owner document to set the portal up into.
328
294
  * @returns {{portal: React.ReactPortal, portalContainer: HTMLElement}} An object containing the portal and its container.
329
295
  */
330
-
331
296
  function createPortal(rElement, props, callback) {
332
297
  var ownerDocument = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : document;
333
-
334
298
  if (!ownerDocument) {
335
299
  ownerDocument = document;
336
300
  }
337
-
338
301
  if (!bulkComponentContainer) {
339
302
  bulkComponentContainer = ownerDocument.createDocumentFragment();
340
303
  }
341
-
342
304
  var portalContainer = ownerDocument.createElement('DIV');
343
305
  bulkComponentContainer.appendChild(portalContainer);
344
306
  var extendedRendererElement = React.cloneElement(rElement, _objectSpread2({
@@ -358,7 +320,6 @@ function createPortal(rElement, props, callback) {
358
320
  * @returns An object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the
359
321
  * component.
360
322
  */
361
-
362
323
  function getContainerAttributesProps(props) {
363
324
  var randomizeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
364
325
  return {
@@ -372,13 +333,11 @@ function getContainerAttributesProps(props) {
372
333
  *
373
334
  * @param {Object} instance Instance to have the methods renamed.
374
335
  */
375
-
376
336
  function addUnsafePrefixes(instance) {
377
337
  var reactSemverArray = React.version.split('.').map(function (v) {
378
338
  return parseInt(v);
379
339
  });
380
340
  var shouldPrefix = reactSemverArray[0] >= 16 && reactSemverArray[1] >= 3 || reactSemverArray[0] >= 17;
381
-
382
341
  if (shouldPrefix) {
383
342
  instance.UNSAFE_componentWillUpdate = instance.componentWillUpdate;
384
343
  instance.componentWillUpdate = void 0;
@@ -391,7 +350,6 @@ var SettingsMapper = /*#__PURE__*/function () {
391
350
  function SettingsMapper() {
392
351
  _classCallCheck(this, SettingsMapper);
393
352
  }
394
-
395
353
  _createClass(SettingsMapper, null, [{
396
354
  key: "getSettings",
397
355
  value:
@@ -403,35 +361,28 @@ var SettingsMapper = /*#__PURE__*/function () {
403
361
  */
404
362
  function getSettings(properties) {
405
363
  var newSettings = {};
406
-
407
364
  if (properties.settings) {
408
365
  var settings = properties.settings;
409
-
410
366
  for (var key in settings) {
411
367
  if (settings.hasOwnProperty(key)) {
412
368
  newSettings[key] = settings[key];
413
369
  }
414
370
  }
415
371
  }
416
-
417
372
  for (var _key in properties) {
418
373
  if (_key !== 'settings' && _key !== 'children' && properties.hasOwnProperty(_key)) {
419
374
  newSettings[_key] = properties[_key];
420
375
  }
421
376
  }
422
-
423
377
  return newSettings;
424
378
  }
425
379
  }]);
426
-
427
380
  return SettingsMapper;
428
381
  }();
429
382
 
430
383
  var HotColumn = /*#__PURE__*/function (_React$Component) {
431
384
  _inherits(HotColumn, _React$Component);
432
-
433
385
  var _super = _createSuper(HotColumn);
434
-
435
386
  /**
436
387
  * HotColumn class constructor.
437
388
  *
@@ -440,9 +391,7 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
440
391
  */
441
392
  function HotColumn(props, context) {
442
393
  var _this;
443
-
444
394
  _classCallCheck(this, HotColumn);
445
-
446
395
  _this = _super.call(this, props, context);
447
396
  /**
448
397
  * Local editor portal cache.
@@ -450,7 +399,6 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
450
399
  * @private
451
400
  * @type {ReactPortal}
452
401
  */
453
-
454
402
  _this.localEditorPortal = null;
455
403
  addUnsafePrefixes(_assertThisInitialized(_this));
456
404
  return _this;
@@ -460,8 +408,6 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
460
408
  *
461
409
  * @return {ReactPortal} Local editor portal.
462
410
  */
463
-
464
-
465
411
  _createClass(HotColumn, [{
466
412
  key: "getLocalEditorPortal",
467
413
  value: function getLocalEditorPortal() {
@@ -472,7 +418,6 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
472
418
  *
473
419
  * @param {ReactPortal} portal Local editor portal.
474
420
  */
475
-
476
421
  }, {
477
422
  key: "setLocalEditorPortal",
478
423
  value: function setLocalEditorPortal(portal) {
@@ -483,12 +428,10 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
483
428
  *
484
429
  * @returns {Object}
485
430
  */
486
-
487
431
  }, {
488
432
  key: "getSettingsProps",
489
433
  value: function getSettingsProps() {
490
434
  var _this2 = this;
491
-
492
435
  this.internalProps = ['__componentRendererColumns', '_emitColumnSettings', '_columnIndex', '_getChildElementByType', '_getRendererWrapper', '_getEditorClass', '_getEditorCache', '_getOwnerDocument', 'hot-renderer', 'hot-editor', 'children'];
493
436
  return Object.keys(this.props).filter(function (key) {
494
437
  return !_this2.internalProps.includes(key);
@@ -497,24 +440,11 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
497
440
  return obj;
498
441
  }, {});
499
442
  }
500
- /**
501
- * Check whether the HotColumn component contains a provided prop.
502
- *
503
- * @param {String} propName Property name.
504
- * @returns {Boolean}
505
- */
506
-
507
- }, {
508
- key: "hasProp",
509
- value: function hasProp(propName) {
510
- return !!this.props[propName];
511
- }
512
443
  /**
513
444
  * Get the editor element for the current column.
514
445
  *
515
446
  * @returns {React.ReactElement} React editor component element.
516
447
  */
517
-
518
448
  }, {
519
449
  key: "getLocalEditorElement",
520
450
  value: function getLocalEditorElement() {
@@ -523,31 +453,18 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
523
453
  /**
524
454
  * Create the column settings based on the data provided to the `HotColumn` component and it's child components.
525
455
  */
526
-
527
456
  }, {
528
457
  key: "createColumnSettings",
529
458
  value: function createColumnSettings() {
530
459
  var rendererElement = this.props._getChildElementByType(this.props.children, 'hot-renderer');
531
-
532
460
  var editorElement = this.getLocalEditorElement();
533
461
  this.columnSettings = SettingsMapper.getSettings(this.getSettingsProps());
534
-
535
462
  if (rendererElement !== null) {
536
463
  this.columnSettings.renderer = this.props._getRendererWrapper(rendererElement);
537
-
538
464
  this.props._componentRendererColumns.set(this.props._columnIndex, true);
539
- } else if (this.hasProp('renderer')) {
540
- this.columnSettings.renderer = this.props.renderer;
541
- } else {
542
- this.columnSettings.renderer = void 0;
543
465
  }
544
-
545
466
  if (editorElement !== null) {
546
467
  this.columnSettings.editor = this.props._getEditorClass(editorElement, this.props._columnIndex);
547
- } else if (this.hasProp('editor')) {
548
- this.columnSettings.editor = this.props.editor;
549
- } else {
550
- this.columnSettings.editor = void 0;
551
468
  }
552
469
  }
553
470
  /**
@@ -555,16 +472,12 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
555
472
  *
556
473
  * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.
557
474
  */
558
-
559
475
  }, {
560
476
  key: "createLocalEditorPortal",
561
477
  value: function createLocalEditorPortal() {
562
478
  var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.children;
563
-
564
479
  var editorCache = this.props._getEditorCache();
565
-
566
480
  var localEditorElement = getExtendedEditorElement(children, editorCache, this.props._columnIndex);
567
-
568
481
  if (localEditorElement) {
569
482
  this.setLocalEditorPortal(createEditorPortal(this.props._getOwnerDocument(), localEditorElement, editorCache));
570
483
  }
@@ -572,7 +485,6 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
572
485
  /**
573
486
  * Emit the column settings to the parent using a prop passed from the parent.
574
487
  */
575
-
576
488
  }, {
577
489
  key: "emitColumnSettings",
578
490
  value: function emitColumnSettings() {
@@ -583,11 +495,9 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
583
495
  ------- React lifecycle methods -------
584
496
  ---------------------------------------
585
497
  */
586
-
587
498
  /**
588
499
  * Logic performed before the mounting of the HotColumn component.
589
500
  */
590
-
591
501
  }, {
592
502
  key: "componentWillMount",
593
503
  value: function componentWillMount() {
@@ -596,7 +506,6 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
596
506
  /**
597
507
  * Logic performed after the mounting of the HotColumn component.
598
508
  */
599
-
600
509
  }, {
601
510
  key: "componentDidMount",
602
511
  value: function componentDidMount() {
@@ -606,7 +515,6 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
606
515
  /**
607
516
  * Logic performed before the updating of the HotColumn component.
608
517
  */
609
-
610
518
  }, {
611
519
  key: "componentWillUpdate",
612
520
  value: function componentWillUpdate(nextProps, nextState, nextContext) {
@@ -615,7 +523,6 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
615
523
  /**
616
524
  * Logic performed after the updating of the HotColumn component.
617
525
  */
618
-
619
526
  }, {
620
527
  key: "componentDidUpdate",
621
528
  value: function componentDidUpdate() {
@@ -627,49 +534,40 @@ var HotColumn = /*#__PURE__*/function (_React$Component) {
627
534
  *
628
535
  * @returns {React.ReactElement}
629
536
  */
630
-
631
537
  }, {
632
538
  key: "render",
633
539
  value: function render() {
634
540
  return React.createElement(React.Fragment, null, this.getLocalEditorPortal());
635
541
  }
636
542
  }]);
637
-
638
543
  return HotColumn;
639
544
  }(React.Component);
640
545
 
641
546
  /**
642
547
  * Component class used to manage the renderer component portals.
643
548
  */
644
-
645
549
  var PortalManager = /*#__PURE__*/function (_React$Component) {
646
550
  _inherits(PortalManager, _React$Component);
647
-
648
551
  var _super = _createSuper(PortalManager);
649
-
650
552
  function PortalManager(props) {
651
553
  var _this;
652
-
653
554
  _classCallCheck(this, PortalManager);
654
-
655
555
  _this = _super.call(this, props);
656
556
  _this.state = {
657
557
  portals: []
658
558
  };
659
559
  return _this;
660
560
  }
661
-
662
561
  _createClass(PortalManager, [{
663
562
  key: "render",
664
563
  value: function render() {
665
564
  return React.createElement(React.Fragment, null, this.state.portals);
666
565
  }
667
566
  }]);
668
-
669
567
  return PortalManager;
670
568
  }(React.Component);
671
569
 
672
- var version="12.1.3";
570
+ var version="12.3.0-next-bb1a7c2-20221208";
673
571
 
674
572
  function createCommonjsModule(fn, module) {
675
573
  return module = { exports: {} }, fn(module, module.exports), module.exports;
@@ -684,29 +582,27 @@ function createCommonjsModule(fn, module) {
684
582
  * LICENSE file in the root directory of this source tree.
685
583
  */
686
584
  var b = "function" === typeof Symbol && Symbol["for"],
687
- c = b ? Symbol["for"]("react.element") : 60103,
688
- d = b ? Symbol["for"]("react.portal") : 60106,
689
- e = b ? Symbol["for"]("react.fragment") : 60107,
690
- f = b ? Symbol["for"]("react.strict_mode") : 60108,
691
- g = b ? Symbol["for"]("react.profiler") : 60114,
692
- h = b ? Symbol["for"]("react.provider") : 60109,
693
- k = b ? Symbol["for"]("react.context") : 60110,
694
- l = b ? Symbol["for"]("react.async_mode") : 60111,
695
- m = b ? Symbol["for"]("react.concurrent_mode") : 60111,
696
- n = b ? Symbol["for"]("react.forward_ref") : 60112,
697
- p = b ? Symbol["for"]("react.suspense") : 60113,
698
- q = b ? Symbol["for"]("react.suspense_list") : 60120,
699
- r = b ? Symbol["for"]("react.memo") : 60115,
700
- t = b ? Symbol["for"]("react.lazy") : 60116,
701
- v = b ? Symbol["for"]("react.block") : 60121,
702
- w = b ? Symbol["for"]("react.fundamental") : 60117,
703
- x = b ? Symbol["for"]("react.responder") : 60118,
704
- y = b ? Symbol["for"]("react.scope") : 60119;
705
-
585
+ c = b ? Symbol["for"]("react.element") : 60103,
586
+ d = b ? Symbol["for"]("react.portal") : 60106,
587
+ e = b ? Symbol["for"]("react.fragment") : 60107,
588
+ f = b ? Symbol["for"]("react.strict_mode") : 60108,
589
+ g = b ? Symbol["for"]("react.profiler") : 60114,
590
+ h = b ? Symbol["for"]("react.provider") : 60109,
591
+ k = b ? Symbol["for"]("react.context") : 60110,
592
+ l = b ? Symbol["for"]("react.async_mode") : 60111,
593
+ m = b ? Symbol["for"]("react.concurrent_mode") : 60111,
594
+ n = b ? Symbol["for"]("react.forward_ref") : 60112,
595
+ p = b ? Symbol["for"]("react.suspense") : 60113,
596
+ q = b ? Symbol["for"]("react.suspense_list") : 60120,
597
+ r = b ? Symbol["for"]("react.memo") : 60115,
598
+ t = b ? Symbol["for"]("react.lazy") : 60116,
599
+ v = b ? Symbol["for"]("react.block") : 60121,
600
+ w = b ? Symbol["for"]("react.fundamental") : 60117,
601
+ x = b ? Symbol["for"]("react.responder") : 60118,
602
+ y = b ? Symbol["for"]("react.scope") : 60119;
706
603
  function z(a) {
707
604
  if ("object" === _typeof(a) && null !== a) {
708
605
  var u = a.$$typeof;
709
-
710
606
  switch (u) {
711
607
  case c:
712
608
  switch (a = a.type, a) {
@@ -717,7 +613,6 @@ function z(a) {
717
613
  case f:
718
614
  case p:
719
615
  return a;
720
-
721
616
  default:
722
617
  switch (a = a && a.$$typeof, a) {
723
618
  case k:
@@ -726,23 +621,18 @@ function z(a) {
726
621
  case r:
727
622
  case h:
728
623
  return a;
729
-
730
624
  default:
731
625
  return u;
732
626
  }
733
-
734
627
  }
735
-
736
628
  case d:
737
629
  return u;
738
630
  }
739
631
  }
740
632
  }
741
-
742
633
  function A(a) {
743
634
  return z(a) === m;
744
635
  }
745
-
746
636
  var AsyncMode = l;
747
637
  var ConcurrentMode = m;
748
638
  var ContextConsumer = k;
@@ -756,61 +646,46 @@ var Portal = d;
756
646
  var Profiler = g;
757
647
  var StrictMode = f;
758
648
  var Suspense = p;
759
-
760
649
  var isAsyncMode = function isAsyncMode(a) {
761
650
  return A(a) || z(a) === l;
762
651
  };
763
-
764
652
  var isConcurrentMode = A;
765
-
766
653
  var isContextConsumer = function isContextConsumer(a) {
767
654
  return z(a) === k;
768
655
  };
769
-
770
656
  var isContextProvider = function isContextProvider(a) {
771
657
  return z(a) === h;
772
658
  };
773
-
774
659
  var isElement = function isElement(a) {
775
660
  return "object" === _typeof(a) && null !== a && a.$$typeof === c;
776
661
  };
777
-
778
662
  var isForwardRef = function isForwardRef(a) {
779
663
  return z(a) === n;
780
664
  };
781
-
782
665
  var isFragment = function isFragment(a) {
783
666
  return z(a) === e;
784
667
  };
785
-
786
668
  var isLazy = function isLazy(a) {
787
669
  return z(a) === t;
788
670
  };
789
-
790
671
  var isMemo = function isMemo(a) {
791
672
  return z(a) === r;
792
673
  };
793
-
794
674
  var isPortal = function isPortal(a) {
795
675
  return z(a) === d;
796
676
  };
797
-
798
677
  var isProfiler = function isProfiler(a) {
799
678
  return z(a) === g;
800
679
  };
801
-
802
680
  var isStrictMode = function isStrictMode(a) {
803
681
  return z(a) === f;
804
682
  };
805
-
806
683
  var isSuspense = function isSuspense(a) {
807
684
  return z(a) === p;
808
685
  };
809
-
810
686
  var isValidElementType = function isValidElementType(a) {
811
687
  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);
812
688
  };
813
-
814
689
  var typeOf = z;
815
690
  var reactIs_production_min = {
816
691
  AsyncMode: AsyncMode,
@@ -847,8 +722,9 @@ var reactIs_development = createCommonjsModule(function (module, exports) {
847
722
 
848
723
  if (process.env.NODE_ENV !== "production") {
849
724
  (function () {
850
- // nor polyfill, then a plain number is used for performance.
851
725
 
726
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
727
+ // nor polyfill, then a plain number is used for performance.
852
728
  var hasSymbol = typeof Symbol === 'function' && Symbol["for"];
853
729
  var REACT_ELEMENT_TYPE = hasSymbol ? Symbol["for"]('react.element') : 0xeac7;
854
730
  var REACT_PORTAL_TYPE = hasSymbol ? Symbol["for"]('react.portal') : 0xeaca;
@@ -870,20 +746,17 @@ var reactIs_development = createCommonjsModule(function (module, exports) {
870
746
  var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol["for"]('react.fundamental') : 0xead5;
871
747
  var REACT_RESPONDER_TYPE = hasSymbol ? Symbol["for"]('react.responder') : 0xead6;
872
748
  var REACT_SCOPE_TYPE = hasSymbol ? Symbol["for"]('react.scope') : 0xead7;
873
-
874
749
  function isValidElementType(type) {
875
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
750
+ return typeof type === 'string' || typeof type === 'function' ||
751
+ // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
876
752
  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || _typeof(type) === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
877
753
  }
878
-
879
754
  function typeOf(object) {
880
755
  if (_typeof(object) === 'object' && object !== null) {
881
756
  var $$typeof = object.$$typeof;
882
-
883
757
  switch ($$typeof) {
884
758
  case REACT_ELEMENT_TYPE:
885
759
  var type = object.type;
886
-
887
760
  switch (type) {
888
761
  case REACT_ASYNC_MODE_TYPE:
889
762
  case REACT_CONCURRENT_MODE_TYPE:
@@ -892,10 +765,8 @@ var reactIs_development = createCommonjsModule(function (module, exports) {
892
765
  case REACT_STRICT_MODE_TYPE:
893
766
  case REACT_SUSPENSE_TYPE:
894
767
  return type;
895
-
896
768
  default:
897
769
  var $$typeofType = type && type.$$typeof;
898
-
899
770
  switch ($$typeofType) {
900
771
  case REACT_CONTEXT_TYPE:
901
772
  case REACT_FORWARD_REF_TYPE:
@@ -903,22 +774,17 @@ var reactIs_development = createCommonjsModule(function (module, exports) {
903
774
  case REACT_MEMO_TYPE:
904
775
  case REACT_PROVIDER_TYPE:
905
776
  return $$typeofType;
906
-
907
777
  default:
908
778
  return $$typeof;
909
779
  }
910
-
911
780
  }
912
-
913
781
  case REACT_PORTAL_TYPE:
914
782
  return $$typeof;
915
783
  }
916
784
  }
917
-
918
785
  return undefined;
919
786
  } // AsyncMode is deprecated along with isAsyncMode
920
787
 
921
-
922
788
  var AsyncMode = REACT_ASYNC_MODE_TYPE;
923
789
  var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
924
790
  var ContextConsumer = REACT_CONTEXT_TYPE;
@@ -944,55 +810,42 @@ var reactIs_development = createCommonjsModule(function (module, exports) {
944
810
  }
945
811
  return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
946
812
  }
947
-
948
813
  function isConcurrentMode(object) {
949
814
  return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
950
815
  }
951
-
952
816
  function isContextConsumer(object) {
953
817
  return typeOf(object) === REACT_CONTEXT_TYPE;
954
818
  }
955
-
956
819
  function isContextProvider(object) {
957
820
  return typeOf(object) === REACT_PROVIDER_TYPE;
958
821
  }
959
-
960
822
  function isElement(object) {
961
823
  return _typeof(object) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
962
824
  }
963
-
964
825
  function isForwardRef(object) {
965
826
  return typeOf(object) === REACT_FORWARD_REF_TYPE;
966
827
  }
967
-
968
828
  function isFragment(object) {
969
829
  return typeOf(object) === REACT_FRAGMENT_TYPE;
970
830
  }
971
-
972
831
  function isLazy(object) {
973
832
  return typeOf(object) === REACT_LAZY_TYPE;
974
833
  }
975
-
976
834
  function isMemo(object) {
977
835
  return typeOf(object) === REACT_MEMO_TYPE;
978
836
  }
979
-
980
837
  function isPortal(object) {
981
838
  return typeOf(object) === REACT_PORTAL_TYPE;
982
839
  }
983
-
984
840
  function isProfiler(object) {
985
841
  return typeOf(object) === REACT_PROFILER_TYPE;
986
842
  }
987
-
988
843
  function isStrictMode(object) {
989
844
  return typeOf(object) === REACT_STRICT_MODE_TYPE;
990
845
  }
991
-
992
846
  function isSuspense(object) {
993
847
  return typeOf(object) === REACT_SUSPENSE_TYPE;
994
848
  }
995
-
996
849
  exports.AsyncMode = AsyncMode;
997
850
  exports.ConcurrentMode = ConcurrentMode;
998
851
  exports.ContextConsumer = ContextConsumer;
@@ -1067,85 +920,71 @@ object-assign
1067
920
  (c) Sindre Sorhus
1068
921
  @license MIT
1069
922
  */
1070
- /* eslint-disable no-unused-vars */
1071
923
 
924
+ /* eslint-disable no-unused-vars */
1072
925
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1073
926
  var hasOwnProperty = Object.prototype.hasOwnProperty;
1074
927
  var propIsEnumerable = Object.prototype.propertyIsEnumerable;
1075
-
1076
928
  function toObject(val) {
1077
929
  if (val === null || val === undefined) {
1078
930
  throw new TypeError('Object.assign cannot be called with null or undefined');
1079
931
  }
1080
-
1081
932
  return Object(val);
1082
933
  }
1083
-
1084
934
  function shouldUseNative() {
1085
935
  try {
1086
936
  if (!Object.assign) {
1087
937
  return false;
1088
- } // Detect buggy property enumeration order in older V8 versions.
1089
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
938
+ }
1090
939
 
940
+ // Detect buggy property enumeration order in older V8 versions.
1091
941
 
942
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
1092
943
  var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
1093
-
1094
944
  test1[5] = 'de';
1095
-
1096
945
  if (Object.getOwnPropertyNames(test1)[0] === '5') {
1097
946
  return false;
1098
- } // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1099
-
947
+ }
1100
948
 
949
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1101
950
  var test2 = {};
1102
-
1103
951
  for (var i = 0; i < 10; i++) {
1104
952
  test2['_' + String.fromCharCode(i)] = i;
1105
953
  }
1106
-
1107
954
  var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
1108
955
  return test2[n];
1109
956
  });
1110
-
1111
957
  if (order2.join('') !== '0123456789') {
1112
958
  return false;
1113
- } // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1114
-
959
+ }
1115
960
 
961
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1116
962
  var test3 = {};
1117
963
  'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
1118
964
  test3[letter] = letter;
1119
965
  });
1120
-
1121
966
  if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
1122
967
  return false;
1123
968
  }
1124
-
1125
969
  return true;
1126
970
  } catch (err) {
1127
971
  // We don't expect any of the above to throw, but better to be safe.
1128
972
  return false;
1129
973
  }
1130
974
  }
1131
-
1132
975
  var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
1133
976
  var from;
1134
977
  var to = toObject(target);
1135
978
  var symbols;
1136
-
1137
979
  for (var s = 1; s < arguments.length; s++) {
1138
980
  from = Object(arguments[s]);
1139
-
1140
981
  for (var key in from) {
1141
982
  if (hasOwnProperty.call(from, key)) {
1142
983
  to[key] = from[key];
1143
984
  }
1144
985
  }
1145
-
1146
986
  if (getOwnPropertySymbols) {
1147
987
  symbols = getOwnPropertySymbols(from);
1148
-
1149
988
  for (var i = 0; i < symbols.length; i++) {
1150
989
  if (propIsEnumerable.call(from, symbols[i])) {
1151
990
  to[symbols[i]] = from[symbols[i]];
@@ -1153,7 +992,6 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
1153
992
  }
1154
993
  }
1155
994
  }
1156
-
1157
995
  return to;
1158
996
  };
1159
997
 
@@ -1170,29 +1008,24 @@ var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
1170
1008
  var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
1171
1009
 
1172
1010
  var printWarning$1 = function printWarning() {};
1173
-
1174
1011
  if (process.env.NODE_ENV !== 'production') {
1175
1012
  var ReactPropTypesSecret = ReactPropTypesSecret_1;
1176
1013
  var loggedTypeFailures = {};
1177
1014
  var has = has$1;
1178
-
1179
1015
  printWarning$1 = function printWarning(text) {
1180
1016
  var message = 'Warning: ' + text;
1181
-
1182
1017
  if (typeof console !== 'undefined') {
1183
1018
  console.error(message);
1184
1019
  }
1185
-
1186
1020
  try {
1187
1021
  // --- Welcome to debugging React ---
1188
1022
  // This error was thrown as a convenience so that you can use this stack
1189
1023
  // to find the callsite that caused this warning to fire.
1190
1024
  throw new Error(message);
1191
- } catch (x) {
1192
- /**/
1193
- }
1025
+ } catch (x) {/**/}
1194
1026
  };
1195
1027
  }
1028
+
1196
1029
  /**
1197
1030
  * Assert that the values match with the type specs.
1198
1031
  * Error messages are memorized and will only be shown once.
@@ -1204,16 +1037,14 @@ if (process.env.NODE_ENV !== 'production') {
1204
1037
  * @param {?Function} getStack Returns the component stack.
1205
1038
  * @private
1206
1039
  */
1207
-
1208
-
1209
1040
  function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1210
1041
  if (process.env.NODE_ENV !== 'production') {
1211
1042
  for (var typeSpecName in typeSpecs) {
1212
1043
  if (has(typeSpecs, typeSpecName)) {
1213
- var error; // Prop type validation may throw. In case they do, we don't want to
1044
+ var error;
1045
+ // Prop type validation may throw. In case they do, we don't want to
1214
1046
  // fail the render phase where it didn't fail before. So we log it.
1215
1047
  // After these have been cleaned up, we'll let them throw.
1216
-
1217
1048
  try {
1218
1049
  // This is intentionally an invariant that gets caught. It's the same
1219
1050
  // behavior as without this statement except with a better message.
@@ -1222,16 +1053,13 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1222
1053
  err.name = 'Invariant Violation';
1223
1054
  throw err;
1224
1055
  }
1225
-
1226
1056
  error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
1227
1057
  } catch (ex) {
1228
1058
  error = ex;
1229
1059
  }
1230
-
1231
1060
  if (error && !(error instanceof Error)) {
1232
1061
  printWarning$1((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + _typeof(error) + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
1233
1062
  }
1234
-
1235
1063
  if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1236
1064
  // Only monitor this failure once because there tends to be a lot of the
1237
1065
  // same error.
@@ -1243,31 +1071,26 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1243
1071
  }
1244
1072
  }
1245
1073
  }
1074
+
1246
1075
  /**
1247
1076
  * Resets warning cache when testing.
1248
1077
  *
1249
1078
  * @private
1250
1079
  */
1251
-
1252
-
1253
1080
  checkPropTypes.resetWarningCache = function () {
1254
1081
  if (process.env.NODE_ENV !== 'production') {
1255
1082
  loggedTypeFailures = {};
1256
1083
  }
1257
1084
  };
1258
-
1259
1085
  var checkPropTypes_1 = checkPropTypes;
1260
1086
 
1261
1087
  var printWarning = function printWarning() {};
1262
-
1263
1088
  if (process.env.NODE_ENV !== 'production') {
1264
1089
  printWarning = function printWarning(text) {
1265
1090
  var message = 'Warning: ' + text;
1266
-
1267
1091
  if (typeof console !== 'undefined') {
1268
1092
  console.error(message);
1269
1093
  }
1270
-
1271
1094
  try {
1272
1095
  // --- Welcome to debugging React ---
1273
1096
  // This error was thrown as a convenience so that you can use this stack
@@ -1276,11 +1099,9 @@ if (process.env.NODE_ENV !== 'production') {
1276
1099
  } catch (x) {}
1277
1100
  };
1278
1101
  }
1279
-
1280
1102
  function emptyFunctionThatReturnsNull() {
1281
1103
  return null;
1282
1104
  }
1283
-
1284
1105
  var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, throwOnDirectAccess) {
1285
1106
  /* global Symbol */
1286
1107
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
@@ -1300,14 +1121,13 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1300
1121
  * @param {?object} maybeIterable
1301
1122
  * @return {?function}
1302
1123
  */
1303
-
1304
1124
  function getIteratorFn(maybeIterable) {
1305
1125
  var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
1306
-
1307
1126
  if (typeof iteratorFn === 'function') {
1308
1127
  return iteratorFn;
1309
1128
  }
1310
1129
  }
1130
+
1311
1131
  /**
1312
1132
  * Collection of methods that allow declaration and validation of props that are
1313
1133
  * supplied to React components. Example usage:
@@ -1355,10 +1175,10 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1355
1175
  * @internal
1356
1176
  */
1357
1177
 
1178
+ var ANONYMOUS = '<<anonymous>>';
1358
1179
 
1359
- var ANONYMOUS = '<<anonymous>>'; // Important!
1180
+ // Important!
1360
1181
  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
1361
-
1362
1182
  var ReactPropTypes = {
1363
1183
  array: createPrimitiveTypeChecker('array'),
1364
1184
  bigint: createPrimitiveTypeChecker('bigint'),
@@ -1380,13 +1200,12 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1380
1200
  shape: createShapeTypeChecker,
1381
1201
  exact: createStrictShapeTypeChecker
1382
1202
  };
1203
+
1383
1204
  /**
1384
1205
  * inlined Object.is polyfill to avoid requiring consumers ship their own
1385
1206
  * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1386
1207
  */
1387
-
1388
1208
  /*eslint-disable no-self-compare*/
1389
-
1390
1209
  function is(x, y) {
1391
1210
  // SameValue algorithm
1392
1211
  if (x === y) {
@@ -1407,27 +1226,21 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1407
1226
  * is prohibitively expensive if they are created too often, such as what
1408
1227
  * happens in oneOfType() for any type before the one that matched.
1409
1228
  */
1410
-
1411
-
1412
1229
  function PropTypeError(message, data) {
1413
1230
  this.message = message;
1414
1231
  this.data = data && _typeof(data) === 'object' ? data : {};
1415
1232
  this.stack = '';
1416
- } // Make `instanceof Error` still work for returned errors.
1417
-
1418
-
1233
+ }
1234
+ // Make `instanceof Error` still work for returned errors.
1419
1235
  PropTypeError.prototype = Error.prototype;
1420
-
1421
1236
  function createChainableTypeChecker(validate) {
1422
1237
  if (process.env.NODE_ENV !== 'production') {
1423
1238
  var manualPropTypeCallCache = {};
1424
1239
  var manualPropTypeWarningCount = 0;
1425
1240
  }
1426
-
1427
1241
  function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
1428
1242
  componentName = componentName || ANONYMOUS;
1429
1243
  propFullName = propFullName || propName;
1430
-
1431
1244
  if (secret !== ReactPropTypesSecret_1) {
1432
1245
  if (throwOnDirectAccess) {
1433
1246
  // New behavior only for users of `prop-types` package
@@ -1437,8 +1250,8 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1437
1250
  } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
1438
1251
  // Old behavior for people using React.PropTypes
1439
1252
  var cacheKey = componentName + ':' + propName;
1440
-
1441
- if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
1253
+ if (!manualPropTypeCallCache[cacheKey] &&
1254
+ // Avoid spamming the console because they are often not actionable except for lib authors
1442
1255
  manualPropTypeWarningCount < 3) {
1443
1256
  printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');
1444
1257
  manualPropTypeCallCache[cacheKey] = true;
@@ -1446,32 +1259,26 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1446
1259
  }
1447
1260
  }
1448
1261
  }
1449
-
1450
1262
  if (props[propName] == null) {
1451
1263
  if (isRequired) {
1452
1264
  if (props[propName] === null) {
1453
1265
  return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
1454
1266
  }
1455
-
1456
1267
  return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
1457
1268
  }
1458
-
1459
1269
  return null;
1460
1270
  } else {
1461
1271
  return validate(props, propName, componentName, location, propFullName);
1462
1272
  }
1463
1273
  }
1464
-
1465
1274
  var chainedCheckType = checkType.bind(null, false);
1466
1275
  chainedCheckType.isRequired = checkType.bind(null, true);
1467
1276
  return chainedCheckType;
1468
1277
  }
1469
-
1470
1278
  function createPrimitiveTypeChecker(expectedType) {
1471
1279
  function validate(props, propName, componentName, location, propFullName, secret) {
1472
1280
  var propValue = props[propName];
1473
1281
  var propType = getPropType(propValue);
1474
-
1475
1282
  if (propType !== expectedType) {
1476
1283
  // `propValue` being instance of, say, date/regexp, pass the 'object'
1477
1284
  // check, but we can offer a more precise error message here rather than
@@ -1481,74 +1288,55 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1481
1288
  expectedType: expectedType
1482
1289
  });
1483
1290
  }
1484
-
1485
1291
  return null;
1486
1292
  }
1487
-
1488
1293
  return createChainableTypeChecker(validate);
1489
1294
  }
1490
-
1491
1295
  function createAnyTypeChecker() {
1492
1296
  return createChainableTypeChecker(emptyFunctionThatReturnsNull);
1493
1297
  }
1494
-
1495
1298
  function createArrayOfTypeChecker(typeChecker) {
1496
1299
  function validate(props, propName, componentName, location, propFullName) {
1497
1300
  if (typeof typeChecker !== 'function') {
1498
1301
  return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1499
1302
  }
1500
-
1501
1303
  var propValue = props[propName];
1502
-
1503
1304
  if (!Array.isArray(propValue)) {
1504
1305
  var propType = getPropType(propValue);
1505
1306
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1506
1307
  }
1507
-
1508
1308
  for (var i = 0; i < propValue.length; i++) {
1509
1309
  var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
1510
-
1511
1310
  if (error instanceof Error) {
1512
1311
  return error;
1513
1312
  }
1514
1313
  }
1515
-
1516
1314
  return null;
1517
1315
  }
1518
-
1519
1316
  return createChainableTypeChecker(validate);
1520
1317
  }
1521
-
1522
1318
  function createElementTypeChecker() {
1523
1319
  function validate(props, propName, componentName, location, propFullName) {
1524
1320
  var propValue = props[propName];
1525
-
1526
1321
  if (!isValidElement(propValue)) {
1527
1322
  var propType = getPropType(propValue);
1528
1323
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1529
1324
  }
1530
-
1531
1325
  return null;
1532
1326
  }
1533
-
1534
1327
  return createChainableTypeChecker(validate);
1535
1328
  }
1536
-
1537
1329
  function createElementTypeTypeChecker() {
1538
1330
  function validate(props, propName, componentName, location, propFullName) {
1539
1331
  var propValue = props[propName];
1540
-
1541
1332
  if (!reactIs.isValidElementType(propValue)) {
1542
1333
  var propType = getPropType(propValue);
1543
1334
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
1544
1335
  }
1545
-
1546
1336
  return null;
1547
1337
  }
1548
-
1549
1338
  return createChainableTypeChecker(validate);
1550
1339
  }
1551
-
1552
1340
  function createInstanceTypeChecker(expectedClass) {
1553
1341
  function validate(props, propName, componentName, location, propFullName) {
1554
1342
  if (!(props[propName] instanceof expectedClass)) {
@@ -1556,13 +1344,10 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1556
1344
  var actualClassName = getClassName(props[propName]);
1557
1345
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1558
1346
  }
1559
-
1560
1347
  return null;
1561
1348
  }
1562
-
1563
1349
  return createChainableTypeChecker(validate);
1564
1350
  }
1565
-
1566
1351
  function createEnumTypeChecker(expectedValues) {
1567
1352
  if (!Array.isArray(expectedValues)) {
1568
1353
  if (process.env.NODE_ENV !== 'production') {
@@ -1572,207 +1357,155 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1572
1357
  printWarning('Invalid argument supplied to oneOf, expected an array.');
1573
1358
  }
1574
1359
  }
1575
-
1576
1360
  return emptyFunctionThatReturnsNull;
1577
1361
  }
1578
-
1579
1362
  function validate(props, propName, componentName, location, propFullName) {
1580
1363
  var propValue = props[propName];
1581
-
1582
1364
  for (var i = 0; i < expectedValues.length; i++) {
1583
1365
  if (is(propValue, expectedValues[i])) {
1584
1366
  return null;
1585
1367
  }
1586
1368
  }
1587
-
1588
1369
  var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1589
1370
  var type = getPreciseType(value);
1590
-
1591
1371
  if (type === 'symbol') {
1592
1372
  return String(value);
1593
1373
  }
1594
-
1595
1374
  return value;
1596
1375
  });
1597
1376
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1598
1377
  }
1599
-
1600
1378
  return createChainableTypeChecker(validate);
1601
1379
  }
1602
-
1603
1380
  function createObjectOfTypeChecker(typeChecker) {
1604
1381
  function validate(props, propName, componentName, location, propFullName) {
1605
1382
  if (typeof typeChecker !== 'function') {
1606
1383
  return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1607
1384
  }
1608
-
1609
1385
  var propValue = props[propName];
1610
1386
  var propType = getPropType(propValue);
1611
-
1612
1387
  if (propType !== 'object') {
1613
1388
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1614
1389
  }
1615
-
1616
1390
  for (var key in propValue) {
1617
1391
  if (has$1(propValue, key)) {
1618
1392
  var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
1619
-
1620
1393
  if (error instanceof Error) {
1621
1394
  return error;
1622
1395
  }
1623
1396
  }
1624
1397
  }
1625
-
1626
1398
  return null;
1627
1399
  }
1628
-
1629
1400
  return createChainableTypeChecker(validate);
1630
1401
  }
1631
-
1632
1402
  function createUnionTypeChecker(arrayOfTypeCheckers) {
1633
1403
  if (!Array.isArray(arrayOfTypeCheckers)) {
1634
1404
  process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
1635
1405
  return emptyFunctionThatReturnsNull;
1636
1406
  }
1637
-
1638
1407
  for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1639
1408
  var checker = arrayOfTypeCheckers[i];
1640
-
1641
1409
  if (typeof checker !== 'function') {
1642
1410
  printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
1643
1411
  return emptyFunctionThatReturnsNull;
1644
1412
  }
1645
1413
  }
1646
-
1647
1414
  function validate(props, propName, componentName, location, propFullName) {
1648
1415
  var expectedTypes = [];
1649
-
1650
1416
  for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1651
1417
  var checker = arrayOfTypeCheckers[i];
1652
1418
  var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1);
1653
-
1654
1419
  if (checkerResult == null) {
1655
1420
  return null;
1656
1421
  }
1657
-
1658
1422
  if (checkerResult.data && has$1(checkerResult.data, 'expectedType')) {
1659
1423
  expectedTypes.push(checkerResult.data.expectedType);
1660
1424
  }
1661
1425
  }
1662
-
1663
1426
  var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
1664
1427
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1665
1428
  }
1666
-
1667
1429
  return createChainableTypeChecker(validate);
1668
1430
  }
1669
-
1670
1431
  function createNodeChecker() {
1671
1432
  function validate(props, propName, componentName, location, propFullName) {
1672
1433
  if (!isNode(props[propName])) {
1673
1434
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1674
1435
  }
1675
-
1676
1436
  return null;
1677
1437
  }
1678
-
1679
1438
  return createChainableTypeChecker(validate);
1680
1439
  }
1681
-
1682
1440
  function invalidValidatorError(componentName, location, propFullName, key, type) {
1683
1441
  return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
1684
1442
  }
1685
-
1686
1443
  function createShapeTypeChecker(shapeTypes) {
1687
1444
  function validate(props, propName, componentName, location, propFullName) {
1688
1445
  var propValue = props[propName];
1689
1446
  var propType = getPropType(propValue);
1690
-
1691
1447
  if (propType !== 'object') {
1692
1448
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1693
1449
  }
1694
-
1695
1450
  for (var key in shapeTypes) {
1696
1451
  var checker = shapeTypes[key];
1697
-
1698
1452
  if (typeof checker !== 'function') {
1699
1453
  return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1700
1454
  }
1701
-
1702
1455
  var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
1703
-
1704
1456
  if (error) {
1705
1457
  return error;
1706
1458
  }
1707
1459
  }
1708
-
1709
1460
  return null;
1710
1461
  }
1711
-
1712
1462
  return createChainableTypeChecker(validate);
1713
1463
  }
1714
-
1715
1464
  function createStrictShapeTypeChecker(shapeTypes) {
1716
1465
  function validate(props, propName, componentName, location, propFullName) {
1717
1466
  var propValue = props[propName];
1718
1467
  var propType = getPropType(propValue);
1719
-
1720
1468
  if (propType !== 'object') {
1721
1469
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1722
- } // We need to check all keys in case some are required but missing from props.
1723
-
1724
-
1470
+ }
1471
+ // We need to check all keys in case some are required but missing from props.
1725
1472
  var allKeys = objectAssign({}, props[propName], shapeTypes);
1726
-
1727
1473
  for (var key in allKeys) {
1728
1474
  var checker = shapeTypes[key];
1729
-
1730
1475
  if (has$1(shapeTypes, key) && typeof checker !== 'function') {
1731
1476
  return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1732
1477
  }
1733
-
1734
1478
  if (!checker) {
1735
1479
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
1736
1480
  }
1737
-
1738
1481
  var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
1739
-
1740
1482
  if (error) {
1741
1483
  return error;
1742
1484
  }
1743
1485
  }
1744
-
1745
1486
  return null;
1746
1487
  }
1747
-
1748
1488
  return createChainableTypeChecker(validate);
1749
1489
  }
1750
-
1751
1490
  function isNode(propValue) {
1752
1491
  switch (_typeof(propValue)) {
1753
1492
  case 'number':
1754
1493
  case 'string':
1755
1494
  case 'undefined':
1756
1495
  return true;
1757
-
1758
1496
  case 'boolean':
1759
1497
  return !propValue;
1760
-
1761
1498
  case 'object':
1762
1499
  if (Array.isArray(propValue)) {
1763
1500
  return propValue.every(isNode);
1764
1501
  }
1765
-
1766
1502
  if (propValue === null || isValidElement(propValue)) {
1767
1503
  return true;
1768
1504
  }
1769
-
1770
1505
  var iteratorFn = getIteratorFn(propValue);
1771
-
1772
1506
  if (iteratorFn) {
1773
1507
  var iterator = iteratorFn.call(propValue);
1774
1508
  var step;
1775
-
1776
1509
  if (iteratorFn !== propValue.entries) {
1777
1510
  while (!(step = iterator.next()).done) {
1778
1511
  if (!isNode(step.value)) {
@@ -1783,7 +1516,6 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1783
1516
  // Iterator will provide entry [k,v] tuples rather than values.
1784
1517
  while (!(step = iterator.next()).done) {
1785
1518
  var entry = step.value;
1786
-
1787
1519
  if (entry) {
1788
1520
  if (!isNode(entry[1])) {
1789
1521
  return false;
@@ -1794,69 +1526,59 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1794
1526
  } else {
1795
1527
  return false;
1796
1528
  }
1797
-
1798
1529
  return true;
1799
-
1800
1530
  default:
1801
1531
  return false;
1802
1532
  }
1803
1533
  }
1804
-
1805
1534
  function isSymbol(propType, propValue) {
1806
1535
  // Native Symbol.
1807
1536
  if (propType === 'symbol') {
1808
1537
  return true;
1809
- } // falsy value can't be a Symbol
1810
-
1538
+ }
1811
1539
 
1540
+ // falsy value can't be a Symbol
1812
1541
  if (!propValue) {
1813
1542
  return false;
1814
- } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1815
-
1543
+ }
1816
1544
 
1545
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1817
1546
  if (propValue['@@toStringTag'] === 'Symbol') {
1818
1547
  return true;
1819
- } // Fallback for non-spec compliant Symbols which are polyfilled.
1820
-
1548
+ }
1821
1549
 
1550
+ // Fallback for non-spec compliant Symbols which are polyfilled.
1822
1551
  if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1823
1552
  return true;
1824
1553
  }
1825
-
1826
1554
  return false;
1827
- } // Equivalent of `typeof` but with special handling for array and regexp.
1828
-
1555
+ }
1829
1556
 
1557
+ // Equivalent of `typeof` but with special handling for array and regexp.
1830
1558
  function getPropType(propValue) {
1831
1559
  var propType = _typeof(propValue);
1832
-
1833
1560
  if (Array.isArray(propValue)) {
1834
1561
  return 'array';
1835
1562
  }
1836
-
1837
1563
  if (propValue instanceof RegExp) {
1838
1564
  // Old webkits (at least until Android 4.0) return 'function' rather than
1839
1565
  // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1840
1566
  // passes PropTypes.object.
1841
1567
  return 'object';
1842
1568
  }
1843
-
1844
1569
  if (isSymbol(propType, propValue)) {
1845
1570
  return 'symbol';
1846
1571
  }
1847
-
1848
1572
  return propType;
1849
- } // This handles more types than `getPropType`. Only used for error messages.
1850
- // See `createPrimitiveTypeChecker`.
1851
-
1573
+ }
1852
1574
 
1575
+ // This handles more types than `getPropType`. Only used for error messages.
1576
+ // See `createPrimitiveTypeChecker`.
1853
1577
  function getPreciseType(propValue) {
1854
1578
  if (typeof propValue === 'undefined' || propValue === null) {
1855
1579
  return '' + propValue;
1856
1580
  }
1857
-
1858
1581
  var propType = getPropType(propValue);
1859
-
1860
1582
  if (propType === 'object') {
1861
1583
  if (propValue instanceof Date) {
1862
1584
  return 'date';
@@ -1864,39 +1586,33 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1864
1586
  return 'regexp';
1865
1587
  }
1866
1588
  }
1867
-
1868
1589
  return propType;
1869
- } // Returns a string that is postfixed to a warning about an invalid type.
1870
- // For example, "undefined" or "of type array"
1871
-
1590
+ }
1872
1591
 
1592
+ // Returns a string that is postfixed to a warning about an invalid type.
1593
+ // For example, "undefined" or "of type array"
1873
1594
  function getPostfixForTypeWarning(value) {
1874
1595
  var type = getPreciseType(value);
1875
-
1876
1596
  switch (type) {
1877
1597
  case 'array':
1878
1598
  case 'object':
1879
1599
  return 'an ' + type;
1880
-
1881
1600
  case 'boolean':
1882
1601
  case 'date':
1883
1602
  case 'regexp':
1884
1603
  return 'a ' + type;
1885
-
1886
1604
  default:
1887
1605
  return type;
1888
1606
  }
1889
- } // Returns class name of the object, if any.
1890
-
1607
+ }
1891
1608
 
1609
+ // Returns class name of the object, if any.
1892
1610
  function getClassName(propValue) {
1893
1611
  if (!propValue.constructor || !propValue.constructor.name) {
1894
1612
  return ANONYMOUS;
1895
1613
  }
1896
-
1897
1614
  return propValue.constructor.name;
1898
1615
  }
1899
-
1900
1616
  ReactPropTypes.checkPropTypes = checkPropTypes_1;
1901
1617
  ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache;
1902
1618
  ReactPropTypes.PropTypes = ReactPropTypes;
@@ -1904,29 +1620,24 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
1904
1620
  };
1905
1621
 
1906
1622
  function emptyFunction() {}
1907
-
1908
1623
  function emptyFunctionWithReset() {}
1909
-
1910
1624
  emptyFunctionWithReset.resetWarningCache = emptyFunction;
1911
-
1912
1625
  var factoryWithThrowingShims = function factoryWithThrowingShims() {
1913
1626
  function shim(props, propName, componentName, location, propFullName, secret) {
1914
1627
  if (secret === ReactPropTypesSecret_1) {
1915
1628
  // It is still safe when called from React.
1916
1629
  return;
1917
1630
  }
1918
-
1919
1631
  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');
1920
1632
  err.name = 'Invariant Violation';
1921
1633
  throw err;
1922
1634
  }
1923
1635
  shim.isRequired = shim;
1924
-
1925
1636
  function getShim() {
1926
1637
  return shim;
1927
1638
  }
1639
+ // Important!
1928
1640
  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1929
-
1930
1641
  var ReactPropTypes = {
1931
1642
  array: shim,
1932
1643
  bigint: shim,
@@ -1961,10 +1672,12 @@ var propTypes = createCommonjsModule(function (module) {
1961
1672
  * This source code is licensed under the MIT license found in the
1962
1673
  * LICENSE file in the root directory of this source tree.
1963
1674
  */
1675
+
1964
1676
  if (process.env.NODE_ENV !== 'production') {
1965
- var ReactIs = reactIs; // By explicitly using `prop-types` you are opting into new development behavior.
1966
- // http://fb.me/prop-types-in-prod
1677
+ var ReactIs = reactIs;
1967
1678
 
1679
+ // By explicitly using `prop-types` you are opting into new development behavior.
1680
+ // http://fb.me/prop-types-in-prod
1968
1681
  var throwOnDirectAccess = true;
1969
1682
  module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
1970
1683
  } else {
@@ -1997,12 +1710,9 @@ var PropTypes = propTypes;
1997
1710
  *
1998
1711
  * @class HotTable
1999
1712
  */
2000
-
2001
1713
  var HotTable = /*#__PURE__*/function (_React$Component) {
2002
1714
  _inherits(HotTable, _React$Component);
2003
-
2004
1715
  var _super = _createSuper(HotTable);
2005
-
2006
1716
  /**
2007
1717
  * HotTable class constructor.
2008
1718
  *
@@ -2011,16 +1721,13 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2011
1721
  */
2012
1722
  function HotTable(props, context) {
2013
1723
  var _this;
2014
-
2015
1724
  _classCallCheck(this, HotTable);
2016
-
2017
1725
  _this = _super.call(this, props, context);
2018
1726
  /**
2019
1727
  * The `id` of the main Handsontable DOM element.
2020
1728
  *
2021
1729
  * @type {String}
2022
1730
  */
2023
-
2024
1731
  _this.id = null;
2025
1732
  /**
2026
1733
  * Reference to the Handsontable instance.
@@ -2028,33 +1735,28 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2028
1735
  * @private
2029
1736
  * @type {Object}
2030
1737
  */
2031
-
2032
1738
  _this.__hotInstance = null;
2033
1739
  /**
2034
1740
  * Reference to the main Handsontable DOM element.
2035
1741
  *
2036
1742
  * @type {HTMLElement}
2037
1743
  */
2038
-
2039
1744
  _this.hotElementRef = null;
2040
1745
  /**
2041
1746
  * Array of object containing the column settings.
2042
1747
  *
2043
1748
  * @type {Array}
2044
1749
  */
2045
-
2046
1750
  _this.columnSettings = [];
2047
1751
  /**
2048
1752
  * Component used to manage the renderer portals.
2049
1753
  *
2050
1754
  * @type {React.Component}
2051
1755
  */
2052
-
2053
1756
  _this.portalManager = null;
2054
1757
  /**
2055
1758
  * Array containing the portals cashed to be rendered in bulk after Handsontable's render cycle.
2056
1759
  */
2057
-
2058
1760
  _this.portalCacheArray = [];
2059
1761
  /**
2060
1762
  * Global editor portal cache.
@@ -2062,7 +1764,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2062
1764
  * @private
2063
1765
  * @type {React.ReactPortal}
2064
1766
  */
2065
-
2066
1767
  _this.globalEditorPortal = null;
2067
1768
  /**
2068
1769
  * The rendered cells cache.
@@ -2070,7 +1771,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2070
1771
  * @private
2071
1772
  * @type {Map}
2072
1773
  */
2073
-
2074
1774
  _this.renderedCellCache = new Map();
2075
1775
  /**
2076
1776
  * Editor cache.
@@ -2078,7 +1778,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2078
1778
  * @private
2079
1779
  * @type {Map}
2080
1780
  */
2081
-
2082
1781
  _this.editorCache = new Map();
2083
1782
  /**
2084
1783
  * Map with column indexes (or a string = 'global') as keys, and booleans as values. Each key represents a component-based editor
@@ -2087,7 +1786,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2087
1786
  * @private
2088
1787
  * @type {Map}
2089
1788
  */
2090
-
2091
1789
  _this.componentRendererColumns = new Map();
2092
1790
  addUnsafePrefixes(_assertThisInitialized(_this));
2093
1791
  return _this;
@@ -2097,8 +1795,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2097
1795
  *
2098
1796
  * @returns The version number of the package.
2099
1797
  */
2100
-
2101
-
2102
1798
  _createClass(HotTable, [{
2103
1799
  key: "hotInstance",
2104
1800
  get:
@@ -2117,8 +1813,7 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2117
1813
  /**
2118
1814
  * Setter for the property storing the Handsontable instance.
2119
1815
  * @param {Handsontable} hotInstance The Handsontable instance.
2120
- */
2121
- ,
1816
+ */,
2122
1817
  set: function set(hotInstance) {
2123
1818
  this.__hotInstance = hotInstance;
2124
1819
  }
@@ -2127,7 +1822,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2127
1822
  *
2128
1823
  * @returns {Map}
2129
1824
  */
2130
-
2131
1825
  }, {
2132
1826
  key: "getRenderedCellCache",
2133
1827
  value: function getRenderedCellCache() {
@@ -2138,7 +1832,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2138
1832
  *
2139
1833
  * @returns {Map}
2140
1834
  */
2141
-
2142
1835
  }, {
2143
1836
  key: "getEditorCache",
2144
1837
  value: function getEditorCache() {
@@ -2149,7 +1842,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2149
1842
  *
2150
1843
  * @return {React.ReactPortal} The global editor portal.
2151
1844
  */
2152
-
2153
1845
  }, {
2154
1846
  key: "getGlobalEditorPortal",
2155
1847
  value: function getGlobalEditorPortal() {
@@ -2160,7 +1852,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2160
1852
  *
2161
1853
  * @param {React.ReactPortal} portal Global editor portal.
2162
1854
  */
2163
-
2164
1855
  }, {
2165
1856
  key: "setGlobalEditorPortal",
2166
1857
  value: function setGlobalEditorPortal(portal) {
@@ -2169,7 +1860,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2169
1860
  /**
2170
1861
  * Clear both the editor and the renderer cache.
2171
1862
  */
2172
-
2173
1863
  }, {
2174
1864
  key: "clearCache",
2175
1865
  value: function clearCache() {
@@ -2185,7 +1875,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2185
1875
  *
2186
1876
  * @returns The `Document` object used by the component.
2187
1877
  */
2188
-
2189
1878
  }, {
2190
1879
  key: "getOwnerDocument",
2191
1880
  value: function getOwnerDocument() {
@@ -2196,7 +1885,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2196
1885
  *
2197
1886
  * @param {HTMLElement} element The main Handsontable DOM element.
2198
1887
  */
2199
-
2200
1888
  }, {
2201
1889
  key: "setHotElementRef",
2202
1890
  value: function setHotElementRef(element) {
@@ -2208,39 +1896,33 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2208
1896
  * @param {React.ReactElement} rendererElement React renderer component.
2209
1897
  * @returns {Handsontable.renderers.Base} The Handsontable rendering function.
2210
1898
  */
2211
-
2212
1899
  }, {
2213
1900
  key: "getRendererWrapper",
2214
1901
  value: function getRendererWrapper(rendererElement) {
2215
1902
  var hotTableComponent = this;
2216
1903
  return function (instance, TD, row, col, prop, value, cellProperties) {
2217
1904
  var renderedCellCache = hotTableComponent.getRenderedCellCache();
2218
-
2219
1905
  if (renderedCellCache.has("".concat(row, "-").concat(col))) {
2220
1906
  TD.innerHTML = renderedCellCache.get("".concat(row, "-").concat(col)).innerHTML;
2221
1907
  }
2222
-
2223
1908
  if (TD && !TD.getAttribute('ghost-table')) {
2224
1909
  var _createPortal = createPortal(rendererElement, {
2225
- TD: TD,
2226
- row: row,
2227
- col: col,
2228
- prop: prop,
2229
- value: value,
2230
- cellProperties: cellProperties,
2231
- isRenderer: true
2232
- }, function () {}, TD.ownerDocument),
2233
- portal = _createPortal.portal,
2234
- portalContainer = _createPortal.portalContainer;
2235
-
1910
+ TD: TD,
1911
+ row: row,
1912
+ col: col,
1913
+ prop: prop,
1914
+ value: value,
1915
+ cellProperties: cellProperties,
1916
+ isRenderer: true
1917
+ }, function () {}, TD.ownerDocument),
1918
+ portal = _createPortal.portal,
1919
+ portalContainer = _createPortal.portalContainer;
2236
1920
  while (TD.firstChild) {
2237
1921
  TD.removeChild(TD.firstChild);
2238
1922
  }
2239
-
2240
1923
  TD.appendChild(portalContainer);
2241
1924
  hotTableComponent.portalCacheArray.push(portal);
2242
1925
  }
2243
-
2244
1926
  renderedCellCache.set("".concat(row, "-").concat(col), TD);
2245
1927
  return TD;
2246
1928
  };
@@ -2253,12 +1935,10 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2253
1935
  * 'global'.
2254
1936
  * @returns {Function} A class to be passed to the Handsontable editor settings.
2255
1937
  */
2256
-
2257
1938
  }, {
2258
1939
  key: "getEditorClass",
2259
1940
  value: function getEditorClass(editorElement) {
2260
1941
  var _editorCache$get;
2261
-
2262
1942
  var editorColumnScope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GLOBAL_EDITOR_SCOPE;
2263
1943
  var editorClass = getOriginalEditorClass(editorElement);
2264
1944
  var editorCache = this.getEditorCache();
@@ -2271,26 +1951,20 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2271
1951
  * @param {React.ReactElement} editorComponent React editor component.
2272
1952
  * @returns {Function} A class to be passed to the Handsontable editor settings.
2273
1953
  */
2274
-
2275
1954
  }, {
2276
1955
  key: "makeEditorClass",
2277
1956
  value: function makeEditorClass(editorComponent) {
2278
1957
  var customEditorClass = /*#__PURE__*/function (_Handsontable$editors) {
2279
1958
  _inherits(CustomEditor, _Handsontable$editors);
2280
-
2281
1959
  var _super2 = _createSuper(CustomEditor);
2282
-
2283
1960
  function CustomEditor(hotInstance) {
2284
1961
  var _this2;
2285
-
2286
1962
  _classCallCheck(this, CustomEditor);
2287
-
2288
1963
  _this2 = _super2.call(this, hotInstance);
2289
1964
  editorComponent.hotCustomEditorInstance = _assertThisInitialized(_this2);
2290
1965
  _this2.editorComponent = editorComponent;
2291
1966
  return _this2;
2292
1967
  }
2293
-
2294
1968
  _createClass(CustomEditor, [{
2295
1969
  key: "focus",
2296
1970
  value: function focus() {}
@@ -2307,23 +1981,18 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2307
1981
  key: "close",
2308
1982
  value: function close() {}
2309
1983
  }]);
2310
-
2311
1984
  return CustomEditor;
2312
- }(Handsontable.editors.BaseEditor); // Fill with the rest of the BaseEditor methods
2313
-
2314
-
1985
+ }(Handsontable.editors.BaseEditor);
1986
+ // Fill with the rest of the BaseEditor methods
2315
1987
  Object.getOwnPropertyNames(Handsontable.editors.BaseEditor.prototype).forEach(function (propName) {
2316
1988
  if (propName === 'constructor') {
2317
1989
  return;
2318
1990
  }
2319
-
2320
1991
  customEditorClass.prototype[propName] = function () {
2321
1992
  var _editorComponent$prop;
2322
-
2323
1993
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2324
1994
  args[_key] = arguments[_key];
2325
1995
  }
2326
-
2327
1996
  return (_editorComponent$prop = editorComponent[propName]).call.apply(_editorComponent$prop, [editorComponent].concat(args));
2328
1997
  };
2329
1998
  });
@@ -2334,7 +2003,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2334
2003
  *
2335
2004
  * @returns {React.ReactElement} React renderer component element.
2336
2005
  */
2337
-
2338
2006
  }, {
2339
2007
  key: "getGlobalRendererElement",
2340
2008
  value: function getGlobalRendererElement() {
@@ -2347,7 +2015,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2347
2015
  * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.
2348
2016
  * @returns {React.ReactElement} React editor component element.
2349
2017
  */
2350
-
2351
2018
  }, {
2352
2019
  key: "getGlobalEditorElement",
2353
2020
  value: function getGlobalEditorElement() {
@@ -2359,13 +2026,11 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2359
2026
  *
2360
2027
  * @param {React.ReactNode} [children] Children of the HotTable instance. Defaults to `this.props.children`.
2361
2028
  */
2362
-
2363
2029
  }, {
2364
2030
  key: "createGlobalEditorPortal",
2365
2031
  value: function createGlobalEditorPortal() {
2366
2032
  var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.children;
2367
2033
  var globalEditorElement = this.getGlobalEditorElement(children);
2368
-
2369
2034
  if (globalEditorElement) {
2370
2035
  this.setGlobalEditorPortal(createEditorPortal(this.getOwnerDocument(), globalEditorElement, this.getEditorCache()));
2371
2036
  }
@@ -2375,7 +2040,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2375
2040
  *
2376
2041
  * @returns {Handsontable.GridSettings} New global set of settings for Handsontable.
2377
2042
  */
2378
-
2379
2043
  }, {
2380
2044
  key: "createNewGlobalSettings",
2381
2045
  value: function createNewGlobalSettings() {
@@ -2383,20 +2047,17 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2383
2047
  var globalRendererNode = this.getGlobalRendererElement();
2384
2048
  var globalEditorNode = this.getGlobalEditorElement();
2385
2049
  newSettings.columns = this.columnSettings.length ? this.columnSettings : newSettings.columns;
2386
-
2387
2050
  if (globalEditorNode) {
2388
2051
  newSettings.editor = this.getEditorClass(globalEditorNode, GLOBAL_EDITOR_SCOPE);
2389
2052
  } else {
2390
2053
  newSettings.editor = this.props.editor || (this.props.settings ? this.props.settings.editor : void 0);
2391
2054
  }
2392
-
2393
2055
  if (globalRendererNode) {
2394
2056
  newSettings.renderer = this.getRendererWrapper(globalRendererNode);
2395
2057
  this.componentRendererColumns.set('global', true);
2396
2058
  } else {
2397
2059
  newSettings.renderer = this.props.renderer || (this.props.settings ? this.props.settings.renderer : void 0);
2398
2060
  }
2399
-
2400
2061
  return newSettings;
2401
2062
  }
2402
2063
  /**
@@ -2404,12 +2065,10 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2404
2065
  *
2405
2066
  * @param {Handsontable.GridSettings} newGlobalSettings New global settings passed as Handsontable config.
2406
2067
  */
2407
-
2408
2068
  }, {
2409
2069
  key: "displayAutoSizeWarning",
2410
2070
  value: function displayAutoSizeWarning(newGlobalSettings) {
2411
2071
  var _this$hotInstance$get, _this$hotInstance$get2;
2412
-
2413
2072
  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)) {
2414
2073
  if (this.componentRendererColumns.size > 0) {
2415
2074
  warn(AUTOSIZE_WARNING);
@@ -2422,7 +2081,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2422
2081
  * @param {HotTableProps} columnSettings Column settings object.
2423
2082
  * @param {Number} columnIndex Column index.
2424
2083
  */
2425
-
2426
2084
  }, {
2427
2085
  key: "setHotColumnSettings",
2428
2086
  value: function setHotColumnSettings(columnSettings, columnIndex) {
@@ -2431,7 +2089,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2431
2089
  /**
2432
2090
  * Handsontable's `beforeViewRender` hook callback.
2433
2091
  */
2434
-
2435
2092
  }, {
2436
2093
  key: "handsontableBeforeViewRender",
2437
2094
  value: function handsontableBeforeViewRender() {
@@ -2440,12 +2097,10 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2440
2097
  /**
2441
2098
  * Handsontable's `afterViewRender` hook callback.
2442
2099
  */
2443
-
2444
2100
  }, {
2445
2101
  key: "handsontableAfterViewRender",
2446
2102
  value: function handsontableAfterViewRender() {
2447
2103
  var _this3 = this;
2448
-
2449
2104
  this.portalManager.setState(function () {
2450
2105
  return Object.assign({}, {
2451
2106
  portals: _this3.portalCacheArray
@@ -2459,7 +2114,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2459
2114
  *
2460
2115
  * @param {Object} newSettings The settings object.
2461
2116
  */
2462
-
2463
2117
  }, {
2464
2118
  key: "updateHot",
2465
2119
  value: function updateHot(newSettings) {
@@ -2472,7 +2126,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2472
2126
  *
2473
2127
  * @param {React.ReactComponent} pmComponent The PortalManager component.
2474
2128
  */
2475
-
2476
2129
  }, {
2477
2130
  key: "setPortalManagerRef",
2478
2131
  value: function setPortalManagerRef(pmComponent) {
@@ -2483,11 +2136,9 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2483
2136
  ------- React lifecycle methods -------
2484
2137
  ---------------------------------------
2485
2138
  */
2486
-
2487
2139
  /**
2488
2140
  * Logic performed before the mounting of the component.
2489
2141
  */
2490
-
2491
2142
  }, {
2492
2143
  key: "componentWillMount",
2493
2144
  value: function componentWillMount() {
@@ -2497,7 +2148,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2497
2148
  /**
2498
2149
  * Initialize Handsontable after the component has mounted.
2499
2150
  */
2500
-
2501
2151
  }, {
2502
2152
  key: "componentDidMount",
2503
2153
  value: function componentDidMount() {
@@ -2509,15 +2159,14 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2509
2159
  });
2510
2160
  this.hotInstance.addHook('afterViewRender', function () {
2511
2161
  hotTableComponent.handsontableAfterViewRender();
2512
- }); // `init` missing in Handsontable's type definitions.
2513
-
2162
+ });
2163
+ // `init` missing in Handsontable's type definitions.
2514
2164
  this.hotInstance.init();
2515
2165
  this.displayAutoSizeWarning(newGlobalSettings);
2516
2166
  }
2517
2167
  /**
2518
2168
  * Logic performed before the component update.
2519
2169
  */
2520
-
2521
2170
  }, {
2522
2171
  key: "componentWillUpdate",
2523
2172
  value: function componentWillUpdate(nextProps, nextState, nextContext) {
@@ -2528,7 +2177,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2528
2177
  /**
2529
2178
  * Logic performed after the component update.
2530
2179
  */
2531
-
2532
2180
  }, {
2533
2181
  key: "componentDidUpdate",
2534
2182
  value: function componentDidUpdate() {
@@ -2539,40 +2187,34 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2539
2187
  /**
2540
2188
  * Destroy the Handsontable instance when the parent component unmounts.
2541
2189
  */
2542
-
2543
2190
  }, {
2544
2191
  key: "componentWillUnmount",
2545
2192
  value: function componentWillUnmount() {
2546
2193
  if (this.hotInstance) {
2547
2194
  this.hotInstance.destroy();
2548
2195
  }
2549
-
2550
2196
  removeEditorContainers(this.getOwnerDocument());
2551
2197
  }
2552
2198
  /**
2553
2199
  * Render the component.
2554
2200
  */
2555
-
2556
2201
  }, {
2557
2202
  key: "render",
2558
2203
  value: function render() {
2559
2204
  var _this4 = this;
2560
-
2561
2205
  var _getContainerAttribut = getContainerAttributesProps(this.props),
2562
- id = _getContainerAttribut.id,
2563
- className = _getContainerAttribut.className,
2564
- style = _getContainerAttribut.style;
2565
-
2206
+ id = _getContainerAttribut.id,
2207
+ className = _getContainerAttribut.className,
2208
+ style = _getContainerAttribut.style;
2566
2209
  var isHotColumn = function isHotColumn(childNode) {
2567
2210
  return childNode.type === HotColumn;
2568
2211
  };
2569
-
2570
- var children = React.Children.toArray(this.props.children); // filter out anything that's not a HotColumn
2571
-
2212
+ var children = React.Children.toArray(this.props.children);
2213
+ // filter out anything that's not a HotColumn
2572
2214
  children = children.filter(function (childNode) {
2573
2215
  return isHotColumn(childNode);
2574
- }); // clone the HotColumn nodes and extend them with the callbacks
2575
-
2216
+ });
2217
+ // clone the HotColumn nodes and extend them with the callbacks
2576
2218
  var childClones = children.map(function (childNode, columnIndex) {
2577
2219
  return React.cloneElement(childNode, {
2578
2220
  _componentRendererColumns: _this4.componentRendererColumns,
@@ -2585,8 +2227,8 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2585
2227
  _getEditorCache: _this4.getEditorCache.bind(_this4),
2586
2228
  children: childNode.props.children
2587
2229
  });
2588
- }); // add the global editor to the list of children
2589
-
2230
+ });
2231
+ // add the global editor to the list of children
2590
2232
  childClones.push(this.getGlobalEditorPortal());
2591
2233
  return React.createElement(React.Fragment, null, React.createElement("div", {
2592
2234
  ref: this.setHotElementRef.bind(this),
@@ -2603,14 +2245,11 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
2603
2245
  return version;
2604
2246
  }
2605
2247
  }]);
2606
-
2607
2248
  return HotTable;
2608
2249
  }(React.Component);
2609
2250
  /**
2610
2251
  * Prop types to be checked at runtime.
2611
2252
  */
2612
-
2613
-
2614
2253
  HotTable.propTypes = {
2615
2254
  style: PropTypes.object,
2616
2255
  id: PropTypes.string,
@@ -2619,14 +2258,10 @@ HotTable.propTypes = {
2619
2258
 
2620
2259
  var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
2621
2260
  _inherits(BaseEditorComponent, _React$Component);
2622
-
2623
2261
  var _super = _createSuper(BaseEditorComponent);
2624
-
2625
2262
  function BaseEditorComponent(props) {
2626
2263
  var _this;
2627
-
2628
2264
  _classCallCheck(this, BaseEditorComponent);
2629
-
2630
2265
  _this = _super.call(this, props);
2631
2266
  _this.name = 'BaseEditorComponent';
2632
2267
  _this.instance = null;
@@ -2640,189 +2275,154 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
2640
2275
  _this.hotInstance = null;
2641
2276
  _this.hotCustomEditorInstance = null;
2642
2277
  _this.hot = null;
2643
-
2644
2278
  if (props.emitEditorInstance) {
2645
2279
  props.emitEditorInstance(_assertThisInitialized(_this), props.editorColumnScope);
2646
2280
  }
2647
-
2648
2281
  return _this;
2649
- } // BaseEditor methods:
2650
-
2651
-
2282
+ }
2283
+ // BaseEditor methods:
2652
2284
  _createClass(BaseEditorComponent, [{
2653
2285
  key: "_fireCallbacks",
2654
2286
  value: function _fireCallbacks() {
2655
2287
  var _Handsontable$editors;
2656
-
2657
2288
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2658
2289
  args[_key] = arguments[_key];
2659
2290
  }
2660
-
2661
2291
  (_Handsontable$editors = Handsontable.editors.BaseEditor.prototype._fireCallbacks).call.apply(_Handsontable$editors, [this.hotCustomEditorInstance].concat(args));
2662
2292
  }
2663
2293
  }, {
2664
2294
  key: "beginEditing",
2665
2295
  value: function beginEditing() {
2666
2296
  var _Handsontable$editors2;
2667
-
2668
2297
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2669
2298
  args[_key2] = arguments[_key2];
2670
2299
  }
2671
-
2672
2300
  return (_Handsontable$editors2 = Handsontable.editors.BaseEditor.prototype.beginEditing).call.apply(_Handsontable$editors2, [this.hotCustomEditorInstance].concat(args));
2673
2301
  }
2674
2302
  }, {
2675
2303
  key: "cancelChanges",
2676
2304
  value: function cancelChanges() {
2677
2305
  var _Handsontable$editors3;
2678
-
2679
2306
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
2680
2307
  args[_key3] = arguments[_key3];
2681
2308
  }
2682
-
2683
2309
  return (_Handsontable$editors3 = Handsontable.editors.BaseEditor.prototype.cancelChanges).call.apply(_Handsontable$editors3, [this.hotCustomEditorInstance].concat(args));
2684
2310
  }
2685
2311
  }, {
2686
2312
  key: "checkEditorSection",
2687
2313
  value: function checkEditorSection() {
2688
2314
  var _Handsontable$editors4;
2689
-
2690
2315
  for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
2691
2316
  args[_key4] = arguments[_key4];
2692
2317
  }
2693
-
2694
2318
  return (_Handsontable$editors4 = Handsontable.editors.BaseEditor.prototype.checkEditorSection).call.apply(_Handsontable$editors4, [this.hotCustomEditorInstance].concat(args));
2695
2319
  }
2696
2320
  }, {
2697
2321
  key: "close",
2698
2322
  value: function close() {
2699
2323
  var _Handsontable$editors5;
2700
-
2701
2324
  for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
2702
2325
  args[_key5] = arguments[_key5];
2703
2326
  }
2704
-
2705
2327
  return (_Handsontable$editors5 = Handsontable.editors.BaseEditor.prototype.close).call.apply(_Handsontable$editors5, [this.hotCustomEditorInstance].concat(args));
2706
2328
  }
2707
2329
  }, {
2708
2330
  key: "discardEditor",
2709
2331
  value: function discardEditor() {
2710
2332
  var _Handsontable$editors6;
2711
-
2712
2333
  for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
2713
2334
  args[_key6] = arguments[_key6];
2714
2335
  }
2715
-
2716
2336
  return (_Handsontable$editors6 = Handsontable.editors.BaseEditor.prototype.discardEditor).call.apply(_Handsontable$editors6, [this.hotCustomEditorInstance].concat(args));
2717
2337
  }
2718
2338
  }, {
2719
2339
  key: "enableFullEditMode",
2720
2340
  value: function enableFullEditMode() {
2721
2341
  var _Handsontable$editors7;
2722
-
2723
2342
  for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
2724
2343
  args[_key7] = arguments[_key7];
2725
2344
  }
2726
-
2727
2345
  return (_Handsontable$editors7 = Handsontable.editors.BaseEditor.prototype.enableFullEditMode).call.apply(_Handsontable$editors7, [this.hotCustomEditorInstance].concat(args));
2728
2346
  }
2729
2347
  }, {
2730
2348
  key: "extend",
2731
2349
  value: function extend() {
2732
2350
  var _Handsontable$editors8;
2733
-
2734
2351
  for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
2735
2352
  args[_key8] = arguments[_key8];
2736
2353
  }
2737
-
2738
2354
  return (_Handsontable$editors8 = Handsontable.editors.BaseEditor.prototype.extend).call.apply(_Handsontable$editors8, [this.hotCustomEditorInstance].concat(args));
2739
2355
  }
2740
2356
  }, {
2741
2357
  key: "finishEditing",
2742
2358
  value: function finishEditing() {
2743
2359
  var _Handsontable$editors9;
2744
-
2745
2360
  for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
2746
2361
  args[_key9] = arguments[_key9];
2747
2362
  }
2748
-
2749
2363
  return (_Handsontable$editors9 = Handsontable.editors.BaseEditor.prototype.finishEditing).call.apply(_Handsontable$editors9, [this.hotCustomEditorInstance].concat(args));
2750
2364
  }
2751
2365
  }, {
2752
2366
  key: "focus",
2753
2367
  value: function focus() {
2754
2368
  var _Handsontable$editors10;
2755
-
2756
2369
  for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
2757
2370
  args[_key10] = arguments[_key10];
2758
2371
  }
2759
-
2760
2372
  return (_Handsontable$editors10 = Handsontable.editors.BaseEditor.prototype.focus).call.apply(_Handsontable$editors10, [this.hotCustomEditorInstance].concat(args));
2761
2373
  }
2762
2374
  }, {
2763
2375
  key: "getValue",
2764
2376
  value: function getValue() {
2765
2377
  var _Handsontable$editors11;
2766
-
2767
2378
  for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
2768
2379
  args[_key11] = arguments[_key11];
2769
2380
  }
2770
-
2771
2381
  return (_Handsontable$editors11 = Handsontable.editors.BaseEditor.prototype.getValue).call.apply(_Handsontable$editors11, [this.hotCustomEditorInstance].concat(args));
2772
2382
  }
2773
2383
  }, {
2774
2384
  key: "init",
2775
2385
  value: function init() {
2776
2386
  var _Handsontable$editors12;
2777
-
2778
2387
  for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
2779
2388
  args[_key12] = arguments[_key12];
2780
2389
  }
2781
-
2782
2390
  return (_Handsontable$editors12 = Handsontable.editors.BaseEditor.prototype.init).call.apply(_Handsontable$editors12, [this.hotCustomEditorInstance].concat(args));
2783
2391
  }
2784
2392
  }, {
2785
2393
  key: "isInFullEditMode",
2786
2394
  value: function isInFullEditMode() {
2787
2395
  var _Handsontable$editors13;
2788
-
2789
2396
  for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
2790
2397
  args[_key13] = arguments[_key13];
2791
2398
  }
2792
-
2793
2399
  return (_Handsontable$editors13 = Handsontable.editors.BaseEditor.prototype.isInFullEditMode).call.apply(_Handsontable$editors13, [this.hotCustomEditorInstance].concat(args));
2794
2400
  }
2795
2401
  }, {
2796
2402
  key: "isOpened",
2797
2403
  value: function isOpened() {
2798
2404
  var _Handsontable$editors14;
2799
-
2800
2405
  for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
2801
2406
  args[_key14] = arguments[_key14];
2802
2407
  }
2803
-
2804
2408
  return (_Handsontable$editors14 = Handsontable.editors.BaseEditor.prototype.isOpened).call.apply(_Handsontable$editors14, [this.hotCustomEditorInstance].concat(args));
2805
2409
  }
2806
2410
  }, {
2807
2411
  key: "isWaiting",
2808
2412
  value: function isWaiting() {
2809
2413
  var _Handsontable$editors15;
2810
-
2811
2414
  for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
2812
2415
  args[_key15] = arguments[_key15];
2813
2416
  }
2814
-
2815
2417
  return (_Handsontable$editors15 = Handsontable.editors.BaseEditor.prototype.isWaiting).call.apply(_Handsontable$editors15, [this.hotCustomEditorInstance].concat(args));
2816
2418
  }
2817
2419
  }, {
2818
2420
  key: "open",
2819
2421
  value: function open() {
2820
2422
  var _Handsontable$editors16;
2821
-
2822
2423
  for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
2823
2424
  args[_key16] = arguments[_key16];
2824
2425
  }
2825
-
2826
2426
  return (_Handsontable$editors16 = Handsontable.editors.BaseEditor.prototype.open).call.apply(_Handsontable$editors16, [this.hotCustomEditorInstance].concat(args));
2827
2427
  }
2828
2428
  }, {
@@ -2841,92 +2441,75 @@ var BaseEditorComponent = /*#__PURE__*/function (_React$Component) {
2841
2441
  key: "saveValue",
2842
2442
  value: function saveValue() {
2843
2443
  var _Handsontable$editors17;
2844
-
2845
2444
  for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {
2846
2445
  args[_key17] = arguments[_key17];
2847
2446
  }
2848
-
2849
2447
  return (_Handsontable$editors17 = Handsontable.editors.BaseEditor.prototype.saveValue).call.apply(_Handsontable$editors17, [this.hotCustomEditorInstance].concat(args));
2850
2448
  }
2851
2449
  }, {
2852
2450
  key: "setValue",
2853
2451
  value: function setValue() {
2854
2452
  var _Handsontable$editors18;
2855
-
2856
2453
  for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {
2857
2454
  args[_key18] = arguments[_key18];
2858
2455
  }
2859
-
2860
2456
  return (_Handsontable$editors18 = Handsontable.editors.BaseEditor.prototype.setValue).call.apply(_Handsontable$editors18, [this.hotCustomEditorInstance].concat(args));
2861
2457
  }
2862
2458
  }, {
2863
2459
  key: "addHook",
2864
2460
  value: function addHook() {
2865
2461
  var _Handsontable$editors19;
2866
-
2867
2462
  for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {
2868
2463
  args[_key19] = arguments[_key19];
2869
2464
  }
2870
-
2871
2465
  return (_Handsontable$editors19 = Handsontable.editors.BaseEditor.prototype.addHook).call.apply(_Handsontable$editors19, [this.hotCustomEditorInstance].concat(args));
2872
2466
  }
2873
2467
  }, {
2874
2468
  key: "removeHooksByKey",
2875
2469
  value: function removeHooksByKey() {
2876
2470
  var _Handsontable$editors20;
2877
-
2878
2471
  for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {
2879
2472
  args[_key20] = arguments[_key20];
2880
2473
  }
2881
-
2882
2474
  return (_Handsontable$editors20 = Handsontable.editors.BaseEditor.prototype.removeHooksByKey).call.apply(_Handsontable$editors20, [this.hotCustomEditorInstance].concat(args));
2883
2475
  }
2884
2476
  }, {
2885
2477
  key: "clearHooks",
2886
2478
  value: function clearHooks() {
2887
2479
  var _Handsontable$editors21;
2888
-
2889
2480
  for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {
2890
2481
  args[_key21] = arguments[_key21];
2891
2482
  }
2892
-
2893
2483
  return (_Handsontable$editors21 = Handsontable.editors.BaseEditor.prototype.clearHooks).call.apply(_Handsontable$editors21, [this.hotCustomEditorInstance].concat(args));
2894
2484
  }
2895
2485
  }, {
2896
2486
  key: "getEditedCell",
2897
2487
  value: function getEditedCell() {
2898
2488
  var _Handsontable$editors22;
2899
-
2900
2489
  for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {
2901
2490
  args[_key22] = arguments[_key22];
2902
2491
  }
2903
-
2904
2492
  return (_Handsontable$editors22 = Handsontable.editors.BaseEditor.prototype.getEditedCell).call.apply(_Handsontable$editors22, [this.hotCustomEditorInstance].concat(args));
2905
2493
  }
2906
2494
  }, {
2907
2495
  key: "getEditedCellRect",
2908
2496
  value: function getEditedCellRect() {
2909
2497
  var _Handsontable$editors23;
2910
-
2911
2498
  for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {
2912
2499
  args[_key23] = arguments[_key23];
2913
2500
  }
2914
-
2915
2501
  return (_Handsontable$editors23 = Handsontable.editors.BaseEditor.prototype.getEditedCellRect).call.apply(_Handsontable$editors23, [this.hotCustomEditorInstance].concat(args));
2916
2502
  }
2917
2503
  }, {
2918
2504
  key: "getEditedCellsZIndex",
2919
2505
  value: function getEditedCellsZIndex() {
2920
2506
  var _Handsontable$editors24;
2921
-
2922
2507
  for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {
2923
2508
  args[_key24] = arguments[_key24];
2924
2509
  }
2925
-
2926
2510
  return (_Handsontable$editors24 = Handsontable.editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(_Handsontable$editors24, [this.hotCustomEditorInstance].concat(args));
2927
2511
  }
2928
2512
  }]);
2929
-
2930
2513
  return BaseEditorComponent;
2931
2514
  }(React.Component);
2932
2515