@coorpacademy/components 11.14.5 → 11.14.7

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;AAyPD,QAAA,MAAM,aAAa,UAAW,KAAK,gBAkDlC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,350 @@
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: 260,
105
+ bottom: 0,
106
+ backgroundColor: '#fff',
107
+ borderTopLeftRadius: 30,
108
+ borderTopRightRadius: 30,
109
+ paddingHorizontal: 24,
110
+ paddingVertical: 8
111
+ },
112
+ titleWrapper: {
113
+ flexDirection: 'row',
114
+ alignItems: 'center',
115
+ justifyContent: 'flex-start',
116
+ paddingVertical: 16
117
+ },
118
+ qrCodeIcon: {
119
+ fill: '#000',
120
+ height: 14,
121
+ width: 14
122
+ },
123
+ titleText: {
124
+ fontWeight: '600',
125
+ color: '#1D1D2B',
126
+ fontSize: 21,
127
+ lineHeight: 30,
128
+ letterSpacing: 0.5,
129
+ marginLeft: 5
130
+ },
131
+ line: {
132
+ flexDirection: 'row',
133
+ paddingRight: 24,
134
+ paddingVertical: 8
135
+ },
136
+ lineText: {
137
+ fontWeight: '400',
138
+ color: '#1D1D2B',
139
+ fontSize: 18,
140
+ lineHeight: 24,
141
+ letterSpacing: 0.5,
142
+ marginRight: 7
143
+ },
144
+ help: {
145
+ flexDirection: 'row',
146
+ marginTop: 12
147
+ },
148
+ titleHelp: {
149
+ fontSize: 16,
150
+ color: '#9999A8'
151
+ },
152
+ ctaHelp: {
153
+ marginLeft: 5,
154
+ fontSize: 16,
155
+ letterSpacing: 0.5,
156
+ textDecorationLine: 'underline',
157
+ color: '#9999A8'
158
+ }
159
+ });
160
+
161
+ const Corner = props => {
162
+ const {
163
+ position,
164
+ lineLength
165
+ } = props;
166
+ return /*#__PURE__*/React.createElement(View, {
167
+ style: [targetStyle.square, position]
168
+ }, /*#__PURE__*/React.createElement(Animated.View, {
169
+ style: [targetStyle.stroke, {
170
+ height: LINE_WIDTH,
171
+ width: lineLength
172
+ }]
173
+ }), /*#__PURE__*/React.createElement(Animated.View, {
174
+ style: [targetStyle.stroke, {
175
+ width: LINE_WIDTH,
176
+ height: lineLength
177
+ }]
178
+ }));
179
+ };
180
+
181
+ const Target = () => {
182
+ const animationRef = useRef(new Animated.Value(0)).current;
183
+ const lineLength = animationRef.interpolate({
184
+ inputRange: [0, 1],
185
+ outputRange: [0, WIDTH * 0.35]
186
+ });
187
+ useEffect(() => {
188
+ const animation = Animated.timing(animationRef, {
189
+ toValue: 1,
190
+ duration: 700,
191
+ delay: 400,
192
+ easing: Easing.out(Easing.sin),
193
+ useNativeDriver: false
194
+ });
195
+ animation.start(); // on mount only
196
+ // eslint-disable-next-line react-hooks/exhaustive-deps
197
+ }, []);
198
+ return /*#__PURE__*/React.createElement(View, {
199
+ style: targetStyle.target
200
+ }, /*#__PURE__*/React.createElement(Corner, {
201
+ lineLength: lineLength,
202
+ position: {
203
+ top: 0,
204
+ left: 0,
205
+ transform: [{
206
+ rotate: '0deg'
207
+ }]
208
+ }
209
+ }), /*#__PURE__*/React.createElement(Corner, {
210
+ lineLength: lineLength,
211
+ position: {
212
+ top: 0,
213
+ right: 0,
214
+ transform: [{
215
+ rotate: '90deg'
216
+ }]
217
+ }
218
+ }), /*#__PURE__*/React.createElement(Corner, {
219
+ lineLength: lineLength,
220
+ position: {
221
+ bottom: 0,
222
+ right: 0,
223
+ transform: [{
224
+ rotate: '180deg'
225
+ }]
226
+ }
227
+ }), /*#__PURE__*/React.createElement(Corner, {
228
+ lineLength: lineLength,
229
+ position: {
230
+ bottom: 0,
231
+ left: 0,
232
+ transform: [{
233
+ rotate: '270deg'
234
+ }]
235
+ }
236
+ }));
237
+ };
238
+
239
+ const Explanations = props => {
240
+ const {
241
+ locales,
242
+ onHelpPress
243
+ } = props;
244
+ const animationRef = useRef(new Animated.Value(0)).current;
245
+ const animateBottom = animationRef.interpolate({
246
+ inputRange: [0, 1],
247
+ outputRange: [-300, 0]
248
+ });
249
+ useEffect(() => {
250
+ const animation = Animated.timing(animationRef, {
251
+ toValue: 1,
252
+ duration: 600,
253
+ delay: 400,
254
+ easing: Easing.out(Easing.sin),
255
+ useNativeDriver: false
256
+ });
257
+ animation.start(); // on mount only
258
+ // eslint-disable-next-line react-hooks/exhaustive-deps
259
+ }, []);
260
+ return /*#__PURE__*/React.createElement(Animated.View, {
261
+ style: [explanationsStyle.explanations, {
262
+ bottom: animateBottom
263
+ }]
264
+ }, /*#__PURE__*/React.createElement(View, {
265
+ style: explanationsStyle.titleWrapper
266
+ }, /*#__PURE__*/React.createElement(QrCodeIcon, {
267
+ style: explanationsStyle.qrCodeIcon
268
+ }), /*#__PURE__*/React.createElement(Text, {
269
+ style: explanationsStyle.titleText
270
+ }, locales.title)), /*#__PURE__*/React.createElement(View, {
271
+ style: explanationsStyle.line
272
+ }, /*#__PURE__*/React.createElement(Text, {
273
+ style: explanationsStyle.lineText
274
+ }, "1."), /*#__PURE__*/React.createElement(Text, {
275
+ style: explanationsStyle.lineText
276
+ }, locales.explanation1)), /*#__PURE__*/React.createElement(View, {
277
+ style: explanationsStyle.line
278
+ }, /*#__PURE__*/React.createElement(Text, {
279
+ style: explanationsStyle.lineText
280
+ }, "2."), /*#__PURE__*/React.createElement(Text, {
281
+ style: explanationsStyle.lineText
282
+ }, locales.explanation2)), /*#__PURE__*/React.createElement(Touchable, {
283
+ onPress: onHelpPress,
284
+ style: explanationsStyle.help
285
+ }, /*#__PURE__*/React.createElement(Text, {
286
+ style: explanationsStyle.titleHelp
287
+ }, locales.titleHelp), /*#__PURE__*/React.createElement(Text, {
288
+ style: explanationsStyle.ctaHelp
289
+ }, locales.ctaHelp)));
290
+ };
291
+
292
+ const QRCodeScanner = props => {
293
+ const {
294
+ hasPermission,
295
+ locales,
296
+ onScan,
297
+ onHelpPress
298
+ } = props;
299
+ const handleRead = useCallback(({
300
+ data
301
+ }) => {
302
+ onScan(typeof data === 'string' ? data : undefined); // on mount only
303
+ // eslint-disable-next-line react-hooks/exhaustive-deps
304
+ }, []);
305
+ const blurRef = useRef(new Animated.Value(0)).current;
306
+ const blurOpacity = blurRef.interpolate({
307
+ inputRange: [0, 1],
308
+ outputRange: [0, 0.7]
309
+ });
310
+ useEffect(() => {
311
+ const animation = Animated.timing(blurRef, {
312
+ toValue: 1,
313
+ duration: 800,
314
+ delay: 600,
315
+ easing: Easing.out(Easing.sin),
316
+ useNativeDriver: false
317
+ });
318
+ animation.start(); // on mount only
319
+ // eslint-disable-next-line react-hooks/exhaustive-deps
320
+ }, []);
321
+ return /*#__PURE__*/React.createElement(View, {
322
+ style: styles.container,
323
+ testID: "qr-code-scanner"
324
+ }, hasPermission ? /*#__PURE__*/React.createElement(QRCodeScannerBase, {
325
+ fadeIn: false,
326
+ onRead: handleRead,
327
+ cameraStyle: styles.camera,
328
+ cameraProps: {
329
+ captureAudio: false
330
+ }
331
+ }) : null, /*#__PURE__*/React.createElement(Animated.View, {
332
+ style: [styles.blurs, {
333
+ opacity: blurOpacity
334
+ }]
335
+ }, /*#__PURE__*/React.createElement(View, {
336
+ style: styles.blurTop
337
+ }), /*#__PURE__*/React.createElement(View, {
338
+ style: styles.blurBottom
339
+ }), /*#__PURE__*/React.createElement(View, {
340
+ style: styles.blurLeft
341
+ }), /*#__PURE__*/React.createElement(View, {
342
+ style: styles.blurRight
343
+ })), /*#__PURE__*/React.createElement(Target, null), /*#__PURE__*/React.createElement(Explanations, {
344
+ locales: locales,
345
+ onHelpPress: onHelpPress
346
+ }));
347
+ };
348
+
349
+ export default QRCodeScanner;
350
+ //# 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","borderTopLeftRadius","borderTopRightRadius","paddingHorizontal","paddingVertical","titleWrapper","flexDirection","alignItems","justifyContent","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: 260,\n bottom: 0,\n backgroundColor: '#fff',\n borderTopLeftRadius: 30,\n borderTopRightRadius: 30,\n paddingHorizontal: 24,\n paddingVertical: 8\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,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AD;IAAM,KAAK,EAAEf,MAAM,CAACmB;EAApB,EAJF,CATF,eAeE,oBAAC,MAAD,OAfF,eAgBE,oBAAC,YAAD;IAAc,OAAO,EAAE0D,OAAvB;IAAgC,WAAW,EAAEC;EAA7C,EAhBF,CADF;AAoBD,CAlDD;;AAoDA,eAAeK,aAAf"}
@@ -1,13 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  export declare type Props = {
3
3
  onDemoPress: () => void;
4
- onDesktopButtonPress: () => void;
5
4
  onHelpPress: () => void;
6
- onMobileButtonPress: () => void;
5
+ onQRCodeButtonPress: () => void;
6
+ onReceiveEmailButtonPress: () => void;
7
7
  locales: {
8
8
  title: string;
9
9
  description: string;
10
- ctaQRCode: string;
10
+ ctaQrCode: string;
11
11
  ctaReceiveMail: string;
12
12
  titleHelp: string;
13
13
  ctaHelp: string;
@@ -1 +1 @@
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
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":";AA2KA,oBAAY,KAAK,GAAG;IAClB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,yBAAyB,EAAE,MAAM,IAAI,CAAC;IACtC,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,uBAuI5B,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -69,6 +69,7 @@ const createStyleSheet = theme => StyleSheet.create({
69
69
  height: 60
70
70
  },
71
71
  title: {
72
+ color: '#1D1D2B',
72
73
  fontWeight: '600',
73
74
  fontSize: 28,
74
75
  lineHeight: 36,
@@ -96,10 +97,10 @@ const createStyleSheet = theme => StyleSheet.create({
96
97
  alignItems: 'center',
97
98
  overflow: 'hidden'
98
99
  },
99
- ctaQRCode: {
100
+ ctaQrCode: {
100
101
  backgroundColor: theme.colors.cta
101
102
  },
102
- ctaQRCodeText: {
103
+ ctaQrCodeText: {
103
104
  marginLeft: 8,
104
105
  color: '#fff',
105
106
  fontWeight: '700',
@@ -144,9 +145,9 @@ const Welcome = props => {
144
145
  const {
145
146
  locales,
146
147
  onDemoPress,
147
- onDesktopButtonPress,
148
+ onQRCodeButtonPress,
148
149
  onHelpPress,
149
- onMobileButtonPress
150
+ onReceiveEmailButtonPress
150
151
  } = props;
151
152
  const {
152
153
  theme
@@ -257,15 +258,17 @@ const Welcome = props => {
257
258
  }, /*#__PURE__*/React.createElement(View, {
258
259
  style: styleSheet.buttons
259
260
  }, /*#__PURE__*/React.createElement(Touchable, {
260
- style: [styleSheet.button, styleSheet.ctaQRCode],
261
- onPress: onDesktopButtonPress
261
+ style: [styleSheet.button, styleSheet.ctaQrCode],
262
+ onPress: onQRCodeButtonPress,
263
+ testID: "qr-code-button"
262
264
  }, /*#__PURE__*/React.createElement(QrCodeIcon, {
263
265
  style: styleSheet.qrCodeIcon
264
266
  }), /*#__PURE__*/React.createElement(Text, {
265
- style: styleSheet.ctaQRCodeText
266
- }, locales.ctaQRCode)), /*#__PURE__*/React.createElement(Touchable, {
267
+ style: styleSheet.ctaQrCodeText
268
+ }, locales.ctaQrCode)), /*#__PURE__*/React.createElement(Touchable, {
267
269
  style: [styleSheet.button, styleSheet.ctaReceiveMail],
268
- onPress: onMobileButtonPress
270
+ onPress: onReceiveEmailButtonPress,
271
+ testID: "receive-email-button"
269
272
  }, /*#__PURE__*/React.createElement(MailIcon, {
270
273
  style: styleSheet.mailIcon
271
274
  }), /*#__PURE__*/React.createElement(Text, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["React","useEffect","useRef","useState","Animated","StyleSheet","Text","View","LinearGradient","NovaCompositionCoorpacademyLogoCoorp","LogoCoorp","NovaCompositionCoorpacademyQrCode","QrCodeIcon","NovaCompositionCoorpacademyEmail","MailIcon","useAnimateProp","useTranslateY","Touchable","useTemplateContext","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradients","position","gradient","opacity","transform","rotate","gradient2","animatedLogoWrapper","animatedLogo","height","logo","padding","logoBG","backgroundColor","title","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQRCode","colors","cta","ctaQRCodeText","marginLeft","color","qrCodeIcon","fill","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onDesktopButtonPress","onHelpPress","onMobileButtonPress","styleSheet","setStylesheet","translateGradients","fromValue","toValue","duration","delay","translateContent","fadeInContent","property","fadeOutStartLogo","fadeInFinalLogo","scaleAnim","Value","current","interpolateScale","interpolate","inputRange","outputRange","_stylesheet","start","animatedScale","timing","useNativeDriver","animatedStyle","scale"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport {\n NovaCompositionCoorpacademyLogoCoorp as LogoCoorp,\n NovaCompositionCoorpacademyQrCode as QrCodeIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n animatedLogoWrapper: ViewStyle;\n animatedLogo: ViewStyle;\n logo: ViewStyle;\n logoBG: ViewStyle;\n content: ViewStyle;\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n actions: ViewStyle;\n buttons: ViewStyle;\n button: ViewStyle;\n qrCodeIcon: ViewStyle;\n mailIcon: ViewStyle;\n ctaQRCode: ViewStyle;\n ctaQRCodeText: TextStyle;\n ctaReceiveMail: ViewStyle;\n ctaReceiveMailText: TextStyle;\n help: ViewStyle;\n titleHelp: TextStyle;\n ctaHelp: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'space-around',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n content: {\n width: '100%',\n alignItems: 'flex-start'\n },\n gradients: {\n position: 'absolute',\n top: 400,\n bottom: 400,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -730,\n bottom: 0,\n left: -380,\n right: -380,\n opacity: 1,\n transform: [{rotate: '35deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -630,\n bottom: -200,\n left: -300,\n right: -400,\n opacity: 0.6,\n transform: [{rotate: '-35deg'}]\n },\n animatedLogoWrapper: {\n alignItems: 'center'\n },\n animatedLogo: {\n position: 'absolute',\n width: 77,\n height: 100\n },\n logo: {\n padding: 100\n },\n logoBG: {\n backgroundColor: '#fff',\n top: 20,\n width: 60,\n height: 60\n },\n title: {\n fontWeight: '600',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n fontSize: 18,\n lineHeight: 24,\n paddingVertical: 8\n },\n actions: {\n width: '100%'\n },\n buttons: {\n paddingVertical: 20,\n alignItems: 'center'\n },\n button: {\n paddingVertical: 12,\n marginVertical: 4,\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden'\n },\n ctaQRCode: {\n backgroundColor: theme.colors.cta\n },\n ctaQRCodeText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n qrCodeIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n },\n ctaReceiveMail: {\n backgroundColor: '#eaeaeb'\n },\n ctaReceiveMailText: {\n marginLeft: 8,\n color: '#1D1D2B',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#1D1D2B',\n height: 12,\n width: 16\n },\n help: {\n flexDirection: 'row',\n justifyContent: 'center'\n },\n titleHelp: {\n color: '#9999A8'\n },\n ctaHelp: {\n marginLeft: 5,\n textDecorationLine: 'underline',\n color: '#9999A8'\n }\n });\n\nexport type Props = {\n onDemoPress: () => void;\n onDesktopButtonPress: () => void;\n onHelpPress: () => void;\n onMobileButtonPress: () => void;\n locales: {\n title: string;\n description: string;\n ctaQRCode: string;\n ctaReceiveMail: string;\n titleHelp: string;\n ctaHelp: string;\n };\n};\n\nconst Welcome = (props: Props) => {\n const {locales, onDemoPress, onDesktopButtonPress, onHelpPress, onMobileButtonPress} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 0,\n toValue: -200,\n duration: 300,\n delay: 750\n });\n\n const translateContent = useTranslateY({\n fromValue: 170,\n toValue: 0,\n duration: 450,\n delay: 750\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n const fadeOutStartLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n duration: 450,\n delay: 1000\n });\n\n const fadeInFinalLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 250,\n delay: 900\n });\n\n const scaleAnim = useRef<Animated.Value>(new Animated.Value(0)).current;\n const interpolateScale = scaleAnim.interpolate({\n inputRange: [0, 0.4, 0.5, 0.6, 1],\n outputRange: [1, 1.7, 1.7, 1.7, 1]\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n fadeInFinalLogo.start();\n fadeOutStartLogo.start();\n translateContent.start();\n translateGradients.start();\n\n const animatedScale = Animated.timing(scaleAnim, {\n toValue: 1,\n duration: 1000,\n useNativeDriver: true\n });\n\n animatedScale.start();\n\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n return (\n <Animated.View style={[styleSheet.wrapper, translateContent.animatedStyle]} testID=\"welcome\">\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <LinearGradient\n colors={['#0061FF', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient}\n />\n <LinearGradient\n colors={['#2199AB', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient2}\n />\n </Animated.View>\n\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <Animated.View\n style={[styleSheet.animatedLogoWrapper, {transform: [{scale: interpolateScale}]}]}\n >\n <Animated.View style={[styleSheet.logoBG, fadeInFinalLogo.animatedStyle]} />\n <Animated.View style={[styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]}>\n <LogoCoorp fill=\"#0061FF\" />\n </Animated.View>\n <Animated.View style={[styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]}>\n <LogoCoorp fill=\"#fff\" />\n </Animated.View>\n </Animated.View>\n </Touchable>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQRCode]}\n onPress={onDesktopButtonPress}\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQRCodeText}>{locales.ctaQRCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onMobileButtonPress}\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Welcome;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,MAA1B,EAAkCC,QAAlC,QAAiD,OAAjD;AACA,SAAQC,QAAR,EAAkBC,UAAlB,EAA8BC,IAA9B,EAA+CC,IAA/C,QAAqE,cAArE;AACA,OAAOC,cAAP,MAA2B,8BAA3B;AACA,SACEC,oCAAoC,IAAIC,SAD1C,EAEEC,iCAAiC,IAAIC,UAFvC,EAGEC,gCAAgC,IAAIC,QAHtC,QAIO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EC,UAAU,CAACZ;EAA5B,EAJF,eAKE,oBAAC,IAAD;IAAM,KAAK,EAAEY,UAAU,CAACb;EAAxB,GAA6CQ,OAAO,CAACT,cAArD,CALF,CARF,CADF,eAiBE,oBAAC,SAAD;IAAW,OAAO,EAAEY,WAApB;IAAiC,KAAK,EAAEE,UAAU,CAACX;EAAnD,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAEW,UAAU,CAACV;EAAxB,GAAoCK,OAAO,CAACL,SAA5C,CADF,eAEE,oBAAC,IAAD;IAAM,KAAK,EAAEU,UAAU,CAACT;EAAxB,GAAkCI,OAAO,CAACJ,OAA1C,CAFF,CAjBF,CAJF,CA3BF,CADF;AAyDD,CArID;;AAuIA,eAAeE,OAAf"}
1
+ {"version":3,"file":"index.native.js","names":["React","useEffect","useRef","useState","Animated","StyleSheet","Text","View","LinearGradient","NovaCompositionCoorpacademyLogoCoorp","LogoCoorp","NovaCompositionCoorpacademyQrCode","QrCodeIcon","NovaCompositionCoorpacademyEmail","MailIcon","useAnimateProp","useTranslateY","Touchable","useTemplateContext","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradients","position","gradient","opacity","transform","rotate","gradient2","animatedLogoWrapper","animatedLogo","height","logo","padding","logoBG","backgroundColor","title","color","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQrCode","colors","cta","ctaQrCodeText","marginLeft","qrCodeIcon","fill","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onQRCodeButtonPress","onHelpPress","onReceiveEmailButtonPress","styleSheet","setStylesheet","translateGradients","fromValue","toValue","duration","delay","translateContent","fadeInContent","property","fadeOutStartLogo","fadeInFinalLogo","scaleAnim","Value","current","interpolateScale","interpolate","inputRange","outputRange","_stylesheet","start","animatedScale","timing","useNativeDriver","animatedStyle","scale"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport {\n NovaCompositionCoorpacademyLogoCoorp as LogoCoorp,\n NovaCompositionCoorpacademyQrCode as QrCodeIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n animatedLogoWrapper: ViewStyle;\n animatedLogo: ViewStyle;\n logo: ViewStyle;\n logoBG: ViewStyle;\n content: ViewStyle;\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n actions: ViewStyle;\n buttons: ViewStyle;\n button: ViewStyle;\n qrCodeIcon: ViewStyle;\n mailIcon: ViewStyle;\n ctaQrCode: ViewStyle;\n ctaQrCodeText: TextStyle;\n ctaReceiveMail: ViewStyle;\n ctaReceiveMailText: TextStyle;\n help: ViewStyle;\n titleHelp: TextStyle;\n ctaHelp: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'space-around',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n content: {\n width: '100%',\n alignItems: 'flex-start'\n },\n gradients: {\n position: 'absolute',\n top: 400,\n bottom: 400,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -730,\n bottom: 0,\n left: -380,\n right: -380,\n opacity: 1,\n transform: [{rotate: '35deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -630,\n bottom: -200,\n left: -300,\n right: -400,\n opacity: 0.6,\n transform: [{rotate: '-35deg'}]\n },\n animatedLogoWrapper: {\n alignItems: 'center'\n },\n animatedLogo: {\n position: 'absolute',\n width: 77,\n height: 100\n },\n logo: {\n padding: 100\n },\n logoBG: {\n backgroundColor: '#fff',\n top: 20,\n width: 60,\n height: 60\n },\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n fontSize: 18,\n lineHeight: 24,\n paddingVertical: 8\n },\n actions: {\n width: '100%'\n },\n buttons: {\n paddingVertical: 20,\n alignItems: 'center'\n },\n button: {\n paddingVertical: 12,\n marginVertical: 4,\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden'\n },\n ctaQrCode: {\n backgroundColor: theme.colors.cta\n },\n ctaQrCodeText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n qrCodeIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n },\n ctaReceiveMail: {\n backgroundColor: '#eaeaeb'\n },\n ctaReceiveMailText: {\n marginLeft: 8,\n color: '#1D1D2B',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#1D1D2B',\n height: 12,\n width: 16\n },\n help: {\n flexDirection: 'row',\n justifyContent: 'center'\n },\n titleHelp: {\n color: '#9999A8'\n },\n ctaHelp: {\n marginLeft: 5,\n textDecorationLine: 'underline',\n color: '#9999A8'\n }\n });\n\nexport type Props = {\n onDemoPress: () => void;\n onHelpPress: () => void;\n onQRCodeButtonPress: () => void;\n onReceiveEmailButtonPress: () => void;\n locales: {\n title: string;\n description: string;\n ctaQrCode: string;\n ctaReceiveMail: string;\n titleHelp: string;\n ctaHelp: string;\n };\n};\n\nconst Welcome = (props: Props) => {\n const {locales, onDemoPress, onQRCodeButtonPress, onHelpPress, onReceiveEmailButtonPress} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 0,\n toValue: -200,\n duration: 300,\n delay: 750\n });\n\n const translateContent = useTranslateY({\n fromValue: 170,\n toValue: 0,\n duration: 450,\n delay: 750\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n const fadeOutStartLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n duration: 450,\n delay: 1000\n });\n\n const fadeInFinalLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 250,\n delay: 900\n });\n\n const scaleAnim = useRef<Animated.Value>(new Animated.Value(0)).current;\n const interpolateScale = scaleAnim.interpolate({\n inputRange: [0, 0.4, 0.5, 0.6, 1],\n outputRange: [1, 1.7, 1.7, 1.7, 1]\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n fadeInFinalLogo.start();\n fadeOutStartLogo.start();\n translateContent.start();\n translateGradients.start();\n\n const animatedScale = Animated.timing(scaleAnim, {\n toValue: 1,\n duration: 1000,\n useNativeDriver: true\n });\n\n animatedScale.start();\n\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n return (\n <Animated.View style={[styleSheet.wrapper, translateContent.animatedStyle]} testID=\"welcome\">\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <LinearGradient\n colors={['#0061FF', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient}\n />\n <LinearGradient\n colors={['#2199AB', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient2}\n />\n </Animated.View>\n\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <Animated.View\n style={[styleSheet.animatedLogoWrapper, {transform: [{scale: interpolateScale}]}]}\n >\n <Animated.View style={[styleSheet.logoBG, fadeInFinalLogo.animatedStyle]} />\n <Animated.View style={[styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]}>\n <LogoCoorp fill=\"#0061FF\" />\n </Animated.View>\n <Animated.View style={[styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]}>\n <LogoCoorp fill=\"#fff\" />\n </Animated.View>\n </Animated.View>\n </Touchable>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQrCode]}\n onPress={onQRCodeButtonPress}\n testID=\"qr-code-button\"\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQrCodeText}>{locales.ctaQrCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onReceiveEmailButtonPress}\n testID=\"receive-email-button\"\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Welcome;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,MAA1B,EAAkCC,QAAlC,QAAiD,OAAjD;AACA,SAAQC,QAAR,EAAkBC,UAAlB,EAA8BC,IAA9B,EAA+CC,IAA/C,QAAqE,cAArE;AACA,OAAOC,cAAP,MAA2B,8BAA3B;AACA,SACEC,oCAAoC,IAAIC,SAD1C,EAEEC,iCAAiC,IAAIC,UAFvC,EAGEC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U,CAACd,cAA/B,CADT;IAEE,OAAO,EAAEa,yBAFX;IAGE,MAAM,EAAC;EAHT,gBAKE,oBAAC,QAAD;IAAU,KAAK,EAAEC,UAAU,CAACZ;EAA5B,EALF,eAME,oBAAC,IAAD;IAAM,KAAK,EAAEY,UAAU,CAACb;EAAxB,GAA6CQ,OAAO,CAACT,cAArD,CANF,CATF,CADF,eAmBE,oBAAC,SAAD;IAAW,OAAO,EAAEY,WAApB;IAAiC,KAAK,EAAEE,UAAU,CAACX;EAAnD,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAEW,UAAU,CAACV;EAAxB,GAAoCK,OAAO,CAACL,SAA5C,CADF,eAEE,oBAAC,IAAD;IAAM,KAAK,EAAEU,UAAU,CAACT;EAAxB,GAAkCI,OAAO,CAACJ,OAA1C,CAFF,CAnBF,CAJF,CA3BF,CADF;AA2DD,CAvID;;AAyIA,eAAeE,OAAf"}
@@ -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;AAyPD,QAAA,MAAM,aAAa,UAAW,KAAK,gBAkDlC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,373 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _react = _interopRequireWildcard(require("react"));
7
+
8
+ var _reactNative = require("react-native");
9
+
10
+ var _reactNativeQrcodeScanner = _interopRequireDefault(require("react-native-qrcode-scanner"));
11
+
12
+ var _novaIcons = require("@coorpacademy/nova-icons");
13
+
14
+ var _index = _interopRequireDefault(require("../../../hoc/touchable/index.native"));
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
+
22
+ const HEIGHT = 280;
23
+ const WIDTH = 280;
24
+ const COLOR = '#fff';
25
+ const BORDER_RADIUS = 8;
26
+ const LINE_WIDTH = 7;
27
+
28
+ const styles = _reactNative.StyleSheet.create({
29
+ container: {
30
+ width: '100%',
31
+ height: '100%'
32
+ },
33
+ camera: {
34
+ width: '100%',
35
+ height: '100%'
36
+ },
37
+ blurs: {
38
+ position: 'absolute',
39
+ width: '100%',
40
+ height: '100%',
41
+ opacity: 0.6
42
+ },
43
+ blurTop: {
44
+ position: 'absolute',
45
+ backgroundColor: '#000',
46
+ width: '100%',
47
+ height: '35%',
48
+ transform: [{
49
+ translateY: -HEIGHT / 2 + LINE_WIDTH / 2
50
+ }]
51
+ },
52
+ blurBottom: {
53
+ position: 'absolute',
54
+ backgroundColor: '#000',
55
+ width: '100%',
56
+ height: '65%',
57
+ bottom: 0,
58
+ transform: [{
59
+ translateY: HEIGHT / 2 - LINE_WIDTH / 2
60
+ }]
61
+ },
62
+ blurLeft: {
63
+ position: 'absolute',
64
+ backgroundColor: '#000',
65
+ width: '50%',
66
+ height: HEIGHT - LINE_WIDTH,
67
+ left: 0,
68
+ top: '35%',
69
+ transform: [{
70
+ translateX: -WIDTH / 2 + LINE_WIDTH / 2
71
+ }, {
72
+ translateY: -HEIGHT / 2 + LINE_WIDTH / 2
73
+ }]
74
+ },
75
+ blurRight: {
76
+ position: 'absolute',
77
+ backgroundColor: '#000',
78
+ width: '50%',
79
+ height: HEIGHT - LINE_WIDTH,
80
+ right: 0,
81
+ top: '35%',
82
+ transform: [{
83
+ translateX: WIDTH / 2 - LINE_WIDTH / 2
84
+ }, {
85
+ translateY: -HEIGHT / 2 + LINE_WIDTH / 2
86
+ }]
87
+ }
88
+ });
89
+
90
+ const targetStyle = _reactNative.StyleSheet.create({
91
+ target: {
92
+ width: HEIGHT,
93
+ height: WIDTH,
94
+ top: '35%',
95
+ left: '50%',
96
+ transform: [{
97
+ translateX: -WIDTH / 2
98
+ }, {
99
+ translateY: -HEIGHT / 2
100
+ }],
101
+ borderRadius: BORDER_RADIUS,
102
+ position: 'absolute',
103
+ overflow: 'hidden'
104
+ },
105
+ square: {
106
+ position: 'absolute',
107
+ width: '35%',
108
+ height: '35%'
109
+ },
110
+ stroke: {
111
+ position: 'absolute',
112
+ top: 0,
113
+ left: 0,
114
+ backgroundColor: COLOR,
115
+ borderRadius: BORDER_RADIUS
116
+ }
117
+ });
118
+
119
+ const explanationsStyle = _reactNative.StyleSheet.create({
120
+ explanations: {
121
+ position: 'absolute',
122
+ width: '100%',
123
+ height: 260,
124
+ bottom: 0,
125
+ backgroundColor: '#fff',
126
+ borderTopLeftRadius: 30,
127
+ borderTopRightRadius: 30,
128
+ paddingHorizontal: 24,
129
+ paddingVertical: 8
130
+ },
131
+ titleWrapper: {
132
+ flexDirection: 'row',
133
+ alignItems: 'center',
134
+ justifyContent: 'flex-start',
135
+ paddingVertical: 16
136
+ },
137
+ qrCodeIcon: {
138
+ fill: '#000',
139
+ height: 14,
140
+ width: 14
141
+ },
142
+ titleText: {
143
+ fontWeight: '600',
144
+ color: '#1D1D2B',
145
+ fontSize: 21,
146
+ lineHeight: 30,
147
+ letterSpacing: 0.5,
148
+ marginLeft: 5
149
+ },
150
+ line: {
151
+ flexDirection: 'row',
152
+ paddingRight: 24,
153
+ paddingVertical: 8
154
+ },
155
+ lineText: {
156
+ fontWeight: '400',
157
+ color: '#1D1D2B',
158
+ fontSize: 18,
159
+ lineHeight: 24,
160
+ letterSpacing: 0.5,
161
+ marginRight: 7
162
+ },
163
+ help: {
164
+ flexDirection: 'row',
165
+ marginTop: 12
166
+ },
167
+ titleHelp: {
168
+ fontSize: 16,
169
+ color: '#9999A8'
170
+ },
171
+ ctaHelp: {
172
+ marginLeft: 5,
173
+ fontSize: 16,
174
+ letterSpacing: 0.5,
175
+ textDecorationLine: 'underline',
176
+ color: '#9999A8'
177
+ }
178
+ });
179
+
180
+ const Corner = props => {
181
+ const {
182
+ position,
183
+ lineLength
184
+ } = props;
185
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
186
+ style: [targetStyle.square, position]
187
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
188
+ style: [targetStyle.stroke, {
189
+ height: LINE_WIDTH,
190
+ width: lineLength
191
+ }]
192
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
193
+ style: [targetStyle.stroke, {
194
+ width: LINE_WIDTH,
195
+ height: lineLength
196
+ }]
197
+ }));
198
+ };
199
+
200
+ const Target = () => {
201
+ const animationRef = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
202
+ const lineLength = animationRef.interpolate({
203
+ inputRange: [0, 1],
204
+ outputRange: [0, WIDTH * 0.35]
205
+ });
206
+ (0, _react.useEffect)(() => {
207
+ const animation = _reactNative.Animated.timing(animationRef, {
208
+ toValue: 1,
209
+ duration: 700,
210
+ delay: 400,
211
+ easing: _reactNative.Easing.out(_reactNative.Easing.sin),
212
+ useNativeDriver: false
213
+ });
214
+
215
+ animation.start(); // on mount only
216
+ // eslint-disable-next-line react-hooks/exhaustive-deps
217
+ }, []);
218
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
219
+ style: targetStyle.target
220
+ }, /*#__PURE__*/_react.default.createElement(Corner, {
221
+ lineLength: lineLength,
222
+ position: {
223
+ top: 0,
224
+ left: 0,
225
+ transform: [{
226
+ rotate: '0deg'
227
+ }]
228
+ }
229
+ }), /*#__PURE__*/_react.default.createElement(Corner, {
230
+ lineLength: lineLength,
231
+ position: {
232
+ top: 0,
233
+ right: 0,
234
+ transform: [{
235
+ rotate: '90deg'
236
+ }]
237
+ }
238
+ }), /*#__PURE__*/_react.default.createElement(Corner, {
239
+ lineLength: lineLength,
240
+ position: {
241
+ bottom: 0,
242
+ right: 0,
243
+ transform: [{
244
+ rotate: '180deg'
245
+ }]
246
+ }
247
+ }), /*#__PURE__*/_react.default.createElement(Corner, {
248
+ lineLength: lineLength,
249
+ position: {
250
+ bottom: 0,
251
+ left: 0,
252
+ transform: [{
253
+ rotate: '270deg'
254
+ }]
255
+ }
256
+ }));
257
+ };
258
+
259
+ const Explanations = props => {
260
+ const {
261
+ locales,
262
+ onHelpPress
263
+ } = props;
264
+ const animationRef = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
265
+ const animateBottom = animationRef.interpolate({
266
+ inputRange: [0, 1],
267
+ outputRange: [-300, 0]
268
+ });
269
+ (0, _react.useEffect)(() => {
270
+ const animation = _reactNative.Animated.timing(animationRef, {
271
+ toValue: 1,
272
+ duration: 600,
273
+ delay: 400,
274
+ easing: _reactNative.Easing.out(_reactNative.Easing.sin),
275
+ useNativeDriver: false
276
+ });
277
+
278
+ animation.start(); // on mount only
279
+ // eslint-disable-next-line react-hooks/exhaustive-deps
280
+ }, []);
281
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
282
+ style: [explanationsStyle.explanations, {
283
+ bottom: animateBottom
284
+ }]
285
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
286
+ style: explanationsStyle.titleWrapper
287
+ }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyQrCode, {
288
+ style: explanationsStyle.qrCodeIcon
289
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
290
+ style: explanationsStyle.titleText
291
+ }, locales.title)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
292
+ style: explanationsStyle.line
293
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
294
+ style: explanationsStyle.lineText
295
+ }, "1."), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
296
+ style: explanationsStyle.lineText
297
+ }, locales.explanation1)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
298
+ style: explanationsStyle.line
299
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
300
+ style: explanationsStyle.lineText
301
+ }, "2."), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
302
+ style: explanationsStyle.lineText
303
+ }, locales.explanation2)), /*#__PURE__*/_react.default.createElement(_index.default, {
304
+ onPress: onHelpPress,
305
+ style: explanationsStyle.help
306
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
307
+ style: explanationsStyle.titleHelp
308
+ }, locales.titleHelp), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
309
+ style: explanationsStyle.ctaHelp
310
+ }, locales.ctaHelp)));
311
+ };
312
+
313
+ const QRCodeScanner = props => {
314
+ const {
315
+ hasPermission,
316
+ locales,
317
+ onScan,
318
+ onHelpPress
319
+ } = props;
320
+ const handleRead = (0, _react.useCallback)(({
321
+ data
322
+ }) => {
323
+ onScan(typeof data === 'string' ? data : undefined); // on mount only
324
+ // eslint-disable-next-line react-hooks/exhaustive-deps
325
+ }, []);
326
+ const blurRef = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
327
+ const blurOpacity = blurRef.interpolate({
328
+ inputRange: [0, 1],
329
+ outputRange: [0, 0.7]
330
+ });
331
+ (0, _react.useEffect)(() => {
332
+ const animation = _reactNative.Animated.timing(blurRef, {
333
+ toValue: 1,
334
+ duration: 800,
335
+ delay: 600,
336
+ easing: _reactNative.Easing.out(_reactNative.Easing.sin),
337
+ useNativeDriver: false
338
+ });
339
+
340
+ animation.start(); // on mount only
341
+ // eslint-disable-next-line react-hooks/exhaustive-deps
342
+ }, []);
343
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
344
+ style: styles.container,
345
+ testID: "qr-code-scanner"
346
+ }, hasPermission ? /*#__PURE__*/_react.default.createElement(_reactNativeQrcodeScanner.default, {
347
+ fadeIn: false,
348
+ onRead: handleRead,
349
+ cameraStyle: styles.camera,
350
+ cameraProps: {
351
+ captureAudio: false
352
+ }
353
+ }) : null, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
354
+ style: [styles.blurs, {
355
+ opacity: blurOpacity
356
+ }]
357
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
358
+ style: styles.blurTop
359
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
360
+ style: styles.blurBottom
361
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
362
+ style: styles.blurLeft
363
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
364
+ style: styles.blurRight
365
+ })), /*#__PURE__*/_react.default.createElement(Target, null), /*#__PURE__*/_react.default.createElement(Explanations, {
366
+ locales: locales,
367
+ onHelpPress: onHelpPress
368
+ }));
369
+ };
370
+
371
+ var _default = QRCodeScanner;
372
+ exports.default = _default;
373
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.js","names":["HEIGHT","WIDTH","COLOR","BORDER_RADIUS","LINE_WIDTH","styles","StyleSheet","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","borderTopLeftRadius","borderTopRightRadius","paddingHorizontal","paddingVertical","titleWrapper","flexDirection","alignItems","justifyContent","qrCodeIcon","fill","titleText","fontWeight","color","fontSize","lineHeight","letterSpacing","marginLeft","line","paddingRight","lineText","marginRight","help","marginTop","titleHelp","ctaHelp","textDecorationLine","Corner","props","lineLength","Target","animationRef","useRef","Animated","Value","current","interpolate","inputRange","outputRange","useEffect","animation","timing","toValue","duration","delay","easing","Easing","out","sin","useNativeDriver","start","rotate","Explanations","locales","onHelpPress","animateBottom","title","explanation1","explanation2","QRCodeScanner","hasPermission","onScan","handleRead","useCallback","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: 260,\n bottom: 0,\n backgroundColor: '#fff',\n borderTopLeftRadius: 30,\n borderTopRightRadius: 30,\n paddingHorizontal: 24,\n paddingVertical: 8\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;;AACA;;AAEA;;AAEA;;AACA;;;;;;;;AAeA,MAAMA,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,GAAGC,uBAAA,CAAWC,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;IA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EAAEhG,MAAM,CAACU;EAApB,EADF,eAEE,6BAAC,iBAAD;IAAM,KAAK,EAAEV,MAAM,CAACc;EAApB,EAFF,eAGE,6BAAC,iBAAD;IAAM,KAAK,EAAEd,MAAM,CAACgB;EAApB,EAHF,eAIE,6BAAC,iBAAD;IAAM,KAAK,EAAEhB,MAAM,CAACoB;EAApB,EAJF,CATF,eAeE,6BAAC,MAAD,OAfF,eAgBE,6BAAC,YAAD;IAAc,OAAO,EAAE8D,OAAvB;IAAgC,WAAW,EAAEC;EAA7C,EAhBF,CADF;AAoBD,CAlDD;;eAoDeK,a"}
@@ -1,13 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  export declare type Props = {
3
3
  onDemoPress: () => void;
4
- onDesktopButtonPress: () => void;
5
4
  onHelpPress: () => void;
6
- onMobileButtonPress: () => void;
5
+ onQRCodeButtonPress: () => void;
6
+ onReceiveEmailButtonPress: () => void;
7
7
  locales: {
8
8
  title: string;
9
9
  description: string;
10
- ctaQRCode: string;
10
+ ctaQrCode: string;
11
11
  ctaReceiveMail: string;
12
12
  titleHelp: string;
13
13
  ctaHelp: string;
@@ -1 +1 @@
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
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":";AA2KA,oBAAY,KAAK,GAAG;IAClB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,yBAAyB,EAAE,MAAM,IAAI,CAAC;IACtC,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,uBAuI5B,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -86,6 +86,7 @@ const createStyleSheet = theme => _reactNative.StyleSheet.create({
86
86
  height: 60
87
87
  },
88
88
  title: {
89
+ color: '#1D1D2B',
89
90
  fontWeight: '600',
90
91
  fontSize: 28,
91
92
  lineHeight: 36,
@@ -113,10 +114,10 @@ const createStyleSheet = theme => _reactNative.StyleSheet.create({
113
114
  alignItems: 'center',
114
115
  overflow: 'hidden'
115
116
  },
116
- ctaQRCode: {
117
+ ctaQrCode: {
117
118
  backgroundColor: theme.colors.cta
118
119
  },
119
- ctaQRCodeText: {
120
+ ctaQrCodeText: {
120
121
  marginLeft: 8,
121
122
  color: '#fff',
122
123
  fontWeight: '700',
@@ -161,9 +162,9 @@ const Welcome = props => {
161
162
  const {
162
163
  locales,
163
164
  onDemoPress,
164
- onDesktopButtonPress,
165
+ onQRCodeButtonPress,
165
166
  onHelpPress,
166
- onMobileButtonPress
167
+ onReceiveEmailButtonPress
167
168
  } = props;
168
169
  const {
169
170
  theme
@@ -276,15 +277,17 @@ const Welcome = props => {
276
277
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
277
278
  style: styleSheet.buttons
278
279
  }, /*#__PURE__*/_react.default.createElement(_index.default, {
279
- style: [styleSheet.button, styleSheet.ctaQRCode],
280
- onPress: onDesktopButtonPress
280
+ style: [styleSheet.button, styleSheet.ctaQrCode],
281
+ onPress: onQRCodeButtonPress,
282
+ testID: "qr-code-button"
281
283
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyQrCode, {
282
284
  style: styleSheet.qrCodeIcon
283
285
  }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
284
- style: styleSheet.ctaQRCodeText
285
- }, locales.ctaQRCode)), /*#__PURE__*/_react.default.createElement(_index.default, {
286
+ style: styleSheet.ctaQrCodeText
287
+ }, locales.ctaQrCode)), /*#__PURE__*/_react.default.createElement(_index.default, {
286
288
  style: [styleSheet.button, styleSheet.ctaReceiveMail],
287
- onPress: onMobileButtonPress
289
+ onPress: onReceiveEmailButtonPress,
290
+ testID: "receive-email-button"
288
291
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyEmail, {
289
292
  style: styleSheet.mailIcon
290
293
  }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["createStyleSheet","theme","StyleSheet","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradients","position","gradient","opacity","transform","rotate","gradient2","animatedLogoWrapper","animatedLogo","height","logo","padding","logoBG","backgroundColor","title","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQRCode","colors","cta","ctaQRCodeText","marginLeft","color","qrCodeIcon","fill","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onDesktopButtonPress","onHelpPress","onMobileButtonPress","useTemplateContext","styleSheet","setStylesheet","useState","translateGradients","useTranslateY","fromValue","toValue","duration","delay","translateContent","fadeInContent","useAnimateProp","property","fadeOutStartLogo","fadeInFinalLogo","scaleAnim","useRef","Animated","Value","current","interpolateScale","interpolate","inputRange","outputRange","useEffect","_stylesheet","start","animatedScale","timing","useNativeDriver","animatedStyle","scale"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport {\n NovaCompositionCoorpacademyLogoCoorp as LogoCoorp,\n NovaCompositionCoorpacademyQrCode as QrCodeIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n animatedLogoWrapper: ViewStyle;\n animatedLogo: ViewStyle;\n logo: ViewStyle;\n logoBG: ViewStyle;\n content: ViewStyle;\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n actions: ViewStyle;\n buttons: ViewStyle;\n button: ViewStyle;\n qrCodeIcon: ViewStyle;\n mailIcon: ViewStyle;\n ctaQRCode: ViewStyle;\n ctaQRCodeText: TextStyle;\n ctaReceiveMail: ViewStyle;\n ctaReceiveMailText: TextStyle;\n help: ViewStyle;\n titleHelp: TextStyle;\n ctaHelp: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'space-around',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n content: {\n width: '100%',\n alignItems: 'flex-start'\n },\n gradients: {\n position: 'absolute',\n top: 400,\n bottom: 400,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -730,\n bottom: 0,\n left: -380,\n right: -380,\n opacity: 1,\n transform: [{rotate: '35deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -630,\n bottom: -200,\n left: -300,\n right: -400,\n opacity: 0.6,\n transform: [{rotate: '-35deg'}]\n },\n animatedLogoWrapper: {\n alignItems: 'center'\n },\n animatedLogo: {\n position: 'absolute',\n width: 77,\n height: 100\n },\n logo: {\n padding: 100\n },\n logoBG: {\n backgroundColor: '#fff',\n top: 20,\n width: 60,\n height: 60\n },\n title: {\n fontWeight: '600',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n fontSize: 18,\n lineHeight: 24,\n paddingVertical: 8\n },\n actions: {\n width: '100%'\n },\n buttons: {\n paddingVertical: 20,\n alignItems: 'center'\n },\n button: {\n paddingVertical: 12,\n marginVertical: 4,\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden'\n },\n ctaQRCode: {\n backgroundColor: theme.colors.cta\n },\n ctaQRCodeText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n qrCodeIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n },\n ctaReceiveMail: {\n backgroundColor: '#eaeaeb'\n },\n ctaReceiveMailText: {\n marginLeft: 8,\n color: '#1D1D2B',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#1D1D2B',\n height: 12,\n width: 16\n },\n help: {\n flexDirection: 'row',\n justifyContent: 'center'\n },\n titleHelp: {\n color: '#9999A8'\n },\n ctaHelp: {\n marginLeft: 5,\n textDecorationLine: 'underline',\n color: '#9999A8'\n }\n });\n\nexport type Props = {\n onDemoPress: () => void;\n onDesktopButtonPress: () => void;\n onHelpPress: () => void;\n onMobileButtonPress: () => void;\n locales: {\n title: string;\n description: string;\n ctaQRCode: string;\n ctaReceiveMail: string;\n titleHelp: string;\n ctaHelp: string;\n };\n};\n\nconst Welcome = (props: Props) => {\n const {locales, onDemoPress, onDesktopButtonPress, onHelpPress, onMobileButtonPress} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 0,\n toValue: -200,\n duration: 300,\n delay: 750\n });\n\n const translateContent = useTranslateY({\n fromValue: 170,\n toValue: 0,\n duration: 450,\n delay: 750\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n const fadeOutStartLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n duration: 450,\n delay: 1000\n });\n\n const fadeInFinalLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 250,\n delay: 900\n });\n\n const scaleAnim = useRef<Animated.Value>(new Animated.Value(0)).current;\n const interpolateScale = scaleAnim.interpolate({\n inputRange: [0, 0.4, 0.5, 0.6, 1],\n outputRange: [1, 1.7, 1.7, 1.7, 1]\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n fadeInFinalLogo.start();\n fadeOutStartLogo.start();\n translateContent.start();\n translateGradients.start();\n\n const animatedScale = Animated.timing(scaleAnim, {\n toValue: 1,\n duration: 1000,\n useNativeDriver: true\n });\n\n animatedScale.start();\n\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n return (\n <Animated.View style={[styleSheet.wrapper, translateContent.animatedStyle]} testID=\"welcome\">\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <LinearGradient\n colors={['#0061FF', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient}\n />\n <LinearGradient\n colors={['#2199AB', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient2}\n />\n </Animated.View>\n\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <Animated.View\n style={[styleSheet.animatedLogoWrapper, {transform: [{scale: interpolateScale}]}]}\n >\n <Animated.View style={[styleSheet.logoBG, fadeInFinalLogo.animatedStyle]} />\n <Animated.View style={[styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]}>\n <LogoCoorp fill=\"#0061FF\" />\n </Animated.View>\n <Animated.View style={[styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]}>\n <LogoCoorp fill=\"#fff\" />\n </Animated.View>\n </Animated.View>\n </Touchable>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQRCode]}\n onPress={onDesktopButtonPress}\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQRCodeText}>{locales.ctaQRCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onMobileButtonPress}\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Welcome;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;;;;;;;AA6BA,MAAMA,gBAAgB,GAAIC,KAAD,IACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC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,6BAAC,cAAD;IAAW,OAAO,EAAEY,WAApB;IAAiC,KAAK,EAAEG,UAAU,CAACZ;EAAnD,gBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEY,UAAU,CAACX;EAAxB,GAAoCK,OAAO,CAACL,SAA5C,CADF,eAEE,6BAAC,iBAAD;IAAM,KAAK,EAAEW,UAAU,CAACV;EAAxB,GAAkCI,OAAO,CAACJ,OAA1C,CAFF,CAjBF,CAJF,CA3BF,CADF;AAyDD,CArID;;eAuIeE,O"}
1
+ {"version":3,"file":"index.native.js","names":["createStyleSheet","theme","StyleSheet","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradients","position","gradient","opacity","transform","rotate","gradient2","animatedLogoWrapper","animatedLogo","height","logo","padding","logoBG","backgroundColor","title","color","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQrCode","colors","cta","ctaQrCodeText","marginLeft","qrCodeIcon","fill","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onQRCodeButtonPress","onHelpPress","onReceiveEmailButtonPress","useTemplateContext","styleSheet","setStylesheet","useState","translateGradients","useTranslateY","fromValue","toValue","duration","delay","translateContent","fadeInContent","useAnimateProp","property","fadeOutStartLogo","fadeInFinalLogo","scaleAnim","useRef","Animated","Value","current","interpolateScale","interpolate","inputRange","outputRange","useEffect","_stylesheet","start","animatedScale","timing","useNativeDriver","animatedStyle","scale"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport {\n NovaCompositionCoorpacademyLogoCoorp as LogoCoorp,\n NovaCompositionCoorpacademyQrCode as QrCodeIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n animatedLogoWrapper: ViewStyle;\n animatedLogo: ViewStyle;\n logo: ViewStyle;\n logoBG: ViewStyle;\n content: ViewStyle;\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n actions: ViewStyle;\n buttons: ViewStyle;\n button: ViewStyle;\n qrCodeIcon: ViewStyle;\n mailIcon: ViewStyle;\n ctaQrCode: ViewStyle;\n ctaQrCodeText: TextStyle;\n ctaReceiveMail: ViewStyle;\n ctaReceiveMailText: TextStyle;\n help: ViewStyle;\n titleHelp: TextStyle;\n ctaHelp: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'space-around',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n content: {\n width: '100%',\n alignItems: 'flex-start'\n },\n gradients: {\n position: 'absolute',\n top: 400,\n bottom: 400,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -730,\n bottom: 0,\n left: -380,\n right: -380,\n opacity: 1,\n transform: [{rotate: '35deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -630,\n bottom: -200,\n left: -300,\n right: -400,\n opacity: 0.6,\n transform: [{rotate: '-35deg'}]\n },\n animatedLogoWrapper: {\n alignItems: 'center'\n },\n animatedLogo: {\n position: 'absolute',\n width: 77,\n height: 100\n },\n logo: {\n padding: 100\n },\n logoBG: {\n backgroundColor: '#fff',\n top: 20,\n width: 60,\n height: 60\n },\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n fontSize: 18,\n lineHeight: 24,\n paddingVertical: 8\n },\n actions: {\n width: '100%'\n },\n buttons: {\n paddingVertical: 20,\n alignItems: 'center'\n },\n button: {\n paddingVertical: 12,\n marginVertical: 4,\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden'\n },\n ctaQrCode: {\n backgroundColor: theme.colors.cta\n },\n ctaQrCodeText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n qrCodeIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n },\n ctaReceiveMail: {\n backgroundColor: '#eaeaeb'\n },\n ctaReceiveMailText: {\n marginLeft: 8,\n color: '#1D1D2B',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#1D1D2B',\n height: 12,\n width: 16\n },\n help: {\n flexDirection: 'row',\n justifyContent: 'center'\n },\n titleHelp: {\n color: '#9999A8'\n },\n ctaHelp: {\n marginLeft: 5,\n textDecorationLine: 'underline',\n color: '#9999A8'\n }\n });\n\nexport type Props = {\n onDemoPress: () => void;\n onHelpPress: () => void;\n onQRCodeButtonPress: () => void;\n onReceiveEmailButtonPress: () => void;\n locales: {\n title: string;\n description: string;\n ctaQrCode: string;\n ctaReceiveMail: string;\n titleHelp: string;\n ctaHelp: string;\n };\n};\n\nconst Welcome = (props: Props) => {\n const {locales, onDemoPress, onQRCodeButtonPress, onHelpPress, onReceiveEmailButtonPress} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 0,\n toValue: -200,\n duration: 300,\n delay: 750\n });\n\n const translateContent = useTranslateY({\n fromValue: 170,\n toValue: 0,\n duration: 450,\n delay: 750\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n const fadeOutStartLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n duration: 450,\n delay: 1000\n });\n\n const fadeInFinalLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 250,\n delay: 900\n });\n\n const scaleAnim = useRef<Animated.Value>(new Animated.Value(0)).current;\n const interpolateScale = scaleAnim.interpolate({\n inputRange: [0, 0.4, 0.5, 0.6, 1],\n outputRange: [1, 1.7, 1.7, 1.7, 1]\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n fadeInFinalLogo.start();\n fadeOutStartLogo.start();\n translateContent.start();\n translateGradients.start();\n\n const animatedScale = Animated.timing(scaleAnim, {\n toValue: 1,\n duration: 1000,\n useNativeDriver: true\n });\n\n animatedScale.start();\n\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n return (\n <Animated.View style={[styleSheet.wrapper, translateContent.animatedStyle]} testID=\"welcome\">\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <LinearGradient\n colors={['#0061FF', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient}\n />\n <LinearGradient\n colors={['#2199AB', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient2}\n />\n </Animated.View>\n\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <Animated.View\n style={[styleSheet.animatedLogoWrapper, {transform: [{scale: interpolateScale}]}]}\n >\n <Animated.View style={[styleSheet.logoBG, fadeInFinalLogo.animatedStyle]} />\n <Animated.View style={[styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]}>\n <LogoCoorp fill=\"#0061FF\" />\n </Animated.View>\n <Animated.View style={[styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]}>\n <LogoCoorp fill=\"#fff\" />\n </Animated.View>\n </Animated.View>\n </Touchable>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQrCode]}\n onPress={onQRCodeButtonPress}\n testID=\"qr-code-button\"\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQrCodeText}>{locales.ctaQrCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onReceiveEmailButtonPress}\n testID=\"receive-email-button\"\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Welcome;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;;;;;;;AA6BA,MAAMA,gBAAgB,GAAIC,KAAD,IACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,OAAO,EAAE;IACPC,GAAG,EAAE,CADE;IAEPC,MAAM,EAAE,CAFD;IAGPC,IAAI,EAAE,CAHC;IAIPC,KAAK,EAAE,CAJA;IAKPC,IAAI,EAAE,CALC;IAMPC,cAAc,EAAE,cANT;IAOPC,UAAU,EAAE,QAPL;IAQPC,iBAAiB,EAAE;EARZ,CADO;EAWhBC,OAAO,EAAE;IACPC,KAAK,EAAE,MADA;IAEPH,UAAU,EAAE;EAFL,CAXO;EAehBI,SAAS,EAAE;IACTC,QAAQ,EAAE,UADD;IAETX,GAAG,EAAE,GAFI;IAGTC,MAAM,EAAE,GAHC;IAITC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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorpacademy/components",
3
- "version": "11.14.5",
3
+ "version": "11.14.7",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -148,9 +148,11 @@
148
148
  "react": "^17.0.2",
149
149
  "react-dom": "^17.0.2",
150
150
  "react-native": "^0.68.2",
151
+ "react-native-camera": "https://github.com/CoorpAcademy/react-native-camera#master",
151
152
  "react-native-jw-media-player": "^0.2.34",
152
153
  "react-native-linear-gradient": "^2.6.2",
153
154
  "react-native-modal": "11.5.6",
155
+ "react-native-qrcode-scanner": "^1.5.3",
154
156
  "react-native-render-html": "^6.3.4",
155
157
  "react-native-vimeo-iframe": "^1.2.0",
156
158
  "react-native-youtube": "^2.0.1",
@@ -166,5 +168,5 @@
166
168
  "last 2 versions",
167
169
  "IE 11"
168
170
  ],
169
- "gitHead": "93e43b87969bd5ccb28ab75f4014e439dcbadc11"
171
+ "gitHead": "f4096ff384af06662667596fa6e9ce56914889fb"
170
172
  }