@coorpacademy/components 11.14.5 → 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"}
@@ -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,371 @@
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: 300,
124
+ bottom: 0,
125
+ backgroundColor: '#fff',
126
+ borderRadius: 30,
127
+ padding: 24
128
+ },
129
+ titleWrapper: {
130
+ flexDirection: 'row',
131
+ alignItems: 'center',
132
+ justifyContent: 'flex-start',
133
+ paddingVertical: 16
134
+ },
135
+ qrCodeIcon: {
136
+ fill: '#000',
137
+ height: 14,
138
+ width: 14
139
+ },
140
+ titleText: {
141
+ fontWeight: '600',
142
+ color: '#1D1D2B',
143
+ fontSize: 21,
144
+ lineHeight: 30,
145
+ letterSpacing: 0.5,
146
+ marginLeft: 5
147
+ },
148
+ line: {
149
+ flexDirection: 'row',
150
+ paddingRight: 24,
151
+ paddingVertical: 8
152
+ },
153
+ lineText: {
154
+ fontWeight: '400',
155
+ color: '#1D1D2B',
156
+ fontSize: 18,
157
+ lineHeight: 24,
158
+ letterSpacing: 0.5,
159
+ marginRight: 7
160
+ },
161
+ help: {
162
+ flexDirection: 'row',
163
+ marginTop: 12
164
+ },
165
+ titleHelp: {
166
+ fontSize: 16,
167
+ color: '#9999A8'
168
+ },
169
+ ctaHelp: {
170
+ marginLeft: 5,
171
+ fontSize: 16,
172
+ letterSpacing: 0.5,
173
+ textDecorationLine: 'underline',
174
+ color: '#9999A8'
175
+ }
176
+ });
177
+
178
+ const Corner = props => {
179
+ const {
180
+ position,
181
+ lineLength
182
+ } = props;
183
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
184
+ style: [targetStyle.square, position]
185
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
186
+ style: [targetStyle.stroke, {
187
+ height: LINE_WIDTH,
188
+ width: lineLength
189
+ }]
190
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
191
+ style: [targetStyle.stroke, {
192
+ width: LINE_WIDTH,
193
+ height: lineLength
194
+ }]
195
+ }));
196
+ };
197
+
198
+ const Target = () => {
199
+ const animationRef = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
200
+ const lineLength = animationRef.interpolate({
201
+ inputRange: [0, 1],
202
+ outputRange: [0, WIDTH * 0.35]
203
+ });
204
+ (0, _react.useEffect)(() => {
205
+ const animation = _reactNative.Animated.timing(animationRef, {
206
+ toValue: 1,
207
+ duration: 700,
208
+ delay: 400,
209
+ easing: _reactNative.Easing.out(_reactNative.Easing.sin),
210
+ useNativeDriver: false
211
+ });
212
+
213
+ animation.start(); // on mount only
214
+ // eslint-disable-next-line react-hooks/exhaustive-deps
215
+ }, []);
216
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
217
+ style: targetStyle.target
218
+ }, /*#__PURE__*/_react.default.createElement(Corner, {
219
+ lineLength: lineLength,
220
+ position: {
221
+ top: 0,
222
+ left: 0,
223
+ transform: [{
224
+ rotate: '0deg'
225
+ }]
226
+ }
227
+ }), /*#__PURE__*/_react.default.createElement(Corner, {
228
+ lineLength: lineLength,
229
+ position: {
230
+ top: 0,
231
+ right: 0,
232
+ transform: [{
233
+ rotate: '90deg'
234
+ }]
235
+ }
236
+ }), /*#__PURE__*/_react.default.createElement(Corner, {
237
+ lineLength: lineLength,
238
+ position: {
239
+ bottom: 0,
240
+ right: 0,
241
+ transform: [{
242
+ rotate: '180deg'
243
+ }]
244
+ }
245
+ }), /*#__PURE__*/_react.default.createElement(Corner, {
246
+ lineLength: lineLength,
247
+ position: {
248
+ bottom: 0,
249
+ left: 0,
250
+ transform: [{
251
+ rotate: '270deg'
252
+ }]
253
+ }
254
+ }));
255
+ };
256
+
257
+ const Explanations = props => {
258
+ const {
259
+ locales,
260
+ onHelpPress
261
+ } = props;
262
+ const animationRef = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
263
+ const animateBottom = animationRef.interpolate({
264
+ inputRange: [0, 1],
265
+ outputRange: [-300, 0]
266
+ });
267
+ (0, _react.useEffect)(() => {
268
+ const animation = _reactNative.Animated.timing(animationRef, {
269
+ toValue: 1,
270
+ duration: 600,
271
+ delay: 400,
272
+ easing: _reactNative.Easing.out(_reactNative.Easing.sin),
273
+ useNativeDriver: false
274
+ });
275
+
276
+ animation.start(); // on mount only
277
+ // eslint-disable-next-line react-hooks/exhaustive-deps
278
+ }, []);
279
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
280
+ style: [explanationsStyle.explanations, {
281
+ bottom: animateBottom
282
+ }]
283
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
284
+ style: explanationsStyle.titleWrapper
285
+ }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyQrCode, {
286
+ style: explanationsStyle.qrCodeIcon
287
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
288
+ style: explanationsStyle.titleText
289
+ }, locales.title)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
290
+ style: explanationsStyle.line
291
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
292
+ style: explanationsStyle.lineText
293
+ }, "1."), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
294
+ style: explanationsStyle.lineText
295
+ }, locales.explanation1)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
296
+ style: explanationsStyle.line
297
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
298
+ style: explanationsStyle.lineText
299
+ }, "2."), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
300
+ style: explanationsStyle.lineText
301
+ }, locales.explanation2)), /*#__PURE__*/_react.default.createElement(_index.default, {
302
+ onPress: onHelpPress,
303
+ style: explanationsStyle.help
304
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
305
+ style: explanationsStyle.titleHelp
306
+ }, locales.titleHelp), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
307
+ style: explanationsStyle.ctaHelp
308
+ }, locales.ctaHelp)));
309
+ };
310
+
311
+ const QRCodeScanner = props => {
312
+ const {
313
+ hasPermission,
314
+ locales,
315
+ onScan,
316
+ onHelpPress
317
+ } = props;
318
+ const handleRead = (0, _react.useCallback)(({
319
+ data
320
+ }) => {
321
+ onScan(typeof data === 'string' ? data : undefined); // on mount only
322
+ // eslint-disable-next-line react-hooks/exhaustive-deps
323
+ }, []);
324
+ const blurRef = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
325
+ const blurOpacity = blurRef.interpolate({
326
+ inputRange: [0, 1],
327
+ outputRange: [0, 0.7]
328
+ });
329
+ (0, _react.useEffect)(() => {
330
+ const animation = _reactNative.Animated.timing(blurRef, {
331
+ toValue: 1,
332
+ duration: 800,
333
+ delay: 600,
334
+ easing: _reactNative.Easing.out(_reactNative.Easing.sin),
335
+ useNativeDriver: false
336
+ });
337
+
338
+ animation.start(); // on mount only
339
+ // eslint-disable-next-line react-hooks/exhaustive-deps
340
+ }, []);
341
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
342
+ style: styles.container,
343
+ testID: "qr-code-scanner"
344
+ }, hasPermission ? /*#__PURE__*/_react.default.createElement(_reactNativeQrcodeScanner.default, {
345
+ fadeIn: false,
346
+ onRead: handleRead,
347
+ cameraStyle: styles.camera,
348
+ cameraProps: {
349
+ captureAudio: false
350
+ }
351
+ }) : null, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
352
+ style: [styles.blurs, {
353
+ opacity: blurOpacity
354
+ }]
355
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
356
+ style: styles.blurTop
357
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
358
+ style: styles.blurBottom
359
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
360
+ style: styles.blurLeft
361
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
362
+ style: styles.blurRight
363
+ })), /*#__PURE__*/_react.default.createElement(Target, null), /*#__PURE__*/_react.default.createElement(Explanations, {
364
+ locales: locales,
365
+ onHelpPress: onHelpPress
366
+ }));
367
+ };
368
+
369
+ var _default = QRCodeScanner;
370
+ exports.default = _default;
371
+ //# 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","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","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: 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;;AACA;;AAEA;;AAEA;;AACA;;;;;;;;AAeA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,SAAS,CAACU,KAAV,GATc,CAWd;IACA;EACD,CAbD,EAaG,EAbH;EAeA,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAE7E,MAAM,CAACG,SAApB;IAA+B,MAAM,EAAC;EAAtC,GACGoF,aAAa,gBACZ,6BAAC,iCAAD;IACE,MAAM,EAAE,KADV;IAEE,MAAM,EAAEE,UAFV;IAGE,WAAW,EAAEzF,MAAM,CAACM,MAHtB;IAIE,WAAW,EAAE;MAACyF,YAAY,EAAE;IAAf;EAJf,EADY,GAOV,IARN,eASE,6BAAC,qBAAD,CAAU,IAAV;IAAe,KAAK,EAAE,CAAC/F,MAAM,CAACO,KAAR,EAAe;MAACE,OAAO,EAAEqF;IAAV,CAAf;EAAtB,gBACE,6BAAC,iBAAD;IAAM,KAAK,EAAE9F,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,EAAE4D,OAAvB;IAAgC,WAAW,EAAEC;EAA7C,EAhBF,CADF;AAoBD,CAlDD;;eAoDeK,a"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorpacademy/components",
3
- "version": "11.14.5",
3
+ "version": "11.14.6",
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": "298364f952f3c2cfae797b66ba3b60a89f8dd9f5"
170
172
  }