@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Wed 26 Nov 2025 at 02:19 PM
|
|
4
|
+
*/
|
|
5
|
+
import FastImage from 'react-native-fast-image';
|
|
6
|
+
export type UseImageLoaderOptions = {
|
|
7
|
+
imageUri: string;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
enablePreload?: boolean;
|
|
10
|
+
onError?: () => void;
|
|
11
|
+
onLoad?: () => void;
|
|
12
|
+
onLoadStart?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export type UseImageLoaderReturn = {
|
|
15
|
+
imageLoading: boolean;
|
|
16
|
+
imageError: boolean;
|
|
17
|
+
hasValidImage: boolean;
|
|
18
|
+
isImageCached: boolean;
|
|
19
|
+
showSkeleton: boolean;
|
|
20
|
+
showFallback: boolean;
|
|
21
|
+
imageSource: {
|
|
22
|
+
uri: string;
|
|
23
|
+
cache?: typeof FastImage.cacheControl.immutable;
|
|
24
|
+
priority?: typeof FastImage.priority.normal;
|
|
25
|
+
};
|
|
26
|
+
handleLoad: () => void;
|
|
27
|
+
handleError: () => void;
|
|
28
|
+
handleLoadStart?: () => void;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Custom hook to manage image loading state, caching, and validation
|
|
32
|
+
* @param options - Configuration options for image loading
|
|
33
|
+
* @returns Object containing image state and handlers
|
|
34
|
+
*/
|
|
35
|
+
export declare const useImageLoader: ({ imageUri, isLoading, enablePreload, onError, onLoad, onLoadStart, }: UseImageLoaderOptions) => UseImageLoaderReturn;
|
|
36
|
+
//# sourceMappingURL=useImageLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useImageLoader.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/Images/useImageLoader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAMhD,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE;QACX,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,OAAO,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC;QAChD,QAAQ,CAAC,EAAE,OAAO,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC;KAC7C,CAAC;IACF,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,uEAO5B,qBAAqB,KAAG,oBA2J1B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Wed 26 Nov 2025 at 02:19 PM
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Utility function to check if URL is a local file path
|
|
7
|
+
* @param url - The URL to check
|
|
8
|
+
* @returns true if the URL is a local file path, false otherwise
|
|
9
|
+
*/
|
|
10
|
+
export declare const isLocalFile: (url: string) => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Utility function to validate image URL (supports both cloud URIs and local file paths)
|
|
13
|
+
* @param url - The URL to validate
|
|
14
|
+
* @returns true if the URL is a valid image URL, false otherwise
|
|
15
|
+
*/
|
|
16
|
+
export declare const isValidImageUrl: (url: string | null | undefined) => boolean;
|
|
17
|
+
//# sourceMappingURL=useImageValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useImageValidation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/Images/useImageValidation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,OAEzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,OAchE,CAAC"}
|
|
@@ -11,4 +11,7 @@ export * from './usePrevious';
|
|
|
11
11
|
export * from './useSafeCallback';
|
|
12
12
|
export * from './useSkeletonItems';
|
|
13
13
|
export * from './useThemeColors';
|
|
14
|
+
export * from './useCards';
|
|
15
|
+
export * from './Images';
|
|
16
|
+
export * from './useAdTracking';
|
|
14
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type View } from 'react-native';
|
|
2
|
+
import type { IServeAd } from '@zezosoft/zezo-ott-api-client';
|
|
3
|
+
export interface ViewportOffsets {
|
|
4
|
+
top: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
left: number;
|
|
7
|
+
right: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ScreenDimensions {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
export interface UseAdTrackingOptions {
|
|
14
|
+
ad: IServeAd;
|
|
15
|
+
onDisplayAds?: (ad: IServeAd) => void;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
screenDimensions?: ScreenDimensions;
|
|
18
|
+
viewportOffsets?: ViewportOffsets;
|
|
19
|
+
}
|
|
20
|
+
export interface UseAdTrackingReturn {
|
|
21
|
+
viewRef: React.RefObject<View | null>;
|
|
22
|
+
layoutRef: React.MutableRefObject<{
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
} | null>;
|
|
28
|
+
hasDisplayed: React.MutableRefObject<boolean>;
|
|
29
|
+
adUniqueId: string;
|
|
30
|
+
handleLayout: () => void;
|
|
31
|
+
}
|
|
32
|
+
export declare const extractToken: (trackingUrl?: string) => string;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a unique ID for an ad to prevent duplicate tracking
|
|
35
|
+
* Priority: _id > token > mediaUrl > fallback
|
|
36
|
+
*/
|
|
37
|
+
export declare const createAdUniqueId: (ad: IServeAd) => string;
|
|
38
|
+
export declare const useAdTracking: (options: UseAdTrackingOptions) => UseAdTrackingReturn;
|
|
39
|
+
//# sourceMappingURL=useAdTracking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAdTracking.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAdTracking.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAK9D,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,QAAQ,CAAC;IACb,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACtC,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC;QAChC,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,IAAI,CAAC,CAAC;IACV,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAOD,eAAO,MAAM,YAAY,GAAI,cAAc,MAAM,KAAG,MASnD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,IAAI,QAAQ,KAAG,MA0B/C,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,SAAS,oBAAoB,KAC5B,mBAkQF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global Card Hook (No duplicates + single data key)
|
|
3
|
+
*
|
|
4
|
+
* Provides a unified interface for managing card data with:
|
|
5
|
+
* - Automatic deduplication
|
|
6
|
+
* - Skeleton loading states
|
|
7
|
+
* - Pagination support
|
|
8
|
+
* - Optimized performance
|
|
9
|
+
*/
|
|
10
|
+
import type { IContentData } from '@zezosoft/zezo-ott-api-client';
|
|
11
|
+
import type { IAdItem, MoreFetchData } from '../types';
|
|
12
|
+
export type CardSource = {
|
|
13
|
+
data: (IContentData | IAdItem)[];
|
|
14
|
+
} | (IContentData | IAdItem)[] | null;
|
|
15
|
+
export type UseCardsOptions = {
|
|
16
|
+
sectionId: string;
|
|
17
|
+
data?: CardSource;
|
|
18
|
+
fetchMore?: MoreFetchData<IContentData>;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
initialSkeleton?: number;
|
|
21
|
+
pagingSkeleton?: number;
|
|
22
|
+
adsRender?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type UseCardsReturn = {
|
|
25
|
+
listData: (IContentData | IAdItem)[];
|
|
26
|
+
pagination: {
|
|
27
|
+
hasNextPage: boolean;
|
|
28
|
+
nextPage: number | null;
|
|
29
|
+
} | null;
|
|
30
|
+
isPaging: boolean;
|
|
31
|
+
hasMore: boolean;
|
|
32
|
+
loadMore: (page: number | null) => Promise<void>;
|
|
33
|
+
isEmpty: boolean;
|
|
34
|
+
};
|
|
35
|
+
export declare function useCards({ sectionId, data, fetchMore, loading, initialSkeleton, pagingSkeleton, adsRender, }: UseCardsOptions): UseCardsReturn;
|
|
36
|
+
//# sourceMappingURL=useCards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCards.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCards.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGvD,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,CAAC,YAAY,GAAG,OAAO,CAAC,EAAE,CAAA;CAAE,GACpC,CAAC,YAAY,GAAG,OAAO,CAAC,EAAE,GAC1B,IAAI,CAAC;AAET,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,YAAY,GAAG,OAAO,CAAC,EAAE,CAAC;IACrC,UAAU,EAAE;QACV,WAAW,EAAE,OAAO,CAAC;QACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,GAAG,IAAI,CAAC;IACT,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAsFF,wBAAgB,QAAQ,CAAC,EACvB,SAAS,EACT,IAAI,EACJ,SAAS,EACT,OAAe,EACf,eAA0C,EAC1C,cAAwC,EACxC,SAAiB,GAClB,EAAE,eAAe,GAAG,cAAc,CA4FlC"}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ISectionMeta } from '../types';
|
|
2
|
+
export type MoreFetchData<T> = ({ sectionId, meta, }: {
|
|
3
|
+
sectionId: string;
|
|
4
|
+
meta: {
|
|
5
|
+
hasNextPage: boolean;
|
|
6
|
+
nextPage: number;
|
|
7
|
+
};
|
|
8
|
+
}) => Promise<{
|
|
9
|
+
data: T[];
|
|
10
|
+
meta: ISectionMeta;
|
|
11
|
+
} | null>;
|
|
2
12
|
export declare function usePaginatedSection<T>(sectionId: string, fetchFn?: MoreFetchData<T>, initialData?: T[], isLoading?: boolean): {
|
|
3
13
|
data: T[];
|
|
4
14
|
pagination: {
|
|
5
15
|
hasNextPage: boolean;
|
|
6
16
|
nextPage: number | null;
|
|
7
17
|
};
|
|
8
|
-
|
|
18
|
+
isPaginating: boolean;
|
|
9
19
|
hasMore: boolean;
|
|
10
20
|
loadMoreData: (page: number | null) => Promise<void>;
|
|
11
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePaginatedSection.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePaginatedSection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"usePaginatedSection.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePaginatedSection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,EAC9B,SAAS,EACT,IAAI,GACL,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE;QACJ,WAAW,EAAE,OAAO,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,KAAK,OAAO,CAAC;IACZ,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,IAAI,EAAE,YAAY,CAAC;CACpB,GAAG,IAAI,CAAC,CAAC;AAEV,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,WAAW,GAAE,CAAC,EAAO,EACrB,SAAS,CAAC,EAAE,OAAO;;;qBAIJ,OAAO;kBACV,MAAM,GAAG,IAAI;;;;yBAeV,MAAM,GAAG,IAAI;EAuD7B"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified
|
|
3
|
+
* @lastModified Wed 24 Dec 2025 at 12:09 PM
|
|
4
4
|
*/
|
|
5
|
-
import type { IContentData } from '@zezosoft/zezo-ott-api-client';
|
|
6
|
-
export type
|
|
5
|
+
import type { IContentData, IServeAd } from '@zezosoft/zezo-ott-api-client';
|
|
6
|
+
export type IAdItem = IServeAd & {
|
|
7
|
+
type: 'ads';
|
|
8
|
+
};
|
|
9
|
+
export type ISectionType = 'normal' | 'card_style_2' | 'card_style_3' | 'card_style_4' | 'card_style_5' | 'card_style_6' | 'card_rotate_in_out' | 'slider' | 'slider_style_2' | 'slider_style_3' | 'card_series_featured_style_1' | 'continue_watching' | 'new_releases' | 'top_10' | 'category';
|
|
7
10
|
/**
|
|
8
11
|
* Generic pagination metadata
|
|
9
12
|
*/
|
|
@@ -32,7 +35,7 @@ export interface IGetSectionData {
|
|
|
32
35
|
};
|
|
33
36
|
genre?: string;
|
|
34
37
|
content: {
|
|
35
|
-
data: IContentData[];
|
|
38
|
+
data: (IContentData | IAdItem)[];
|
|
36
39
|
meta: {
|
|
37
40
|
pagination: ISectionPagination;
|
|
38
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/sections/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/sections/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC5E,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG;IAC/B,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AACF,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,cAAc,GACd,cAAc,GACd,cAAc,GACd,cAAc,GACd,cAAc,GACd,oBAAoB,GACpB,QAAQ,GACR,gBAAgB,GAChB,gBAAgB,GAChB,8BAA8B,GAC9B,mBAAmB,GACnB,cAAc,GACd,QAAQ,GACR,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE;QACP,IAAI,EAAE,CAAC,YAAY,GAAG,OAAO,CAAC,EAAE,CAAC;QACjC,IAAI,EAAE;YACJ,UAAU,EAAE,kBAAkB,CAAC;SAChC,CAAC;KACH,CAAC;IACF,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,IAAI,EAAE;QACJ,UAAU,EAAE,kBAAkB,CAAC;KAChC,CAAC;IACF,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;AAC3C,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zezosoft/zezo-ott-react-native-ui-kit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "A professional React Native UI component library built for OTT applications.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "lib/typescript/src/index.d.ts",
|
|
@@ -40,7 +40,9 @@
|
|
|
40
40
|
"format": "prettier --write \"**/*.{js,ts,tsx,json,css,md}\"",
|
|
41
41
|
"clean": "del-cli lib",
|
|
42
42
|
"prepare": "bob build",
|
|
43
|
-
"
|
|
43
|
+
"build": "bob build",
|
|
44
|
+
"release": "release-it --only-version",
|
|
45
|
+
"watch": "nodemon --watch src --ext ts,tsx,js --delay 500ms --exec \"yarn clean && yarn build && yalc push\""
|
|
44
46
|
},
|
|
45
47
|
"keywords": [
|
|
46
48
|
"react-native",
|
|
@@ -86,6 +88,7 @@
|
|
|
86
88
|
"jest": "^29.7.0",
|
|
87
89
|
"lottie-react-native": "^7.3.4",
|
|
88
90
|
"moment": "^2.30.1",
|
|
91
|
+
"nodemon": "^3.1.11",
|
|
89
92
|
"prettier": "^3.0.3",
|
|
90
93
|
"react": "19.0.0",
|
|
91
94
|
"react-native": "0.79.6",
|
|
@@ -136,7 +139,7 @@
|
|
|
136
139
|
"react-native-worklets": "*"
|
|
137
140
|
},
|
|
138
141
|
"dependencies": {
|
|
139
|
-
"@zezosoft/zezo-ott-api-client": "^0.1.
|
|
142
|
+
"@zezosoft/zezo-ott-api-client": "^0.1.18",
|
|
140
143
|
"color": "^5.0.0",
|
|
141
144
|
"crypto-js": "^4.2.0",
|
|
142
145
|
"example": "^0.0.0",
|