@cleartrip/ct-design-list 4.0.0-SNAPSHOT-reactnative.13 → 4.0.0-SNAPSHOT-reactnative.14.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.
- package/dist/List.native.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.native.d.ts +2 -2
- package/dist/index.native.d.ts.map +1 -1
- package/dist/type.d.ts +5 -4
- package/dist/type.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/List.native.tsx +2 -1
- package/src/index.native.ts +2 -2
- package/src/index.ts +2 -2
- package/src/type.ts +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.native.d.ts","sourceRoot":"","sources":["../packages/components/List/src/List.native.tsx"],"names":[],"mappings":"AAOA,OAAO,EAA0B,uBAAuB,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AA8ClF,QAAA,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"List.native.d.ts","sourceRoot":"","sources":["../packages/components/List/src/List.native.tsx"],"names":[],"mappings":"AAOA,OAAO,EAA0B,uBAAuB,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AA8ClF,QAAA,MAAM,IAAI,EAqPM,CAAC,CAAC,EAAE,CAAC,SAAS;IAAE,IAAI,EAAE,CAAC,EAAE,CAAA;CAAE,EACzC,KAAK,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;CAAE,KAChE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;AAIvB,eAAe,IAAI,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/List/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/List/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC"}
|
package/dist/index.native.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../packages/components/List/src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC;AAChD,
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../packages/components/List/src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC;AAChD,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC"}
|
package/dist/type.d.ts
CHANGED
|
@@ -31,10 +31,10 @@ export interface IVariableSizedListProps<T, U extends {
|
|
|
31
31
|
windowSize?: number;
|
|
32
32
|
minimumBatchSize?: number | undefined;
|
|
33
33
|
threshold?: number | undefined;
|
|
34
|
-
height
|
|
35
|
-
itemCount
|
|
36
|
-
width
|
|
37
|
-
itemSize
|
|
34
|
+
height?: number | string;
|
|
35
|
+
itemCount?: number;
|
|
36
|
+
width?: number | string;
|
|
37
|
+
itemSize?: (index: number) => number;
|
|
38
38
|
itemData: U;
|
|
39
39
|
style?: Styles;
|
|
40
40
|
overScanCount: number;
|
|
@@ -47,6 +47,7 @@ export interface IVariableSizedListProps<T, U extends {
|
|
|
47
47
|
setCardHeight?: (index: number, size: number) => void;
|
|
48
48
|
handleItemsRendered?: (props: unknown) => void;
|
|
49
49
|
onItemsRendered?: (props: unknown) => void;
|
|
50
|
+
ItemSeparatorComponent?: FunctionComponent<unknown>;
|
|
50
51
|
}
|
|
51
52
|
export type ListScrollEvent = ScrollContainerEvent;
|
|
52
53
|
export type ListRef = {
|
package/dist/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../packages/components/List/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,KAAK,oBAAoB,GAAG;IAC1B,WAAW,EAAE;QACX,aAAa,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACxC,iBAAiB,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QACrD,WAAW,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAChD,CAAC;CACH,CAAC;AAKF,MAAM,WAAW,sBAAsB,CAAC,CAAC,EAAE,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB,CAAC,CAAC,EAAE,CAAC,SAAS;IAAE,IAAI,EAAE,CAAC,EAAE,CAAA;CAAE;IACjE,IAAI,EAAE,CAAC,EAAE,CAAC;IAMV,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAG1C,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAM5C,UAAU,CAAC,EAAE,MAAM,CAAC;IAMpB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,C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.0-SNAPSHOT-reactnative.14.1",
|
|
4
4
|
"description": "List Component (virtualised)",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "./dist/ct-design-list.cjs.js",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"react-window": "^1.8.9",
|
|
28
28
|
"react-window-infinite-loader": "^1.0.9",
|
|
29
|
-
"@cleartrip/ct-design-scroll-container": "4.0.0-SNAPSHOT-reactnative.
|
|
30
|
-
"@cleartrip/ct-design-
|
|
31
|
-
"@cleartrip/ct-design-
|
|
32
|
-
"@cleartrip/ct-design-theme": "4.0.0-SNAPSHOT-reactnative.
|
|
29
|
+
"@cleartrip/ct-design-scroll-container": "4.0.0-SNAPSHOT-reactnative.14.1",
|
|
30
|
+
"@cleartrip/ct-design-use-merge-refs": "4.0.0-SNAPSHOT-reactnative.14.1",
|
|
31
|
+
"@cleartrip/ct-design-style-manager": "4.0.0-SNAPSHOT-reactnative.14.1",
|
|
32
|
+
"@cleartrip/ct-design-theme": "4.0.0-SNAPSHOT-reactnative.14.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/react-window": "^1.8.8",
|
|
36
36
|
"@types/react-window-infinite-loader": "^1.0.9",
|
|
37
|
-
"@cleartrip/ct-design-types": "4.0.0-SNAPSHOT-reactnative.
|
|
37
|
+
"@cleartrip/ct-design-types": "4.0.0-SNAPSHOT-reactnative.14.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": ">=16.8.0",
|
package/src/List.native.tsx
CHANGED
|
@@ -67,6 +67,7 @@ const List = memo(
|
|
|
67
67
|
windowSize = 21,
|
|
68
68
|
onScroll,
|
|
69
69
|
style,
|
|
70
|
+
ItemSeparatorComponent = () => <View style={staticStyles.itemSeparator} />,
|
|
70
71
|
}: IVariableSizedListProps<T, U>,
|
|
71
72
|
forwardedRef: React.Ref<ListRef>,
|
|
72
73
|
) => {
|
|
@@ -249,7 +250,7 @@ const List = memo(
|
|
|
249
250
|
viewabilityConfig={localViewabilityConfig}
|
|
250
251
|
viewabilityConfigCallbackPairs={viewabilityConfigCallbackPairs.current}
|
|
251
252
|
ref={mergedRef}
|
|
252
|
-
ItemSeparatorComponent={
|
|
253
|
+
ItemSeparatorComponent={ItemSeparatorComponent}
|
|
253
254
|
contentContainerStyle={style}
|
|
254
255
|
removeClippedSubviews={true}
|
|
255
256
|
showsHorizontalScrollIndicator={false}
|
package/src/index.native.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as List } from './List.native';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export * from './type';
|
|
3
|
+
export * from './ListItemContext';
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as List } from './List';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export * from './type';
|
|
3
|
+
export * from './ListItemContext';
|
package/src/type.ts
CHANGED
|
@@ -55,23 +55,23 @@ export interface IVariableSizedListProps<T, U extends { data: T[] }> {
|
|
|
55
55
|
* drives how many rows will be rendered at once. For horizontal lists
|
|
56
56
|
* this can be a number or a string (e.g. "50%").
|
|
57
57
|
*/
|
|
58
|
-
height
|
|
58
|
+
height?: number | string;
|
|
59
59
|
|
|
60
60
|
/** Total count of items in the data source (including not-yet-loaded ones). */
|
|
61
|
-
itemCount
|
|
61
|
+
itemCount?: number;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Width of the list. For horizontal lists this must be a number. For
|
|
65
65
|
* vertical lists it can be a number or string (e.g. "50%").
|
|
66
66
|
*/
|
|
67
|
-
width
|
|
67
|
+
width?: number | string;
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Size of a single item in the windowed direction.
|
|
71
71
|
* For vertical lists this is the row height; for horizontal lists,
|
|
72
72
|
* the column width.
|
|
73
73
|
*/
|
|
74
|
-
itemSize
|
|
74
|
+
itemSize?: (index: number) => number;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Contextual data passed to the row renderer via the `itemData` prop.
|
|
@@ -112,6 +112,7 @@ export interface IVariableSizedListProps<T, U extends { data: T[] }> {
|
|
|
112
112
|
setCardHeight?: (index: number, size: number) => void;
|
|
113
113
|
handleItemsRendered?: (props: unknown) => void;
|
|
114
114
|
onItemsRendered?: (props: unknown) => void;
|
|
115
|
+
ItemSeparatorComponent?: FunctionComponent<unknown>;
|
|
115
116
|
}
|
|
116
117
|
export type ListScrollEvent = ScrollContainerEvent;
|
|
117
118
|
export type ListRef = {
|