@fluentui/react-virtualizer 0.0.0-nightly-20230119-0422.1

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.
Files changed (50) hide show
  1. package/CHANGELOG.json +32 -0
  2. package/CHANGELOG.md +15 -0
  3. package/LICENSE +15 -0
  4. package/README.md +5 -0
  5. package/dist/index.d.ts +173 -0
  6. package/lib/Hooks.js +2 -0
  7. package/lib/Hooks.js.map +1 -0
  8. package/lib/Virtualizer.js +2 -0
  9. package/lib/Virtualizer.js.map +1 -0
  10. package/lib/components/Virtualizer/Virtualizer.js +15 -0
  11. package/lib/components/Virtualizer/Virtualizer.js.map +1 -0
  12. package/lib/components/Virtualizer/Virtualizer.types.js +2 -0
  13. package/lib/components/Virtualizer/Virtualizer.types.js.map +1 -0
  14. package/lib/components/Virtualizer/index.js +6 -0
  15. package/lib/components/Virtualizer/index.js.map +1 -0
  16. package/lib/components/Virtualizer/renderVirtualizer.js +18 -0
  17. package/lib/components/Virtualizer/renderVirtualizer.js.map +1 -0
  18. package/lib/components/Virtualizer/useVirtualizer.js +363 -0
  19. package/lib/components/Virtualizer/useVirtualizer.js.map +1 -0
  20. package/lib/components/Virtualizer/useVirtualizerStyles.js +108 -0
  21. package/lib/components/Virtualizer/useVirtualizerStyles.js.map +1 -0
  22. package/lib/hooks/index.js +2 -0
  23. package/lib/hooks/index.js.map +1 -0
  24. package/lib/hooks/useIntersectionObserver.js +52 -0
  25. package/lib/hooks/useIntersectionObserver.js.map +1 -0
  26. package/lib/index.js +3 -0
  27. package/lib/index.js.map +1 -0
  28. package/lib-commonjs/Hooks.js +8 -0
  29. package/lib-commonjs/Hooks.js.map +1 -0
  30. package/lib-commonjs/Virtualizer.js +8 -0
  31. package/lib-commonjs/Virtualizer.js.map +1 -0
  32. package/lib-commonjs/components/Virtualizer/Virtualizer.js +22 -0
  33. package/lib-commonjs/components/Virtualizer/Virtualizer.js.map +1 -0
  34. package/lib-commonjs/components/Virtualizer/Virtualizer.types.js +6 -0
  35. package/lib-commonjs/components/Virtualizer/Virtualizer.types.js.map +1 -0
  36. package/lib-commonjs/components/Virtualizer/index.js +12 -0
  37. package/lib-commonjs/components/Virtualizer/index.js.map +1 -0
  38. package/lib-commonjs/components/Virtualizer/renderVirtualizer.js +25 -0
  39. package/lib-commonjs/components/Virtualizer/renderVirtualizer.js.map +1 -0
  40. package/lib-commonjs/components/Virtualizer/useVirtualizer.js +370 -0
  41. package/lib-commonjs/components/Virtualizer/useVirtualizer.js.map +1 -0
  42. package/lib-commonjs/components/Virtualizer/useVirtualizerStyles.js +115 -0
  43. package/lib-commonjs/components/Virtualizer/useVirtualizerStyles.js.map +1 -0
  44. package/lib-commonjs/hooks/index.js +8 -0
  45. package/lib-commonjs/hooks/index.js.map +1 -0
  46. package/lib-commonjs/hooks/useIntersectionObserver.js +59 -0
  47. package/lib-commonjs/hooks/useIntersectionObserver.js.map +1 -0
  48. package/lib-commonjs/index.js +45 -0
  49. package/lib-commonjs/index.js.map +1 -0
  50. package/package.json +53 -0
package/CHANGELOG.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@fluentui/react-virtualizer",
3
+ "entries": [
4
+ {
5
+ "date": "Thu, 19 Jan 2023 04:29:49 GMT",
6
+ "tag": "@fluentui/react-virtualizer_v0.0.0-nightly-20230119-0422.1",
7
+ "version": "0.0.0-nightly-20230119-0422.1",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "fluentui-internal@service.microsoft.com",
12
+ "package": "@fluentui/react-virtualizer",
13
+ "commit": "not available",
14
+ "comment": "Release nightly v9"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-virtualizer",
19
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230119-0422.1",
20
+ "commit": "5a75e47428063a8ce004349c62041a228a465664"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-virtualizer",
25
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230119-0422.1",
26
+ "commit": "5a75e47428063a8ce004349c62041a228a465664"
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ ]
32
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Change Log - @fluentui/react-virtualizer
2
+
3
+ This log was last generated on Thu, 19 Jan 2023 04:29:49 GMT and should not be manually modified.
4
+
5
+ <!-- Start content -->
6
+
7
+ ## [0.0.0-nightly-20230119-0422.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-virtualizer_v0.0.0-nightly-20230119-0422.1)
8
+
9
+ Thu, 19 Jan 2023 04:29:49 GMT
10
+
11
+ ### Changes
12
+
13
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
14
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230119-0422.1 ([commit](https://github.com/microsoft/fluentui/commit/5a75e47428063a8ce004349c62041a228a465664) by beachball)
15
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230119-0422.1 ([commit](https://github.com/microsoft/fluentui/commit/5a75e47428063a8ce004349c62041a228a465664) by beachball)
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ @fluentui/react-virtualizer
2
+
3
+ Copyright (c) Microsoft Corporation
4
+
5
+ All rights reserved.
6
+
7
+ MIT License
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+
15
+ Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @fluentui/react-virtualizer
2
+
3
+ **Virtualizer components for [Fluent UI React](https://react.fluentui.dev/)**
4
+
5
+ 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.
@@ -0,0 +1,173 @@
1
+ import type { ComponentProps } from '@fluentui/react-utilities';
2
+ import type { ComponentState } from '@fluentui/react-utilities';
3
+ import type { Dispatch } from 'react';
4
+ import type { FC } from 'react';
5
+ import type { MutableRefObject } from 'react';
6
+ import * as React_2 from 'react';
7
+ import type { SetStateAction } from 'react';
8
+ import type { Slot } from '@fluentui/react-utilities';
9
+ import type { SlotClassNames } from '@fluentui/react-utilities';
10
+
11
+ export declare const renderVirtualizer_unstable: (state: VirtualizerState) => JSX.Element;
12
+
13
+ /**
14
+ * React hook that allows easy usage of the browser API IntersectionObserver within React
15
+ * @param callback - A function called when the percentage of the target element is visible crosses a threshold.
16
+ * @param options - An optional object which customizes the observer. If options isn't specified, the observer uses the
17
+ * document's viewport as the root, with no margin, and a 0% threshold (meaning that even a one-pixel change is
18
+ * enough to trigger a callback).
19
+ * @returns An array containing a callback to update the list of Elements the observer should listen to, a callback to
20
+ * update the init options of the IntersectionObserver and a ref to the IntersectionObserver instance itself.
21
+ */
22
+ export declare const useIntersectionObserver: (callback: IntersectionObserverCallback, options?: IntersectionObserverInit | undefined) => {
23
+ setObserverList: Dispatch<SetStateAction<Element[] | undefined>>;
24
+ setObserverInit: Dispatch<SetStateAction<IntersectionObserverInit | undefined>>;
25
+ observer: MutableRefObject<IntersectionObserver | undefined>;
26
+ };
27
+
28
+ export declare function useVirtualizer_unstable(props: VirtualizerProps): VirtualizerState;
29
+
30
+ /**
31
+ * Apply styling to the Virtualizer states
32
+ */
33
+ export declare const useVirtualizerStyles_unstable: (state: VirtualizerState) => VirtualizerState;
34
+
35
+ /**
36
+ * Virtualizer pseudo-component, this functional wrapper
37
+ * provides a simple interface for reducing the total number
38
+ * of elements rendered at one time in large lists.
39
+ */
40
+ export declare const Virtualizer: FC<VirtualizerProps>;
41
+
42
+ export declare type VirtualizerChildRenderFunction = (index: number) => React_2.ReactNode;
43
+
44
+ export declare const virtualizerClassNames: SlotClassNames<VirtualizerSlots>;
45
+
46
+ export declare type VirtualizerProps = ComponentProps<Partial<VirtualizerSlots>> & {
47
+ /**
48
+ * Child render function.
49
+ * Iteratively called to return current virtualizer DOM children.
50
+ * Will act as a row or column indexer depending on Virtualizer settings.
51
+ * Can be used dynamically.
52
+ */
53
+ children: VirtualizerChildRenderFunction;
54
+ /**
55
+ * Default cell size to use if no custom callback provided.
56
+ * If implementing `getItemSize` this should be the initial and ideally minimum cell size.
57
+ */
58
+ itemSize: number;
59
+ /**
60
+ * The total number of items to be virtualized.
61
+ */
62
+ numItems: number;
63
+ /**
64
+ * Number of children to render in the DOM during virtualization.
65
+ * Constraints:
66
+ * - Large enough that the items rendered in DOM cover the viewport
67
+ * and intersection observer buffers (buffersize) at both ends.
68
+ */
69
+ virtualizerLength: number;
70
+ /**
71
+ * Defaults to 1/4th of virtualizerLength.
72
+ * Controls the number of elements rendered before the current index entering the virtualized viewport.
73
+ * Constraints:
74
+ * - Large enough to cover bufferSize (prevents buffers intersecting into the viewport during rest state).
75
+ * - Small enough that the end buffer and end index (start index + virtualizerLength) is not within viewport at rest.
76
+ */
77
+ bufferItems?: number;
78
+ /**
79
+ * Defaults to half of bufferItems size (in pixels).
80
+ * The length (in pixels) before the end/start DOM index where the virtualizer recalculation will be triggered.
81
+ * Increasing this reduces whitespace on ultra-fast scroll, as additional elements
82
+ * are buffered to appear while virtualization recalculates.
83
+ * Constraints:
84
+ * - At least 1px - although this will only trigger the recalculation after bookends (whitespace) enter viewport.
85
+ * - BufferSize must be smaller than bufferItems pixel size, as it prevents bookends entering viewport at rest.
86
+ */
87
+ bufferSize?: number;
88
+ /**
89
+ * Enables users to override the intersectionObserverRoot.
90
+ * @default null
91
+ */
92
+ intersectionObserverRoot?: React_2.MutableRefObject<HTMLElement | null>;
93
+ /**
94
+ * The scroll direction
95
+ * @default vertical
96
+ */
97
+ axis?: 'vertical' | 'horizontal';
98
+ /**
99
+ * Tells the virtualizer to measure in the reverse direction (for column-reverse order etc.)
100
+ * This value should be flipped in RTL implementation (TBD whether automate RTL).
101
+ */
102
+ reversed?: boolean;
103
+ /**
104
+ * Callback for acquiring size of individual items
105
+ * @param index - the index of the requested size's child
106
+ */
107
+ getItemSize?: (index: number) => number;
108
+ /**
109
+ * Notify users of index changes
110
+ */
111
+ onUpdateIndex?: (index: number, prevIndex: number) => void;
112
+ /**
113
+ * Allow users to intervene in index calculation changes
114
+ */
115
+ onCalculateIndex?: (newIndex: number) => number;
116
+ };
117
+
118
+ export declare type VirtualizerSlots = {
119
+ /**
120
+ * The intersection observed 'before' element will detect when scrolling towards the beginning.
121
+ */
122
+ before: NonNullable<Slot<'div', 'td'>>;
123
+ /**
124
+ * A block place holding whitespace at the beginning of current DOM children.
125
+ */
126
+ beforeContainer: NonNullable<Slot<'div', 'tr'>>;
127
+ /**
128
+ * The intersection observed 'after' element will detect when scrolling towards the end.
129
+ */
130
+ after: NonNullable<Slot<'div', 'td'>>;
131
+ /**
132
+ * A block place holding whitespace after the end of current DOM children.
133
+ */
134
+ afterContainer: NonNullable<Slot<'div', 'tr'>>;
135
+ };
136
+
137
+ export declare type VirtualizerState = ComponentState<VirtualizerSlots> & {
138
+ /**
139
+ * The current virtualized array of children to show in the DOM.
140
+ */
141
+ virtualizedChildren: React_2.ReactNode[];
142
+ /**
143
+ * The current start index for the virtualizer, all previous index's will be removed from DOM.
144
+ */
145
+ virtualizerStartIndex: number;
146
+ /**
147
+ * Current buffer height required at beginning of array.
148
+ */
149
+ afterBufferHeight: number;
150
+ /**
151
+ * Current buffer height required at end of array.
152
+ */
153
+ beforeBufferHeight: number;
154
+ /**
155
+ * The total current height of the scrollView/child content.
156
+ */
157
+ totalVirtualizerHeight: number;
158
+ /**
159
+ * The scroll direction
160
+ * @default vertical
161
+ */
162
+ axis?: 'vertical' | 'horizontal';
163
+ /**
164
+ * Tells the virtualizer to measure in the reverse direction (for column-reverse order etc.)
165
+ */
166
+ reversed?: boolean;
167
+ /**
168
+ * Tells the virtualizer how much
169
+ */
170
+ bufferSize: number;
171
+ };
172
+
173
+ export { }
package/lib/Hooks.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './hooks/index';
2
+ //# sourceMappingURL=Hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Hooks.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-virtualizer/src/Hooks.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC","sourcesContent":["export * from './hooks/index';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './components/Virtualizer/index';
2
+ //# sourceMappingURL=Virtualizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Virtualizer.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-virtualizer/src/Virtualizer.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/Virtualizer/index';\n"]}
@@ -0,0 +1,15 @@
1
+ import { useVirtualizerStyles_unstable } from './useVirtualizerStyles';
2
+ import { useVirtualizer_unstable } from './useVirtualizer';
3
+ import { renderVirtualizer_unstable } from './renderVirtualizer';
4
+ /**
5
+ * Virtualizer pseudo-component, this functional wrapper
6
+ * provides a simple interface for reducing the total number
7
+ * of elements rendered at one time in large lists.
8
+ */
9
+ export const Virtualizer = props => {
10
+ const state = useVirtualizer_unstable(props);
11
+ useVirtualizerStyles_unstable(state);
12
+ return renderVirtualizer_unstable(state);
13
+ };
14
+ Virtualizer.displayName = 'Virtualizer';
15
+ //# sourceMappingURL=Virtualizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"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","names":["useVirtualizerStyles_unstable","useVirtualizer_unstable","renderVirtualizer_unstable","Virtualizer","props","state","displayName"],"sourceRoot":"","sources":["../../../../../../../../../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"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Virtualizer.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Virtualizer.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-virtualizer/src/components/Virtualizer/Virtualizer.types.ts"],"names":[],"mappings":"","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"]}
@@ -0,0 +1,6 @@
1
+ export * from './Virtualizer';
2
+ export * from './Virtualizer.types';
3
+ export * from './useVirtualizer';
4
+ export * from './renderVirtualizer';
5
+ export * from './useVirtualizerStyles';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-virtualizer/src/components/Virtualizer/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './Virtualizer';\nexport * from './Virtualizer.types';\nexport * from './useVirtualizer';\nexport * from './renderVirtualizer';\nexport * from './useVirtualizerStyles';\n"]}
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { getSlots } from '@fluentui/react-utilities';
3
+ export const renderVirtualizer_unstable = state => {
4
+ const {
5
+ slots,
6
+ slotProps
7
+ } = getSlots(state);
8
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(slots.beforeContainer, {
9
+ ...slotProps.beforeContainer
10
+ }, /*#__PURE__*/React.createElement(slots.before, {
11
+ ...slotProps.before
12
+ })), state.virtualizedChildren, /*#__PURE__*/React.createElement(slots.afterContainer, {
13
+ ...slotProps.afterContainer
14
+ }, /*#__PURE__*/React.createElement(slots.after, {
15
+ ...slotProps.after
16
+ })));
17
+ };
18
+ //# sourceMappingURL=renderVirtualizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD,OAAO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAmBE,KAAK,CAAC;EAE9D,oBACEH,oBAACA,KAAK,CAACM,QAAQ,qBAEbN,oBAACI,KAAK,CAACG,eAAe;IAAA,GAAKF,SAAS,CAACE;EAAe,gBAClDP,oBAACI,KAAK,CAACI,MAAM;IAAA,GAAKH,SAAS,CAACG;EAAM,EAAI,CAChB,EAEvBL,KAAK,CAACM,mBAAmB,eAE1BT,oBAACI,KAAK,CAACM,cAAc;IAAA,GAAKL,SAAS,CAACK;EAAc,gBAChDV,oBAACI,KAAK,CAACO,KAAK;IAAA,GAAKN,SAAS,CAACM;EAAK,EAAI,CACf,CACR;AAErB,CAAC","names":["React","getSlots","renderVirtualizer_unstable","state","slots","slotProps","Fragment","beforeContainer","before","virtualizedChildren","afterContainer","after"],"sourceRoot":"","sources":["../../../../../../../../../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"]}