@react-stately/layout 3.13.8-nightly.4555 → 3.13.8-nightly.4560

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.
package/dist/main.js CHANGED
@@ -1,441 +1,13 @@
1
- var $cMJQZ$reactstatelycollections = require("@react-stately/collections");
2
- var $cMJQZ$reactstatelyvirtualizer = require("@react-stately/virtualizer");
1
+ var $fe69e47e38ed0ac4$exports = require("./ListLayout.main.js");
2
+ var $67c493497dcda343$exports = require("./TableLayout.main.js");
3
3
 
4
4
 
5
5
  function $parcel$export(e, n, v, s) {
6
6
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
7
7
  }
8
8
 
9
- $parcel$export(module.exports, "ListLayout", () => $fe69e47e38ed0ac4$export$cacbb3924155d68e);
10
- $parcel$export(module.exports, "TableLayout", () => $67c493497dcda343$export$62444c3c724b1b20);
11
- /*
12
- * Copyright 2020 Adobe. All rights reserved.
13
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
14
- * you may not use this file except in compliance with the License. You may obtain a copy
15
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software distributed under
18
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
19
- * OF ANY KIND, either express or implied. See the License for the specific language
20
- * governing permissions and limitations under the License.
21
- */ /*
22
- * Copyright 2020 Adobe. All rights reserved.
23
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
24
- * you may not use this file except in compliance with the License. You may obtain a copy
25
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
26
- *
27
- * Unless required by applicable law or agreed to in writing, software distributed under
28
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
29
- * OF ANY KIND, either express or implied. See the License for the specific language
30
- * governing permissions and limitations under the License.
31
- */
32
-
33
- const $fe69e47e38ed0ac4$var$DEFAULT_HEIGHT = 48;
34
- class $fe69e47e38ed0ac4$export$cacbb3924155d68e extends (0, $cMJQZ$reactstatelyvirtualizer.Layout) {
35
- getLayoutInfo(key) {
36
- let res = this.layoutInfos.get(key);
37
- // If the layout info wasn't found, it might be outside the bounds of the area that we've
38
- // computed layout for so far. This can happen when accessing a random key, e.g pressing Home/End.
39
- // Compute the full layout and try again.
40
- if (!res && this.validRect.area < this.contentSize.area && this.lastCollection) {
41
- this.lastValidRect = this.validRect;
42
- this.validRect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(0, 0, Infinity, Infinity);
43
- this.rootNodes = this.buildCollection();
44
- this.validRect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(0, 0, this.contentSize.width, this.contentSize.height);
45
- res = this.layoutInfos.get(key);
46
- }
47
- return res;
48
- }
49
- getVisibleLayoutInfos(rect) {
50
- // If layout hasn't yet been done for the requested rect, union the
51
- // new rect with the existing valid rect, and recompute.
52
- if (!this.validRect.containsRect(rect) && this.lastCollection) {
53
- this.lastValidRect = this.validRect;
54
- this.validRect = this.validRect.union(rect);
55
- this.rootNodes = this.buildCollection();
56
- }
57
- let res = [];
58
- let addNodes = (nodes)=>{
59
- for (let node of nodes)if (this.isVisible(node, rect)) {
60
- res.push(node.layoutInfo);
61
- if (node.header) res.push(node.header);
62
- if (node.children) addNodes(node.children);
63
- }
64
- };
65
- addNodes(this.rootNodes);
66
- return res;
67
- }
68
- isVisible(node, rect) {
69
- return node.layoutInfo.rect.intersects(rect) || node.layoutInfo.isSticky || this.virtualizer.isPersistedKey(node.layoutInfo.key);
70
- }
71
- shouldInvalidateEverything(invalidationContext) {
72
- // Invalidate cache if the size of the collection changed.
73
- // In this case, we need to recalculate the entire layout.
74
- return invalidationContext.sizeChanged;
75
- }
76
- validate(invalidationContext) {
77
- this.collection = this.virtualizer.collection;
78
- // Reset valid rect if we will have to invalidate everything.
79
- // Otherwise we can reuse cached layout infos outside the current visible rect.
80
- this.invalidateEverything = this.shouldInvalidateEverything(invalidationContext);
81
- if (this.invalidateEverything) {
82
- this.lastValidRect = this.validRect;
83
- this.validRect = this.virtualizer.getVisibleRect();
84
- }
85
- this.rootNodes = this.buildCollection();
86
- // Remove deleted layout nodes
87
- if (this.lastCollection && this.collection !== this.lastCollection) {
88
- for (let key of this.lastCollection.getKeys())if (!this.collection.getItem(key)) {
89
- let layoutNode = this.layoutNodes.get(key);
90
- if (layoutNode) {
91
- var _layoutNode_header;
92
- this.layoutInfos.delete(layoutNode.layoutInfo.key);
93
- this.layoutInfos.delete((_layoutNode_header = layoutNode.header) === null || _layoutNode_header === void 0 ? void 0 : _layoutNode_header.key);
94
- this.layoutNodes.delete(key);
95
- }
96
- }
97
- }
98
- this.lastWidth = this.virtualizer.visibleRect.width;
99
- this.lastCollection = this.collection;
100
- this.invalidateEverything = false;
101
- }
102
- buildCollection() {
103
- let y = this.padding;
104
- let skipped = 0;
105
- let nodes = [];
106
- for (let node of this.collection){
107
- var _this_rowHeight;
108
- let rowHeight = (_this_rowHeight = this.rowHeight) !== null && _this_rowHeight !== void 0 ? _this_rowHeight : this.estimatedRowHeight;
109
- // Skip rows before the valid rectangle unless they are already cached.
110
- if (node.type === "item" && y + rowHeight < this.validRect.y && !this.isValid(node, y)) {
111
- y += rowHeight;
112
- skipped++;
113
- continue;
114
- }
115
- let layoutNode = this.buildChild(node, 0, y);
116
- y = layoutNode.layoutInfo.rect.maxY;
117
- nodes.push(layoutNode);
118
- if (node.type === "item" && y > this.validRect.maxY) {
119
- y += (this.collection.size - (nodes.length + skipped)) * rowHeight;
120
- break;
121
- }
122
- }
123
- if (this.isLoading) {
124
- var _this_loaderHeight;
125
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(0, y, this.virtualizer.visibleRect.width, (_this_loaderHeight = this.loaderHeight) !== null && _this_loaderHeight !== void 0 ? _this_loaderHeight : this.virtualizer.visibleRect.height);
126
- let loader = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)("loader", "loader", rect);
127
- this.layoutInfos.set("loader", loader);
128
- nodes.push({
129
- layoutInfo: loader
130
- });
131
- y = loader.rect.maxY;
132
- }
133
- if (nodes.length === 0) {
134
- var _this_placeholderHeight;
135
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(0, y, this.virtualizer.visibleRect.width, (_this_placeholderHeight = this.placeholderHeight) !== null && _this_placeholderHeight !== void 0 ? _this_placeholderHeight : this.virtualizer.visibleRect.height);
136
- let placeholder = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)("placeholder", "placeholder", rect);
137
- this.layoutInfos.set("placeholder", placeholder);
138
- nodes.push({
139
- layoutInfo: placeholder
140
- });
141
- y = placeholder.rect.maxY;
142
- }
143
- this.contentSize = new (0, $cMJQZ$reactstatelyvirtualizer.Size)(this.virtualizer.visibleRect.width, y + this.padding);
144
- return nodes;
145
- }
146
- isValid(node, y) {
147
- let cached = this.layoutNodes.get(node.key);
148
- return !this.invalidateEverything && cached && cached.node === node && y === (cached.header || cached.layoutInfo).rect.y && cached.layoutInfo.rect.intersects(this.lastValidRect) && cached.validRect.containsRect(cached.layoutInfo.rect.intersection(this.validRect));
149
- }
150
- buildChild(node, x, y) {
151
- if (this.isValid(node, y)) return this.layoutNodes.get(node.key);
152
- let layoutNode = this.buildNode(node, x, y);
153
- layoutNode.node = node;
154
- var _node_parentKey;
155
- layoutNode.layoutInfo.parentKey = (_node_parentKey = node.parentKey) !== null && _node_parentKey !== void 0 ? _node_parentKey : null;
156
- this.layoutInfos.set(layoutNode.layoutInfo.key, layoutNode.layoutInfo);
157
- if (layoutNode.header) this.layoutInfos.set(layoutNode.header.key, layoutNode.header);
158
- this.layoutNodes.set(node.key, layoutNode);
159
- return layoutNode;
160
- }
161
- buildNode(node, x, y) {
162
- switch(node.type){
163
- case "section":
164
- return this.buildSection(node, x, y);
165
- case "item":
166
- return this.buildItem(node, x, y);
167
- }
168
- }
169
- buildSection(node, x, y) {
170
- let width = this.virtualizer.visibleRect.width;
171
- let rectHeight = this.headingHeight;
172
- let isEstimated = false;
173
- // If no explicit height is available, use an estimated height.
174
- if (rectHeight == null) {
175
- // If a previous version of this layout info exists, reuse its height.
176
- // Mark as estimated if the size of the overall collection view changed,
177
- // or the content of the item changed.
178
- let previousLayoutNode = this.layoutNodes.get(node.key);
179
- if (previousLayoutNode && previousLayoutNode.header) {
180
- let curNode = this.collection.getItem(node.key);
181
- let lastNode = this.lastCollection ? this.lastCollection.getItem(node.key) : null;
182
- rectHeight = previousLayoutNode.header.rect.height;
183
- isEstimated = width !== this.lastWidth || curNode !== lastNode || previousLayoutNode.header.estimatedSize;
184
- } else {
185
- rectHeight = node.rendered ? this.estimatedHeadingHeight : 0;
186
- isEstimated = true;
187
- }
188
- }
189
- if (rectHeight == null) rectHeight = $fe69e47e38ed0ac4$var$DEFAULT_HEIGHT;
190
- let headerRect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(0, y, width, rectHeight);
191
- let header = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)("header", node.key + ":header", headerRect);
192
- header.estimatedSize = isEstimated;
193
- header.parentKey = node.key;
194
- y += header.rect.height;
195
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(0, y, width, 0);
196
- let layoutInfo = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)(node.type, node.key, rect);
197
- let startY = y;
198
- let skipped = 0;
199
- let children = [];
200
- for (let child of (0, $cMJQZ$reactstatelycollections.getChildNodes)(node, this.collection)){
201
- var _this_rowHeight;
202
- let rowHeight = (_this_rowHeight = this.rowHeight) !== null && _this_rowHeight !== void 0 ? _this_rowHeight : this.estimatedRowHeight;
203
- // Skip rows before the valid rectangle unless they are already cached.
204
- if (y + rowHeight < this.validRect.y && !this.isValid(node, y)) {
205
- y += rowHeight;
206
- skipped++;
207
- continue;
208
- }
209
- let layoutNode = this.buildChild(child, x, y);
210
- y = layoutNode.layoutInfo.rect.maxY;
211
- children.push(layoutNode);
212
- if (y > this.validRect.maxY) {
213
- // Estimate the remaining height for rows that we don't need to layout right now.
214
- y += ([
215
- ...(0, $cMJQZ$reactstatelycollections.getChildNodes)(node, this.collection)
216
- ].length - (children.length + skipped)) * rowHeight;
217
- break;
218
- }
219
- }
220
- rect.height = y - startY;
221
- return {
222
- header: header,
223
- layoutInfo: layoutInfo,
224
- children: children,
225
- validRect: layoutInfo.rect.intersection(this.validRect)
226
- };
227
- }
228
- buildItem(node, x, y) {
229
- let width = this.virtualizer.visibleRect.width;
230
- let rectHeight = this.rowHeight;
231
- let isEstimated = false;
232
- // If no explicit height is available, use an estimated height.
233
- if (rectHeight == null) {
234
- // If a previous version of this layout info exists, reuse its height.
235
- // Mark as estimated if the size of the overall collection view changed,
236
- // or the content of the item changed.
237
- let previousLayoutNode = this.layoutNodes.get(node.key);
238
- if (previousLayoutNode) {
239
- rectHeight = previousLayoutNode.layoutInfo.rect.height;
240
- isEstimated = width !== this.lastWidth || node !== previousLayoutNode.node || previousLayoutNode.layoutInfo.estimatedSize;
241
- } else {
242
- rectHeight = this.estimatedRowHeight;
243
- isEstimated = true;
244
- }
245
- }
246
- if (rectHeight == null) rectHeight = $fe69e47e38ed0ac4$var$DEFAULT_HEIGHT;
247
- if (typeof this.indentationForItem === "function") x += this.indentationForItem(this.collection, node.key) || 0;
248
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(x, y, width - x, rectHeight);
249
- let layoutInfo = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)(node.type, node.key, rect);
250
- // allow overflow so the focus ring/selection ring can extend outside to overlap with the adjacent items borders
251
- layoutInfo.allowOverflow = true;
252
- layoutInfo.estimatedSize = isEstimated;
253
- return {
254
- layoutInfo: layoutInfo,
255
- validRect: layoutInfo.rect
256
- };
257
- }
258
- updateItemSize(key, size) {
259
- let layoutInfo = this.layoutInfos.get(key);
260
- // If no layoutInfo, item has been deleted/removed.
261
- if (!layoutInfo) return false;
262
- layoutInfo.estimatedSize = false;
263
- if (layoutInfo.rect.height !== size.height) {
264
- // Copy layout info rather than mutating so that later caches are invalidated.
265
- let newLayoutInfo = layoutInfo.copy();
266
- newLayoutInfo.rect.height = size.height;
267
- this.layoutInfos.set(key, newLayoutInfo);
268
- // Invalidate layout for this layout node and all parents
269
- this.updateLayoutNode(key, layoutInfo, newLayoutInfo);
270
- let node = this.collection.getItem(layoutInfo.parentKey);
271
- while(node){
272
- this.updateLayoutNode(node.key, layoutInfo, newLayoutInfo);
273
- node = this.collection.getItem(node.parentKey);
274
- }
275
- return true;
276
- }
277
- return false;
278
- }
279
- updateLayoutNode(key, oldLayoutInfo, newLayoutInfo) {
280
- let n = this.layoutNodes.get(key);
281
- if (n) {
282
- // Invalidate by reseting validRect.
283
- n.validRect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)();
284
- // Replace layout info in LayoutNode
285
- if (n.header === oldLayoutInfo) n.header = newLayoutInfo;
286
- else if (n.layoutInfo === oldLayoutInfo) n.layoutInfo = newLayoutInfo;
287
- }
288
- }
289
- getContentSize() {
290
- return this.contentSize;
291
- }
292
- getKeyAbove(key) {
293
- let collection = this.collection;
294
- key = collection.getKeyBefore(key);
295
- while(key != null){
296
- let item = collection.getItem(key);
297
- if (item.type === "item" && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) return key;
298
- key = collection.getKeyBefore(key);
299
- }
300
- }
301
- getKeyBelow(key) {
302
- let collection = this.collection;
303
- key = collection.getKeyAfter(key);
304
- while(key != null){
305
- let item = collection.getItem(key);
306
- if (item.type === "item" && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) return key;
307
- key = collection.getKeyAfter(key);
308
- }
309
- }
310
- getKeyPageAbove(key) {
311
- let layoutInfo = this.getLayoutInfo(key);
312
- if (layoutInfo) {
313
- let pageY = Math.max(0, layoutInfo.rect.y + layoutInfo.rect.height - this.virtualizer.visibleRect.height);
314
- while(layoutInfo && layoutInfo.rect.y > pageY){
315
- let keyAbove = this.getKeyAbove(layoutInfo.key);
316
- layoutInfo = this.getLayoutInfo(keyAbove);
317
- }
318
- if (layoutInfo) return layoutInfo.key;
319
- }
320
- return this.getFirstKey();
321
- }
322
- getKeyPageBelow(key) {
323
- let layoutInfo = this.getLayoutInfo(key != null ? key : this.getFirstKey());
324
- if (layoutInfo) {
325
- let pageY = Math.min(this.virtualizer.contentSize.height, layoutInfo.rect.y - layoutInfo.rect.height + this.virtualizer.visibleRect.height);
326
- while(layoutInfo && layoutInfo.rect.y < pageY){
327
- let keyBelow = this.getKeyBelow(layoutInfo.key);
328
- layoutInfo = this.getLayoutInfo(keyBelow);
329
- }
330
- if (layoutInfo) return layoutInfo.key;
331
- }
332
- return this.getLastKey();
333
- }
334
- getFirstKey() {
335
- let collection = this.collection;
336
- let key = collection.getFirstKey();
337
- while(key != null){
338
- let item = collection.getItem(key);
339
- if (item.type === "item" && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) return key;
340
- key = collection.getKeyAfter(key);
341
- }
342
- }
343
- getLastKey() {
344
- let collection = this.collection;
345
- let key = collection.getLastKey();
346
- while(key != null){
347
- let item = collection.getItem(key);
348
- if (item.type === "item" && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) return key;
349
- key = collection.getKeyBefore(key);
350
- }
351
- }
352
- getKeyForSearch(search, fromKey) {
353
- if (!this.collator) return null;
354
- let collection = this.collection;
355
- let key = fromKey || this.getFirstKey();
356
- while(key != null){
357
- let item = collection.getItem(key);
358
- let substring = item.textValue.slice(0, search.length);
359
- if (item.textValue && this.collator.compare(substring, search) === 0) return key;
360
- key = this.getKeyBelow(key);
361
- }
362
- return null;
363
- }
364
- getInitialLayoutInfo(layoutInfo) {
365
- layoutInfo.opacity = 0;
366
- layoutInfo.transform = "scale3d(0.8, 0.8, 0.8)";
367
- return layoutInfo;
368
- }
369
- getFinalLayoutInfo(layoutInfo) {
370
- layoutInfo.opacity = 0;
371
- layoutInfo.transform = "scale3d(0.8, 0.8, 0.8)";
372
- return layoutInfo;
373
- }
374
- getDropTargetFromPoint(x, y, isValidDropTarget) {
375
- x += this.virtualizer.visibleRect.x;
376
- y += this.virtualizer.visibleRect.y;
377
- let key = this.virtualizer.keyAtPoint(new (0, $cMJQZ$reactstatelyvirtualizer.Point)(x, y));
378
- if (key == null || this.collection.size === 0) return {
379
- type: "root"
380
- };
381
- let layoutInfo = this.getLayoutInfo(key);
382
- let rect = layoutInfo.rect;
383
- let target = {
384
- type: "item",
385
- key: layoutInfo.key,
386
- dropPosition: "on"
387
- };
388
- // If dropping on the item isn't accepted, try the target before or after depending on the y position.
389
- // Otherwise, if dropping on the item is accepted, still try the before/after positions if within 10px
390
- // of the top or bottom of the item.
391
- if (!isValidDropTarget(target)) {
392
- if (y <= rect.y + rect.height / 2 && isValidDropTarget({
393
- ...target,
394
- dropPosition: "before"
395
- })) target.dropPosition = "before";
396
- else if (isValidDropTarget({
397
- ...target,
398
- dropPosition: "after"
399
- })) target.dropPosition = "after";
400
- } else if (y <= rect.y + 10 && isValidDropTarget({
401
- ...target,
402
- dropPosition: "before"
403
- })) target.dropPosition = "before";
404
- else if (y >= rect.maxY - 10 && isValidDropTarget({
405
- ...target,
406
- dropPosition: "after"
407
- })) target.dropPosition = "after";
408
- return target;
409
- }
410
- /**
411
- * Creates a new ListLayout with options. See the list of properties below for a description
412
- * of the options that can be provided.
413
- */ constructor(options = {}){
414
- super();
415
- this.disabledKeys = new Set();
416
- this.allowDisabledKeyFocus = false;
417
- this.rowHeight = options.rowHeight;
418
- this.estimatedRowHeight = options.estimatedRowHeight;
419
- this.headingHeight = options.headingHeight;
420
- this.estimatedHeadingHeight = options.estimatedHeadingHeight;
421
- this.padding = options.padding || 0;
422
- this.indentationForItem = options.indentationForItem;
423
- this.collator = options.collator;
424
- this.loaderHeight = options.loaderHeight;
425
- this.placeholderHeight = options.placeholderHeight;
426
- this.layoutInfos = new Map();
427
- this.layoutNodes = new Map();
428
- this.rootNodes = [];
429
- this.lastWidth = 0;
430
- this.lastCollection = null;
431
- this.allowDisabledKeyFocus = options.allowDisabledKeyFocus;
432
- this.lastValidRect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)();
433
- this.validRect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)();
434
- this.contentSize = new (0, $cMJQZ$reactstatelyvirtualizer.Size)();
435
- }
436
- }
437
-
438
-
9
+ $parcel$export(module.exports, "ListLayout", () => $fe69e47e38ed0ac4$exports.ListLayout);
10
+ $parcel$export(module.exports, "TableLayout", () => $67c493497dcda343$exports.TableLayout);
439
11
  /*
440
12
  * Copyright 2020 Adobe. All rights reserved.
441
13
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -449,516 +21,5 @@ class $fe69e47e38ed0ac4$export$cacbb3924155d68e extends (0, $cMJQZ$reactstatelyv
449
21
  */
450
22
 
451
23
 
452
- class $67c493497dcda343$export$62444c3c724b1b20 extends (0, $fe69e47e38ed0ac4$export$cacbb3924155d68e) {
453
- shouldInvalidateEverything(invalidationContext) {
454
- // If columns changed, clear layout cache.
455
- return super.shouldInvalidateEverything(invalidationContext) || !this.lastCollection || this.collection.columns.length !== this.lastCollection.columns.length || this.collection.columns.some((c, i)=>c.key !== this.lastCollection.columns[i].key || c.props.width !== this.lastCollection.columns[i].props.width || c.props.minWidth !== this.lastCollection.columns[i].props.minWidth || c.props.maxWidth !== this.lastCollection.columns[i].props.maxWidth);
456
- }
457
- getResizerPosition() {
458
- var _this_getLayoutInfo;
459
- return (_this_getLayoutInfo = this.getLayoutInfo(this.resizingColumn)) === null || _this_getLayoutInfo === void 0 ? void 0 : _this_getLayoutInfo.rect.maxX;
460
- }
461
- getColumnWidth(key) {
462
- var _this_columnLayout_getColumnWidth;
463
- return (_this_columnLayout_getColumnWidth = this.columnLayout.getColumnWidth(key)) !== null && _this_columnLayout_getColumnWidth !== void 0 ? _this_columnLayout_getColumnWidth : 0;
464
- }
465
- getColumnMinWidth(key) {
466
- let column = this.collection.columns.find((col)=>col.key === key);
467
- if (!column) return 0;
468
- return this.columnLayout.getColumnMinWidth(key);
469
- }
470
- getColumnMaxWidth(key) {
471
- let column = this.collection.columns.find((col)=>col.key === key);
472
- if (!column) return 0;
473
- return this.columnLayout.getColumnMaxWidth(key);
474
- }
475
- // outside, where this is called, should call props.onColumnResizeStart...
476
- startResize(key) {
477
- this.resizingColumn = key;
478
- }
479
- // only way to call props.onColumnResize with the new size outside of Layout is to send the result back
480
- updateResizedColumns(key, width) {
481
- let newControlled = new Map(Array.from(this.controlledColumns).map(([key, entry])=>[
482
- key,
483
- entry.props.width
484
- ]));
485
- let newSizes = this.columnLayout.resizeColumnWidth(this.virtualizer.visibleRect.width, this.collection, newControlled, this.uncontrolledWidths, key, width);
486
- let map = new Map(Array.from(this.uncontrolledColumns).map(([key])=>[
487
- key,
488
- newSizes.get(key)
489
- ]));
490
- map.set(key, width);
491
- this.uncontrolledWidths = map;
492
- // relayoutNow still uses setState, should happen at the same time the parent
493
- // component's state is processed as a result of props.onColumnResize
494
- if (this.uncontrolledWidths.size > 0) this.virtualizer.relayoutNow({
495
- sizeChanged: true
496
- });
497
- return newSizes;
498
- }
499
- endResize() {
500
- this.resizingColumn = null;
501
- }
502
- buildCollection() {
503
- // Track whether we were previously loading. This is used to adjust the animations of async loading vs inserts.
504
- let loadingState = this.collection.body.props.loadingState;
505
- this.wasLoading = this.isLoading;
506
- this.isLoading = loadingState === "loading" || loadingState === "loadingMore";
507
- this.stickyColumnIndices = [];
508
- for (let column of this.collection.columns)// The selection cell and any other sticky columns always need to be visible.
509
- // In addition, row headers need to be in the DOM for accessibility labeling.
510
- if (column.props.isDragButtonCell || column.props.isSelectionCell || this.collection.rowHeaderColumnKeys.has(column.key)) this.stickyColumnIndices.push(column.index);
511
- let [controlledColumns, uncontrolledColumns] = this.columnLayout.splitColumnsIntoControlledAndUncontrolled(this.collection.columns);
512
- this.controlledColumns = controlledColumns;
513
- this.uncontrolledColumns = uncontrolledColumns;
514
- let colWidths = this.columnLayout.recombineColumns(this.collection.columns, this.uncontrolledWidths, uncontrolledColumns, controlledColumns);
515
- this.columnWidths = this.columnLayout.buildColumnWidths(this.virtualizer.visibleRect.width, this.collection, colWidths);
516
- let header = this.buildHeader();
517
- let body = this.buildBody(0);
518
- this.lastPersistedKeys = null;
519
- body.layoutInfo.rect.width = Math.max(header.layoutInfo.rect.width, body.layoutInfo.rect.width);
520
- this.contentSize = new (0, $cMJQZ$reactstatelyvirtualizer.Size)(body.layoutInfo.rect.width, body.layoutInfo.rect.maxY);
521
- return [
522
- header,
523
- body
524
- ];
525
- }
526
- buildHeader() {
527
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(0, 0, 0, 0);
528
- let layoutInfo = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)("header", "header", rect);
529
- let y = 0;
530
- let width = 0;
531
- let children = [];
532
- for (let headerRow of this.collection.headerRows){
533
- let layoutNode = this.buildChild(headerRow, 0, y);
534
- layoutNode.layoutInfo.parentKey = "header";
535
- y = layoutNode.layoutInfo.rect.maxY;
536
- width = Math.max(width, layoutNode.layoutInfo.rect.width);
537
- layoutNode.index = children.length;
538
- children.push(layoutNode);
539
- }
540
- rect.width = width;
541
- rect.height = y;
542
- this.layoutInfos.set("header", layoutInfo);
543
- return {
544
- layoutInfo: layoutInfo,
545
- children: children,
546
- validRect: layoutInfo.rect
547
- };
548
- }
549
- buildHeaderRow(headerRow, x, y) {
550
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(0, y, 0, 0);
551
- let row = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)("headerrow", headerRow.key, rect);
552
- let height = 0;
553
- let columns = [];
554
- for (let cell of (0, $cMJQZ$reactstatelycollections.getChildNodes)(headerRow, this.collection)){
555
- let layoutNode = this.buildChild(cell, x, y);
556
- layoutNode.layoutInfo.parentKey = row.key;
557
- x = layoutNode.layoutInfo.rect.maxX;
558
- height = Math.max(height, layoutNode.layoutInfo.rect.height);
559
- layoutNode.index = columns.length;
560
- columns.push(layoutNode);
561
- }
562
- for (let [i, layout] of columns.entries())layout.layoutInfo.zIndex = columns.length - i + 1;
563
- this.setChildHeights(columns, height);
564
- rect.height = height;
565
- rect.width = x;
566
- return {
567
- layoutInfo: row,
568
- children: columns,
569
- validRect: rect
570
- };
571
- }
572
- setChildHeights(children, height) {
573
- for (let child of children)if (child.layoutInfo.rect.height !== height) {
574
- // Need to copy the layout info before we mutate it.
575
- child.layoutInfo = child.layoutInfo.copy();
576
- this.layoutInfos.set(child.layoutInfo.key, child.layoutInfo);
577
- child.layoutInfo.rect.height = height;
578
- }
579
- }
580
- // used to get the column widths when rendering to the DOM
581
- getRenderedColumnWidth(node) {
582
- var _node_colspan;
583
- let colspan = (_node_colspan = node.colspan) !== null && _node_colspan !== void 0 ? _node_colspan : 1;
584
- var _node_colIndex;
585
- let colIndex = (_node_colIndex = node.colIndex) !== null && _node_colIndex !== void 0 ? _node_colIndex : node.index;
586
- let width = 0;
587
- for(let i = colIndex; i < colIndex + colspan; i++){
588
- let column = this.collection.columns[i];
589
- if ((column === null || column === void 0 ? void 0 : column.key) != null) width += this.columnWidths.get(column.key);
590
- }
591
- return width;
592
- }
593
- getEstimatedHeight(node, width, height, estimatedHeight) {
594
- let isEstimated = false;
595
- // If no explicit height is available, use an estimated height.
596
- if (height == null) {
597
- // If a previous version of this layout info exists, reuse its height.
598
- // Mark as estimated if the size of the overall collection view changed,
599
- // or the content of the item changed.
600
- let previousLayoutNode = this.layoutNodes.get(node.key);
601
- if (previousLayoutNode) {
602
- height = previousLayoutNode.layoutInfo.rect.height;
603
- isEstimated = node !== previousLayoutNode.node || width !== previousLayoutNode.layoutInfo.rect.width || previousLayoutNode.layoutInfo.estimatedSize;
604
- } else {
605
- height = estimatedHeight;
606
- isEstimated = true;
607
- }
608
- }
609
- return {
610
- height: height,
611
- isEstimated: isEstimated
612
- };
613
- }
614
- buildColumn(node, x, y) {
615
- var _node_props, _node_props1;
616
- let width = this.getRenderedColumnWidth(node);
617
- let { height: height, isEstimated: isEstimated } = this.getEstimatedHeight(node, width, this.headingHeight, this.estimatedHeadingHeight);
618
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(x, y, width, height);
619
- let layoutInfo = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)(node.type, node.key, rect);
620
- layoutInfo.isSticky = !this.disableSticky && (((_node_props = node.props) === null || _node_props === void 0 ? void 0 : _node_props.isDragButtonCell) || ((_node_props1 = node.props) === null || _node_props1 === void 0 ? void 0 : _node_props1.isSelectionCell));
621
- layoutInfo.zIndex = layoutInfo.isSticky ? 2 : 1;
622
- layoutInfo.estimatedSize = isEstimated;
623
- return {
624
- layoutInfo: layoutInfo,
625
- validRect: layoutInfo.rect
626
- };
627
- }
628
- buildBody(y) {
629
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(0, y, 0, 0);
630
- let layoutInfo = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)("rowgroup", "body", rect);
631
- let startY = y;
632
- let skipped = 0;
633
- let width = 0;
634
- let children = [];
635
- for (let [i, node] of [
636
- ...this.collection
637
- ].entries()){
638
- var _this_rowHeight;
639
- let rowHeight = ((_this_rowHeight = this.rowHeight) !== null && _this_rowHeight !== void 0 ? _this_rowHeight : this.estimatedRowHeight) + 1;
640
- // Skip rows before the valid rectangle unless they are already cached.
641
- if (y + rowHeight < this.validRect.y && !this.isValid(node, y)) {
642
- y += rowHeight;
643
- skipped++;
644
- continue;
645
- }
646
- let layoutNode = this.buildChild(node, 0, y);
647
- layoutNode.layoutInfo.parentKey = "body";
648
- layoutNode.index = i;
649
- y = layoutNode.layoutInfo.rect.maxY;
650
- width = Math.max(width, layoutNode.layoutInfo.rect.width);
651
- children.push(layoutNode);
652
- if (y > this.validRect.maxY) {
653
- // Estimate the remaining height for rows that we don't need to layout right now.
654
- y += (this.collection.size - (skipped + children.length)) * rowHeight;
655
- break;
656
- }
657
- }
658
- if (this.isLoading) {
659
- // Add some margin around the loader to ensure that scrollbars don't flicker in and out.
660
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(40, Math.max(y, 40), (width || this.virtualizer.visibleRect.width) - 80, children.length === 0 ? this.virtualizer.visibleRect.height - 80 : 60);
661
- let loader = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)("loader", "loader", rect);
662
- loader.parentKey = "body";
663
- loader.isSticky = !this.disableSticky && children.length === 0;
664
- this.layoutInfos.set("loader", loader);
665
- children.push({
666
- layoutInfo: loader,
667
- validRect: loader.rect
668
- });
669
- y = loader.rect.maxY;
670
- width = Math.max(width, rect.width);
671
- } else if (children.length === 0) {
672
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(40, Math.max(y, 40), this.virtualizer.visibleRect.width - 80, this.virtualizer.visibleRect.height - 80);
673
- let empty = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)("empty", "empty", rect);
674
- empty.parentKey = "body";
675
- empty.isSticky = !this.disableSticky;
676
- this.layoutInfos.set("empty", empty);
677
- children.push({
678
- layoutInfo: empty,
679
- validRect: empty.rect
680
- });
681
- y = empty.rect.maxY;
682
- width = Math.max(width, rect.width);
683
- }
684
- rect.width = width;
685
- rect.height = y - startY;
686
- this.layoutInfos.set("body", layoutInfo);
687
- return {
688
- layoutInfo: layoutInfo,
689
- children: children,
690
- validRect: layoutInfo.rect.intersection(this.validRect)
691
- };
692
- }
693
- buildNode(node, x, y) {
694
- switch(node.type){
695
- case "headerrow":
696
- return this.buildHeaderRow(node, x, y);
697
- case "item":
698
- return this.buildRow(node, x, y);
699
- case "column":
700
- case "placeholder":
701
- return this.buildColumn(node, x, y);
702
- case "cell":
703
- return this.buildCell(node, x, y);
704
- default:
705
- throw new Error("Unknown node type " + node.type);
706
- }
707
- }
708
- buildRow(node, x, y) {
709
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(x, y, 0, 0);
710
- let layoutInfo = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)("row", node.key, rect);
711
- let children = [];
712
- let height = 0;
713
- for (let [i, child] of [
714
- ...(0, $cMJQZ$reactstatelycollections.getChildNodes)(node, this.collection)
715
- ].entries())if (child.type === "cell") {
716
- if (x > this.validRect.maxX) {
717
- // Adjust existing cached layoutInfo to ensure that it is out of view.
718
- // This can happen due to column resizing.
719
- let layoutNode = this.layoutNodes.get(child.key);
720
- if (layoutNode) {
721
- layoutNode.layoutInfo.rect.x = x;
722
- x += layoutNode.layoutInfo.rect.width;
723
- }
724
- } else {
725
- let layoutNode = this.buildChild(child, x, y);
726
- x = layoutNode.layoutInfo.rect.maxX;
727
- height = Math.max(height, layoutNode.layoutInfo.rect.height);
728
- layoutNode.index = i;
729
- children.push(layoutNode);
730
- }
731
- }
732
- this.setChildHeights(children, height);
733
- rect.width = this.layoutInfos.get("header").rect.width;
734
- rect.height = height + 1; // +1 for bottom border
735
- return {
736
- layoutInfo: layoutInfo,
737
- children: children,
738
- validRect: rect.intersection(this.validRect)
739
- };
740
- }
741
- buildCell(node, x, y) {
742
- var _node_props, _node_props1;
743
- let width = this.getRenderedColumnWidth(node);
744
- let { height: height, isEstimated: isEstimated } = this.getEstimatedHeight(node, width, this.rowHeight, this.estimatedRowHeight);
745
- let rect = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(x, y, width, height);
746
- let layoutInfo = new (0, $cMJQZ$reactstatelyvirtualizer.LayoutInfo)(node.type, node.key, rect);
747
- layoutInfo.isSticky = !this.disableSticky && (((_node_props = node.props) === null || _node_props === void 0 ? void 0 : _node_props.isDragButtonCell) || ((_node_props1 = node.props) === null || _node_props1 === void 0 ? void 0 : _node_props1.isSelectionCell));
748
- layoutInfo.zIndex = layoutInfo.isSticky ? 2 : 1;
749
- layoutInfo.estimatedSize = isEstimated;
750
- return {
751
- layoutInfo: layoutInfo,
752
- validRect: rect
753
- };
754
- }
755
- getVisibleLayoutInfos(rect) {
756
- // If layout hasn't yet been done for the requested rect, union the
757
- // new rect with the existing valid rect, and recompute.
758
- if (!this.validRect.containsRect(rect) && this.lastCollection) {
759
- this.lastValidRect = this.validRect;
760
- this.validRect = this.validRect.union(rect);
761
- this.rootNodes = this.buildCollection();
762
- }
763
- let res = [];
764
- this.buildPersistedIndices();
765
- for (let node of this.rootNodes){
766
- res.push(node.layoutInfo);
767
- this.addVisibleLayoutInfos(res, node, rect);
768
- }
769
- return res;
770
- }
771
- addVisibleLayoutInfos(res, node, rect) {
772
- if (!node.children || node.children.length === 0) return;
773
- switch(node.layoutInfo.type){
774
- case "header":
775
- for (let child of node.children){
776
- res.push(child.layoutInfo);
777
- this.addVisibleLayoutInfos(res, child, rect);
778
- }
779
- break;
780
- case "rowgroup":
781
- {
782
- let firstVisibleRow = this.binarySearch(node.children, rect.topLeft, "y");
783
- let lastVisibleRow = this.binarySearch(node.children, rect.bottomRight, "y");
784
- // Add persisted rows before the visible rows.
785
- let persistedRowIndices = this.persistedIndices.get(node.layoutInfo.key);
786
- let persistIndex = 0;
787
- while(persistedRowIndices && persistIndex < persistedRowIndices.length && persistedRowIndices[persistIndex] < firstVisibleRow){
788
- let idx = persistedRowIndices[persistIndex];
789
- if (idx < node.children.length) {
790
- res.push(node.children[idx].layoutInfo);
791
- this.addVisibleLayoutInfos(res, node.children[idx], rect);
792
- }
793
- persistIndex++;
794
- }
795
- for(let i = firstVisibleRow; i <= lastVisibleRow; i++){
796
- // Skip persisted rows that overlap with visible cells.
797
- while(persistedRowIndices && persistIndex < persistedRowIndices.length && persistedRowIndices[persistIndex] < i)persistIndex++;
798
- res.push(node.children[i].layoutInfo);
799
- this.addVisibleLayoutInfos(res, node.children[i], rect);
800
- }
801
- // Add persisted rows after the visible rows.
802
- while(persistedRowIndices && persistIndex < persistedRowIndices.length){
803
- let idx = persistedRowIndices[persistIndex++];
804
- if (idx < node.children.length) res.push(node.children[idx].layoutInfo);
805
- }
806
- break;
807
- }
808
- case "headerrow":
809
- case "row":
810
- {
811
- let firstVisibleCell = this.binarySearch(node.children, rect.topLeft, "x");
812
- let lastVisibleCell = this.binarySearch(node.children, rect.topRight, "x");
813
- let stickyIndex = 0;
814
- // Add persisted/sticky cells before the visible cells.
815
- let persistedCellIndices = this.persistedIndices.get(node.layoutInfo.key) || this.stickyColumnIndices;
816
- while(stickyIndex < persistedCellIndices.length && persistedCellIndices[stickyIndex] < firstVisibleCell){
817
- let idx = persistedCellIndices[stickyIndex];
818
- if (idx < node.children.length) res.push(node.children[idx].layoutInfo);
819
- stickyIndex++;
820
- }
821
- for(let i = firstVisibleCell; i <= lastVisibleCell; i++){
822
- // Skip sticky cells that overlap with visible cells.
823
- while(stickyIndex < persistedCellIndices.length && persistedCellIndices[stickyIndex] < i)stickyIndex++;
824
- res.push(node.children[i].layoutInfo);
825
- }
826
- // Add any remaining sticky cells after the visible cells.
827
- while(stickyIndex < persistedCellIndices.length){
828
- let idx = persistedCellIndices[stickyIndex++];
829
- if (idx < node.children.length) res.push(node.children[idx].layoutInfo);
830
- }
831
- break;
832
- }
833
- default:
834
- throw new Error("Unknown node type " + node.layoutInfo.type);
835
- }
836
- }
837
- binarySearch(items, point, axis) {
838
- let low = 0;
839
- let high = items.length - 1;
840
- while(low <= high){
841
- let mid = low + high >> 1;
842
- let item = items[mid];
843
- if (axis === "x" && item.layoutInfo.rect.maxX < point.x || axis === "y" && item.layoutInfo.rect.maxY < point.y) low = mid + 1;
844
- else if (axis === "x" && item.layoutInfo.rect.x > point.x || axis === "y" && item.layoutInfo.rect.y > point.y) high = mid - 1;
845
- else return mid;
846
- }
847
- return Math.max(0, Math.min(items.length - 1, low));
848
- }
849
- buildPersistedIndices() {
850
- if (this.virtualizer.persistedKeys === this.lastPersistedKeys) return;
851
- this.lastPersistedKeys = this.virtualizer.persistedKeys;
852
- this.persistedIndices.clear();
853
- // Build a map of parentKey => indices of children to persist.
854
- for (let key of this.virtualizer.persistedKeys){
855
- let layoutInfo = this.layoutInfos.get(key);
856
- // Walk up ancestors so parents are also persisted if children are.
857
- while(layoutInfo && layoutInfo.parentKey){
858
- let collectionNode = this.collection.getItem(layoutInfo.key);
859
- let indices = this.persistedIndices.get(layoutInfo.parentKey);
860
- if (!indices) {
861
- // stickyColumnIndices are always persisted along with any cells from persistedKeys.
862
- indices = collectionNode.type === "cell" || collectionNode.type === "column" ? [
863
- ...this.stickyColumnIndices
864
- ] : [];
865
- this.persistedIndices.set(layoutInfo.parentKey, indices);
866
- }
867
- let index = this.layoutNodes.get(layoutInfo.key).index;
868
- if (!indices.includes(index)) indices.push(index);
869
- layoutInfo = this.layoutInfos.get(layoutInfo.parentKey);
870
- }
871
- }
872
- for (let indices of this.persistedIndices.values())indices.sort((a, b)=>a - b);
873
- }
874
- getInitialLayoutInfo(layoutInfo) {
875
- let res = super.getInitialLayoutInfo(layoutInfo);
876
- res.transform = null;
877
- return res;
878
- }
879
- getFinalLayoutInfo(layoutInfo) {
880
- let res = super.getFinalLayoutInfo(layoutInfo);
881
- res.transform = null;
882
- return res;
883
- }
884
- // Checks if Chrome version is 105 or greater
885
- checkChrome105() {
886
- var _window_navigator_userAgentData;
887
- if (typeof window === "undefined" || window.navigator == null) return false;
888
- let isChrome105;
889
- if (window.navigator["userAgentData"]) isChrome105 = (_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((b)=>b.brand === "Chromium" && Number(b.version) === 105);
890
- else {
891
- let regex = /Chrome\/(\d+)/;
892
- let matches = regex.exec(window.navigator.userAgent);
893
- isChrome105 = matches && matches.length >= 2 && Number(matches[1]) === 105;
894
- }
895
- return isChrome105;
896
- }
897
- getDropTargetFromPoint(x, y, isValidDropTarget) {
898
- var _this_virtualizer_layout_getVisibleLayoutInfos_find;
899
- x += this.virtualizer.visibleRect.x;
900
- y += this.virtualizer.visibleRect.y;
901
- // Offset for height of header row
902
- y -= (_this_virtualizer_layout_getVisibleLayoutInfos_find = this.virtualizer.layout.getVisibleLayoutInfos(new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(x, y, 1, 1)).find((info)=>info.type === "headerrow")) === null || _this_virtualizer_layout_getVisibleLayoutInfos_find === void 0 ? void 0 : _this_virtualizer_layout_getVisibleLayoutInfos_find.rect.height;
903
- // Custom variation of this.virtualizer.keyAtPoint that ignores body
904
- let key;
905
- let point = new (0, $cMJQZ$reactstatelyvirtualizer.Point)(x, y);
906
- let rectAtPoint = new (0, $cMJQZ$reactstatelyvirtualizer.Rect)(point.x, point.y, 1, 1);
907
- let layoutInfos = this.virtualizer.layout.getVisibleLayoutInfos(rectAtPoint).filter((info)=>info.type === "row");
908
- // Layout may return multiple layout infos in the case of
909
- // persisted keys, so find the first one that actually intersects.
910
- for (let layoutInfo of layoutInfos)if (layoutInfo.rect.intersects(rectAtPoint)) key = layoutInfo.key;
911
- if (key == null || this.collection.size === 0) return {
912
- type: "root"
913
- };
914
- let layoutInfo = this.getLayoutInfo(key);
915
- let rect = layoutInfo.rect;
916
- let target = {
917
- type: "item",
918
- key: layoutInfo.key,
919
- dropPosition: "on"
920
- };
921
- // If dropping on the item isn't accepted, try the target before or after depending on the y position.
922
- // Otherwise, if dropping on the item is accepted, still try the before/after positions if within 10px
923
- // of the top or bottom of the item.
924
- if (!isValidDropTarget(target)) {
925
- if (y <= rect.y + rect.height / 2 && isValidDropTarget({
926
- ...target,
927
- dropPosition: "before"
928
- })) target.dropPosition = "before";
929
- else if (isValidDropTarget({
930
- ...target,
931
- dropPosition: "after"
932
- })) target.dropPosition = "after";
933
- } else if (y <= rect.y + 10 && isValidDropTarget({
934
- ...target,
935
- dropPosition: "before"
936
- })) target.dropPosition = "before";
937
- else if (y >= rect.maxY - 10 && isValidDropTarget({
938
- ...target,
939
- dropPosition: "after"
940
- })) target.dropPosition = "after";
941
- return target;
942
- }
943
- constructor(options){
944
- super(options);
945
- this.columnWidths = new Map();
946
- this.wasLoading = false;
947
- this.isLoading = false;
948
- this.lastPersistedKeys = null;
949
- this.persistedIndices = new Map();
950
- this.collection = options.initialCollection;
951
- this.stickyColumnIndices = [];
952
- this.disableSticky = this.checkChrome105();
953
- this.columnLayout = options.columnLayout;
954
- let [controlledColumns, uncontrolledColumns] = this.columnLayout.splitColumnsIntoControlledAndUncontrolled(this.collection.columns);
955
- this.controlledColumns = controlledColumns;
956
- this.uncontrolledColumns = uncontrolledColumns;
957
- this.uncontrolledWidths = this.columnLayout.getInitialUncontrolledWidths(uncontrolledColumns);
958
- }
959
- }
960
-
961
-
962
-
963
24
 
964
25
  //# sourceMappingURL=main.js.map