@zezosoft/zezo-ott-react-native-ui-kit 1.1.9 → 1.2.0
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/One/OTP/OTP.js +12 -4
- package/lib/module/components/Auth/One/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/One/SplashScreen/SplashScreen.js +4 -4
- package/lib/module/components/Auth/One/SplashScreen/SplashScreen.js.map +1 -1
- package/lib/module/components/Auth/Two/OTP/OTP.js +12 -4
- package/lib/module/components/Auth/Two/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/Two/index.js +0 -4
- package/lib/module/components/Auth/Two/index.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +0 -1
- package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/module/components/Content/Card/components/CardPoster.js +3 -4
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Search/components/SearchCard.js +22 -6
- package/lib/module/components/Search/components/SearchCard.js.map +1 -1
- package/lib/typescript/src/components/Auth/One/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/One/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Two/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Two/index.d.ts +0 -24
- package/lib/typescript/src/components/Auth/Two/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/index.d.ts +0 -24
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/module/components/Auth/Two/QrLogin/QrLogin.js +0 -479
- package/lib/module/components/Auth/Two/QrLogin/QrLogin.js.map +0 -1
- package/lib/module/components/Auth/Two/QrLogin/components/QrViewArea.js +0 -295
- package/lib/module/components/Auth/Two/QrLogin/components/QrViewArea.js.map +0 -1
- package/lib/module/components/Auth/Two/SplashScreen/SplashScreen.js +0 -141
- package/lib/module/components/Auth/Two/SplashScreen/SplashScreen.js.map +0 -1
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.js +0 -74
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.js.map +0 -1
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.js +0 -63
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.js.map +0 -1
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.js +0 -157
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.js.map +0 -1
- package/lib/typescript/src/components/Auth/Two/QrLogin/QrLogin.d.ts +0 -19
- package/lib/typescript/src/components/Auth/Two/QrLogin/QrLogin.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/Two/QrLogin/components/QrViewArea.d.ts +0 -14
- package/lib/typescript/src/components/Auth/Two/QrLogin/components/QrViewArea.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/Two/SplashScreen/SplashScreen.d.ts +0 -35
- package/lib/typescript/src/components/Auth/Two/SplashScreen/SplashScreen.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.d.ts +0 -12
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.d.ts +0 -17
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.d.ts +0 -20
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +0 -1
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @author Ashok Desai
|
|
5
|
-
* @lastModified oct 02 Oct 2025 at 10:30 AM
|
|
6
|
-
*/
|
|
7
|
-
import React, { useEffect, useRef, useMemo, useCallback } from 'react';
|
|
8
|
-
import { View, StyleSheet, Animated, Easing, Dimensions, Platform } from 'react-native';
|
|
9
|
-
import { scale } from 'react-native-size-matters';
|
|
10
|
-
import { useInternalTheme } from "../../../../../theme/hook/useInternalTheme.js";
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const {
|
|
13
|
-
width: SCREEN_W,
|
|
14
|
-
height: SCREEN_H
|
|
15
|
-
} = Dimensions.get('window');
|
|
16
|
-
|
|
17
|
-
// ==================== Constants ====================
|
|
18
|
-
const ANIMATION_DURATION = 2000;
|
|
19
|
-
const CORNER_SIZE = 18;
|
|
20
|
-
const CORNER_BORDER_WIDTH = 3;
|
|
21
|
-
const SCAN_LINE_HEIGHT = 3;
|
|
22
|
-
const SCAN_LINE_MARGIN = 12;
|
|
23
|
-
const BOX_WIDTH_RATIO = 0.7;
|
|
24
|
-
const BOX_SIZE_RATIO = 0.9;
|
|
25
|
-
const MAX_BOX_WIDTH = 320;
|
|
26
|
-
const VERTICAL_OFFSET = 40;
|
|
27
|
-
const DEFAULT_OVERLAY_COLOR = 'rgba(0, 0, 0, 0.6)';
|
|
28
|
-
const DEFAULT_SHADOW_COLOR = '#000';
|
|
29
|
-
|
|
30
|
-
// ==================== Types ====================
|
|
31
|
-
|
|
32
|
-
// ==================== Helper Functions ====================
|
|
33
|
-
/**
|
|
34
|
-
* Calculates the scan box dimensions and overlay positions
|
|
35
|
-
*/
|
|
36
|
-
const calculateBoxDimensions = (scanBoxWidth, headerHeight) => {
|
|
37
|
-
const defaultBoxW = scanBoxWidth || Math.min(SCREEN_W * BOX_WIDTH_RATIO, MAX_BOX_WIDTH);
|
|
38
|
-
const boxW = defaultBoxW * BOX_SIZE_RATIO;
|
|
39
|
-
const boxH = boxW;
|
|
40
|
-
const availableHeight = SCREEN_H - headerHeight;
|
|
41
|
-
const boxTop = Math.max(headerHeight, Math.floor(headerHeight + (availableHeight - boxH) / 2 - scale(VERTICAL_OFFSET)));
|
|
42
|
-
const topOverlayHeight = Math.max(0, Math.floor(boxTop - headerHeight));
|
|
43
|
-
const bottomOverlayHeight = Math.max(0, Math.floor(SCREEN_H - (boxTop + boxH)));
|
|
44
|
-
const leftOverlayWidth = Math.floor((SCREEN_W - boxW) / 2);
|
|
45
|
-
const scanBoxRight = leftOverlayWidth + boxW;
|
|
46
|
-
const rightOverlayWidth = Math.max(0, SCREEN_W - scanBoxRight);
|
|
47
|
-
return {
|
|
48
|
-
boxW,
|
|
49
|
-
boxH,
|
|
50
|
-
boxTop,
|
|
51
|
-
topOverlayHeight,
|
|
52
|
-
bottomOverlayHeight,
|
|
53
|
-
sideOverlayWidth: leftOverlayWidth,
|
|
54
|
-
rightOverlayWidth
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Creates overlay style for a specific position
|
|
60
|
-
*/
|
|
61
|
-
const createOverlayStyle = (position, dimensions, headerHeight, overlayColor) => {
|
|
62
|
-
const baseStyleKey = `overlay${position.charAt(0).toUpperCase() + position.slice(1)}`;
|
|
63
|
-
const baseStyle = styles[baseStyleKey] || styles.overlaySide;
|
|
64
|
-
switch (position) {
|
|
65
|
-
case 'top':
|
|
66
|
-
return [baseStyle, {
|
|
67
|
-
top: headerHeight,
|
|
68
|
-
height: Math.max(0, dimensions.topOverlayHeight),
|
|
69
|
-
backgroundColor: overlayColor
|
|
70
|
-
}];
|
|
71
|
-
case 'bottom':
|
|
72
|
-
return [baseStyle, {
|
|
73
|
-
top: dimensions.boxTop + dimensions.boxH,
|
|
74
|
-
height: Math.max(0, dimensions.bottomOverlayHeight),
|
|
75
|
-
backgroundColor: overlayColor
|
|
76
|
-
}];
|
|
77
|
-
case 'left':
|
|
78
|
-
return [baseStyle, {
|
|
79
|
-
left: 0,
|
|
80
|
-
top: dimensions.boxTop,
|
|
81
|
-
height: dimensions.boxH,
|
|
82
|
-
width: Math.max(0, dimensions.sideOverlayWidth),
|
|
83
|
-
backgroundColor: overlayColor
|
|
84
|
-
}];
|
|
85
|
-
case 'right':
|
|
86
|
-
return [baseStyle, {
|
|
87
|
-
right: 0,
|
|
88
|
-
top: dimensions.boxTop,
|
|
89
|
-
height: dimensions.boxH,
|
|
90
|
-
width: Math.max(0, dimensions.rightOverlayWidth),
|
|
91
|
-
backgroundColor: overlayColor
|
|
92
|
-
}];
|
|
93
|
-
default:
|
|
94
|
-
return [baseStyle];
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Creates corner style based on position
|
|
100
|
-
*/
|
|
101
|
-
const createCornerStyle = (position, borderColor, cornerSize, cornerBorderWidth) => {
|
|
102
|
-
const baseStyle = [styles.corner, styles[`corner_${position}`]];
|
|
103
|
-
const dynamicStyle = {
|
|
104
|
-
borderColor,
|
|
105
|
-
width: cornerSize,
|
|
106
|
-
height: cornerSize,
|
|
107
|
-
borderTopWidth: position.startsWith('t') ? cornerBorderWidth : 0,
|
|
108
|
-
borderBottomWidth: position.startsWith('b') ? cornerBorderWidth : 0,
|
|
109
|
-
borderLeftWidth: position.endsWith('l') ? cornerBorderWidth : 0,
|
|
110
|
-
borderRightWidth: position.endsWith('r') ? cornerBorderWidth : 0
|
|
111
|
-
};
|
|
112
|
-
return [...baseStyle, dynamicStyle];
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Creates animated scan line style
|
|
117
|
-
*/
|
|
118
|
-
const createScanLineStyle = (margin, scanLineHeight, borderColor, shadowColor, translateY) => ({
|
|
119
|
-
position: 'absolute',
|
|
120
|
-
top: margin,
|
|
121
|
-
left: margin,
|
|
122
|
-
right: margin,
|
|
123
|
-
height: scanLineHeight,
|
|
124
|
-
borderRadius: scanLineHeight / 2,
|
|
125
|
-
backgroundColor: borderColor,
|
|
126
|
-
transform: [{
|
|
127
|
-
translateY
|
|
128
|
-
}],
|
|
129
|
-
shadowColor,
|
|
130
|
-
shadowOffset: {
|
|
131
|
-
width: 0,
|
|
132
|
-
height: 2
|
|
133
|
-
},
|
|
134
|
-
shadowOpacity: 0.4,
|
|
135
|
-
shadowRadius: 4,
|
|
136
|
-
elevation: Platform.OS === 'android' ? 5 : 0
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// ==================== Custom Hooks ====================
|
|
140
|
-
/**
|
|
141
|
-
* Hook to manage scan line animation
|
|
142
|
-
*/
|
|
143
|
-
const useScanLineAnimation = lineTravel => {
|
|
144
|
-
const anim = useRef(new Animated.Value(0)).current;
|
|
145
|
-
useEffect(() => {
|
|
146
|
-
const animation = Animated.loop(Animated.sequence([Animated.timing(anim, {
|
|
147
|
-
toValue: 1,
|
|
148
|
-
duration: ANIMATION_DURATION,
|
|
149
|
-
easing: Easing.linear,
|
|
150
|
-
useNativeDriver: true
|
|
151
|
-
}), Animated.timing(anim, {
|
|
152
|
-
toValue: 0,
|
|
153
|
-
duration: ANIMATION_DURATION,
|
|
154
|
-
easing: Easing.linear,
|
|
155
|
-
useNativeDriver: true
|
|
156
|
-
})]));
|
|
157
|
-
animation.start();
|
|
158
|
-
return () => animation.stop();
|
|
159
|
-
}, [anim]);
|
|
160
|
-
const translateY = useMemo(() => anim.interpolate({
|
|
161
|
-
inputRange: [0, 1],
|
|
162
|
-
outputRange: [0, lineTravel]
|
|
163
|
-
}), [anim, lineTravel]);
|
|
164
|
-
return translateY;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
// ==================== Component ====================
|
|
168
|
-
const QrViewArea = /*#__PURE__*/React.memo(({
|
|
169
|
-
scanBoxWidth,
|
|
170
|
-
headerHeight = 0,
|
|
171
|
-
theme
|
|
172
|
-
}) => {
|
|
173
|
-
const {
|
|
174
|
-
theme: appliedTheme
|
|
175
|
-
} = useInternalTheme(theme);
|
|
176
|
-
const {
|
|
177
|
-
colors
|
|
178
|
-
} = appliedTheme;
|
|
179
|
-
|
|
180
|
-
// Calculate dimensions
|
|
181
|
-
const boxDimensions = useMemo(() => calculateBoxDimensions(scanBoxWidth, headerHeight), [scanBoxWidth, headerHeight]);
|
|
182
|
-
|
|
183
|
-
// Calculate scan line properties
|
|
184
|
-
const margin = useMemo(() => scale(SCAN_LINE_MARGIN), []);
|
|
185
|
-
const lineTravel = useMemo(() => Math.max(0, boxDimensions.boxH - margin * 2 - scale(SCAN_LINE_HEIGHT)), [boxDimensions.boxH, margin]);
|
|
186
|
-
|
|
187
|
-
// Animation
|
|
188
|
-
const translateY = useScanLineAnimation(lineTravel);
|
|
189
|
-
|
|
190
|
-
// Theme colors
|
|
191
|
-
const overlayColor = colors.overlay || DEFAULT_OVERLAY_COLOR;
|
|
192
|
-
const shadowColor = colors.shadow || DEFAULT_SHADOW_COLOR;
|
|
193
|
-
|
|
194
|
-
// Corner properties
|
|
195
|
-
const cornerSize = useMemo(() => scale(CORNER_SIZE), []);
|
|
196
|
-
const cornerBorderWidth = useMemo(() => scale(CORNER_BORDER_WIDTH), []);
|
|
197
|
-
|
|
198
|
-
// Create overlay styles
|
|
199
|
-
const overlayStyles = useMemo(() => ({
|
|
200
|
-
top: createOverlayStyle('top', boxDimensions, headerHeight, overlayColor),
|
|
201
|
-
bottom: createOverlayStyle('bottom', boxDimensions, headerHeight, overlayColor),
|
|
202
|
-
left: createOverlayStyle('left', boxDimensions, headerHeight, overlayColor),
|
|
203
|
-
right: createOverlayStyle('right', boxDimensions, headerHeight, overlayColor)
|
|
204
|
-
}), [boxDimensions, headerHeight, overlayColor]);
|
|
205
|
-
|
|
206
|
-
// Scan box style
|
|
207
|
-
const scanBoxStyle = useMemo(() => [styles.scanBox, {
|
|
208
|
-
top: boxDimensions.boxTop,
|
|
209
|
-
left: boxDimensions.sideOverlayWidth,
|
|
210
|
-
width: boxDimensions.boxW,
|
|
211
|
-
height: boxDimensions.boxH
|
|
212
|
-
}], [boxDimensions]);
|
|
213
|
-
|
|
214
|
-
// Corner style generator
|
|
215
|
-
const getCornerStyle = useCallback(position => createCornerStyle(position, colors.button, cornerSize, cornerBorderWidth), [colors.button, cornerSize, cornerBorderWidth]);
|
|
216
|
-
|
|
217
|
-
// Scan line style
|
|
218
|
-
const scanLineHeight = useMemo(() => scale(SCAN_LINE_HEIGHT), []);
|
|
219
|
-
const scanLineStyle = useMemo(() => createScanLineStyle(margin, scanLineHeight, colors.button, shadowColor, translateY), [margin, scanLineHeight, colors.button, shadowColor, translateY]);
|
|
220
|
-
|
|
221
|
-
// Corner positions
|
|
222
|
-
const cornerPositions = ['tl', 'tr', 'bl', 'br'];
|
|
223
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
224
|
-
style: styles.container,
|
|
225
|
-
pointerEvents: "box-none",
|
|
226
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
227
|
-
style: overlayStyles.top
|
|
228
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
229
|
-
style: overlayStyles.bottom
|
|
230
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
231
|
-
style: overlayStyles.left
|
|
232
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
233
|
-
style: overlayStyles.right
|
|
234
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
235
|
-
style: scanBoxStyle,
|
|
236
|
-
pointerEvents: "none",
|
|
237
|
-
children: [cornerPositions.map(position => /*#__PURE__*/_jsx(View, {
|
|
238
|
-
style: getCornerStyle(position)
|
|
239
|
-
}, position)), /*#__PURE__*/_jsx(Animated.View, {
|
|
240
|
-
style: scanLineStyle
|
|
241
|
-
})]
|
|
242
|
-
})]
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
const styles = StyleSheet.create({
|
|
246
|
-
container: {
|
|
247
|
-
...StyleSheet.absoluteFillObject,
|
|
248
|
-
zIndex: 10
|
|
249
|
-
},
|
|
250
|
-
overlayTop: {
|
|
251
|
-
position: 'absolute',
|
|
252
|
-
left: 0,
|
|
253
|
-
right: 0,
|
|
254
|
-
zIndex: 1
|
|
255
|
-
},
|
|
256
|
-
overlayBottom: {
|
|
257
|
-
position: 'absolute',
|
|
258
|
-
left: 0,
|
|
259
|
-
right: 0,
|
|
260
|
-
zIndex: 1
|
|
261
|
-
},
|
|
262
|
-
overlaySide: {
|
|
263
|
-
position: 'absolute',
|
|
264
|
-
zIndex: 1
|
|
265
|
-
},
|
|
266
|
-
scanBox: {
|
|
267
|
-
position: 'absolute',
|
|
268
|
-
justifyContent: 'center',
|
|
269
|
-
alignItems: 'center',
|
|
270
|
-
overflow: 'hidden',
|
|
271
|
-
zIndex: 2
|
|
272
|
-
},
|
|
273
|
-
corner: {
|
|
274
|
-
position: 'absolute',
|
|
275
|
-
zIndex: 3
|
|
276
|
-
},
|
|
277
|
-
corner_tl: {
|
|
278
|
-
top: 0,
|
|
279
|
-
left: 0
|
|
280
|
-
},
|
|
281
|
-
corner_tr: {
|
|
282
|
-
top: 0,
|
|
283
|
-
right: 0
|
|
284
|
-
},
|
|
285
|
-
corner_bl: {
|
|
286
|
-
bottom: 0,
|
|
287
|
-
left: 0
|
|
288
|
-
},
|
|
289
|
-
corner_br: {
|
|
290
|
-
bottom: 0,
|
|
291
|
-
right: 0
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
export default QrViewArea;
|
|
295
|
-
//# sourceMappingURL=QrViewArea.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","useMemo","useCallback","View","StyleSheet","Animated","Easing","Dimensions","Platform","scale","useInternalTheme","jsx","_jsx","jsxs","_jsxs","width","SCREEN_W","height","SCREEN_H","get","ANIMATION_DURATION","CORNER_SIZE","CORNER_BORDER_WIDTH","SCAN_LINE_HEIGHT","SCAN_LINE_MARGIN","BOX_WIDTH_RATIO","BOX_SIZE_RATIO","MAX_BOX_WIDTH","VERTICAL_OFFSET","DEFAULT_OVERLAY_COLOR","DEFAULT_SHADOW_COLOR","calculateBoxDimensions","scanBoxWidth","headerHeight","defaultBoxW","Math","min","boxW","boxH","availableHeight","boxTop","max","floor","topOverlayHeight","bottomOverlayHeight","leftOverlayWidth","scanBoxRight","rightOverlayWidth","sideOverlayWidth","createOverlayStyle","position","dimensions","overlayColor","baseStyleKey","charAt","toUpperCase","slice","baseStyle","styles","overlaySide","top","backgroundColor","left","right","createCornerStyle","borderColor","cornerSize","cornerBorderWidth","corner","dynamicStyle","borderTopWidth","startsWith","borderBottomWidth","borderLeftWidth","endsWith","borderRightWidth","createScanLineStyle","margin","scanLineHeight","shadowColor","translateY","borderRadius","transform","shadowOffset","shadowOpacity","shadowRadius","elevation","OS","useScanLineAnimation","lineTravel","anim","Value","current","animation","loop","sequence","timing","toValue","duration","easing","linear","useNativeDriver","start","stop","interpolate","inputRange","outputRange","QrViewArea","memo","theme","appliedTheme","colors","boxDimensions","overlay","shadow","overlayStyles","bottom","scanBoxStyle","scanBox","getCornerStyle","button","scanLineStyle","cornerPositions","style","container","pointerEvents","children","map","create","absoluteFillObject","zIndex","overlayTop","overlayBottom","justifyContent","alignItems","overflow","corner_tl","corner_tr","corner_bl","corner_br"],"sourceRoot":"../../../../../../../src","sources":["components/Auth/Two/QrLogin/components/QrViewArea.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,OAAO,EAAEC,WAAW,QAAQ,OAAO;AACtE,SACEC,IAAI,EACJC,UAAU,EACVC,QAAQ,EACRC,MAAM,EACNC,UAAU,EACVC,QAAQ,QACH,cAAc;AAErB,SAASC,KAAK,QAAQ,2BAA2B;AAEjD,SAASC,gBAAgB,QAAQ,+CAA4C;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9E,MAAM;EAAEC,KAAK,EAAEC,QAAQ;EAAEC,MAAM,EAAEC;AAAS,CAAC,GAAGX,UAAU,CAACY,GAAG,CAAC,QAAQ,CAAC;;AAEtE;AACA,MAAMC,k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CAAC4H,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACT,GAAGxH,UAAU,CAAC6H,kBAAkB;IAChCC,MAAM,EAAE;EACV,CAAC;EACDC,UAAU,EAAE;IACVjF,QAAQ,EAAE,UAAU;IACpBY,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRmE,MAAM,EAAE;EACV,CAAC;EACDE,aAAa,EAAE;IACblF,QAAQ,EAAE,UAAU;IACpBY,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRmE,MAAM,EAAE;EACV,CAAC;EACDvE,WAAW,EAAE;IACXT,QAAQ,EAAE,UAAU;IACpBgF,MAAM,EAAE;EACV,CAAC;EACDZ,OAAO,EAAE;IACPpE,QAAQ,EAAE,UAAU;IACpBmF,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,QAAQ,EAAE,QAAQ;IAClBL,MAAM,EAAE;EACV,CAAC;EACD9D,MAAM,EAAE;IACNlB,QAAQ,EAAE,UAAU;IACpBgF,MAAM,EAAE;EACV,CAAC;EACDM,SAAS,EAAE;IACT5E,GAAG,EAAE,CAAC;IACNE,IAAI,EAAE;EACR,CAAC;EACD2E,SAAS,EAAE;IACT7E,GAAG,EAAE,CAAC;IACNG,KAAK,EAAE;EACT,CAAC;EACD2E,SAAS,EAAE;IACTtB,MAAM,EAAE,CAAC;IACTtD,IAAI,EAAE;EACR,CAAC;EACD6E,SAAS,EAAE;IACTvB,MAAM,EAAE,CAAC;IACTrD,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAe4C,UAAU","ignoreList":[]}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @author Naresh Dhamu
|
|
5
|
-
* @lastModified Fri 17 Oct 2025 at 09:51 PM
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React, { useEffect, useMemo, useCallback } from 'react';
|
|
9
|
-
import SplashImage from "./components/SplashImage/SplashImage.js";
|
|
10
|
-
import SplashVideo from "./components/SplashVideo/SplashVideo.js";
|
|
11
|
-
import SplashLottie from "./components/SplashLottie/SplashLottie.js";
|
|
12
|
-
import { useInternalTheme } from "../../../../theme/hook/useInternalTheme.js";
|
|
13
|
-
import { BackgroundLayout } from "../../../BackgroundLayout/BackgroundLayout.js";
|
|
14
|
-
import { useSplashCache } from "../../../../hooks/useSplashCache.js";
|
|
15
|
-
import { AppStatusBar } from "../../../common/AppStatusBar.js";
|
|
16
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
const DEFAULT_IMAGE_TIMEOUT = 5;
|
|
18
|
-
const FALLBACK_TIMEOUT = 0.5;
|
|
19
|
-
|
|
20
|
-
// Move extension arrays outside component to prevent recreation
|
|
21
|
-
const VIDEO_EXTENSIONS = ['.mp4', '.mov', '.mkv', '.webm', '.avi', '.3gp'];
|
|
22
|
-
const LOTTIE_EXTENSIONS = ['.json', '.lottie'];
|
|
23
|
-
export const SplashScreen = /*#__PURE__*/React.memo(({
|
|
24
|
-
splashScreenConfig,
|
|
25
|
-
innerContainerStyle,
|
|
26
|
-
backgroundImage = {
|
|
27
|
-
gradientSplitBackground: 0.4,
|
|
28
|
-
resizeMode: 'cover'
|
|
29
|
-
},
|
|
30
|
-
onRedirect,
|
|
31
|
-
theme: overrideTheme
|
|
32
|
-
}) => {
|
|
33
|
-
useInternalTheme(overrideTheme);
|
|
34
|
-
const {
|
|
35
|
-
source: splashSource = '',
|
|
36
|
-
type: splashType = 'image',
|
|
37
|
-
width,
|
|
38
|
-
height,
|
|
39
|
-
isStatic = false,
|
|
40
|
-
screenTime,
|
|
41
|
-
fullscreen = false,
|
|
42
|
-
resizeMode = 'contain',
|
|
43
|
-
backgroundColor: splashBgColor
|
|
44
|
-
} = splashScreenConfig;
|
|
45
|
-
|
|
46
|
-
// Memoize computed values
|
|
47
|
-
const isRemote = useMemo(() => splashSource?.startsWith('http') ?? false, [splashSource]);
|
|
48
|
-
const isImageSplash = useMemo(() => splashType === 'image', [splashType]);
|
|
49
|
-
const backgroundImageUrl = useMemo(() => isImageSplash && backgroundImage.source?.startsWith('http') ? backgroundImage.source : undefined, [isImageSplash, backgroundImage.source]);
|
|
50
|
-
const {
|
|
51
|
-
data
|
|
52
|
-
} = useSplashCache({
|
|
53
|
-
logoUrl: isRemote ? splashSource : undefined,
|
|
54
|
-
backgroundUrl: backgroundImageUrl
|
|
55
|
-
});
|
|
56
|
-
const resolvedSplashUri = useMemo(() => (isRemote && data.logoPath ? data.logoPath : splashSource) || '', [isRemote, data.logoPath, splashSource]);
|
|
57
|
-
const displayTimeout = useMemo(() => {
|
|
58
|
-
if (typeof screenTime === 'number' && screenTime > 0) return screenTime;
|
|
59
|
-
if (isImageSplash || isStatic) return DEFAULT_IMAGE_TIMEOUT;
|
|
60
|
-
return 0;
|
|
61
|
-
}, [screenTime, isImageSplash, isStatic]);
|
|
62
|
-
const handleRedirect = useCallback(() => {
|
|
63
|
-
try {
|
|
64
|
-
onRedirect();
|
|
65
|
-
} catch (err) {
|
|
66
|
-
console.error('[SplashScreen] Redirect error:', err);
|
|
67
|
-
}
|
|
68
|
-
}, [onRedirect]);
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
const timeoutSec = displayTimeout > 0 ? displayTimeout : FALLBACK_TIMEOUT;
|
|
71
|
-
const timer = setTimeout(handleRedirect, timeoutSec * 1000);
|
|
72
|
-
return () => clearTimeout(timer);
|
|
73
|
-
}, [displayTimeout, handleRedirect]);
|
|
74
|
-
const splashProps = useMemo(() => ({
|
|
75
|
-
source: resolvedSplashUri,
|
|
76
|
-
width,
|
|
77
|
-
height,
|
|
78
|
-
fullscreen,
|
|
79
|
-
resizeMode: resizeMode
|
|
80
|
-
}), [resolvedSplashUri, width, height, fullscreen, resizeMode]);
|
|
81
|
-
|
|
82
|
-
// Memoize file type checks
|
|
83
|
-
const isVideoFile = useMemo(() => VIDEO_EXTENSIONS.some(ext => resolvedSplashUri.toLowerCase().endsWith(ext)), [resolvedSplashUri]);
|
|
84
|
-
const isLottieFile = useMemo(() => LOTTIE_EXTENSIONS.some(ext => resolvedSplashUri.toLowerCase().endsWith(ext)), [resolvedSplashUri]);
|
|
85
|
-
|
|
86
|
-
// Memoize video onEnd handler
|
|
87
|
-
const videoOnEnd = useMemo(() => displayTimeout ? undefined : handleRedirect, [displayTimeout, handleRedirect]);
|
|
88
|
-
|
|
89
|
-
// Memoize lottie onAnimationFinish handler
|
|
90
|
-
const lottieOnAnimationFinish = useMemo(() => displayTimeout ? undefined : handleRedirect, [displayTimeout, handleRedirect]);
|
|
91
|
-
|
|
92
|
-
// Memoize BackgroundLayout props
|
|
93
|
-
const backgroundLayoutProps = useMemo(() => ({
|
|
94
|
-
backgroundImage: isImageSplash ? backgroundImage.source : undefined,
|
|
95
|
-
backgroundColor: splashBgColor,
|
|
96
|
-
resizeMode: backgroundImage.resizeMode ?? 'cover',
|
|
97
|
-
innerContainerStyle,
|
|
98
|
-
onImageError: backgroundImage.onImageError,
|
|
99
|
-
theme: overrideTheme,
|
|
100
|
-
gradientSplitBackground: backgroundImage.gradientSplitBackground ?? 0.4
|
|
101
|
-
}), [isImageSplash, backgroundImage.source, backgroundImage.resizeMode, backgroundImage.onImageError, backgroundImage.gradientSplitBackground, splashBgColor, innerContainerStyle, overrideTheme]);
|
|
102
|
-
|
|
103
|
-
// Memoize AppStatusBar theme
|
|
104
|
-
const appStatusBarTheme = useMemo(() => ({
|
|
105
|
-
...overrideTheme,
|
|
106
|
-
dark: {
|
|
107
|
-
...overrideTheme?.dark,
|
|
108
|
-
background: splashBgColor
|
|
109
|
-
},
|
|
110
|
-
light: {
|
|
111
|
-
...overrideTheme?.light,
|
|
112
|
-
background: splashBgColor
|
|
113
|
-
}
|
|
114
|
-
}), [overrideTheme, splashBgColor]);
|
|
115
|
-
const renderSplashContent = useCallback(() => {
|
|
116
|
-
switch (splashType) {
|
|
117
|
-
case 'video':
|
|
118
|
-
return isVideoFile ? /*#__PURE__*/_jsx(SplashVideo, {
|
|
119
|
-
...splashProps,
|
|
120
|
-
onEnd: videoOnEnd
|
|
121
|
-
}) : null;
|
|
122
|
-
case 'lottie-animation':
|
|
123
|
-
return isLottieFile ? /*#__PURE__*/_jsx(SplashLottie, {
|
|
124
|
-
...splashProps,
|
|
125
|
-
onAnimationFinish: lottieOnAnimationFinish
|
|
126
|
-
}) : null;
|
|
127
|
-
case 'image':
|
|
128
|
-
default:
|
|
129
|
-
return /*#__PURE__*/_jsx(SplashImage, {
|
|
130
|
-
...splashProps
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}, [splashType, isVideoFile, splashProps, videoOnEnd, isLottieFile, lottieOnAnimationFinish]);
|
|
134
|
-
return /*#__PURE__*/_jsxs(BackgroundLayout, {
|
|
135
|
-
...backgroundLayoutProps,
|
|
136
|
-
children: [/*#__PURE__*/_jsx(AppStatusBar, {
|
|
137
|
-
theme: appStatusBarTheme
|
|
138
|
-
}), renderSplashContent()]
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
//# sourceMappingURL=SplashScreen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useMemo","useCallback","SplashImage","SplashVideo","SplashLottie","useInternalTheme","BackgroundLayout","useSplashCache","AppStatusBar","jsx","_jsx","jsxs","_jsxs","DEFAULT_IMAGE_TIMEOUT","FALLBACK_TIMEOUT","VIDEO_EXTENSIONS","LOTTIE_EXTENSIONS","SplashScreen","memo","splashScreenConfig","innerContainerStyle","backgroundImage","gradientSplitBackground","resizeMode","onRedirect","theme","overrideTheme","source","splashSource","type","splashType","width","height","isStatic","screenTime","fullscreen","backgroundColor","splashBgColor","isRemote","startsWith","isImageSplash","backgroundImageUrl","undefined","data","logoUrl","backgroundUrl","resolvedSplashUri","logoPath","displayTimeout","handleRedirect","err","console","error","timeoutSec","timer","setTimeout","clearTimeout","splashProps","isVideoFile","some","ext","toLowerCase","endsWith","isLottieFile","videoOnEnd","lottieOnAnimationFinish","backgroundLayoutProps","onImageError","appStatusBarTheme","dark","background","light","renderSplashContent","onEnd","onAnimationFinish","children"],"sourceRoot":"../../../../../../src","sources":["components/Auth/Two/SplashScreen/SplashScreen.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,WAAW,QAAQ,OAAO;AAE9D,OAAOC,WAAW,MAAM,yCAAsC;AAC9D,OAAOC,WAAW,MAAM,yCAAsC;AAC9D,OAAOC,YAAY,MAAM,2CAAwC;AAGjE,SAASC,gBAAgB,QAAQ,4CAAyC;AAE1E,SAASC,gBAAgB,QAAQ,+CAA4C;AAC7E,SAASC,cAAc,QAAQ,qCAAkC;AACjE,SAASC,YAAY,QAAQ,iCAA8B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA8B5D,MAAMC,qBAAqB,GAAG,CAAC;AAC/B,MAAMC,gBAAgB,GAAG,GAAG;;AAE5B;AACA,MAAMC,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AAC1E,MAAMC,iBAAiB,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC;AAE9C,OAAO,MAAMC,YAAyC,gBAAGnB,KAAK,CAACoB,IAAI,CACjE,CAAC;EACCC,kBAAkB;EAClBC,mBAAmB;EACnBC,eAAe,GAAG;IAChBC,uBAAuB,EAAE,GAAG;IAC5BC,UAAU,EAAE;EACd,CAAC;EACDC,UAAU;EACVC,KAAK,EAAEC;AACT,CAAC,KAAK;EACJrB,gBAAgB,CAACqB,aAAa,CAAC;EAE/B,MAAM;IACJC,MAAM,EAAEC,YAAY,GAAG,EAAE;IACzBC,IAAI,EAAEC,UAAU,GAAG,OAAO;IAC1BC,KAAK;IACLC,MAAM;IACNC,QAAQ,GAAG,KAAK;IAChBC,UAA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YAAY;UAAA,GACPqD,WAAW;UACfiB,iBAAiB,EAAET;QAAwB,CAC5C,CAAC,GACA,IAAI;MAEV,KAAK,OAAO;MACZ;QACE,oBAAOvD,IAAA,CAACR,WAAW;UAAA,GAAKuD;QAAW,CAAG,CAAC;IAC3C;EACF,CAAC,EAAE,CACD3B,UAAU,EACV4B,WAAW,EACXD,WAAW,EACXO,UAAU,EACVD,YAAY,EACZE,uBAAuB,CACxB,CAAC;EAEF,oBACErD,KAAA,CAACN,gBAAgB;IAAA,GAAK4D,qBAAqB;IAAAS,QAAA,gBACzCjE,IAAA,CAACF,YAAY;MAACiB,KAAK,EAAE2C;IAAkB,CAAE,CAAC,EACzCI,mBAAmB,CAAC,CAAC;EAAA,CACN,CAAC;AAEvB,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React, { useState, useMemo, useCallback, useEffect } from 'react';
|
|
4
|
-
import FastImage from 'react-native-fast-image';
|
|
5
|
-
import { ActivityIndicator, View, StyleSheet } from 'react-native';
|
|
6
|
-
import Display from "../../../../../../utils/Display.js";
|
|
7
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
const SplashImage = ({
|
|
9
|
-
fullscreen,
|
|
10
|
-
height,
|
|
11
|
-
resizeMode = 'contain',
|
|
12
|
-
source,
|
|
13
|
-
width
|
|
14
|
-
}) => {
|
|
15
|
-
const [isLoading, setIsLoading] = useState(!!source);
|
|
16
|
-
|
|
17
|
-
// Reset loading state when source changes
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (source) {
|
|
20
|
-
setIsLoading(true);
|
|
21
|
-
}
|
|
22
|
-
}, [source]);
|
|
23
|
-
const imageStyles = useMemo(() => ({
|
|
24
|
-
width: fullscreen ? Display.fullWidth : width,
|
|
25
|
-
height: fullscreen ? Display.fullHeight : height,
|
|
26
|
-
flex: 1
|
|
27
|
-
}), [fullscreen, width, height]);
|
|
28
|
-
const handleLoadEnd = useCallback(() => {
|
|
29
|
-
setIsLoading(false);
|
|
30
|
-
}, []);
|
|
31
|
-
const handleError = useCallback(() => {
|
|
32
|
-
setIsLoading(false);
|
|
33
|
-
}, []);
|
|
34
|
-
|
|
35
|
-
// Memoize URI resolution
|
|
36
|
-
const resolvedUri = useMemo(() => {
|
|
37
|
-
if (!source) return '';
|
|
38
|
-
if (source.startsWith('http') || source.startsWith('https') || source.startsWith('file://')) return source;
|
|
39
|
-
return `file://${source}`;
|
|
40
|
-
}, [source]);
|
|
41
|
-
|
|
42
|
-
// Memoize image source
|
|
43
|
-
const imageSource = useMemo(() => ({
|
|
44
|
-
uri: resolvedUri
|
|
45
|
-
}), [resolvedUri]);
|
|
46
|
-
if (!source) return null;
|
|
47
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
48
|
-
style: styles.container,
|
|
49
|
-
children: [isLoading && /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
50
|
-
size: "large",
|
|
51
|
-
style: styles.loader
|
|
52
|
-
}), /*#__PURE__*/_jsx(FastImage, {
|
|
53
|
-
source: imageSource,
|
|
54
|
-
onLoadEnd: handleLoadEnd,
|
|
55
|
-
style: imageStyles,
|
|
56
|
-
resizeMode: resizeMode,
|
|
57
|
-
onError: handleError
|
|
58
|
-
})]
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
const styles = StyleSheet.create({
|
|
62
|
-
container: {
|
|
63
|
-
flex: 1,
|
|
64
|
-
width: Display.fullWidth,
|
|
65
|
-
height: Display.fullHeight,
|
|
66
|
-
justifyContent: 'center',
|
|
67
|
-
alignItems: 'center'
|
|
68
|
-
},
|
|
69
|
-
loader: {
|
|
70
|
-
position: 'absolute'
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
export default /*#__PURE__*/React.memo(SplashImage);
|
|
74
|
-
//# sourceMappingURL=SplashImage.js.map
|
package/lib/module/components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","useMemo","useCallback","useEffect","FastImage","ActivityIndicator","View","StyleSheet","Display","jsx","_jsx","jsxs","_jsxs","SplashImage","fullscreen","height","resizeMode","source","width","isLoading","setIsLoading","imageStyles","fullWidth","fullHeight","flex","handleLoadEnd","handleError","resolvedUri","startsWith","imageSource","uri","style","styles","container","children","size","loader","onLoadEnd","onError","create","justifyContent","alignItems","position","memo"],"sourceRoot":"../../../../../../../../src","sources":["components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,OAAO,EAAEC,WAAW,EAAEC,SAAS,QAAQ,OAAO;AACxE,OAAOC,SAAS,MAAM,yBAAyB;AAC/C,SAASC,iBAAiB,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAClE,OAAOC,OAAO,MAAM,oCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAWtD,MAAMC,WAAuC,GAAGA,CAAC;EAC/CC,UAAU;EACVC,MAAM;EACNC,UAAU,GAAG,SAAS;EACtBC,MAAM;EACNC;AACF,CAAC,KAAK;EACJ,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGpB,QAAQ,CAAC,CAAC,CAACiB,MAAM,CAAC;;EAEpD;EACAd,SAAS,CAAC,MAAM;IACd,IAAIc,MAAM,EAAE;MACVG,YAAY,CAAC,IAAI,CAAC;IACpB;EACF,CAAC,EAAE,CAACH,MAAM,CAAC,CAAC;EAEZ,MAAMI,WAAW,GAAGpB,OAAO,CACzB,OAAO;IACLiB,KAAK,EAAEJ,UAAU,GAAGN,OAAO,CAACc,SAAS,GAAGJ,KAAK;IAC7CH,MAAM,EAAED,UAAU,GAAGN,OAAO,CAACe,UAAU,GAAGR,MAAM;IAChDS,IAAI,EAAE;EACR,CAAC,CAAC,EACF,CAACV,UAAU,EAAEI,KA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,CAAC;IACPN,KAAK,EAAEV,OAAO,CAACc,SAAS;IACxBP,MAAM,EAAEP,OAAO,CAACe,UAAU;IAC1BiB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDL,MAAM,EAAE;IACNM,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,4BAAe3C,KAAK,CAAC4C,IAAI,CAAC9B,WAAW,CAAC","ignoreList":[]}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @author Naresh Dhamu
|
|
5
|
-
* @lastModified Thu 12 Jun 2025 at 09:22 AM
|
|
6
|
-
*/
|
|
7
|
-
import React, { useMemo, useCallback } from 'react';
|
|
8
|
-
import LottieView from 'lottie-react-native';
|
|
9
|
-
import { StyleSheet } from 'react-native';
|
|
10
|
-
import Display from "../../../../../../utils/Display.js";
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
const SplashLottie = ({
|
|
13
|
-
fullscreen,
|
|
14
|
-
height,
|
|
15
|
-
source,
|
|
16
|
-
resizeMode = 'contain',
|
|
17
|
-
width,
|
|
18
|
-
onAnimationFinish
|
|
19
|
-
}) => {
|
|
20
|
-
// Memoize the style object
|
|
21
|
-
const lottieStyle = useMemo(() => ({
|
|
22
|
-
...styles.base,
|
|
23
|
-
width: fullscreen ? Display.fullWidth : width,
|
|
24
|
-
height: fullscreen ? Display.fullHeight : height,
|
|
25
|
-
...(fullscreen ? styles.fullscreen : {})
|
|
26
|
-
}), [fullscreen, width, height]);
|
|
27
|
-
|
|
28
|
-
// Memoize Lottie source
|
|
29
|
-
const lottieSource = useMemo(() => ({
|
|
30
|
-
uri: source
|
|
31
|
-
}), [source]);
|
|
32
|
-
|
|
33
|
-
// Memoize error handler
|
|
34
|
-
const handleAnimationFailure = useCallback(error => {
|
|
35
|
-
console.error('Lottie animation failed to load:', error);
|
|
36
|
-
}, []);
|
|
37
|
-
|
|
38
|
-
// Early return if invalid source
|
|
39
|
-
if (!source) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
return /*#__PURE__*/_jsx(LottieView, {
|
|
43
|
-
source: lottieSource,
|
|
44
|
-
autoPlay: true,
|
|
45
|
-
loop: false,
|
|
46
|
-
onAnimationFinish: onAnimationFinish,
|
|
47
|
-
style: lottieStyle,
|
|
48
|
-
resizeMode: resizeMode,
|
|
49
|
-
onAnimationFailure: handleAnimationFailure,
|
|
50
|
-
hardwareAccelerationAndroid: true,
|
|
51
|
-
cacheComposition: true
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
const styles = StyleSheet.create({
|
|
55
|
-
base: {
|
|
56
|
-
alignSelf: 'center'
|
|
57
|
-
},
|
|
58
|
-
fullscreen: {
|
|
59
|
-
flex: 1
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
export default /*#__PURE__*/React.memo(SplashLottie);
|
|
63
|
-
//# sourceMappingURL=SplashLottie.js.map
|
package/lib/module/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","useCallback","LottieView","StyleSheet","Display","jsx","_jsx","SplashLottie","fullscreen","height","source","resizeMode","width","onAnimationFinish","lottieStyle","styles","base","fullWidth","fullHeight","lottieSource","uri","handleAnimationFailure","error","console","autoPlay","loop","style","onAnimationFailure","hardwareAccelerationAndroid","cacheComposition","create","alignSelf","flex","memo"],"sourceRoot":"../../../../../../../../src","sources":["components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,WAAW,QAAQ,OAAO;AACnD,OAAOC,UAAU,MAAM,qBAAqB;AAC5C,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,OAAO,MAAM,oCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA;A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