@coorpacademy/components 11.14.10 → 11.14.12-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button/index.native.d.ts.map +1 -1
- package/es/atom/button/index.native.js +6 -1
- package/es/atom/button/index.native.js.map +1 -1
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +1 -2
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/html/index.native.js +2 -2
- package/es/atom/html/index.native.js.map +1 -1
- package/es/atom/select-modal/index.native.d.ts.map +1 -1
- package/es/atom/select-modal/index.native.js +4 -5
- package/es/atom/select-modal/index.native.js.map +1 -1
- package/es/atom/text/index.native.d.ts +3 -6
- package/es/atom/text/index.native.d.ts.map +1 -1
- package/es/atom/text/index.native.js +11 -11
- package/es/atom/text/index.native.js.map +1 -1
- package/es/hoc/modal/select-item/index.native.d.ts.map +1 -1
- package/es/hoc/modal/select-item/index.native.js +4 -2
- package/es/hoc/modal/select-item/index.native.js.map +1 -1
- package/es/molecule/external-content-button/index.d.ts.map +1 -1
- package/es/molecule/external-content-button/index.js +2 -1
- package/es/molecule/external-content-button/index.js.map +1 -1
- package/es/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
- package/es/molecule/questions/mobile/slider/index.native.js +6 -4
- package/es/molecule/questions/mobile/slider/index.native.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.js +1 -2
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/template/mobile-login/qr-code-scanner/index.native.d.ts.map +1 -1
- package/es/template/mobile-login/qr-code-scanner/index.native.js +6 -5
- package/es/template/mobile-login/qr-code-scanner/index.native.js.map +1 -1
- package/es/template/mobile-login/receive-email/index.native.d.ts.map +1 -1
- package/es/template/mobile-login/receive-email/index.native.js +33 -21
- package/es/template/mobile-login/receive-email/index.native.js.map +1 -1
- package/es/template/mobile-login/welcome/index.native.d.ts.map +1 -1
- package/es/template/mobile-login/welcome/index.native.js +4 -3
- package/es/template/mobile-login/welcome/index.native.js.map +1 -1
- package/lib/atom/button/index.native.d.ts.map +1 -1
- package/lib/atom/button/index.native.js +6 -1
- package/lib/atom/button/index.native.js.map +1 -1
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/html/index.native.js +2 -2
- package/lib/atom/html/index.native.js.map +1 -1
- package/lib/atom/select-modal/index.native.d.ts.map +1 -1
- package/lib/atom/select-modal/index.native.js +4 -5
- package/lib/atom/select-modal/index.native.js.map +1 -1
- package/lib/atom/text/index.native.d.ts +3 -6
- package/lib/atom/text/index.native.d.ts.map +1 -1
- package/lib/atom/text/index.native.js +13 -17
- package/lib/atom/text/index.native.js.map +1 -1
- package/lib/hoc/modal/select-item/index.native.d.ts.map +1 -1
- package/lib/hoc/modal/select-item/index.native.js +4 -2
- package/lib/hoc/modal/select-item/index.native.js.map +1 -1
- package/lib/molecule/external-content-button/index.d.ts.map +1 -1
- package/lib/molecule/external-content-button/index.js +2 -1
- package/lib/molecule/external-content-button/index.js.map +1 -1
- package/lib/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
- package/lib/molecule/questions/mobile/slider/index.native.js +6 -4
- package/lib/molecule/questions/mobile/slider/index.native.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.js +1 -2
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/template/mobile-login/qr-code-scanner/index.native.d.ts.map +1 -1
- package/lib/template/mobile-login/qr-code-scanner/index.native.js +13 -11
- package/lib/template/mobile-login/qr-code-scanner/index.native.js.map +1 -1
- package/lib/template/mobile-login/receive-email/index.native.d.ts.map +1 -1
- package/lib/template/mobile-login/receive-email/index.native.js +33 -21
- package/lib/template/mobile-login/receive-email/index.native.js.map +1 -1
- package/lib/template/mobile-login/welcome/index.native.d.ts.map +1 -1
- package/lib/template/mobile-login/welcome/index.native.js +10 -8
- package/lib/template/mobile-login/welcome/index.native.js.map +1 -1
- package/package.json +2 -2
- package/locales/.mtslconfig.json +0 -1
|
@@ -1 +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;IAGPP,KAAK,EAAE,MAHA;IAIPC,MAAM,EAAE,KAJD;IAKPO,SAAS,EAAE,CAAC;MAACC,UAAU,EAAE,CAACl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AGE,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
|
+
{"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","paddingTop","paddingBottom","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, 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';\nimport Text from '../../../atom/text/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 bottom: 0,\n backgroundColor: '#fff',\n borderTopLeftRadius: 30,\n borderTopRightRadius: 30,\n paddingHorizontal: 24,\n paddingTop: 8,\n paddingBottom: 30\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: 24,\n letterSpacing: 0.5,\n marginLeft: 7\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;;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,CAT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ACE,OAAO,EAAEyF;IAAV,CAAf;EAAtB,gBACE,6BAAC,iBAAD;IAAM,KAAK,EAAElG,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,EAAEgE,OAAvB;IAAgC,WAAW,EAAEC;EAA7C,EAhBF,CADF;AAoBD,CAlDD;;eAoDeK,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/receive-email/index.native.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/receive-email/index.native.tsx"],"names":[],"mappings":";AAoIA,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,YAAY,UAAW,KAAK,gBAyEjC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -19,11 +19,16 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
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
21
|
|
|
22
|
+
const enabledColor = '#0061ff';
|
|
23
|
+
const disabledColor = '#9999A8';
|
|
24
|
+
const emailRegex = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
|
|
25
|
+
|
|
22
26
|
const styles = _reactNative.StyleSheet.create({
|
|
23
27
|
container: {
|
|
24
28
|
width: '100%',
|
|
25
29
|
height: '100%',
|
|
26
30
|
flex: 1,
|
|
31
|
+
justifyContent: 'space-between',
|
|
27
32
|
alignItems: 'flex-start',
|
|
28
33
|
paddingVertical: 50,
|
|
29
34
|
paddingHorizontal: 24
|
|
@@ -90,6 +95,8 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
90
95
|
height: 48,
|
|
91
96
|
width: '100%',
|
|
92
97
|
backgroundColor: '#F4F4F5',
|
|
98
|
+
borderColor: enabledColor,
|
|
99
|
+
borderWidth: 2,
|
|
93
100
|
fontSize: 15,
|
|
94
101
|
lineHeight: 16,
|
|
95
102
|
alignContent: 'center',
|
|
@@ -98,16 +105,17 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
98
105
|
paddingHorizontal: 40
|
|
99
106
|
},
|
|
100
107
|
ctaWrapper: {
|
|
101
|
-
width: '100%'
|
|
108
|
+
width: '100%',
|
|
109
|
+
overflow: 'hidden',
|
|
110
|
+
borderRadius: 12,
|
|
111
|
+
marginTop: 30,
|
|
112
|
+
marginBottom: 50
|
|
102
113
|
},
|
|
103
114
|
ctaButton: {
|
|
104
|
-
borderRadius: 12,
|
|
105
|
-
paddingHorizontal: 50,
|
|
106
|
-
paddingVertical: 16,
|
|
107
115
|
flexDirection: 'row',
|
|
108
116
|
justifyContent: 'center',
|
|
109
117
|
alignItems: 'center',
|
|
110
|
-
|
|
118
|
+
paddingVertical: 16
|
|
111
119
|
},
|
|
112
120
|
sendIcon: {
|
|
113
121
|
fill: '#fff',
|
|
@@ -123,24 +131,27 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
123
131
|
}
|
|
124
132
|
});
|
|
125
133
|
|
|
126
|
-
const enabledColor = '#0061ff';
|
|
127
|
-
const disabledColor = '#9999A8';
|
|
128
|
-
const emailRegex = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
|
|
129
|
-
|
|
130
134
|
const ReceiveEmail = props => {
|
|
131
135
|
const {
|
|
132
136
|
locales,
|
|
133
137
|
onClose
|
|
134
138
|
} = props;
|
|
135
139
|
const [isValid, setValid] = (0, _react.useState)(false);
|
|
140
|
+
const [isTextInputFocused, setTextInputFocused] = (0, _react.useState)(false);
|
|
136
141
|
const isKeyboardVisible = (0, _useMobileKeyboardVisibility.default)();
|
|
137
142
|
const handleChangeText = (0, _react.useCallback)(value => {
|
|
138
143
|
setValid(emailRegex.test(value));
|
|
139
144
|
}, []);
|
|
145
|
+
const handleTextInputFocus = (0, _react.useCallback)(() => {
|
|
146
|
+
setTextInputFocused(true);
|
|
147
|
+
}, []);
|
|
148
|
+
const handleTextInputBlur = (0, _react.useCallback)(() => {
|
|
149
|
+
setTextInputFocused(false);
|
|
150
|
+
}, []);
|
|
140
151
|
const animationRef = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
141
|
-
const
|
|
152
|
+
const animatedColor = animationRef.interpolate({
|
|
142
153
|
inputRange: [0, 1],
|
|
143
|
-
outputRange: [
|
|
154
|
+
outputRange: [disabledColor, enabledColor]
|
|
144
155
|
});
|
|
145
156
|
(0, _react.useEffect)(() => {
|
|
146
157
|
const animation = _reactNative.Animated.timing(animationRef, {
|
|
@@ -152,10 +163,9 @@ const ReceiveEmail = props => {
|
|
|
152
163
|
|
|
153
164
|
animation.start();
|
|
154
165
|
}, [animationRef, isValid]);
|
|
155
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}],
|
|
166
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.KeyboardAvoidingView, {
|
|
167
|
+
behavior: _reactNative.Platform.OS === 'ios' ? 'padding' : 'height',
|
|
168
|
+
style: [styles.container],
|
|
159
169
|
testID: "receive-email"
|
|
160
170
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
161
171
|
style: styles.contentWrapper
|
|
@@ -175,21 +185,23 @@ const ReceiveEmail = props => {
|
|
|
175
185
|
}, locales.explanation), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
176
186
|
style: styles.subtitle
|
|
177
187
|
}, locales.subtitle), /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
|
|
178
|
-
style: styles.textInput,
|
|
188
|
+
style: [styles.textInput, {
|
|
189
|
+
borderWidth: isTextInputFocused ? 2 : 0
|
|
190
|
+
}],
|
|
179
191
|
placeholder: "john.doe@company.com",
|
|
180
192
|
placeholderTextColor: disabledColor,
|
|
181
|
-
onChangeText: handleChangeText
|
|
193
|
+
onChangeText: handleChangeText,
|
|
194
|
+
onFocus: handleTextInputFocus,
|
|
195
|
+
onBlur: handleTextInputBlur
|
|
182
196
|
}), /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyEmail, {
|
|
183
197
|
style: styles.innerMailIcon
|
|
184
198
|
})), /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
185
199
|
style: [styles.ctaWrapper, {
|
|
186
|
-
|
|
200
|
+
backgroundColor: animatedColor
|
|
187
201
|
}]
|
|
188
202
|
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
189
203
|
disabled: !isValid,
|
|
190
|
-
style: [styles.ctaButton,
|
|
191
|
-
backgroundColor: isValid ? enabledColor : disabledColor
|
|
192
|
-
}],
|
|
204
|
+
style: [styles.ctaButton],
|
|
193
205
|
onPress: onClose
|
|
194
206
|
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademySendEmail, {
|
|
195
207
|
style: styles.sendIcon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["styles","StyleSheet","create","container","width","height","flex","alignItems","paddingVertical","paddingHorizontal","contentWrapper","backButton","arrowIcon","fill","mailIconWrapper","backgroundColor","padding","marginVertical","borderRadius","justifyContent","mailIcon","innerMailIcon","marginTop","marginLeft","title","color","fontSize","fontWeight","lineHeight","textAlign","marginBottom","explanation","letterSpacing","subtitle","textInput","alignContent","ctaWrapper","ctaButton","flexDirection","sendIcon","marginRight","ctaText","enabledColor","disabledColor","emailRegex","ReceiveEmail","props","locales","onClose","isValid","setValid","useState","isKeyboardVisible","useMobileKeyboardVisibility","handleChangeText","useCallback","value","test","animationRef","useRef","Animated","Value","current","animatedOpacity","interpolate","inputRange","outputRange","useEffect","animation","timing","toValue","duration","easing","Easing","out","sin","useNativeDriver","start","opacity","cta"],"sources":["../../../../src/template/mobile-login/receive-email/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useRef, useState} from 'react';\nimport {Animated, Easing, StyleSheet, Text, TextInput, View} from 'react-native';\nimport {\n NovaCompositionNavigationLeftArrow as ArrowIcon,\n NovaCompositionCoorpacademyEmail as MailIcon,\n NovaCompositionCoorpacademySendEmail as SendIcon\n} from '@coorpacademy/nova-icons';\n\nimport Touchable from '../../../hoc/touchable/index.native';\nimport useMobileKeyboardVisibility from '../../../util/use-mobile-keyboard-visibility';\n\nconst styles = StyleSheet.create({\n container: {\n width: '100%',\n height: '100%',\n flex: 1,\n alignItems: 'flex-start',\n paddingVertical: 50,\n paddingHorizontal: 24\n },\n contentWrapper: {\n width: '100%'\n },\n backButton: {\n paddingVertical: 20\n },\n arrowIcon: {\n fill: '#515161',\n width: 24,\n height: 15\n },\n mailIconWrapper: {\n backgroundColor: '#f1f6fe',\n width: 64,\n height: 64,\n padding: 23,\n marginVertical: 24,\n borderRadius: 16,\n justifyContent: 'center',\n alignItems: 'center'\n },\n mailIcon: {\n fill: '#0061ff',\n width: 24,\n height: 18\n },\n innerMailIcon: {\n fill: '#515161',\n width: 16,\n height: 12,\n marginTop: -30,\n marginLeft: 16\n },\n title: {\n color: '#1D1D2B',\n fontSize: 24,\n fontWeight: '600',\n lineHeight: 32,\n textAlign: 'left',\n marginBottom: 12\n },\n explanation: {\n color: '#515161',\n fontSize: 17,\n letterSpacing: 0.4,\n fontWeight: '500',\n lineHeight: 22,\n textAlign: 'left',\n marginBottom: 24\n },\n subtitle: {\n color: '#1D1D2B',\n fontSize: 15,\n fontWeight: '600',\n lineHeight: 20,\n textAlign: 'left',\n marginBottom: 8\n },\n textInput: {\n height: 48,\n width: '100%',\n backgroundColor: '#F4F4F5',\n fontSize: 15,\n lineHeight: 16,\n alignContent: 'center',\n color: '#515161',\n borderRadius: 7,\n paddingHorizontal: 40\n },\n ctaWrapper: {\n width: '100%'\n },\n ctaButton: {\n borderRadius: 12,\n paddingHorizontal: 50,\n paddingVertical: 16,\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n marginTop: 30\n },\n sendIcon: {\n fill: '#fff',\n width: 16,\n height: 16,\n marginRight: 8\n },\n ctaText: {\n color: '#fff',\n fontWeight: '700',\n fontSize: 15,\n lineHeight: 24\n }\n});\n\nconst enabledColor = '#0061ff';\nconst disabledColor = '#9999A8';\nconst emailRegex = /^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$/;\n\nexport type Props = {\n locales: {\n title: string;\n explanation: string;\n subtitle: string;\n cta: string;\n };\n onClose: () => void;\n};\n\nconst ReceiveEmail = (props: Props) => {\n const {locales, onClose} = props;\n\n const [isValid, setValid] = useState<boolean>(false);\n const isKeyboardVisible = useMobileKeyboardVisibility();\n\n const handleChangeText = useCallback(value => {\n setValid(emailRegex.test(value));\n }, []);\n\n const animationRef = useRef<Animated.Value>(new Animated.Value(0)).current;\n const animatedOpacity = animationRef.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1]\n });\n\n useEffect(() => {\n const animation = Animated.timing(animationRef, {\n toValue: isValid ? 1 : 0,\n duration: 250,\n easing: Easing.out(Easing.sin),\n useNativeDriver: false\n });\n\n animation.start();\n }, [animationRef, isValid]);\n\n return (\n <View\n style={[\n styles.container,\n {justifyContent: isKeyboardVisible ? 'flex-start' : 'space-between'}\n ]}\n testID=\"receive-email\"\n >\n <View style={styles.contentWrapper}>\n <Touchable style={styles.backButton} onPress={onClose}>\n <ArrowIcon style={styles.arrowIcon} />\n </Touchable>\n {isKeyboardVisible ? null : (\n <View style={styles.mailIconWrapper}>\n <MailIcon style={styles.mailIcon} />\n </View>\n )}\n <Text style={styles.title}>{locales.title}</Text>\n <Text style={styles.explanation}>{locales.explanation}</Text>\n <Text style={styles.subtitle}>{locales.subtitle}</Text>\n <TextInput\n style={styles.textInput}\n placeholder=\"john.doe@company.com\"\n placeholderTextColor={disabledColor}\n onChangeText={handleChangeText}\n />\n <MailIcon style={styles.innerMailIcon} />\n </View>\n\n <Animated.View style={[styles.ctaWrapper, {opacity: animatedOpacity}]}>\n <Touchable\n disabled={!isValid}\n style={[styles.ctaButton, {backgroundColor: isValid ? enabledColor : disabledColor}]}\n onPress={onClose}\n >\n <SendIcon style={styles.sendIcon} />\n <Text style={styles.ctaText}>{locales.cta}</Text>\n </Touchable>\n </Animated.View>\n </View>\n );\n};\n\nexport default ReceiveEmail;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAMA;;AACA;;;;;;;;AAEA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC/BC,SAAS,EAAE;IACTC,KAAK,EAAE,MADE;IAETC,MAAM,EAAE,MAFC;IAGTC,IAAI,EAAE,CAHG;IAITC,UAAU,EAAE,YAJH;IAKTC,eAAe,EA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AAC,2CAAD;IAAU,KAAK,EAAEd,MAAM,CAACoB;EAAxB,EADF,CALJ,eASE,6BAAC,iBAAD;IAAM,KAAK,EAAEpB,MAAM,CAACwB;EAApB,GAA4BuB,OAAO,CAACvB,KAApC,CATF,eAUE,6BAAC,iBAAD;IAAM,KAAK,EAAExB,MAAM,CAAC+B;EAApB,GAAkCgB,OAAO,CAAChB,WAA1C,CAVF,eAWE,6BAAC,iBAAD;IAAM,KAAK,EAAE/B,MAAM,CAACiC;EAApB,GAA+Bc,OAAO,CAACd,QAAvC,CAXF,eAYE,6BAAC,sBAAD;IACE,KAAK,EAAEjC,MAAM,CAACkC,SADhB;IAEE,WAAW,EAAC,sBAFd;IAGE,oBAAoB,EAAES,aAHxB;IAIE,YAAY,EAAEW;EAJhB,EAZF,eAkBE,6BAAC,2CAAD;IAAU,KAAK,EAAEtD,MAAM,CAACqB;EAAxB,EAlBF,CAPF,eA4BE,6BAAC,qBAAD,CAAU,IAAV;IAAe,KAAK,EAAE,CAACrB,MAAM,CAACoC,UAAR,EAAoB;MAAC0C,OAAO,EAAEf;IAAV,CAApB;EAAtB,gBACE,6BAAC,cAAD;IACE,QAAQ,EAAE,CAACd,OADb;IAEE,KAAK,EAAE,CAACjD,MAAM,CAACqC,SAAR,EAAmB;MAACtB,eAAe,EAAEkC,OAAO,GAAGP,YAAH,GAAkBC;IAA3C,CAAnB,CAFT;IAGE,OAAO,EAAEK;EAHX,gBAKE,6BAAC,+CAAD;IAAU,KAAK,EAAEhD,MAAM,CAACuC;EAAxB,EALF,eAME,6BAAC,iBAAD;IAAM,KAAK,EAAEvC,MAAM,CAACyC;EAApB,GAA8BM,OAAO,CAACgC,GAAtC,CANF,CADF,CA5BF,CADF;AAyCD,CApED;;eAsEelC,Y"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["enabledColor","disabledColor","emailRegex","styles","StyleSheet","create","container","width","height","flex","justifyContent","alignItems","paddingVertical","paddingHorizontal","contentWrapper","backButton","arrowIcon","fill","mailIconWrapper","backgroundColor","padding","marginVertical","borderRadius","mailIcon","innerMailIcon","marginTop","marginLeft","title","color","fontSize","fontWeight","lineHeight","textAlign","marginBottom","explanation","letterSpacing","subtitle","textInput","borderColor","borderWidth","alignContent","ctaWrapper","overflow","ctaButton","flexDirection","sendIcon","marginRight","ctaText","ReceiveEmail","props","locales","onClose","isValid","setValid","useState","isTextInputFocused","setTextInputFocused","isKeyboardVisible","useMobileKeyboardVisibility","handleChangeText","useCallback","value","test","handleTextInputFocus","handleTextInputBlur","animationRef","useRef","Animated","Value","current","animatedColor","interpolate","inputRange","outputRange","useEffect","animation","timing","toValue","duration","easing","Easing","out","sin","useNativeDriver","start","Platform","OS","cta"],"sources":["../../../../src/template/mobile-login/receive-email/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useRef, useState} from 'react';\nimport {\n Animated,\n Easing,\n KeyboardAvoidingView,\n Platform,\n StyleSheet,\n Text,\n TextInput,\n View\n} from 'react-native';\nimport {\n NovaCompositionNavigationLeftArrow as ArrowIcon,\n NovaCompositionCoorpacademyEmail as MailIcon,\n NovaCompositionCoorpacademySendEmail as SendIcon\n} from '@coorpacademy/nova-icons';\n\nimport Touchable from '../../../hoc/touchable/index.native';\nimport useMobileKeyboardVisibility from '../../../util/use-mobile-keyboard-visibility';\n\nconst enabledColor = '#0061ff';\nconst disabledColor = '#9999A8';\nconst emailRegex = /^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$/;\n\nconst styles = StyleSheet.create({\n container: {\n width: '100%',\n height: '100%',\n flex: 1,\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n paddingVertical: 50,\n paddingHorizontal: 24\n },\n contentWrapper: {\n width: '100%'\n },\n backButton: {\n paddingVertical: 20\n },\n arrowIcon: {\n fill: '#515161',\n width: 24,\n height: 15\n },\n mailIconWrapper: {\n backgroundColor: '#f1f6fe',\n width: 64,\n height: 64,\n padding: 23,\n marginVertical: 24,\n borderRadius: 16,\n justifyContent: 'center',\n alignItems: 'center'\n },\n mailIcon: {\n fill: '#0061ff',\n width: 24,\n height: 18\n },\n innerMailIcon: {\n fill: '#515161',\n width: 16,\n height: 12,\n marginTop: -30,\n marginLeft: 16\n },\n title: {\n color: '#1D1D2B',\n fontSize: 24,\n fontWeight: '600',\n lineHeight: 32,\n textAlign: 'left',\n marginBottom: 12\n },\n explanation: {\n color: '#515161',\n fontSize: 17,\n letterSpacing: 0.4,\n fontWeight: '500',\n lineHeight: 22,\n textAlign: 'left',\n marginBottom: 24\n },\n subtitle: {\n color: '#1D1D2B',\n fontSize: 15,\n fontWeight: '600',\n lineHeight: 20,\n textAlign: 'left',\n marginBottom: 8\n },\n textInput: {\n height: 48,\n width: '100%',\n backgroundColor: '#F4F4F5',\n borderColor: enabledColor,\n borderWidth: 2,\n fontSize: 15,\n lineHeight: 16,\n alignContent: 'center',\n color: '#515161',\n borderRadius: 7,\n paddingHorizontal: 40\n },\n ctaWrapper: {\n width: '100%',\n overflow: 'hidden',\n borderRadius: 12,\n marginTop: 30,\n marginBottom: 50\n },\n ctaButton: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 16\n },\n sendIcon: {\n fill: '#fff',\n width: 16,\n height: 16,\n marginRight: 8\n },\n ctaText: {\n color: '#fff',\n fontWeight: '700',\n fontSize: 15,\n lineHeight: 24\n }\n});\n\nexport type Props = {\n locales: {\n title: string;\n explanation: string;\n subtitle: string;\n cta: string;\n };\n onClose: () => void;\n};\n\nconst ReceiveEmail = (props: Props) => {\n const {locales, onClose} = props;\n\n const [isValid, setValid] = useState<boolean>(false);\n const [isTextInputFocused, setTextInputFocused] = useState<boolean>(false);\n const isKeyboardVisible = useMobileKeyboardVisibility();\n\n const handleChangeText = useCallback(value => {\n setValid(emailRegex.test(value));\n }, []);\n\n const handleTextInputFocus = useCallback(() => {\n setTextInputFocused(true);\n }, []);\n\n const handleTextInputBlur = useCallback(() => {\n setTextInputFocused(false);\n }, []);\n\n const animationRef = useRef<Animated.Value>(new Animated.Value(0)).current;\n const animatedColor = animationRef.interpolate({\n inputRange: [0, 1],\n outputRange: [disabledColor, enabledColor]\n });\n\n useEffect(() => {\n const animation = Animated.timing(animationRef, {\n toValue: isValid ? 1 : 0,\n duration: 250,\n easing: Easing.out(Easing.sin),\n useNativeDriver: false\n });\n\n animation.start();\n }, [animationRef, isValid]);\n\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === 'ios' ? 'padding' : 'height'}\n style={[styles.container]}\n testID=\"receive-email\"\n >\n <View style={styles.contentWrapper}>\n <Touchable style={styles.backButton} onPress={onClose}>\n <ArrowIcon style={styles.arrowIcon} />\n </Touchable>\n {isKeyboardVisible ? null : (\n <View style={styles.mailIconWrapper}>\n <MailIcon style={styles.mailIcon} />\n </View>\n )}\n <Text style={styles.title}>{locales.title}</Text>\n <Text style={styles.explanation}>{locales.explanation}</Text>\n <Text style={styles.subtitle}>{locales.subtitle}</Text>\n <TextInput\n style={[styles.textInput, {borderWidth: isTextInputFocused ? 2 : 0}]}\n placeholder=\"john.doe@company.com\"\n placeholderTextColor={disabledColor}\n onChangeText={handleChangeText}\n onFocus={handleTextInputFocus}\n onBlur={handleTextInputBlur}\n />\n <MailIcon style={styles.innerMailIcon} />\n </View>\n\n <Animated.View style={[styles.ctaWrapper, {backgroundColor: animatedColor}]}>\n <Touchable disabled={!isValid} style={[styles.ctaButton]} onPress={onClose}>\n <SendIcon style={styles.sendIcon} />\n <Text style={styles.ctaText}>{locales.cta}</Text>\n </Touchable>\n </Animated.View>\n </KeyboardAvoidingView>\n );\n};\n\nexport default ReceiveEmail;\n"],"mappings":";;;;;AAAA;;AACA;;AAUA;;AAMA;;AACA;;;;;;;;AAEA,MAAMA,YAAY,GAAG,SAArB;AACA,MAAMC,aAAa,GAAG,SAAtB;AACA,MAAMC,UAAU,GAAG,gDAAnB;;AAEA,MAAMC,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC/BC,SAAS,EAA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,EAAE,CAACrB,MAAM,CAACsC,UAAR,EAAoB;MAACtB,eAAe,EAAEmD;IAAlB,CAApB;EAAtB,gBACE,6BAAC,cAAD;IAAW,QAAQ,EAAE,CAAClB,OAAtB;IAA+B,KAAK,EAAE,CAACjD,MAAM,CAACwC,SAAR,CAAtC;IAA0D,OAAO,EAAEQ;EAAnE,gBACE,6BAAC,+CAAD;IAAU,KAAK,EAAEhD,MAAM,CAAC0C;EAAxB,EADF,eAEE,6BAAC,iBAAD;IAAM,KAAK,EAAE1C,MAAM,CAAC4C;EAApB,GAA8BG,OAAO,CAACqC,GAAtC,CAFF,CADF,CA5BF,CADF;AAqCD,CAzED;;eA2EevC,Y"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":";AA8KA,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"}
|
|
@@ -17,6 +17,8 @@ var _index = _interopRequireDefault(require("../../../hoc/touchable/index.native
|
|
|
17
17
|
|
|
18
18
|
var _templateContext = require("../../app-review/template-context");
|
|
19
19
|
|
|
20
|
+
var _index2 = _interopRequireDefault(require("../../../atom/text/index.native"));
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
24
|
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); }
|
|
@@ -94,8 +96,8 @@ const createStyleSheet = theme => _reactNative.StyleSheet.create({
|
|
|
94
96
|
},
|
|
95
97
|
description: {
|
|
96
98
|
color: '#1D1D2B',
|
|
97
|
-
fontWeight: '
|
|
98
|
-
fontSize:
|
|
99
|
+
fontWeight: '400',
|
|
100
|
+
fontSize: 17,
|
|
99
101
|
lineHeight: 24,
|
|
100
102
|
paddingVertical: 8
|
|
101
103
|
},
|
|
@@ -270,9 +272,9 @@ const Welcome = props => {
|
|
|
270
272
|
fill: "#fff"
|
|
271
273
|
})))), /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
272
274
|
style: [styleSheet.content, fadeInContent.animatedStyle]
|
|
273
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
275
|
+
}, /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
274
276
|
style: styleSheet.title
|
|
275
|
-
}, locales.title), /*#__PURE__*/_react.default.createElement(
|
|
277
|
+
}, locales.title), /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
276
278
|
style: styleSheet.description
|
|
277
279
|
}, locales.description), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
278
280
|
style: styleSheet.actions
|
|
@@ -284,7 +286,7 @@ const Welcome = props => {
|
|
|
284
286
|
testID: "qr-code-button"
|
|
285
287
|
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyQrCode, {
|
|
286
288
|
style: styleSheet.qrCodeIcon
|
|
287
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
289
|
+
}), /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
288
290
|
style: styleSheet.ctaQrCodeText
|
|
289
291
|
}, locales.ctaQrCode)), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
290
292
|
style: [styleSheet.button, styleSheet.ctaReceiveMail],
|
|
@@ -292,14 +294,14 @@ const Welcome = props => {
|
|
|
292
294
|
testID: "receive-email-button"
|
|
293
295
|
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyEmail, {
|
|
294
296
|
style: styleSheet.mailIcon
|
|
295
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
297
|
+
}), /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
296
298
|
style: styleSheet.ctaReceiveMailText
|
|
297
299
|
}, locales.ctaReceiveMail))), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
298
300
|
onPress: onHelpPress,
|
|
299
301
|
style: styleSheet.help
|
|
300
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
302
|
+
}, /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
301
303
|
style: styleSheet.titleHelp
|
|
302
|
-
}, locales.titleHelp), /*#__PURE__*/_react.default.createElement(
|
|
304
|
+
}, locales.titleHelp), /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
303
305
|
style: styleSheet.ctaHelp
|
|
304
306
|
}, locales.ctaHelp)))));
|
|
305
307
|
};
|
|
@@ -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","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 color: '#1D1D2B',\n fontWeight: '500',\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,IAAI,EAAE,CAJG;IAKTC,KAAK,EAAE,CALE;IAMTC,IAAI,EAAE;EANG,CAfK;EAuBhBQ,QAAQ,EAAE;IACRD,QAAQ,EAAE,UADF;IAERX,GAAG,EAAE,CAAC,GAFE;IAGRC,MAAM,EAAE,CAHA;IAIRC,IAAI,EAAE,CAAC,GAJC;IAKRC,KAAK,EAAE,CAAC,GALA;IAMRU,OAAO,EAAE,CAND;IAORC,SAAS,EAAE,CAAC;MAACC,MAAM,EAAE;IAAT,CAAD;EAPH,CAvBM;EAgChBC,SAAS,EAAE;IACTL,QAAQ,EAAE,UADD;IAETX,GAAG,EAAE,CAAC,GAFG;IAGTC,MAAM,EAAE,CAAC,GAHA;IAITC,IAAI,EAAE,CAAC,GAJE;IAKTC,KAAK,EAAE,CAAC,GALC;IAMTU,OAAO,EAAE,GANA;IAOTC,SAAS,EAAE,CAAC;MAACC,MAAM,EAAE;IAAT,CAAD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,KAAK,EAAEiB,UAAU,CAACnB;EAAxB,GAAwCa,OAAO,CAAChB,SAAhD,CANF,CADF,eASE,6BAAC,cAAD;IACE,KAAK,EAAE,CAACsB,UAAU,CAAC3B,MAAZ,EAAoB2B,UAAU,CAACf,cAA/B,CADT;IAEE,OAAO,EAAEa,yBAFX;IAGE,MAAM,EAAC;EAHT,gBAKE,6BAAC,2CAAD;IAAU,KAAK,EAAEE,UAAU,CAACb;EAA5B,EALF,eAME,6BAAC,iBAAD;IAAM,KAAK,EAAEa,UAAU,CAACd;EAAxB,GAA6CQ,OAAO,CAACT,cAArD,CANF,CATF,CADF,eAmBE,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,CAnBF,CAJF,CA3BF,CADF;AA2DD,CAvID;;eAyIeE,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, 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';\nimport Text from '../../../atom/text/index.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 color: '#1D1D2B',\n fontWeight: '400',\n fontSize: 17,\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;;AAEA;;;;;;;;AA4BA,M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,MAAM,EAAC;EAHT,gBAKE,6BAAC,2CAAD;IAAU,KAAK,EAAEE,UAAU,CAACb;EAA5B,EALF,eAME,6BAAC,eAAD;IAAM,KAAK,EAAEa,UAAU,CAACd;EAAxB,GAA6CQ,OAAO,CAACT,cAArD,CANF,CATF,CADF,eAmBE,6BAAC,cAAD;IAAW,OAAO,EAAEY,WAApB;IAAiC,KAAK,EAAEG,UAAU,CAACZ;EAAnD,gBACE,6BAAC,eAAD;IAAM,KAAK,EAAEY,UAAU,CAACX;EAAxB,GAAoCK,OAAO,CAACL,SAA5C,CADF,eAEE,6BAAC,eAAD;IAAM,KAAK,EAAEW,UAAU,CAACV;EAAxB,GAAkCI,OAAO,CAACJ,OAA1C,CAFF,CAnBF,CAJF,CA3BF,CADF;AA2DD,CAvID;;eAyIeE,O"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.14.
|
|
3
|
+
"version": "11.14.12-alpha.0+4a389b23b7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"last 2 versions",
|
|
169
169
|
"IE 11"
|
|
170
170
|
],
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "4a389b23b74c04f744c683209e68d5cdb66b7304"
|
|
172
172
|
}
|
package/locales/.mtslconfig.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ignore_dirs":[]}
|