@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.
Files changed (106) hide show
  1. package/README.md +1 -1
  2. package/lib/module/components/Account/Account.js +1 -1
  3. package/lib/module/components/Account/Account.js.map +1 -1
  4. package/lib/module/components/Auth/AuthProvider/AuthProvider.js +48 -19
  5. package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -1
  6. package/lib/module/components/Auth/Login/LoginWithEmail.js +4 -2
  7. package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
  8. package/lib/module/components/Auth/OTP/OTP.js +15 -1
  9. package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
  10. package/lib/module/components/Auth/SignUp/SignUp.js +4 -2
  11. package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
  12. package/lib/module/components/BlurView/BlurView.js +171 -0
  13. package/lib/module/components/BlurView/BlurView.js.map +1 -0
  14. package/lib/module/components/BlurView/index.js +9 -0
  15. package/lib/module/components/BlurView/index.js.map +1 -0
  16. package/lib/module/components/Content/Card/Styles/Four.js +1 -1
  17. package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
  18. package/lib/module/components/Content/Content.js +4 -2
  19. package/lib/module/components/Content/Content.js.map +1 -1
  20. package/lib/module/components/ContentView/ContentView.js +4 -2
  21. package/lib/module/components/ContentView/ContentView.js.map +1 -1
  22. package/lib/module/components/ContentView/components/MiniInfo.js +64 -19
  23. package/lib/module/components/ContentView/components/MiniInfo.js.map +1 -1
  24. package/lib/module/components/Settings/AppSettings.js +1 -1
  25. package/lib/module/components/Settings/AppSettings.js.map +1 -1
  26. package/lib/module/components/Subscription/SubOne.js +340 -13
  27. package/lib/module/components/Subscription/SubOne.js.map +1 -1
  28. package/lib/module/components/TabBar/One.js +71 -108
  29. package/lib/module/components/TabBar/One.js.map +1 -1
  30. package/lib/module/components/TabBar/Three.js +63 -78
  31. package/lib/module/components/TabBar/Three.js.map +1 -1
  32. package/lib/module/components/TabBar/Two.js +110 -106
  33. package/lib/module/components/TabBar/Two.js.map +1 -1
  34. package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js +324 -0
  35. package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js.map +1 -0
  36. package/lib/module/components/User/index.js +2 -1
  37. package/lib/module/components/User/index.js.map +1 -1
  38. package/lib/module/components/index.js +1 -0
  39. package/lib/module/components/index.js.map +1 -1
  40. package/lib/module/hooks/useNavigationMode.js +34 -0
  41. package/lib/module/hooks/useNavigationMode.js.map +1 -0
  42. package/lib/module/utils/Spacing.js +26 -0
  43. package/lib/module/utils/Spacing.js.map +1 -0
  44. package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts +1 -0
  45. package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -1
  46. package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
  47. package/lib/typescript/src/components/Auth/OTP/OTP.d.ts +2 -0
  48. package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
  49. package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
  50. package/lib/typescript/src/components/Auth/index.d.ts +2 -0
  51. package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
  52. package/lib/typescript/src/components/BlurView/BlurView.d.ts +48 -0
  53. package/lib/typescript/src/components/BlurView/BlurView.d.ts.map +1 -0
  54. package/lib/typescript/src/components/BlurView/index.d.ts +7 -0
  55. package/lib/typescript/src/components/BlurView/index.d.ts.map +1 -0
  56. package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
  57. package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
  58. package/lib/typescript/src/components/ContentView/ContentView.d.ts +1 -1
  59. package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +1 -1
  60. package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts +17 -1
  61. package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts.map +1 -1
  62. package/lib/typescript/src/components/Subscription/SubOne.d.ts +6 -0
  63. package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
  64. package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
  65. package/lib/typescript/src/components/TabBar/One.d.ts +2 -2
  66. package/lib/typescript/src/components/TabBar/One.d.ts.map +1 -1
  67. package/lib/typescript/src/components/TabBar/Three.d.ts +3 -2
  68. package/lib/typescript/src/components/TabBar/Three.d.ts.map +1 -1
  69. package/lib/typescript/src/components/TabBar/Two.d.ts +13 -4
  70. package/lib/typescript/src/components/TabBar/Two.d.ts.map +1 -1
  71. package/lib/typescript/src/components/TabBar/index.d.ts +1 -1
  72. package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts +50 -0
  73. package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts.map +1 -0
  74. package/lib/typescript/src/components/User/index.d.ts +2 -1
  75. package/lib/typescript/src/components/User/index.d.ts.map +1 -1
  76. package/lib/typescript/src/components/index.d.ts +1 -0
  77. package/lib/typescript/src/components/index.d.ts.map +1 -1
  78. package/lib/typescript/src/hooks/useNavigationMode.d.ts +14 -0
  79. package/lib/typescript/src/hooks/useNavigationMode.d.ts.map +1 -0
  80. package/lib/typescript/src/types/content/content-view.types.d.ts +2 -0
  81. package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
  82. package/lib/typescript/src/utils/Spacing.d.ts +16 -0
  83. package/lib/typescript/src/utils/Spacing.d.ts.map +1 -0
  84. package/package.json +9 -5
  85. package/src/components/Account/Account.tsx +1 -1
  86. package/src/components/Auth/AuthProvider/AuthProvider.tsx +82 -37
  87. package/src/components/Auth/Login/LoginWithEmail.tsx +9 -2
  88. package/src/components/Auth/OTP/OTP.tsx +37 -1
  89. package/src/components/Auth/SignUp/SignUp.tsx +9 -2
  90. package/src/components/BlurView/BlurView.tsx +199 -0
  91. package/src/components/BlurView/index.ts +7 -0
  92. package/src/components/Content/Card/Styles/Four.tsx +3 -1
  93. package/src/components/Content/Content.tsx +5 -4
  94. package/src/components/ContentView/ContentView.tsx +8 -1
  95. package/src/components/ContentView/components/MiniInfo.tsx +99 -22
  96. package/src/components/Settings/AppSettings.tsx +1 -1
  97. package/src/components/Subscription/SubOne.tsx +422 -11
  98. package/src/components/TabBar/One.tsx +79 -141
  99. package/src/components/TabBar/Three.tsx +84 -99
  100. package/src/components/TabBar/Two.tsx +139 -110
  101. package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +439 -0
  102. package/src/components/User/index.ts +8 -1
  103. package/src/components/index.ts +1 -0
  104. package/src/hooks/useNavigationMode.ts +35 -0
  105. package/src/types/content/content-view.types.ts +5 -0
  106. 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
- <View
111
- style={[
112
- styles.badge,
113
- {
114
- backgroundColor: appliedTheme.colors.primary,
115
- shadowColor: appliedTheme.colors.textPrimary,
116
- },
117
- style?.badge,
118
- ]}
119
- >
120
- <Text
121
- type="caption"
122
- style={{ color: appliedTheme.colors.onPrimary, fontWeight: '600' }}
123
- theme={theme}
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
- {content_offering_type === 'BUY_OR_RENT' ? 'BUY OR RENT' : 'BUY'}
126
- </Text>
127
- </View>
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
- {renderPriceInfo()}
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(60) + insets.bottom },
251
+ { paddingBottom: verticalScale(100) + insets.bottom },
252
252
  ]}
253
253
  showsVerticalScrollIndicator={false}
254
254
  keyboardShouldPersistTaps="handled"