@coorpacademy/components 11.14.4 → 11.14.6

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.
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ export interface Props {
3
+ hasPermission: boolean;
4
+ onScan: (token?: string) => void;
5
+ onHelpPress: () => void;
6
+ locales: {
7
+ title: string;
8
+ explanation1: string;
9
+ explanation2: string;
10
+ ctaHelp: string;
11
+ titleHelp: string;
12
+ };
13
+ }
14
+ declare const QRCodeScanner: (props: Props) => JSX.Element;
15
+ export default QRCodeScanner;
16
+ //# sourceMappingURL=index.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/qr-code-scanner/index.native.tsx"],"names":[],"mappings":";AAQA,MAAM,WAAW,KAAK;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAuPD,QAAA,MAAM,aAAa,UAAW,KAAK,gBAkDlC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,348 @@
1
+ import React, { useCallback, useEffect, useRef } from 'react';
2
+ import { Animated, Easing, StyleSheet, Text, View } from 'react-native';
3
+ import QRCodeScannerBase from 'react-native-qrcode-scanner';
4
+ import { NovaCompositionCoorpacademyQrCode as QrCodeIcon } from '@coorpacademy/nova-icons';
5
+ import Touchable from '../../../hoc/touchable/index.native';
6
+ const HEIGHT = 280;
7
+ const WIDTH = 280;
8
+ const COLOR = '#fff';
9
+ const BORDER_RADIUS = 8;
10
+ const LINE_WIDTH = 7;
11
+ const styles = StyleSheet.create({
12
+ container: {
13
+ width: '100%',
14
+ height: '100%'
15
+ },
16
+ camera: {
17
+ width: '100%',
18
+ height: '100%'
19
+ },
20
+ blurs: {
21
+ position: 'absolute',
22
+ width: '100%',
23
+ height: '100%',
24
+ opacity: 0.6
25
+ },
26
+ blurTop: {
27
+ position: 'absolute',
28
+ backgroundColor: '#000',
29
+ width: '100%',
30
+ height: '35%',
31
+ transform: [{
32
+ translateY: -HEIGHT / 2 + LINE_WIDTH / 2
33
+ }]
34
+ },
35
+ blurBottom: {
36
+ position: 'absolute',
37
+ backgroundColor: '#000',
38
+ width: '100%',
39
+ height: '65%',
40
+ bottom: 0,
41
+ transform: [{
42
+ translateY: HEIGHT / 2 - LINE_WIDTH / 2
43
+ }]
44
+ },
45
+ blurLeft: {
46
+ position: 'absolute',
47
+ backgroundColor: '#000',
48
+ width: '50%',
49
+ height: HEIGHT - LINE_WIDTH,
50
+ left: 0,
51
+ top: '35%',
52
+ transform: [{
53
+ translateX: -WIDTH / 2 + LINE_WIDTH / 2
54
+ }, {
55
+ translateY: -HEIGHT / 2 + LINE_WIDTH / 2
56
+ }]
57
+ },
58
+ blurRight: {
59
+ position: 'absolute',
60
+ backgroundColor: '#000',
61
+ width: '50%',
62
+ height: HEIGHT - LINE_WIDTH,
63
+ right: 0,
64
+ top: '35%',
65
+ transform: [{
66
+ translateX: WIDTH / 2 - LINE_WIDTH / 2
67
+ }, {
68
+ translateY: -HEIGHT / 2 + LINE_WIDTH / 2
69
+ }]
70
+ }
71
+ });
72
+ const targetStyle = StyleSheet.create({
73
+ target: {
74
+ width: HEIGHT,
75
+ height: WIDTH,
76
+ top: '35%',
77
+ left: '50%',
78
+ transform: [{
79
+ translateX: -WIDTH / 2
80
+ }, {
81
+ translateY: -HEIGHT / 2
82
+ }],
83
+ borderRadius: BORDER_RADIUS,
84
+ position: 'absolute',
85
+ overflow: 'hidden'
86
+ },
87
+ square: {
88
+ position: 'absolute',
89
+ width: '35%',
90
+ height: '35%'
91
+ },
92
+ stroke: {
93
+ position: 'absolute',
94
+ top: 0,
95
+ left: 0,
96
+ backgroundColor: COLOR,
97
+ borderRadius: BORDER_RADIUS
98
+ }
99
+ });
100
+ const explanationsStyle = StyleSheet.create({
101
+ explanations: {
102
+ position: 'absolute',
103
+ width: '100%',
104
+ height: 300,
105
+ bottom: 0,
106
+ backgroundColor: '#fff',
107
+ borderRadius: 30,
108
+ padding: 24
109
+ },
110
+ titleWrapper: {
111
+ flexDirection: 'row',
112
+ alignItems: 'center',
113
+ justifyContent: 'flex-start',
114
+ paddingVertical: 16
115
+ },
116
+ qrCodeIcon: {
117
+ fill: '#000',
118
+ height: 14,
119
+ width: 14
120
+ },
121
+ titleText: {
122
+ fontWeight: '600',
123
+ color: '#1D1D2B',
124
+ fontSize: 21,
125
+ lineHeight: 30,
126
+ letterSpacing: 0.5,
127
+ marginLeft: 5
128
+ },
129
+ line: {
130
+ flexDirection: 'row',
131
+ paddingRight: 24,
132
+ paddingVertical: 8
133
+ },
134
+ lineText: {
135
+ fontWeight: '400',
136
+ color: '#1D1D2B',
137
+ fontSize: 18,
138
+ lineHeight: 24,
139
+ letterSpacing: 0.5,
140
+ marginRight: 7
141
+ },
142
+ help: {
143
+ flexDirection: 'row',
144
+ marginTop: 12
145
+ },
146
+ titleHelp: {
147
+ fontSize: 16,
148
+ color: '#9999A8'
149
+ },
150
+ ctaHelp: {
151
+ marginLeft: 5,
152
+ fontSize: 16,
153
+ letterSpacing: 0.5,
154
+ textDecorationLine: 'underline',
155
+ color: '#9999A8'
156
+ }
157
+ });
158
+
159
+ const Corner = props => {
160
+ const {
161
+ position,
162
+ lineLength
163
+ } = props;
164
+ return /*#__PURE__*/React.createElement(View, {
165
+ style: [targetStyle.square, position]
166
+ }, /*#__PURE__*/React.createElement(Animated.View, {
167
+ style: [targetStyle.stroke, {
168
+ height: LINE_WIDTH,
169
+ width: lineLength
170
+ }]
171
+ }), /*#__PURE__*/React.createElement(Animated.View, {
172
+ style: [targetStyle.stroke, {
173
+ width: LINE_WIDTH,
174
+ height: lineLength
175
+ }]
176
+ }));
177
+ };
178
+
179
+ const Target = () => {
180
+ const animationRef = useRef(new Animated.Value(0)).current;
181
+ const lineLength = animationRef.interpolate({
182
+ inputRange: [0, 1],
183
+ outputRange: [0, WIDTH * 0.35]
184
+ });
185
+ useEffect(() => {
186
+ const animation = Animated.timing(animationRef, {
187
+ toValue: 1,
188
+ duration: 700,
189
+ delay: 400,
190
+ easing: Easing.out(Easing.sin),
191
+ useNativeDriver: false
192
+ });
193
+ animation.start(); // on mount only
194
+ // eslint-disable-next-line react-hooks/exhaustive-deps
195
+ }, []);
196
+ return /*#__PURE__*/React.createElement(View, {
197
+ style: targetStyle.target
198
+ }, /*#__PURE__*/React.createElement(Corner, {
199
+ lineLength: lineLength,
200
+ position: {
201
+ top: 0,
202
+ left: 0,
203
+ transform: [{
204
+ rotate: '0deg'
205
+ }]
206
+ }
207
+ }), /*#__PURE__*/React.createElement(Corner, {
208
+ lineLength: lineLength,
209
+ position: {
210
+ top: 0,
211
+ right: 0,
212
+ transform: [{
213
+ rotate: '90deg'
214
+ }]
215
+ }
216
+ }), /*#__PURE__*/React.createElement(Corner, {
217
+ lineLength: lineLength,
218
+ position: {
219
+ bottom: 0,
220
+ right: 0,
221
+ transform: [{
222
+ rotate: '180deg'
223
+ }]
224
+ }
225
+ }), /*#__PURE__*/React.createElement(Corner, {
226
+ lineLength: lineLength,
227
+ position: {
228
+ bottom: 0,
229
+ left: 0,
230
+ transform: [{
231
+ rotate: '270deg'
232
+ }]
233
+ }
234
+ }));
235
+ };
236
+
237
+ const Explanations = props => {
238
+ const {
239
+ locales,
240
+ onHelpPress
241
+ } = props;
242
+ const animationRef = useRef(new Animated.Value(0)).current;
243
+ const animateBottom = animationRef.interpolate({
244
+ inputRange: [0, 1],
245
+ outputRange: [-300, 0]
246
+ });
247
+ useEffect(() => {
248
+ const animation = Animated.timing(animationRef, {
249
+ toValue: 1,
250
+ duration: 600,
251
+ delay: 400,
252
+ easing: Easing.out(Easing.sin),
253
+ useNativeDriver: false
254
+ });
255
+ animation.start(); // on mount only
256
+ // eslint-disable-next-line react-hooks/exhaustive-deps
257
+ }, []);
258
+ return /*#__PURE__*/React.createElement(Animated.View, {
259
+ style: [explanationsStyle.explanations, {
260
+ bottom: animateBottom
261
+ }]
262
+ }, /*#__PURE__*/React.createElement(View, {
263
+ style: explanationsStyle.titleWrapper
264
+ }, /*#__PURE__*/React.createElement(QrCodeIcon, {
265
+ style: explanationsStyle.qrCodeIcon
266
+ }), /*#__PURE__*/React.createElement(Text, {
267
+ style: explanationsStyle.titleText
268
+ }, locales.title)), /*#__PURE__*/React.createElement(View, {
269
+ style: explanationsStyle.line
270
+ }, /*#__PURE__*/React.createElement(Text, {
271
+ style: explanationsStyle.lineText
272
+ }, "1."), /*#__PURE__*/React.createElement(Text, {
273
+ style: explanationsStyle.lineText
274
+ }, locales.explanation1)), /*#__PURE__*/React.createElement(View, {
275
+ style: explanationsStyle.line
276
+ }, /*#__PURE__*/React.createElement(Text, {
277
+ style: explanationsStyle.lineText
278
+ }, "2."), /*#__PURE__*/React.createElement(Text, {
279
+ style: explanationsStyle.lineText
280
+ }, locales.explanation2)), /*#__PURE__*/React.createElement(Touchable, {
281
+ onPress: onHelpPress,
282
+ style: explanationsStyle.help
283
+ }, /*#__PURE__*/React.createElement(Text, {
284
+ style: explanationsStyle.titleHelp
285
+ }, locales.titleHelp), /*#__PURE__*/React.createElement(Text, {
286
+ style: explanationsStyle.ctaHelp
287
+ }, locales.ctaHelp)));
288
+ };
289
+
290
+ const QRCodeScanner = props => {
291
+ const {
292
+ hasPermission,
293
+ locales,
294
+ onScan,
295
+ onHelpPress
296
+ } = props;
297
+ const handleRead = useCallback(({
298
+ data
299
+ }) => {
300
+ onScan(typeof data === 'string' ? data : undefined); // on mount only
301
+ // eslint-disable-next-line react-hooks/exhaustive-deps
302
+ }, []);
303
+ const blurRef = useRef(new Animated.Value(0)).current;
304
+ const blurOpacity = blurRef.interpolate({
305
+ inputRange: [0, 1],
306
+ outputRange: [0, 0.7]
307
+ });
308
+ useEffect(() => {
309
+ const animation = Animated.timing(blurRef, {
310
+ toValue: 1,
311
+ duration: 800,
312
+ delay: 600,
313
+ easing: Easing.out(Easing.sin),
314
+ useNativeDriver: false
315
+ });
316
+ animation.start(); // on mount only
317
+ // eslint-disable-next-line react-hooks/exhaustive-deps
318
+ }, []);
319
+ return /*#__PURE__*/React.createElement(View, {
320
+ style: styles.container,
321
+ testID: "qr-code-scanner"
322
+ }, hasPermission ? /*#__PURE__*/React.createElement(QRCodeScannerBase, {
323
+ fadeIn: false,
324
+ onRead: handleRead,
325
+ cameraStyle: styles.camera,
326
+ cameraProps: {
327
+ captureAudio: false
328
+ }
329
+ }) : null, /*#__PURE__*/React.createElement(Animated.View, {
330
+ style: [styles.blurs, {
331
+ opacity: blurOpacity
332
+ }]
333
+ }, /*#__PURE__*/React.createElement(View, {
334
+ style: styles.blurTop
335
+ }), /*#__PURE__*/React.createElement(View, {
336
+ style: styles.blurBottom
337
+ }), /*#__PURE__*/React.createElement(View, {
338
+ style: styles.blurLeft
339
+ }), /*#__PURE__*/React.createElement(View, {
340
+ style: styles.blurRight
341
+ })), /*#__PURE__*/React.createElement(Target, null), /*#__PURE__*/React.createElement(Explanations, {
342
+ locales: locales,
343
+ onHelpPress: onHelpPress
344
+ }));
345
+ };
346
+
347
+ export default QRCodeScanner;
348
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.js","names":["React","useCallback","useEffect","useRef","Animated","Easing","StyleSheet","Text","View","QRCodeScannerBase","NovaCompositionCoorpacademyQrCode","QrCodeIcon","Touchable","HEIGHT","WIDTH","COLOR","BORDER_RADIUS","LINE_WIDTH","styles","create","container","width","height","camera","blurs","position","opacity","blurTop","backgroundColor","transform","translateY","blurBottom","bottom","blurLeft","left","top","translateX","blurRight","right","targetStyle","target","borderRadius","overflow","square","stroke","explanationsStyle","explanations","padding","titleWrapper","flexDirection","alignItems","justifyContent","paddingVertical","qrCodeIcon","fill","titleText","fontWeight","color","fontSize","lineHeight","letterSpacing","marginLeft","line","paddingRight","lineText","marginRight","help","marginTop","titleHelp","ctaHelp","textDecorationLine","Corner","props","lineLength","Target","animationRef","Value","current","interpolate","inputRange","outputRange","animation","timing","toValue","duration","delay","easing","out","sin","useNativeDriver","start","rotate","Explanations","locales","onHelpPress","animateBottom","title","explanation1","explanation2","QRCodeScanner","hasPermission","onScan","handleRead","data","undefined","blurRef","blurOpacity","captureAudio"],"sources":["../../../../src/template/mobile-login/qr-code-scanner/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useRef} from 'react';\nimport {Animated, Easing, StyleSheet, Text, View, ViewStyle} from 'react-native';\n\nimport QRCodeScannerBase from 'react-native-qrcode-scanner';\nimport type {BarCodeReadEvent} from 'react-native-camera';\nimport {NovaCompositionCoorpacademyQrCode as QrCodeIcon} from '@coorpacademy/nova-icons';\nimport Touchable from '../../../hoc/touchable/index.native';\n\nexport interface Props {\n hasPermission: boolean;\n onScan: (token?: string) => void;\n onHelpPress: () => void;\n locales: {\n title: string;\n explanation1: string;\n explanation2: string;\n ctaHelp: string;\n titleHelp: string;\n };\n}\n\nconst HEIGHT = 280;\nconst WIDTH = 280;\nconst COLOR = '#fff';\nconst BORDER_RADIUS = 8;\n\nconst LINE_WIDTH = 7;\n\nconst styles = StyleSheet.create({\n container: {\n width: '100%',\n height: '100%'\n },\n camera: {\n width: '100%',\n height: '100%'\n },\n blurs: {\n position: 'absolute',\n width: '100%',\n height: '100%',\n opacity: 0.6\n },\n blurTop: {\n position: 'absolute',\n backgroundColor: '#000',\n width: '100%',\n height: '35%',\n transform: [{translateY: -HEIGHT / 2 + LINE_WIDTH / 2}]\n },\n blurBottom: {\n position: 'absolute',\n backgroundColor: '#000',\n width: '100%',\n height: '65%',\n bottom: 0,\n transform: [{translateY: HEIGHT / 2 - LINE_WIDTH / 2}]\n },\n blurLeft: {\n position: 'absolute',\n backgroundColor: '#000',\n width: '50%',\n height: HEIGHT - LINE_WIDTH,\n left: 0,\n top: '35%',\n transform: [\n {translateX: -WIDTH / 2 + LINE_WIDTH / 2},\n {translateY: -HEIGHT / 2 + LINE_WIDTH / 2}\n ]\n },\n blurRight: {\n position: 'absolute',\n backgroundColor: '#000',\n width: '50%',\n height: HEIGHT - LINE_WIDTH,\n right: 0,\n top: '35%',\n transform: [\n {translateX: WIDTH / 2 - LINE_WIDTH / 2},\n {translateY: -HEIGHT / 2 + LINE_WIDTH / 2}\n ]\n }\n});\n\nconst targetStyle = StyleSheet.create({\n target: {\n width: HEIGHT,\n height: WIDTH,\n top: '35%',\n left: '50%',\n transform: [{translateX: -WIDTH / 2}, {translateY: -HEIGHT / 2}],\n borderRadius: BORDER_RADIUS,\n position: 'absolute',\n overflow: 'hidden'\n },\n square: {\n position: 'absolute',\n width: '35%',\n height: '35%'\n },\n stroke: {\n position: 'absolute',\n top: 0,\n left: 0,\n backgroundColor: COLOR,\n borderRadius: BORDER_RADIUS\n }\n});\n\nconst explanationsStyle = StyleSheet.create({\n explanations: {\n position: 'absolute',\n width: '100%',\n height: 300,\n bottom: 0,\n backgroundColor: '#fff',\n borderRadius: 30,\n padding: 24\n },\n titleWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'flex-start',\n paddingVertical: 16\n },\n qrCodeIcon: {\n fill: '#000',\n height: 14,\n width: 14\n },\n titleText: {\n fontWeight: '600',\n color: '#1D1D2B',\n fontSize: 21,\n lineHeight: 30,\n letterSpacing: 0.5,\n marginLeft: 5\n },\n line: {\n flexDirection: 'row',\n paddingRight: 24,\n paddingVertical: 8\n },\n lineText: {\n fontWeight: '400',\n color: '#1D1D2B',\n fontSize: 18,\n lineHeight: 24,\n letterSpacing: 0.5,\n marginRight: 7\n },\n help: {\n flexDirection: 'row',\n marginTop: 12\n },\n titleHelp: {\n fontSize: 16,\n color: '#9999A8'\n },\n ctaHelp: {\n marginLeft: 5,\n fontSize: 16,\n letterSpacing: 0.5,\n textDecorationLine: 'underline',\n color: '#9999A8'\n }\n});\n\nconst Corner = (props: {position: ViewStyle; lineLength: Animated.AnimatedInterpolation}) => {\n const {position, lineLength} = props;\n\n return (\n <View style={[targetStyle.square, position]}>\n <Animated.View style={[targetStyle.stroke, {height: LINE_WIDTH, width: lineLength}]} />\n <Animated.View style={[targetStyle.stroke, {width: LINE_WIDTH, height: lineLength}]} />\n </View>\n );\n};\n\nconst Target = () => {\n const animationRef = useRef<Animated.Value>(new Animated.Value(0)).current;\n const lineLength = animationRef.interpolate({\n inputRange: [0, 1],\n outputRange: [0, WIDTH * 0.35]\n });\n\n useEffect(() => {\n const animation = Animated.timing(animationRef, {\n toValue: 1,\n duration: 700,\n delay: 400,\n easing: Easing.out(Easing.sin),\n useNativeDriver: false\n });\n\n animation.start();\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <View style={targetStyle.target}>\n <Corner lineLength={lineLength} position={{top: 0, left: 0, transform: [{rotate: '0deg'}]}} />\n <Corner\n lineLength={lineLength}\n position={{top: 0, right: 0, transform: [{rotate: '90deg'}]}}\n />\n <Corner\n lineLength={lineLength}\n position={{bottom: 0, right: 0, transform: [{rotate: '180deg'}]}}\n />\n <Corner\n lineLength={lineLength}\n position={{bottom: 0, left: 0, transform: [{rotate: '270deg'}]}}\n />\n </View>\n );\n};\n\nconst Explanations = (props: {locales: Props['locales']; onHelpPress: Props['onHelpPress']}) => {\n const {locales, onHelpPress} = props;\n\n const animationRef = useRef<Animated.Value>(new Animated.Value(0)).current;\n const animateBottom = animationRef.interpolate({\n inputRange: [0, 1],\n outputRange: [-300, 0]\n });\n\n useEffect(() => {\n const animation = Animated.timing(animationRef, {\n toValue: 1,\n duration: 600,\n delay: 400,\n easing: Easing.out(Easing.sin),\n useNativeDriver: false\n });\n\n animation.start();\n\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <Animated.View style={[explanationsStyle.explanations, {bottom: animateBottom}]}>\n <View style={explanationsStyle.titleWrapper}>\n <QrCodeIcon style={explanationsStyle.qrCodeIcon} />\n <Text style={explanationsStyle.titleText}>{locales.title}</Text>\n </View>\n <View style={explanationsStyle.line}>\n <Text style={explanationsStyle.lineText}>1.</Text>\n <Text style={explanationsStyle.lineText}>{locales.explanation1}</Text>\n </View>\n <View style={explanationsStyle.line}>\n <Text style={explanationsStyle.lineText}>2.</Text>\n <Text style={explanationsStyle.lineText}>{locales.explanation2}</Text>\n </View>\n\n <Touchable onPress={onHelpPress} style={explanationsStyle.help}>\n <Text style={explanationsStyle.titleHelp}>{locales.titleHelp}</Text>\n <Text style={explanationsStyle.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </Animated.View>\n );\n};\n\nconst QRCodeScanner = (props: Props) => {\n const {hasPermission, locales, onScan, onHelpPress} = props;\n\n const handleRead = useCallback(({data}: BarCodeReadEvent) => {\n onScan(typeof data === 'string' ? data : undefined);\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const blurRef = useRef<Animated.Value>(new Animated.Value(0)).current;\n const blurOpacity = blurRef.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.7]\n });\n\n useEffect(() => {\n const animation = Animated.timing(blurRef, {\n toValue: 1,\n duration: 800,\n delay: 600,\n easing: Easing.out(Easing.sin),\n useNativeDriver: false\n });\n\n animation.start();\n\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <View style={styles.container} testID=\"qr-code-scanner\">\n {hasPermission ? (\n <QRCodeScannerBase\n fadeIn={false}\n onRead={handleRead}\n cameraStyle={styles.camera}\n cameraProps={{captureAudio: false}}\n />\n ) : null}\n <Animated.View style={[styles.blurs, {opacity: blurOpacity}]}>\n <View style={styles.blurTop} />\n <View style={styles.blurBottom} />\n <View style={styles.blurLeft} />\n <View style={styles.blurRight} />\n </Animated.View>\n <Target />\n <Explanations locales={locales} onHelpPress={onHelpPress} />\n </View>\n );\n};\n\nexport default QRCodeScanner;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,SAA5B,EAAuCC,MAAvC,QAAoD,OAApD;AACA,SAAQC,QAAR,EAAkBC,MAAlB,EAA0BC,UAA1B,EAAsCC,IAAtC,EAA4CC,IAA5C,QAAkE,cAAlE;AAEA,OAAOC,iBAAP,MAA8B,6BAA9B;AAEA,SAAQC,iCAAiC,IAAIC,UAA7C,QAA8D,0BAA9D;AACA,OAAOC,SAAP,MAAsB,qCAAtB;AAeA,MAAMC,MAAM,GAAG,GAAf;AACA,MAAMC,KAAK,GAAG,GAAd;AACA,MAAMC,KAAK,GAAG,MAAd;AACA,MAAMC,aAAa,GAAG,CAAtB;AAEA,MAAMC,UAAU,GAAG,CAAnB;AAEA,MAAMC,MAAM,GAAGZ,UAAU,CAACa,MAAX,CAAkB;EAC/BC,SAAS,EAAE;IACTC,KAAK,EAAE,MADE;IAETC,MAAM,EAAE;EAFC,CADoB;EAK/BC,MAAM,EAAE;IACNF,KAAK,EAAE,MADD;IAENC,MAAM,EAAE;EAFF,CALuB;EAS/BE,KAAK,EAAE;IACLC,QAAQ,EAAE,UADL;IAELJ,KAAK,EAAE,MAFF;IAGLC,MAAM,EAAE,MAHH;IAILI,OAAO,EAAE;EAJJ,CATwB;EAe/BC,OAAO,EAAE;IACPF,QAAQ,EAAE,UADH;IAEPG,eAAe,EAAE,MAFV;IAGPP,KAAK,EAAE,MAHA;IAIPC,MAAM,EAAE,KAJD;IAKPO,SAAS,EAAE,CAAC;MAACC,UAAU,EAAE,CAACjB,MAAD,GAAU,CAAV,GAAcI,UAAU,GAAG;IAAxC,CAAD;EALJ,CAfsB;EAsB/Bc,UAAU,EAAE;IACVN,QAAQ,EAAE,UADA;IAEVG,eAAe,EAAE,MAFP;IAGVP,KAAK,EAAE,MAHG;IAIVC,MAAM,EAAE,KAJE;I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eAAeK,aAAf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":";AA+IA,oBAAY,KAAK,GAAG;IAClB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;QACvB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,OAAO,UAAW,KAAK,uBA0D5B,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":";AA0KA,oBAAY,KAAK,GAAG;IAClB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;QACvB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,OAAO,UAAW,KAAK,uBAqI5B,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,7 +1,8 @@
1
- import React, { useEffect, useState } from 'react';
2
- import { StyleSheet, Text, View } from 'react-native';
1
+ import React, { useEffect, useRef, useState } from 'react';
2
+ import { Animated, StyleSheet, Text, View } from 'react-native';
3
3
  import LinearGradient from 'react-native-linear-gradient';
4
4
  import { NovaCompositionCoorpacademyLogoCoorp as LogoCoorp, NovaCompositionCoorpacademyQrCode as QrCodeIcon, NovaCompositionCoorpacademyEmail as MailIcon } from '@coorpacademy/nova-icons';
5
+ import { useAnimateProp, useTranslateY } from '@coorpacademy/react-native-animation';
5
6
  import Touchable from '../../../hoc/touchable/index.native';
6
7
  import { useTemplateContext } from '../../app-review/template-context';
7
8
 
@@ -20,12 +21,20 @@ const createStyleSheet = theme => StyleSheet.create({
20
21
  width: '100%',
21
22
  alignItems: 'flex-start'
22
23
  },
24
+ gradients: {
25
+ position: 'absolute',
26
+ top: 400,
27
+ bottom: 400,
28
+ left: 0,
29
+ right: 0,
30
+ flex: 1
31
+ },
23
32
  gradient: {
24
33
  position: 'absolute',
25
- top: -100,
34
+ top: -730,
26
35
  bottom: 0,
27
- left: -180,
28
- right: 0,
36
+ left: -380,
37
+ right: -380,
29
38
  opacity: 1,
30
39
  transform: [{
31
40
  rotate: '35deg'
@@ -33,18 +42,32 @@ const createStyleSheet = theme => StyleSheet.create({
33
42
  },
34
43
  gradient2: {
35
44
  position: 'absolute',
36
- top: -80,
37
- bottom: 0,
38
- left: 0,
39
- right: -200,
40
- opacity: 0.5,
45
+ top: -630,
46
+ bottom: -200,
47
+ left: -300,
48
+ right: -400,
49
+ opacity: 0.6,
41
50
  transform: [{
42
51
  rotate: '-35deg'
43
52
  }]
44
53
  },
54
+ animatedLogoWrapper: {
55
+ alignItems: 'center'
56
+ },
57
+ animatedLogo: {
58
+ position: 'absolute',
59
+ width: 77,
60
+ height: 100
61
+ },
45
62
  logo: {
46
63
  padding: 100
47
64
  },
65
+ logoBG: {
66
+ backgroundColor: '#fff',
67
+ top: 20,
68
+ width: 60,
69
+ height: 60
70
+ },
48
71
  title: {
49
72
  fontWeight: '600',
50
73
  fontSize: 28,
@@ -129,36 +152,102 @@ const Welcome = props => {
129
152
  theme
130
153
  } = useTemplateContext();
131
154
  const [styleSheet, setStylesheet] = useState(null);
155
+ const translateGradients = useTranslateY({
156
+ fromValue: 0,
157
+ toValue: -200,
158
+ duration: 300,
159
+ delay: 750
160
+ });
161
+ const translateContent = useTranslateY({
162
+ fromValue: 170,
163
+ toValue: 0,
164
+ duration: 450,
165
+ delay: 750
166
+ });
167
+ const fadeInContent = useAnimateProp({
168
+ property: 'opacity',
169
+ fromValue: 0,
170
+ toValue: 1,
171
+ duration: 650,
172
+ delay: 750
173
+ });
174
+ const fadeOutStartLogo = useAnimateProp({
175
+ property: 'opacity',
176
+ fromValue: 1,
177
+ toValue: 0,
178
+ duration: 450,
179
+ delay: 1000
180
+ });
181
+ const fadeInFinalLogo = useAnimateProp({
182
+ property: 'opacity',
183
+ fromValue: 0,
184
+ toValue: 1,
185
+ duration: 250,
186
+ delay: 900
187
+ });
188
+ const scaleAnim = useRef(new Animated.Value(0)).current;
189
+ const interpolateScale = scaleAnim.interpolate({
190
+ inputRange: [0, 0.4, 0.5, 0.6, 1],
191
+ outputRange: [1, 1.7, 1.7, 1.7, 1]
192
+ });
132
193
  useEffect(() => {
133
194
  const _stylesheet = createStyleSheet(theme);
134
195
 
135
196
  setStylesheet(_stylesheet);
136
197
  }, [theme]);
198
+ useEffect(() => {
199
+ fadeInContent.start();
200
+ fadeInFinalLogo.start();
201
+ fadeOutStartLogo.start();
202
+ translateContent.start();
203
+ translateGradients.start();
204
+ const animatedScale = Animated.timing(scaleAnim, {
205
+ toValue: 1,
206
+ duration: 1000,
207
+ useNativeDriver: true
208
+ });
209
+ animatedScale.start(); // on mount only
210
+ // eslint-disable-next-line react-hooks/exhaustive-deps
211
+ }, []);
137
212
 
138
213
  if (!styleSheet) {
139
214
  return null;
140
215
  }
141
216
 
142
- return /*#__PURE__*/React.createElement(View, {
143
- style: styleSheet.wrapper,
217
+ return /*#__PURE__*/React.createElement(Animated.View, {
218
+ style: [styleSheet.wrapper, translateContent.animatedStyle],
144
219
  testID: "welcome"
220
+ }, /*#__PURE__*/React.createElement(Animated.View, {
221
+ style: [styleSheet.gradients, translateGradients.animatedStyle]
145
222
  }, /*#__PURE__*/React.createElement(LinearGradient, {
146
223
  colors: ['#0061FF', '#fff'],
147
- locations: [0, 0.3],
224
+ locations: [0, 0.95],
148
225
  style: styleSheet.gradient
149
226
  }), /*#__PURE__*/React.createElement(LinearGradient, {
150
227
  colors: ['#2199AB', '#fff'],
151
- locations: [0, 0.3],
228
+ locations: [0, 0.95],
152
229
  style: styleSheet.gradient2
153
- }), /*#__PURE__*/React.createElement(Touchable, {
230
+ })), /*#__PURE__*/React.createElement(Touchable, {
154
231
  onLongPress: onDemoPress,
155
232
  style: styleSheet.logo
233
+ }, /*#__PURE__*/React.createElement(Animated.View, {
234
+ style: [styleSheet.animatedLogoWrapper, {
235
+ transform: [{
236
+ scale: interpolateScale
237
+ }]
238
+ }]
239
+ }, /*#__PURE__*/React.createElement(Animated.View, {
240
+ style: [styleSheet.logoBG, fadeInFinalLogo.animatedStyle]
241
+ }), /*#__PURE__*/React.createElement(Animated.View, {
242
+ style: [styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]
156
243
  }, /*#__PURE__*/React.createElement(LogoCoorp, {
157
- fill: theme.colors.cta,
158
- width: 77,
159
- height: 75
160
- })), /*#__PURE__*/React.createElement(View, {
161
- style: styleSheet.content
244
+ fill: "#0061FF"
245
+ })), /*#__PURE__*/React.createElement(Animated.View, {
246
+ style: [styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]
247
+ }, /*#__PURE__*/React.createElement(LogoCoorp, {
248
+ fill: "#fff"
249
+ })))), /*#__PURE__*/React.createElement(Animated.View, {
250
+ style: [styleSheet.content, fadeInContent.animatedStyle]
162
251
  }, /*#__PURE__*/React.createElement(Text, {
163
252
  style: styleSheet.title
164
253
  }, locales.title), /*#__PURE__*/React.createElement(Text, {