@fluentui/react-virtualizer 9.0.0-alpha.7 → 9.0.0-alpha.9
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/CHANGELOG.json +31 -1
- package/CHANGELOG.md +20 -2
- package/lib/components/Virtualizer/Virtualizer.js.map +1 -1
- package/lib/components/Virtualizer/renderVirtualizer.js.map +1 -1
- package/lib/components/Virtualizer/useVirtualizer.js.map +1 -1
- package/lib/components/Virtualizer/useVirtualizerStyles.js.map +1 -1
- package/lib/hooks/useIntersectionObserver.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Hooks.js.map +1 -1
- package/lib-commonjs/Virtualizer.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/Virtualizer.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/Virtualizer.types.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/index.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/renderVirtualizer.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/useVirtualizer.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/useVirtualizerStyles.js.map +1 -1
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/useIntersectionObserver.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@fluentui/react-virtualizer",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Wed,
|
|
5
|
+
"date": "Wed, 08 Mar 2023 17:39:19 GMT",
|
|
6
|
+
"tag": "@fluentui/react-virtualizer_v9.0.0-alpha.9",
|
|
7
|
+
"version": "9.0.0-alpha.9",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui/react-virtualizer",
|
|
13
|
+
"comment": "Bump @fluentui/react-utilities to v9.6.1",
|
|
14
|
+
"commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Thu, 16 Feb 2023 19:18:49 GMT",
|
|
21
|
+
"tag": "@fluentui/react-virtualizer_v9.0.0-alpha.8",
|
|
22
|
+
"version": "9.0.0-alpha.8",
|
|
23
|
+
"comments": {
|
|
24
|
+
"prerelease": [
|
|
25
|
+
{
|
|
26
|
+
"author": "mgodbolt@microsoft.com",
|
|
27
|
+
"package": "@fluentui/react-virtualizer",
|
|
28
|
+
"commit": "c6f47613e95f8e43ef00792ea673d673881e14fb",
|
|
29
|
+
"comment": "fixing build issues"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Thu, 16 Feb 2023 16:18:01 GMT",
|
|
6
36
|
"tag": "@fluentui/react-virtualizer_v9.0.0-alpha.7",
|
|
7
37
|
"version": "9.0.0-alpha.7",
|
|
8
38
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-virtualizer
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed,
|
|
3
|
+
This log was last generated on Wed, 08 Mar 2023 17:39:19 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-alpha.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-virtualizer_v9.0.0-alpha.9)
|
|
8
|
+
|
|
9
|
+
Wed, 08 Mar 2023 17:39:19 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-virtualizer_v9.0.0-alpha.8..@fluentui/react-virtualizer_v9.0.0-alpha.9)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-utilities to v9.6.1 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
|
|
15
|
+
|
|
16
|
+
## [9.0.0-alpha.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-virtualizer_v9.0.0-alpha.8)
|
|
17
|
+
|
|
18
|
+
Thu, 16 Feb 2023 19:18:49 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-virtualizer_v9.0.0-alpha.7..@fluentui/react-virtualizer_v9.0.0-alpha.8)
|
|
20
|
+
|
|
21
|
+
### Changes
|
|
22
|
+
|
|
23
|
+
- fixing build issues ([PR #26877](https://github.com/microsoft/fluentui/pull/26877) by mgodbolt@microsoft.com)
|
|
24
|
+
|
|
7
25
|
## [9.0.0-alpha.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-virtualizer_v9.0.0-alpha.7)
|
|
8
26
|
|
|
9
|
-
|
|
27
|
+
Thu, 16 Feb 2023 16:18:01 GMT
|
|
10
28
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-virtualizer_v9.0.0-alpha.6..@fluentui/react-virtualizer_v9.0.0-alpha.7)
|
|
11
29
|
|
|
12
30
|
### Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useVirtualizerStyles_unstable","useVirtualizer_unstable","renderVirtualizer_unstable","Virtualizer","props","state","displayName"],"sources":["../src/packages/react-components/react-virtualizer/src/components/Virtualizer/Virtualizer.ts"],"sourcesContent":["import type { VirtualizerProps } from './Virtualizer.types';\nimport { useVirtualizerStyles_unstable } from './useVirtualizerStyles';\nimport { useVirtualizer_unstable } from './useVirtualizer';\nimport { renderVirtualizer_unstable } from './renderVirtualizer';\nimport type { FC } from 'react';\n\n/**\n * Virtualizer pseudo-component, this functional wrapper\n * provides a simple interface for reducing the total number\n * of elements rendered at one time in large lists.\n */\nexport const Virtualizer: FC<VirtualizerProps> = (props: VirtualizerProps) => {\n const state = useVirtualizer_unstable(props);\n useVirtualizerStyles_unstable(state);\n\n return renderVirtualizer_unstable(state);\n};\n\nVirtualizer.displayName = 'Virtualizer';\n"],"mappings":"AACA,SAASA,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,qBAAqB;AAGhE;;;;;AAKA,OAAO,MAAMC,WAAW,GAA0BC,KAAuB,IAAI;EAC3E,MAAMC,KAAK,GAAGJ,uBAAuB,CAACG,KAAK,CAAC;EAC5CJ,6BAA6B,CAACK,KAAK,CAAC;EAEpC,OAAOH,0BAA0B,CAACG,KAAK,CAAC;AAC1C,CAAC;AAEDF,WAAW,CAACG,WAAW,GAAG,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","getSlots","renderVirtualizer_unstable","state","slots","slotProps","createElement","Fragment","beforeContainer","before","virtualizedChildren","afterContainer","after"],"sources":["../src/packages/react-components/react-virtualizer/src/components/Virtualizer/renderVirtualizer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { VirtualizerSlots, VirtualizerState } from './Virtualizer.types';\n\nexport const renderVirtualizer_unstable = (state: VirtualizerState) => {\n const { slots, slotProps } = getSlots<VirtualizerSlots>(state);\n\n return (\n <React.Fragment>\n {/* The 'before' bookend to hold items in place and detect scroll previous */}\n <slots.beforeContainer {...slotProps.beforeContainer}>\n <slots.before {...slotProps.before} />\n </slots.beforeContainer>\n {/* The reduced list of non-virtualized children to be rendered */}\n {state.virtualizedChildren}\n {/* The 'after' bookend to hold items in place and detect scroll next */}\n <slots.afterContainer {...slotProps.afterContainer}>\n <slots.after {...slotProps.after} />\n </slots.afterContainer>\n </React.Fragment>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD,OAAO,MAA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E;;KAET,CAAC;IACFP,KAAK,EAAErG,gBAAgB,CAACG,KAAK,CAACkG,KAAK,EAAE;MACnCI,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZC,GAAG,EAAEhB,WAAW;QAChBiB,IAAI,EAAE;;KAET,CAAC;IACFN,eAAe,EAAEtG,gBAAgB,CAACG,KAAK,CAACmG,eAAe,EAAE;MACvDG,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZE,IAAI,EAAE;;KAET,CAAC;IACFL,cAAc,EAAEvG,gBAAgB,CAACG,KAAK,CAACoG,cAAc,EAAE;MACrDE,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZE,IAAI,EAAE;;KAET,CAAC;IACFC,kBAAkB,EAAEX,kBAAkB,GAAGvC,eAAe,EAAE,GAAG,CAAC;IAC9DmD,iBAAiB,EAAEZ,kBAAkB,GAAG/C,cAAc,EAAE,GAAG,CAAC;IAC5D4D,sBAAsB,EAAEb,kBAAkB,GAAG9C,kBAAkB,EAAE,GAAG9C,iBAAiB,GAAGF,QAAQ;IAChGgB,qBAAqB;IACrBJ,IAAI;IACJH,UAAU;IACVI;GACD;AACH","names":["useIntersectionObserver","useEffect","useRef","useState","useCallback","useReducer","resolveShorthand","flushSync","useVirtualizer_unstable","props","itemSize","numItems","virtualizerLength","children","renderChild","getItemSize","bufferItems","Math","round","bufferSize","floor","intersectionObserverRoot","axis","reversed","onUpdateIndex","onCalculateIndex","virtualizerStartIndex","setVirtualizerStartIndex","beforeElementRef","afterElementRef","childSizes","Array","childProgressiveSizes","childArray","forceUpdate","horizontal","populateSizeArrays","current","length","index","batchUpdateNewIndex","updateChildRows","updateCurrentItemSizes","setObserverList","entries","observer","measurementPos","bufferCount","latestEntry","sort","entry1","entry2","time","find","entry","intersectionRatio","target","calculateAfter","calculateTotalSize","abs","boundingClientRect","bottom","top","right","left","calculateBefore","max","startIndex","getIndexFromScrollPosition","bufferedIndex","maxIndex","newStartIndex","min","root","rootMargin","threshold","findIndexRecursive","scrollPos","lowIndex","highIndex","midpoint","iBefore","iAfter","indexValue","afterIndexValue","beforeIndexValue","getIndexFromSizeArray","lastItemIndex","remainingItems","newIndex","actualIndex","end","i","setBeforeRef","element","newList","push","setAfterRef","endIndex","didUpdate","newSize","prevSize","hasInitialized","initializeSizeArray","isFullyInitialized","components","before","after","beforeContainer","afterContainer","virtualizedChildren","required","defaultProps","ref","role","beforeBufferHeight","afterBufferHeight","totalVirtualizerHeight"],"sourceRoot":"../src/","sources":["packages/react-components/react-virtualizer/src/components/Virtualizer/useVirtualizer.ts"],"sourcesContent":["import { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport type { ReactNode } from 'react';\nimport { useEffect, useRef, useState, useCallback, useReducer } from 'react';\n\nimport type { VirtualizerProps, VirtualizerState } from './Virtualizer.types';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { flushSync } from 'react-dom';\n\nexport function useVirtualizer_unstable(props: VirtualizerProps): VirtualizerState {\n const {\n itemSize,\n numItems,\n virtualizerLength,\n children: renderChild,\n getItemSize,\n bufferItems = Math.round(virtualizerLength / 4.0),\n bufferSize = Math.floor(bufferItems / 2.0) * itemSize,\n intersectionObserverRoot,\n axis = 'vertical',\n reversed = false,\n onUpdateIndex,\n onCalculateIndex,\n } = props;\n\n // Tracks the initial item to start virtualizer at, -1 implies first render cycle\n const [virtualizerStartIndex, setVirtualizerStartIndex] = useState<number>(-1);\n\n // Store ref to before padding element\n const beforeElementRef = useRef<Element | null>(null);\n\n // Store ref to before padding element\n const afterElementRef = useRef<Element | null>(null);\n\n // We need to store an array to track dynamic sizes, we can use this to incrementally update changes\n const childSizes = useRef<number[]>(new Array<number>(getItemSize ? numItems : 0));\n\n /* We keep track of the progressive sizing/placement down the list,\n this helps us skip re-calculations unless children/size changes */\n const childProgressiveSizes = useRef<number[]>(new Array<number>(getItemSize ? numItems : 0));\n\n // The internal tracking REF for child array (updates often).\n const childArray = useRef<ReactNode[]>(new Array(virtualizerLength));\n\n // We want to be methodical about updating the render with child reference array\n const forceUpdate = useReducer(() => ({}), {})[1];\n\n const horizontal = axis === 'horizontal';\n\n const populateSizeArrays = () => {\n if (!getItemSize) {\n // Static sizes, never mind!\n return;\n }\n\n if (numItems !== childSizes.current.length) {\n childSizes.current = new Array<number>(numItems);\n }\n\n if (numItems !== childProgressiveSizes.current.length) {\n childProgressiveSizes.current = new Array<number>(numItems);\n }\n\n for (let index = 0; index < numItems; index++) {\n childSizes.current[index] = getItemSize(index);\n\n if (index === 0) {\n childProgressiveSizes.current[index] = childSizes.current[index];\n } else {\n childProgressiveSizes.current[index] = childProgressiveSizes.current[index - 1] + childSizes.current[index];\n }\n }\n };\n\n const batchUpdateNewIndex = (index: number) => {\n // Local updates\n onUpdateIndex?.(index, virtualizerStartIndex);\n updateChildRows(index);\n updateCurrentItemSizes(index);\n\n // State setters\n setVirtualizerStartIndex(index);\n };\n\n // Observe intersections of virtualized components\n const { setObserverList } = useIntersectionObserver(\n (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => {\n /* Sanity check - do we even need virtualization? */\n if (virtualizerLength > numItems) {\n if (virtualizerStartIndex !== 0) {\n batchUpdateNewIndex(0);\n }\n // No-op\n return;\n }\n\n /* IO initiates this function when needed (bookend entering view) */\n let measurementPos = 0;\n let bufferCount = bufferItems;\n\n // Grab latest entry that is intersecting\n const latestEntry =\n entries.length === 1\n ? entries[0]\n : entries\n .sort((entry1, entry2) => entry2.time - entry1.time)\n .find(entry => {\n return entry.intersectionRatio > 0;\n });\n\n if (!latestEntry) {\n // If we don't find an intersecting area, ignore for now.\n return;\n }\n\n if (latestEntry.target === afterElementRef.current) {\n // We need to inverse the buffer count\n bufferCount = virtualizerLength - bufferItems;\n measurementPos = reversed ? calculateAfter() : calculateTotalSize() - calculateAfter();\n if (!horizontal) {\n if (reversed) {\n // Scrolling 'up' and hit the after element below\n measurementPos -= Math.abs(latestEntry.boundingClientRect.bottom);\n } else if (latestEntry.boundingClientRect.top < 0) {\n // Scrolling 'down' and hit the after element above top: 0\n measurementPos -= latestEntry.boundingClientRect.top;\n }\n } else {\n if (reversed) {\n // Scrolling 'left' and hit the after element\n measurementPos -= Math.abs(latestEntry.boundingClientRect.right);\n } else if (latestEntry.boundingClientRect.left < 0) {\n // Scrolling 'right' and hit the after element\n measurementPos -= latestEntry.boundingClientRect.left;\n }\n }\n } else if (latestEntry.target === beforeElementRef.current) {\n measurementPos = reversed ? calculateTotalSize() - calculateBefore() : calculateBefore();\n if (!horizontal) {\n if (!reversed) {\n measurementPos -= Math.abs(latestEntry.boundingClientRect.bottom);\n } else if (latestEntry.boundingClientRect.top < 0) {\n // Scrolling 'down' in reverse order and hit the before element above top: 0\n measurementPos -= latestEntry.boundingClientRect.top;\n }\n } else {\n if (!reversed) {\n measurementPos -= Math.abs(latestEntry.boundingClientRect.right);\n } else if (latestEntry.boundingClientRect.left < 0) {\n // Scrolling 'left' and hit before element\n measurementPos -= latestEntry.boundingClientRect.left;\n }\n }\n }\n\n if (reversed) {\n // We're reversed, up is down, left is right, invert the scroll measure.\n measurementPos = Math.max(calculateTotalSize() - Math.abs(measurementPos), 0);\n }\n\n // For now lets use hardcoded size to assess current element to paginate on\n const startIndex = getIndexFromScrollPosition(measurementPos);\n let bufferedIndex = Math.max(startIndex - bufferCount, 0);\n\n if (onCalculateIndex) {\n // User has chance to intervene/customize prior to render\n // They may want to normalize this value.\n bufferedIndex = onCalculateIndex(bufferedIndex);\n }\n\n // Safety limits\n const maxIndex = Math.max(numItems - virtualizerLength, 0);\n const newStartIndex = Math.min(Math.max(bufferedIndex, 0), maxIndex);\n\n if (virtualizerStartIndex !== newStartIndex) {\n // We flush sync this and perform an immediate state update\n // due to virtualizerStartIndex invalidation.\n flushSync(() => {\n batchUpdateNewIndex(newStartIndex);\n });\n }\n },\n {\n root: intersectionObserverRoot ? intersectionObserverRoot?.current : null,\n rootMargin: '0px',\n threshold: 0,\n },\n );\n\n const findIndexRecursive = (scrollPos: number, lowIndex: number, highIndex: number): number => {\n if (lowIndex > highIndex) {\n // We shouldn't get here - but no-op the index if we do.\n return virtualizerStartIndex;\n }\n const midpoint = Math.floor((lowIndex + highIndex) / 2);\n const iBefore = Math.max(midpoint - 1, 0);\n const iAfter = Math.min(midpoint + 1, childProgressiveSizes.current.length - 1);\n const indexValue = childProgressiveSizes.current[midpoint];\n const afterIndexValue = childProgressiveSizes.current[iAfter];\n const beforeIndexValue = childProgressiveSizes.current[iBefore];\n if (scrollPos <= afterIndexValue && scrollPos >= beforeIndexValue) {\n /* We've found our index - if we are exactly matching before/after index that's ok,\n better to reduce checks if it's right on the boundary. */\n return midpoint;\n }\n\n if (indexValue > scrollPos) {\n return findIndexRecursive(scrollPos, lowIndex, midpoint - 1);\n } else {\n return findIndexRecursive(scrollPos, midpoint + 1, highIndex);\n }\n };\n\n const getIndexFromSizeArray = (scrollPos: number): number => {\n /* Quick searches our progressive height array */\n if (\n scrollPos === 0 ||\n childProgressiveSizes.current.length === 0 ||\n scrollPos <= childProgressiveSizes.current[0]\n ) {\n // Check start\n return 0;\n }\n\n if (scrollPos >= childProgressiveSizes.current[childProgressiveSizes.current.length - 1]) {\n // Check end\n return childProgressiveSizes.current.length - 1;\n }\n\n return findIndexRecursive(scrollPos, 0, childProgressiveSizes.current.length - 1);\n };\n\n const getIndexFromScrollPosition = (scrollPos: number) => {\n if (!getItemSize) {\n return Math.round(scrollPos / itemSize);\n }\n\n return getIndexFromSizeArray(scrollPos);\n };\n\n const calculateTotalSize = () => {\n if (!getItemSize) {\n return itemSize * numItems;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[numItems - 1];\n };\n\n const calculateBefore = () => {\n if (!getItemSize) {\n // The missing items from before virtualization starts height\n return virtualizerStartIndex * itemSize;\n }\n\n if (virtualizerStartIndex <= 0) {\n return 0;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[virtualizerStartIndex - 1];\n };\n\n const calculateAfter = () => {\n if (numItems === 0) {\n return 0;\n }\n\n const lastItemIndex = Math.min(virtualizerStartIndex + virtualizerLength, numItems - 1);\n if (!getItemSize) {\n // The missing items from after virtualization ends height\n const remainingItems = numItems - lastItemIndex - 1;\n return remainingItems * itemSize;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[numItems - 1] - childProgressiveSizes.current[lastItemIndex];\n };\n\n const updateChildRows = (newIndex: number) => {\n if (numItems === 0) {\n /* Nothing to virtualize */\n\n return [];\n }\n\n if (childArray.current.length !== numItems) {\n childArray.current = new Array(virtualizerLength);\n }\n const actualIndex = Math.max(newIndex, 0);\n const end = Math.min(actualIndex + virtualizerLength, numItems);\n\n for (let i = actualIndex; i < end; i++) {\n childArray.current[i - actualIndex] = renderChild(i);\n }\n };\n\n const setBeforeRef = useCallback(\n (element: HTMLDivElement) => {\n if (!element || beforeElementRef.current === element) {\n return;\n }\n beforeElementRef.current = element;\n const newList = [];\n\n newList.push(beforeElementRef.current);\n\n if (afterElementRef.current) {\n newList.push(afterElementRef.current);\n }\n\n // Ensure we update array if before element changed\n setObserverList(newList);\n },\n [setObserverList],\n );\n\n const setAfterRef = useCallback(\n (element: HTMLDivElement) => {\n if (!element || afterElementRef.current === element) {\n return;\n }\n afterElementRef.current = element;\n const newList = [];\n\n if (beforeElementRef.current) {\n newList.push(beforeElementRef.current);\n }\n\n newList.push(afterElementRef.current);\n\n // Ensure we update array if after element changed\n setObserverList(newList);\n },\n [setObserverList],\n );\n\n const updateCurrentItemSizes = (newIndex: number) => {\n if (!getItemSize) {\n // Static sizes, not required.\n return;\n }\n // We should always call our size function on index change (only for the items that will be rendered)\n // This ensures we request the latest data for incoming items in case sizing has changed.\n const endIndex = Math.min(newIndex + virtualizerLength, numItems);\n const startIndex = Math.max(newIndex, 0);\n\n let didUpdate = false;\n for (let i = startIndex; i < endIndex; i++) {\n const newSize = getItemSize(i);\n if (newSize !== childSizes.current[i]) {\n childSizes.current[i] = newSize;\n didUpdate = true;\n }\n }\n\n if (didUpdate) {\n // Update our progressive size array\n for (let i = startIndex; i < numItems; i++) {\n const prevSize = i > 0 ? childProgressiveSizes.current[i - 1] : 0;\n childProgressiveSizes.current[i] = prevSize + childSizes.current[i];\n }\n }\n };\n\n // Initialize the size array before first render.\n const hasInitialized = useRef<boolean>(false);\n const initializeSizeArray = () => {\n if (hasInitialized.current === false) {\n hasInitialized.current = true;\n populateSizeArrays();\n }\n };\n\n // Initialization on mount - update array index to 0 (ready state).\n // Only fire on mount (no deps).\n useEffect(() => {\n if (virtualizerStartIndex < 0) {\n batchUpdateNewIndex(0);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // If the user passes in an updated renderChild function - update current children\n useEffect(() => {\n if (virtualizerStartIndex >= 0) {\n updateChildRows(virtualizerStartIndex);\n forceUpdate();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [renderChild]);\n\n // Ensure we have run through and updated the whole size list array at least once.\n initializeSizeArray();\n\n if (getItemSize && (numItems !== childSizes.current.length || numItems !== childProgressiveSizes.current.length)) {\n // Child length mismatch, repopulate size arrays.\n populateSizeArrays();\n }\n\n const isFullyInitialized = hasInitialized.current && virtualizerStartIndex >= 0;\n return {\n components: {\n before: 'div',\n after: 'div',\n beforeContainer: 'div',\n afterContainer: 'div',\n },\n virtualizedChildren: childArray.current,\n before: resolveShorthand(props.before, {\n required: true,\n defaultProps: {\n ref: setBeforeRef,\n role: 'none',\n },\n }),\n after: resolveShorthand(props.after, {\n required: true,\n defaultProps: {\n ref: setAfterRef,\n role: 'none',\n },\n }),\n beforeContainer: resolveShorthand(props.beforeContainer, {\n required: true,\n defaultProps: {\n role: 'none',\n },\n }),\n afterContainer: resolveShorthand(props.afterContainer, {\n required: true,\n defaultProps: {\n role: 'none',\n },\n }),\n beforeBufferHeight: isFullyInitialized ? calculateBefore() : 0,\n afterBufferHeight: isFullyInitialized ? calculateAfter() : 0,\n totalVirtualizerHeight: isFullyInitialized ? calculateTotalSize() : virtualizerLength * itemSize,\n virtualizerStartIndex,\n axis,\n bufferSize,\n reversed,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"names":["useIntersectionObserver","useEffect","useRef","useState","useCallback","useReducer","resolveShorthand","flushSync","useVirtualizer_unstable","props","itemSize","numItems","virtualizerLength","children","renderChild","getItemSize","bufferItems","Math","round","bufferSize","floor","intersectionObserverRoot","axis","reversed","onUpdateIndex","onCalculateIndex","virtualizerStartIndex","setVirtualizerStartIndex","beforeElementRef","afterElementRef","childSizes","Array","childProgressiveSizes","childArray","forceUpdate","horizontal","populateSizeArrays","current","length","index","batchUpdateNewIndex","updateChildRows","updateCurrentItemSizes","setObserverList","entries","observer","measurementPos","bufferCount","latestEntry","sort","entry1","entry2","time","find","entry","intersectionRatio","target","calculateAfter","calculateTotalSize","abs","boundingClientRect","bottom","top","right","left","calculateBefore","max","startIndex","getIndexFromScrollPosition","bufferedIndex","maxIndex","newStartIndex","min","root","rootMargin","threshold","findIndexRecursive","scrollPos","lowIndex","highIndex","midpoint","iBefore","iAfter","indexValue","afterIndexValue","beforeIndexValue","getIndexFromSizeArray","lastItemIndex","remainingItems","newIndex","actualIndex","end","i","setBeforeRef","element","newList","push","setAfterRef","endIndex","didUpdate","newSize","prevSize","hasInitialized","initializeSizeArray","isFullyInitialized","components","before","after","beforeContainer","afterContainer","virtualizedChildren","required","defaultProps","ref","role","beforeBufferHeight","afterBufferHeight","totalVirtualizerHeight"],"sources":["../src/packages/react-components/react-virtualizer/src/components/Virtualizer/useVirtualizer.ts"],"sourcesContent":["import { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport type { ReactNode } from 'react';\nimport { useEffect, useRef, useState, useCallback, useReducer } from 'react';\n\nimport type { VirtualizerProps, VirtualizerState } from './Virtualizer.types';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { flushSync } from 'react-dom';\n\nexport function useVirtualizer_unstable(props: VirtualizerProps): VirtualizerState {\n const {\n itemSize,\n numItems,\n virtualizerLength,\n children: renderChild,\n getItemSize,\n bufferItems = Math.round(virtualizerLength / 4.0),\n bufferSize = Math.floor(bufferItems / 2.0) * itemSize,\n intersectionObserverRoot,\n axis = 'vertical',\n reversed = false,\n onUpdateIndex,\n onCalculateIndex,\n } = props;\n\n // Tracks the initial item to start virtualizer at, -1 implies first render cycle\n const [virtualizerStartIndex, setVirtualizerStartIndex] = useState<number>(-1);\n\n // Store ref to before padding element\n const beforeElementRef = useRef<Element | null>(null);\n\n // Store ref to before padding element\n const afterElementRef = useRef<Element | null>(null);\n\n // We need to store an array to track dynamic sizes, we can use this to incrementally update changes\n const childSizes = useRef<number[]>(new Array<number>(getItemSize ? numItems : 0));\n\n /* We keep track of the progressive sizing/placement down the list,\n this helps us skip re-calculations unless children/size changes */\n const childProgressiveSizes = useRef<number[]>(new Array<number>(getItemSize ? numItems : 0));\n\n // The internal tracking REF for child array (updates often).\n const childArray = useRef<ReactNode[]>(new Array(virtualizerLength));\n\n // We want to be methodical about updating the render with child reference array\n const forceUpdate = useReducer(() => ({}), {})[1];\n\n const horizontal = axis === 'horizontal';\n\n const populateSizeArrays = () => {\n if (!getItemSize) {\n // Static sizes, never mind!\n return;\n }\n\n if (numItems !== childSizes.current.length) {\n childSizes.current = new Array<number>(numItems);\n }\n\n if (numItems !== childProgressiveSizes.current.length) {\n childProgressiveSizes.current = new Array<number>(numItems);\n }\n\n for (let index = 0; index < numItems; index++) {\n childSizes.current[index] = getItemSize(index);\n\n if (index === 0) {\n childProgressiveSizes.current[index] = childSizes.current[index];\n } else {\n childProgressiveSizes.current[index] = childProgressiveSizes.current[index - 1] + childSizes.current[index];\n }\n }\n };\n\n const batchUpdateNewIndex = (index: number) => {\n // Local updates\n onUpdateIndex?.(index, virtualizerStartIndex);\n updateChildRows(index);\n updateCurrentItemSizes(index);\n\n // State setters\n setVirtualizerStartIndex(index);\n };\n\n // Observe intersections of virtualized components\n const { setObserverList } = useIntersectionObserver(\n (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => {\n /* Sanity check - do we even need virtualization? */\n if (virtualizerLength > numItems) {\n if (virtualizerStartIndex !== 0) {\n batchUpdateNewIndex(0);\n }\n // No-op\n return;\n }\n\n /* IO initiates this function when needed (bookend entering view) */\n let measurementPos = 0;\n let bufferCount = bufferItems;\n\n // Grab latest entry that is intersecting\n const latestEntry =\n entries.length === 1\n ? entries[0]\n : entries\n .sort((entry1, entry2) => entry2.time - entry1.time)\n .find(entry => {\n return entry.intersectionRatio > 0;\n });\n\n if (!latestEntry) {\n // If we don't find an intersecting area, ignore for now.\n return;\n }\n\n if (latestEntry.target === afterElementRef.current) {\n // We need to inverse the buffer count\n bufferCount = virtualizerLength - bufferItems;\n measurementPos = reversed ? calculateAfter() : calculateTotalSize() - calculateAfter();\n if (!horizontal) {\n if (reversed) {\n // Scrolling 'up' and hit the after element below\n measurementPos -= Math.abs(latestEntry.boundingClientRect.bottom);\n } else if (latestEntry.boundingClientRect.top < 0) {\n // Scrolling 'down' and hit the after element above top: 0\n measurementPos -= latestEntry.boundingClientRect.top;\n }\n } else {\n if (reversed) {\n // Scrolling 'left' and hit the after element\n measurementPos -= Math.abs(latestEntry.boundingClientRect.right);\n } else if (latestEntry.boundingClientRect.left < 0) {\n // Scrolling 'right' and hit the after element\n measurementPos -= latestEntry.boundingClientRect.left;\n }\n }\n } else if (latestEntry.target === beforeElementRef.current) {\n measurementPos = reversed ? calculateTotalSize() - calculateBefore() : calculateBefore();\n if (!horizontal) {\n if (!reversed) {\n measurementPos -= Math.abs(latestEntry.boundingClientRect.bottom);\n } else if (latestEntry.boundingClientRect.top < 0) {\n // Scrolling 'down' in reverse order and hit the before element above top: 0\n measurementPos -= latestEntry.boundingClientRect.top;\n }\n } else {\n if (!reversed) {\n measurementPos -= Math.abs(latestEntry.boundingClientRect.right);\n } else if (latestEntry.boundingClientRect.left < 0) {\n // Scrolling 'left' and hit before element\n measurementPos -= latestEntry.boundingClientRect.left;\n }\n }\n }\n\n if (reversed) {\n // We're reversed, up is down, left is right, invert the scroll measure.\n measurementPos = Math.max(calculateTotalSize() - Math.abs(measurementPos), 0);\n }\n\n // For now lets use hardcoded size to assess current element to paginate on\n const startIndex = getIndexFromScrollPosition(measurementPos);\n let bufferedIndex = Math.max(startIndex - bufferCount, 0);\n\n if (onCalculateIndex) {\n // User has chance to intervene/customize prior to render\n // They may want to normalize this value.\n bufferedIndex = onCalculateIndex(bufferedIndex);\n }\n\n // Safety limits\n const maxIndex = Math.max(numItems - virtualizerLength, 0);\n const newStartIndex = Math.min(Math.max(bufferedIndex, 0), maxIndex);\n\n if (virtualizerStartIndex !== newStartIndex) {\n // We flush sync this and perform an immediate state update\n // due to virtualizerStartIndex invalidation.\n flushSync(() => {\n batchUpdateNewIndex(newStartIndex);\n });\n }\n },\n {\n root: intersectionObserverRoot ? intersectionObserverRoot?.current : null,\n rootMargin: '0px',\n threshold: 0,\n },\n );\n\n const findIndexRecursive = (scrollPos: number, lowIndex: number, highIndex: number): number => {\n if (lowIndex > highIndex) {\n // We shouldn't get here - but no-op the index if we do.\n return virtualizerStartIndex;\n }\n const midpoint = Math.floor((lowIndex + highIndex) / 2);\n const iBefore = Math.max(midpoint - 1, 0);\n const iAfter = Math.min(midpoint + 1, childProgressiveSizes.current.length - 1);\n const indexValue = childProgressiveSizes.current[midpoint];\n const afterIndexValue = childProgressiveSizes.current[iAfter];\n const beforeIndexValue = childProgressiveSizes.current[iBefore];\n if (scrollPos <= afterIndexValue && scrollPos >= beforeIndexValue) {\n /* We've found our index - if we are exactly matching before/after index that's ok,\n better to reduce checks if it's right on the boundary. */\n return midpoint;\n }\n\n if (indexValue > scrollPos) {\n return findIndexRecursive(scrollPos, lowIndex, midpoint - 1);\n } else {\n return findIndexRecursive(scrollPos, midpoint + 1, highIndex);\n }\n };\n\n const getIndexFromSizeArray = (scrollPos: number): number => {\n /* Quick searches our progressive height array */\n if (\n scrollPos === 0 ||\n childProgressiveSizes.current.length === 0 ||\n scrollPos <= childProgressiveSizes.current[0]\n ) {\n // Check start\n return 0;\n }\n\n if (scrollPos >= childProgressiveSizes.current[childProgressiveSizes.current.length - 1]) {\n // Check end\n return childProgressiveSizes.current.length - 1;\n }\n\n return findIndexRecursive(scrollPos, 0, childProgressiveSizes.current.length - 1);\n };\n\n const getIndexFromScrollPosition = (scrollPos: number) => {\n if (!getItemSize) {\n return Math.round(scrollPos / itemSize);\n }\n\n return getIndexFromSizeArray(scrollPos);\n };\n\n const calculateTotalSize = () => {\n if (!getItemSize) {\n return itemSize * numItems;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[numItems - 1];\n };\n\n const calculateBefore = () => {\n if (!getItemSize) {\n // The missing items from before virtualization starts height\n return virtualizerStartIndex * itemSize;\n }\n\n if (virtualizerStartIndex <= 0) {\n return 0;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[virtualizerStartIndex - 1];\n };\n\n const calculateAfter = () => {\n if (numItems === 0) {\n return 0;\n }\n\n const lastItemIndex = Math.min(virtualizerStartIndex + virtualizerLength, numItems - 1);\n if (!getItemSize) {\n // The missing items from after virtualization ends height\n const remainingItems = numItems - lastItemIndex - 1;\n return remainingItems * itemSize;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[numItems - 1] - childProgressiveSizes.current[lastItemIndex];\n };\n\n const updateChildRows = (newIndex: number) => {\n if (numItems === 0) {\n /* Nothing to virtualize */\n\n return [];\n }\n\n if (childArray.current.length !== numItems) {\n childArray.current = new Array(virtualizerLength);\n }\n const actualIndex = Math.max(newIndex, 0);\n const end = Math.min(actualIndex + virtualizerLength, numItems);\n\n for (let i = actualIndex; i < end; i++) {\n childArray.current[i - actualIndex] = renderChild(i);\n }\n };\n\n const setBeforeRef = useCallback(\n (element: HTMLDivElement) => {\n if (!element || beforeElementRef.current === element) {\n return;\n }\n beforeElementRef.current = element;\n const newList = [];\n\n newList.push(beforeElementRef.current);\n\n if (afterElementRef.current) {\n newList.push(afterElementRef.current);\n }\n\n // Ensure we update array if before element changed\n setObserverList(newList);\n },\n [setObserverList],\n );\n\n const setAfterRef = useCallback(\n (element: HTMLDivElement) => {\n if (!element || afterElementRef.current === element) {\n return;\n }\n afterElementRef.current = element;\n const newList = [];\n\n if (beforeElementRef.current) {\n newList.push(beforeElementRef.current);\n }\n\n newList.push(afterElementRef.current);\n\n // Ensure we update array if after element changed\n setObserverList(newList);\n },\n [setObserverList],\n );\n\n const updateCurrentItemSizes = (newIndex: number) => {\n if (!getItemSize) {\n // Static sizes, not required.\n return;\n }\n // We should always call our size function on index change (only for the items that will be rendered)\n // This ensures we request the latest data for incoming items in case sizing has changed.\n const endIndex = Math.min(newIndex + virtualizerLength, numItems);\n const startIndex = Math.max(newIndex, 0);\n\n let didUpdate = false;\n for (let i = startIndex; i < endIndex; i++) {\n const newSize = getItemSize(i);\n if (newSize !== childSizes.current[i]) {\n childSizes.current[i] = newSize;\n didUpdate = true;\n }\n }\n\n if (didUpdate) {\n // Update our progressive size array\n for (let i = startIndex; i < numItems; i++) {\n const prevSize = i > 0 ? childProgressiveSizes.current[i - 1] : 0;\n childProgressiveSizes.current[i] = prevSize + childSizes.current[i];\n }\n }\n };\n\n // Initialize the size array before first render.\n const hasInitialized = useRef<boolean>(false);\n const initializeSizeArray = () => {\n if (hasInitialized.current === false) {\n hasInitialized.current = true;\n populateSizeArrays();\n }\n };\n\n // Initialization on mount - update array index to 0 (ready state).\n // Only fire on mount (no deps).\n useEffect(() => {\n if (virtualizerStartIndex < 0) {\n batchUpdateNewIndex(0);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // If the user passes in an updated renderChild function - update current children\n useEffect(() => {\n if (virtualizerStartIndex >= 0) {\n updateChildRows(virtualizerStartIndex);\n forceUpdate();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [renderChild]);\n\n // Ensure we have run through and updated the whole size list array at least once.\n initializeSizeArray();\n\n if (getItemSize && (numItems !== childSizes.current.length || numItems !== childProgressiveSizes.current.length)) {\n // Child length mismatch, repopulate size arrays.\n populateSizeArrays();\n }\n\n const isFullyInitialized = hasInitialized.current && virtualizerStartIndex >= 0;\n return {\n components: {\n before: 'div',\n after: 'div',\n beforeContainer: 'div',\n afterContainer: 'div',\n },\n virtualizedChildren: childArray.current,\n before: resolveShorthand(props.before, {\n required: true,\n defaultProps: {\n ref: setBeforeRef,\n role: 'none',\n },\n }),\n after: resolveShorthand(props.after, {\n required: true,\n defaultProps: {\n ref: setAfterRef,\n role: 'none',\n },\n }),\n beforeContainer: resolveShorthand(props.beforeContainer, {\n required: true,\n defaultProps: {\n role: 'none',\n },\n }),\n afterContainer: resolveShorthand(props.afterContainer, {\n required: true,\n defaultProps: {\n role: 'none',\n },\n }),\n beforeBufferHeight: isFullyInitialized ? calculateBefore() : 0,\n afterBufferHeight: isFullyInitialized ? calculateAfter() : 0,\n totalVirtualizerHeight: isFullyInitialized ? calculateTotalSize() : virtualizerLength * itemSize,\n virtualizerStartIndex,\n axis,\n bufferSize,\n reversed,\n };\n}\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,qCAAqC;AAE7E,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAG5E,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,SAAS,QAAQ,WAAW;AAErC,OAAM,SAAUC,uBAAuBA,CAACC,KAAuB;EAC7D,MAAM;IACJC,QAAQ;IACRC,QAAQ;IACRC,iBAAiB;IACjBC,QAAQ,EAAEC,WAAW;IACrBC,WAAW;IACXC,WAAW,GAAGC,IAAI,CAACC,KAAK,CAACN,iBAAiB,GAAG,GAAG,CAAC;IACjDO,UAAU,GAAGF,IAAI,CAACG,KAAK,CAACJ,WAAW,GAAG,GAAG,CAAC,GAAGN,QAAQ;IACrDW,wBAAwB;IACxBC,IAAI,GAAG,UAAU;IACjBC,QAAQ,GAAG,KAAK;IAChBC,aAAa;IACbC;EAAgB,CACjB,GAAGhB,KAAK;EAET;EACA,MAAM,CAACiB,qBAAqB,EAAEC,wBAAwB,CAAC,GAAGxB,QAAQ,CAA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,EAAErG,gBAAgB,CAACG,KAAK,CAACkG,KAAK,EAAE;MACnCI,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZC,GAAG,EAAEhB,WAAW;QAChBiB,IAAI,EAAE;;KAET,CAAC;IACFN,eAAe,EAAEtG,gBAAgB,CAACG,KAAK,CAACmG,eAAe,EAAE;MACvDG,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZE,IAAI,EAAE;;KAET,CAAC;IACFL,cAAc,EAAEvG,gBAAgB,CAACG,KAAK,CAACoG,cAAc,EAAE;MACrDE,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZE,IAAI,EAAE;;KAET,CAAC;IACFC,kBAAkB,EAAEX,kBAAkB,GAAGvC,eAAe,EAAE,GAAG,CAAC;IAC9DmD,iBAAiB,EAAEZ,kBAAkB,GAAG/C,cAAc,EAAE,GAAG,CAAC;IAC5D4D,sBAAsB,EAAEb,kBAAkB,GAAG9C,kBAAkB,EAAE,GAAG9C,iBAAiB,GAAGF,QAAQ;IAChGgB,qBAAqB;IACrBJ,IAAI;IACJH,UAAU;IACVI;GACD;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","virtualizerClassName","virtualizerClassNames","before","beforeContainer","after","afterContainer","useStyles","base","mc9l5x","Bkecrkj","relative","qhf8xq","horizontal","sshi5w","vertical","Bf4jedk","d","useVirtualizerStyles_unstable","state","styles","reversed","axis","beforeBufferHeight","afterBufferHeight","bufferSize","className","beforeHeightPx","afterHeightPx","beforeBufferHeightPx","afterBufferHeightPx","bufferPx","beforeBuffer","marginBottom","marginTop","marginLeft","marginRight","afterBuffer","style","height","width"],"sources":["../src/packages/react-components/react-virtualizer/src/components/Virtualizer/useVirtualizerStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { VirtualizerSlots, VirtualizerState } from './Virtualizer.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nconst virtualizerClassName = 'fui-Virtualizer';\nexport const virtualizerClassNames: SlotClassNames<VirtualizerSlots> = {\n before: `${virtualizerClassName}__before`,\n beforeContainer: `${virtualizerClassName}__beforeContainer`,\n after: `${virtualizerClassName}__after`,\n afterContainer: `${virtualizerClassName}__afterContainer`,\n};\n\nconst useStyles = makeStyles({\n base: {\n display: 'block',\n pointerEvents: 'none',\n },\n relative: {\n position: 'relative',\n },\n horizontal: {\n minHeight: '100%',\n },\n vertical: {\n minWidth: '100%',\n },\n});\n\n/**\n * Apply styling to the Virtualizer states\n */\nexport const useVirtualizerStyles_unstable = (state: VirtualizerState): VirtualizerState => {\n const styles = useStyles();\n const { reversed, axis, beforeBufferHeight, afterBufferHeight, bufferSize } = state;\n const horizontal = axis === 'horizontal';\n\n state.before.className = mergeClasses(\n virtualizerClassNames.before,\n styles.base,\n styles.relative,\n horizontal ? styles.horizontal : styles.vertical,\n state.before.className,\n );\n\n state.after.className = mergeClasses(\n virtualizerClassNames.after,\n styles.base,\n styles.relative,\n horizontal ? styles.horizontal : styles.vertical,\n state.after.className,\n );\n\n state.beforeContainer.className = mergeClasses(\n virtualizerClassNames.beforeContainer,\n styles.base,\n horizontal ? styles.horizontal : styles.vertical,\n state.beforeContainer.className,\n );\n\n state.afterContainer.className = mergeClasses(\n virtualizerClassNames.afterContainer,\n styles.base,\n horizontal ? styles.horizontal : styles.vertical,\n state.afterContainer.className,\n );\n\n const beforeHeightPx = beforeBufferHeight + 'px';\n const afterHeightPx = afterBufferHeight + 'px';\n const beforeBufferHeightPx = beforeBufferHeight + bufferSize + 'px';\n const afterBufferHeightPx = afterBufferHeight + bufferSize + 'px';\n const bufferPx = bufferSize + 'px';\n\n const beforeBuffer = {\n // Column\n ...(!reversed && !horizontal && { marginBottom: `-${bufferPx}` }),\n // Column-Reverse\n ...(reversed && !horizontal && { marginTop: `-${bufferPx}` }),\n // Row\n ...(!reversed && horizontal && { marginLeft: `-${bufferPx}` }),\n // Row-Reverse\n ...(reversed && horizontal && { marginRight: `-${bufferPx}` }),\n };\n\n const afterBuffer = {\n // Column\n ...(!reversed && !horizontal && { marginTop: `-${bufferPx}` }),\n // Column-Reverse\n ...(reversed && !horizontal && { marginBottom: `-${bufferPx}` }),\n // Row\n ...(!reversed && horizontal && { marginLeft: `-${bufferPx}` }),\n // Row-Reverse\n ...(reversed && horizontal && { marginRight: `-${bufferPx}` }),\n };\n\n state.before.style = {\n height: horizontal ? '100%' : beforeBufferHeightPx,\n width: horizontal ? beforeBufferHeightPx : '100%',\n ...beforeBuffer,\n ...state.before.style,\n };\n\n state.beforeContainer.style = {\n height: horizontal ? 'auto' : beforeHeightPx,\n width: horizontal ? beforeHeightPx : 'auto',\n ...state.beforeContainer.style,\n };\n\n state.after.style = {\n height: horizontal ? '100%' : afterBufferHeightPx,\n width: horizontal ? afterBufferHeightPx : '100%',\n ...afterBuffer,\n ...state.after.style,\n };\n\n state.afterContainer.style = {\n height: horizontal ? 'auto' : afterHeightPx,\n width: horizontal ? afterHeightPx : 'auto',\n ...state.afterContainer.style,\n };\n\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AAIzD,MAAMC,oBAAoB,GAAG,iBAAiB;AAC9C,OAAO,MAAMC,qBAAqB,GAAqC;EACrEC,MAAM,EAAE,GAAGF,oBAAoB,UAAU;EACzCG,eAAe,EAAE,GAAGH,oBAAoB,mBAAmB;EAC3DI,KAAK,EAAE,GAAGJ,oBAAoB,SAAS;EACvCK,cAAc,EAAE,GAAGL,oBAAoB;CACxC;AAED,MAAMM,SAAS,gBAAGR,QAAA;EAAAS,IAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,QAAA;IAAAC,MAAA;EAAA;EAAAC,UAAA;IAAAC,MAAA;EAAA;EAAAC,QAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAchB;AAEF;;;AAGA,OAAO,MAAMC,6BAA6B,GAAIC,K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K,CAAChB,MAAM,CAACmC;GACjB;EAEDnB,KAAK,CAACf,eAAe,CAACkC,KAAK,GAAG;IAC5BC,MAAM,EAAE1B,UAAU,GAAG,MAAM,GAAGc,cAAc;IAC5Ca,KAAK,EAAE3B,UAAU,GAAGc,cAAc,GAAG,MAAM;IAC3C,GAAGR,KAAK,CAACf,eAAe,CAACkC;GAC1B;EAEDnB,KAAK,CAACd,KAAK,CAACiC,KAAK,GAAG;IAClBC,MAAM,EAAE1B,UAAU,GAAG,MAAM,GAAGiB,mBAAmB;IACjDU,KAAK,EAAE3B,UAAU,GAAGiB,mBAAmB,GAAG,MAAM;IAChD,GAAGO,WAAW;IACd,GAAGlB,KAAK,CAACd,KAAK,CAACiC;GAChB;EAEDnB,KAAK,CAACb,cAAc,CAACgC,KAAK,GAAG;IAC3BC,MAAM,EAAE1B,UAAU,GAAG,MAAM,GAAGe,aAAa;IAC3CY,KAAK,EAAE3B,UAAU,GAAGe,aAAa,GAAG,MAAM;IAC1C,GAAGT,KAAK,CAACb,cAAc,CAACgC;GACzB;EAED,OAAOnB,KAAK;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","useIsomorphicLayoutEffect","useState","useRef","useIntersectionObserver","callback","options","observer","observerList","setObserverList","observerInit","setObserverInit","current","IntersectionObserver","length","forEach","element","_a","observe","disconnect"],"sources":["../src/packages/react-components/react-virtualizer/src/hooks/useIntersectionObserver.ts"],"sourcesContent":["import type { Dispatch, MutableRefObject, SetStateAction } from 'react';\nimport * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n\nconst { useState, useRef } = React;\n\n/**\n * React hook that allows easy usage of the browser API IntersectionObserver within React\n * @param callback - A function called when the percentage of the target element is visible crosses a threshold.\n * @param options - An optional object which customizes the observer. If options isn't specified, the observer uses the\n * document's viewport as the root, with no margin, and a 0% threshold (meaning that even a one-pixel change is\n * enough to trigger a callback).\n * @returns An array containing a callback to update the list of Elements the observer should listen to, a callback to\n * update the init options of the IntersectionObserver and a ref to the IntersectionObserver instance itself.\n */\n\nexport const useIntersectionObserver = (\n callback: IntersectionObserverCallback,\n options?: IntersectionObserverInit,\n): {\n setObserverList: Dispatch<SetStateAction<Element[] | undefined>>;\n setObserverInit: Dispatch<SetStateAction<IntersectionObserverInit | undefined>>;\n observer: MutableRefObject<IntersectionObserver | undefined>;\n} => {\n // export const useIntersectionObserver = (\n // callback: IntersectionObserverCallback,\n // options?: IntersectionObserverInit,\n // ): [\n // Dispatch<SetStateAction<Element[] | undefined>>,\n // Dispatch<SetStateAction<IntersectionObserverInit | undefined>>,\n // MutableRefObject<IntersectionObserver | undefined>,\n // ] => {\n const observer = useRef<IntersectionObserver>();\n const [observerList, setObserverList] = useState<Element[]>();\n const [observerInit, setObserverInit] = useState<IntersectionObserverInit | undefined>(options);\n\n // Observer elements in passed in list and clean up previous list\n // This effect is only triggered when observerList is updated\n useIsomorphicLayoutEffect(() => {\n observer.current = new IntersectionObserver(callback, observerInit);\n\n // If we have an instance of IO and a list with elements, observer the elements\n if (observer.current && observerList && observerList.length > 0) {\n observerList.forEach(element => {\n observer.current?.observe(element);\n });\n }\n\n // clean up previous elements being listened to\n return () => {\n if (observer.current) {\n observer.current.disconnect();\n }\n };\n }, [observerList, observerInit, callback]);\n\n return { setObserverList, setObserverInit, observer };\n};\n"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,yBAAyB,QAAQ,2BAA2B;AAErE,MAAM;EAAEC,QAAQ;EAAEC;AAAM,CAAE,GAAGH,KAAK;AAElC;;;;;;;;;AAUA,OAAO,MAAMI,uBAAuB,GAAGA,CACrCC,QAAsC,EACtCC,OAAkC,KAKhC;EACF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,MAAMC,QAAQ,GAAGJ,MAAM,EAAwB;EAC/C,MAAM,CAACK,YAAY,EAAEC,eAAe,CAAC,GAAGP,QAAQ,EAAa;EAC7D,MAAM,CAACQ,YAAY,EAAEC,eAAe,CAAC,GAAGT,QAAQ,CAAuCI,OAAO,CAAC;EAE/F;EACA;EACAL,yBAAyB,CAAC,MAAK;IAC7BM,QAAQ,CAACK,OAAO,GAAG,IAAIC,oBAAoB,CAACR,QAAQ,EAAEK,YAAY,CAAC;IAEnE;IACA,IAAIH,QAAQ,CAACK,OAAO,IAAIJ,YAAY,IAAIA,YAAY,CAACM,MAAM,GAAG,CAAC,EAAE;MAC/DN,YAAY,CAACO,OAAO,CAACC,OAAO,IAAG;;QAC7B,CAAAC,EAAA,GAAAV,QAAQ,CAACK,OAAO,cAAAK,EAAA,uBAAAA,EAAA,CAAEC,OAAO,CAACF,OAAO,CAAC;MACpC,CAAC,CAAC;;IAGJ;IACA,OAAO,MAAK;MACV,IAAIT,QAAQ,CAACK,OAAO,EAAE;QACpBL,QAAQ,CAACK,OAAO,CAACO,UAAU,EAAE;;IAEjC,CAAC;EACH,CAAC,EAAE,CAACX,YAAY,EAAEE,YAAY,EAAEL,QAAQ,CAAC,CAAC;EAE1C,OAAO;IAAEI,eAAe;IAAEE,eAAe;IAAEJ;EAAQ,CAAE;AACvD,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["Virtualizer","virtualizerClassNames","useVirtualizer_unstable","renderVirtualizer_unstable","useVirtualizerStyles_unstable","useIntersectionObserver"],"sources":["../src/packages/react-components/react-virtualizer/src/index.ts"],"sourcesContent":["export {\n Virtualizer,\n virtualizerClassNames,\n useVirtualizer_unstable,\n renderVirtualizer_unstable,\n useVirtualizerStyles_unstable,\n} from './Virtualizer';\nexport type {\n VirtualizerProps,\n VirtualizerState,\n VirtualizerSlots,\n VirtualizerChildRenderFunction,\n} from './Virtualizer';\nexport { useIntersectionObserver } from './Hooks';\n"],"mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,6BAA6B,QACxB,eAAe;AAOtB,SAASC,uBAAuB,QAAQ,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-virtualizer/src/Hooks.ts"],"sourcesContent":["export * from './hooks/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-virtualizer/src/Virtualizer.ts"],"sourcesContent":["export * from './components/Virtualizer/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,oCAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useVirtualizerStyles_1","require","useVirtualizer_1","renderVirtualizer_1","Virtualizer","props","state","useVirtualizer_unstable","useVirtualizerStyles_unstable","renderVirtualizer_unstable","exports","displayName"],"sources":["../src/packages/react-components/react-virtualizer/src/components/Virtualizer/Virtualizer.ts"],"sourcesContent":["import type { VirtualizerProps } from './Virtualizer.types';\nimport { useVirtualizerStyles_unstable } from './useVirtualizerStyles';\nimport { useVirtualizer_unstable } from './useVirtualizer';\nimport { renderVirtualizer_unstable } from './renderVirtualizer';\nimport type { FC } from 'react';\n\n/**\n * Virtualizer pseudo-component, this functional wrapper\n * provides a simple interface for reducing the total number\n * of elements rendered at one time in large lists.\n */\nexport const Virtualizer: FC<VirtualizerProps> = (props: VirtualizerProps) => {\n const state = useVirtualizer_unstable(props);\n useVirtualizerStyles_unstable(state);\n\n return renderVirtualizer_unstable(state);\n};\n\nVirtualizer.displayName = 'Virtualizer';\n"],"mappings":";;;;;;AACA,MAAAA,sBAAA,gBAAAC,OAAA;AACA,MAAAC,gBAAA,gBAAAD,OAAA;AACA,MAAAE,mBAAA,gBAAAF,OAAA;AAGA;;;;;AAKO,MAAMG,WAAW,GAA0BC,KAAuB,IAAI;EAC3E,MAAMC,KAAK,GAAGJ,gBAAA,CAAAK,uBAAuB,CAACF,KAAK,CAAC;EAC5CL,sBAAA,CAAAQ,6BAA6B,CAACF,KAAK,CAAC;EAEpC,OAAOH,mBAAA,CAAAM,0BAA0B,CAACH,KAAK,CAAC;AAC1C,CAAC;AALYI,OAAA,CAAAN,WAAW,GAAAA,WAAA;AAOxBM,OAAA,CAAAN,WAAW,CAACO,WAAW,GAAG,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/packages/react-components/react-virtualizer/src/components/Virtualizer/Virtualizer.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type VirtualizerSlots = {\n /**\n * The intersection observed 'before' element will detect when scrolling towards the beginning.\n */\n before: NonNullable<Slot<'div', 'td'>>;\n /**\n * A block place holding whitespace at the beginning of current DOM children.\n */\n beforeContainer: NonNullable<Slot<'div', 'tr'>>;\n /**\n * The intersection observed 'after' element will detect when scrolling towards the end.\n */\n after: NonNullable<Slot<'div', 'td'>>;\n /**\n * A block place holding whitespace after the end of current DOM children.\n */\n afterContainer: NonNullable<Slot<'div', 'tr'>>;\n};\n\nexport type VirtualizerState = ComponentState<VirtualizerSlots> & {\n /**\n * The current virtualized array of children to show in the DOM.\n */\n virtualizedChildren: React.ReactNode[];\n /**\n * The current start index for the virtualizer, all previous index's will be removed from DOM.\n */\n virtualizerStartIndex: number;\n /**\n * Current buffer height required at beginning of array.\n */\n afterBufferHeight: number;\n /**\n * Current buffer height required at end of array.\n */\n beforeBufferHeight: number;\n /**\n * The total current height of the scrollView/child content.\n */\n totalVirtualizerHeight: number;\n /**\n * The scroll direction\n * @default vertical\n */\n axis?: 'vertical' | 'horizontal';\n /**\n * Tells the virtualizer to measure in the reverse direction (for column-reverse order etc.)\n */\n reversed?: boolean;\n /**\n * Tells the virtualizer how much\n */\n bufferSize: number;\n};\n\n// Virtualizer render function to procedurally generate children elements as rows or columns via index.\n// Q: Use generic typing and passing through object data or a simple index system?\nexport type VirtualizerChildRenderFunction = (index: number) => React.ReactNode;\n\nexport type VirtualizerProps = ComponentProps<Partial<VirtualizerSlots>> & {\n /**\n * Child render function.\n * Iteratively called to return current virtualizer DOM children.\n * Will act as a row or column indexer depending on Virtualizer settings.\n * Can be used dynamically.\n */\n children: VirtualizerChildRenderFunction;\n\n /**\n * Default cell size to use if no custom callback provided.\n * If implementing `getItemSize` this should be the initial and ideally minimum cell size.\n */\n itemSize: number;\n\n /**\n * The total number of items to be virtualized.\n */\n numItems: number;\n\n /**\n * Number of children to render in the DOM during virtualization.\n * Constraints:\n * - Large enough that the items rendered in DOM cover the viewport\n * and intersection observer buffers (buffersize) at both ends.\n */\n virtualizerLength: number;\n\n /**\n * Defaults to 1/4th of virtualizerLength.\n * Controls the number of elements rendered before the current index entering the virtualized viewport.\n * Constraints:\n * - Large enough to cover bufferSize (prevents buffers intersecting into the viewport during rest state).\n * - Small enough that the end buffer and end index (start index + virtualizerLength) is not within viewport at rest.\n */\n bufferItems?: number;\n\n /**\n * Defaults to half of bufferItems size (in pixels).\n * The length (in pixels) before the end/start DOM index where the virtualizer recalculation will be triggered.\n * Increasing this reduces whitespace on ultra-fast scroll, as additional elements\n * are buffered to appear while virtualization recalculates.\n * Constraints:\n * - At least 1px - although this will only trigger the recalculation after bookends (whitespace) enter viewport.\n * - BufferSize must be smaller than bufferItems pixel size, as it prevents bookends entering viewport at rest.\n */\n bufferSize?: number;\n\n /**\n * Enables users to override the intersectionObserverRoot.\n * @default null\n */\n intersectionObserverRoot?: React.MutableRefObject<HTMLElement | null>;\n\n /**\n * The scroll direction\n * @default vertical\n */\n axis?: 'vertical' | 'horizontal';\n\n /**\n * Tells the virtualizer to measure in the reverse direction (for column-reverse order etc.)\n * This value should be flipped in RTL implementation (TBD whether automate RTL).\n */\n reversed?: boolean;\n\n /**\n * Callback for acquiring size of individual items\n * @param index - the index of the requested size's child\n */\n getItemSize?: (index: number) => number;\n\n /**\n * Notify users of index changes\n */\n onUpdateIndex?: (index: number, prevIndex: number) => void;\n\n /**\n * Allow users to intervene in index calculation changes\n */\n onCalculateIndex?: (newIndex: number) => number;\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-virtualizer/src/components/Virtualizer/index.ts"],"sourcesContent":["export * from './Virtualizer';\nexport * from './Virtualizer.types';\nexport * from './useVirtualizer';\nexport * from './renderVirtualizer';\nexport * from './useVirtualizerStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,yBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,yBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,4BAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","react_utilities_1","renderVirtualizer_unstable","state","slots","slotProps","getSlots","createElement","Fragment","beforeContainer","before","virtualizedChildren","afterContainer","after","exports"],"sources":["../src/packages/react-components/react-virtualizer/src/components/Virtualizer/renderVirtualizer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { VirtualizerSlots, VirtualizerState } from './Virtualizer.types';\n\nexport const renderVirtualizer_unstable = (state: VirtualizerState) => {\n const { slots, slotProps } = getSlots<VirtualizerSlots>(state);\n\n return (\n <React.Fragment>\n {/* The 'before' bookend to hold items in place and detect scroll previous */}\n <slots.beforeContainer {...slotProps.beforeContainer}>\n <slots.before {...slotProps.before} />\n </slots.beforeContainer>\n {/* The reduced list of non-virtualized children to be rendered */}\n {state.virtualizedChildren}\n {/* The 'after' bookend to hold items in place and detect scroll next */}\n <slots.afterContainer {...slotProps.afterContainer}>\n <slots.after {...slotProps.after} />\n </slots.afterContainer>\n </React.Fragment>\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGO,MAAME,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAmBH,KAAK,CAAC;EAE9D,OACEJ,KAAA,CAAAQ,aAAA,CAACR,KAAK,CAACS,QAAQ,QAEbT,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACK,eAAe;IAAA,GAAKJ,SAAS,CAACI;EAAe,GAClDV,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACM,MAAM;IAAA,GAAKL,SAAS,CAACK;EAAM,EAAI,CAChB,EAEvBP,KAAK,CAACQ,mBAAmB,EAE1BZ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACQ,cAAc;IAAA,GAAKP,SAAS,CAACO;EAAc,GAChDb,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACS,KAAK;IAAA,GAAKR,SAAS,CAACQ;EAAK,EAAI,CACf,CACR;AAErB,CAAC;AAjBYC,OAAA,CAAAZ,0BAA0B,GAAAA,0BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;AAAA;AAEA;AAGA;AACA;AAEA,SAAgBA,uBAAuB,CAACC,KAAuB;EAC7D,MAAM;IACJC,QAAQ;IACRC,QAAQ;IACRC,iBAAiB;IACjBC,QAAQ,EAAEC,WAAW;IACrBC,WAAW;IACXC,WAAW,GAAGC,IAAI,CAACC,KAAK,CAACN,iBAAiB,G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IACDC,mBAAmB,EAAE/E,UAAU,CAACI,OAAO;IACvCuE,MAAM,EAAEK,kCAAgB,CAACzG,KAAK,CAACoG,MAAM,EAAE;MACrCM,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZC,GAAG,EAAErB,YAAY;QACjBsB,IAAI,EAAE;;KAET,CAAC;IACFR,KAAK,EAAEI,kCAAgB,CAACzG,KAAK,CAACqG,KAAK,EAAE;MACnCK,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZC,GAAG,EAAEjB,WAAW;QAChBkB,IAAI,EAAE;;KAET,CAAC;IACFP,eAAe,EAAEG,kCAAgB,CAACzG,KAAK,CAACsG,eAAe,EAAE;MACvDI,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZE,IAAI,EAAE;;KAET,CAAC;IACFN,cAAc,EAAEE,kCAAgB,CAACzG,KAAK,CAACuG,cAAc,EAAE;MACrDG,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZE,IAAI,EAAE;;KAET,CAAC;IACFC,kBAAkB,EAAEZ,kBAAkB,GAAGxC,eAAe,EAAE,GAAG,CAAC;IAC9DqD,iBAAiB,EAAEb,kBAAkB,GAAGhD,cAAc,EAAE,GAAG,CAAC;IAC5D8D,sBAAsB,EAAEd,kBAAkB,GAAG/C,kBAAkB,EAAE,GAAGhD,iBAAiB,GAAGF,QAAQ;IAChGgB,qBAAqB;IACrBJ,IAAI;IACJH,UAAU;IACVI;GACD;AACH;AAlbAmG","names":["useVirtualizer_unstable","props","itemSize","numItems","virtualizerLength","children","renderChild","getItemSize","bufferItems","Math","round","bufferSize","floor","intersectionObserverRoot","axis","reversed","onUpdateIndex","onCalculateIndex","virtualizerStartIndex","setVirtualizerStartIndex","react_1","beforeElementRef","afterElementRef","childSizes","Array","childProgressiveSizes","childArray","forceUpdate","horizontal","populateSizeArrays","current","length","index","batchUpdateNewIndex","updateChildRows","updateCurrentItemSizes","setObserverList","useIntersectionObserver_1","entries","observer","measurementPos","bufferCount","latestEntry","sort","entry1","entry2","time","find","entry","intersectionRatio","target","calculateAfter","calculateTotalSize","abs","boundingClientRect","bottom","top","right","left","calculateBefore","max","startIndex","getIndexFromScrollPosition","bufferedIndex","maxIndex","newStartIndex","min","react_dom_1","root","rootMargin","threshold","findIndexRecursive","scrollPos","lowIndex","highIndex","midpoint","iBefore","iAfter","indexValue","afterIndexValue","beforeIndexValue","getIndexFromSizeArray","lastItemIndex","remainingItems","newIndex","actualIndex","end","i","setBeforeRef","element","newList","push","setAfterRef","endIndex","didUpdate","newSize","prevSize","hasInitialized","initializeSizeArray","isFullyInitialized","components","before","after","beforeContainer","afterContainer","virtualizedChildren","react_utilities_1","required","defaultProps","ref","role","beforeBufferHeight","afterBufferHeight","totalVirtualizerHeight","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-virtualizer/src/components/Virtualizer/useVirtualizer.ts"],"sourcesContent":["import { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport type { ReactNode } from 'react';\nimport { useEffect, useRef, useState, useCallback, useReducer } from 'react';\n\nimport type { VirtualizerProps, VirtualizerState } from './Virtualizer.types';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { flushSync } from 'react-dom';\n\nexport function useVirtualizer_unstable(props: VirtualizerProps): VirtualizerState {\n const {\n itemSize,\n numItems,\n virtualizerLength,\n children: renderChild,\n getItemSize,\n bufferItems = Math.round(virtualizerLength / 4.0),\n bufferSize = Math.floor(bufferItems / 2.0) * itemSize,\n intersectionObserverRoot,\n axis = 'vertical',\n reversed = false,\n onUpdateIndex,\n onCalculateIndex,\n } = props;\n\n // Tracks the initial item to start virtualizer at, -1 implies first render cycle\n const [virtualizerStartIndex, setVirtualizerStartIndex] = useState<number>(-1);\n\n // Store ref to before padding element\n const beforeElementRef = useRef<Element | null>(null);\n\n // Store ref to before padding element\n const afterElementRef = useRef<Element | null>(null);\n\n // We need to store an array to track dynamic sizes, we can use this to incrementally update changes\n const childSizes = useRef<number[]>(new Array<number>(getItemSize ? numItems : 0));\n\n /* We keep track of the progressive sizing/placement down the list,\n this helps us skip re-calculations unless children/size changes */\n const childProgressiveSizes = useRef<number[]>(new Array<number>(getItemSize ? numItems : 0));\n\n // The internal tracking REF for child array (updates often).\n const childArray = useRef<ReactNode[]>(new Array(virtualizerLength));\n\n // We want to be methodical about updating the render with child reference array\n const forceUpdate = useReducer(() => ({}), {})[1];\n\n const horizontal = axis === 'horizontal';\n\n const populateSizeArrays = () => {\n if (!getItemSize) {\n // Static sizes, never mind!\n return;\n }\n\n if (numItems !== childSizes.current.length) {\n childSizes.current = new Array<number>(numItems);\n }\n\n if (numItems !== childProgressiveSizes.current.length) {\n childProgressiveSizes.current = new Array<number>(numItems);\n }\n\n for (let index = 0; index < numItems; index++) {\n childSizes.current[index] = getItemSize(index);\n\n if (index === 0) {\n childProgressiveSizes.current[index] = childSizes.current[index];\n } else {\n childProgressiveSizes.current[index] = childProgressiveSizes.current[index - 1] + childSizes.current[index];\n }\n }\n };\n\n const batchUpdateNewIndex = (index: number) => {\n // Local updates\n onUpdateIndex?.(index, virtualizerStartIndex);\n updateChildRows(index);\n updateCurrentItemSizes(index);\n\n // State setters\n setVirtualizerStartIndex(index);\n };\n\n // Observe intersections of virtualized components\n const { setObserverList } = useIntersectionObserver(\n (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => {\n /* Sanity check - do we even need virtualization? */\n if (virtualizerLength > numItems) {\n if (virtualizerStartIndex !== 0) {\n batchUpdateNewIndex(0);\n }\n // No-op\n return;\n }\n\n /* IO initiates this function when needed (bookend entering view) */\n let measurementPos = 0;\n let bufferCount = bufferItems;\n\n // Grab latest entry that is intersecting\n const latestEntry =\n entries.length === 1\n ? entries[0]\n : entries\n .sort((entry1, entry2) => entry2.time - entry1.time)\n .find(entry => {\n return entry.intersectionRatio > 0;\n });\n\n if (!latestEntry) {\n // If we don't find an intersecting area, ignore for now.\n return;\n }\n\n if (latestEntry.target === afterElementRef.current) {\n // We need to inverse the buffer count\n bufferCount = virtualizerLength - bufferItems;\n measurementPos = reversed ? calculateAfter() : calculateTotalSize() - calculateAfter();\n if (!horizontal) {\n if (reversed) {\n // Scrolling 'up' and hit the after element below\n measurementPos -= Math.abs(latestEntry.boundingClientRect.bottom);\n } else if (latestEntry.boundingClientRect.top < 0) {\n // Scrolling 'down' and hit the after element above top: 0\n measurementPos -= latestEntry.boundingClientRect.top;\n }\n } else {\n if (reversed) {\n // Scrolling 'left' and hit the after element\n measurementPos -= Math.abs(latestEntry.boundingClientRect.right);\n } else if (latestEntry.boundingClientRect.left < 0) {\n // Scrolling 'right' and hit the after element\n measurementPos -= latestEntry.boundingClientRect.left;\n }\n }\n } else if (latestEntry.target === beforeElementRef.current) {\n measurementPos = reversed ? calculateTotalSize() - calculateBefore() : calculateBefore();\n if (!horizontal) {\n if (!reversed) {\n measurementPos -= Math.abs(latestEntry.boundingClientRect.bottom);\n } else if (latestEntry.boundingClientRect.top < 0) {\n // Scrolling 'down' in reverse order and hit the before element above top: 0\n measurementPos -= latestEntry.boundingClientRect.top;\n }\n } else {\n if (!reversed) {\n measurementPos -= Math.abs(latestEntry.boundingClientRect.right);\n } else if (latestEntry.boundingClientRect.left < 0) {\n // Scrolling 'left' and hit before element\n measurementPos -= latestEntry.boundingClientRect.left;\n }\n }\n }\n\n if (reversed) {\n // We're reversed, up is down, left is right, invert the scroll measure.\n measurementPos = Math.max(calculateTotalSize() - Math.abs(measurementPos), 0);\n }\n\n // For now lets use hardcoded size to assess current element to paginate on\n const startIndex = getIndexFromScrollPosition(measurementPos);\n let bufferedIndex = Math.max(startIndex - bufferCount, 0);\n\n if (onCalculateIndex) {\n // User has chance to intervene/customize prior to render\n // They may want to normalize this value.\n bufferedIndex = onCalculateIndex(bufferedIndex);\n }\n\n // Safety limits\n const maxIndex = Math.max(numItems - virtualizerLength, 0);\n const newStartIndex = Math.min(Math.max(bufferedIndex, 0), maxIndex);\n\n if (virtualizerStartIndex !== newStartIndex) {\n // We flush sync this and perform an immediate state update\n // due to virtualizerStartIndex invalidation.\n flushSync(() => {\n batchUpdateNewIndex(newStartIndex);\n });\n }\n },\n {\n root: intersectionObserverRoot ? intersectionObserverRoot?.current : null,\n rootMargin: '0px',\n threshold: 0,\n },\n );\n\n const findIndexRecursive = (scrollPos: number, lowIndex: number, highIndex: number): number => {\n if (lowIndex > highIndex) {\n // We shouldn't get here - but no-op the index if we do.\n return virtualizerStartIndex;\n }\n const midpoint = Math.floor((lowIndex + highIndex) / 2);\n const iBefore = Math.max(midpoint - 1, 0);\n const iAfter = Math.min(midpoint + 1, childProgressiveSizes.current.length - 1);\n const indexValue = childProgressiveSizes.current[midpoint];\n const afterIndexValue = childProgressiveSizes.current[iAfter];\n const beforeIndexValue = childProgressiveSizes.current[iBefore];\n if (scrollPos <= afterIndexValue && scrollPos >= beforeIndexValue) {\n /* We've found our index - if we are exactly matching before/after index that's ok,\n better to reduce checks if it's right on the boundary. */\n return midpoint;\n }\n\n if (indexValue > scrollPos) {\n return findIndexRecursive(scrollPos, lowIndex, midpoint - 1);\n } else {\n return findIndexRecursive(scrollPos, midpoint + 1, highIndex);\n }\n };\n\n const getIndexFromSizeArray = (scrollPos: number): number => {\n /* Quick searches our progressive height array */\n if (\n scrollPos === 0 ||\n childProgressiveSizes.current.length === 0 ||\n scrollPos <= childProgressiveSizes.current[0]\n ) {\n // Check start\n return 0;\n }\n\n if (scrollPos >= childProgressiveSizes.current[childProgressiveSizes.current.length - 1]) {\n // Check end\n return childProgressiveSizes.current.length - 1;\n }\n\n return findIndexRecursive(scrollPos, 0, childProgressiveSizes.current.length - 1);\n };\n\n const getIndexFromScrollPosition = (scrollPos: number) => {\n if (!getItemSize) {\n return Math.round(scrollPos / itemSize);\n }\n\n return getIndexFromSizeArray(scrollPos);\n };\n\n const calculateTotalSize = () => {\n if (!getItemSize) {\n return itemSize * numItems;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[numItems - 1];\n };\n\n const calculateBefore = () => {\n if (!getItemSize) {\n // The missing items from before virtualization starts height\n return virtualizerStartIndex * itemSize;\n }\n\n if (virtualizerStartIndex <= 0) {\n return 0;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[virtualizerStartIndex - 1];\n };\n\n const calculateAfter = () => {\n if (numItems === 0) {\n return 0;\n }\n\n const lastItemIndex = Math.min(virtualizerStartIndex + virtualizerLength, numItems - 1);\n if (!getItemSize) {\n // The missing items from after virtualization ends height\n const remainingItems = numItems - lastItemIndex - 1;\n return remainingItems * itemSize;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[numItems - 1] - childProgressiveSizes.current[lastItemIndex];\n };\n\n const updateChildRows = (newIndex: number) => {\n if (numItems === 0) {\n /* Nothing to virtualize */\n\n return [];\n }\n\n if (childArray.current.length !== numItems) {\n childArray.current = new Array(virtualizerLength);\n }\n const actualIndex = Math.max(newIndex, 0);\n const end = Math.min(actualIndex + virtualizerLength, numItems);\n\n for (let i = actualIndex; i < end; i++) {\n childArray.current[i - actualIndex] = renderChild(i);\n }\n };\n\n const setBeforeRef = useCallback(\n (element: HTMLDivElement) => {\n if (!element || beforeElementRef.current === element) {\n return;\n }\n beforeElementRef.current = element;\n const newList = [];\n\n newList.push(beforeElementRef.current);\n\n if (afterElementRef.current) {\n newList.push(afterElementRef.current);\n }\n\n // Ensure we update array if before element changed\n setObserverList(newList);\n },\n [setObserverList],\n );\n\n const setAfterRef = useCallback(\n (element: HTMLDivElement) => {\n if (!element || afterElementRef.current === element) {\n return;\n }\n afterElementRef.current = element;\n const newList = [];\n\n if (beforeElementRef.current) {\n newList.push(beforeElementRef.current);\n }\n\n newList.push(afterElementRef.current);\n\n // Ensure we update array if after element changed\n setObserverList(newList);\n },\n [setObserverList],\n );\n\n const updateCurrentItemSizes = (newIndex: number) => {\n if (!getItemSize) {\n // Static sizes, not required.\n return;\n }\n // We should always call our size function on index change (only for the items that will be rendered)\n // This ensures we request the latest data for incoming items in case sizing has changed.\n const endIndex = Math.min(newIndex + virtualizerLength, numItems);\n const startIndex = Math.max(newIndex, 0);\n\n let didUpdate = false;\n for (let i = startIndex; i < endIndex; i++) {\n const newSize = getItemSize(i);\n if (newSize !== childSizes.current[i]) {\n childSizes.current[i] = newSize;\n didUpdate = true;\n }\n }\n\n if (didUpdate) {\n // Update our progressive size array\n for (let i = startIndex; i < numItems; i++) {\n const prevSize = i > 0 ? childProgressiveSizes.current[i - 1] : 0;\n childProgressiveSizes.current[i] = prevSize + childSizes.current[i];\n }\n }\n };\n\n // Initialize the size array before first render.\n const hasInitialized = useRef<boolean>(false);\n const initializeSizeArray = () => {\n if (hasInitialized.current === false) {\n hasInitialized.current = true;\n populateSizeArrays();\n }\n };\n\n // Initialization on mount - update array index to 0 (ready state).\n // Only fire on mount (no deps).\n useEffect(() => {\n if (virtualizerStartIndex < 0) {\n batchUpdateNewIndex(0);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // If the user passes in an updated renderChild function - update current children\n useEffect(() => {\n if (virtualizerStartIndex >= 0) {\n updateChildRows(virtualizerStartIndex);\n forceUpdate();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [renderChild]);\n\n // Ensure we have run through and updated the whole size list array at least once.\n initializeSizeArray();\n\n if (getItemSize && (numItems !== childSizes.current.length || numItems !== childProgressiveSizes.current.length)) {\n // Child length mismatch, repopulate size arrays.\n populateSizeArrays();\n }\n\n const isFullyInitialized = hasInitialized.current && virtualizerStartIndex >= 0;\n return {\n components: {\n before: 'div',\n after: 'div',\n beforeContainer: 'div',\n afterContainer: 'div',\n },\n virtualizedChildren: childArray.current,\n before: resolveShorthand(props.before, {\n required: true,\n defaultProps: {\n ref: setBeforeRef,\n role: 'none',\n },\n }),\n after: resolveShorthand(props.after, {\n required: true,\n defaultProps: {\n ref: setAfterRef,\n role: 'none',\n },\n }),\n beforeContainer: resolveShorthand(props.beforeContainer, {\n required: true,\n defaultProps: {\n role: 'none',\n },\n }),\n afterContainer: resolveShorthand(props.afterContainer, {\n required: true,\n defaultProps: {\n role: 'none',\n },\n }),\n beforeBufferHeight: isFullyInitialized ? calculateBefore() : 0,\n afterBufferHeight: isFullyInitialized ? calculateAfter() : 0,\n totalVirtualizerHeight: isFullyInitialized ? calculateTotalSize() : virtualizerLength * itemSize,\n virtualizerStartIndex,\n axis,\n bufferSize,\n reversed,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"names":["useIntersectionObserver_1","require","react_1","react_utilities_1","react_dom_1","useVirtualizer_unstable","props","itemSize","numItems","virtualizerLength","children","renderChild","getItemSize","bufferItems","Math","round","bufferSize","floor","intersectionObserverRoot","axis","reversed","onUpdateIndex","onCalculateIndex","virtualizerStartIndex","setVirtualizerStartIndex","useState","beforeElementRef","useRef","afterElementRef","childSizes","Array","childProgressiveSizes","childArray","forceUpdate","useReducer","horizontal","populateSizeArrays","current","length","index","batchUpdateNewIndex","updateChildRows","updateCurrentItemSizes","setObserverList","useIntersectionObserver","entries","observer","measurementPos","bufferCount","latestEntry","sort","entry1","entry2","time","find","entry","intersectionRatio","target","calculateAfter","calculateTotalSize","abs","boundingClientRect","bottom","top","right","left","calculateBefore","max","startIndex","getIndexFromScrollPosition","bufferedIndex","maxIndex","newStartIndex","min","flushSync","root","rootMargin","threshold","findIndexRecursive","scrollPos","lowIndex","highIndex","midpoint","iBefore","iAfter","indexValue","afterIndexValue","beforeIndexValue","getIndexFromSizeArray","lastItemIndex","remainingItems","newIndex","actualIndex","end","i","setBeforeRef","useCallback","element","newList","push","setAfterRef","endIndex","didUpdate","newSize","prevSize","hasInitialized","initializeSizeArray","useEffect","isFullyInitialized","components","before","after","beforeContainer","afterContainer","virtualizedChildren","resolveShorthand","required","defaultProps","ref","role","beforeBufferHeight","afterBufferHeight","totalVirtualizerHeight","exports"],"sources":["../src/packages/react-components/react-virtualizer/src/components/Virtualizer/useVirtualizer.ts"],"sourcesContent":["import { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport type { ReactNode } from 'react';\nimport { useEffect, useRef, useState, useCallback, useReducer } from 'react';\n\nimport type { VirtualizerProps, VirtualizerState } from './Virtualizer.types';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { flushSync } from 'react-dom';\n\nexport function useVirtualizer_unstable(props: VirtualizerProps): VirtualizerState {\n const {\n itemSize,\n numItems,\n virtualizerLength,\n children: renderChild,\n getItemSize,\n bufferItems = Math.round(virtualizerLength / 4.0),\n bufferSize = Math.floor(bufferItems / 2.0) * itemSize,\n intersectionObserverRoot,\n axis = 'vertical',\n reversed = false,\n onUpdateIndex,\n onCalculateIndex,\n } = props;\n\n // Tracks the initial item to start virtualizer at, -1 implies first render cycle\n const [virtualizerStartIndex, setVirtualizerStartIndex] = useState<number>(-1);\n\n // Store ref to before padding element\n const beforeElementRef = useRef<Element | null>(null);\n\n // Store ref to before padding element\n const afterElementRef = useRef<Element | null>(null);\n\n // We need to store an array to track dynamic sizes, we can use this to incrementally update changes\n const childSizes = useRef<number[]>(new Array<number>(getItemSize ? numItems : 0));\n\n /* We keep track of the progressive sizing/placement down the list,\n this helps us skip re-calculations unless children/size changes */\n const childProgressiveSizes = useRef<number[]>(new Array<number>(getItemSize ? numItems : 0));\n\n // The internal tracking REF for child array (updates often).\n const childArray = useRef<ReactNode[]>(new Array(virtualizerLength));\n\n // We want to be methodical about updating the render with child reference array\n const forceUpdate = useReducer(() => ({}), {})[1];\n\n const horizontal = axis === 'horizontal';\n\n const populateSizeArrays = () => {\n if (!getItemSize) {\n // Static sizes, never mind!\n return;\n }\n\n if (numItems !== childSizes.current.length) {\n childSizes.current = new Array<number>(numItems);\n }\n\n if (numItems !== childProgressiveSizes.current.length) {\n childProgressiveSizes.current = new Array<number>(numItems);\n }\n\n for (let index = 0; index < numItems; index++) {\n childSizes.current[index] = getItemSize(index);\n\n if (index === 0) {\n childProgressiveSizes.current[index] = childSizes.current[index];\n } else {\n childProgressiveSizes.current[index] = childProgressiveSizes.current[index - 1] + childSizes.current[index];\n }\n }\n };\n\n const batchUpdateNewIndex = (index: number) => {\n // Local updates\n onUpdateIndex?.(index, virtualizerStartIndex);\n updateChildRows(index);\n updateCurrentItemSizes(index);\n\n // State setters\n setVirtualizerStartIndex(index);\n };\n\n // Observe intersections of virtualized components\n const { setObserverList } = useIntersectionObserver(\n (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => {\n /* Sanity check - do we even need virtualization? */\n if (virtualizerLength > numItems) {\n if (virtualizerStartIndex !== 0) {\n batchUpdateNewIndex(0);\n }\n // No-op\n return;\n }\n\n /* IO initiates this function when needed (bookend entering view) */\n let measurementPos = 0;\n let bufferCount = bufferItems;\n\n // Grab latest entry that is intersecting\n const latestEntry =\n entries.length === 1\n ? entries[0]\n : entries\n .sort((entry1, entry2) => entry2.time - entry1.time)\n .find(entry => {\n return entry.intersectionRatio > 0;\n });\n\n if (!latestEntry) {\n // If we don't find an intersecting area, ignore for now.\n return;\n }\n\n if (latestEntry.target === afterElementRef.current) {\n // We need to inverse the buffer count\n bufferCount = virtualizerLength - bufferItems;\n measurementPos = reversed ? calculateAfter() : calculateTotalSize() - calculateAfter();\n if (!horizontal) {\n if (reversed) {\n // Scrolling 'up' and hit the after element below\n measurementPos -= Math.abs(latestEntry.boundingClientRect.bottom);\n } else if (latestEntry.boundingClientRect.top < 0) {\n // Scrolling 'down' and hit the after element above top: 0\n measurementPos -= latestEntry.boundingClientRect.top;\n }\n } else {\n if (reversed) {\n // Scrolling 'left' and hit the after element\n measurementPos -= Math.abs(latestEntry.boundingClientRect.right);\n } else if (latestEntry.boundingClientRect.left < 0) {\n // Scrolling 'right' and hit the after element\n measurementPos -= latestEntry.boundingClientRect.left;\n }\n }\n } else if (latestEntry.target === beforeElementRef.current) {\n measurementPos = reversed ? calculateTotalSize() - calculateBefore() : calculateBefore();\n if (!horizontal) {\n if (!reversed) {\n measurementPos -= Math.abs(latestEntry.boundingClientRect.bottom);\n } else if (latestEntry.boundingClientRect.top < 0) {\n // Scrolling 'down' in reverse order and hit the before element above top: 0\n measurementPos -= latestEntry.boundingClientRect.top;\n }\n } else {\n if (!reversed) {\n measurementPos -= Math.abs(latestEntry.boundingClientRect.right);\n } else if (latestEntry.boundingClientRect.left < 0) {\n // Scrolling 'left' and hit before element\n measurementPos -= latestEntry.boundingClientRect.left;\n }\n }\n }\n\n if (reversed) {\n // We're reversed, up is down, left is right, invert the scroll measure.\n measurementPos = Math.max(calculateTotalSize() - Math.abs(measurementPos), 0);\n }\n\n // For now lets use hardcoded size to assess current element to paginate on\n const startIndex = getIndexFromScrollPosition(measurementPos);\n let bufferedIndex = Math.max(startIndex - bufferCount, 0);\n\n if (onCalculateIndex) {\n // User has chance to intervene/customize prior to render\n // They may want to normalize this value.\n bufferedIndex = onCalculateIndex(bufferedIndex);\n }\n\n // Safety limits\n const maxIndex = Math.max(numItems - virtualizerLength, 0);\n const newStartIndex = Math.min(Math.max(bufferedIndex, 0), maxIndex);\n\n if (virtualizerStartIndex !== newStartIndex) {\n // We flush sync this and perform an immediate state update\n // due to virtualizerStartIndex invalidation.\n flushSync(() => {\n batchUpdateNewIndex(newStartIndex);\n });\n }\n },\n {\n root: intersectionObserverRoot ? intersectionObserverRoot?.current : null,\n rootMargin: '0px',\n threshold: 0,\n },\n );\n\n const findIndexRecursive = (scrollPos: number, lowIndex: number, highIndex: number): number => {\n if (lowIndex > highIndex) {\n // We shouldn't get here - but no-op the index if we do.\n return virtualizerStartIndex;\n }\n const midpoint = Math.floor((lowIndex + highIndex) / 2);\n const iBefore = Math.max(midpoint - 1, 0);\n const iAfter = Math.min(midpoint + 1, childProgressiveSizes.current.length - 1);\n const indexValue = childProgressiveSizes.current[midpoint];\n const afterIndexValue = childProgressiveSizes.current[iAfter];\n const beforeIndexValue = childProgressiveSizes.current[iBefore];\n if (scrollPos <= afterIndexValue && scrollPos >= beforeIndexValue) {\n /* We've found our index - if we are exactly matching before/after index that's ok,\n better to reduce checks if it's right on the boundary. */\n return midpoint;\n }\n\n if (indexValue > scrollPos) {\n return findIndexRecursive(scrollPos, lowIndex, midpoint - 1);\n } else {\n return findIndexRecursive(scrollPos, midpoint + 1, highIndex);\n }\n };\n\n const getIndexFromSizeArray = (scrollPos: number): number => {\n /* Quick searches our progressive height array */\n if (\n scrollPos === 0 ||\n childProgressiveSizes.current.length === 0 ||\n scrollPos <= childProgressiveSizes.current[0]\n ) {\n // Check start\n return 0;\n }\n\n if (scrollPos >= childProgressiveSizes.current[childProgressiveSizes.current.length - 1]) {\n // Check end\n return childProgressiveSizes.current.length - 1;\n }\n\n return findIndexRecursive(scrollPos, 0, childProgressiveSizes.current.length - 1);\n };\n\n const getIndexFromScrollPosition = (scrollPos: number) => {\n if (!getItemSize) {\n return Math.round(scrollPos / itemSize);\n }\n\n return getIndexFromSizeArray(scrollPos);\n };\n\n const calculateTotalSize = () => {\n if (!getItemSize) {\n return itemSize * numItems;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[numItems - 1];\n };\n\n const calculateBefore = () => {\n if (!getItemSize) {\n // The missing items from before virtualization starts height\n return virtualizerStartIndex * itemSize;\n }\n\n if (virtualizerStartIndex <= 0) {\n return 0;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[virtualizerStartIndex - 1];\n };\n\n const calculateAfter = () => {\n if (numItems === 0) {\n return 0;\n }\n\n const lastItemIndex = Math.min(virtualizerStartIndex + virtualizerLength, numItems - 1);\n if (!getItemSize) {\n // The missing items from after virtualization ends height\n const remainingItems = numItems - lastItemIndex - 1;\n return remainingItems * itemSize;\n }\n\n // Time for custom size calcs\n return childProgressiveSizes.current[numItems - 1] - childProgressiveSizes.current[lastItemIndex];\n };\n\n const updateChildRows = (newIndex: number) => {\n if (numItems === 0) {\n /* Nothing to virtualize */\n\n return [];\n }\n\n if (childArray.current.length !== numItems) {\n childArray.current = new Array(virtualizerLength);\n }\n const actualIndex = Math.max(newIndex, 0);\n const end = Math.min(actualIndex + virtualizerLength, numItems);\n\n for (let i = actualIndex; i < end; i++) {\n childArray.current[i - actualIndex] = renderChild(i);\n }\n };\n\n const setBeforeRef = useCallback(\n (element: HTMLDivElement) => {\n if (!element || beforeElementRef.current === element) {\n return;\n }\n beforeElementRef.current = element;\n const newList = [];\n\n newList.push(beforeElementRef.current);\n\n if (afterElementRef.current) {\n newList.push(afterElementRef.current);\n }\n\n // Ensure we update array if before element changed\n setObserverList(newList);\n },\n [setObserverList],\n );\n\n const setAfterRef = useCallback(\n (element: HTMLDivElement) => {\n if (!element || afterElementRef.current === element) {\n return;\n }\n afterElementRef.current = element;\n const newList = [];\n\n if (beforeElementRef.current) {\n newList.push(beforeElementRef.current);\n }\n\n newList.push(afterElementRef.current);\n\n // Ensure we update array if after element changed\n setObserverList(newList);\n },\n [setObserverList],\n );\n\n const updateCurrentItemSizes = (newIndex: number) => {\n if (!getItemSize) {\n // Static sizes, not required.\n return;\n }\n // We should always call our size function on index change (only for the items that will be rendered)\n // This ensures we request the latest data for incoming items in case sizing has changed.\n const endIndex = Math.min(newIndex + virtualizerLength, numItems);\n const startIndex = Math.max(newIndex, 0);\n\n let didUpdate = false;\n for (let i = startIndex; i < endIndex; i++) {\n const newSize = getItemSize(i);\n if (newSize !== childSizes.current[i]) {\n childSizes.current[i] = newSize;\n didUpdate = true;\n }\n }\n\n if (didUpdate) {\n // Update our progressive size array\n for (let i = startIndex; i < numItems; i++) {\n const prevSize = i > 0 ? childProgressiveSizes.current[i - 1] : 0;\n childProgressiveSizes.current[i] = prevSize + childSizes.current[i];\n }\n }\n };\n\n // Initialize the size array before first render.\n const hasInitialized = useRef<boolean>(false);\n const initializeSizeArray = () => {\n if (hasInitialized.current === false) {\n hasInitialized.current = true;\n populateSizeArrays();\n }\n };\n\n // Initialization on mount - update array index to 0 (ready state).\n // Only fire on mount (no deps).\n useEffect(() => {\n if (virtualizerStartIndex < 0) {\n batchUpdateNewIndex(0);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // If the user passes in an updated renderChild function - update current children\n useEffect(() => {\n if (virtualizerStartIndex >= 0) {\n updateChildRows(virtualizerStartIndex);\n forceUpdate();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [renderChild]);\n\n // Ensure we have run through and updated the whole size list array at least once.\n initializeSizeArray();\n\n if (getItemSize && (numItems !== childSizes.current.length || numItems !== childProgressiveSizes.current.length)) {\n // Child length mismatch, repopulate size arrays.\n populateSizeArrays();\n }\n\n const isFullyInitialized = hasInitialized.current && virtualizerStartIndex >= 0;\n return {\n components: {\n before: 'div',\n after: 'div',\n beforeContainer: 'div',\n afterContainer: 'div',\n },\n virtualizedChildren: childArray.current,\n before: resolveShorthand(props.before, {\n required: true,\n defaultProps: {\n ref: setBeforeRef,\n role: 'none',\n },\n }),\n after: resolveShorthand(props.after, {\n required: true,\n defaultProps: {\n ref: setAfterRef,\n role: 'none',\n },\n }),\n beforeContainer: resolveShorthand(props.beforeContainer, {\n required: true,\n defaultProps: {\n role: 'none',\n },\n }),\n afterContainer: resolveShorthand(props.afterContainer, {\n required: true,\n defaultProps: {\n role: 'none',\n },\n }),\n beforeBufferHeight: isFullyInitialized ? calculateBefore() : 0,\n afterBufferHeight: isFullyInitialized ? calculateAfter() : 0,\n totalVirtualizerHeight: isFullyInitialized ? calculateTotalSize() : virtualizerLength * itemSize,\n virtualizerStartIndex,\n axis,\n bufferSize,\n reversed,\n };\n}\n"],"mappings":";;;;;;AAAA,MAAAA,yBAAA,gBAAAC,OAAA;AAEA,MAAAC,OAAA,gBAAAD,OAAA;AAGA,MAAAE,iBAAA,gBAAAF,OAAA;AACA,MAAAG,WAAA,gBAAAH,OAAA;AAEA,SAAgBI,uBAAuBA,CAACC,KAAuB;EAC7D,MAAM;IACJC,QAAQ;IACRC,QAAQ;IACRC,iBAAiB;IACjBC,QAAQ,EAAEC,WAAW;IACrBC,WAAW;IACXC,WAAW,GAAGC,IAAI,CAACC,KAAK,CAACN,iBAAiB,GAAG,GAAG,CAAC;IACjDO,UAAU,GAAGF,IAAI,CAACG,KAAK,CAACJ,WAAW,GAAG,GAAG,CAAC,GAAGN,QAAQ;IACrDW,wB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
|
|
1
|
+
{"version":3,"names":["react_1","require","virtualizerClassName","exports","virtualizerClassNames","before","beforeContainer","after","afterContainer","useStyles","__styles","base","mc9l5x","Bkecrkj","relative","qhf8xq","horizontal","sshi5w","vertical","Bf4jedk","d","useVirtualizerStyles_unstable","state","styles","reversed","axis","beforeBufferHeight","afterBufferHeight","bufferSize","className","mergeClasses","beforeHeightPx","afterHeightPx","beforeBufferHeightPx","afterBufferHeightPx","bufferPx","beforeBuffer","marginBottom","marginTop","marginLeft","marginRight","afterBuffer","style","height","width"],"sources":["../src/packages/react-components/react-virtualizer/src/components/Virtualizer/useVirtualizerStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { VirtualizerSlots, VirtualizerState } from './Virtualizer.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nconst virtualizerClassName = 'fui-Virtualizer';\nexport const virtualizerClassNames: SlotClassNames<VirtualizerSlots> = {\n before: `${virtualizerClassName}__before`,\n beforeContainer: `${virtualizerClassName}__beforeContainer`,\n after: `${virtualizerClassName}__after`,\n afterContainer: `${virtualizerClassName}__afterContainer`,\n};\n\nconst useStyles = makeStyles({\n base: {\n display: 'block',\n pointerEvents: 'none',\n },\n relative: {\n position: 'relative',\n },\n horizontal: {\n minHeight: '100%',\n },\n vertical: {\n minWidth: '100%',\n },\n});\n\n/**\n * Apply styling to the Virtualizer states\n */\nexport const useVirtualizerStyles_unstable = (state: VirtualizerState): VirtualizerState => {\n const styles = useStyles();\n const { reversed, axis, beforeBufferHeight, afterBufferHeight, bufferSize } = state;\n const horizontal = axis === 'horizontal';\n\n state.before.className = mergeClasses(\n virtualizerClassNames.before,\n styles.base,\n styles.relative,\n horizontal ? styles.horizontal : styles.vertical,\n state.before.className,\n );\n\n state.after.className = mergeClasses(\n virtualizerClassNames.after,\n styles.base,\n styles.relative,\n horizontal ? styles.horizontal : styles.vertical,\n state.after.className,\n );\n\n state.beforeContainer.className = mergeClasses(\n virtualizerClassNames.beforeContainer,\n styles.base,\n horizontal ? styles.horizontal : styles.vertical,\n state.beforeContainer.className,\n );\n\n state.afterContainer.className = mergeClasses(\n virtualizerClassNames.afterContainer,\n styles.base,\n horizontal ? styles.horizontal : styles.vertical,\n state.afterContainer.className,\n );\n\n const beforeHeightPx = beforeBufferHeight + 'px';\n const afterHeightPx = afterBufferHeight + 'px';\n const beforeBufferHeightPx = beforeBufferHeight + bufferSize + 'px';\n const afterBufferHeightPx = afterBufferHeight + bufferSize + 'px';\n const bufferPx = bufferSize + 'px';\n\n const beforeBuffer = {\n // Column\n ...(!reversed && !horizontal && { marginBottom: `-${bufferPx}` }),\n // Column-Reverse\n ...(reversed && !horizontal && { marginTop: `-${bufferPx}` }),\n // Row\n ...(!reversed && horizontal && { marginLeft: `-${bufferPx}` }),\n // Row-Reverse\n ...(reversed && horizontal && { marginRight: `-${bufferPx}` }),\n };\n\n const afterBuffer = {\n // Column\n ...(!reversed && !horizontal && { marginTop: `-${bufferPx}` }),\n // Column-Reverse\n ...(reversed && !horizontal && { marginBottom: `-${bufferPx}` }),\n // Row\n ...(!reversed && horizontal && { marginLeft: `-${bufferPx}` }),\n // Row-Reverse\n ...(reversed && horizontal && { marginRight: `-${bufferPx}` }),\n };\n\n state.before.style = {\n height: horizontal ? '100%' : beforeBufferHeightPx,\n width: horizontal ? beforeBufferHeightPx : '100%',\n ...beforeBuffer,\n ...state.before.style,\n };\n\n state.beforeContainer.style = {\n height: horizontal ? 'auto' : beforeHeightPx,\n width: horizontal ? beforeHeightPx : 'auto',\n ...state.beforeContainer.style,\n };\n\n state.after.style = {\n height: horizontal ? '100%' : afterBufferHeightPx,\n width: horizontal ? afterBufferHeightPx : '100%',\n ...afterBuffer,\n ...state.after.style,\n };\n\n state.afterContainer.style = {\n height: horizontal ? 'auto' : afterHeightPx,\n width: horizontal ? afterHeightPx : 'auto',\n ...state.afterContainer.style,\n };\n\n return state;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AA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C,GAAGV,KAAK,CAACd,cAAc,CAACkC;GACzB;EAED,OAAOpB,KAAK;AACd,CAAC;AA1FYnB,OAAA,CAAAkB,6BAA6B,GAAAA,6BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-virtualizer/src/hooks/index.ts"],"sourcesContent":["export * from './useIntersectionObserver';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,+BAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","require","react_utilities_1","useState","useRef","useIntersectionObserver","callback","options","observer","observerList","setObserverList","observerInit","setObserverInit","useIsomorphicLayoutEffect","current","IntersectionObserver","length","forEach","element","_a","observe","disconnect","exports"],"sources":["../src/packages/react-components/react-virtualizer/src/hooks/useIntersectionObserver.ts"],"sourcesContent":["import type { Dispatch, MutableRefObject, SetStateAction } from 'react';\nimport * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n\nconst { useState, useRef } = React;\n\n/**\n * React hook that allows easy usage of the browser API IntersectionObserver within React\n * @param callback - A function called when the percentage of the target element is visible crosses a threshold.\n * @param options - An optional object which customizes the observer. If options isn't specified, the observer uses the\n * document's viewport as the root, with no margin, and a 0% threshold (meaning that even a one-pixel change is\n * enough to trigger a callback).\n * @returns An array containing a callback to update the list of Elements the observer should listen to, a callback to\n * update the init options of the IntersectionObserver and a ref to the IntersectionObserver instance itself.\n */\n\nexport const useIntersectionObserver = (\n callback: IntersectionObserverCallback,\n options?: IntersectionObserverInit,\n): {\n setObserverList: Dispatch<SetStateAction<Element[] | undefined>>;\n setObserverInit: Dispatch<SetStateAction<IntersectionObserverInit | undefined>>;\n observer: MutableRefObject<IntersectionObserver | undefined>;\n} => {\n // export const useIntersectionObserver = (\n // callback: IntersectionObserverCallback,\n // options?: IntersectionObserverInit,\n // ): [\n // Dispatch<SetStateAction<Element[] | undefined>>,\n // Dispatch<SetStateAction<IntersectionObserverInit | undefined>>,\n // MutableRefObject<IntersectionObserver | undefined>,\n // ] => {\n const observer = useRef<IntersectionObserver>();\n const [observerList, setObserverList] = useState<Element[]>();\n const [observerInit, setObserverInit] = useState<IntersectionObserverInit | undefined>(options);\n\n // Observer elements in passed in list and clean up previous list\n // This effect is only triggered when observerList is updated\n useIsomorphicLayoutEffect(() => {\n observer.current = new IntersectionObserver(callback, observerInit);\n\n // If we have an instance of IO and a list with elements, observer the elements\n if (observer.current && observerList && observerList.length > 0) {\n observerList.forEach(element => {\n observer.current?.observe(element);\n });\n }\n\n // clean up previous elements being listened to\n return () => {\n if (observer.current) {\n observer.current.disconnect();\n }\n };\n }, [observerList, observerInit, callback]);\n\n return { setObserverList, setObserverInit, observer };\n};\n"],"mappings":";;;;;;AACA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAEA,MAAM;EAAEE,QAAQ;EAAEC;AAAM,CAAE,GAAGJ,KAAK;AAElC;;;;;;;;;AAUO,MAAMK,uBAAuB,GAAGA,CACrCC,QAAsC,EACtCC,OAAkC,KAKhC;EACF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,MAAMC,QAAQ,GAAGJ,MAAM,EAAwB;EAC/C,MAAM,CAACK,YAAY,EAAEC,eAAe,CAAC,GAAGP,QAAQ,EAAa;EAC7D,MAAM,CAACQ,YAAY,EAAEC,eAAe,CAAC,GAAGT,QAAQ,CAAuCI,OAAO,CAAC;EAE/F;EACA;EACAL,iBAAA,CAAAW,yBAAyB,CAAC,MAAK;IAC7BL,QAAQ,CAACM,OAAO,GAAG,IAAIC,oBAAoB,CAACT,QAAQ,EAAEK,YAAY,CAAC;IAEnE;IACA,IAAIH,QAAQ,CAACM,OAAO,IAAIL,YAAY,IAAIA,YAAY,CAACO,MAAM,GAAG,CAAC,EAAE;MAC/DP,YAAY,CAACQ,OAAO,CAACC,OAAO,IAAG;;QAC7B,CAAAC,EAAA,GAAAX,QAAQ,CAACM,OAAO,cAAAK,EAAA,uBAAAA,EAAA,CAAEC,OAAO,CAACF,OAAO,CAAC;MACpC,CAAC,CAAC;;IAGJ;IACA,OAAO,MAAK;MACV,IAAIV,QAAQ,CAACM,OAAO,EAAE;QACpBN,QAAQ,CAACM,OAAO,CAACO,UAAU,EAAE;;IAEjC,CAAC;EACH,CAAC,EAAE,CAACZ,YAAY,EAAEE,YAAY,EAAEL,QAAQ,CAAC,CAAC;EAE1C,OAAO;IAAEI,eAAe;IAAEE,eAAe;IAAEJ;EAAQ,CAAE;AACvD,CAAC;AAzCYc,OAAA,CAAAjB,uBAAuB,GAAAA,uBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["Virtualizer_1","require","Object","defineProperty","exports","enumerable","get","Virtualizer","virtualizerClassNames","useVirtualizer_unstable","renderVirtualizer_unstable","useVirtualizerStyles_unstable","Hooks_1","useIntersectionObserver"],"sources":["../src/packages/react-components/react-virtualizer/src/index.ts"],"sourcesContent":["export {\n Virtualizer,\n virtualizerClassNames,\n useVirtualizer_unstable,\n renderVirtualizer_unstable,\n useVirtualizerStyles_unstable,\n} from './Virtualizer';\nexport type {\n VirtualizerProps,\n VirtualizerState,\n VirtualizerSlots,\n VirtualizerChildRenderFunction,\n} from './Virtualizer';\nexport { useIntersectionObserver } from './Hooks';\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,gBAAAC,OAAA;AACEC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,aAAA,CAAAO,WAAW;EAAA;AAAA;AACXL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,aAAA,CAAAQ,qBAAqB;EAAA;AAAA;AACrBN,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,aAAA,CAAAS,uBAAuB;EAAA;AAAA;AACvBP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,aAAA,CAAAU,0BAA0B;EAAA;AAAA;AAC1BR,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,aAAA,CAAAW,6BAA6B;EAAA;AAAA;AAQ/B,IAAAC,OAAA,gBAAAX,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,OAAA,CAAAC,uBAAuB;EAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-virtualizer",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.9",
|
|
4
4
|
"description": "Generic and composable virtualizer framework built on browser intersection observer",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@fluentui/scripts-tasks": "*"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@fluentui/react-utilities": "^9.6.
|
|
34
|
+
"@fluentui/react-utilities": "^9.6.1",
|
|
35
35
|
"@griffel/react": "^1.5.2",
|
|
36
36
|
"tslib": "^2.1.0"
|
|
37
37
|
},
|