@bigbinary/neeto-molecules 3.2.1 → 3.2.3

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.
Files changed (61) hide show
  1. package/dist/BrowserSupport.js +2 -1
  2. package/dist/BrowserSupport.js.map +1 -1
  3. package/dist/DownloadMobileAppCallout.js +2 -1
  4. package/dist/DownloadMobileAppCallout.js.map +1 -1
  5. package/dist/EmailForm.js +2 -1
  6. package/dist/EmailForm.js.map +1 -1
  7. package/dist/FloatingActionMenu.js +2 -1
  8. package/dist/FloatingActionMenu.js.map +1 -1
  9. package/dist/IconPicker.js +916 -4
  10. package/dist/IconPicker.js.map +1 -1
  11. package/dist/IpRestriction.js +3093 -7
  12. package/dist/IpRestriction.js.map +1 -1
  13. package/dist/KeyboardShortcuts.js +2 -1
  14. package/dist/KeyboardShortcuts.js.map +1 -1
  15. package/dist/MenuBar.js +1804 -12
  16. package/dist/MenuBar.js.map +1 -1
  17. package/dist/NeetoWidget.js +1957 -3
  18. package/dist/NeetoWidget.js.map +1 -1
  19. package/dist/PhoneNumber.js +12 -4
  20. package/dist/PhoneNumber.js.map +1 -1
  21. package/dist/SendToFields.js +1919 -1
  22. package/dist/SendToFields.js.map +1 -1
  23. package/dist/ShareViaEmail.js +2 -1
  24. package/dist/ShareViaEmail.js.map +1 -1
  25. package/dist/ShareViaLink.js +860 -2
  26. package/dist/ShareViaLink.js.map +1 -1
  27. package/dist/_commonjsHelpers-1c8beb5f.js +4 -0
  28. package/dist/_commonjsHelpers-1c8beb5f.js.map +1 -0
  29. package/dist/cjs/BrowserSupport.js +3 -3
  30. package/dist/cjs/BrowserSupport.js.map +1 -1
  31. package/dist/cjs/DownloadMobileAppCallout.js +3 -3
  32. package/dist/cjs/DownloadMobileAppCallout.js.map +1 -1
  33. package/dist/cjs/EmailForm.js +2 -1
  34. package/dist/cjs/EmailForm.js.map +1 -1
  35. package/dist/cjs/FloatingActionMenu.js +2 -1
  36. package/dist/cjs/FloatingActionMenu.js.map +1 -1
  37. package/dist/cjs/IconPicker.js +920 -5
  38. package/dist/cjs/IconPicker.js.map +1 -1
  39. package/dist/cjs/IpRestriction.js +3101 -15
  40. package/dist/cjs/IpRestriction.js.map +1 -1
  41. package/dist/cjs/KeyboardShortcuts.js +3 -3
  42. package/dist/cjs/KeyboardShortcuts.js.map +1 -1
  43. package/dist/cjs/MenuBar.js +1807 -10
  44. package/dist/cjs/MenuBar.js.map +1 -1
  45. package/dist/cjs/NeetoWidget.js +1958 -5
  46. package/dist/cjs/NeetoWidget.js.map +1 -1
  47. package/dist/cjs/PhoneNumber.js +12 -4
  48. package/dist/cjs/PhoneNumber.js.map +1 -1
  49. package/dist/cjs/SendToFields.js +1921 -3
  50. package/dist/cjs/SendToFields.js.map +1 -1
  51. package/dist/cjs/ShareViaEmail.js +2 -1
  52. package/dist/cjs/ShareViaEmail.js.map +1 -1
  53. package/dist/cjs/ShareViaLink.js +860 -3
  54. package/dist/cjs/ShareViaLink.js.map +1 -1
  55. package/dist/cjs/_commonjsHelpers-68cdf74f.js +6 -0
  56. package/dist/cjs/_commonjsHelpers-68cdf74f.js.map +1 -0
  57. package/dist/cjs/platform-628b3bd8.js +1252 -0
  58. package/dist/cjs/platform-628b3bd8.js.map +1 -0
  59. package/dist/platform-e221afea.js +1250 -0
  60. package/dist/platform-e221afea.js.map +1 -0
  61. package/package.json +16 -17
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var _extends = require('@babel/runtime/helpers/extends');
3
+ var _extends$1 = require('@babel/runtime/helpers/extends');
4
4
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
5
5
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
6
6
  var React = require('react');
@@ -14,13 +14,16 @@ var Input = require('@bigbinary/neetoui/Input');
14
14
  var Button = require('@bigbinary/neetoui/Button');
15
15
  var Typography = require('@bigbinary/neetoui/Typography');
16
16
  var reactI18next = require('react-i18next');
17
- var reactWindow = require('react-window');
17
+ var _extends = require('@babel/runtime/helpers/esm/extends');
18
+ var _assertThisInitialized = require('@babel/runtime/helpers/esm/assertThisInitialized');
19
+ var _inheritsLoose = require('@babel/runtime/helpers/esm/inheritsLoose');
20
+ require('@babel/runtime/helpers/esm/objectWithoutPropertiesLoose');
18
21
  var Tooltip = require('@bigbinary/neetoui/Tooltip');
19
22
  var injectCss = require('./inject-css-80a5faa3.js');
20
23
 
21
24
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
22
25
 
23
- var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
26
+ var _extends__default$1 = /*#__PURE__*/_interopDefaultLegacy(_extends$1);
24
27
  var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
25
28
  var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
26
29
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
@@ -32,8 +35,920 @@ var Label__default = /*#__PURE__*/_interopDefaultLegacy(Label);
32
35
  var Input__default = /*#__PURE__*/_interopDefaultLegacy(Input);
33
36
  var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
34
37
  var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
38
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
39
+ var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized);
40
+ var _inheritsLoose__default = /*#__PURE__*/_interopDefaultLegacy(_inheritsLoose);
35
41
  var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
36
42
 
43
+ var safeIsNaN = Number.isNaN ||
44
+ function ponyfill(value) {
45
+ return typeof value === 'number' && value !== value;
46
+ };
47
+ function isEqual(first, second) {
48
+ if (first === second) {
49
+ return true;
50
+ }
51
+ if (safeIsNaN(first) && safeIsNaN(second)) {
52
+ return true;
53
+ }
54
+ return false;
55
+ }
56
+ function areInputsEqual(newInputs, lastInputs) {
57
+ if (newInputs.length !== lastInputs.length) {
58
+ return false;
59
+ }
60
+ for (var i = 0; i < newInputs.length; i++) {
61
+ if (!isEqual(newInputs[i], lastInputs[i])) {
62
+ return false;
63
+ }
64
+ }
65
+ return true;
66
+ }
67
+
68
+ function memoizeOne(resultFn, isEqual) {
69
+ if (isEqual === void 0) { isEqual = areInputsEqual; }
70
+ var lastThis;
71
+ var lastArgs = [];
72
+ var lastResult;
73
+ var calledOnce = false;
74
+ function memoized() {
75
+ var newArgs = [];
76
+ for (var _i = 0; _i < arguments.length; _i++) {
77
+ newArgs[_i] = arguments[_i];
78
+ }
79
+ if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
80
+ return lastResult;
81
+ }
82
+ lastResult = resultFn.apply(this, newArgs);
83
+ calledOnce = true;
84
+ lastThis = this;
85
+ lastArgs = newArgs;
86
+ return lastResult;
87
+ }
88
+ return memoized;
89
+ }
90
+
91
+ // Animation frame based implementation of setTimeout.
92
+ // Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js
93
+ var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
94
+ var now = hasNativePerformanceNow ? function () {
95
+ return performance.now();
96
+ } : function () {
97
+ return Date.now();
98
+ };
99
+ function cancelTimeout(timeoutID) {
100
+ cancelAnimationFrame(timeoutID.id);
101
+ }
102
+ function requestTimeout(callback, delay) {
103
+ var start = now();
104
+
105
+ function tick() {
106
+ if (now() - start >= delay) {
107
+ callback.call(null);
108
+ } else {
109
+ timeoutID.id = requestAnimationFrame(tick);
110
+ }
111
+ }
112
+
113
+ var timeoutID = {
114
+ id: requestAnimationFrame(tick)
115
+ };
116
+ return timeoutID;
117
+ }
118
+
119
+ var size = -1; // This utility copied from "dom-helpers" package.
120
+
121
+ function getScrollbarSize(recalculate) {
122
+ if (recalculate === void 0) {
123
+ recalculate = false;
124
+ }
125
+
126
+ if (size === -1 || recalculate) {
127
+ var div = document.createElement('div');
128
+ var style = div.style;
129
+ style.width = '50px';
130
+ style.height = '50px';
131
+ style.overflow = 'scroll';
132
+ document.body.appendChild(div);
133
+ size = div.offsetWidth - div.clientWidth;
134
+ document.body.removeChild(div);
135
+ }
136
+
137
+ return size;
138
+ }
139
+ var cachedRTLResult = null; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.
140
+ // Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).
141
+ // Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.
142
+ // The safest way to check this is to intentionally set a negative offset,
143
+ // and then verify that the subsequent "scroll" event matches the negative offset.
144
+ // If it does not match, then we can assume a non-standard RTL scroll implementation.
145
+
146
+ function getRTLOffsetType(recalculate) {
147
+ if (recalculate === void 0) {
148
+ recalculate = false;
149
+ }
150
+
151
+ if (cachedRTLResult === null || recalculate) {
152
+ var outerDiv = document.createElement('div');
153
+ var outerStyle = outerDiv.style;
154
+ outerStyle.width = '50px';
155
+ outerStyle.height = '50px';
156
+ outerStyle.overflow = 'scroll';
157
+ outerStyle.direction = 'rtl';
158
+ var innerDiv = document.createElement('div');
159
+ var innerStyle = innerDiv.style;
160
+ innerStyle.width = '100px';
161
+ innerStyle.height = '100px';
162
+ outerDiv.appendChild(innerDiv);
163
+ document.body.appendChild(outerDiv);
164
+
165
+ if (outerDiv.scrollLeft > 0) {
166
+ cachedRTLResult = 'positive-descending';
167
+ } else {
168
+ outerDiv.scrollLeft = 1;
169
+
170
+ if (outerDiv.scrollLeft === 0) {
171
+ cachedRTLResult = 'negative';
172
+ } else {
173
+ cachedRTLResult = 'positive-ascending';
174
+ }
175
+ }
176
+
177
+ document.body.removeChild(outerDiv);
178
+ return cachedRTLResult;
179
+ }
180
+
181
+ return cachedRTLResult;
182
+ }
183
+
184
+ var IS_SCROLLING_DEBOUNCE_INTERVAL = 150;
185
+
186
+ var defaultItemKey = function defaultItemKey(_ref) {
187
+ var columnIndex = _ref.columnIndex;
188
+ _ref.data;
189
+ var rowIndex = _ref.rowIndex;
190
+ return rowIndex + ":" + columnIndex;
191
+ }; // In DEV mode, this Set helps us only log a warning once per component instance.
192
+ // This avoids spamming the console every time a render happens.
193
+
194
+
195
+ var devWarningsOverscanCount = null;
196
+ var devWarningsOverscanRowsColumnsCount = null;
197
+ var devWarningsTagName = null;
198
+
199
+ if (process.env.NODE_ENV !== 'production') {
200
+ if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {
201
+ devWarningsOverscanCount = /*#__PURE__*/new WeakSet();
202
+ devWarningsOverscanRowsColumnsCount = /*#__PURE__*/new WeakSet();
203
+ devWarningsTagName = /*#__PURE__*/new WeakSet();
204
+ }
205
+ }
206
+
207
+ function createGridComponent(_ref2) {
208
+ var _class;
209
+
210
+ var getColumnOffset = _ref2.getColumnOffset,
211
+ getColumnStartIndexForOffset = _ref2.getColumnStartIndexForOffset,
212
+ getColumnStopIndexForStartIndex = _ref2.getColumnStopIndexForStartIndex,
213
+ getColumnWidth = _ref2.getColumnWidth,
214
+ getEstimatedTotalHeight = _ref2.getEstimatedTotalHeight,
215
+ getEstimatedTotalWidth = _ref2.getEstimatedTotalWidth,
216
+ getOffsetForColumnAndAlignment = _ref2.getOffsetForColumnAndAlignment,
217
+ getOffsetForRowAndAlignment = _ref2.getOffsetForRowAndAlignment,
218
+ getRowHeight = _ref2.getRowHeight,
219
+ getRowOffset = _ref2.getRowOffset,
220
+ getRowStartIndexForOffset = _ref2.getRowStartIndexForOffset,
221
+ getRowStopIndexForStartIndex = _ref2.getRowStopIndexForStartIndex,
222
+ initInstanceProps = _ref2.initInstanceProps,
223
+ shouldResetStyleCacheOnItemSizeChange = _ref2.shouldResetStyleCacheOnItemSizeChange,
224
+ validateProps = _ref2.validateProps;
225
+ return _class = /*#__PURE__*/function (_PureComponent) {
226
+ _inheritsLoose__default["default"](Grid, _PureComponent);
227
+
228
+ // Always use explicit constructor for React components.
229
+ // It produces less code after transpilation. (#26)
230
+ // eslint-disable-next-line no-useless-constructor
231
+ function Grid(props) {
232
+ var _this;
233
+
234
+ _this = _PureComponent.call(this, props) || this;
235
+ _this._instanceProps = initInstanceProps(_this.props, _assertThisInitialized__default["default"](_this));
236
+ _this._resetIsScrollingTimeoutId = null;
237
+ _this._outerRef = void 0;
238
+ _this.state = {
239
+ instance: _assertThisInitialized__default["default"](_this),
240
+ isScrolling: false,
241
+ horizontalScrollDirection: 'forward',
242
+ scrollLeft: typeof _this.props.initialScrollLeft === 'number' ? _this.props.initialScrollLeft : 0,
243
+ scrollTop: typeof _this.props.initialScrollTop === 'number' ? _this.props.initialScrollTop : 0,
244
+ scrollUpdateWasRequested: false,
245
+ verticalScrollDirection: 'forward'
246
+ };
247
+ _this._callOnItemsRendered = void 0;
248
+ _this._callOnItemsRendered = memoizeOne(function (overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex) {
249
+ return _this.props.onItemsRendered({
250
+ overscanColumnStartIndex: overscanColumnStartIndex,
251
+ overscanColumnStopIndex: overscanColumnStopIndex,
252
+ overscanRowStartIndex: overscanRowStartIndex,
253
+ overscanRowStopIndex: overscanRowStopIndex,
254
+ visibleColumnStartIndex: visibleColumnStartIndex,
255
+ visibleColumnStopIndex: visibleColumnStopIndex,
256
+ visibleRowStartIndex: visibleRowStartIndex,
257
+ visibleRowStopIndex: visibleRowStopIndex
258
+ });
259
+ });
260
+ _this._callOnScroll = void 0;
261
+ _this._callOnScroll = memoizeOne(function (scrollLeft, scrollTop, horizontalScrollDirection, verticalScrollDirection, scrollUpdateWasRequested) {
262
+ return _this.props.onScroll({
263
+ horizontalScrollDirection: horizontalScrollDirection,
264
+ scrollLeft: scrollLeft,
265
+ scrollTop: scrollTop,
266
+ verticalScrollDirection: verticalScrollDirection,
267
+ scrollUpdateWasRequested: scrollUpdateWasRequested
268
+ });
269
+ });
270
+ _this._getItemStyle = void 0;
271
+
272
+ _this._getItemStyle = function (rowIndex, columnIndex) {
273
+ var _this$props = _this.props,
274
+ columnWidth = _this$props.columnWidth,
275
+ direction = _this$props.direction,
276
+ rowHeight = _this$props.rowHeight;
277
+
278
+ var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && columnWidth, shouldResetStyleCacheOnItemSizeChange && direction, shouldResetStyleCacheOnItemSizeChange && rowHeight);
279
+
280
+ var key = rowIndex + ":" + columnIndex;
281
+ var style;
282
+
283
+ if (itemStyleCache.hasOwnProperty(key)) {
284
+ style = itemStyleCache[key];
285
+ } else {
286
+ var _offset = getColumnOffset(_this.props, columnIndex, _this._instanceProps);
287
+
288
+ var isRtl = direction === 'rtl';
289
+ itemStyleCache[key] = style = {
290
+ position: 'absolute',
291
+ left: isRtl ? undefined : _offset,
292
+ right: isRtl ? _offset : undefined,
293
+ top: getRowOffset(_this.props, rowIndex, _this._instanceProps),
294
+ height: getRowHeight(_this.props, rowIndex, _this._instanceProps),
295
+ width: getColumnWidth(_this.props, columnIndex, _this._instanceProps)
296
+ };
297
+ }
298
+
299
+ return style;
300
+ };
301
+
302
+ _this._getItemStyleCache = void 0;
303
+ _this._getItemStyleCache = memoizeOne(function (_, __, ___) {
304
+ return {};
305
+ });
306
+
307
+ _this._onScroll = function (event) {
308
+ var _event$currentTarget = event.currentTarget,
309
+ clientHeight = _event$currentTarget.clientHeight,
310
+ clientWidth = _event$currentTarget.clientWidth,
311
+ scrollLeft = _event$currentTarget.scrollLeft,
312
+ scrollTop = _event$currentTarget.scrollTop,
313
+ scrollHeight = _event$currentTarget.scrollHeight,
314
+ scrollWidth = _event$currentTarget.scrollWidth;
315
+
316
+ _this.setState(function (prevState) {
317
+ if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {
318
+ // Scroll position may have been updated by cDM/cDU,
319
+ // In which case we don't need to trigger another render,
320
+ // And we don't want to update state.isScrolling.
321
+ return null;
322
+ }
323
+
324
+ var direction = _this.props.direction; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.
325
+ // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).
326
+ // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.
327
+ // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.
328
+
329
+ var calculatedScrollLeft = scrollLeft;
330
+
331
+ if (direction === 'rtl') {
332
+ switch (getRTLOffsetType()) {
333
+ case 'negative':
334
+ calculatedScrollLeft = -scrollLeft;
335
+ break;
336
+
337
+ case 'positive-descending':
338
+ calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;
339
+ break;
340
+ }
341
+ } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.
342
+
343
+
344
+ calculatedScrollLeft = Math.max(0, Math.min(calculatedScrollLeft, scrollWidth - clientWidth));
345
+ var calculatedScrollTop = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
346
+ return {
347
+ isScrolling: true,
348
+ horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',
349
+ scrollLeft: calculatedScrollLeft,
350
+ scrollTop: calculatedScrollTop,
351
+ verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward',
352
+ scrollUpdateWasRequested: false
353
+ };
354
+ }, _this._resetIsScrollingDebounced);
355
+ };
356
+
357
+ _this._outerRefSetter = function (ref) {
358
+ var outerRef = _this.props.outerRef;
359
+ _this._outerRef = ref;
360
+
361
+ if (typeof outerRef === 'function') {
362
+ outerRef(ref);
363
+ } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {
364
+ outerRef.current = ref;
365
+ }
366
+ };
367
+
368
+ _this._resetIsScrollingDebounced = function () {
369
+ if (_this._resetIsScrollingTimeoutId !== null) {
370
+ cancelTimeout(_this._resetIsScrollingTimeoutId);
371
+ }
372
+
373
+ _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);
374
+ };
375
+
376
+ _this._resetIsScrolling = function () {
377
+ _this._resetIsScrollingTimeoutId = null;
378
+
379
+ _this.setState({
380
+ isScrolling: false
381
+ }, function () {
382
+ // Clear style cache after state update has been committed.
383
+ // This way we don't break pure sCU for items that don't use isScrolling param.
384
+ _this._getItemStyleCache(-1);
385
+ });
386
+ };
387
+
388
+ return _this;
389
+ }
390
+
391
+ Grid.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
392
+ validateSharedProps(nextProps, prevState);
393
+ validateProps(nextProps);
394
+ return null;
395
+ };
396
+
397
+ var _proto = Grid.prototype;
398
+
399
+ _proto.scrollTo = function scrollTo(_ref3) {
400
+ var scrollLeft = _ref3.scrollLeft,
401
+ scrollTop = _ref3.scrollTop;
402
+
403
+ if (scrollLeft !== undefined) {
404
+ scrollLeft = Math.max(0, scrollLeft);
405
+ }
406
+
407
+ if (scrollTop !== undefined) {
408
+ scrollTop = Math.max(0, scrollTop);
409
+ }
410
+
411
+ this.setState(function (prevState) {
412
+ if (scrollLeft === undefined) {
413
+ scrollLeft = prevState.scrollLeft;
414
+ }
415
+
416
+ if (scrollTop === undefined) {
417
+ scrollTop = prevState.scrollTop;
418
+ }
419
+
420
+ if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {
421
+ return null;
422
+ }
423
+
424
+ return {
425
+ horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',
426
+ scrollLeft: scrollLeft,
427
+ scrollTop: scrollTop,
428
+ scrollUpdateWasRequested: true,
429
+ verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward'
430
+ };
431
+ }, this._resetIsScrollingDebounced);
432
+ };
433
+
434
+ _proto.scrollToItem = function scrollToItem(_ref4) {
435
+ var _ref4$align = _ref4.align,
436
+ align = _ref4$align === void 0 ? 'auto' : _ref4$align,
437
+ columnIndex = _ref4.columnIndex,
438
+ rowIndex = _ref4.rowIndex;
439
+ var _this$props2 = this.props,
440
+ columnCount = _this$props2.columnCount,
441
+ height = _this$props2.height,
442
+ rowCount = _this$props2.rowCount,
443
+ width = _this$props2.width;
444
+ var _this$state = this.state,
445
+ scrollLeft = _this$state.scrollLeft,
446
+ scrollTop = _this$state.scrollTop;
447
+ var scrollbarSize = getScrollbarSize();
448
+
449
+ if (columnIndex !== undefined) {
450
+ columnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));
451
+ }
452
+
453
+ if (rowIndex !== undefined) {
454
+ rowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));
455
+ }
456
+
457
+ var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);
458
+ var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps); // The scrollbar size should be considered when scrolling an item into view,
459
+ // to ensure it's fully visible.
460
+ // But we only need to account for its size when it's actually visible.
461
+
462
+ var horizontalScrollbarSize = estimatedTotalWidth > width ? scrollbarSize : 0;
463
+ var verticalScrollbarSize = estimatedTotalHeight > height ? scrollbarSize : 0;
464
+ this.scrollTo({
465
+ scrollLeft: columnIndex !== undefined ? getOffsetForColumnAndAlignment(this.props, columnIndex, align, scrollLeft, this._instanceProps, verticalScrollbarSize) : scrollLeft,
466
+ scrollTop: rowIndex !== undefined ? getOffsetForRowAndAlignment(this.props, rowIndex, align, scrollTop, this._instanceProps, horizontalScrollbarSize) : scrollTop
467
+ });
468
+ };
469
+
470
+ _proto.componentDidMount = function componentDidMount() {
471
+ var _this$props3 = this.props,
472
+ initialScrollLeft = _this$props3.initialScrollLeft,
473
+ initialScrollTop = _this$props3.initialScrollTop;
474
+
475
+ if (this._outerRef != null) {
476
+ var outerRef = this._outerRef;
477
+
478
+ if (typeof initialScrollLeft === 'number') {
479
+ outerRef.scrollLeft = initialScrollLeft;
480
+ }
481
+
482
+ if (typeof initialScrollTop === 'number') {
483
+ outerRef.scrollTop = initialScrollTop;
484
+ }
485
+ }
486
+
487
+ this._callPropsCallbacks();
488
+ };
489
+
490
+ _proto.componentDidUpdate = function componentDidUpdate() {
491
+ var direction = this.props.direction;
492
+ var _this$state2 = this.state,
493
+ scrollLeft = _this$state2.scrollLeft,
494
+ scrollTop = _this$state2.scrollTop,
495
+ scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;
496
+
497
+ if (scrollUpdateWasRequested && this._outerRef != null) {
498
+ // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.
499
+ // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).
500
+ // So we need to determine which browser behavior we're dealing with, and mimic it.
501
+ var outerRef = this._outerRef;
502
+
503
+ if (direction === 'rtl') {
504
+ switch (getRTLOffsetType()) {
505
+ case 'negative':
506
+ outerRef.scrollLeft = -scrollLeft;
507
+ break;
508
+
509
+ case 'positive-ascending':
510
+ outerRef.scrollLeft = scrollLeft;
511
+ break;
512
+
513
+ default:
514
+ var clientWidth = outerRef.clientWidth,
515
+ scrollWidth = outerRef.scrollWidth;
516
+ outerRef.scrollLeft = scrollWidth - clientWidth - scrollLeft;
517
+ break;
518
+ }
519
+ } else {
520
+ outerRef.scrollLeft = Math.max(0, scrollLeft);
521
+ }
522
+
523
+ outerRef.scrollTop = Math.max(0, scrollTop);
524
+ }
525
+
526
+ this._callPropsCallbacks();
527
+ };
528
+
529
+ _proto.componentWillUnmount = function componentWillUnmount() {
530
+ if (this._resetIsScrollingTimeoutId !== null) {
531
+ cancelTimeout(this._resetIsScrollingTimeoutId);
532
+ }
533
+ };
534
+
535
+ _proto.render = function render() {
536
+ var _this$props4 = this.props,
537
+ children = _this$props4.children,
538
+ className = _this$props4.className,
539
+ columnCount = _this$props4.columnCount,
540
+ direction = _this$props4.direction,
541
+ height = _this$props4.height,
542
+ innerRef = _this$props4.innerRef,
543
+ innerElementType = _this$props4.innerElementType,
544
+ innerTagName = _this$props4.innerTagName,
545
+ itemData = _this$props4.itemData,
546
+ _this$props4$itemKey = _this$props4.itemKey,
547
+ itemKey = _this$props4$itemKey === void 0 ? defaultItemKey : _this$props4$itemKey,
548
+ outerElementType = _this$props4.outerElementType,
549
+ outerTagName = _this$props4.outerTagName,
550
+ rowCount = _this$props4.rowCount,
551
+ style = _this$props4.style,
552
+ useIsScrolling = _this$props4.useIsScrolling,
553
+ width = _this$props4.width;
554
+ var isScrolling = this.state.isScrolling;
555
+
556
+ var _this$_getHorizontalR = this._getHorizontalRangeToRender(),
557
+ columnStartIndex = _this$_getHorizontalR[0],
558
+ columnStopIndex = _this$_getHorizontalR[1];
559
+
560
+ var _this$_getVerticalRan = this._getVerticalRangeToRender(),
561
+ rowStartIndex = _this$_getVerticalRan[0],
562
+ rowStopIndex = _this$_getVerticalRan[1];
563
+
564
+ var items = [];
565
+
566
+ if (columnCount > 0 && rowCount) {
567
+ for (var _rowIndex = rowStartIndex; _rowIndex <= rowStopIndex; _rowIndex++) {
568
+ for (var _columnIndex = columnStartIndex; _columnIndex <= columnStopIndex; _columnIndex++) {
569
+ items.push(React.createElement(children, {
570
+ columnIndex: _columnIndex,
571
+ data: itemData,
572
+ isScrolling: useIsScrolling ? isScrolling : undefined,
573
+ key: itemKey({
574
+ columnIndex: _columnIndex,
575
+ data: itemData,
576
+ rowIndex: _rowIndex
577
+ }),
578
+ rowIndex: _rowIndex,
579
+ style: this._getItemStyle(_rowIndex, _columnIndex)
580
+ }));
581
+ }
582
+ }
583
+ } // Read this value AFTER items have been created,
584
+ // So their actual sizes (if variable) are taken into consideration.
585
+
586
+
587
+ var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);
588
+ var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);
589
+ return React.createElement(outerElementType || outerTagName || 'div', {
590
+ className: className,
591
+ onScroll: this._onScroll,
592
+ ref: this._outerRefSetter,
593
+ style: _extends__default["default"]({
594
+ position: 'relative',
595
+ height: height,
596
+ width: width,
597
+ overflow: 'auto',
598
+ WebkitOverflowScrolling: 'touch',
599
+ willChange: 'transform',
600
+ direction: direction
601
+ }, style)
602
+ }, React.createElement(innerElementType || innerTagName || 'div', {
603
+ children: items,
604
+ ref: innerRef,
605
+ style: {
606
+ height: estimatedTotalHeight,
607
+ pointerEvents: isScrolling ? 'none' : undefined,
608
+ width: estimatedTotalWidth
609
+ }
610
+ }));
611
+ };
612
+
613
+ _proto._callPropsCallbacks = function _callPropsCallbacks() {
614
+ var _this$props5 = this.props,
615
+ columnCount = _this$props5.columnCount,
616
+ onItemsRendered = _this$props5.onItemsRendered,
617
+ onScroll = _this$props5.onScroll,
618
+ rowCount = _this$props5.rowCount;
619
+
620
+ if (typeof onItemsRendered === 'function') {
621
+ if (columnCount > 0 && rowCount > 0) {
622
+ var _this$_getHorizontalR2 = this._getHorizontalRangeToRender(),
623
+ _overscanColumnStartIndex = _this$_getHorizontalR2[0],
624
+ _overscanColumnStopIndex = _this$_getHorizontalR2[1],
625
+ _visibleColumnStartIndex = _this$_getHorizontalR2[2],
626
+ _visibleColumnStopIndex = _this$_getHorizontalR2[3];
627
+
628
+ var _this$_getVerticalRan2 = this._getVerticalRangeToRender(),
629
+ _overscanRowStartIndex = _this$_getVerticalRan2[0],
630
+ _overscanRowStopIndex = _this$_getVerticalRan2[1],
631
+ _visibleRowStartIndex = _this$_getVerticalRan2[2],
632
+ _visibleRowStopIndex = _this$_getVerticalRan2[3];
633
+
634
+ this._callOnItemsRendered(_overscanColumnStartIndex, _overscanColumnStopIndex, _overscanRowStartIndex, _overscanRowStopIndex, _visibleColumnStartIndex, _visibleColumnStopIndex, _visibleRowStartIndex, _visibleRowStopIndex);
635
+ }
636
+ }
637
+
638
+ if (typeof onScroll === 'function') {
639
+ var _this$state3 = this.state,
640
+ _horizontalScrollDirection = _this$state3.horizontalScrollDirection,
641
+ _scrollLeft = _this$state3.scrollLeft,
642
+ _scrollTop = _this$state3.scrollTop,
643
+ _scrollUpdateWasRequested = _this$state3.scrollUpdateWasRequested,
644
+ _verticalScrollDirection = _this$state3.verticalScrollDirection;
645
+
646
+ this._callOnScroll(_scrollLeft, _scrollTop, _horizontalScrollDirection, _verticalScrollDirection, _scrollUpdateWasRequested);
647
+ }
648
+ } // Lazily create and cache item styles while scrolling,
649
+ // So that pure component sCU will prevent re-renders.
650
+ // We maintain this cache, and pass a style prop rather than index,
651
+ // So that List can clear cached styles and force item re-render if necessary.
652
+ ;
653
+
654
+ _proto._getHorizontalRangeToRender = function _getHorizontalRangeToRender() {
655
+ var _this$props6 = this.props,
656
+ columnCount = _this$props6.columnCount,
657
+ overscanColumnCount = _this$props6.overscanColumnCount,
658
+ overscanColumnsCount = _this$props6.overscanColumnsCount,
659
+ overscanCount = _this$props6.overscanCount,
660
+ rowCount = _this$props6.rowCount;
661
+ var _this$state4 = this.state,
662
+ horizontalScrollDirection = _this$state4.horizontalScrollDirection,
663
+ isScrolling = _this$state4.isScrolling,
664
+ scrollLeft = _this$state4.scrollLeft;
665
+ var overscanCountResolved = overscanColumnCount || overscanColumnsCount || overscanCount || 1;
666
+
667
+ if (columnCount === 0 || rowCount === 0) {
668
+ return [0, 0, 0, 0];
669
+ }
670
+
671
+ var startIndex = getColumnStartIndexForOffset(this.props, scrollLeft, this._instanceProps);
672
+ var stopIndex = getColumnStopIndexForStartIndex(this.props, startIndex, scrollLeft, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.
673
+ // If there isn't at least one extra item, tab loops back around.
674
+
675
+ var overscanBackward = !isScrolling || horizontalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;
676
+ var overscanForward = !isScrolling || horizontalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;
677
+ return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
678
+ };
679
+
680
+ _proto._getVerticalRangeToRender = function _getVerticalRangeToRender() {
681
+ var _this$props7 = this.props,
682
+ columnCount = _this$props7.columnCount,
683
+ overscanCount = _this$props7.overscanCount,
684
+ overscanRowCount = _this$props7.overscanRowCount,
685
+ overscanRowsCount = _this$props7.overscanRowsCount,
686
+ rowCount = _this$props7.rowCount;
687
+ var _this$state5 = this.state,
688
+ isScrolling = _this$state5.isScrolling,
689
+ verticalScrollDirection = _this$state5.verticalScrollDirection,
690
+ scrollTop = _this$state5.scrollTop;
691
+ var overscanCountResolved = overscanRowCount || overscanRowsCount || overscanCount || 1;
692
+
693
+ if (columnCount === 0 || rowCount === 0) {
694
+ return [0, 0, 0, 0];
695
+ }
696
+
697
+ var startIndex = getRowStartIndexForOffset(this.props, scrollTop, this._instanceProps);
698
+ var stopIndex = getRowStopIndexForStartIndex(this.props, startIndex, scrollTop, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.
699
+ // If there isn't at least one extra item, tab loops back around.
700
+
701
+ var overscanBackward = !isScrolling || verticalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;
702
+ var overscanForward = !isScrolling || verticalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;
703
+ return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
704
+ };
705
+
706
+ return Grid;
707
+ }(React.PureComponent), _class.defaultProps = {
708
+ direction: 'ltr',
709
+ itemData: undefined,
710
+ useIsScrolling: false
711
+ }, _class;
712
+ }
713
+
714
+ var validateSharedProps = function validateSharedProps(_ref5, _ref6) {
715
+ var children = _ref5.children,
716
+ direction = _ref5.direction,
717
+ height = _ref5.height,
718
+ innerTagName = _ref5.innerTagName,
719
+ outerTagName = _ref5.outerTagName,
720
+ overscanColumnsCount = _ref5.overscanColumnsCount,
721
+ overscanCount = _ref5.overscanCount,
722
+ overscanRowsCount = _ref5.overscanRowsCount,
723
+ width = _ref5.width;
724
+ var instance = _ref6.instance;
725
+
726
+ if (process.env.NODE_ENV !== 'production') {
727
+ if (typeof overscanCount === 'number') {
728
+ if (devWarningsOverscanCount && !devWarningsOverscanCount.has(instance)) {
729
+ devWarningsOverscanCount.add(instance);
730
+ console.warn('The overscanCount prop has been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');
731
+ }
732
+ }
733
+
734
+ if (typeof overscanColumnsCount === 'number' || typeof overscanRowsCount === 'number') {
735
+ if (devWarningsOverscanRowsColumnsCount && !devWarningsOverscanRowsColumnsCount.has(instance)) {
736
+ devWarningsOverscanRowsColumnsCount.add(instance);
737
+ console.warn('The overscanColumnsCount and overscanRowsCount props have been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');
738
+ }
739
+ }
740
+
741
+ if (innerTagName != null || outerTagName != null) {
742
+ if (devWarningsTagName && !devWarningsTagName.has(instance)) {
743
+ devWarningsTagName.add(instance);
744
+ console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');
745
+ }
746
+ }
747
+
748
+ if (children == null) {
749
+ throw Error('An invalid "children" prop has been specified. ' + 'Value should be a React component. ' + ("\"" + (children === null ? 'null' : typeof children) + "\" was specified."));
750
+ }
751
+
752
+ switch (direction) {
753
+ case 'ltr':
754
+ case 'rtl':
755
+ // Valid values
756
+ break;
757
+
758
+ default:
759
+ throw Error('An invalid "direction" prop has been specified. ' + 'Value should be either "ltr" or "rtl". ' + ("\"" + direction + "\" was specified."));
760
+ }
761
+
762
+ if (typeof width !== 'number') {
763
+ throw Error('An invalid "width" prop has been specified. ' + 'Grids must specify a number for width. ' + ("\"" + (width === null ? 'null' : typeof width) + "\" was specified."));
764
+ }
765
+
766
+ if (typeof height !== 'number') {
767
+ throw Error('An invalid "height" prop has been specified. ' + 'Grids must specify a number for height. ' + ("\"" + (height === null ? 'null' : typeof height) + "\" was specified."));
768
+ }
769
+ }
770
+ };
771
+
772
+ if (process.env.NODE_ENV !== 'production') ;
773
+
774
+ var FixedSizeGrid = /*#__PURE__*/createGridComponent({
775
+ getColumnOffset: function getColumnOffset(_ref, index) {
776
+ var columnWidth = _ref.columnWidth;
777
+ return index * columnWidth;
778
+ },
779
+ getColumnWidth: function getColumnWidth(_ref2, index) {
780
+ var columnWidth = _ref2.columnWidth;
781
+ return columnWidth;
782
+ },
783
+ getRowOffset: function getRowOffset(_ref3, index) {
784
+ var rowHeight = _ref3.rowHeight;
785
+ return index * rowHeight;
786
+ },
787
+ getRowHeight: function getRowHeight(_ref4, index) {
788
+ var rowHeight = _ref4.rowHeight;
789
+ return rowHeight;
790
+ },
791
+ getEstimatedTotalHeight: function getEstimatedTotalHeight(_ref5) {
792
+ var rowCount = _ref5.rowCount,
793
+ rowHeight = _ref5.rowHeight;
794
+ return rowHeight * rowCount;
795
+ },
796
+ getEstimatedTotalWidth: function getEstimatedTotalWidth(_ref6) {
797
+ var columnCount = _ref6.columnCount,
798
+ columnWidth = _ref6.columnWidth;
799
+ return columnWidth * columnCount;
800
+ },
801
+ getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(_ref7, columnIndex, align, scrollLeft, instanceProps, scrollbarSize) {
802
+ var columnCount = _ref7.columnCount,
803
+ columnWidth = _ref7.columnWidth,
804
+ width = _ref7.width;
805
+ var lastColumnOffset = Math.max(0, columnCount * columnWidth - width);
806
+ var maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);
807
+ var minOffset = Math.max(0, columnIndex * columnWidth - width + scrollbarSize + columnWidth);
808
+
809
+ if (align === 'smart') {
810
+ if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {
811
+ align = 'auto';
812
+ } else {
813
+ align = 'center';
814
+ }
815
+ }
816
+
817
+ switch (align) {
818
+ case 'start':
819
+ return maxOffset;
820
+
821
+ case 'end':
822
+ return minOffset;
823
+
824
+ case 'center':
825
+ // "Centered" offset is usually the average of the min and max.
826
+ // But near the edges of the list, this doesn't hold true.
827
+ var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
828
+
829
+ if (middleOffset < Math.ceil(width / 2)) {
830
+ return 0; // near the beginning
831
+ } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {
832
+ return lastColumnOffset; // near the end
833
+ } else {
834
+ return middleOffset;
835
+ }
836
+
837
+ case 'auto':
838
+ default:
839
+ if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {
840
+ return scrollLeft;
841
+ } else if (minOffset > maxOffset) {
842
+ // Because we only take into account the scrollbar size when calculating minOffset
843
+ // this value can be larger than maxOffset when at the end of the list
844
+ return minOffset;
845
+ } else if (scrollLeft < minOffset) {
846
+ return minOffset;
847
+ } else {
848
+ return maxOffset;
849
+ }
850
+
851
+ }
852
+ },
853
+ getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(_ref8, rowIndex, align, scrollTop, instanceProps, scrollbarSize) {
854
+ var rowHeight = _ref8.rowHeight,
855
+ height = _ref8.height,
856
+ rowCount = _ref8.rowCount;
857
+ var lastRowOffset = Math.max(0, rowCount * rowHeight - height);
858
+ var maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);
859
+ var minOffset = Math.max(0, rowIndex * rowHeight - height + scrollbarSize + rowHeight);
860
+
861
+ if (align === 'smart') {
862
+ if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {
863
+ align = 'auto';
864
+ } else {
865
+ align = 'center';
866
+ }
867
+ }
868
+
869
+ switch (align) {
870
+ case 'start':
871
+ return maxOffset;
872
+
873
+ case 'end':
874
+ return minOffset;
875
+
876
+ case 'center':
877
+ // "Centered" offset is usually the average of the min and max.
878
+ // But near the edges of the list, this doesn't hold true.
879
+ var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
880
+
881
+ if (middleOffset < Math.ceil(height / 2)) {
882
+ return 0; // near the beginning
883
+ } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {
884
+ return lastRowOffset; // near the end
885
+ } else {
886
+ return middleOffset;
887
+ }
888
+
889
+ case 'auto':
890
+ default:
891
+ if (scrollTop >= minOffset && scrollTop <= maxOffset) {
892
+ return scrollTop;
893
+ } else if (minOffset > maxOffset) {
894
+ // Because we only take into account the scrollbar size when calculating minOffset
895
+ // this value can be larger than maxOffset when at the end of the list
896
+ return minOffset;
897
+ } else if (scrollTop < minOffset) {
898
+ return minOffset;
899
+ } else {
900
+ return maxOffset;
901
+ }
902
+
903
+ }
904
+ },
905
+ getColumnStartIndexForOffset: function getColumnStartIndexForOffset(_ref9, scrollLeft) {
906
+ var columnWidth = _ref9.columnWidth,
907
+ columnCount = _ref9.columnCount;
908
+ return Math.max(0, Math.min(columnCount - 1, Math.floor(scrollLeft / columnWidth)));
909
+ },
910
+ getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(_ref10, startIndex, scrollLeft) {
911
+ var columnWidth = _ref10.columnWidth,
912
+ columnCount = _ref10.columnCount,
913
+ width = _ref10.width;
914
+ var left = startIndex * columnWidth;
915
+ var numVisibleColumns = Math.ceil((width + scrollLeft - left) / columnWidth);
916
+ return Math.max(0, Math.min(columnCount - 1, startIndex + numVisibleColumns - 1 // -1 is because stop index is inclusive
917
+ ));
918
+ },
919
+ getRowStartIndexForOffset: function getRowStartIndexForOffset(_ref11, scrollTop) {
920
+ var rowHeight = _ref11.rowHeight,
921
+ rowCount = _ref11.rowCount;
922
+ return Math.max(0, Math.min(rowCount - 1, Math.floor(scrollTop / rowHeight)));
923
+ },
924
+ getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(_ref12, startIndex, scrollTop) {
925
+ var rowHeight = _ref12.rowHeight,
926
+ rowCount = _ref12.rowCount,
927
+ height = _ref12.height;
928
+ var top = startIndex * rowHeight;
929
+ var numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);
930
+ return Math.max(0, Math.min(rowCount - 1, startIndex + numVisibleRows - 1 // -1 is because stop index is inclusive
931
+ ));
932
+ },
933
+ initInstanceProps: function initInstanceProps(props) {// Noop
934
+ },
935
+ shouldResetStyleCacheOnItemSizeChange: true,
936
+ validateProps: function validateProps(_ref13) {
937
+ var columnWidth = _ref13.columnWidth,
938
+ rowHeight = _ref13.rowHeight;
939
+
940
+ if (process.env.NODE_ENV !== 'production') {
941
+ if (typeof columnWidth !== 'number') {
942
+ throw Error('An invalid "columnWidth" prop has been specified. ' + 'Value should be a number. ' + ("\"" + (columnWidth === null ? 'null' : typeof columnWidth) + "\" was specified."));
943
+ }
944
+
945
+ if (typeof rowHeight !== 'number') {
946
+ throw Error('An invalid "rowHeight" prop has been specified. ' + 'Value should be a number. ' + ("\"" + (rowHeight === null ? 'null' : typeof rowHeight) + "\" was specified."));
947
+ }
948
+ }
949
+ }
950
+ });
951
+
37
952
  var GRID_PROPERTIES = {
38
953
  gridWidth: 300,
39
954
  gridHeight: 300,
@@ -169,7 +1084,7 @@ var IconPicker = function IconPicker(_ref) {
169
1084
  };
170
1085
  return /*#__PURE__*/React__default["default"].createElement("div", {
171
1086
  className: "flex flex-col items-start gap-2"
172
- }, label && /*#__PURE__*/React__default["default"].createElement(Label__default["default"], null, label), /*#__PURE__*/React__default["default"].createElement(Dropdown__default["default"], _extends__default["default"]({
1087
+ }, label && /*#__PURE__*/React__default["default"].createElement(Label__default["default"], null, label), /*#__PURE__*/React__default["default"].createElement(Dropdown__default["default"], _extends__default$1["default"]({
173
1088
  buttonSize: "small",
174
1089
  buttonStyle: "secondary",
175
1090
  closeOnSelect: false,
@@ -226,7 +1141,7 @@ var IconPicker = function IconPicker(_ref) {
226
1141
  label: t("neetoMolecules.iconPicker.dropdown.removeButton"),
227
1142
  style: "link",
228
1143
  onClick: handleRemoveClick
229
- }))), neetoCist.isNotEmpty(iconList) ? /*#__PURE__*/React__default["default"].createElement(reactWindow.FixedSizeGrid, {
1144
+ }))), neetoCist.isNotEmpty(iconList) ? /*#__PURE__*/React__default["default"].createElement(FixedSizeGrid, {
230
1145
  className: "w-full overflow-x-hidden",
231
1146
  columnCount: GRID_PROPERTIES.columnCount,
232
1147
  height: GRID_PROPERTIES.gridHeight,