@react-native/virtualized-lists 0.80.0-rc.1 → 0.80.0-rc.3
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.
|
@@ -17,6 +17,7 @@ import invariant from 'invariant';
|
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
|
|
19
19
|
type DefaultSectionT = {
|
|
20
|
+
data: any,
|
|
20
21
|
[key: string]: any,
|
|
21
22
|
};
|
|
22
23
|
|
|
@@ -609,7 +610,7 @@ function ItemWithSeparator<ItemT>(
|
|
|
609
610
|
);
|
|
610
611
|
}
|
|
611
612
|
|
|
612
|
-
|
|
613
|
+
const VirtualizedSectionListComponent = VirtualizedSectionList as component<
|
|
613
614
|
ItemT,
|
|
614
615
|
SectionT: SectionBase<ItemT, DefaultSectionT> = DefaultSectionT,
|
|
615
616
|
>(
|
|
@@ -621,3 +622,10 @@ export default VirtualizedSectionList as component<
|
|
|
621
622
|
>,
|
|
622
623
|
...VirtualizedSectionListProps<ItemT, SectionT>
|
|
623
624
|
);
|
|
625
|
+
|
|
626
|
+
export default VirtualizedSectionListComponent;
|
|
627
|
+
|
|
628
|
+
export type AnyVirtualizedSectionList = typeof VirtualizedSectionListComponent<
|
|
629
|
+
any,
|
|
630
|
+
any,
|
|
631
|
+
>;
|
package/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import typeof FillRateHelper from './Lists/FillRateHelper';
|
|
14
14
|
import typeof ViewabilityHelper from './Lists/ViewabilityHelper';
|
|
15
15
|
import typeof VirtualizedList from './Lists/VirtualizedList';
|
|
16
|
-
import
|
|
16
|
+
import type {AnyVirtualizedSectionList} from './Lists/VirtualizedSectionList';
|
|
17
17
|
|
|
18
18
|
import {typeof VirtualizedListContextResetter} from './Lists/VirtualizedListContext';
|
|
19
19
|
import {keyExtractor} from './Lists/VirtualizeUtils';
|
|
@@ -45,7 +45,7 @@ export default {
|
|
|
45
45
|
get VirtualizedList(): VirtualizedList {
|
|
46
46
|
return require('./Lists/VirtualizedList').default;
|
|
47
47
|
},
|
|
48
|
-
get VirtualizedSectionList():
|
|
48
|
+
get VirtualizedSectionList(): AnyVirtualizedSectionList {
|
|
49
49
|
return require('./Lists/VirtualizedSectionList').default;
|
|
50
50
|
},
|
|
51
51
|
get VirtualizedListContextResetter(): VirtualizedListContextResetter {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<f516b2ab67480168bb76a1be41b99d5c>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/build-types/index.js.
|
|
10
10
|
* Original file: packages/virtualized-lists/Lists/VirtualizedSectionList.js
|
|
@@ -14,6 +14,7 @@ import type { VirtualizedListProps } from "./VirtualizedListProps";
|
|
|
14
14
|
import VirtualizedList from "./VirtualizedList";
|
|
15
15
|
import * as React from "react";
|
|
16
16
|
type DefaultSectionT = {
|
|
17
|
+
data: any;
|
|
17
18
|
[key: string]: any;
|
|
18
19
|
};
|
|
19
20
|
export type SectionData<SectionItemT, SectionT = DefaultSectionT> = (Readonly<SectionBase<SectionItemT, SectionT>> & SectionT) | (SectionBase<SectionItemT, SectionT> & SectionT) | SectionT;
|
|
@@ -95,7 +96,7 @@ export type ScrollToLocationParamsType = {
|
|
|
95
96
|
viewOffset?: number;
|
|
96
97
|
viewPosition?: number;
|
|
97
98
|
};
|
|
98
|
-
declare const
|
|
99
|
+
declare const VirtualizedSectionListComponent: <ItemT, SectionT extends SectionBase<ItemT, DefaultSectionT> = DefaultSectionT>(props: Omit<VirtualizedSectionListProps<ItemT, SectionT>, keyof {
|
|
99
100
|
ref: React.Ref<{
|
|
100
101
|
getListRef(): VirtualizedList | undefined;
|
|
101
102
|
scrollToLocation(params: ScrollToLocationParamsType): void;
|
|
@@ -106,5 +107,7 @@ declare const $$VirtualizedSectionList: <ItemT, SectionT extends SectionBase<Ite
|
|
|
106
107
|
scrollToLocation(params: ScrollToLocationParamsType): void;
|
|
107
108
|
}>;
|
|
108
109
|
}) => React.ReactNode;
|
|
110
|
+
declare const $$VirtualizedSectionList: typeof VirtualizedSectionListComponent;
|
|
109
111
|
declare type $$VirtualizedSectionList = typeof $$VirtualizedSectionList;
|
|
110
112
|
export default $$VirtualizedSectionList;
|
|
113
|
+
export type AnyVirtualizedSectionList = typeof VirtualizedSectionListComponent;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<d4917b4be5d6226dde3ee687aabe2db7>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/build-types/index.js.
|
|
10
10
|
* Original file: packages/virtualized-lists/index.js
|
|
@@ -16,10 +16,9 @@ import type $$IMPORT_TYPEOF_2$$ from "./Lists/ViewabilityHelper";
|
|
|
16
16
|
type ViewabilityHelper = typeof $$IMPORT_TYPEOF_2$$;
|
|
17
17
|
import type $$IMPORT_TYPEOF_3$$ from "./Lists/VirtualizedList";
|
|
18
18
|
type VirtualizedList = typeof $$IMPORT_TYPEOF_3$$;
|
|
19
|
-
import type
|
|
20
|
-
type
|
|
21
|
-
|
|
22
|
-
type VirtualizedListContextResetter = typeof $$IMPORT_TYPEOF_5$$;
|
|
19
|
+
import type { AnyVirtualizedSectionList } from "./Lists/VirtualizedSectionList";
|
|
20
|
+
import { type VirtualizedListContextResetter as $$IMPORT_TYPEOF_4$$ } from "./Lists/VirtualizedListContext";
|
|
21
|
+
type VirtualizedListContextResetter = typeof $$IMPORT_TYPEOF_4$$;
|
|
23
22
|
import { keyExtractor } from "./Lists/VirtualizeUtils";
|
|
24
23
|
export type { ViewToken, ViewabilityConfig, ViewabilityConfigCallbackPair, ViewabilityConfigCallbackPairs } from "./Lists/ViewabilityHelper";
|
|
25
24
|
export type { CellRendererProps, ListRenderItemInfo, ListRenderItem, Separators, VirtualizedListProps } from "./Lists/VirtualizedListProps";
|
|
@@ -28,7 +27,7 @@ export type { FillRateInfo } from "./Lists/FillRateHelper";
|
|
|
28
27
|
declare const $$index: {
|
|
29
28
|
keyExtractor: typeof keyExtractor;
|
|
30
29
|
get VirtualizedList(): VirtualizedList;
|
|
31
|
-
get VirtualizedSectionList():
|
|
30
|
+
get VirtualizedSectionList(): AnyVirtualizedSectionList;
|
|
32
31
|
get VirtualizedListContextResetter(): VirtualizedListContextResetter;
|
|
33
32
|
get ViewabilityHelper(): ViewabilityHelper;
|
|
34
33
|
get FillRateHelper(): FillRateHelper;
|