@zezosoft/zezo-ott-react-native-ui-kit 1.0.8 → 1.0.9
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/README.md +1 -1
- package/lib/module/components/Account/Account.js +1 -1
- package/lib/module/components/Account/Account.js.map +1 -1
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js +48 -19
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +4 -2
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
- package/lib/module/components/Auth/OTP/OTP.js +15 -1
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +4 -2
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
- package/lib/module/components/BlurView/BlurView.js +171 -0
- package/lib/module/components/BlurView/BlurView.js.map +1 -0
- package/lib/module/components/BlurView/index.js +9 -0
- package/lib/module/components/BlurView/index.js.map +1 -0
- package/lib/module/components/Content/Card/Styles/Four.js +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Content.js +4 -2
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +4 -2
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/components/MiniInfo.js +64 -19
- package/lib/module/components/ContentView/components/MiniInfo.js.map +1 -1
- package/lib/module/components/Settings/AppSettings.js +1 -1
- package/lib/module/components/Settings/AppSettings.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +340 -13
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/TabBar/One.js +71 -108
- package/lib/module/components/TabBar/One.js.map +1 -1
- package/lib/module/components/TabBar/Three.js +63 -78
- package/lib/module/components/TabBar/Three.js.map +1 -1
- package/lib/module/components/TabBar/Two.js +110 -106
- package/lib/module/components/TabBar/Two.js.map +1 -1
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js +324 -0
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js.map +1 -0
- package/lib/module/components/User/index.js +2 -1
- package/lib/module/components/User/index.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/hooks/useNavigationMode.js +34 -0
- package/lib/module/hooks/useNavigationMode.js.map +1 -0
- package/lib/module/utils/Spacing.js +26 -0
- package/lib/module/utils/Spacing.js.map +1 -0
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts +1 -0
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts +2 -0
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/index.d.ts +2 -0
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BlurView/BlurView.d.ts +48 -0
- package/lib/typescript/src/components/BlurView/BlurView.d.ts.map +1 -0
- package/lib/typescript/src/components/BlurView/index.d.ts +7 -0
- package/lib/typescript/src/components/BlurView/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts +17 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts +6 -0
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/One.d.ts +2 -2
- package/lib/typescript/src/components/TabBar/One.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/Three.d.ts +3 -2
- package/lib/typescript/src/components/TabBar/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/Two.d.ts +13 -4
- package/lib/typescript/src/components/TabBar/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/index.d.ts +1 -1
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts +50 -0
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts.map +1 -0
- package/lib/typescript/src/components/User/index.d.ts +2 -1
- package/lib/typescript/src/components/User/index.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useNavigationMode.d.ts +14 -0
- package/lib/typescript/src/hooks/useNavigationMode.d.ts.map +1 -0
- package/lib/typescript/src/types/content/content-view.types.d.ts +2 -0
- package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
- package/lib/typescript/src/utils/Spacing.d.ts +16 -0
- package/lib/typescript/src/utils/Spacing.d.ts.map +1 -0
- package/package.json +9 -5
- package/src/components/Account/Account.tsx +1 -1
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +82 -37
- package/src/components/Auth/Login/LoginWithEmail.tsx +9 -2
- package/src/components/Auth/OTP/OTP.tsx +37 -1
- package/src/components/Auth/SignUp/SignUp.tsx +9 -2
- package/src/components/BlurView/BlurView.tsx +199 -0
- package/src/components/BlurView/index.ts +7 -0
- package/src/components/Content/Card/Styles/Four.tsx +3 -1
- package/src/components/Content/Content.tsx +5 -4
- package/src/components/ContentView/ContentView.tsx +8 -1
- package/src/components/ContentView/components/MiniInfo.tsx +99 -22
- package/src/components/Settings/AppSettings.tsx +1 -1
- package/src/components/Subscription/SubOne.tsx +422 -11
- package/src/components/TabBar/One.tsx +79 -141
- package/src/components/TabBar/Three.tsx +84 -99
- package/src/components/TabBar/Two.tsx +139 -110
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +439 -0
- package/src/components/User/index.ts +8 -1
- package/src/components/index.ts +1 -0
- package/src/hooks/useNavigationMode.ts +35 -0
- package/src/types/content/content-view.types.ts +5 -0
- package/src/utils/Spacing.ts +27 -0
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Tue 11 Nov 2025 at 09:23 PM
|
|
4
|
+
*/
|
|
5
|
+
|
|
1
6
|
import React from 'react';
|
|
2
7
|
import {
|
|
3
8
|
View,
|
|
@@ -18,6 +23,20 @@ type Props = {
|
|
|
18
23
|
content?: IContentData;
|
|
19
24
|
theme?: ThemeOverride;
|
|
20
25
|
isLoading?: boolean;
|
|
26
|
+
visible?: boolean;
|
|
27
|
+
userData?: {
|
|
28
|
+
is_buy_or_rent?: 'BUY' | 'RENT';
|
|
29
|
+
rent_expiry_date?: any;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
labels?: {
|
|
33
|
+
purchased?: string;
|
|
34
|
+
rented?: string;
|
|
35
|
+
buyOrRent?: string;
|
|
36
|
+
rentedExpiryPrefix?: string;
|
|
37
|
+
purchasedMsg?: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
21
40
|
style?: {
|
|
22
41
|
container?: StyleProp<ViewStyle>;
|
|
23
42
|
row?: StyleProp<ViewStyle>;
|
|
@@ -44,13 +63,23 @@ export function formatCurrency(
|
|
|
44
63
|
export const MiniInfo = ({
|
|
45
64
|
content,
|
|
46
65
|
theme,
|
|
66
|
+
userData,
|
|
47
67
|
isLoading = false,
|
|
48
68
|
style,
|
|
69
|
+
labels,
|
|
70
|
+
visible = true,
|
|
49
71
|
}: Props): React.ReactElement | null => {
|
|
50
72
|
const { theme: appliedTheme } = useInternalTheme(theme);
|
|
73
|
+
if (!visible) return null;
|
|
74
|
+
const textLabels = {
|
|
75
|
+
purchased: labels?.purchased || 'Purchased',
|
|
76
|
+
rented: labels?.rented || 'Rented',
|
|
77
|
+
buyOrRent: labels?.buyOrRent || 'Buy or Rent',
|
|
78
|
+
rentedExpiryPrefix: labels?.rentedExpiryPrefix || '',
|
|
79
|
+
purchasedMsg: labels?.purchasedMsg || 'You purchased this content',
|
|
80
|
+
};
|
|
51
81
|
|
|
52
82
|
if (isLoading) {
|
|
53
|
-
// Skeleton Placeholder
|
|
54
83
|
return (
|
|
55
84
|
<View
|
|
56
85
|
style={[
|
|
@@ -83,12 +112,14 @@ export const MiniInfo = ({
|
|
|
83
112
|
marginLeft={scale(8)}
|
|
84
113
|
/>
|
|
85
114
|
</SkeletonPlaceholder.Item>
|
|
115
|
+
|
|
86
116
|
<SkeletonPlaceholder.Item
|
|
87
117
|
width={scale(120)}
|
|
88
118
|
height={scale(16)}
|
|
89
119
|
borderRadius={scale(4)}
|
|
90
120
|
marginBottom={scale(4)}
|
|
91
121
|
/>
|
|
122
|
+
|
|
92
123
|
<SkeletonPlaceholder.Item
|
|
93
124
|
width={scale(80)}
|
|
94
125
|
height={scale(14)}
|
|
@@ -106,29 +137,39 @@ export const MiniInfo = ({
|
|
|
106
137
|
|
|
107
138
|
if (content_offering_type !== 'BUY_OR_RENT') return null;
|
|
108
139
|
|
|
109
|
-
const renderBadge = () =>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
const renderBadge = () => {
|
|
141
|
+
let text = textLabels.buyOrRent;
|
|
142
|
+
|
|
143
|
+
if (userData?.is_buy_or_rent === 'BUY') {
|
|
144
|
+
text = textLabels.purchased;
|
|
145
|
+
} else if (userData?.is_buy_or_rent === 'RENT') {
|
|
146
|
+
text = textLabels.rented;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<View
|
|
151
|
+
style={[
|
|
152
|
+
styles.badge,
|
|
153
|
+
{
|
|
154
|
+
backgroundColor: appliedTheme.colors.primary,
|
|
155
|
+
shadowColor: appliedTheme.colors.textPrimary,
|
|
156
|
+
},
|
|
157
|
+
style?.badge,
|
|
158
|
+
]}
|
|
124
159
|
>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
160
|
+
<Text
|
|
161
|
+
type="caption"
|
|
162
|
+
style={{ color: appliedTheme.colors.onPrimary, fontWeight: '600' }}
|
|
163
|
+
>
|
|
164
|
+
{text}
|
|
165
|
+
</Text>
|
|
166
|
+
</View>
|
|
167
|
+
);
|
|
168
|
+
};
|
|
129
169
|
|
|
130
170
|
const renderPriceInfo = () => {
|
|
131
171
|
if (!price) return null;
|
|
172
|
+
|
|
132
173
|
const text =
|
|
133
174
|
is_buy_or_rent === 'BUY'
|
|
134
175
|
? `Price: ${formatCurrency(price)}`
|
|
@@ -142,13 +183,46 @@ export const MiniInfo = ({
|
|
|
142
183
|
{ color: appliedTheme.colors.textPrimary },
|
|
143
184
|
style?.price,
|
|
144
185
|
]}
|
|
145
|
-
theme={theme}
|
|
146
186
|
>
|
|
147
187
|
{text}
|
|
148
188
|
</Text>
|
|
149
189
|
);
|
|
150
190
|
};
|
|
151
191
|
|
|
192
|
+
const renderUserExpiry = () => {
|
|
193
|
+
if (!userData?.is_buy_or_rent) return null;
|
|
194
|
+
|
|
195
|
+
if (userData.is_buy_or_rent === 'BUY') {
|
|
196
|
+
return (
|
|
197
|
+
<Text
|
|
198
|
+
type="caption"
|
|
199
|
+
style={{
|
|
200
|
+
color: appliedTheme.colors.textSecondary,
|
|
201
|
+
marginTop: scale(4),
|
|
202
|
+
}}
|
|
203
|
+
>
|
|
204
|
+
{textLabels.purchasedMsg}
|
|
205
|
+
</Text>
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if (userData.is_buy_or_rent === 'RENT') {
|
|
210
|
+
return (
|
|
211
|
+
<Text
|
|
212
|
+
type="caption"
|
|
213
|
+
style={{
|
|
214
|
+
color: appliedTheme.colors.textSecondary,
|
|
215
|
+
marginTop: scale(4),
|
|
216
|
+
}}
|
|
217
|
+
>
|
|
218
|
+
{textLabels.rentedExpiryPrefix} {userData?.rent_expiry_date}
|
|
219
|
+
</Text>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return null;
|
|
224
|
+
};
|
|
225
|
+
|
|
152
226
|
return (
|
|
153
227
|
<View
|
|
154
228
|
style={[
|
|
@@ -161,7 +235,10 @@ export const MiniInfo = ({
|
|
|
161
235
|
]}
|
|
162
236
|
>
|
|
163
237
|
<View style={styles.headerRow}>{renderBadge()}</View>
|
|
164
|
-
|
|
238
|
+
|
|
239
|
+
{!userData?.is_buy_or_rent && renderPriceInfo()}
|
|
240
|
+
|
|
241
|
+
{renderUserExpiry()}
|
|
165
242
|
</View>
|
|
166
243
|
);
|
|
167
244
|
};
|
|
@@ -248,7 +248,7 @@ export const AppSettings: FC<AppSettingsProps> = ({
|
|
|
248
248
|
<ScrollView
|
|
249
249
|
contentContainerStyle={[
|
|
250
250
|
styles.scrollContent,
|
|
251
|
-
{ paddingBottom: verticalScale(
|
|
251
|
+
{ paddingBottom: verticalScale(100) + insets.bottom },
|
|
252
252
|
]}
|
|
253
253
|
showsVerticalScrollIndicator={false}
|
|
254
254
|
keyboardShouldPersistTaps="handled"
|