@fluentui/react-virtualizer 9.0.0-alpha.100 → 9.0.0-alpha.102
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.md +24 -2
- package/README.md +2 -0
- package/dist/index.d.ts +90 -0
- package/lib/Hooks.js.map +1 -1
- package/lib/Utilities.js.map +1 -1
- package/lib/Virtualizer.js.map +1 -1
- package/lib/VirtualizerScrollView.js.map +1 -1
- package/lib/VirtualizerScrollViewDynamic.js.map +1 -1
- package/lib/components/Virtualizer/Virtualizer.js +1 -0
- package/lib/components/Virtualizer/Virtualizer.js.map +1 -1
- package/lib/components/Virtualizer/Virtualizer.types.js.map +1 -1
- package/lib/components/Virtualizer/index.js.map +1 -1
- package/lib/components/Virtualizer/renderVirtualizer.js +6 -2
- package/lib/components/Virtualizer/renderVirtualizer.js.map +1 -1
- package/lib/components/Virtualizer/useVirtualizer.js +3 -1
- package/lib/components/Virtualizer/useVirtualizer.js.map +1 -1
- package/lib/components/Virtualizer/useVirtualizerStyles.styles.js +4 -0
- package/lib/components/Virtualizer/useVirtualizerStyles.styles.js.map +1 -1
- package/lib/components/Virtualizer/useVirtualizerStyles.styles.raw.js +102 -0
- package/lib/components/Virtualizer/useVirtualizerStyles.styles.raw.js.map +1 -0
- package/lib/components/VirtualizerScrollView/VirtualizerScrollView.js +1 -0
- package/lib/components/VirtualizerScrollView/VirtualizerScrollView.js.map +1 -1
- package/lib/components/VirtualizerScrollView/VirtualizerScrollView.types.js.map +1 -1
- package/lib/components/VirtualizerScrollView/index.js.map +1 -1
- package/lib/components/VirtualizerScrollView/renderVirtualizerScrollView.js +3 -1
- package/lib/components/VirtualizerScrollView/renderVirtualizerScrollView.js.map +1 -1
- package/lib/components/VirtualizerScrollView/useVirtualizerScrollView.js +3 -1
- package/lib/components/VirtualizerScrollView/useVirtualizerScrollView.js.map +1 -1
- package/lib/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.js +4 -0
- package/lib/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.js.map +1 -1
- package/lib/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.raw.js +45 -0
- package/lib/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.raw.js.map +1 -0
- package/lib/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.js +1 -0
- package/lib/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.types.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/index.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/renderVirtualizerScrollViewDynamic.js +3 -1
- package/lib/components/VirtualizerScrollViewDynamic/renderVirtualizerScrollViewDynamic.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamic.js +3 -1
- package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamic.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.js +4 -0
- package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.js.map +1 -1
- package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.raw.js +45 -0
- package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.raw.js.map +1 -0
- package/lib/hooks/hooks.types.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useDynamicPagination.js +1 -0
- package/lib/hooks/useDynamicPagination.js.map +1 -1
- package/lib/hooks/useDynamicVirtualizerMeasure.js +1 -0
- package/lib/hooks/useDynamicVirtualizerMeasure.js.map +1 -1
- package/lib/hooks/useIntersectionObserver.js +2 -0
- package/lib/hooks/useIntersectionObserver.js.map +1 -1
- package/lib/hooks/useMeasureList.js +2 -0
- package/lib/hooks/useMeasureList.js.map +1 -1
- package/lib/hooks/useMutationObserver.js +3 -1
- package/lib/hooks/useMutationObserver.js.map +1 -1
- package/lib/hooks/useResizeObserverRef.js +1 -0
- package/lib/hooks/useResizeObserverRef.js.map +1 -1
- package/lib/hooks/useStaticPagination.js +2 -1
- package/lib/hooks/useStaticPagination.js.map +1 -1
- package/lib/hooks/useVirtualizerMeasure.js +1 -0
- package/lib/hooks/useVirtualizerMeasure.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utilities/ImperativeScrolling/imperativeScrolling.js.map +1 -1
- package/lib/utilities/ImperativeScrolling/imperativeScrolling.types.js.map +1 -1
- package/lib/utilities/ImperativeScrolling/imperativeScrollingDynamic.js.map +1 -1
- package/lib/utilities/ImperativeScrolling/index.js.map +1 -1
- package/lib/utilities/VirtualizerContext/VirtualizerContext.js +9 -3
- package/lib/utilities/VirtualizerContext/VirtualizerContext.js.map +1 -1
- package/lib/utilities/VirtualizerContext/index.js.map +1 -1
- package/lib/utilities/VirtualizerContext/types.js.map +1 -1
- package/lib/utilities/createResizeObserverFromDocument.js +1 -0
- package/lib/utilities/createResizeObserverFromDocument.js.map +1 -1
- package/lib/utilities/debounce.js +1 -0
- package/lib/utilities/debounce.js.map +1 -1
- package/lib/utilities/index.js.map +1 -1
- package/lib-commonjs/Hooks.js.map +1 -1
- package/lib-commonjs/Utilities.js.map +1 -1
- package/lib-commonjs/Virtualizer.js.map +1 -1
- package/lib-commonjs/VirtualizerScrollView.js.map +1 -1
- package/lib-commonjs/VirtualizerScrollViewDynamic.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.styles.js.map +1 -1
- package/lib-commonjs/components/Virtualizer/useVirtualizerStyles.styles.raw.js +115 -0
- package/lib-commonjs/components/Virtualizer/useVirtualizerStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/VirtualizerScrollView/VirtualizerScrollView.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/VirtualizerScrollView.types.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/index.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/renderVirtualizerScrollView.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollView.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.raw.js +58 -0
- package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.types.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/index.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/renderVirtualizerScrollViewDynamic.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamic.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.raw.js +58 -0
- package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/hooks/hooks.types.js.map +1 -1
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/useDynamicPagination.js.map +1 -1
- package/lib-commonjs/hooks/useDynamicVirtualizerMeasure.js.map +1 -1
- package/lib-commonjs/hooks/useIntersectionObserver.js.map +1 -1
- package/lib-commonjs/hooks/useMeasureList.js.map +1 -1
- package/lib-commonjs/hooks/useMutationObserver.js.map +1 -1
- package/lib-commonjs/hooks/useResizeObserverRef.js.map +1 -1
- package/lib-commonjs/hooks/useStaticPagination.js.map +1 -1
- package/lib-commonjs/hooks/useVirtualizerMeasure.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utilities/ImperativeScrolling/imperativeScrolling.js.map +1 -1
- package/lib-commonjs/utilities/ImperativeScrolling/imperativeScrolling.types.js.map +1 -1
- package/lib-commonjs/utilities/ImperativeScrolling/imperativeScrollingDynamic.js.map +1 -1
- package/lib-commonjs/utilities/ImperativeScrolling/index.js.map +1 -1
- package/lib-commonjs/utilities/VirtualizerContext/VirtualizerContext.js.map +1 -1
- package/lib-commonjs/utilities/VirtualizerContext/index.js.map +1 -1
- package/lib-commonjs/utilities/VirtualizerContext/types.js.map +1 -1
- package/lib-commonjs/utilities/createResizeObserverFromDocument.js +1 -0
- package/lib-commonjs/utilities/createResizeObserverFromDocument.js.map +1 -1
- package/lib-commonjs/utilities/debounce.js +1 -0
- package/lib-commonjs/utilities/debounce.js.map +1 -1
- package/lib-commonjs/utilities/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-virtualizer
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 30 Jul 2025 08:41:07 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-alpha.102](https://github.com/microsoft/fluentui/tree/@fluentui/react-virtualizer_v9.0.0-alpha.102)
|
|
8
|
+
|
|
9
|
+
Wed, 30 Jul 2025 08:41:07 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-virtualizer_v9.0.0-alpha.101..@fluentui/react-virtualizer_v9.0.0-alpha.102)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-jsx-runtime to v9.1.4 ([PR #34881](https://github.com/microsoft/fluentui/pull/34881) by beachball)
|
|
15
|
+
- Bump @fluentui/react-utilities to v9.23.1 ([PR #34881](https://github.com/microsoft/fluentui/pull/34881) by beachball)
|
|
16
|
+
- Bump @fluentui/react-shared-contexts to v9.24.1 ([PR #34881](https://github.com/microsoft/fluentui/pull/34881) by beachball)
|
|
17
|
+
|
|
18
|
+
## [9.0.0-alpha.101](https://github.com/microsoft/fluentui/tree/@fluentui/react-virtualizer_v9.0.0-alpha.101)
|
|
19
|
+
|
|
20
|
+
Mon, 28 Jul 2025 18:48:20 GMT
|
|
21
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-virtualizer_v9.0.0-alpha.100..@fluentui/react-virtualizer_v9.0.0-alpha.101)
|
|
22
|
+
|
|
23
|
+
### Changes
|
|
24
|
+
|
|
25
|
+
- deprecate: react-virtualizer moving to fluentui-contrib ([PR #34899](https://github.com/microsoft/fluentui/pull/34899) by mifraser@microsoft.com)
|
|
26
|
+
- Bump @fluentui/react-jsx-runtime to v9.1.3 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
|
|
27
|
+
- Bump @fluentui/react-utilities to v9.23.0 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
|
|
28
|
+
|
|
7
29
|
## [9.0.0-alpha.100](https://github.com/microsoft/fluentui/tree/@fluentui/react-virtualizer_v9.0.0-alpha.100)
|
|
8
30
|
|
|
9
|
-
Thu, 26 Jun 2025 14:
|
|
31
|
+
Thu, 26 Jun 2025 14:11:55 GMT
|
|
10
32
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-virtualizer_v9.0.0-alpha.99..@fluentui/react-virtualizer_v9.0.0-alpha.100)
|
|
11
33
|
|
|
12
34
|
### Changes
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @fluentui/react-virtualizer
|
|
2
2
|
|
|
3
|
+
**This package has been deprecated and moved to the [Fluent UI contributor repo](https://github.com/microsoft/fluentui-contrib/tree/main/packages/react-virtualizer) for stable release**
|
|
4
|
+
|
|
3
5
|
**Virtualizer components for [Fluent UI React](https://react.fluentui.dev/)**
|
|
4
6
|
|
|
5
7
|
These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
|
package/dist/index.d.ts
CHANGED
|
@@ -6,22 +6,36 @@ import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Some props are optional on static virtualizer, but required for dynamic.
|
|
9
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
9
10
|
*/
|
|
10
11
|
export declare type DynamicVirtualizerContextProps = Required<VirtualizerContextProps>;
|
|
11
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
15
|
+
*/
|
|
12
16
|
export declare interface IndexedResizeCallbackElement {
|
|
13
17
|
handleResize: () => void;
|
|
14
18
|
}
|
|
15
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
22
|
+
*/
|
|
16
23
|
export declare const renderVirtualizer_unstable: (state: VirtualizerState) => JSX.Element;
|
|
17
24
|
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
27
|
+
*/
|
|
18
28
|
export declare const renderVirtualizerScrollView_unstable: (state: VirtualizerScrollViewState) => JSX.Element;
|
|
19
29
|
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
32
|
+
*/
|
|
20
33
|
export declare const renderVirtualizerScrollViewDynamic_unstable: (state: VirtualizerScrollViewDynamicState) => JSX.Element;
|
|
21
34
|
|
|
22
35
|
/**
|
|
23
36
|
* Additional direct Ref prevents reading old resize entry data
|
|
24
37
|
* Backwards compatible with ResizeObserverCallback if preferred
|
|
38
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
25
39
|
*/
|
|
26
40
|
export declare interface ResizeCallbackWithRef {
|
|
27
41
|
(entries: ResizeObserverEntry[], observer: ResizeObserver, scrollRef?: React_2.MutableRefObject<HTMLElement | null>): void;
|
|
@@ -59,6 +73,7 @@ export declare type ScrollToItemStaticParams = {
|
|
|
59
73
|
|
|
60
74
|
/**
|
|
61
75
|
* React hook that measures virtualized space dynamically to ensure optimized virtualization length.
|
|
76
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
62
77
|
*/
|
|
63
78
|
export declare const useDynamicVirtualizerMeasure: <TElement extends HTMLElement>(virtualizerProps: VirtualizerMeasureDynamicProps) => {
|
|
64
79
|
virtualizerLength: number;
|
|
@@ -77,6 +92,7 @@ export declare const useDynamicVirtualizerMeasure: <TElement extends HTMLElement
|
|
|
77
92
|
* enough to trigger a callback).
|
|
78
93
|
* @returns An array containing a callback to update the list of Elements the observer should listen to, a callback to
|
|
79
94
|
* update the init options of the IntersectionObserver and a ref to the IntersectionObserver instance itself.
|
|
95
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
80
96
|
*/
|
|
81
97
|
export declare const useIntersectionObserver: (callback: IntersectionObserverCallback, options?: IntersectionObserverInit) => {
|
|
82
98
|
setObserverList: React_2.Dispatch<React_2.SetStateAction<Element[] | undefined>>;
|
|
@@ -90,6 +106,7 @@ export declare const useIntersectionObserver: (callback: IntersectionObserverCal
|
|
|
90
106
|
* `width` - element width ref (0 by default),
|
|
91
107
|
* `height` - element height ref (0 by default),
|
|
92
108
|
* `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure
|
|
109
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
93
110
|
*/
|
|
94
111
|
export declare function useMeasureList<TElement extends HTMLElement & IndexedResizeCallbackElement = HTMLElement & IndexedResizeCallbackElement>(currentIndex: number, refLength: number, totalLength: number, defaultItemSize: number): {
|
|
95
112
|
widthArray: React_2.MutableRefObject<any[]>;
|
|
@@ -101,11 +118,13 @@ export declare function useMeasureList<TElement extends HTMLElement & IndexedRes
|
|
|
101
118
|
|
|
102
119
|
/**
|
|
103
120
|
* useResizeObserverRef_unstable simplifies resize observer connection and ensures debounce/cleanup
|
|
121
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
104
122
|
*/
|
|
105
123
|
export declare const useResizeObserverRef_unstable: (resizeCallback: ResizeCallbackWithRef) => (instance: HTMLElement | HTMLDivElement | null) => void;
|
|
106
124
|
|
|
107
125
|
/**
|
|
108
126
|
* React hook that measures virtualized space based on a static size to ensure optimized virtualization length.
|
|
127
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
109
128
|
*/
|
|
110
129
|
export declare const useStaticVirtualizerMeasure: <TElement extends HTMLElement>(virtualizerProps: VirtualizerMeasureProps) => {
|
|
111
130
|
virtualizerLength: number;
|
|
@@ -115,26 +134,41 @@ export declare const useStaticVirtualizerMeasure: <TElement extends HTMLElement>
|
|
|
115
134
|
containerSizeRef: React_2.MutableRefObject<number>;
|
|
116
135
|
};
|
|
117
136
|
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
139
|
+
*/
|
|
118
140
|
export declare function useVirtualizer_unstable(props: VirtualizerProps): VirtualizerState;
|
|
119
141
|
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
144
|
+
*/
|
|
120
145
|
export declare const useVirtualizerContext_unstable: () => VirtualizerContextProps;
|
|
121
146
|
|
|
147
|
+
/**
|
|
148
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
149
|
+
*/
|
|
122
150
|
export declare function useVirtualizerScrollView_unstable(props: VirtualizerScrollViewProps): VirtualizerScrollViewState;
|
|
123
151
|
|
|
152
|
+
/**
|
|
153
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
154
|
+
*/
|
|
124
155
|
export declare function useVirtualizerScrollViewDynamic_unstable(props: VirtualizerScrollViewDynamicProps): VirtualizerScrollViewDynamicState;
|
|
125
156
|
|
|
126
157
|
/**
|
|
127
158
|
* Apply styling to the Virtualizer states
|
|
159
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
128
160
|
*/
|
|
129
161
|
export declare const useVirtualizerScrollViewDynamicStyles_unstable: (state: VirtualizerScrollViewDynamicState) => VirtualizerScrollViewDynamicState;
|
|
130
162
|
|
|
131
163
|
/**
|
|
132
164
|
* Apply styling to the Virtualizer states
|
|
165
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
133
166
|
*/
|
|
134
167
|
export declare const useVirtualizerScrollViewStyles_unstable: (state: VirtualizerScrollViewState) => VirtualizerScrollViewState;
|
|
135
168
|
|
|
136
169
|
/**
|
|
137
170
|
* Apply styling to the Virtualizer states
|
|
171
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
138
172
|
*/
|
|
139
173
|
export declare const useVirtualizerStyles_unstable: (state: VirtualizerState) => VirtualizerState;
|
|
140
174
|
|
|
@@ -142,17 +176,25 @@ export declare const useVirtualizerStyles_unstable: (state: VirtualizerState) =>
|
|
|
142
176
|
* Virtualizer pseudo-component, this functional wrapper
|
|
143
177
|
* provides a simple interface for reducing the total number
|
|
144
178
|
* of elements rendered at one time in large lists.
|
|
179
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
145
180
|
*/
|
|
146
181
|
export declare const Virtualizer: React_2.FC<VirtualizerProps>;
|
|
147
182
|
|
|
148
183
|
/**
|
|
149
184
|
* The main child render method of Virtualization
|
|
150
185
|
* isScrolling will only be enabled when enableScrollLoad is set to true.
|
|
186
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
151
187
|
*/
|
|
152
188
|
export declare type VirtualizerChildRenderFunction = (index: number, isScrolling: boolean) => React_2.ReactNode;
|
|
153
189
|
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
192
|
+
*/
|
|
154
193
|
export declare const virtualizerClassNames: SlotClassNames<VirtualizerSlots>;
|
|
155
194
|
|
|
195
|
+
/**
|
|
196
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
197
|
+
*/
|
|
156
198
|
declare type VirtualizerConfigProps = {
|
|
157
199
|
/**
|
|
158
200
|
* Child render function.
|
|
@@ -252,6 +294,9 @@ declare type VirtualizerConfigProps = {
|
|
|
252
294
|
gap?: number;
|
|
253
295
|
};
|
|
254
296
|
|
|
297
|
+
/**
|
|
298
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
299
|
+
*/
|
|
255
300
|
declare type VirtualizerConfigState = {
|
|
256
301
|
/**
|
|
257
302
|
* The current virtualized array of children to show in the DOM.
|
|
@@ -304,6 +349,7 @@ declare type VirtualizerConfigState = {
|
|
|
304
349
|
|
|
305
350
|
/**
|
|
306
351
|
* {@docCategory Virtualizer}
|
|
352
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
307
353
|
*/
|
|
308
354
|
export declare type VirtualizerContextProps = {
|
|
309
355
|
contextIndex: number;
|
|
@@ -311,8 +357,14 @@ export declare type VirtualizerContextProps = {
|
|
|
311
357
|
childProgressiveSizes?: React_2.MutableRefObject<number[]>;
|
|
312
358
|
};
|
|
313
359
|
|
|
360
|
+
/**
|
|
361
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
362
|
+
*/
|
|
314
363
|
export declare const VirtualizerContextProvider: React_2.Provider<VirtualizerContextProps>;
|
|
315
364
|
|
|
365
|
+
/**
|
|
366
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
367
|
+
*/
|
|
316
368
|
export declare type VirtualizerDataRef = {
|
|
317
369
|
progressiveSizes: React_2.RefObject<number[]>;
|
|
318
370
|
nodeSizes: React_2.RefObject<number[]>;
|
|
@@ -320,6 +372,9 @@ export declare type VirtualizerDataRef = {
|
|
|
320
372
|
currentIndex: React_2.RefObject<number>;
|
|
321
373
|
};
|
|
322
374
|
|
|
375
|
+
/**
|
|
376
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
377
|
+
*/
|
|
323
378
|
export declare type VirtualizerMeasureDynamicProps = {
|
|
324
379
|
defaultItemSize: number;
|
|
325
380
|
virtualizerContext: DynamicVirtualizerContextProps;
|
|
@@ -336,6 +391,9 @@ export declare type VirtualizerMeasureDynamicProps = {
|
|
|
336
391
|
bufferSize?: number;
|
|
337
392
|
};
|
|
338
393
|
|
|
394
|
+
/**
|
|
395
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
396
|
+
*/
|
|
339
397
|
export declare type VirtualizerMeasureProps = {
|
|
340
398
|
defaultItemSize: number;
|
|
341
399
|
direction?: 'vertical' | 'horizontal';
|
|
@@ -349,22 +407,36 @@ export declare type VirtualizerMeasureProps = {
|
|
|
349
407
|
bufferSize?: number;
|
|
350
408
|
};
|
|
351
409
|
|
|
410
|
+
/**
|
|
411
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
412
|
+
*/
|
|
352
413
|
export declare type VirtualizerProps = ComponentProps<Partial<VirtualizerSlots>> & VirtualizerConfigProps;
|
|
353
414
|
|
|
354
415
|
/**
|
|
355
416
|
* Virtualizer ScrollView
|
|
417
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
356
418
|
*/
|
|
357
419
|
export declare const VirtualizerScrollView: React_2.FC<VirtualizerScrollViewProps>;
|
|
358
420
|
|
|
421
|
+
/**
|
|
422
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
423
|
+
*/
|
|
359
424
|
export declare const virtualizerScrollViewClassNames: SlotClassNames<VirtualizerScrollViewSlots>;
|
|
360
425
|
|
|
361
426
|
/**
|
|
362
427
|
* Virtualizer ScrollView
|
|
428
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
363
429
|
*/
|
|
364
430
|
export declare const VirtualizerScrollViewDynamic: React_2.FC<VirtualizerScrollViewDynamicProps>;
|
|
365
431
|
|
|
432
|
+
/**
|
|
433
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
434
|
+
*/
|
|
366
435
|
export declare const virtualizerScrollViewDynamicClassNames: SlotClassNames<VirtualizerScrollViewDynamicSlots>;
|
|
367
436
|
|
|
437
|
+
/**
|
|
438
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
439
|
+
*/
|
|
368
440
|
export declare type VirtualizerScrollViewDynamicProps = ComponentProps<Partial<VirtualizerScrollViewDynamicSlots>> & Partial<Omit<VirtualizerConfigProps, 'itemSize' | 'numItems' | 'getItemSize' | 'children' | 'flagIndex' | 'virtualizerContext'>> & {
|
|
369
441
|
/**
|
|
370
442
|
* Set as the minimum item size.
|
|
@@ -402,10 +474,16 @@ export declare type VirtualizerScrollViewDynamicProps = ComponentProps<Partial<V
|
|
|
402
474
|
virtualizerContext?: DynamicVirtualizerContextProps;
|
|
403
475
|
};
|
|
404
476
|
|
|
477
|
+
/**
|
|
478
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
479
|
+
*/
|
|
405
480
|
export declare type VirtualizerScrollViewDynamicSlots = VirtualizerScrollViewSlots;
|
|
406
481
|
|
|
407
482
|
export declare type VirtualizerScrollViewDynamicState = ComponentState<VirtualizerScrollViewDynamicSlots> & VirtualizerConfigState;
|
|
408
483
|
|
|
484
|
+
/**
|
|
485
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
486
|
+
*/
|
|
409
487
|
export declare type VirtualizerScrollViewProps = ComponentProps<Partial<VirtualizerScrollViewSlots>> & Partial<Omit<VirtualizerConfigProps, 'itemSize' | 'numItems' | 'getItemSize' | 'children' | 'flagIndex' | 'imperativeVirtualizerRef'>> & {
|
|
410
488
|
/**
|
|
411
489
|
* Virtualizer item size in pixels - static.
|
|
@@ -433,6 +511,9 @@ export declare type VirtualizerScrollViewProps = ComponentProps<Partial<Virtuali
|
|
|
433
511
|
enablePagination?: boolean;
|
|
434
512
|
};
|
|
435
513
|
|
|
514
|
+
/**
|
|
515
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
516
|
+
*/
|
|
436
517
|
export declare type VirtualizerScrollViewSlots = VirtualizerSlots & {
|
|
437
518
|
/**
|
|
438
519
|
* The root container that provides embedded scrolling.
|
|
@@ -440,8 +521,14 @@ export declare type VirtualizerScrollViewSlots = VirtualizerSlots & {
|
|
|
440
521
|
container: NonNullable<Slot<'div'>>;
|
|
441
522
|
};
|
|
442
523
|
|
|
524
|
+
/**
|
|
525
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
526
|
+
*/
|
|
443
527
|
export declare type VirtualizerScrollViewState = ComponentState<VirtualizerScrollViewSlots> & VirtualizerConfigState;
|
|
444
528
|
|
|
529
|
+
/**
|
|
530
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
531
|
+
*/
|
|
445
532
|
export declare type VirtualizerSlots = {
|
|
446
533
|
/**
|
|
447
534
|
* The intersection observed 'before' element will detect when scrolling towards the beginning.
|
|
@@ -461,6 +548,9 @@ export declare type VirtualizerSlots = {
|
|
|
461
548
|
afterContainer: NonNullable<Slot<'div', 'tr'>>;
|
|
462
549
|
};
|
|
463
550
|
|
|
551
|
+
/**
|
|
552
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
553
|
+
*/
|
|
464
554
|
export declare type VirtualizerState = ComponentState<VirtualizerSlots> & VirtualizerConfigState;
|
|
465
555
|
|
|
466
556
|
export { }
|
package/lib/Hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Hooks.ts"],"sourcesContent":["export type {\n IndexedResizeCallbackElement,\n ResizeCallbackWithRef,\n VirtualizerDynamicPaginationProps,\n VirtualizerMeasureDynamicProps,\n VirtualizerMeasureProps,\n VirtualizerStaticPaginationProps,\n} from './hooks/index';\nexport {\n createResizeObserverFromDocument,\n getRTLRootMargin,\n useDynamicVirtualizerMeasure,\n useIntersectionObserver,\n useMeasureList,\n useResizeObserverRef_unstable,\n useStaticVirtualizerMeasure,\n} from './hooks/index';\n"],"names":["createResizeObserverFromDocument","getRTLRootMargin","useDynamicVirtualizerMeasure","useIntersectionObserver","useMeasureList","useResizeObserverRef_unstable","useStaticVirtualizerMeasure"],"
|
|
1
|
+
{"version":3,"sources":["../src/Hooks.ts"],"sourcesContent":["export type {\n IndexedResizeCallbackElement,\n ResizeCallbackWithRef,\n VirtualizerDynamicPaginationProps,\n VirtualizerMeasureDynamicProps,\n VirtualizerMeasureProps,\n VirtualizerStaticPaginationProps,\n} from './hooks/index';\nexport {\n createResizeObserverFromDocument,\n getRTLRootMargin,\n useDynamicVirtualizerMeasure,\n useIntersectionObserver,\n useMeasureList,\n useResizeObserverRef_unstable,\n useStaticVirtualizerMeasure,\n} from './hooks/index';\n"],"names":["createResizeObserverFromDocument","getRTLRootMargin","useDynamicVirtualizerMeasure","useIntersectionObserver","useMeasureList","useResizeObserverRef_unstable","useStaticVirtualizerMeasure"],"mappings":"AAQA,SACEA,gCAAgC,EAChCC,gBAAgB,EAChBC,4BAA4B,EAC5BC,uBAAuB,EACvBC,cAAc,EACdC,6BAA6B,EAC7BC,2BAA2B,QACtB,gBAAgB"}
|
package/lib/Utilities.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Utilities.ts"],"sourcesContent":["export type {\n DynamicVirtualizerContextProps,\n ScrollToInterface,\n ScrollToItemDynamicParams,\n ScrollToItemStaticParams,\n VirtualizerContextProps,\n} from './utilities/index';\nexport {\n VirtualizerContextProvider,\n scrollToItemDynamic,\n scrollToItemStatic,\n useVirtualizerContextState_unstable,\n useVirtualizerContext_unstable,\n} from './utilities/index';\n"],"names":["VirtualizerContextProvider","scrollToItemDynamic","scrollToItemStatic","useVirtualizerContextState_unstable","useVirtualizerContext_unstable"],"
|
|
1
|
+
{"version":3,"sources":["../src/Utilities.ts"],"sourcesContent":["export type {\n DynamicVirtualizerContextProps,\n ScrollToInterface,\n ScrollToItemDynamicParams,\n ScrollToItemStaticParams,\n VirtualizerContextProps,\n} from './utilities/index';\nexport {\n VirtualizerContextProvider,\n scrollToItemDynamic,\n scrollToItemStatic,\n useVirtualizerContextState_unstable,\n useVirtualizerContext_unstable,\n} from './utilities/index';\n"],"names":["VirtualizerContextProvider","scrollToItemDynamic","scrollToItemStatic","useVirtualizerContextState_unstable","useVirtualizerContext_unstable"],"mappings":"AAOA,SACEA,0BAA0B,EAC1BC,mBAAmB,EACnBC,kBAAkB,EAClBC,mCAAmC,EACnCC,8BAA8B,QACzB,oBAAoB"}
|
package/lib/Virtualizer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Virtualizer.ts"],"sourcesContent":["export type {\n VirtualizerChildRenderFunction,\n VirtualizerConfigProps,\n VirtualizerConfigState,\n VirtualizerDataRef,\n VirtualizerProps,\n VirtualizerSlots,\n VirtualizerState,\n} from './components/Virtualizer/index';\nexport {\n Virtualizer,\n renderVirtualizerChildPlaceholder,\n renderVirtualizer_unstable,\n useVirtualizerStyles_unstable,\n useVirtualizer_unstable,\n virtualizerClassNames,\n} from './components/Virtualizer/index';\n"],"names":["Virtualizer","renderVirtualizerChildPlaceholder","renderVirtualizer_unstable","useVirtualizerStyles_unstable","useVirtualizer_unstable","virtualizerClassNames"],"
|
|
1
|
+
{"version":3,"sources":["../src/Virtualizer.ts"],"sourcesContent":["export type {\n VirtualizerChildRenderFunction,\n VirtualizerConfigProps,\n VirtualizerConfigState,\n VirtualizerDataRef,\n VirtualizerProps,\n VirtualizerSlots,\n VirtualizerState,\n} from './components/Virtualizer/index';\nexport {\n Virtualizer,\n renderVirtualizerChildPlaceholder,\n renderVirtualizer_unstable,\n useVirtualizerStyles_unstable,\n useVirtualizer_unstable,\n virtualizerClassNames,\n} from './components/Virtualizer/index';\n"],"names":["Virtualizer","renderVirtualizerChildPlaceholder","renderVirtualizer_unstable","useVirtualizerStyles_unstable","useVirtualizer_unstable","virtualizerClassNames"],"mappings":"AASA,SACEA,WAAW,EACXC,iCAAiC,EACjCC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,EACvBC,qBAAqB,QAChB,iCAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/VirtualizerScrollView.ts"],"sourcesContent":["export type {\n VirtualizerScrollViewProps,\n VirtualizerScrollViewSlots,\n VirtualizerScrollViewState,\n} from './components/VirtualizerScrollView/index';\nexport {\n VirtualizerScrollView,\n renderVirtualizerScrollView_unstable,\n useVirtualizerScrollViewStyles_unstable,\n useVirtualizerScrollView_unstable,\n virtualizerScrollViewClassNames,\n} from './components/VirtualizerScrollView/index';\n"],"names":["VirtualizerScrollView","renderVirtualizerScrollView_unstable","useVirtualizerScrollViewStyles_unstable","useVirtualizerScrollView_unstable","virtualizerScrollViewClassNames"],"
|
|
1
|
+
{"version":3,"sources":["../src/VirtualizerScrollView.ts"],"sourcesContent":["export type {\n VirtualizerScrollViewProps,\n VirtualizerScrollViewSlots,\n VirtualizerScrollViewState,\n} from './components/VirtualizerScrollView/index';\nexport {\n VirtualizerScrollView,\n renderVirtualizerScrollView_unstable,\n useVirtualizerScrollViewStyles_unstable,\n useVirtualizerScrollView_unstable,\n virtualizerScrollViewClassNames,\n} from './components/VirtualizerScrollView/index';\n"],"names":["VirtualizerScrollView","renderVirtualizerScrollView_unstable","useVirtualizerScrollViewStyles_unstable","useVirtualizerScrollView_unstable","virtualizerScrollViewClassNames"],"mappings":"AAKA,SACEA,qBAAqB,EACrBC,oCAAoC,EACpCC,uCAAuC,EACvCC,iCAAiC,EACjCC,+BAA+B,QAC1B,2CAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/VirtualizerScrollViewDynamic.ts"],"sourcesContent":["export type {\n VirtualizerScrollViewDynamicProps,\n VirtualizerScrollViewDynamicSlots,\n VirtualizerScrollViewDynamicState,\n} from './components/VirtualizerScrollViewDynamic/index';\nexport {\n VirtualizerScrollViewDynamic,\n renderVirtualizerScrollViewDynamic_unstable,\n useVirtualizerScrollViewDynamicStyles_unstable,\n useVirtualizerScrollViewDynamic_unstable,\n virtualizerScrollViewDynamicClassNames,\n} from './components/VirtualizerScrollViewDynamic/index';\n"],"names":["VirtualizerScrollViewDynamic","renderVirtualizerScrollViewDynamic_unstable","useVirtualizerScrollViewDynamicStyles_unstable","useVirtualizerScrollViewDynamic_unstable","virtualizerScrollViewDynamicClassNames"],"
|
|
1
|
+
{"version":3,"sources":["../src/VirtualizerScrollViewDynamic.ts"],"sourcesContent":["export type {\n VirtualizerScrollViewDynamicProps,\n VirtualizerScrollViewDynamicSlots,\n VirtualizerScrollViewDynamicState,\n} from './components/VirtualizerScrollViewDynamic/index';\nexport {\n VirtualizerScrollViewDynamic,\n renderVirtualizerScrollViewDynamic_unstable,\n useVirtualizerScrollViewDynamicStyles_unstable,\n useVirtualizerScrollViewDynamic_unstable,\n virtualizerScrollViewDynamicClassNames,\n} from './components/VirtualizerScrollViewDynamic/index';\n"],"names":["VirtualizerScrollViewDynamic","renderVirtualizerScrollViewDynamic_unstable","useVirtualizerScrollViewDynamicStyles_unstable","useVirtualizerScrollViewDynamic_unstable","virtualizerScrollViewDynamicClassNames"],"mappings":"AAKA,SACEA,4BAA4B,EAC5BC,2CAA2C,EAC3CC,8CAA8C,EAC9CC,wCAAwC,EACxCC,sCAAsC,QACjC,kDAAkD"}
|
|
@@ -7,6 +7,7 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
|
7
7
|
* Virtualizer pseudo-component, this functional wrapper
|
|
8
8
|
* provides a simple interface for reducing the total number
|
|
9
9
|
* of elements rendered at one time in large lists.
|
|
10
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
10
11
|
*/ export const Virtualizer = (props)=>{
|
|
11
12
|
const state = useVirtualizer_unstable(props);
|
|
12
13
|
useVirtualizerStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Virtualizer/Virtualizer.ts"],"sourcesContent":["import * as React from 'react';\nimport type { VirtualizerProps } from './Virtualizer.types';\nimport { useVirtualizerStyles_unstable } from './useVirtualizerStyles.styles';\nimport { useVirtualizer_unstable } from './useVirtualizer';\nimport { renderVirtualizer_unstable } from './renderVirtualizer';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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: React.FC<VirtualizerProps> = (props: VirtualizerProps) => {\n const state = useVirtualizer_unstable(props);\n useVirtualizerStyles_unstable(state);\n useCustomStyleHook_unstable('useVirtualizerStyles_unstable')(state);\n\n return renderVirtualizer_unstable(state);\n};\n\nVirtualizer.displayName = 'Virtualizer';\n"],"names":["React","useVirtualizerStyles_unstable","useVirtualizer_unstable","renderVirtualizer_unstable","useCustomStyleHook_unstable","Virtualizer","props","state","displayName"],"
|
|
1
|
+
{"version":3,"sources":["../src/components/Virtualizer/Virtualizer.ts"],"sourcesContent":["import * as React from 'react';\nimport type { VirtualizerProps } from './Virtualizer.types';\nimport { useVirtualizerStyles_unstable } from './useVirtualizerStyles.styles';\nimport { useVirtualizer_unstable } from './useVirtualizer';\nimport { renderVirtualizer_unstable } from './renderVirtualizer';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 * @deprecated migrated to \\@fluentui\\-contrib/react\\-virtualizer for stable release.\n */\nexport const Virtualizer: React.FC<VirtualizerProps> = (props: VirtualizerProps) => {\n const state = useVirtualizer_unstable(props);\n useVirtualizerStyles_unstable(state);\n useCustomStyleHook_unstable('useVirtualizerStyles_unstable')(state);\n\n return renderVirtualizer_unstable(state);\n};\n\nVirtualizer.displayName = 'Virtualizer';\n"],"names":["React","useVirtualizerStyles_unstable","useVirtualizer_unstable","renderVirtualizer_unstable","useCustomStyleHook_unstable","Virtualizer","props","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,6BAA6B,QAAQ,gCAAgC;AAC9E,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;;;CAKC,GACD,OAAO,MAAMC,cAA0C,CAACC;IACtD,MAAMC,QAAQL,wBAAwBI;IACtCL,8BAA8BM;IAC9BH,4BAA4B,iCAAiCG;IAE7D,OAAOJ,2BAA2BI;AACpC,EAAE;AAEFF,YAAYG,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Virtualizer/Virtualizer.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { 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 * Enables the isScrolling property in the child render function\n * Default: false - to prevent nessecary render function calls\n */\n enableScrollLoad?: 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 * Ref for access to internal size knowledge, can be used to measure updates\n */\n childSizes: React.MutableRefObject<number[]>;\n /**\n * Ref for access to internal progressive size knowledge, can be used to measure updates\n */\n childProgressiveSizes: React.MutableRefObject<number[]>;\n};\n\nexport type VirtualizerState = ComponentState<VirtualizerSlots> & VirtualizerConfigState;\n\n/**\n * The main child render method of Virtualization\n * isScrolling will only be enabled when enableScrollLoad is set to true.\n */\nexport type VirtualizerChildRenderFunction = (index: number, isScrolling: boolean) => React.ReactNode;\n\nexport type VirtualizerDataRef = {\n progressiveSizes: React.RefObject<number[]>;\n nodeSizes: React.RefObject<number[]>;\n setFlaggedIndex: (index: number | null) => void;\n currentIndex: React.RefObject<number>;\n};\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 (or 1/3rd for dynamic items) of virtualizerLength.\n * RECOMMEND: Override this with a consistent value if using a dynamic virtualizer.\n *\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 virtualizer only renders a few items outside of view.\n */\n bufferItems?: number;\n\n /**\n * Defaults to half of bufferItems * itemSize size (in pixels).\n * RECOMMEND: Override this with a consistent minimum item size value if using a dynamic virtualizer.\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 * We recommend passing this in for accurate distance assessment in IO\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 * Enables the isScrolling property in the child render function\n * Default: false - to prevent nessecary render function calls\n */\n enableScrollLoad?: 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 /**\n * Callback for notifying when a flagged index has been rendered\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onRenderedFlaggedIndex?: (index: number) => void;\n\n /*\n * Callback for notifying when a flagged index has been rendered\n */\n flaggedIndex?: React.MutableRefObject<number | null>;\n\n /**\n * Imperative ref contains our scrollTo index functionality for user control.\n */\n imperativeVirtualizerRef?: React.RefObject<VirtualizerDataRef>;\n\n /**\n * A ref that provides the size of container (vertical - height, horizontal - width), set by a resize observer.\n * Virtualizer Measure hooks provide a suitable reference.\n */\n containerSizeRef: React.RefObject<number>;\n\n /**\n * A callback that enables updating scroll position for calculating required dynamic lengths,\n * this should be passed in from useDynamicVirtualizerMeasure\n */\n updateScrollPosition?: (position: number) => void;\n\n /**\n * Spacing between rendered children for calculation, should match the container's gap CSS value.\n */\n gap?: number;\n};\n\nexport type VirtualizerProps = ComponentProps<Partial<VirtualizerSlots>> & VirtualizerConfigProps;\n"],"names":["React"],"
|
|
1
|
+
{"version":3,"sources":["../src/components/Virtualizer/Virtualizer.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { VirtualizerContextProps } from '../../Utilities';\n\n/**\n * @deprecated migrated to \\@fluentui\\-contrib/react\\-virtualizer for stable release.\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\n/**\n * @deprecated migrated to \\@fluentui\\-contrib/react\\-virtualizer for stable release.\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 * Enables the isScrolling property in the child render function\n * Default: false - to prevent nessecary render function calls\n */\n enableScrollLoad?: 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 * Ref for access to internal size knowledge, can be used to measure updates\n */\n childSizes: React.MutableRefObject<number[]>;\n /**\n * Ref for access to internal progressive size knowledge, can be used to measure updates\n */\n childProgressiveSizes: React.MutableRefObject<number[]>;\n};\n\n/**\n * @deprecated migrated to \\@fluentui\\-contrib/react\\-virtualizer for stable release.\n */\nexport type VirtualizerState = ComponentState<VirtualizerSlots> & VirtualizerConfigState;\n\n/**\n * The main child render method of Virtualization\n * isScrolling will only be enabled when enableScrollLoad is set to true.\n * @deprecated migrated to \\@fluentui\\-contrib/react\\-virtualizer for stable release.\n */\nexport type VirtualizerChildRenderFunction = (index: number, isScrolling: boolean) => React.ReactNode;\n\n/**\n * @deprecated migrated to \\@fluentui\\-contrib/react\\-virtualizer for stable release.\n */\nexport type VirtualizerDataRef = {\n progressiveSizes: React.RefObject<number[]>;\n nodeSizes: React.RefObject<number[]>;\n setFlaggedIndex: (index: number | null) => void;\n currentIndex: React.RefObject<number>;\n};\n\n/**\n * @deprecated migrated to \\@fluentui\\-contrib/react\\-virtualizer for stable release.\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 (or 1/3rd for dynamic items) of virtualizerLength.\n * RECOMMEND: Override this with a consistent value if using a dynamic virtualizer.\n *\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 virtualizer only renders a few items outside of view.\n */\n bufferItems?: number;\n\n /**\n * Defaults to half of bufferItems * itemSize size (in pixels).\n * RECOMMEND: Override this with a consistent minimum item size value if using a dynamic virtualizer.\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 * We recommend passing this in for accurate distance assessment in IO\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 * Enables the isScrolling property in the child render function\n * Default: false - to prevent nessecary render function calls\n */\n enableScrollLoad?: 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 /**\n * Callback for notifying when a flagged index has been rendered\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onRenderedFlaggedIndex?: (index: number) => void;\n\n /*\n * Callback for notifying when a flagged index has been rendered\n */\n flaggedIndex?: React.MutableRefObject<number | null>;\n\n /**\n * Imperative ref contains our scrollTo index functionality for user control.\n */\n imperativeVirtualizerRef?: React.RefObject<VirtualizerDataRef>;\n\n /**\n * A ref that provides the size of container (vertical - height, horizontal - width), set by a resize observer.\n * Virtualizer Measure hooks provide a suitable reference.\n */\n containerSizeRef: React.RefObject<number>;\n\n /**\n * A callback that enables updating scroll position for calculating required dynamic lengths,\n * this should be passed in from useDynamicVirtualizerMeasure\n */\n updateScrollPosition?: (position: number) => void;\n\n /**\n * Spacing between rendered children for calculation, should match the container's gap CSS value.\n */\n gap?: number;\n};\n\n/**\n * @deprecated migrated to \\@fluentui\\-contrib/react\\-virtualizer for stable release.\n */\nexport type VirtualizerProps = ComponentProps<Partial<VirtualizerSlots>> & VirtualizerConfigProps;\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Virtualizer/index.ts"],"sourcesContent":["export { Virtualizer } from './Virtualizer';\nexport type {\n VirtualizerChildRenderFunction,\n VirtualizerConfigProps,\n VirtualizerConfigState,\n VirtualizerDataRef,\n VirtualizerProps,\n VirtualizerSlots,\n VirtualizerState,\n} from './Virtualizer.types';\nexport { useVirtualizer_unstable } from './useVirtualizer';\nexport { renderVirtualizerChildPlaceholder, renderVirtualizer_unstable } from './renderVirtualizer';\nexport { useVirtualizerStyles_unstable, virtualizerClassNames } from './useVirtualizerStyles.styles';\n"],"names":["Virtualizer","useVirtualizer_unstable","renderVirtualizerChildPlaceholder","renderVirtualizer_unstable","useVirtualizerStyles_unstable","virtualizerClassNames"],"
|
|
1
|
+
{"version":3,"sources":["../src/components/Virtualizer/index.ts"],"sourcesContent":["export { Virtualizer } from './Virtualizer';\nexport type {\n VirtualizerChildRenderFunction,\n VirtualizerConfigProps,\n VirtualizerConfigState,\n VirtualizerDataRef,\n VirtualizerProps,\n VirtualizerSlots,\n VirtualizerState,\n} from './Virtualizer.types';\nexport { useVirtualizer_unstable } from './useVirtualizer';\nexport { renderVirtualizerChildPlaceholder, renderVirtualizer_unstable } from './renderVirtualizer';\nexport { useVirtualizerStyles_unstable, virtualizerClassNames } from './useVirtualizerStyles.styles';\n"],"names":["Virtualizer","useVirtualizer_unstable","renderVirtualizerChildPlaceholder","renderVirtualizer_unstable","useVirtualizerStyles_unstable","virtualizerClassNames"],"mappings":"AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAU5C,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,iCAAiC,EAAEC,0BAA0B,QAAQ,sBAAsB;AACpG,SAASC,6BAA6B,EAAEC,qBAAqB,QAAQ,gCAAgC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { assertSlots } from '@fluentui/react-utilities';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
6
|
+
*/ export const renderVirtualizer_unstable = (state)=>{
|
|
5
7
|
assertSlots(state);
|
|
6
8
|
return /*#__PURE__*/ _jsxs(React.Fragment, {
|
|
7
9
|
children: [
|
|
@@ -15,7 +17,9 @@ export const renderVirtualizer_unstable = (state)=>{
|
|
|
15
17
|
]
|
|
16
18
|
});
|
|
17
19
|
};
|
|
18
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
22
|
+
*/ export const renderVirtualizerChildPlaceholder = (child, index)=>{
|
|
19
23
|
return /*#__PURE__*/ _jsx(React.Suspense, {
|
|
20
24
|
fallback: null,
|
|
21
25
|
children: child
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Virtualizer/renderVirtualizer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport * as React from 'react';\nimport type { VirtualizerSlots, VirtualizerState } from './Virtualizer.types';\n\nimport { assertSlots } from '@fluentui/react-utilities';\n\nexport const renderVirtualizer_unstable = (state: VirtualizerState) => {\n assertSlots<VirtualizerSlots>(state);\n return (\n <React.Fragment>\n {/* The 'before' bookend to hold items in place and detect scroll previous */}\n <state.beforeContainer>\n <state.before />\n </state.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 <state.afterContainer>\n <state.after />\n </state.afterContainer>\n </React.Fragment>\n );\n};\n
|
|
1
|
+
{"version":3,"sources":["../src/components/Virtualizer/renderVirtualizer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport * as React from 'react';\nimport type { VirtualizerSlots, VirtualizerState } from './Virtualizer.types';\n\nimport { assertSlots } from '@fluentui/react-utilities';\n\n/**\n * @deprecated migrated to \\@fluentui\\-contrib/react\\-virtualizer for stable release.\n */\nexport const renderVirtualizer_unstable = (state: VirtualizerState) => {\n assertSlots<VirtualizerSlots>(state);\n return (\n <React.Fragment>\n {/* The 'before' bookend to hold items in place and detect scroll previous */}\n <state.beforeContainer>\n <state.before />\n </state.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 <state.afterContainer>\n <state.after />\n </state.afterContainer>\n </React.Fragment>\n );\n};\n/**\n * @deprecated migrated to \\@fluentui\\-contrib/react\\-virtualizer for stable release.\n */\nexport const renderVirtualizerChildPlaceholder = (child: React.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","assertSlots","renderVirtualizer_unstable","state","Fragment","beforeContainer","before","virtualizedChildren","afterContainer","after","renderVirtualizerChildPlaceholder","child","index","Suspense","fallback"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,YAAYA,WAAW,QAAQ;AAG/B,SAASC,WAAW,QAAQ,4BAA4B;AAExD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCF,YAA8BE;IAC9B,qBACE,MAACH,MAAMI,QAAQ;;0BAEb,KAACD,MAAME,eAAe;0BACpB,cAAA,KAACF,MAAMG,MAAM;;YAGdH,MAAMI,mBAAmB;0BAE1B,KAACJ,MAAMK,cAAc;0BACnB,cAAA,KAACL,MAAMM,KAAK;;;;AAIpB,EAAE;AACF;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC,OAAwBC;IACxE,qBACE,KAACZ,MAAMa,QAAQ;QAA8CC,UAAU;kBACpEH;OADkB,CAAC,4BAA4B,EAAEC,OAAO;AAI/D,EAAE"}
|
|
@@ -3,7 +3,9 @@ import { useIntersectionObserver } from '../../hooks/useIntersectionObserver';
|
|
|
3
3
|
import { useVirtualizerContextState_unstable } from '../../Utilities';
|
|
4
4
|
import { slot, useTimeout } from '@fluentui/react-utilities';
|
|
5
5
|
import { flushSync } from 'react-dom';
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
|
|
8
|
+
*/ export function useVirtualizer_unstable(props) {
|
|
7
9
|
'use no memo';
|
|
8
10
|
const { itemSize, numItems, virtualizerLength, children: renderChild, getItemSize, bufferItems = Math.round(virtualizerLength / 4.0), bufferSize = Math.floor(bufferItems / 2.0) * itemSize, axis = 'vertical', reversed = false, virtualizerContext, onRenderedFlaggedIndex, imperativeVirtualizerRef, containerSizeRef, scrollViewRef, enableScrollLoad, updateScrollPosition, gap = 0 } = props;
|
|
9
11
|
/* The context is optional, it's useful for injecting additional index logic, or performing uniform state updates*/ const _virtualizerContext = useVirtualizerContextState_unstable(virtualizerContext);
|