@fluentui/react-virtualizer 9.0.0-alpha.20 → 9.0.0-alpha.22
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 +76 -1
- package/CHANGELOG.md +25 -2
- package/lib/Hooks.js +0 -1
- package/lib/Hooks.js.map +1 -1
- package/lib/Utilities.js +0 -1
- package/lib/Utilities.js.map +1 -1
- package/lib/Virtualizer.js +0 -1
- package/lib/Virtualizer.js.map +1 -1
- package/lib/VirtualizerScrollView.js +0 -1
- package/lib/VirtualizerScrollView.js.map +1 -1
- package/lib/VirtualizerScrollViewDynamic.js +0 -1
- package/lib/VirtualizerScrollViewDynamic.js.map +1 -1
- package/lib/components/Virtualizer/Virtualizer.js +5 -7
- package/lib/components/Virtualizer/Virtualizer.js.map +1 -1
- package/lib/components/Virtualizer/Virtualizer.types.js +0 -1
- package/lib/components/Virtualizer/Virtualizer.types.js.map +1 -1
- package/lib/components/Virtualizer/index.js +1 -2
- package/lib/components/Virtualizer/index.js.map +1 -1
- package/lib/components/Virtualizer/renderVirtualizer.js +9 -13
- package/lib/components/Virtualizer/renderVirtualizer.js.map +1 -1
- package/lib/components/Virtualizer/useVirtualizer.js +348 -354
- package/lib/components/Virtualizer/useVirtualizer.js.map +1 -1
- package/lib/components/Virtualizer/{useVirtualizerStyles.js → useVirtualizerStyles.styles.js} +1 -1
- package/lib/components/Virtualizer/useVirtualizerStyles.styles.js.map +1 -0
- package/lib/components/VirtualizerScrollView/VirtualizerScrollView.js +5 -7
- package/lib/components/VirtualizerScrollView/VirtualizerScrollView.js.map +1 -1
- package/lib/components/VirtualizerScrollView/VirtualizerScrollView.types.js +1 -2
- package/lib/components/VirtualizerScrollView/VirtualizerScrollView.types.js.map +1 -1
- package/lib/components/VirtualizerScrollView/index.js +1 -2
- package/lib/components/VirtualizerScrollView/index.js.map +1 -1
- package/lib/components/VirtualizerScrollView/renderVirtualizerScrollView.js +4 -8
- package/lib/components/VirtualizerScrollView/renderVirtualizerScrollView.js.map +1 -1
- package/lib/components/VirtualizerScrollView/useVirtualizerScrollView.js +26 -32
- package/lib/components/VirtualizerScrollView/useVirtualizerScrollView.js.map +1 -1
- package/lib/components/VirtualizerScrollView/{useVirtualizerScrollViewStyles.js → useVirtualizerScrollViewStyles.styles.js} +2 -2
- package/lib/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.js.map +1 -0
- package/lib/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.js +5 -7
- package/lib/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.types.js +1 -2
- package/lib/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.types.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/index.js +1 -2
- package/lib/components/VirtualizerScrollViewDynamic/index.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/renderVirtualizerScrollViewDynamic.js +4 -8
- package/lib/components/VirtualizerScrollViewDynamic/renderVirtualizerScrollViewDynamic.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamic.js +31 -37
- package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamic.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/{useVirtualizerScrollViewDynamicStyles.js → useVirtualizerScrollViewDynamicStyles.styles.js} +2 -2
- package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.js.map +1 -0
- package/lib/hooks/hooks.types.js +1 -2
- package/lib/hooks/hooks.types.js.map +1 -1
- package/lib/hooks/index.js +0 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useDynamicVirtualizerMeasure.js +91 -91
- package/lib/hooks/useDynamicVirtualizerMeasure.js.map +1 -1
- package/lib/hooks/useIntersectionObserver.js +31 -32
- package/lib/hooks/useIntersectionObserver.js.map +1 -1
- package/lib/hooks/useResizeObserverRef.js +34 -32
- package/lib/hooks/useResizeObserverRef.js.map +1 -1
- package/lib/hooks/useVirtualizerMeasure.js +38 -47
- package/lib/hooks/useVirtualizerMeasure.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/utilities/VirtualizerContext/VirtualizerContext.js +26 -22
- package/lib/utilities/VirtualizerContext/VirtualizerContext.js.map +1 -1
- package/lib/utilities/VirtualizerContext/index.js +0 -1
- package/lib/utilities/VirtualizerContext/index.js.map +1 -1
- package/lib/utilities/VirtualizerContext/types.js +1 -2
- package/lib/utilities/VirtualizerContext/types.js.map +1 -1
- package/lib/utilities/debounce.js +13 -14
- package/lib/utilities/debounce.js.map +1 -1
- package/lib/utilities/index.js +0 -1
- package/lib/utilities/index.js.map +1 -1
- package/lib-commonjs/Hooks.js +0 -3
- package/lib-commonjs/Hooks.js.map +1 -1
- package/lib-commonjs/Utilities.js +0 -3
- package/lib-commonjs/Utilities.js.map +1 -1
- package/lib-commonjs/Virtualizer.js +0 -3
- package/lib-commonjs/Virtualizer.js.map +1 -1
- package/lib-commonjs/VirtualizerScrollView.js +0 -3
- package/lib-commonjs/VirtualizerScrollView.js.map +1 -1
- package/lib-commonjs/VirtualizerScrollViewDynamic.js +0 -3
- package/lib-commonjs/VirtualizerScrollViewDynamic.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/Virtualizer.js +3 -5
- package/lib-commonjs/components/Virtualizer/Virtualizer.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/Virtualizer.types.js +0 -3
- package/lib-commonjs/components/Virtualizer/Virtualizer.types.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/index.js +1 -4
- package/lib-commonjs/components/Virtualizer/index.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/renderVirtualizer.js +1 -3
- package/lib-commonjs/components/Virtualizer/renderVirtualizer.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/useVirtualizer.js +1 -3
- package/lib-commonjs/components/Virtualizer/useVirtualizer.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/{useVirtualizerStyles.js → useVirtualizerStyles.styles.js} +1 -3
- package/lib-commonjs/components/Virtualizer/useVirtualizerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/VirtualizerScrollView/VirtualizerScrollView.js +3 -5
- package/lib-commonjs/components/VirtualizerScrollView/VirtualizerScrollView.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/VirtualizerScrollView.types.js +0 -3
- package/lib-commonjs/components/VirtualizerScrollView/VirtualizerScrollView.types.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/index.js +1 -4
- package/lib-commonjs/components/VirtualizerScrollView/index.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/renderVirtualizerScrollView.js +1 -3
- package/lib-commonjs/components/VirtualizerScrollView/renderVirtualizerScrollView.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollView.js +1 -3
- package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollView.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/{useVirtualizerScrollViewStyles.js → useVirtualizerScrollViewStyles.styles.js} +4 -6
- package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.js.map +1 -0
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.js +3 -5
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.types.js +0 -3
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.types.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/index.js +1 -4
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/index.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/renderVirtualizerScrollViewDynamic.js +1 -3
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/renderVirtualizerScrollViewDynamic.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamic.js +1 -3
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamic.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/{useVirtualizerScrollViewDynamicStyles.js → useVirtualizerScrollViewDynamicStyles.styles.js} +4 -6
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.js.map +1 -0
- package/lib-commonjs/hooks/hooks.types.js +0 -3
- package/lib-commonjs/hooks/hooks.types.js.map +1 -1
- package/lib-commonjs/hooks/index.js +0 -3
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/useDynamicVirtualizerMeasure.js +5 -7
- package/lib-commonjs/hooks/useDynamicVirtualizerMeasure.js.map +1 -1
- package/lib-commonjs/hooks/useIntersectionObserver.js +1 -3
- package/lib-commonjs/hooks/useIntersectionObserver.js.map +1 -1
- package/lib-commonjs/hooks/useResizeObserverRef.js +1 -3
- package/lib-commonjs/hooks/useResizeObserverRef.js.map +1 -1
- package/lib-commonjs/hooks/useVirtualizerMeasure.js +7 -9
- package/lib-commonjs/hooks/useVirtualizerMeasure.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utilities/VirtualizerContext/VirtualizerContext.js +3 -5
- package/lib-commonjs/utilities/VirtualizerContext/VirtualizerContext.js.map +1 -1
- package/lib-commonjs/utilities/VirtualizerContext/index.js +0 -3
- package/lib-commonjs/utilities/VirtualizerContext/index.js.map +1 -1
- package/lib-commonjs/utilities/VirtualizerContext/types.js +0 -3
- package/lib-commonjs/utilities/VirtualizerContext/types.js.map +1 -1
- package/lib-commonjs/utilities/debounce.js +1 -3
- package/lib-commonjs/utilities/debounce.js.map +1 -1
- package/lib-commonjs/utilities/index.js +0 -3
- package/lib-commonjs/utilities/index.js.map +1 -1
- package/package.json +6 -6
- package/lib/components/Virtualizer/useVirtualizerStyles.js.map +0 -1
- package/lib/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.js.map +0 -1
- package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.js.map +0 -1
- package/lib-commonjs/components/Virtualizer/useVirtualizerStyles.js.map +0 -1
- package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.js.map +0 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,82 @@
|
|
|
2
2
|
"name": "@fluentui/react-virtualizer",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 31 May 2023 06:43:06 GMT",
|
|
6
|
+
"tag": "@fluentui/react-virtualizer_v9.0.0-alpha.22",
|
|
7
|
+
"version": "9.0.0-alpha.22",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "seanmonahan@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-virtualizer",
|
|
13
|
+
"commit": "d640b972d7ac86bfb76ae6c6329f12cdd33b3b7c",
|
|
14
|
+
"comment": "chore: Update Griffel to v1.5.7."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "olfedias@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-virtualizer",
|
|
19
|
+
"commit": "588b9393a673137dd8a867686d1e1cd45c350ca4",
|
|
20
|
+
"comment": "chore: move makeStyles() calls to .styles.ts files"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-virtualizer",
|
|
25
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6",
|
|
26
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-virtualizer",
|
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v9.9.2",
|
|
32
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-virtualizer",
|
|
37
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22",
|
|
38
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"date": "Thu, 25 May 2023 10:00:48 GMT",
|
|
45
|
+
"tag": "@fluentui/react-virtualizer_v9.0.0-alpha.21",
|
|
46
|
+
"version": "9.0.0-alpha.21",
|
|
47
|
+
"comments": {
|
|
48
|
+
"prerelease": [
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "@fluentui/react-virtualizer",
|
|
52
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.5",
|
|
53
|
+
"commit": "8f7c1b7591b3e665ae39e1b22ab0f0b28fb795c4"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "@fluentui/react-virtualizer",
|
|
58
|
+
"comment": "Bump @fluentui/react-utilities to v9.9.1",
|
|
59
|
+
"commit": "8f7c1b7591b3e665ae39e1b22ab0f0b28fb795c4"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"date": "Wed, 24 May 2023 20:45:37 GMT",
|
|
66
|
+
"tag": "@fluentui/react-virtualizer_v9.0.0-alpha.20",
|
|
67
|
+
"version": "9.0.0-alpha.20",
|
|
68
|
+
"comments": {
|
|
69
|
+
"none": [
|
|
70
|
+
{
|
|
71
|
+
"author": "olfedias@microsoft.com",
|
|
72
|
+
"package": "@fluentui/react-virtualizer",
|
|
73
|
+
"commit": "69e0617a93cb44ef42f3bd19284b7dc5fe27fed3",
|
|
74
|
+
"comment": "chore: update test-ssr script"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"date": "Thu, 18 May 2023 00:39:19 GMT",
|
|
6
81
|
"tag": "@fluentui/react-virtualizer_v9.0.0-alpha.20",
|
|
7
82
|
"version": "9.0.0-alpha.20",
|
|
8
83
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-virtualizer
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 31 May 2023 06:43:06 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-alpha.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-virtualizer_v9.0.0-alpha.22)
|
|
8
|
+
|
|
9
|
+
Wed, 31 May 2023 06:43:06 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-virtualizer_v9.0.0-alpha.21..@fluentui/react-virtualizer_v9.0.0-alpha.22)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- chore: Update Griffel to v1.5.7. ([PR #27925](https://github.com/microsoft/fluentui/pull/27925) by seanmonahan@microsoft.com)
|
|
15
|
+
- chore: move makeStyles() calls to .styles.ts files ([PR #27685](https://github.com/microsoft/fluentui/pull/27685) by olfedias@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
17
|
+
- Bump @fluentui/react-utilities to v9.9.2 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
18
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
19
|
+
|
|
20
|
+
## [9.0.0-alpha.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-virtualizer_v9.0.0-alpha.21)
|
|
21
|
+
|
|
22
|
+
Thu, 25 May 2023 10:00:48 GMT
|
|
23
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-virtualizer_v9.0.0-alpha.20..@fluentui/react-virtualizer_v9.0.0-alpha.21)
|
|
24
|
+
|
|
25
|
+
### Changes
|
|
26
|
+
|
|
27
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.5 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
|
|
28
|
+
- Bump @fluentui/react-utilities to v9.9.1 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
|
|
29
|
+
|
|
7
30
|
## [9.0.0-alpha.20](https://github.com/microsoft/fluentui/tree/@fluentui/react-virtualizer_v9.0.0-alpha.20)
|
|
8
31
|
|
|
9
|
-
Thu, 18 May 2023 00:
|
|
32
|
+
Thu, 18 May 2023 00:39:19 GMT
|
|
10
33
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-virtualizer_v9.0.0-alpha.19..@fluentui/react-virtualizer_v9.0.0-alpha.20)
|
|
11
34
|
|
|
12
35
|
### Changes
|
package/lib/Hooks.js
CHANGED
package/lib/Hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Hooks.ts"],"sourcesContent":["export * from './hooks/index';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB"}
|
package/lib/Utilities.js
CHANGED
package/lib/Utilities.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Utilities.ts"],"sourcesContent":["export * from './utilities/index';\n"],"names":[],"mappings":"AAAA,cAAc,oBAAoB"}
|
package/lib/Virtualizer.js
CHANGED
package/lib/Virtualizer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Virtualizer.ts"],"sourcesContent":["export * from './components/Virtualizer/index';\n"],"names":[],"mappings":"AAAA,cAAc,iCAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["VirtualizerScrollView.ts"],"sourcesContent":["export * from './components/VirtualizerScrollView/index';\n"],"names":[],"mappings":"AAAA,cAAc,2CAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["VirtualizerScrollViewDynamic.ts"],"sourcesContent":["export * from './components/VirtualizerScrollViewDynamic/index';\n"],"names":[],"mappings":"AAAA,cAAc,kDAAkD"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { useVirtualizerStyles_unstable } from './useVirtualizerStyles';
|
|
1
|
+
import { useVirtualizerStyles_unstable } from './useVirtualizerStyles.styles';
|
|
2
2
|
import { useVirtualizer_unstable } from './useVirtualizer';
|
|
3
3
|
import { renderVirtualizer_unstable } from './renderVirtualizer';
|
|
4
4
|
/**
|
|
5
5
|
* Virtualizer pseudo-component, this functional wrapper
|
|
6
6
|
* provides a simple interface for reducing the total number
|
|
7
7
|
* of elements rendered at one time in large lists.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return renderVirtualizer_unstable(state);
|
|
8
|
+
*/ export const Virtualizer = (props)=>{
|
|
9
|
+
const state = useVirtualizer_unstable(props);
|
|
10
|
+
useVirtualizerStyles_unstable(state);
|
|
11
|
+
return renderVirtualizer_unstable(state);
|
|
13
12
|
};
|
|
14
13
|
Virtualizer.displayName = 'Virtualizer';
|
|
15
|
-
//# sourceMappingURL=Virtualizer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Virtualizer.ts"],"sourcesContent":["import type { VirtualizerProps } from './Virtualizer.types';\nimport { useVirtualizerStyles_unstable } from './useVirtualizerStyles.styles';\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"],"names":["useVirtualizerStyles_unstable","useVirtualizer_unstable","renderVirtualizer_unstable","Virtualizer","props","state","displayName"],"mappings":"AACA,SAASA,6BAA6B,QAAQ,gCAAgC;AAC9E,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,sBAAsB;AAGjE;;;;CAIC,GACD,OAAO,MAAMC,cAAoC,CAACC,QAA4B;IAC5E,MAAMC,QAAQJ,wBAAwBG;IACtCJ,8BAA8BK;IAE9B,OAAOH,2BAA2BG;AACpC,EAAE;AAEFF,YAAYG,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Virtualizer.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { VirtualizerContextProps } from '../../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 VirtualizerConfigState = {\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 * Pixel size of intersection observers and how much they 'cross over' into the bufferItems index.\n * Minimum 1px.\n */\n bufferSize: number;\n};\n\nexport type VirtualizerState = ComponentState<VirtualizerSlots> & VirtualizerConfigState;\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 VirtualizerConfigProps = {\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 */\n scrollViewRef?: 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 * Virtualizer context can be passed as a prop for extended class use\n */\n virtualizerContext?: VirtualizerContextProps;\n};\n\nexport type VirtualizerProps = ComponentProps<Partial<VirtualizerSlots>> & VirtualizerConfigProps;\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Virtualizer';\nexport * from './Virtualizer.types';\nexport * from './useVirtualizer';\nexport * from './renderVirtualizer';\nexport * from './useVirtualizerStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,sBAAsB;AACpC,cAAc,gCAAgC"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
/** @jsxRuntime classic */ /** @jsx createElement */import * as React from 'react';
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ import * as React from 'react';
|
|
2
2
|
import { createElement } from '@fluentui/react-jsx-runtime';
|
|
3
3
|
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
4
|
-
export const renderVirtualizer_unstable = state
|
|
5
|
-
|
|
6
|
-
slots,
|
|
7
|
-
slotProps
|
|
8
|
-
} = getSlotsNext(state);
|
|
9
|
-
return /*#__PURE__*/createElement(React.Fragment, null, /*#__PURE__*/createElement(slots.beforeContainer, slotProps.beforeContainer, /*#__PURE__*/createElement(slots.before, slotProps.before)), state.virtualizedChildren, /*#__PURE__*/createElement(slots.afterContainer, slotProps.afterContainer, /*#__PURE__*/createElement(slots.after, slotProps.after)));
|
|
4
|
+
export const renderVirtualizer_unstable = (state)=>{
|
|
5
|
+
const { slots , slotProps } = getSlotsNext(state);
|
|
6
|
+
return /*#__PURE__*/ createElement(React.Fragment, null, /*#__PURE__*/ createElement(slots.beforeContainer, slotProps.beforeContainer, /*#__PURE__*/ createElement(slots.before, slotProps.before)), state.virtualizedChildren, /*#__PURE__*/ createElement(slots.afterContainer, slotProps.afterContainer, /*#__PURE__*/ createElement(slots.after, slotProps.after)));
|
|
10
7
|
};
|
|
11
|
-
export const renderVirtualizerChildPlaceholder = (child, index)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
export const renderVirtualizerChildPlaceholder = (child, index)=>{
|
|
9
|
+
return /*#__PURE__*/ createElement(React.Suspense, {
|
|
10
|
+
key: `fui-virtualizer-placeholder-${index}`,
|
|
11
|
+
fallback: null
|
|
12
|
+
}, child);
|
|
16
13
|
};
|
|
17
|
-
//# sourceMappingURL=renderVirtualizer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["renderVirtualizer.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport * as React from 'react';\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { VirtualizerSlots, VirtualizerState } from './Virtualizer.types';\nimport { ReactNode } from 'react';\n\nexport const renderVirtualizer_unstable = (state: VirtualizerState) => {\n const { slots, slotProps } = getSlotsNext<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\nexport const renderVirtualizerChildPlaceholder = (child: ReactNode, index: number) => {\n return (\n <React.Suspense key={`fui-virtualizer-placeholder-${index}`} fallback={null}>\n {child}\n </React.Suspense>\n );\n};\n"],"names":["React","createElement","getSlotsNext","renderVirtualizer_unstable","state","slots","slotProps","Fragment","beforeContainer","before","virtualizedChildren","afterContainer","after","renderVirtualizerChildPlaceholder","child","index","Suspense","key","fallback"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,YAAYA,WAAW,QAAQ;AAC/B,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAIzD,OAAO,MAAMC,6BAA6B,CAACC,QAA4B;IACrE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAA+BE;IAE5D,qBACE,AAZJ,cAYKJ,MAAMO,QAAQ,sBAEb,AAdN,cAcOF,MAAMG,eAAe,EAAKF,UAAUE,eAAe,gBAClD,AAfR,cAeSH,MAAMI,MAAM,EAAKH,UAAUG,MAAM,IAGnCL,MAAMM,mBAAmB,gBAE1B,AApBN,cAoBOL,MAAMM,cAAc,EAAKL,UAAUK,cAAc,gBAChD,AArBR,cAqBSN,MAAMO,KAAK,EAAKN,UAAUM,KAAK;AAIxC,EAAE;AAEF,OAAO,MAAMC,oCAAoC,CAACC,OAAkBC,QAAkB;IACpF,qBACE,AA7BJ,cA6BKf,MAAMgB,QAAQ;QAACC,KAAK,CAAC,4BAA4B,EAAEF,MAAM,CAAC;QAAEG,UAAU,IAAI;OACxEJ;AAGP,EAAE"}
|