@react-stately/layout 3.6.1-nightly.3402 → 3.6.1-nightly.3412

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
@@ -15,22 +15,17 @@ class $fe69e47e38ed0ac4$export$cacbb3924155d68e extends $cMJQZ$reactstatelyvirtu
15
15
  getVisibleLayoutInfos(rect) {
16
16
  let res = [];
17
17
  let addNodes = (nodes)=>{
18
- for (let node of nodes){
19
- if (this.isVisible(node, rect)) {
20
- res.push(node.layoutInfo);
21
- if (node.header) res.push(node.header);
22
- if (node.children) addNodes(node.children);
23
- } else if (this.virtualizer.isPersistedKey(node)) {
24
- res.push(node.layoutInfo);
25
- if (node.children) addNodes(node.children);
26
- }
18
+ for (let node of nodes)if (this.isVisible(node, rect)) {
19
+ res.push(node.layoutInfo);
20
+ if (node.header) res.push(node.header);
21
+ if (node.children) addNodes(node.children);
27
22
  }
28
23
  };
29
24
  addNodes(this.rootNodes);
30
25
  return res;
31
26
  }
32
27
  isVisible(node, rect) {
33
- return node.layoutInfo.rect.intersects(rect) || node.layoutInfo.isSticky;
28
+ return node.layoutInfo.rect.intersects(rect) || node.layoutInfo.isSticky || this.virtualizer.isPersistedKey(node.layoutInfo.key);
34
29
  }
35
30
  validate(invalidationContext) {
36
31
  // Invalidate cache if the size of the collection changed.
@@ -289,28 +284,6 @@ class $fe69e47e38ed0ac4$export$cacbb3924155d68e extends $cMJQZ$reactstatelyvirtu
289
284
  }
290
285
  return null;
291
286
  }
292
- // getDragTarget(point: Point): DragTarget {
293
- // let visible = this.getVisibleLayoutInfos(new Rect(point.x, point.y, 1, 1));
294
- // if (visible.length > 0) {
295
- // visible = visible.sort((a, b) => b.zIndex - a.zIndex);
296
- // return {
297
- // type: 'item',
298
- // key: visible[0].key
299
- // };
300
- // }
301
- // return null;
302
- // }
303
- // getDropTarget(point: Point): DropTarget {
304
- // let key = this.virtualizer.keyAtPoint(point);
305
- // if (key) {
306
- // return {
307
- // type: 'item',
308
- // key,
309
- // dropPosition: DropPosition.ON
310
- // };
311
- // }
312
- // return null;
313
- // }
314
287
  getInitialLayoutInfo(layoutInfo) {
315
288
  layoutInfo.opacity = 0;
316
289
  layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';
@@ -321,6 +294,40 @@ class $fe69e47e38ed0ac4$export$cacbb3924155d68e extends $cMJQZ$reactstatelyvirtu
321
294
  layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';
322
295
  return layoutInfo;
323
296
  }
297
+ getDropTargetFromPoint(x, y, isValidDropTarget) {
298
+ x += this.virtualizer.visibleRect.x;
299
+ y += this.virtualizer.visibleRect.y;
300
+ let key = this.virtualizer.keyAtPoint(new $cMJQZ$reactstatelyvirtualizer.Point(x, y));
301
+ if (key == null) return;
302
+ let layoutInfo = this.getLayoutInfo(key);
303
+ let rect = layoutInfo.rect;
304
+ let target = {
305
+ type: 'item',
306
+ key: layoutInfo.key,
307
+ dropPosition: 'on'
308
+ };
309
+ // If dropping on the item isn't accepted, try the target before or after depending on the y position.
310
+ // Otherwise, if dropping on the item is accepted, still try the before/after positions if within 10px
311
+ // of the top or bottom of the item.
312
+ if (!isValidDropTarget(target)) {
313
+ if (y <= rect.y + rect.height / 2 && isValidDropTarget({
314
+ ...target,
315
+ dropPosition: 'before'
316
+ })) target.dropPosition = 'before';
317
+ else if (isValidDropTarget({
318
+ ...target,
319
+ dropPosition: 'after'
320
+ })) target.dropPosition = 'after';
321
+ } else if (y <= rect.y + 10 && isValidDropTarget({
322
+ ...target,
323
+ dropPosition: 'before'
324
+ })) target.dropPosition = 'before';
325
+ else if (y >= rect.maxY - 10 && isValidDropTarget({
326
+ ...target,
327
+ dropPosition: 'after'
328
+ })) target.dropPosition = 'after';
329
+ return target;
330
+ }
324
331
  /**
325
332
  * Creates a new ListLayout with options. See the list of properties below for a description
326
333
  * of the options that can be provided.
@@ -365,6 +372,7 @@ class $67c493497dcda343$export$62444c3c724b1b20 extends $fe69e47e38ed0ac4$export
365
372
  this.stickyColumnIndices = this.collection.columns.filter((c)=>c.props.isSelectionCell || this.collection.rowHeaderColumnKeys.has(c.key)
366
373
  ).map((c)=>c.index
367
374
  );
375
+ this.lastPersistedKeys = null;
368
376
  body.layoutInfo.rect.width = Math.max(header.layoutInfo.rect.width, body.layoutInfo.rect.width);
369
377
  this.contentSize = new $cMJQZ$reactstatelyvirtualizer.Size(body.layoutInfo.rect.width, body.layoutInfo.rect.maxY);
370
378
  return [
@@ -425,8 +433,10 @@ class $67c493497dcda343$export$62444c3c724b1b20 extends $fe69e47e38ed0ac4$export
425
433
  getColumnWidth_(node) {
426
434
  var _colspan;
427
435
  let colspan = (_colspan = node.colspan) !== null && _colspan !== void 0 ? _colspan : 1;
436
+ var _colIndex;
437
+ let colIndex = (_colIndex = node.colIndex) !== null && _colIndex !== void 0 ? _colIndex : node.index;
428
438
  let width = 0;
429
- for(let i = node.index; i < node.index + colspan; i++){
439
+ for(let i = colIndex; i < colIndex + colspan; i++){
430
440
  let column = this.collection.columns[i];
431
441
  width += this.getColumnWidth(column.key);
432
442
  }
@@ -561,6 +571,7 @@ class $67c493497dcda343$export$62444c3c724b1b20 extends $fe69e47e38ed0ac4$export
561
571
  }
562
572
  getVisibleLayoutInfos(rect) {
563
573
  let res = [];
574
+ this.buildPersistedIndices();
564
575
  for (let node of this.rootNodes){
565
576
  res.push(node.layoutInfo);
566
577
  this.addVisibleLayoutInfos(res, node, rect);
@@ -580,20 +591,25 @@ class $67c493497dcda343$export$62444c3c724b1b20 extends $fe69e47e38ed0ac4$export
580
591
  {
581
592
  let firstVisibleRow = this.binarySearch(node.children, rect.topLeft, 'y');
582
593
  let lastVisibleRow = this.binarySearch(node.children, rect.bottomRight, 'y');
583
- // Check to see if a persisted key exists before the visible rows
584
- // This is for keeping focus on a row that scrolls out of view
585
- for(let h = 0; h < firstVisibleRow; h++)if (this.virtualizer.isPersistedKey(node.children[h])) {
586
- res.push(node.children[h].layoutInfo);
587
- this.addVisibleLayoutInfos(res, node.children[h], rect);
594
+ // Add persisted rows before the visible rows.
595
+ let persistedRowIndices = this.persistedIndices.get(node.layoutInfo.key);
596
+ let persistIndex = 0;
597
+ while(persistedRowIndices && persistIndex < persistedRowIndices.length && persistedRowIndices[persistIndex] < firstVisibleRow){
598
+ let idx = persistedRowIndices[persistIndex];
599
+ res.push(node.children[idx].layoutInfo);
600
+ this.addVisibleLayoutInfos(res, node.children[idx], rect);
601
+ persistIndex++;
588
602
  }
589
603
  for(let i = firstVisibleRow; i <= lastVisibleRow; i++){
604
+ // Skip persisted rows that overlap with visible cells.
605
+ while(persistedRowIndices && persistIndex < persistedRowIndices.length && persistedRowIndices[persistIndex] < i)persistIndex++;
590
606
  res.push(node.children[i].layoutInfo);
591
607
  this.addVisibleLayoutInfos(res, node.children[i], rect);
592
608
  }
593
- // Check to see if a persisted key exists after the visible rows
594
- for(let j = lastVisibleRow + 1; j < node.children.length; j++)if (this.virtualizer.isPersistedKey(node.children[j])) {
595
- res.push(node.children[j].layoutInfo);
596
- this.addVisibleLayoutInfos(res, node.children[j], rect);
609
+ // Add persisted rows after the visible rows.
610
+ while(persistedRowIndices && persistIndex < persistedRowIndices.length){
611
+ let idx = persistedRowIndices[persistIndex++];
612
+ res.push(node.children[idx].layoutInfo);
597
613
  }
598
614
  break;
599
615
  }
@@ -603,25 +619,21 @@ class $67c493497dcda343$export$62444c3c724b1b20 extends $fe69e47e38ed0ac4$export
603
619
  let firstVisibleCell = this.binarySearch(node.children, rect.topLeft, 'x');
604
620
  let lastVisibleCell = this.binarySearch(node.children, rect.topRight, 'x');
605
621
  let stickyIndex = 0;
606
- // Check to see if a persisted key exists before the visible cells
607
- // This is for keeping focus on a cell that scrolls out of view
608
- for(let h = 0; h < firstVisibleCell; h++)if (this.virtualizer.isPersistedKey(node.children[h])) res.push(node.children[h].layoutInfo);
622
+ // Add persisted/sticky cells before the visible cells.
623
+ let persistedCellIndices = this.persistedIndices.get(node.layoutInfo.key) || this.stickyColumnIndices;
624
+ while(stickyIndex < persistedCellIndices.length && persistedCellIndices[stickyIndex] < firstVisibleCell){
625
+ let idx = persistedCellIndices[stickyIndex];
626
+ res.push(node.children[idx].layoutInfo);
627
+ stickyIndex++;
628
+ }
609
629
  for(let i = firstVisibleCell; i <= lastVisibleCell; i++){
610
- // Sticky columns and row headers are always in the DOM. Interleave these
611
- // with the visible range so that they are in the right order.
612
- if (stickyIndex < this.stickyColumnIndices.length) {
613
- let idx = this.stickyColumnIndices[stickyIndex];
614
- while(idx < i){
615
- res.push(node.children[idx].layoutInfo);
616
- idx = this.stickyColumnIndices[stickyIndex++];
617
- }
618
- }
630
+ // Skip sticky cells that overlap with visible cells.
631
+ while(stickyIndex < persistedCellIndices.length && persistedCellIndices[stickyIndex] < i)stickyIndex++;
619
632
  res.push(node.children[i].layoutInfo);
620
633
  }
621
- // Check to see if a persisted key exists after the visible cells
622
- for(let j = lastVisibleCell; j < node.children.length; j++)if (this.virtualizer.isPersistedKey(node.children[j])) res.push(node.children[j].layoutInfo);
623
- while(stickyIndex < this.stickyColumnIndices.length){
624
- let idx = this.stickyColumnIndices[stickyIndex++];
634
+ // Add any remaining sticky cells after the visible cells.
635
+ while(stickyIndex < persistedCellIndices.length){
636
+ let idx = persistedCellIndices[stickyIndex++];
625
637
  res.push(node.children[idx].layoutInfo);
626
638
  }
627
639
  break;
@@ -642,6 +654,33 @@ class $67c493497dcda343$export$62444c3c724b1b20 extends $fe69e47e38ed0ac4$export
642
654
  }
643
655
  return Math.max(0, Math.min(items.length - 1, low));
644
656
  }
657
+ buildPersistedIndices() {
658
+ if (this.virtualizer.persistedKeys === this.lastPersistedKeys) return;
659
+ this.lastPersistedKeys = this.virtualizer.persistedKeys;
660
+ this.persistedIndices.clear();
661
+ // Build a map of parentKey => indices of children to persist.
662
+ for (let key of this.virtualizer.persistedKeys){
663
+ let layoutInfo = this.layoutInfos.get(key);
664
+ // Walk up ancestors so parents are also persisted if children are.
665
+ while(layoutInfo && layoutInfo.parentKey){
666
+ let collectionNode = this.collection.getItem(layoutInfo.key);
667
+ let indices = this.persistedIndices.get(layoutInfo.parentKey);
668
+ if (!indices) {
669
+ // stickyColumnIndices are always persisted along with any cells from persistedKeys.
670
+ indices = collectionNode.type === 'cell' ? [
671
+ ...this.stickyColumnIndices
672
+ ] : [];
673
+ this.persistedIndices.set(layoutInfo.parentKey, indices);
674
+ }
675
+ let index = collectionNode.index;
676
+ if (layoutInfo.parentKey === 'body') index -= this.collection.headerRows.length;
677
+ if (!indices.includes(index)) indices.push(index);
678
+ layoutInfo = this.layoutInfos.get(layoutInfo.parentKey);
679
+ }
680
+ }
681
+ for (let indices of this.persistedIndices.values())indices.sort((a, b)=>a - b
682
+ );
683
+ }
645
684
  getInitialLayoutInfo(layoutInfo) {
646
685
  let res = super.getInitialLayoutInfo(layoutInfo);
647
686
  // If this insert was the result of async loading, remove the zoom effect and just keep the fade in.
@@ -652,6 +691,8 @@ class $67c493497dcda343$export$62444c3c724b1b20 extends $fe69e47e38ed0ac4$export
652
691
  super(options);
653
692
  this.wasLoading = false;
654
693
  this.isLoading = false;
694
+ this.lastPersistedKeys = null;
695
+ this.persistedIndices = new Map();
655
696
  this.stickyColumnIndices = [];
656
697
  }
657
698
  }
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;ACuCA,KAAK,CAAC,oCAAc,GAAG,EAAE;MAYZ,yCAAU,SAAY,qCAAM;IA6CvC,aAAa,CAAC,GAAQ,EAAE,CAAC;QACvB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG;IACjC,CAAC;IAED,qBAAqB,CAAC,IAAU,EAAE,CAAC;QACjC,GAAG,CAAC,GAAG,GAAiB,CAAC,CAAC;QAE1B,GAAG,CAAC,QAAQ,IAAI,KAAmB,GAAK,CAAC;YACvC,GAAG,EAAE,GAAG,CAAC,IAAI,IAAI,KAAK,CAAE,CAAC;gBACvB,EAAE,EAAE,IAAI,CAAC,SAA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,CAjXC,UAAU,GAAG,KAAK;QALb,IAsXN,CAhXC,SAAS,GAAG,KAAK;QAIf,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;IAC/B,CAAC;;;","sources":["packages/@react-stately/layout/src/index.ts","packages/@react-stately/layout/src/ListLayout.ts","packages/@react-stately/layout/src/TableLayout.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport type {ListLayoutOptions, LayoutNode} from './ListLayout';\nexport {ListLayout} from './ListLayout';\nexport {TableLayout} from './TableLayout';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, KeyboardDelegate, Node} from '@react-types/shared';\nimport {InvalidationContext, Layout, LayoutInfo, Rect, Size} from '@react-stately/virtualizer';\nimport {Key} from 'react';\n// import { DragTarget, DropTarget, DropPosition } from '@react-types/shared';\n\nexport type ListLayoutOptions<T> = {\n /** The height of a row in px. */\n rowHeight?: number,\n estimatedRowHeight?: number,\n headingHeight?: number,\n estimatedHeadingHeight?: number,\n padding?: number,\n indentationForItem?: (collection: Collection<Node<T>>, key: Key) => number,\n collator?: Intl.Collator,\n loaderHeight?: number,\n placeholderHeight?: number,\n allowDisabledKeyFocus?: boolean\n};\n\n// A wrapper around LayoutInfo that supports hierarchy\nexport interface LayoutNode {\n node?: Node<unknown>,\n layoutInfo: LayoutInfo,\n header?: LayoutInfo,\n children?: LayoutNode[]\n}\n\nconst DEFAULT_HEIGHT = 48;\n\n/**\n * The ListLayout class is an implementation of a collection view {@link Layout}\n * it is used for creating lists and lists with indented sub-lists.\n *\n * To configure a ListLayout, you can use the properties to define the\n * layouts and/or use the method for defining indentation.\n * The {@link ListKeyboardDelegate} extends the existing collection view\n * delegate with an additional method to do this (it uses the same delegate object as\n * the collection view itself).\n */\nexport class ListLayout<T> extends Layout<Node<T>> implements KeyboardDelegate {\n protected rowHeight: number;\n protected estimatedRowHeight: number;\n protected headingHeight: number;\n protected estimatedHeadingHeight: number;\n protected padding: number;\n protected indentationForItem?: (collection: Collection<Node<T>>, key: Key) => number;\n protected layoutInfos: Map<Key, LayoutInfo>;\n protected layoutNodes: Map<Key, LayoutNode>;\n protected contentSize: Size;\n collection: Collection<Node<T>>;\n disabledKeys: Set<Key> = new Set();\n allowDisabledKeyFocus: boolean = false;\n isLoading: boolean;\n protected lastWidth: number;\n protected lastCollection: Collection<Node<T>>;\n protected rootNodes: LayoutNode[];\n protected collator: Intl.Collator;\n protected invalidateEverything: boolean;\n protected loaderHeight: number;\n protected placeholderHeight: number;\n\n /**\n * Creates a new ListLayout with options. See the list of properties below for a description\n * of the options that can be provided.\n */\n constructor(options: ListLayoutOptions<T> = {}) {\n super();\n this.rowHeight = options.rowHeight;\n this.estimatedRowHeight = options.estimatedRowHeight;\n this.headingHeight = options.headingHeight;\n this.estimatedHeadingHeight = options.estimatedHeadingHeight;\n this.padding = options.padding || 0;\n this.indentationForItem = options.indentationForItem;\n this.collator = options.collator;\n this.loaderHeight = options.loaderHeight;\n this.placeholderHeight = options.placeholderHeight;\n this.layoutInfos = new Map();\n this.layoutNodes = new Map();\n this.rootNodes = [];\n this.lastWidth = 0;\n this.lastCollection = null;\n this.allowDisabledKeyFocus = options.allowDisabledKeyFocus;\n }\n\n getLayoutInfo(key: Key) {\n return this.layoutInfos.get(key);\n }\n\n getVisibleLayoutInfos(rect: Rect) {\n let res: LayoutInfo[] = [];\n\n let addNodes = (nodes: LayoutNode[]) => {\n for (let node of nodes) {\n if (this.isVisible(node, rect)) {\n res.push(node.layoutInfo);\n if (node.header) {\n res.push(node.header);\n }\n\n if (node.children) {\n addNodes(node.children);\n }\n } else if (this.virtualizer.isPersistedKey(node)) {\n res.push(node.layoutInfo);\n\n if (node.children) {\n addNodes(node.children);\n }\n }\n }\n };\n\n addNodes(this.rootNodes);\n return res;\n }\n\n isVisible(node: LayoutNode, rect: Rect) {\n return node.layoutInfo.rect.intersects(rect) || node.layoutInfo.isSticky;\n }\n\n validate(invalidationContext: InvalidationContext<Node<T>, unknown>) {\n // Invalidate cache if the size of the collection changed.\n // In this case, we need to recalculate the entire layout.\n this.invalidateEverything = invalidationContext.sizeChanged;\n\n this.collection = this.virtualizer.collection;\n this.rootNodes = this.buildCollection();\n\n // Remove deleted layout nodes\n if (this.lastCollection) {\n for (let key of this.lastCollection.getKeys()) {\n if (!this.collection.getItem(key)) {\n let layoutNode = this.layoutNodes.get(key);\n if (layoutNode) {\n this.layoutInfos.delete(layoutNode.layoutInfo.key);\n this.layoutInfos.delete(layoutNode.header?.key);\n this.layoutNodes.delete(key);\n }\n }\n }\n }\n\n this.lastWidth = this.virtualizer.visibleRect.width;\n this.lastCollection = this.collection;\n }\n\n buildCollection(): LayoutNode[] {\n let y = this.padding;\n let nodes = [];\n for (let node of this.collection) {\n let layoutNode = this.buildChild(node, 0, y);\n y = layoutNode.layoutInfo.rect.maxY;\n nodes.push(layoutNode);\n }\n\n if (this.isLoading) {\n let rect = new Rect(0, y, this.virtualizer.visibleRect.width,\n this.loaderHeight ?? this.virtualizer.visibleRect.height);\n let loader = new LayoutInfo('loader', 'loader', rect);\n this.layoutInfos.set('loader', loader);\n nodes.push({layoutInfo: loader});\n y = loader.rect.maxY;\n }\n\n if (nodes.length === 0) {\n let rect = new Rect(0, y, this.virtualizer.visibleRect.width,\n this.placeholderHeight ?? this.virtualizer.visibleRect.height);\n let placeholder = new LayoutInfo('placeholder', 'placeholder', rect);\n this.layoutInfos.set('placeholder', placeholder);\n nodes.push({layoutInfo: placeholder});\n y = placeholder.rect.maxY;\n }\n\n this.contentSize = new Size(this.virtualizer.visibleRect.width, y + this.padding);\n return nodes;\n }\n\n buildChild(node: Node<T>, x: number, y: number): LayoutNode {\n let cached = this.layoutNodes.get(node.key);\n if (!this.invalidateEverything && cached && cached.node === node && y === (cached.header || cached.layoutInfo).rect.y) {\n return cached;\n }\n\n let layoutNode = this.buildNode(node, x, y);\n layoutNode.node = node;\n\n layoutNode.layoutInfo.parentKey = node.parentKey ?? null;\n this.layoutInfos.set(layoutNode.layoutInfo.key, layoutNode.layoutInfo);\n if (layoutNode.header) {\n this.layoutInfos.set(layoutNode.header.key, layoutNode.header);\n }\n\n this.layoutNodes.set(node.key, layoutNode);\n return layoutNode;\n }\n\n buildNode(node: Node<T>, x: number, y: number): LayoutNode {\n switch (node.type) {\n case 'section':\n return this.buildSection(node, x, y);\n case 'item':\n return this.buildItem(node, x, y);\n }\n }\n\n buildSection(node: Node<T>, x: number, y: number): LayoutNode {\n let width = this.virtualizer.visibleRect.width;\n let rectHeight = this.headingHeight;\n let isEstimated = false;\n\n // If no explicit height is available, use an estimated height.\n if (rectHeight == null) {\n // If a previous version of this layout info exists, reuse its height.\n // Mark as estimated if the size of the overall collection view changed,\n // or the content of the item changed.\n let previousLayoutNode = this.layoutNodes.get(node.key);\n if (previousLayoutNode && previousLayoutNode.header) {\n let curNode = this.collection.getItem(node.key);\n let lastNode = this.lastCollection ? this.lastCollection.getItem(node.key) : null;\n rectHeight = previousLayoutNode.header.rect.height;\n isEstimated = width !== this.lastWidth || curNode !== lastNode || previousLayoutNode.header.estimatedSize;\n } else {\n rectHeight = (node.rendered ? this.estimatedHeadingHeight : 0);\n isEstimated = true;\n }\n }\n\n if (rectHeight == null) {\n rectHeight = DEFAULT_HEIGHT;\n }\n\n let headerRect = new Rect(0, y, width, rectHeight);\n let header = new LayoutInfo('header', node.key + ':header', headerRect);\n header.estimatedSize = isEstimated;\n header.parentKey = node.key;\n y += header.rect.height;\n\n let rect = new Rect(0, y, width, 0);\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n\n let startY = y;\n let children = [];\n for (let child of node.childNodes) {\n let layoutNode = this.buildChild(child, x, y);\n y = layoutNode.layoutInfo.rect.maxY;\n children.push(layoutNode);\n }\n\n rect.height = y - startY;\n\n return {\n header,\n layoutInfo,\n children\n };\n }\n\n buildItem(node: Node<T>, x: number, y: number): LayoutNode {\n let width = this.virtualizer.visibleRect.width;\n let rectHeight = this.rowHeight;\n let isEstimated = false;\n\n // If no explicit height is available, use an estimated height.\n if (rectHeight == null) {\n // If a previous version of this layout info exists, reuse its height.\n // Mark as estimated if the size of the overall collection view changed,\n // or the content of the item changed.\n let previousLayoutNode = this.layoutNodes.get(node.key);\n if (previousLayoutNode) {\n let curNode = this.collection.getItem(node.key);\n let lastNode = this.lastCollection ? this.lastCollection.getItem(node.key) : null;\n rectHeight = previousLayoutNode.layoutInfo.rect.height;\n isEstimated = width !== this.lastWidth || curNode !== lastNode || previousLayoutNode.layoutInfo.estimatedSize;\n } else {\n rectHeight = this.estimatedRowHeight;\n isEstimated = true;\n }\n }\n\n if (rectHeight == null) {\n rectHeight = DEFAULT_HEIGHT;\n }\n\n if (typeof this.indentationForItem === 'function') {\n x += this.indentationForItem(this.collection, node.key) || 0;\n }\n\n let rect = new Rect(x, y, width - x, rectHeight);\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n // allow overflow so the focus ring/selection ring can extend outside to overlap with the adjacent items borders\n layoutInfo.allowOverflow = true;\n layoutInfo.estimatedSize = isEstimated;\n return {\n layoutInfo\n };\n }\n\n updateItemSize(key: Key, size: Size) {\n let layoutInfo = this.layoutInfos.get(key);\n // If no layoutInfo, item has been deleted/removed.\n if (!layoutInfo) {\n return false;\n }\n\n layoutInfo.estimatedSize = false;\n if (layoutInfo.rect.height !== size.height) {\n // Copy layout info rather than mutating so that later caches are invalidated.\n let newLayoutInfo = layoutInfo.copy();\n newLayoutInfo.rect.height = size.height;\n this.layoutInfos.set(key, newLayoutInfo);\n\n // Invalidate layout for this layout node and all parents\n this.updateLayoutNode(key, layoutInfo, newLayoutInfo);\n\n let node = this.collection.getItem(layoutInfo.parentKey);\n while (node) {\n this.updateLayoutNode(node.key, layoutInfo, newLayoutInfo);\n node = this.collection.getItem(node.parentKey);\n }\n\n return true;\n }\n\n return false;\n }\n\n updateLayoutNode(key: Key, oldLayoutInfo: LayoutInfo, newLayoutInfo: LayoutInfo) {\n let n = this.layoutNodes.get(key);\n if (n) {\n // Invalidate by clearing node.\n n.node = null;\n\n // Replace layout info in LayoutNode\n if (n.header === oldLayoutInfo) {\n n.header = newLayoutInfo;\n } else if (n.layoutInfo === oldLayoutInfo) {\n n.layoutInfo = newLayoutInfo;\n }\n }\n }\n\n getContentSize() {\n return this.contentSize;\n }\n\n getKeyAbove(key: Key) {\n let collection = this.collection;\n\n key = collection.getKeyBefore(key);\n while (key != null) {\n let item = collection.getItem(key);\n if (item.type === 'item' && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) {\n return key;\n }\n\n key = collection.getKeyBefore(key);\n }\n }\n\n getKeyBelow(key: Key) {\n let collection = this.collection;\n\n key = collection.getKeyAfter(key);\n while (key != null) {\n let item = collection.getItem(key);\n if (item.type === 'item' && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) {\n return key;\n }\n\n key = collection.getKeyAfter(key);\n }\n }\n\n getKeyLeftOf(key: Key): Key {\n return key;\n }\n\n getKeyRightOf(key: Key): Key {\n return key;\n }\n\n getKeyPageAbove(key: Key) {\n let layoutInfo = this.getLayoutInfo(key);\n\n if (layoutInfo) {\n let pageY = Math.max(0, layoutInfo.rect.y + layoutInfo.rect.height - this.virtualizer.visibleRect.height);\n while (layoutInfo && layoutInfo.rect.y > pageY) {\n let keyAbove = this.getKeyAbove(layoutInfo.key);\n layoutInfo = this.getLayoutInfo(keyAbove);\n }\n\n if (layoutInfo) {\n return layoutInfo.key;\n }\n }\n\n return this.getFirstKey();\n }\n\n getKeyPageBelow(key: Key) {\n let layoutInfo = this.getLayoutInfo(key != null ? key : this.getFirstKey());\n\n if (layoutInfo) {\n let pageY = Math.min(this.virtualizer.contentSize.height, layoutInfo.rect.y - layoutInfo.rect.height + this.virtualizer.visibleRect.height);\n while (layoutInfo && layoutInfo.rect.y < pageY) {\n let keyBelow = this.getKeyBelow(layoutInfo.key);\n layoutInfo = this.getLayoutInfo(keyBelow);\n }\n\n if (layoutInfo) {\n return layoutInfo.key;\n }\n }\n\n return this.getLastKey();\n }\n\n getFirstKey() {\n let collection = this.collection;\n let key = collection.getFirstKey();\n while (key != null) {\n let item = collection.getItem(key);\n if (item.type === 'item' && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) {\n return key;\n }\n\n key = collection.getKeyAfter(key);\n }\n }\n\n getLastKey() {\n let collection = this.collection;\n let key = collection.getLastKey();\n while (key != null) {\n let item = collection.getItem(key);\n if (item.type === 'item' && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) {\n return key;\n }\n\n key = collection.getKeyBefore(key);\n }\n }\n\n getKeyForSearch(search: string, fromKey?: Key) {\n if (!this.collator) {\n return null;\n }\n\n let collection = this.collection;\n let key = fromKey || this.getFirstKey();\n while (key != null) {\n let item = collection.getItem(key);\n let substring = item.textValue.slice(0, search.length);\n if (item.textValue && this.collator.compare(substring, search) === 0) {\n return key;\n }\n\n key = this.getKeyBelow(key);\n }\n\n return null;\n }\n\n // getDragTarget(point: Point): DragTarget {\n // let visible = this.getVisibleLayoutInfos(new Rect(point.x, point.y, 1, 1));\n // if (visible.length > 0) {\n // visible = visible.sort((a, b) => b.zIndex - a.zIndex);\n // return {\n // type: 'item',\n // key: visible[0].key\n // };\n // }\n\n // return null;\n // }\n\n // getDropTarget(point: Point): DropTarget {\n // let key = this.virtualizer.keyAtPoint(point);\n // if (key) {\n // return {\n // type: 'item',\n // key,\n // dropPosition: DropPosition.ON\n // };\n // }\n\n // return null;\n // }\n\n getInitialLayoutInfo(layoutInfo: LayoutInfo) {\n layoutInfo.opacity = 0;\n layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';\n return layoutInfo;\n }\n\n getFinalLayoutInfo(layoutInfo: LayoutInfo) {\n layoutInfo.opacity = 0;\n layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';\n return layoutInfo;\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {GridNode} from '@react-types/grid';\nimport {Key} from 'react';\nimport {LayoutInfo, Point, Rect, Size} from '@react-stately/virtualizer';\nimport {LayoutNode, ListLayout, ListLayoutOptions} from './ListLayout';\nimport {TableCollection} from '@react-types/table';\n\n\nexport class TableLayout<T> extends ListLayout<T> {\n collection: TableCollection<T>;\n lastCollection: TableCollection<T>;\n getColumnWidth: (key: Key) => number;\n stickyColumnIndices: number[];\n wasLoading = false;\n isLoading = false;\n\n constructor(options: ListLayoutOptions<T>) {\n super(options);\n this.stickyColumnIndices = [];\n }\n\n\n buildCollection(): LayoutNode[] {\n // If columns changed, clear layout cache.\n if (\n !this.lastCollection ||\n this.collection.columns.length !== this.lastCollection.columns.length ||\n this.collection.columns.some((c, i) => c.key !== this.lastCollection.columns[i].key)\n ) {\n // Invalidate everything in this layout pass. Will be reset in ListLayout on the next pass.\n this.invalidateEverything = true;\n }\n\n // Track whether we were previously loading. This is used to adjust the animations of async loading vs inserts.\n let loadingState = this.collection.body.props.loadingState;\n this.wasLoading = this.isLoading;\n this.isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n\n let header = this.buildHeader();\n let body = this.buildBody(0);\n this.stickyColumnIndices = this.collection.columns.filter(c => c.props.isSelectionCell || this.collection.rowHeaderColumnKeys.has(c.key)).map(c => c.index);\n\n body.layoutInfo.rect.width = Math.max(header.layoutInfo.rect.width, body.layoutInfo.rect.width);\n this.contentSize = new Size(body.layoutInfo.rect.width, body.layoutInfo.rect.maxY);\n return [\n header,\n body\n ];\n }\n\n buildHeader(): LayoutNode {\n let rect = new Rect(0, 0, 0, 0);\n let layoutInfo = new LayoutInfo('header', 'header', rect);\n\n let y = 0;\n let width = 0;\n let children: LayoutNode[] = [];\n for (let headerRow of this.collection.headerRows) {\n let layoutNode = this.buildChild(headerRow, 0, y);\n layoutNode.layoutInfo.parentKey = 'header';\n y = layoutNode.layoutInfo.rect.maxY;\n width = Math.max(width, layoutNode.layoutInfo.rect.width);\n children.push(layoutNode);\n }\n\n rect.width = width;\n rect.height = y;\n\n this.layoutInfos.set('header', layoutInfo);\n\n return {\n layoutInfo,\n children\n };\n }\n\n buildHeaderRow(headerRow: GridNode<T>, x: number, y: number) {\n let rect = new Rect(0, y, 0, 0);\n let row = new LayoutInfo('headerrow', headerRow.key, rect);\n\n let height = 0;\n let columns: LayoutNode[] = [];\n for (let cell of headerRow.childNodes) {\n let layoutNode = this.buildChild(cell, x, y);\n layoutNode.layoutInfo.parentKey = row.key;\n x = layoutNode.layoutInfo.rect.maxX;\n height = Math.max(height, layoutNode.layoutInfo.rect.height);\n columns.push(layoutNode);\n }\n\n this.setChildHeights(columns, height);\n\n rect.height = height;\n rect.width = x;\n\n return {\n layoutInfo: row,\n children: columns\n };\n }\n\n setChildHeights(children: LayoutNode[], height: number) {\n for (let child of children) {\n if (child.layoutInfo.rect.height !== height) {\n // Need to copy the layout info before we mutate it.\n child.layoutInfo = child.layoutInfo.copy();\n this.layoutInfos.set(child.layoutInfo.key, child.layoutInfo);\n\n child.layoutInfo.rect.height = height;\n }\n }\n }\n\n // used to get the column widths when rendering to the DOM\n getColumnWidth_(node: GridNode<T>) {\n let colspan = node.colspan ?? 1;\n let width = 0;\n for (let i = node.index; i < node.index + colspan; i++) {\n let column = this.collection.columns[i];\n width += this.getColumnWidth(column.key);\n }\n\n return width;\n }\n\n getEstimatedHeight(node: GridNode<T>, width: number, height: number, estimatedHeight: number) {\n let isEstimated = false;\n\n // If no explicit height is available, use an estimated height.\n if (height == null) {\n // If a previous version of this layout info exists, reuse its height.\n // Mark as estimated if the size of the overall collection view changed,\n // or the content of the item changed.\n let previousLayoutNode = this.layoutNodes.get(node.key);\n if (previousLayoutNode) {\n let curNode = this.collection.getItem(node.key);\n let lastNode = this.lastCollection ? this.lastCollection.getItem(node.key) : null;\n height = previousLayoutNode.layoutInfo.rect.height;\n isEstimated = curNode !== lastNode || width !== previousLayoutNode.layoutInfo.rect.width || previousLayoutNode.layoutInfo.estimatedSize;\n } else {\n height = estimatedHeight;\n isEstimated = true;\n }\n }\n\n return {height, isEstimated};\n }\n\n buildColumn(node: GridNode<T>, x: number, y: number): LayoutNode {\n let width = this.getColumnWidth_(node);\n let {height, isEstimated} = this.getEstimatedHeight(node, width, this.headingHeight, this.estimatedHeadingHeight);\n let rect = new Rect(x, y, width, height);\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n layoutInfo.isSticky = node.props?.isSelectionCell;\n layoutInfo.zIndex = layoutInfo.isSticky ? 2 : 1;\n layoutInfo.estimatedSize = isEstimated;\n\n return {\n layoutInfo\n };\n }\n\n buildBody(y: number): LayoutNode {\n let rect = new Rect(0, y, 0, 0);\n let layoutInfo = new LayoutInfo('rowgroup', 'body', rect);\n\n let startY = y;\n let width = 0;\n let children: LayoutNode[] = [];\n for (let node of this.collection.body.childNodes) {\n let layoutNode = this.buildChild(node, 0, y);\n layoutNode.layoutInfo.parentKey = 'body';\n y = layoutNode.layoutInfo.rect.maxY;\n width = Math.max(width, layoutNode.layoutInfo.rect.width);\n children.push(layoutNode);\n }\n\n if (this.isLoading) {\n let rect = new Rect(0, y, width || this.virtualizer.visibleRect.width, children.length === 0 ? this.virtualizer.visibleRect.height : 60);\n let loader = new LayoutInfo('loader', 'loader', rect);\n loader.parentKey = 'body';\n loader.isSticky = children.length === 0;\n this.layoutInfos.set('loader', loader);\n children.push({layoutInfo: loader});\n y = loader.rect.maxY;\n width = Math.max(width, rect.width);\n } else if (children.length === 0) {\n let rect = new Rect(0, y, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);\n let empty = new LayoutInfo('empty', 'empty', rect);\n empty.parentKey = 'body';\n empty.isSticky = true;\n this.layoutInfos.set('empty', empty);\n children.push({layoutInfo: empty});\n y = empty.rect.maxY;\n width = Math.max(width, rect.width);\n }\n\n rect.width = width;\n rect.height = y - startY;\n\n this.layoutInfos.set('body', layoutInfo);\n\n return {\n layoutInfo,\n children\n };\n }\n\n buildNode(node: GridNode<T>, x: number, y: number): LayoutNode {\n switch (node.type) {\n case 'headerrow':\n return this.buildHeaderRow(node, x, y);\n case 'item':\n return this.buildRow(node, x, y);\n case 'column':\n case 'placeholder':\n return this.buildColumn(node, x, y);\n case 'cell':\n return this.buildCell(node, x, y);\n default:\n throw new Error('Unknown node type ' + node.type);\n }\n }\n\n buildRow(node: GridNode<T>, x: number, y: number): LayoutNode {\n let rect = new Rect(x, y, 0, 0);\n let layoutInfo = new LayoutInfo('row', node.key, rect);\n\n let children: LayoutNode[] = [];\n let height = 0;\n for (let child of node.childNodes) {\n let layoutNode = this.buildChild(child, x, y);\n x = layoutNode.layoutInfo.rect.maxX;\n height = Math.max(height, layoutNode.layoutInfo.rect.height);\n children.push(layoutNode);\n }\n\n this.setChildHeights(children, height);\n\n rect.width = x;\n rect.height = height + 1; // +1 for bottom border\n\n return {\n layoutInfo,\n children\n };\n }\n\n buildCell(node: GridNode<T>, x: number, y: number): LayoutNode {\n let width = this.getColumnWidth_(node);\n let {height, isEstimated} = this.getEstimatedHeight(node, width, this.rowHeight, this.estimatedRowHeight);\n let rect = new Rect(x, y, width, height);\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n layoutInfo.isSticky = node.props?.isSelectionCell;\n layoutInfo.zIndex = layoutInfo.isSticky ? 2 : 1;\n layoutInfo.estimatedSize = isEstimated;\n\n return {\n layoutInfo\n };\n }\n\n getVisibleLayoutInfos(rect: Rect) {\n let res: LayoutInfo[] = [];\n\n for (let node of this.rootNodes) {\n res.push(node.layoutInfo);\n this.addVisibleLayoutInfos(res, node, rect);\n }\n\n return res;\n }\n\n addVisibleLayoutInfos(res: LayoutInfo[], node: LayoutNode, rect: Rect) {\n if (!node.children || node.children.length === 0) {\n return;\n }\n\n switch (node.layoutInfo.type) {\n case 'header': {\n for (let child of node.children) {\n res.push(child.layoutInfo);\n this.addVisibleLayoutInfos(res, child, rect);\n }\n break;\n }\n case 'rowgroup': {\n let firstVisibleRow = this.binarySearch(node.children, rect.topLeft, 'y');\n let lastVisibleRow = this.binarySearch(node.children, rect.bottomRight, 'y');\n // Check to see if a persisted key exists before the visible rows\n // This is for keeping focus on a row that scrolls out of view\n for (let h = 0; h < firstVisibleRow; h++) {\n if (this.virtualizer.isPersistedKey(node.children[h])) {\n res.push(node.children[h].layoutInfo);\n this.addVisibleLayoutInfos(res, node.children[h], rect);\n }\n }\n for (let i = firstVisibleRow; i <= lastVisibleRow; i++) {\n res.push(node.children[i].layoutInfo);\n this.addVisibleLayoutInfos(res, node.children[i], rect);\n }\n // Check to see if a persisted key exists after the visible rows\n for (let j = lastVisibleRow + 1; j < node.children.length; j++) {\n if (this.virtualizer.isPersistedKey(node.children[j])) {\n res.push(node.children[j].layoutInfo);\n this.addVisibleLayoutInfos(res, node.children[j], rect);\n }\n }\n break;\n }\n case 'headerrow':\n case 'row': {\n let firstVisibleCell = this.binarySearch(node.children, rect.topLeft, 'x');\n let lastVisibleCell = this.binarySearch(node.children, rect.topRight, 'x');\n let stickyIndex = 0;\n // Check to see if a persisted key exists before the visible cells\n // This is for keeping focus on a cell that scrolls out of view\n for (let h = 0; h < firstVisibleCell; h++) {\n if (this.virtualizer.isPersistedKey(node.children[h])) {\n res.push(node.children[h].layoutInfo);\n }\n }\n for (let i = firstVisibleCell; i <= lastVisibleCell; i++) {\n // Sticky columns and row headers are always in the DOM. Interleave these\n // with the visible range so that they are in the right order.\n if (stickyIndex < this.stickyColumnIndices.length) {\n let idx = this.stickyColumnIndices[stickyIndex];\n while (idx < i) {\n res.push(node.children[idx].layoutInfo);\n idx = this.stickyColumnIndices[stickyIndex++];\n }\n }\n\n res.push(node.children[i].layoutInfo);\n }\n // Check to see if a persisted key exists after the visible cells\n for (let j = lastVisibleCell; j < node.children.length; j++) {\n if (this.virtualizer.isPersistedKey(node.children[j])) {\n res.push(node.children[j].layoutInfo);\n }\n }\n\n while (stickyIndex < this.stickyColumnIndices.length) {\n let idx = this.stickyColumnIndices[stickyIndex++];\n res.push(node.children[idx].layoutInfo);\n }\n break;\n }\n default:\n throw new Error('Unknown node type ' + node.layoutInfo.type);\n }\n }\n\n binarySearch(items: LayoutNode[], point: Point, axis: 'x' | 'y') {\n let low = 0;\n let high = items.length - 1;\n while (low <= high) {\n let mid = (low + high) >> 1;\n let item = items[mid];\n\n if ((axis === 'x' && item.layoutInfo.rect.maxX < point.x) || (axis === 'y' && item.layoutInfo.rect.maxY < point.y)) {\n low = mid + 1;\n } else if ((axis === 'x' && item.layoutInfo.rect.x > point.x) || (axis === 'y' && item.layoutInfo.rect.y > point.y)) {\n high = mid - 1;\n } else {\n return mid;\n }\n }\n\n return Math.max(0, Math.min(items.length - 1, low));\n }\n\n getInitialLayoutInfo(layoutInfo: LayoutInfo) {\n let res = super.getInitialLayoutInfo(layoutInfo);\n\n // If this insert was the result of async loading, remove the zoom effect and just keep the fade in.\n if (this.wasLoading) {\n res.transform = null;\n }\n\n return res;\n }\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;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,mBAAmB,GAAG,CAAC,CAAC;IAC/B,CAAC;;;","sources":["packages/@react-stately/layout/src/index.ts","packages/@react-stately/layout/src/ListLayout.ts","packages/@react-stately/layout/src/TableLayout.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport type {ListLayoutOptions, LayoutNode} from './ListLayout';\nexport {ListLayout} from './ListLayout';\nexport {TableLayout} from './TableLayout';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, DropTarget, DropTargetDelegate, KeyboardDelegate, Node} from '@react-types/shared';\nimport {InvalidationContext, Layout, LayoutInfo, Point, Rect, Size} from '@react-stately/virtualizer';\nimport {Key} from 'react';\n// import { DragTarget, DropTarget, DropPosition } from '@react-types/shared';\n\nexport type ListLayoutOptions<T> = {\n /** The height of a row in px. */\n rowHeight?: number,\n estimatedRowHeight?: number,\n headingHeight?: number,\n estimatedHeadingHeight?: number,\n padding?: number,\n indentationForItem?: (collection: Collection<Node<T>>, key: Key) => number,\n collator?: Intl.Collator,\n loaderHeight?: number,\n placeholderHeight?: number,\n allowDisabledKeyFocus?: boolean\n};\n\n// A wrapper around LayoutInfo that supports hierarchy\nexport interface LayoutNode {\n node?: Node<unknown>,\n layoutInfo: LayoutInfo,\n header?: LayoutInfo,\n children?: LayoutNode[]\n}\n\nconst DEFAULT_HEIGHT = 48;\n\n/**\n * The ListLayout class is an implementation of a collection view {@link Layout}\n * it is used for creating lists and lists with indented sub-lists.\n *\n * To configure a ListLayout, you can use the properties to define the\n * layouts and/or use the method for defining indentation.\n * The {@link ListKeyboardDelegate} extends the existing collection view\n * delegate with an additional method to do this (it uses the same delegate object as\n * the collection view itself).\n */\nexport class ListLayout<T> extends Layout<Node<T>> implements KeyboardDelegate, DropTargetDelegate {\n protected rowHeight: number;\n protected estimatedRowHeight: number;\n protected headingHeight: number;\n protected estimatedHeadingHeight: number;\n protected padding: number;\n protected indentationForItem?: (collection: Collection<Node<T>>, key: Key) => number;\n protected layoutInfos: Map<Key, LayoutInfo>;\n protected layoutNodes: Map<Key, LayoutNode>;\n protected contentSize: Size;\n collection: Collection<Node<T>>;\n disabledKeys: Set<Key> = new Set();\n allowDisabledKeyFocus: boolean = false;\n isLoading: boolean;\n protected lastWidth: number;\n protected lastCollection: Collection<Node<T>>;\n protected rootNodes: LayoutNode[];\n protected collator: Intl.Collator;\n protected invalidateEverything: boolean;\n protected loaderHeight: number;\n protected placeholderHeight: number;\n\n /**\n * Creates a new ListLayout with options. See the list of properties below for a description\n * of the options that can be provided.\n */\n constructor(options: ListLayoutOptions<T> = {}) {\n super();\n this.rowHeight = options.rowHeight;\n this.estimatedRowHeight = options.estimatedRowHeight;\n this.headingHeight = options.headingHeight;\n this.estimatedHeadingHeight = options.estimatedHeadingHeight;\n this.padding = options.padding || 0;\n this.indentationForItem = options.indentationForItem;\n this.collator = options.collator;\n this.loaderHeight = options.loaderHeight;\n this.placeholderHeight = options.placeholderHeight;\n this.layoutInfos = new Map();\n this.layoutNodes = new Map();\n this.rootNodes = [];\n this.lastWidth = 0;\n this.lastCollection = null;\n this.allowDisabledKeyFocus = options.allowDisabledKeyFocus;\n }\n\n getLayoutInfo(key: Key) {\n return this.layoutInfos.get(key);\n }\n\n getVisibleLayoutInfos(rect: Rect) {\n let res: LayoutInfo[] = [];\n\n let addNodes = (nodes: LayoutNode[]) => {\n for (let node of nodes) {\n if (this.isVisible(node, rect)) {\n res.push(node.layoutInfo);\n if (node.header) {\n res.push(node.header);\n }\n\n if (node.children) {\n addNodes(node.children);\n }\n }\n }\n };\n\n addNodes(this.rootNodes);\n return res;\n }\n\n isVisible(node: LayoutNode, rect: Rect) {\n return node.layoutInfo.rect.intersects(rect) || node.layoutInfo.isSticky || this.virtualizer.isPersistedKey(node.layoutInfo.key);\n }\n\n validate(invalidationContext: InvalidationContext<Node<T>, unknown>) {\n // Invalidate cache if the size of the collection changed.\n // In this case, we need to recalculate the entire layout.\n this.invalidateEverything = invalidationContext.sizeChanged;\n\n this.collection = this.virtualizer.collection;\n this.rootNodes = this.buildCollection();\n\n // Remove deleted layout nodes\n if (this.lastCollection) {\n for (let key of this.lastCollection.getKeys()) {\n if (!this.collection.getItem(key)) {\n let layoutNode = this.layoutNodes.get(key);\n if (layoutNode) {\n this.layoutInfos.delete(layoutNode.layoutInfo.key);\n this.layoutInfos.delete(layoutNode.header?.key);\n this.layoutNodes.delete(key);\n }\n }\n }\n }\n\n this.lastWidth = this.virtualizer.visibleRect.width;\n this.lastCollection = this.collection;\n }\n\n buildCollection(): LayoutNode[] {\n let y = this.padding;\n let nodes = [];\n for (let node of this.collection) {\n let layoutNode = this.buildChild(node, 0, y);\n y = layoutNode.layoutInfo.rect.maxY;\n nodes.push(layoutNode);\n }\n\n if (this.isLoading) {\n let rect = new Rect(0, y, this.virtualizer.visibleRect.width,\n this.loaderHeight ?? this.virtualizer.visibleRect.height);\n let loader = new LayoutInfo('loader', 'loader', rect);\n this.layoutInfos.set('loader', loader);\n nodes.push({layoutInfo: loader});\n y = loader.rect.maxY;\n }\n\n if (nodes.length === 0) {\n let rect = new Rect(0, y, this.virtualizer.visibleRect.width,\n this.placeholderHeight ?? this.virtualizer.visibleRect.height);\n let placeholder = new LayoutInfo('placeholder', 'placeholder', rect);\n this.layoutInfos.set('placeholder', placeholder);\n nodes.push({layoutInfo: placeholder});\n y = placeholder.rect.maxY;\n }\n\n this.contentSize = new Size(this.virtualizer.visibleRect.width, y + this.padding);\n return nodes;\n }\n\n buildChild(node: Node<T>, x: number, y: number): LayoutNode {\n let cached = this.layoutNodes.get(node.key);\n if (!this.invalidateEverything && cached && cached.node === node && y === (cached.header || cached.layoutInfo).rect.y) {\n return cached;\n }\n\n let layoutNode = this.buildNode(node, x, y);\n layoutNode.node = node;\n\n layoutNode.layoutInfo.parentKey = node.parentKey ?? null;\n this.layoutInfos.set(layoutNode.layoutInfo.key, layoutNode.layoutInfo);\n if (layoutNode.header) {\n this.layoutInfos.set(layoutNode.header.key, layoutNode.header);\n }\n\n this.layoutNodes.set(node.key, layoutNode);\n return layoutNode;\n }\n\n buildNode(node: Node<T>, x: number, y: number): LayoutNode {\n switch (node.type) {\n case 'section':\n return this.buildSection(node, x, y);\n case 'item':\n return this.buildItem(node, x, y);\n }\n }\n\n buildSection(node: Node<T>, x: number, y: number): LayoutNode {\n let width = this.virtualizer.visibleRect.width;\n let rectHeight = this.headingHeight;\n let isEstimated = false;\n\n // If no explicit height is available, use an estimated height.\n if (rectHeight == null) {\n // If a previous version of this layout info exists, reuse its height.\n // Mark as estimated if the size of the overall collection view changed,\n // or the content of the item changed.\n let previousLayoutNode = this.layoutNodes.get(node.key);\n if (previousLayoutNode && previousLayoutNode.header) {\n let curNode = this.collection.getItem(node.key);\n let lastNode = this.lastCollection ? this.lastCollection.getItem(node.key) : null;\n rectHeight = previousLayoutNode.header.rect.height;\n isEstimated = width !== this.lastWidth || curNode !== lastNode || previousLayoutNode.header.estimatedSize;\n } else {\n rectHeight = (node.rendered ? this.estimatedHeadingHeight : 0);\n isEstimated = true;\n }\n }\n\n if (rectHeight == null) {\n rectHeight = DEFAULT_HEIGHT;\n }\n\n let headerRect = new Rect(0, y, width, rectHeight);\n let header = new LayoutInfo('header', node.key + ':header', headerRect);\n header.estimatedSize = isEstimated;\n header.parentKey = node.key;\n y += header.rect.height;\n\n let rect = new Rect(0, y, width, 0);\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n\n let startY = y;\n let children = [];\n for (let child of node.childNodes) {\n let layoutNode = this.buildChild(child, x, y);\n y = layoutNode.layoutInfo.rect.maxY;\n children.push(layoutNode);\n }\n\n rect.height = y - startY;\n\n return {\n header,\n layoutInfo,\n children\n };\n }\n\n buildItem(node: Node<T>, x: number, y: number): LayoutNode {\n let width = this.virtualizer.visibleRect.width;\n let rectHeight = this.rowHeight;\n let isEstimated = false;\n\n // If no explicit height is available, use an estimated height.\n if (rectHeight == null) {\n // If a previous version of this layout info exists, reuse its height.\n // Mark as estimated if the size of the overall collection view changed,\n // or the content of the item changed.\n let previousLayoutNode = this.layoutNodes.get(node.key);\n if (previousLayoutNode) {\n let curNode = this.collection.getItem(node.key);\n let lastNode = this.lastCollection ? this.lastCollection.getItem(node.key) : null;\n rectHeight = previousLayoutNode.layoutInfo.rect.height;\n isEstimated = width !== this.lastWidth || curNode !== lastNode || previousLayoutNode.layoutInfo.estimatedSize;\n } else {\n rectHeight = this.estimatedRowHeight;\n isEstimated = true;\n }\n }\n\n if (rectHeight == null) {\n rectHeight = DEFAULT_HEIGHT;\n }\n\n if (typeof this.indentationForItem === 'function') {\n x += this.indentationForItem(this.collection, node.key) || 0;\n }\n\n let rect = new Rect(x, y, width - x, rectHeight);\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n // allow overflow so the focus ring/selection ring can extend outside to overlap with the adjacent items borders\n layoutInfo.allowOverflow = true;\n layoutInfo.estimatedSize = isEstimated;\n return {\n layoutInfo\n };\n }\n\n updateItemSize(key: Key, size: Size) {\n let layoutInfo = this.layoutInfos.get(key);\n // If no layoutInfo, item has been deleted/removed.\n if (!layoutInfo) {\n return false;\n }\n\n layoutInfo.estimatedSize = false;\n if (layoutInfo.rect.height !== size.height) {\n // Copy layout info rather than mutating so that later caches are invalidated.\n let newLayoutInfo = layoutInfo.copy();\n newLayoutInfo.rect.height = size.height;\n this.layoutInfos.set(key, newLayoutInfo);\n\n // Invalidate layout for this layout node and all parents\n this.updateLayoutNode(key, layoutInfo, newLayoutInfo);\n\n let node = this.collection.getItem(layoutInfo.parentKey);\n while (node) {\n this.updateLayoutNode(node.key, layoutInfo, newLayoutInfo);\n node = this.collection.getItem(node.parentKey);\n }\n\n return true;\n }\n\n return false;\n }\n\n updateLayoutNode(key: Key, oldLayoutInfo: LayoutInfo, newLayoutInfo: LayoutInfo) {\n let n = this.layoutNodes.get(key);\n if (n) {\n // Invalidate by clearing node.\n n.node = null;\n\n // Replace layout info in LayoutNode\n if (n.header === oldLayoutInfo) {\n n.header = newLayoutInfo;\n } else if (n.layoutInfo === oldLayoutInfo) {\n n.layoutInfo = newLayoutInfo;\n }\n }\n }\n\n getContentSize() {\n return this.contentSize;\n }\n\n getKeyAbove(key: Key) {\n let collection = this.collection;\n\n key = collection.getKeyBefore(key);\n while (key != null) {\n let item = collection.getItem(key);\n if (item.type === 'item' && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) {\n return key;\n }\n\n key = collection.getKeyBefore(key);\n }\n }\n\n getKeyBelow(key: Key) {\n let collection = this.collection;\n\n key = collection.getKeyAfter(key);\n while (key != null) {\n let item = collection.getItem(key);\n if (item.type === 'item' && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) {\n return key;\n }\n\n key = collection.getKeyAfter(key);\n }\n }\n\n getKeyLeftOf(key: Key): Key {\n return key;\n }\n\n getKeyRightOf(key: Key): Key {\n return key;\n }\n\n getKeyPageAbove(key: Key) {\n let layoutInfo = this.getLayoutInfo(key);\n\n if (layoutInfo) {\n let pageY = Math.max(0, layoutInfo.rect.y + layoutInfo.rect.height - this.virtualizer.visibleRect.height);\n while (layoutInfo && layoutInfo.rect.y > pageY) {\n let keyAbove = this.getKeyAbove(layoutInfo.key);\n layoutInfo = this.getLayoutInfo(keyAbove);\n }\n\n if (layoutInfo) {\n return layoutInfo.key;\n }\n }\n\n return this.getFirstKey();\n }\n\n getKeyPageBelow(key: Key) {\n let layoutInfo = this.getLayoutInfo(key != null ? key : this.getFirstKey());\n\n if (layoutInfo) {\n let pageY = Math.min(this.virtualizer.contentSize.height, layoutInfo.rect.y - layoutInfo.rect.height + this.virtualizer.visibleRect.height);\n while (layoutInfo && layoutInfo.rect.y < pageY) {\n let keyBelow = this.getKeyBelow(layoutInfo.key);\n layoutInfo = this.getLayoutInfo(keyBelow);\n }\n\n if (layoutInfo) {\n return layoutInfo.key;\n }\n }\n\n return this.getLastKey();\n }\n\n getFirstKey() {\n let collection = this.collection;\n let key = collection.getFirstKey();\n while (key != null) {\n let item = collection.getItem(key);\n if (item.type === 'item' && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) {\n return key;\n }\n\n key = collection.getKeyAfter(key);\n }\n }\n\n getLastKey() {\n let collection = this.collection;\n let key = collection.getLastKey();\n while (key != null) {\n let item = collection.getItem(key);\n if (item.type === 'item' && (this.allowDisabledKeyFocus || !this.disabledKeys.has(item.key))) {\n return key;\n }\n\n key = collection.getKeyBefore(key);\n }\n }\n\n getKeyForSearch(search: string, fromKey?: Key) {\n if (!this.collator) {\n return null;\n }\n\n let collection = this.collection;\n let key = fromKey || this.getFirstKey();\n while (key != null) {\n let item = collection.getItem(key);\n let substring = item.textValue.slice(0, search.length);\n if (item.textValue && this.collator.compare(substring, search) === 0) {\n return key;\n }\n\n key = this.getKeyBelow(key);\n }\n\n return null;\n }\n\n getInitialLayoutInfo(layoutInfo: LayoutInfo) {\n layoutInfo.opacity = 0;\n layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';\n return layoutInfo;\n }\n\n getFinalLayoutInfo(layoutInfo: LayoutInfo) {\n layoutInfo.opacity = 0;\n layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';\n return layoutInfo;\n }\n\n getDropTargetFromPoint(x: number, y: number, isValidDropTarget: (target: DropTarget) => boolean): DropTarget {\n x += this.virtualizer.visibleRect.x;\n y += this.virtualizer.visibleRect.y;\n\n let key = this.virtualizer.keyAtPoint(new Point(x, y));\n if (key == null) {\n return;\n }\n\n let layoutInfo = this.getLayoutInfo(key);\n let rect = layoutInfo.rect;\n let target: DropTarget = {\n type: 'item',\n key: layoutInfo.key,\n dropPosition: 'on'\n };\n\n // If dropping on the item isn't accepted, try the target before or after depending on the y position.\n // Otherwise, if dropping on the item is accepted, still try the before/after positions if within 10px\n // of the top or bottom of the item.\n if (!isValidDropTarget(target)) {\n if (y <= rect.y + rect.height / 2 && isValidDropTarget({...target, dropPosition: 'before'})) {\n target.dropPosition = 'before';\n } else if (isValidDropTarget({...target, dropPosition: 'after'})) {\n target.dropPosition = 'after';\n }\n } else if (y <= rect.y + 10 && isValidDropTarget({...target, dropPosition: 'before'})) {\n target.dropPosition = 'before';\n } else if (y >= rect.maxY - 10 && isValidDropTarget({...target, dropPosition: 'after'})) {\n target.dropPosition = 'after';\n }\n\n return target;\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {GridNode} from '@react-types/grid';\nimport {Key} from 'react';\nimport {LayoutInfo, Point, Rect, Size} from '@react-stately/virtualizer';\nimport {LayoutNode, ListLayout, ListLayoutOptions} from './ListLayout';\nimport {TableCollection} from '@react-types/table';\n\n\nexport class TableLayout<T> extends ListLayout<T> {\n collection: TableCollection<T>;\n lastCollection: TableCollection<T>;\n getColumnWidth: (key: Key) => number;\n stickyColumnIndices: number[];\n wasLoading = false;\n isLoading = false;\n lastPersistedKeys: Set<Key> = null;\n persistedIndices: Map<Key, number[]> = new Map();\n\n constructor(options: ListLayoutOptions<T>) {\n super(options);\n this.stickyColumnIndices = [];\n }\n\n\n buildCollection(): LayoutNode[] {\n // If columns changed, clear layout cache.\n if (\n !this.lastCollection ||\n this.collection.columns.length !== this.lastCollection.columns.length ||\n this.collection.columns.some((c, i) => c.key !== this.lastCollection.columns[i].key)\n ) {\n // Invalidate everything in this layout pass. Will be reset in ListLayout on the next pass.\n this.invalidateEverything = true;\n }\n\n // Track whether we were previously loading. This is used to adjust the animations of async loading vs inserts.\n let loadingState = this.collection.body.props.loadingState;\n this.wasLoading = this.isLoading;\n this.isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n\n let header = this.buildHeader();\n let body = this.buildBody(0);\n this.stickyColumnIndices = this.collection.columns.filter(c => c.props.isSelectionCell || this.collection.rowHeaderColumnKeys.has(c.key)).map(c => c.index);\n this.lastPersistedKeys = null;\n\n body.layoutInfo.rect.width = Math.max(header.layoutInfo.rect.width, body.layoutInfo.rect.width);\n this.contentSize = new Size(body.layoutInfo.rect.width, body.layoutInfo.rect.maxY);\n return [\n header,\n body\n ];\n }\n\n buildHeader(): LayoutNode {\n let rect = new Rect(0, 0, 0, 0);\n let layoutInfo = new LayoutInfo('header', 'header', rect);\n\n let y = 0;\n let width = 0;\n let children: LayoutNode[] = [];\n for (let headerRow of this.collection.headerRows) {\n let layoutNode = this.buildChild(headerRow, 0, y);\n layoutNode.layoutInfo.parentKey = 'header';\n y = layoutNode.layoutInfo.rect.maxY;\n width = Math.max(width, layoutNode.layoutInfo.rect.width);\n children.push(layoutNode);\n }\n\n rect.width = width;\n rect.height = y;\n\n this.layoutInfos.set('header', layoutInfo);\n\n return {\n layoutInfo,\n children\n };\n }\n\n buildHeaderRow(headerRow: GridNode<T>, x: number, y: number) {\n let rect = new Rect(0, y, 0, 0);\n let row = new LayoutInfo('headerrow', headerRow.key, rect);\n\n let height = 0;\n let columns: LayoutNode[] = [];\n for (let cell of headerRow.childNodes) {\n let layoutNode = this.buildChild(cell, x, y);\n layoutNode.layoutInfo.parentKey = row.key;\n x = layoutNode.layoutInfo.rect.maxX;\n height = Math.max(height, layoutNode.layoutInfo.rect.height);\n columns.push(layoutNode);\n }\n\n this.setChildHeights(columns, height);\n\n rect.height = height;\n rect.width = x;\n\n return {\n layoutInfo: row,\n children: columns\n };\n }\n\n setChildHeights(children: LayoutNode[], height: number) {\n for (let child of children) {\n if (child.layoutInfo.rect.height !== height) {\n // Need to copy the layout info before we mutate it.\n child.layoutInfo = child.layoutInfo.copy();\n this.layoutInfos.set(child.layoutInfo.key, child.layoutInfo);\n\n child.layoutInfo.rect.height = height;\n }\n }\n }\n\n // used to get the column widths when rendering to the DOM\n getColumnWidth_(node: GridNode<T>) {\n let colspan = node.colspan ?? 1;\n let colIndex = node.colIndex ?? node.index;\n let width = 0;\n for (let i = colIndex; i < colIndex + colspan; i++) {\n let column = this.collection.columns[i];\n width += this.getColumnWidth(column.key);\n }\n\n return width;\n }\n\n getEstimatedHeight(node: GridNode<T>, width: number, height: number, estimatedHeight: number) {\n let isEstimated = false;\n\n // If no explicit height is available, use an estimated height.\n if (height == null) {\n // If a previous version of this layout info exists, reuse its height.\n // Mark as estimated if the size of the overall collection view changed,\n // or the content of the item changed.\n let previousLayoutNode = this.layoutNodes.get(node.key);\n if (previousLayoutNode) {\n let curNode = this.collection.getItem(node.key);\n let lastNode = this.lastCollection ? this.lastCollection.getItem(node.key) : null;\n height = previousLayoutNode.layoutInfo.rect.height;\n isEstimated = curNode !== lastNode || width !== previousLayoutNode.layoutInfo.rect.width || previousLayoutNode.layoutInfo.estimatedSize;\n } else {\n height = estimatedHeight;\n isEstimated = true;\n }\n }\n\n return {height, isEstimated};\n }\n\n buildColumn(node: GridNode<T>, x: number, y: number): LayoutNode {\n let width = this.getColumnWidth_(node);\n let {height, isEstimated} = this.getEstimatedHeight(node, width, this.headingHeight, this.estimatedHeadingHeight);\n let rect = new Rect(x, y, width, height);\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n layoutInfo.isSticky = node.props?.isSelectionCell;\n layoutInfo.zIndex = layoutInfo.isSticky ? 2 : 1;\n layoutInfo.estimatedSize = isEstimated;\n\n return {\n layoutInfo\n };\n }\n\n buildBody(y: number): LayoutNode {\n let rect = new Rect(0, y, 0, 0);\n let layoutInfo = new LayoutInfo('rowgroup', 'body', rect);\n\n let startY = y;\n let width = 0;\n let children: LayoutNode[] = [];\n for (let node of this.collection.body.childNodes) {\n let layoutNode = this.buildChild(node, 0, y);\n layoutNode.layoutInfo.parentKey = 'body';\n y = layoutNode.layoutInfo.rect.maxY;\n width = Math.max(width, layoutNode.layoutInfo.rect.width);\n children.push(layoutNode);\n }\n\n if (this.isLoading) {\n let rect = new Rect(0, y, width || this.virtualizer.visibleRect.width, children.length === 0 ? this.virtualizer.visibleRect.height : 60);\n let loader = new LayoutInfo('loader', 'loader', rect);\n loader.parentKey = 'body';\n loader.isSticky = children.length === 0;\n this.layoutInfos.set('loader', loader);\n children.push({layoutInfo: loader});\n y = loader.rect.maxY;\n width = Math.max(width, rect.width);\n } else if (children.length === 0) {\n let rect = new Rect(0, y, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);\n let empty = new LayoutInfo('empty', 'empty', rect);\n empty.parentKey = 'body';\n empty.isSticky = true;\n this.layoutInfos.set('empty', empty);\n children.push({layoutInfo: empty});\n y = empty.rect.maxY;\n width = Math.max(width, rect.width);\n }\n\n rect.width = width;\n rect.height = y - startY;\n\n this.layoutInfos.set('body', layoutInfo);\n\n return {\n layoutInfo,\n children\n };\n }\n\n buildNode(node: GridNode<T>, x: number, y: number): LayoutNode {\n switch (node.type) {\n case 'headerrow':\n return this.buildHeaderRow(node, x, y);\n case 'item':\n return this.buildRow(node, x, y);\n case 'column':\n case 'placeholder':\n return this.buildColumn(node, x, y);\n case 'cell':\n return this.buildCell(node, x, y);\n default:\n throw new Error('Unknown node type ' + node.type);\n }\n }\n\n buildRow(node: GridNode<T>, x: number, y: number): LayoutNode {\n let rect = new Rect(x, y, 0, 0);\n let layoutInfo = new LayoutInfo('row', node.key, rect);\n\n let children: LayoutNode[] = [];\n let height = 0;\n for (let child of node.childNodes) {\n let layoutNode = this.buildChild(child, x, y);\n x = layoutNode.layoutInfo.rect.maxX;\n height = Math.max(height, layoutNode.layoutInfo.rect.height);\n children.push(layoutNode);\n }\n\n this.setChildHeights(children, height);\n\n rect.width = x;\n rect.height = height + 1; // +1 for bottom border\n\n return {\n layoutInfo,\n children\n };\n }\n\n buildCell(node: GridNode<T>, x: number, y: number): LayoutNode {\n let width = this.getColumnWidth_(node);\n let {height, isEstimated} = this.getEstimatedHeight(node, width, this.rowHeight, this.estimatedRowHeight);\n let rect = new Rect(x, y, width, height);\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n layoutInfo.isSticky = node.props?.isSelectionCell;\n layoutInfo.zIndex = layoutInfo.isSticky ? 2 : 1;\n layoutInfo.estimatedSize = isEstimated;\n\n return {\n layoutInfo\n };\n }\n\n getVisibleLayoutInfos(rect: Rect) {\n let res: LayoutInfo[] = [];\n\n this.buildPersistedIndices();\n for (let node of this.rootNodes) {\n res.push(node.layoutInfo);\n this.addVisibleLayoutInfos(res, node, rect);\n }\n\n return res;\n }\n\n addVisibleLayoutInfos(res: LayoutInfo[], node: LayoutNode, rect: Rect) {\n if (!node.children || node.children.length === 0) {\n return;\n }\n\n switch (node.layoutInfo.type) {\n case 'header': {\n for (let child of node.children) {\n res.push(child.layoutInfo);\n this.addVisibleLayoutInfos(res, child, rect);\n }\n break;\n }\n case 'rowgroup': {\n let firstVisibleRow = this.binarySearch(node.children, rect.topLeft, 'y');\n let lastVisibleRow = this.binarySearch(node.children, rect.bottomRight, 'y');\n\n // Add persisted rows before the visible rows.\n let persistedRowIndices = this.persistedIndices.get(node.layoutInfo.key);\n let persistIndex = 0;\n while (\n persistedRowIndices &&\n persistIndex < persistedRowIndices.length &&\n persistedRowIndices[persistIndex] < firstVisibleRow\n ) {\n let idx = persistedRowIndices[persistIndex];\n res.push(node.children[idx].layoutInfo);\n this.addVisibleLayoutInfos(res, node.children[idx], rect);\n persistIndex++;\n }\n\n for (let i = firstVisibleRow; i <= lastVisibleRow; i++) {\n // Skip persisted rows that overlap with visible cells.\n while (persistedRowIndices && persistIndex < persistedRowIndices.length && persistedRowIndices[persistIndex] < i) {\n persistIndex++;\n }\n\n res.push(node.children[i].layoutInfo);\n this.addVisibleLayoutInfos(res, node.children[i], rect);\n }\n\n // Add persisted rows after the visible rows.\n while (persistedRowIndices && persistIndex < persistedRowIndices.length) {\n let idx = persistedRowIndices[persistIndex++];\n res.push(node.children[idx].layoutInfo);\n }\n break;\n }\n case 'headerrow':\n case 'row': {\n let firstVisibleCell = this.binarySearch(node.children, rect.topLeft, 'x');\n let lastVisibleCell = this.binarySearch(node.children, rect.topRight, 'x');\n let stickyIndex = 0;\n\n // Add persisted/sticky cells before the visible cells.\n let persistedCellIndices = this.persistedIndices.get(node.layoutInfo.key) || this.stickyColumnIndices;\n while (stickyIndex < persistedCellIndices.length && persistedCellIndices[stickyIndex] < firstVisibleCell) {\n let idx = persistedCellIndices[stickyIndex];\n res.push(node.children[idx].layoutInfo);\n stickyIndex++;\n }\n\n for (let i = firstVisibleCell; i <= lastVisibleCell; i++) {\n // Skip sticky cells that overlap with visible cells.\n while (stickyIndex < persistedCellIndices.length && persistedCellIndices[stickyIndex] < i) {\n stickyIndex++;\n }\n\n res.push(node.children[i].layoutInfo);\n }\n\n // Add any remaining sticky cells after the visible cells.\n while (stickyIndex < persistedCellIndices.length) {\n let idx = persistedCellIndices[stickyIndex++];\n res.push(node.children[idx].layoutInfo);\n }\n break;\n }\n default:\n throw new Error('Unknown node type ' + node.layoutInfo.type);\n }\n }\n\n binarySearch(items: LayoutNode[], point: Point, axis: 'x' | 'y') {\n let low = 0;\n let high = items.length - 1;\n while (low <= high) {\n let mid = (low + high) >> 1;\n let item = items[mid];\n\n if ((axis === 'x' && item.layoutInfo.rect.maxX < point.x) || (axis === 'y' && item.layoutInfo.rect.maxY < point.y)) {\n low = mid + 1;\n } else if ((axis === 'x' && item.layoutInfo.rect.x > point.x) || (axis === 'y' && item.layoutInfo.rect.y > point.y)) {\n high = mid - 1;\n } else {\n return mid;\n }\n }\n\n return Math.max(0, Math.min(items.length - 1, low));\n }\n\n buildPersistedIndices() {\n if (this.virtualizer.persistedKeys === this.lastPersistedKeys) {\n return;\n }\n\n this.lastPersistedKeys = this.virtualizer.persistedKeys;\n this.persistedIndices.clear();\n\n // Build a map of parentKey => indices of children to persist.\n for (let key of this.virtualizer.persistedKeys) {\n let layoutInfo = this.layoutInfos.get(key);\n\n // Walk up ancestors so parents are also persisted if children are.\n while (layoutInfo && layoutInfo.parentKey) {\n let collectionNode = this.collection.getItem(layoutInfo.key);\n let indices = this.persistedIndices.get(layoutInfo.parentKey);\n if (!indices) {\n // stickyColumnIndices are always persisted along with any cells from persistedKeys.\n indices = collectionNode.type === 'cell' ? [...this.stickyColumnIndices] : [];\n this.persistedIndices.set(layoutInfo.parentKey, indices);\n }\n\n let index = collectionNode.index;\n if (layoutInfo.parentKey === 'body') {\n index -= this.collection.headerRows.length;\n }\n\n if (!indices.includes(index)) {\n indices.push(index);\n }\n\n layoutInfo = this.layoutInfos.get(layoutInfo.parentKey);\n }\n }\n\n for (let indices of this.persistedIndices.values()) {\n indices.sort((a, b) => a - b);\n }\n }\n\n getInitialLayoutInfo(layoutInfo: LayoutInfo) {\n let res = super.getInitialLayoutInfo(layoutInfo);\n\n // If this insert was the result of async loading, remove the zoom effect and just keep the fade in.\n if (this.wasLoading) {\n res.transform = null;\n }\n\n return res;\n }\n}\n"],"names":[],"version":3,"file":"main.js.map"}