@zezosoft/zezo-ott-react-native-ui-kit 1.1.2 → 1.1.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.
- package/lib/module/components/Auth/QrLogin/QrLogin.js +304 -138
- package/lib/module/components/Auth/QrLogin/QrLogin.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js +193 -141
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js.map +1 -1
- package/lib/module/components/Content/Card/Category/Category.js +83 -11
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js +237 -108
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +185 -126
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +139 -92
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Five.js +131 -48
- package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js +126 -59
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/One.js +125 -50
- package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +138 -53
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Six.js +207 -115
- package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Three.js +134 -79
- package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/TopTen.js +186 -171
- package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Two.js +144 -64
- package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/components/AdsPoster.js +162 -0
- package/lib/module/components/Content/Card/components/AdsPoster.js.map +1 -0
- package/lib/module/components/Content/Card/components/CardPoster.js +120 -136
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/index.js +4 -0
- package/lib/module/components/Content/Card/components/index.js.map +1 -0
- package/lib/module/components/Content/Content.js +67 -27
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/Content/Sections.js +32 -11
- package/lib/module/components/Content/Sections.js.map +1 -1
- package/lib/module/constants/dummySections.js +44 -4
- package/lib/module/constants/dummySections.js.map +1 -1
- package/lib/module/hooks/Images/index.js +5 -0
- package/lib/module/hooks/Images/index.js.map +1 -0
- package/lib/module/hooks/Images/useImageLoader.js +168 -0
- package/lib/module/hooks/Images/useImageLoader.js.map +1 -0
- package/lib/module/hooks/Images/useImageValidation.js +36 -0
- package/lib/module/hooks/Images/useImageValidation.js.map +1 -0
- package/lib/module/hooks/index.js +3 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useAdTracking.js +270 -0
- package/lib/module/hooks/useAdTracking.js.map +1 -0
- package/lib/module/hooks/useCards.js +164 -0
- package/lib/module/hooks/useCards.js.map +1 -0
- package/lib/module/hooks/usePaginatedSection.js +11 -6
- package/lib/module/hooks/usePaginatedSection.js.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts +2 -0
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts +13 -1
- package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts +13 -1
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/One.d.ts +15 -3
- package/lib/typescript/src/components/Content/Card/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts +13 -1
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts +13 -5
- package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts +13 -1
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/AdsPoster.d.ts +26 -0
- package/lib/typescript/src/components/Content/Card/components/AdsPoster.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +3 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/index.d.ts +2 -0
- package/lib/typescript/src/components/Content/Card/components/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/index.d.ts +76 -6
- package/lib/typescript/src/components/Content/Card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Content.d.ts +4 -3
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Sections.d.ts +20 -6
- package/lib/typescript/src/components/Content/Sections.d.ts.map +1 -1
- package/lib/typescript/src/constants/dummySections.d.ts +5 -0
- package/lib/typescript/src/constants/dummySections.d.ts.map +1 -1
- package/lib/typescript/src/hooks/Images/index.d.ts +3 -0
- package/lib/typescript/src/hooks/Images/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/Images/useImageLoader.d.ts +36 -0
- package/lib/typescript/src/hooks/Images/useImageLoader.d.ts.map +1 -0
- package/lib/typescript/src/hooks/Images/useImageValidation.d.ts +17 -0
- package/lib/typescript/src/hooks/Images/useImageValidation.d.ts.map +1 -0
- package/lib/typescript/src/hooks/index.d.ts +3 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useAdTracking.d.ts +39 -0
- package/lib/typescript/src/hooks/useAdTracking.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useCards.d.ts +36 -0
- package/lib/typescript/src/hooks/useCards.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts +12 -2
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts.map +1 -1
- package/lib/typescript/src/types/sections/index.d.ts +7 -4
- package/lib/typescript/src/types/sections/index.d.ts.map +1 -1
- package/package.json +6 -3
- package/src/components/Auth/QrLogin/QrLogin.tsx +382 -122
- package/src/components/Auth/QrLogin/components/QrViewArea.tsx +291 -197
- package/src/components/Content/Card/Category/Category.tsx +95 -8
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +281 -136
- package/src/components/Content/Card/Sliders/Styles/One.tsx +244 -148
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +171 -102
- package/src/components/Content/Card/Styles/Five.tsx +161 -62
- package/src/components/Content/Card/Styles/Four.tsx +164 -85
- package/src/components/Content/Card/Styles/One.tsx +161 -71
- package/src/components/Content/Card/Styles/RotateInOut.tsx +157 -60
- package/src/components/Content/Card/Styles/Six.tsx +242 -142
- package/src/components/Content/Card/Styles/Three.tsx +166 -133
- package/src/components/Content/Card/Styles/TopTen.tsx +230 -191
- package/src/components/Content/Card/Styles/Two.tsx +182 -79
- package/src/components/Content/Card/components/AdsPoster.tsx +202 -0
- package/src/components/Content/Card/components/CardPoster.tsx +134 -154
- package/src/components/Content/Card/components/index.ts +1 -0
- package/src/components/Content/Content.tsx +83 -45
- package/src/components/Content/Sections.tsx +51 -10
- package/src/constants/dummySections.ts +48 -1
- package/src/hooks/Images/index.ts +2 -0
- package/src/hooks/Images/useImageLoader.ts +206 -0
- package/src/hooks/Images/useImageValidation.ts +36 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useAdTracking.ts +349 -0
- package/src/hooks/useCards.ts +228 -0
- package/src/hooks/usePaginatedSection.ts +26 -7
- package/src/types/sections/index.ts +7 -4
|
@@ -12,21 +12,39 @@ import FastImage from 'react-native-fast-image';
|
|
|
12
12
|
import Carousel from 'react-native-snap-carousel';
|
|
13
13
|
import { moderateScale, verticalScale } from 'react-native-size-matters';
|
|
14
14
|
import { debounce } from 'lodash';
|
|
15
|
-
import {
|
|
15
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
16
16
|
import { useInternalTheme } from "../../../../theme/hook/useInternalTheme.js";
|
|
17
17
|
import CardPoster from "../components/CardPoster.js";
|
|
18
18
|
import NavigateToMore from "../components/NavigateToMore.js";
|
|
19
|
-
import {
|
|
19
|
+
import { AdsPoster } from "../components/index.js";
|
|
20
|
+
import { useCards } from "../../../../hooks/index.js";
|
|
21
|
+
|
|
22
|
+
// Constants
|
|
20
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
24
|
const {
|
|
22
25
|
width,
|
|
23
26
|
height
|
|
24
27
|
} = Dimensions.get('window');
|
|
25
|
-
const
|
|
26
|
-
const
|
|
28
|
+
const ITEM_WIDTH_RATIO = 0.42;
|
|
29
|
+
const ITEM_HEIGHT_RATIO = 0.28;
|
|
30
|
+
const DEFAULT_ITEM_WIDTH = width * ITEM_WIDTH_RATIO;
|
|
31
|
+
const DEFAULT_ITEM_HEIGHT = height * ITEM_HEIGHT_RATIO;
|
|
27
32
|
const DEFAULT_BORDER_RADIUS = moderateScale(10);
|
|
33
|
+
const DEFAULT_SKELETON_COUNT = 5;
|
|
34
|
+
const DEBOUNCE_DELAY = 300;
|
|
35
|
+
const ITEM_ACTIVE_OPACITY = 0.8;
|
|
36
|
+
const CAROUSEL_FIRST_ITEM = 1;
|
|
37
|
+
const CAROUSEL_INACTIVE_OPACITY = 0.6;
|
|
38
|
+
const CAROUSEL_INACTIVE_SCALE = 0.9;
|
|
39
|
+
const PAGINATION_TRIGGER_OFFSET = 2;
|
|
40
|
+
const SKELETON_TITLE_WIDTH = moderateScale(100);
|
|
41
|
+
const SKELETON_TITLE_HEIGHT = verticalScale(14);
|
|
42
|
+
const SKELETON_TITLE_BORDER_RADIUS = moderateScale(4);
|
|
43
|
+
const SKELETON_TITLE_MARGIN_LEFT = moderateScale(12);
|
|
44
|
+
const SKELETON_TITLE_MARGIN_BOTTOM = verticalScale(6);
|
|
45
|
+
const SKELETON_ITEM_MARGIN_RIGHT = moderateScale(12);
|
|
28
46
|
|
|
29
|
-
// Static
|
|
47
|
+
// Static Styles
|
|
30
48
|
const staticStyles = StyleSheet.create({
|
|
31
49
|
root: {
|
|
32
50
|
marginVertical: verticalScale(6)
|
|
@@ -42,87 +60,108 @@ const staticStyles = StyleSheet.create({
|
|
|
42
60
|
marginVertical: moderateScale(5)
|
|
43
61
|
}
|
|
44
62
|
});
|
|
63
|
+
|
|
64
|
+
// Types
|
|
65
|
+
|
|
66
|
+
// Main Component
|
|
45
67
|
const MovieCardThree = ({
|
|
46
68
|
title,
|
|
47
69
|
section_id,
|
|
48
70
|
type,
|
|
49
|
-
data:
|
|
71
|
+
data: externalData,
|
|
50
72
|
moreFetchData,
|
|
51
73
|
onPressMore,
|
|
52
74
|
onPressItem,
|
|
53
|
-
renderItemImage,
|
|
54
75
|
itemWidth = DEFAULT_ITEM_WIDTH,
|
|
55
76
|
itemHeight = DEFAULT_ITEM_HEIGHT,
|
|
56
77
|
borderRadius = DEFAULT_BORDER_RADIUS,
|
|
57
|
-
skeletonCount =
|
|
78
|
+
skeletonCount = DEFAULT_SKELETON_COUNT,
|
|
79
|
+
paginationSkeletonCount,
|
|
58
80
|
containerStyle,
|
|
59
81
|
titleStyle,
|
|
60
82
|
itemStyle,
|
|
61
83
|
isLoading = false,
|
|
62
|
-
theme
|
|
84
|
+
theme,
|
|
85
|
+
onDisplayAds,
|
|
86
|
+
screenDimensions,
|
|
87
|
+
viewportOffsets
|
|
63
88
|
}) => {
|
|
89
|
+
// Refs
|
|
90
|
+
const carouselRef = useRef(null);
|
|
91
|
+
|
|
92
|
+
// Theme
|
|
64
93
|
const {
|
|
65
94
|
theme: appliedTheme
|
|
66
95
|
} = useInternalTheme(theme);
|
|
67
|
-
const carouselRef = useRef(null);
|
|
68
96
|
|
|
69
|
-
//
|
|
97
|
+
// Styles
|
|
70
98
|
const styles = useMemo(() => StyleSheet.create({
|
|
71
99
|
item: {
|
|
72
100
|
width: itemWidth,
|
|
73
101
|
height: itemHeight,
|
|
74
102
|
borderRadius,
|
|
75
|
-
overflow: 'hidden'
|
|
76
|
-
elevation: 0,
|
|
77
|
-
shadowColor: 'transparent',
|
|
78
|
-
shadowOffset: {
|
|
79
|
-
width: 0,
|
|
80
|
-
height: 0
|
|
81
|
-
},
|
|
82
|
-
shadowOpacity: 0,
|
|
83
|
-
shadowRadius: 0
|
|
103
|
+
overflow: 'hidden'
|
|
84
104
|
},
|
|
85
105
|
image: {
|
|
86
106
|
width: '100%',
|
|
87
107
|
height: '100%',
|
|
88
|
-
backgroundColor: appliedTheme.colors.
|
|
108
|
+
backgroundColor: appliedTheme.colors.surfaceVariant
|
|
89
109
|
},
|
|
90
110
|
skeleton: {
|
|
91
111
|
width: itemWidth,
|
|
92
112
|
height: itemHeight,
|
|
93
113
|
borderRadius,
|
|
94
|
-
|
|
95
|
-
|
|
114
|
+
marginRight: SKELETON_ITEM_MARGIN_RIGHT,
|
|
115
|
+
overflow: 'hidden'
|
|
96
116
|
}
|
|
97
|
-
}), [appliedTheme
|
|
117
|
+
}), [appliedTheme, itemWidth, itemHeight, borderRadius]);
|
|
118
|
+
|
|
119
|
+
// Data Management
|
|
98
120
|
const {
|
|
99
|
-
|
|
100
|
-
loading: isPaginating,
|
|
121
|
+
listData,
|
|
101
122
|
pagination,
|
|
102
|
-
|
|
103
|
-
|
|
123
|
+
loadMore,
|
|
124
|
+
isEmpty,
|
|
125
|
+
isPaging: isPaginating
|
|
126
|
+
} = useCards({
|
|
127
|
+
sectionId: section_id,
|
|
128
|
+
data: externalData,
|
|
129
|
+
fetchMore: moreFetchData,
|
|
130
|
+
loading: isLoading,
|
|
131
|
+
initialSkeleton: skeletonCount,
|
|
132
|
+
pagingSkeleton: paginationSkeletonCount,
|
|
133
|
+
adsRender: true
|
|
134
|
+
});
|
|
104
135
|
|
|
105
|
-
//
|
|
136
|
+
// Skeleton Data
|
|
106
137
|
const skeletonItems = useMemo(() => {
|
|
107
138
|
const count = isLoading ? skeletonCount : isPaginating ? 1 : 0;
|
|
139
|
+
if (!count) {
|
|
140
|
+
return [];
|
|
141
|
+
}
|
|
108
142
|
return Array.from({
|
|
109
143
|
length: count
|
|
110
|
-
}, (_,
|
|
111
|
-
_id: `skeleton-${
|
|
144
|
+
}, (_, index) => ({
|
|
145
|
+
_id: `skeleton-${index}`,
|
|
112
146
|
isSkeleton: true
|
|
113
147
|
}));
|
|
114
148
|
}, [isLoading, isPaginating, skeletonCount]);
|
|
149
|
+
const finalData = useMemo(() => {
|
|
150
|
+
if (isLoading) {
|
|
151
|
+
return skeletonItems;
|
|
152
|
+
}
|
|
153
|
+
if (!skeletonItems.length) {
|
|
154
|
+
return listData;
|
|
155
|
+
}
|
|
156
|
+
return [...listData, ...skeletonItems];
|
|
157
|
+
}, [listData, isLoading, skeletonItems]);
|
|
115
158
|
|
|
116
|
-
//
|
|
117
|
-
const finalData = useMemo(() => isLoading ? skeletonItems : skeletonItems.length > 0 ? [...data, ...skeletonItems] : data, [isLoading, data, skeletonItems]);
|
|
118
|
-
|
|
119
|
-
// Debounced loadMoreData to prevent excessive calls
|
|
159
|
+
// Debounced Functions
|
|
120
160
|
const debouncedLoadMore = useMemo(() => debounce(nextPage => {
|
|
121
|
-
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}, [onPressItem]);
|
|
161
|
+
loadMore(nextPage);
|
|
162
|
+
}, DEBOUNCE_DELAY), [loadMore]);
|
|
163
|
+
|
|
164
|
+
// Event Handlers
|
|
126
165
|
const handlePressMore = useCallback(() => {
|
|
127
166
|
onPressMore?.({
|
|
128
167
|
section_id,
|
|
@@ -130,57 +169,79 @@ const MovieCardThree = ({
|
|
|
130
169
|
type
|
|
131
170
|
});
|
|
132
171
|
}, [onPressMore, section_id, title, type]);
|
|
172
|
+
const handleSnapToItem = useCallback(index => {
|
|
173
|
+
// Pagination logic
|
|
174
|
+
if (!pagination?.hasNextPage || !pagination?.nextPage) return;
|
|
175
|
+
if (index >= finalData.length - PAGINATION_TRIGGER_OFFSET) {
|
|
176
|
+
debouncedLoadMore(pagination.nextPage);
|
|
177
|
+
}
|
|
178
|
+
}, [finalData, pagination, debouncedLoadMore]);
|
|
179
|
+
|
|
180
|
+
// Render Functions
|
|
133
181
|
const renderItem = useCallback(({
|
|
134
182
|
item,
|
|
135
183
|
index
|
|
136
184
|
}) => {
|
|
137
|
-
|
|
185
|
+
// Handle ads
|
|
186
|
+
if ('type' in item && item.type === 'ads') {
|
|
187
|
+
const adItem = item;
|
|
138
188
|
return /*#__PURE__*/_jsx(View, {
|
|
139
|
-
style: styles.
|
|
140
|
-
children: /*#__PURE__*/_jsx(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
189
|
+
style: [styles.item, itemStyle],
|
|
190
|
+
children: /*#__PURE__*/_jsx(AdsPoster, {
|
|
191
|
+
ad: adItem,
|
|
192
|
+
theme: appliedTheme,
|
|
193
|
+
isLoading: isLoading,
|
|
194
|
+
containerStyle: {
|
|
144
195
|
width: itemWidth,
|
|
145
|
-
height: itemHeight
|
|
146
|
-
|
|
147
|
-
|
|
196
|
+
height: itemHeight
|
|
197
|
+
},
|
|
198
|
+
imageStyle: styles.image,
|
|
199
|
+
borderRadius: borderRadius,
|
|
200
|
+
onDisplayAds: onDisplayAds,
|
|
201
|
+
screenDimensions: screenDimensions,
|
|
202
|
+
viewportOffsets: viewportOffsets
|
|
148
203
|
})
|
|
149
|
-
},
|
|
204
|
+
}, `ad-${adItem.tracking?.impression || index}`);
|
|
150
205
|
}
|
|
206
|
+
// Handle content items
|
|
207
|
+
const contentItem = item;
|
|
208
|
+
const isSkeleton = contentItem._id?.startsWith?.('pagination-skeleton') ?? false;
|
|
151
209
|
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
152
|
-
activeOpacity: 0.8,
|
|
153
210
|
style: [styles.item, itemStyle],
|
|
154
|
-
|
|
155
|
-
onPress: () =>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
211
|
+
activeOpacity: ITEM_ACTIVE_OPACITY,
|
|
212
|
+
onPress: () => {
|
|
213
|
+
if (!isSkeleton && !isLoading) {
|
|
214
|
+
onPressItem?.(contentItem);
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
children: /*#__PURE__*/_jsx(CardPoster, {
|
|
161
218
|
posterUri: item.poster,
|
|
219
|
+
content_offering_type: item.content_offering_type,
|
|
162
220
|
theme: appliedTheme,
|
|
163
221
|
borderRadius: borderRadius,
|
|
164
222
|
posterWrapperStyle: styles.image,
|
|
165
223
|
resizeMode: FastImage.resizeMode.cover,
|
|
166
|
-
isLoading: isLoading
|
|
224
|
+
isLoading: isSkeleton || isLoading
|
|
167
225
|
})
|
|
168
|
-
}
|
|
169
|
-
}, [
|
|
170
|
-
|
|
171
|
-
|
|
226
|
+
});
|
|
227
|
+
}, [appliedTheme, styles, itemStyle, itemWidth, itemHeight, borderRadius, isLoading, onPressItem, onDisplayAds, screenDimensions, viewportOffsets]);
|
|
228
|
+
|
|
229
|
+
// Early Returns
|
|
230
|
+
if (!externalData) return null;
|
|
231
|
+
if (!isLoading && listData.length === 0 && !isEmpty) return null;
|
|
232
|
+
|
|
233
|
+
// Main Render
|
|
172
234
|
return /*#__PURE__*/_jsxs(View, {
|
|
173
235
|
style: [staticStyles.root, containerStyle],
|
|
174
|
-
testID: `movie-card-${section_id}`,
|
|
175
236
|
children: [isLoading ? /*#__PURE__*/_jsx(SkeletonPlaceholder, {
|
|
176
237
|
highlightColor: appliedTheme.colors.skeletonHighlightColor,
|
|
177
238
|
backgroundColor: appliedTheme.colors.skeletonBaseColor,
|
|
178
239
|
children: /*#__PURE__*/_jsx(SkeletonPlaceholder.Item, {
|
|
179
|
-
width:
|
|
180
|
-
height:
|
|
181
|
-
borderRadius:
|
|
182
|
-
marginLeft:
|
|
183
|
-
marginBottom:
|
|
240
|
+
width: SKELETON_TITLE_WIDTH,
|
|
241
|
+
height: SKELETON_TITLE_HEIGHT,
|
|
242
|
+
borderRadius: SKELETON_TITLE_BORDER_RADIUS,
|
|
243
|
+
marginLeft: SKELETON_TITLE_MARGIN_LEFT,
|
|
244
|
+
marginBottom: SKELETON_TITLE_MARGIN_BOTTOM
|
|
184
245
|
})
|
|
185
246
|
}) : /*#__PURE__*/_jsx(NavigateToMore, {
|
|
186
247
|
title: title,
|
|
@@ -196,19 +257,13 @@ const MovieCardThree = ({
|
|
|
196
257
|
}), /*#__PURE__*/_jsx(Carousel, {
|
|
197
258
|
ref: carouselRef,
|
|
198
259
|
data: finalData,
|
|
199
|
-
vertical: false,
|
|
200
260
|
renderItem: renderItem,
|
|
201
|
-
firstItem:
|
|
202
|
-
inactiveSlideOpacity: 0.6,
|
|
203
|
-
inactiveSlideScale: 0.9,
|
|
261
|
+
firstItem: CAROUSEL_FIRST_ITEM,
|
|
204
262
|
sliderWidth: width,
|
|
205
263
|
itemWidth: itemWidth,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
debouncedLoadMore(pagination.nextPage);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
264
|
+
inactiveSlideOpacity: CAROUSEL_INACTIVE_OPACITY,
|
|
265
|
+
inactiveSlideScale: CAROUSEL_INACTIVE_SCALE,
|
|
266
|
+
onSnapToItem: handleSnapToItem
|
|
212
267
|
})]
|
|
213
268
|
});
|
|
214
269
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","useCallback","useMemo","useRef","View","StyleSheet","Dimensions","TouchableOpacity","SkeletonPlaceholder","FastImage","Carousel","moderateScale","verticalScale","debounce","
|
|
1
|
+
{"version":3,"names":["React","memo","useCallback","useMemo","useRef","View","StyleSheet","Dimensions","TouchableOpacity","SkeletonPlaceholder","FastImage","Carousel","moderateScale","verticalScale","debounce","RFValue","useInternalTheme","CardPoster","NavigateToMore","AdsPoster","useCards","jsx","_jsx","jsxs","_jsxs","width","height","get","ITEM_WIDTH_RATIO","ITEM_HEIGHT_RATIO","DEFAULT_ITEM_WIDTH","DEFAULT_ITEM_HEIGHT","DEFAULT_BORDER_RADIUS","DEFAULT_SKELETON_COUNT","DEBOUNCE_DELAY","ITEM_ACTIVE_OPACITY","CAROUSEL_FIRST_ITEM","CAROUSEL_INACTIVE_OPACITY","CAROUSEL_INACTIVE_SCALE","PAGINATION_TRIGGER_OFFSET","SKELETON_TITLE_WIDTH","SKELETON_TITLE_HEIGHT","SKELETON_TITLE_BORDER_RADIUS","SKELETON_TITLE_MARGIN_LEFT","SKELETON_TITLE_MARGIN_BOTTOM","SKELETON_ITEM_MARGIN_RIGHT","staticStyles","create","root","marginVertical","navigateToMoreContainer","paddingHorizontal","marginBottom","title","fontSize","fontWeight","marginHorizontal","MovieCardThree","section_id","type","data","externalData","moreFetchData","onPressMore","onPressItem","itemWidth","itemHeight","borderRadius","skeletonCount","paginationSkeletonCount","containerStyle","titleStyle","itemStyle","isLoading","theme","onDisplayAds","screenDimensions","viewportOffsets","carouselRef","appliedTheme","styles","item","overflow","image","backgroundColor","colors","surfaceVariant","skeleton","marginRight","listData","pagination","loadMore","isEmpty","isPaging","isPaginating","sectionId","fetchMore","loading","initialSkeleton","pagingSkeleton","adsRender","skeletonItems","count","Array","from","length","_","index","_id","isSkeleton","finalData","debouncedLoadMore","nextPage","handlePressMore","name","handleSnapToItem","hasNextPage","renderItem","adItem","style","children","ad","imageStyle","tracking","impression","contentItem","startsWith","activeOpacity","onPress","posterUri","poster","content_offering_type","posterWrapperStyle","resizeMode","cover","highlightColor","skeletonHighlightColor","skeletonBaseColor","Item","marginLeft","color","textPrimary","showAllProps","iconColor","ref","firstItem","sliderWidth","inactiveSlideOpacity","inactiveSlideScale","onSnapToItem"],"sourceRoot":"../../../../../../src","sources":["components/Content/Card/Styles/Three.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACjE,SACEC,IAAI,EACJC,UAAU,EAIVC,UAAU,EACVC,gBAAgB,QACX,cAAc;AAErB,OAAOC,mBAAmB,MAAM,mCAAmC;AACnE,OAAOC,SAAS,MAAM,yBAAyB;AAC/C,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,SAASC,aAAa,EAAEC,aAAa,QAAQ,2BAA2B;AACxE,SAASC,QAAQ,QAAQ,QAAQ;AACjC,SAASC,OAAO,QAAQ,kCAAkC;AAE1D,SAASC,gBAAgB,QAAQ,4CAAyC;AAE1E,OAAOC,UAAU,MAAM,6BAA0B;AACjD,OAAOC,cAAc,MAAM,iCAA8B;AACzD,SAASC,SAAS,QAAQ,wBAAe;AAUzC,SAASC,QAAQ,QAAQ,4BAAmB;;AAE5C;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAM;EAAEC,KAAK;EAAEC;AAAO,CAAC,GAAGnB,UAAU,CAACoB,GAAG,CAAC,QAAQ,CAAC;AAClD,MAAMC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