@coorpacademy/components 11.40.14-react18.80 → 11.40.14-react18.84
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/gradient/index.native.d.ts.map +1 -1
- package/es/atom/gradient/index.native.js +28 -7
- package/es/atom/gradient/index.native.js.map +1 -1
- package/es/atom/loader/index.native.d.ts.map +1 -1
- package/es/atom/loader/index.native.js +5 -1
- package/es/atom/loader/index.native.js.map +1 -1
- package/es/template/mobile-login/confirm-email-sent/index.native.d.ts.map +1 -1
- package/es/template/mobile-login/confirm-email-sent/index.native.js +23 -10
- package/es/template/mobile-login/confirm-email-sent/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 +23 -10
- package/es/template/mobile-login/welcome/index.native.js.map +1 -1
- package/lib/atom/gradient/index.native.d.ts.map +1 -1
- package/lib/atom/gradient/index.native.js +28 -7
- package/lib/atom/gradient/index.native.js.map +1 -1
- package/lib/atom/loader/index.native.d.ts.map +1 -1
- package/lib/atom/loader/index.native.js +5 -1
- package/lib/atom/loader/index.native.js.map +1 -1
- package/lib/template/mobile-login/confirm-email-sent/index.native.d.ts.map +1 -1
- package/lib/template/mobile-login/confirm-email-sent/index.native.js +22 -9
- package/lib/template/mobile-login/confirm-email-sent/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 +22 -9
- package/lib/template/mobile-login/welcome/index.native.js.map +1 -1
- package/package.json +5 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/gradient/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/gradient/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACvC,OAAO,EAAO,SAAS,EAAuB,MAAM,cAAc,CAAC;AAGnE,oBAAY,KAAK,GAAG;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,oBAAoB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;CACvE,CAAC;AAEF,QAAA,MAAM,QAAQ,qFAQX,KAAK,sBAoDP,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { View, StyleSheet, Platform } from 'react-native';
|
|
3
3
|
import Color from 'colorjs.io';
|
|
4
4
|
const Gradient = ({
|
|
5
5
|
children,
|
|
@@ -10,9 +10,17 @@ const Gradient = ({
|
|
|
10
10
|
testID,
|
|
11
11
|
pointerEvents
|
|
12
12
|
}) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
// Validate colors array - ensure all values are valid strings
|
|
14
|
+
const validColors = colors?.filter(c => c && typeof c === 'string') || [];
|
|
15
|
+
|
|
16
|
+
// Fallback if no valid colors provided
|
|
17
|
+
if (validColors.length === 0) {
|
|
18
|
+
console.warn('Gradient: No valid colors provided, using transparent fallback');
|
|
19
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
20
|
+
}
|
|
21
|
+
let calculatedColors = validColors;
|
|
22
|
+
if (validColors.length === 1) {
|
|
23
|
+
const [raw] = validColors;
|
|
16
24
|
const transparent = new Color(raw).to('srgb');
|
|
17
25
|
transparent.alpha = 0;
|
|
18
26
|
calculatedColors = transparencyPosition === 'top' ? [transparent.toString(), raw, raw] : [raw, raw, transparent.toString()];
|
|
@@ -26,9 +34,22 @@ const Gradient = ({
|
|
|
26
34
|
height
|
|
27
35
|
});
|
|
28
36
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
|
|
38
|
+
// Build CSS gradient string (vertical by default)
|
|
39
|
+
const gradientString = `linear-gradient(180deg, ${calculatedColors.join(', ')})`;
|
|
40
|
+
const gradientStyle = Platform.select({
|
|
41
|
+
default: {
|
|
42
|
+
// @ts-ignore - experimental_backgroundImage is not yet in types
|
|
43
|
+
experimental_backgroundImage: gradientString
|
|
44
|
+
},
|
|
45
|
+
web: {
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
backgroundImage: gradientString
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const combinedStyle = StyleSheet.flatten([gradientStyle, ..._style]);
|
|
51
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
52
|
+
style: combinedStyle,
|
|
32
53
|
pointerEvents: pointerEvents,
|
|
33
54
|
testID: testID
|
|
34
55
|
}, children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","View","StyleSheet","Platform","Color","Gradient","children","colors","transparencyPosition","height","style","testID","pointerEvents","validColors","filter","c","length","console","warn","createElement","Fragment","calculatedColors","raw","transparent","to","alpha","toString","_style","push","gradientString","join","gradientStyle","select","default","experimental_backgroundImage","web","backgroundImage","combinedStyle","flatten"],"sources":["../../../src/atom/gradient/index.native.tsx"],"sourcesContent":["import React, {ReactNode} from 'react';\nimport {View, ViewStyle, StyleSheet, Platform} from 'react-native';\nimport Color from 'colorjs.io';\n\nexport type Props = {\n children?: ReactNode;\n colors: Array<string>;\n transparencyPosition?: 'top' | 'bottom';\n height?: number;\n style?: ViewStyle | ViewStyle[];\n testID?: string;\n pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only' | undefined;\n};\n\nconst Gradient = ({\n children,\n colors,\n transparencyPosition = 'top',\n height,\n style,\n testID,\n pointerEvents\n}: Props) => {\n // Validate colors array - ensure all values are valid strings\n const validColors = colors?.filter(c => c && typeof c === 'string') || [];\n\n // Fallback if no valid colors provided\n if (validColors.length === 0) {\n console.warn('Gradient: No valid colors provided, using transparent fallback');\n return <>{children}</>;\n }\n\n let calculatedColors = validColors;\n if (validColors.length === 1) {\n const [raw] = validColors;\n const transparent = new Color(raw).to('srgb');\n transparent.alpha = 0;\n\n calculatedColors =\n transparencyPosition === 'top'\n ? [transparent.toString(), raw, raw]\n : [raw, raw, transparent.toString()];\n }\n\n const _style: ViewStyle[] = [];\n\n if (style) {\n _style.push(style as ViewStyle);\n }\n if (height) {\n _style.push({height});\n }\n\n // Build CSS gradient string (vertical by default)\n const gradientString = `linear-gradient(180deg, ${calculatedColors.join(', ')})`;\n\n const gradientStyle: ViewStyle = Platform.select({\n default: {\n // @ts-ignore - experimental_backgroundImage is not yet in types\n experimental_backgroundImage: gradientString\n },\n web: {\n // @ts-ignore\n backgroundImage: gradientString\n }\n });\n\n const combinedStyle = StyleSheet.flatten([gradientStyle, ..._style]);\n\n return (\n <View style={combinedStyle} pointerEvents={pointerEvents} testID={testID}>\n {children}\n </View>\n );\n};\n\nexport default Gradient;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAmB,OAAO;AACtC,SAAQC,IAAI,EAAaC,UAAU,EAAEC,QAAQ,QAAO,cAAc;AAClE,OAAOC,KAAK,MAAM,YAAY;AAY9B,MAAMC,QAAQ,GAAGA,CAAC;EAChBC,QAAQ;EACRC,MAAM;EACNC,oBAAoB,GAAG,KAAK;EAC5BC,MAAM;EACNC,KAAK;EACLC,MAAM;EACNC;AACK,CAAC,KAAK;EACX;EACA,MAAMC,WAAW,GAAGN,MAAM,EAAEO,MAAM,C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ACoC,OAAO,CAAC,CAACP,aAAa,EAAE,GAAGJ,MAAM,CAAC,CAAC;EAEpE,oBACE3B,KAAA,CAAAmB,aAAA,CAAClB,IAAI;IAACS,KAAK,EAAE2B,aAAc;IAACzB,aAAa,EAAEA,aAAc;IAACD,MAAM,EAAEA;EAAO,GACtEL,QACG,CAAC;AAEX,CAAC;AAED,eAAeD,QAAQ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/loader/index.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAA0C,UAAU,EAAC,MAAM,cAAc,CAAC;AAoCjF,oBAAY,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAKF,QAAA,MAAM,MAAM,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/loader/index.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAA0C,UAAU,EAAC,MAAM,cAAc,CAAC;AAoCjF,oBAAY,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAKF,QAAA,MAAM,MAAM,UAAW,KAAK,sBAyK3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -90,7 +90,11 @@ const Loader = props => {
|
|
|
90
90
|
useNativeDriver: false,
|
|
91
91
|
easing: Easing.inOut(Easing.sin)
|
|
92
92
|
})]))]);
|
|
93
|
-
|
|
93
|
+
|
|
94
|
+
// Start animation in next tick to avoid React 18 frozen object error
|
|
95
|
+
setTimeout(() => {
|
|
96
|
+
_animation.start();
|
|
97
|
+
}, 0);
|
|
94
98
|
return () => {
|
|
95
99
|
_animation.stop();
|
|
96
100
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["useAnimateProp","React","useEffect","useRef","useState","Animated","StyleSheet","Easing","useTemplateContext","createStyleSheet","theme","create","container","alignItems","justifyContent","dot","position","blue","backgroundColor","colors","cta","red","negative","green","positive","yellow","battle","CYCLE_DURATION","MIN_TIME","Loader","props","templateContext","styleSheet","setStylesheet","hidden","setHidden","minTimeIsSpent","setMinTimeSpent","rotation","Value","current","scale","hideAnimation","property","fromValue","toValue","onComplete","height","color","readyToHide","_stylesheet","start","setTimeout","_animation","parallel","loop","sequence","timing","duration","useNativeDriver","easing","inOut","sin","stop","interpolatedScale","interpolate","inputRange","outputRange","interpolatedRotation","dotWidth","dotTranslate","dotStyle","width","borderRadius","createElement","View","style","animatedStyle","transform","scaleX","scaleY","rotateZ","translateX"],"sources":["../../../src/atom/loader/index.native.tsx"],"sourcesContent":["import {useAnimateProp} from '@coorpacademy/react-native-animation';\nimport React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, Easing, ViewStyle, ColorValue} from 'react-native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\n\ntype StyleSheetType = {\n container: ViewStyle;\n dot: ViewStyle;\n blue: ViewStyle;\n red: ViewStyle;\n green: ViewStyle;\n yellow: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n alignItems: 'center',\n justifyContent: 'center'\n },\n dot: {\n position: 'absolute'\n },\n blue: {\n backgroundColor: theme.colors.cta\n },\n red: {\n backgroundColor: theme.colors.negative\n },\n green: {\n backgroundColor: theme.colors.positive\n },\n yellow: {\n backgroundColor: theme.colors.battle\n }\n });\n\nexport type Props = {\n color?: ColorValue;\n height?: number;\n readyToHide: boolean;\n};\n\nconst CYCLE_DURATION = 3000;\nconst MIN_TIME = 1000;\n\nconst Loader = (props: Props) => {\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [hidden, setHidden] = useState<boolean>(false);\n const [minTimeIsSpent, setMinTimeSpent] = useState<boolean>(false);\n\n const rotation = useRef<Animated.Value>(new Animated.Value(0)).current;\n const scale = useRef<Animated.Value>(new Animated.Value(0)).current;\n\n const hideAnimation = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n onComplete: () => {\n setHidden(true);\n }\n });\n\n const {height = 60, color, readyToHide} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n if (readyToHide && minTimeIsSpent && !hidden) {\n hideAnimation.start();\n }\n }, [hidden, hideAnimation, readyToHide, minTimeIsSpent]);\n\n useEffect(() => {\n setTimeout(() => {\n setMinTimeSpent(true);\n }, MIN_TIME);\n\n const _animation = Animated.parallel([\n Animated.loop(\n Animated.sequence([\n Animated.timing(scale, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(scale, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 2,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 3,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n ),\n Animated.loop(\n Animated.sequence([\n Animated.timing(rotation, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(rotation, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n )\n ]);\n\n _animation.start();\n\n return () => {\n _animation.stop();\n };\n // eslint bad warning --> effect only onmount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n if (hidden) {\n return null;\n }\n\n const interpolatedScale = scale.interpolate({\n inputRange: [0, 0.45, 1, 1.32, 1.5, 2, 2.3, 2.64, 3],\n outputRange: [0.5, 0.2, 0.5, 0.5, 0.8, 0.5, 0.5, 0.3, 0.5]\n });\n\n const interpolatedRotation = rotation.interpolate({\n inputRange: [0, 1],\n outputRange: ['0deg', '360deg']\n });\n const dotWidth = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [height / 2, height / 6, height / 2]\n });\n const dotTranslate = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [-25 * (height / 60), -35 * (height / 60), -25 * (height / 60)]\n });\n const dotStyle = {\n width: dotWidth,\n height: height / 6,\n borderRadius: height / 12\n };\n\n return (\n <Animated.View style={hideAnimation.animatedStyle}>\n <Animated.View\n style={[\n styleSheet.container,\n {\n height,\n width: height,\n transform: [\n {scaleX: interpolatedScale},\n {scaleY: interpolatedScale},\n {rotateZ: interpolatedRotation}\n ]\n }\n ]}\n >\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.red,\n dotStyle,\n {transform: [{rotateZ: '45deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.green,\n dotStyle,\n {transform: [{rotateZ: '135deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.yellow,\n dotStyle,\n {transform: [{rotateZ: '225deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.blue,\n dotStyle,\n {transform: [{rotateZ: '315deg'}, {translateX: dotTranslate}]}\n ]}\n />\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Loader;\n"],"mappings":"AAAA,SAAQA,cAAc,QAAO,sCAAsC;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EAAE;QAACC,UAAU,EAAEZ;MAAY,CAAC;IAAC,CAAC;EAC9D,CACH,CAAC,eACFrE,KAAA,CAAAyE,aAAA,CAACrE,QAAQ,CAACsE,IAAI;IACZC,KAAK,EAAE,CACL5C,UAAU,CAACjB,GAAG,EACdiC,KAAK,GAAG;MAAC9B,eAAe,EAAE8B;IAAK,CAAC,GAAGhB,UAAU,CAACf,IAAI,EAClDsD,QAAQ,EACR;MAACO,SAAS,EAAE,CAAC;QAACG,OAAO,EAAE;MAAQ,CAAC,EAAE;QAACC,UAAU,EAAEZ;MAAY,CAAC;IAAC,CAAC;EAC9D,CACH,CACY,CACF,CAAC;AAEpB,CAAC;AAED,eAAezC,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["useAnimateProp","React","useEffect","useRef","useState","Animated","StyleSheet","Easing","useTemplateContext","createStyleSheet","theme","create","container","alignItems","justifyContent","dot","position","blue","backgroundColor","colors","cta","red","negative","green","positive","yellow","battle","CYCLE_DURATION","MIN_TIME","Loader","props","templateContext","styleSheet","setStylesheet","hidden","setHidden","minTimeIsSpent","setMinTimeSpent","rotation","Value","current","scale","hideAnimation","property","fromValue","toValue","onComplete","height","color","readyToHide","_stylesheet","start","setTimeout","_animation","parallel","loop","sequence","timing","duration","useNativeDriver","easing","inOut","sin","stop","interpolatedScale","interpolate","inputRange","outputRange","interpolatedRotation","dotWidth","dotTranslate","dotStyle","width","borderRadius","createElement","View","style","animatedStyle","transform","scaleX","scaleY","rotateZ","translateX"],"sources":["../../../src/atom/loader/index.native.tsx"],"sourcesContent":["import {useAnimateProp} from '@coorpacademy/react-native-animation';\nimport React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, Easing, ViewStyle, ColorValue} from 'react-native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\n\ntype StyleSheetType = {\n container: ViewStyle;\n dot: ViewStyle;\n blue: ViewStyle;\n red: ViewStyle;\n green: ViewStyle;\n yellow: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n alignItems: 'center',\n justifyContent: 'center'\n },\n dot: {\n position: 'absolute'\n },\n blue: {\n backgroundColor: theme.colors.cta\n },\n red: {\n backgroundColor: theme.colors.negative\n },\n green: {\n backgroundColor: theme.colors.positive\n },\n yellow: {\n backgroundColor: theme.colors.battle\n }\n });\n\nexport type Props = {\n color?: ColorValue;\n height?: number;\n readyToHide: boolean;\n};\n\nconst CYCLE_DURATION = 3000;\nconst MIN_TIME = 1000;\n\nconst Loader = (props: Props) => {\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [hidden, setHidden] = useState<boolean>(false);\n const [minTimeIsSpent, setMinTimeSpent] = useState<boolean>(false);\n\n const rotation = useRef<Animated.Value>(new Animated.Value(0)).current;\n const scale = useRef<Animated.Value>(new Animated.Value(0)).current;\n\n const hideAnimation = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n onComplete: () => {\n setHidden(true);\n }\n });\n\n const {height = 60, color, readyToHide} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n if (readyToHide && minTimeIsSpent && !hidden) {\n hideAnimation.start();\n }\n }, [hidden, hideAnimation, readyToHide, minTimeIsSpent]);\n\n useEffect(() => {\n setTimeout(() => {\n setMinTimeSpent(true);\n }, MIN_TIME);\n\n const _animation = Animated.parallel([\n Animated.loop(\n Animated.sequence([\n Animated.timing(scale, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(scale, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 2,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 3,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n ),\n Animated.loop(\n Animated.sequence([\n Animated.timing(rotation, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(rotation, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n )\n ]);\n\n // Start animation in next tick to avoid React 18 frozen object error\n setTimeout(() => {\n _animation.start();\n }, 0);\n\n return () => {\n _animation.stop();\n };\n // eslint bad warning --> effect only onmount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n if (hidden) {\n return null;\n }\n\n const interpolatedScale = scale.interpolate({\n inputRange: [0, 0.45, 1, 1.32, 1.5, 2, 2.3, 2.64, 3],\n outputRange: [0.5, 0.2, 0.5, 0.5, 0.8, 0.5, 0.5, 0.3, 0.5]\n });\n\n const interpolatedRotation = rotation.interpolate({\n inputRange: [0, 1],\n outputRange: ['0deg', '360deg']\n });\n const dotWidth = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [height / 2, height / 6, height / 2]\n });\n const dotTranslate = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [-25 * (height / 60), -35 * (height / 60), -25 * (height / 60)]\n });\n const dotStyle = {\n width: dotWidth,\n height: height / 6,\n borderRadius: height / 12\n };\n\n return (\n <Animated.View style={hideAnimation.animatedStyle}>\n <Animated.View\n style={[\n styleSheet.container,\n {\n height,\n width: height,\n transform: [\n {scaleX: interpolatedScale},\n {scaleY: interpolatedScale},\n {rotateZ: interpolatedRotation}\n ]\n }\n ]}\n >\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.red,\n dotStyle,\n {transform: [{rotateZ: '45deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.green,\n dotStyle,\n {transform: [{rotateZ: '135deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.yellow,\n dotStyle,\n {transform: [{rotateZ: '225deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.blue,\n dotStyle,\n {transform: [{rotateZ: '315deg'}, {translateX: dotTranslate}]}\n ]}\n />\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Loader;\n"],"mappings":"AAAA,SAAQA,cAAc,QAAO,sCAAsC;AACnE,OAAOC,KAAK,IAAGC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAO,OAAO;AACxD,SAAQC,QAAQ,EAAEC,UAAU,EAAEC,MAAM,QAA8B,cAAc;AAChF,SAAQC,kBAAkB,QAAO,4CAA4C;AAY7E,MAAMC,gBAAgB,GAAIC,KAAY,IACpCJ,UAAU,CAACK,MAAM,CAAC;EAChBC,SAAS,EAAE;IACTC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDC,GAAG,EAAE;IACHC,QAAQ,EAAE;EACZ,CAAC;EACDC,IAAI,EAAE;IACJC,eAAe,EAAER,KAAK,CAACS,MAAM,CAACC;EAChC,CAAC;EACDC,GAAG,EAAE;IACHH,eAAe,EAAER,KAAK,CAACS,MAAM,CAACG;EAChC,CAAC;EACDC,KAAK,EAAE;IACLL,eAAe,EAAER,KAAK,CAACS,MAAM,CAACK;EAChC,CAAC;EACDC,MAAM,EAAE;IACNP,eAAe,EAAER,KAAK,CAACS,MAAM,CAACO;EAChC;AACF,CAAC,CAAC;AAQJ,MAAMC,cAAc,GAAG,IAAI;AAC3B,MAAMC,QAAQ,GAAG,IAAI;AAErB,MAAMC,MAAM,GAAIC,KAAY,IAAK;EAC/B,MAAMC,eAAe,GAAGvB,kBAAkB,CAAC,CAAC;EAC5C,MAAM;IAACE;EAAK,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Ae,EAAE8B;IAAK,CAAC,GAAGhB,UAAU,CAACT,KAAK,EACnDgD,QAAQ,EACR;MAACO,SAAS,EAAE,CAAC;QAACG,OAAO,EAAE;MAAQ,CAAC,EAAE;QAACC,UAAU,EAAEZ;MAAY,CAAC;IAAC,CAAC;EAC9D,CACH,CAAC,eACFrE,KAAA,CAAAyE,aAAA,CAACrE,QAAQ,CAACsE,IAAI;IACZC,KAAK,EAAE,CACL5C,UAAU,CAACjB,GAAG,EACdiC,KAAK,GAAG;MAAC9B,eAAe,EAAE8B;IAAK,CAAC,GAAGhB,UAAU,CAACP,MAAM,EACpD8C,QAAQ,EACR;MAACO,SAAS,EAAE,CAAC;QAACG,OAAO,EAAE;MAAQ,CAAC,EAAE;QAACC,UAAU,EAAEZ;MAAY,CAAC;IAAC,CAAC;EAC9D,CACH,CAAC,eACFrE,KAAA,CAAAyE,aAAA,CAACrE,QAAQ,CAACsE,IAAI;IACZC,KAAK,EAAE,CACL5C,UAAU,CAACjB,GAAG,EACdiC,KAAK,GAAG;MAAC9B,eAAe,EAAE8B;IAAK,CAAC,GAAGhB,UAAU,CAACf,IAAI,EAClDsD,QAAQ,EACR;MAACO,SAAS,EAAE,CAAC;QAACG,OAAO,EAAE;MAAQ,CAAC,EAAE;QAACC,UAAU,EAAEZ;MAAY,CAAC;IAAC,CAAC;EAC9D,CACH,CACY,CACF,CAAC;AAEpB,CAAC;AAED,eAAezC,MAAM","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/confirm-email-sent/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/confirm-email-sent/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AA0JjD,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,gBAAgB,UAAW,KAAK,sBA4FrC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { Animated, Dimensions, StyleSheet, View } from 'react-native';
|
|
3
|
-
import LinearGradient from 'react-native-linear-gradient';
|
|
2
|
+
import { Animated, Dimensions, StyleSheet, View, Platform } from 'react-native';
|
|
4
3
|
import { NovaSolidStatusClose as CloseIcon, NovaCompositionCoorpacademyCheck as CheckIcon, NovaCompositionCoorpacademyEmail as MailIcon } from '@coorpacademy/nova-icons';
|
|
5
4
|
import { useAnimateProp, useTranslateY } from '@coorpacademy/react-native-animation';
|
|
6
5
|
import Touchable from '../../../hoc/touchable/index.native';
|
|
@@ -167,14 +166,28 @@ const ConfirmEmailSent = props => {
|
|
|
167
166
|
style: styleSheet.wrapper
|
|
168
167
|
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
169
168
|
style: [styleSheet.gradients, translateGradients.animatedStyle]
|
|
170
|
-
}, /*#__PURE__*/React.createElement(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
169
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
170
|
+
style: [styleSheet.gradient, Platform.select({
|
|
171
|
+
default: {
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
experimental_backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'
|
|
174
|
+
},
|
|
175
|
+
web: {
|
|
176
|
+
// @ts-ignore
|
|
177
|
+
backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'
|
|
178
|
+
}
|
|
179
|
+
})]
|
|
180
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
181
|
+
style: [styleSheet.gradient2, Platform.select({
|
|
182
|
+
default: {
|
|
183
|
+
// @ts-ignore
|
|
184
|
+
experimental_backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'
|
|
185
|
+
},
|
|
186
|
+
web: {
|
|
187
|
+
// @ts-ignore
|
|
188
|
+
backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'
|
|
189
|
+
}
|
|
190
|
+
})]
|
|
178
191
|
})), /*#__PURE__*/React.createElement(Animated.View, {
|
|
179
192
|
style: [styleSheet.content, fadeInContent.animatedStyle]
|
|
180
193
|
}, /*#__PURE__*/React.createElement(View, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","Animated","Dimensions","StyleSheet","View","LinearGradient","NovaSolidStatusClose","CloseIcon","NovaCompositionCoorpacademyCheck","CheckIcon","NovaCompositionCoorpacademyEmail","MailIcon","useAnimateProp","useTranslateY","Touchable","useTemplateContext","Text","SCREEN","get","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","backButton","position","closeIcon","fill","width","height","gradients","gradient","opacity","transform","rotate","gradient2","content","checkIconWrapper","backgroundColor","marginVertical","borderRadius","checkIconInnerWrapper","padding","checkIcon","title","color","fontWeight","textAlign","fontSize","lineHeight","paddingVertical","description","ctaWrapper","ctaOpenInbox","flexDirection","overflow","colors","cta","ctaOpenInboxText","marginLeft","mailIcon","ConfirmEmailSent","props","locales","onClose","onOpenInbox","styleSheet","setStylesheet","translateGradients","fromValue","toValue","duration","delay","fadeInContent","property","_stylesheet","start","createElement","style","animatedStyle","locations","successTitle","successDescription","onPress","testID","successCta"],"sources":["../../../../src/template/mobile-login/confirm-email-sent/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Animated, Dimensions, StyleSheet, TextStyle, View, ViewStyle} from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport {\n NovaSolidStatusClose as CloseIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon,\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\nconst SCREEN = Dimensions.get('screen');\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n content: ViewStyle;\n backButton: ViewStyle;\n closeIcon: ViewStyle & {fill?: string};\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n ctaWrapper: ViewStyle;\n ctaOpenInbox: ViewStyle;\n ctaOpenInboxText: TextStyle;\n mailIcon: ViewStyle & {fill?: string};\n checkIconWrapper: ViewStyle;\n checkIconInnerWrapper: ViewStyle;\n checkIcon: ViewStyle & {fill?: string};\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create<StyleSheetType>({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n backButton: {\n position: 'absolute',\n top: 60,\n left: 30\n },\n closeIcon: {\n fill: '#515161',\n width: 20,\n height: 20\n } as ViewStyle & {fill?: string},\n gradients: {\n position: 'absolute',\n top: 0,\n height: SCREEN.height,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -80,\n bottom: 400,\n left: -180,\n right: -180,\n opacity: 1,\n transform: [{rotate: '15deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -30,\n bottom: 0,\n left: 0,\n right: 0,\n opacity: 0.6\n },\n content: {\n width: '100%',\n justifyContent: 'space-around',\n alignItems: 'center'\n },\n checkIconWrapper: {\n backgroundColor: '#E8FCF8',\n width: 64,\n height: 64,\n marginVertical: 12,\n borderRadius: 16,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIconInnerWrapper: {\n backgroundColor: '#18BB98',\n width: 24,\n height: 24,\n padding: 4,\n borderRadius: 50,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIcon: {\n fill: '#fff',\n width: 12,\n height: 12\n } as ViewStyle & {fill?: string},\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n textAlign: 'center',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n color: '#1D1D2B',\n fontWeight: '400',\n textAlign: 'center',\n fontSize: 17,\n lineHeight: 24,\n paddingVertical: 8\n },\n ctaWrapper: {\n position: 'absolute',\n width: '100%',\n bottom: 60\n },\n ctaOpenInbox: {\n paddingVertical: 12,\n marginVertical: 4,\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden',\n backgroundColor: theme.colors.cta\n },\n ctaOpenInboxText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n } as ViewStyle & {fill?: string}\n });\n\nexport type Props = {\n onClose: () => void;\n onOpenInbox: () => void;\n locales: {\n successTitle: string;\n successDescription: string;\n successCta: string;\n };\n};\n\nconst ConfirmEmailSent = (props: Props) => {\n const {locales, onClose, onOpenInbox} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 50,\n toValue: -SCREEN.height * 0.4,\n duration: 250,\n delay: 650\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n translateGradients.start();\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Animated.View style={styleSheet.wrapper}>\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <LinearGradient\n colors={['#179c57', '#fff0']}\n locations={[0, 0.5]}\n style={styleSheet.gradient}\n />\n <LinearGradient\n colors={['#18BB98', '#18BB9800']}\n locations={[0, 1]}\n style={styleSheet.gradient2}\n />\n </Animated.View>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <View style={styleSheet.checkIconWrapper}>\n <View style={styleSheet.checkIconInnerWrapper}>\n <CheckIcon style={styleSheet.checkIcon} />\n </View>\n </View>\n <Text style={styleSheet.title}>{locales.successTitle}</Text>\n <Text style={styleSheet.description}>{locales.successDescription}</Text>\n </Animated.View>\n\n <Touchable style={styleSheet.backButton} onPress={onClose} testID=\"close-button\">\n <CloseIcon style={styleSheet.closeIcon} />\n </Touchable>\n\n <Animated.View style={[styleSheet.ctaWrapper, fadeInContent.animatedStyle]}>\n <Touchable style={styleSheet.ctaOpenInbox} onPress={onOpenInbox} testID=\"open-inbox-button\">\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaOpenInboxText}>{locales.successCta}</Text>\n </Touchable>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default ConfirmEmailSent;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,SAAS,EAAEC,QAAQ,QAAO,OAAO;AAChD,SAAQC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAaC,IAAI,QAAkB,cAAc;AACzF,OAAOC,cAAc,MAAM,8BAA8B;AACzD,SACEC,oBAAoB,IAAIC,SAAS,EACjCC,gCAAgC,IAAIC,SAAS,EAC7CC,gCAAgC,IAAIC,QAAQ,QACvC,0BAA0B;AACjC,SAAQC,c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PpD,KAAA,CAAAsF,aAAA,CAACpE,IAAI;IAACqE,KAAK,EAAEZ,UAAU,CAACtB;EAAM,GAAEmB,OAAO,CAACkB,YAAmB,CAAC,eAC5D1F,KAAA,CAAAsF,aAAA,CAACpE,IAAI;IAACqE,KAAK,EAAEZ,UAAU,CAACf;EAAY,GAAEY,OAAO,CAACmB,kBAAyB,CAC1D,CAAC,eAEhB3F,KAAA,CAAAsF,aAAA,CAACtE,SAAS;IAACuE,KAAK,EAAEZ,UAAU,CAAC1C,UAAW;IAAC2D,OAAO,EAAEnB,OAAQ;IAACoB,MAAM,EAAC;EAAc,gBAC9E7F,KAAA,CAAAsF,aAAA,CAAC7E,SAAS;IAAC8E,KAAK,EAAEZ,UAAU,CAACxC;EAAU,CAAE,CAChC,CAAC,eAEZnC,KAAA,CAAAsF,aAAA,CAACnF,QAAQ,CAACG,IAAI;IAACiF,KAAK,EAAE,CAACZ,UAAU,CAACd,UAAU,EAAEqB,aAAa,CAACM,aAAa;EAAE,gBACzExF,KAAA,CAAAsF,aAAA,CAACtE,SAAS;IAACuE,KAAK,EAAEZ,UAAU,CAACb,YAAa;IAAC8B,OAAO,EAAElB,WAAY;IAACmB,MAAM,EAAC;EAAmB,gBACzF7F,KAAA,CAAAsF,aAAA,CAACzE,QAAQ;IAAC0E,KAAK,EAAEZ,UAAU,CAACN;EAAS,CAAE,CAAC,eACxCrE,KAAA,CAAAsF,aAAA,CAACpE,IAAI;IAACqE,KAAK,EAAEZ,UAAU,CAACR;EAAiB,GAAEK,OAAO,CAACsB,UAAiB,CAC3D,CACE,CACF,CAAC;AAEpB,CAAC;AAED,eAAexB,gBAAgB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","Animated","Dimensions","StyleSheet","View","Platform","NovaSolidStatusClose","CloseIcon","NovaCompositionCoorpacademyCheck","CheckIcon","NovaCompositionCoorpacademyEmail","MailIcon","useAnimateProp","useTranslateY","Touchable","useTemplateContext","Text","SCREEN","get","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","backButton","position","closeIcon","fill","width","height","gradients","gradient","opacity","transform","rotate","gradient2","content","checkIconWrapper","backgroundColor","marginVertical","borderRadius","checkIconInnerWrapper","padding","checkIcon","title","color","fontWeight","textAlign","fontSize","lineHeight","paddingVertical","description","ctaWrapper","ctaOpenInbox","flexDirection","overflow","colors","cta","ctaOpenInboxText","marginLeft","mailIcon","ConfirmEmailSent","props","locales","onClose","onOpenInbox","styleSheet","setStylesheet","translateGradients","fromValue","toValue","duration","delay","fadeInContent","property","_stylesheet","start","createElement","style","animatedStyle","select","default","experimental_backgroundImage","web","backgroundImage","successTitle","successDescription","onPress","testID","successCta"],"sources":["../../../../src/template/mobile-login/confirm-email-sent/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Animated, Dimensions, StyleSheet, TextStyle, View, ViewStyle, Platform} from 'react-native';\nimport {\n NovaSolidStatusClose as CloseIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon,\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\nconst SCREEN = Dimensions.get('screen');\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n content: ViewStyle;\n backButton: ViewStyle;\n closeIcon: ViewStyle & {fill?: string};\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n ctaWrapper: ViewStyle;\n ctaOpenInbox: ViewStyle;\n ctaOpenInboxText: TextStyle;\n mailIcon: ViewStyle & {fill?: string};\n checkIconWrapper: ViewStyle;\n checkIconInnerWrapper: ViewStyle;\n checkIcon: ViewStyle & {fill?: string};\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create<StyleSheetType>({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n backButton: {\n position: 'absolute',\n top: 60,\n left: 30\n },\n closeIcon: {\n fill: '#515161',\n width: 20,\n height: 20\n } as ViewStyle & {fill?: string},\n gradients: {\n position: 'absolute',\n top: 0,\n height: SCREEN.height,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -80,\n bottom: 400,\n left: -180,\n right: -180,\n opacity: 1,\n transform: [{rotate: '15deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -30,\n bottom: 0,\n left: 0,\n right: 0,\n opacity: 0.6\n },\n content: {\n width: '100%',\n justifyContent: 'space-around',\n alignItems: 'center'\n },\n checkIconWrapper: {\n backgroundColor: '#E8FCF8',\n width: 64,\n height: 64,\n marginVertical: 12,\n borderRadius: 16,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIconInnerWrapper: {\n backgroundColor: '#18BB98',\n width: 24,\n height: 24,\n padding: 4,\n borderRadius: 50,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIcon: {\n fill: '#fff',\n width: 12,\n height: 12\n } as ViewStyle & {fill?: string},\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n textAlign: 'center',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n color: '#1D1D2B',\n fontWeight: '400',\n textAlign: 'center',\n fontSize: 17,\n lineHeight: 24,\n paddingVertical: 8\n },\n ctaWrapper: {\n position: 'absolute',\n width: '100%',\n bottom: 60\n },\n ctaOpenInbox: {\n paddingVertical: 12,\n marginVertical: 4,\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden',\n backgroundColor: theme.colors.cta\n },\n ctaOpenInboxText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n } as ViewStyle & {fill?: string}\n });\n\nexport type Props = {\n onClose: () => void;\n onOpenInbox: () => void;\n locales: {\n successTitle: string;\n successDescription: string;\n successCta: string;\n };\n};\n\nconst ConfirmEmailSent = (props: Props) => {\n const {locales, onClose, onOpenInbox} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 50,\n toValue: -SCREEN.height * 0.4,\n duration: 250,\n delay: 650\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n translateGradients.start();\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Animated.View style={styleSheet.wrapper}>\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <View\n style={[\n styleSheet.gradient,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'\n }\n })\n ]}\n />\n <View\n style={[\n styleSheet.gradient2,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'\n }\n })\n ]}\n />\n </Animated.View>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <View style={styleSheet.checkIconWrapper}>\n <View style={styleSheet.checkIconInnerWrapper}>\n <CheckIcon style={styleSheet.checkIcon} />\n </View>\n </View>\n <Text style={styleSheet.title}>{locales.successTitle}</Text>\n <Text style={styleSheet.description}>{locales.successDescription}</Text>\n </Animated.View>\n\n <Touchable style={styleSheet.backButton} onPress={onClose} testID=\"close-button\">\n <CloseIcon style={styleSheet.closeIcon} />\n </Touchable>\n\n <Animated.View style={[styleSheet.ctaWrapper, fadeInContent.animatedStyle]}>\n <Touchable style={styleSheet.ctaOpenInbox} onPress={onOpenInbox} testID=\"open-inbox-button\">\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaOpenInboxText}>{locales.successCta}</Text>\n </Touchable>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default ConfirmEmailSent;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,SAAS,EAAEC,QAAQ,QAAO,OAAO;AAChD,SAAQC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAaC,IAAI,EAAaC,QAAQ,QAAO,cAAc;AACnG,SACEC,oBAAoB,IAAIC,SAAS,EACjCC,gCAAgC,IAAIC,SAAS,EAC7CC,gCAAgC,IAAIC,QAAQ,QACvC,0BAA0B;AACjC,SAAQC,cAAc,EAAEC,aAAa,QAAO,sCAAsC;AAClF,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,SAAQC,kBAAkB,QAAO,mCAAmC;AAEpE,OAAOC,IAAI,MAAM,iCAAiC;AAElD,MAAMC,MAAM,GAAGf,UAAU,CAACgB,GAAG,CAAC,QAAQ,CAAC;AAqBvC,MAAMC,gBAAgB,GAAIC,KAAY,IACpCjB,UAAU,CAACkB,MAAM,CAAiB;EAChCC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE;EACrB,CAAC;EACDC,UAA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,KAAA,CAAAsF,aAAA,CAAC7E,SAAS;IAAC8E,KAAK,EAAEZ,UAAU,CAACxC;EAAU,CAAE,CAChC,CAAC,eAEZnC,KAAA,CAAAsF,aAAA,CAACnF,QAAQ,CAACG,IAAI;IAACiF,KAAK,EAAE,CAACZ,UAAU,CAACd,UAAU,EAAEqB,aAAa,CAACM,aAAa;EAAE,gBACzExF,KAAA,CAAAsF,aAAA,CAACtE,SAAS;IAACuE,KAAK,EAAEZ,UAAU,CAACb,YAAa;IAACkC,OAAO,EAAEtB,WAAY;IAACuB,MAAM,EAAC;EAAmB,gBACzFjG,KAAA,CAAAsF,aAAA,CAACzE,QAAQ;IAAC0E,KAAK,EAAEZ,UAAU,CAACN;EAAS,CAAE,CAAC,eACxCrE,KAAA,CAAAsF,aAAA,CAACpE,IAAI;IAACqE,KAAK,EAAEZ,UAAU,CAACR;EAAiB,GAAEK,OAAO,CAAC0B,UAAiB,CAC3D,CACE,CACF,CAAC;AAEpB,CAAC;AAED,eAAe5B,gBAAgB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAgLlE,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,sBA2J5B,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { Animated, StyleSheet, View } from 'react-native';
|
|
3
|
-
import LinearGradient from 'react-native-linear-gradient';
|
|
2
|
+
import { Animated, StyleSheet, View, Platform } from 'react-native';
|
|
4
3
|
import { NovaCompositionCoorpacademyLogoCoorp as LogoCoorp, NovaCompositionCoorpacademyQrCode as QrCodeIcon, NovaCompositionCoorpacademyEmail as MailIcon } from '@coorpacademy/nova-icons';
|
|
5
4
|
import { useAnimateProp, useTranslateY } from '@coorpacademy/react-native-animation';
|
|
6
5
|
import Touchable from '../../../hoc/touchable/index.native';
|
|
@@ -224,14 +223,28 @@ const Welcome = props => {
|
|
|
224
223
|
testID: "welcome"
|
|
225
224
|
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
226
225
|
style: [styleSheet.gradients, translateGradients.animatedStyle]
|
|
227
|
-
}, /*#__PURE__*/React.createElement(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
226
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
227
|
+
style: [styleSheet.gradient, Platform.select({
|
|
228
|
+
default: {
|
|
229
|
+
// @ts-ignore
|
|
230
|
+
experimental_backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`
|
|
231
|
+
},
|
|
232
|
+
web: {
|
|
233
|
+
// @ts-ignore
|
|
234
|
+
backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`
|
|
235
|
+
}
|
|
236
|
+
})]
|
|
237
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
238
|
+
style: [styleSheet.gradient2, Platform.select({
|
|
239
|
+
default: {
|
|
240
|
+
// @ts-ignore
|
|
241
|
+
experimental_backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'
|
|
242
|
+
},
|
|
243
|
+
web: {
|
|
244
|
+
// @ts-ignore
|
|
245
|
+
backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'
|
|
246
|
+
}
|
|
247
|
+
})]
|
|
235
248
|
})), /*#__PURE__*/React.createElement(Touchable, {
|
|
236
249
|
onLongPress: onDemoPress,
|
|
237
250
|
style: styleSheet.logo
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useMemo","useState","Animated","StyleSheet","View","LinearGradient","NovaCompositionCoorpacademyLogoCoorp","LogoCoorp","NovaCompositionCoorpacademyQrCode","QrCodeIcon","NovaCompositionCoorpacademyEmail","MailIcon","useAnimateProp","useTranslateY","Touchable","useTemplateContext","Text","COLORS","cm_primary_blue","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradients","position","gradient","opacity","transform","rotate","gradient2","animatedLogoWrapper","animatedLogo","height","logo","padding","logoBG","backgroundColor","title","color","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQrCode","colors","cta","ctaQrCodeText","marginLeft","qrCodeIcon","fill","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onQRCodeButtonPress","onHelpPress","onReceiveEmailButtonPress","styleSheet","setStylesheet","translateGradients","fromValue","toValue","duration","delay","translateContent","fadeInContent","property","fadeOutStartLogo","fadeInFinalLogo","scaleAnim","Value","interpolateScale","interpolate","inputRange","outputRange","_stylesheet","start","animatedScale","timing","useNativeDriver","createElement","style","animatedStyle","testID","locations","onLongPress","scale","onPress"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useMemo, 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';\nimport {COLORS} from '../../../variables/colors';\n\nconst {cm_primary_blue} = COLORS;\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 & {fill?: string};\n mailIcon: ViewStyle & {fill?: string};\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<StyleSheetType>({\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 } as ViewStyle & {fill?: string},\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 } as ViewStyle & {fill?: string},\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 } as ViewStyle & {textDecorationLine: string}\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 = useMemo(() => new Animated.Value(0), []);\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={[cm_primary_blue, '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient}\n />\n <LinearGradient\n colors={['#2199AB', '#fff']}\n locations={[0, 0.95]}\n style={styleSheet.gradient2}\n />\n </Animated.View>\n\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <Animated.View\n style={[styleSheet.animatedLogoWrapper, {transform: [{scale: interpolateScale}]}]}\n >\n <Animated.View style={[styleSheet.logoBG, fadeInFinalLogo.animatedStyle]} />\n <Animated.View style={[styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]}>\n <LogoCoorp fill=\"#0061FF\" />\n </Animated.View>\n <Animated.View style={[styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]}>\n <LogoCoorp fill=\"#fff\" />\n </Animated.View>\n </Animated.View>\n </Touchable>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQrCode]}\n onPress={onQRCodeButtonPress}\n testID=\"qr-code-button\"\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQrCodeText}>{locales.ctaQrCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onReceiveEmailButtonPress}\n testID=\"receive-email-button\"\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Welcome;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,SAAS,EAAEC,OAAO,EAAUC,QAAQ,QAAO,OAAO;AACjE,SAAQ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AEK,OAAO,CAACL,SAAgB,CAAC,eAC7D1E,KAAA,CAAA2G,aAAA,CAACzF,IAAI;IAAC0F,KAAK,EAAExB,UAAU,CAACT;EAAQ,GAAEI,OAAO,CAACJ,OAAc,CAC/C,CACP,CACO,CACF,CAAC;AAEpB,CAAC;AAED,eAAeE,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useMemo","useState","Animated","StyleSheet","View","Platform","NovaCompositionCoorpacademyLogoCoorp","LogoCoorp","NovaCompositionCoorpacademyQrCode","QrCodeIcon","NovaCompositionCoorpacademyEmail","MailIcon","useAnimateProp","useTranslateY","Touchable","useTemplateContext","Text","COLORS","cm_primary_blue","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradients","position","gradient","opacity","transform","rotate","gradient2","animatedLogoWrapper","animatedLogo","height","logo","padding","logoBG","backgroundColor","title","color","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQrCode","colors","cta","ctaQrCodeText","marginLeft","qrCodeIcon","fill","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onQRCodeButtonPress","onHelpPress","onReceiveEmailButtonPress","styleSheet","setStylesheet","translateGradients","fromValue","toValue","duration","delay","translateContent","fadeInContent","property","fadeOutStartLogo","fadeInFinalLogo","scaleAnim","Value","interpolateScale","interpolate","inputRange","outputRange","_stylesheet","start","animatedScale","timing","useNativeDriver","createElement","style","animatedStyle","testID","select","default","experimental_backgroundImage","web","backgroundImage","onLongPress","scale","onPress"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useMemo, useRef, useState} from 'react';\nimport {Animated, StyleSheet, TextStyle, View, ViewStyle, Platform} from 'react-native';\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';\nimport {COLORS} from '../../../variables/colors';\n\nconst {cm_primary_blue} = COLORS;\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 & {fill?: string};\n mailIcon: ViewStyle & {fill?: string};\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<StyleSheetType>({\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 } as ViewStyle & {fill?: string},\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 } as ViewStyle & {fill?: string},\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 } as ViewStyle & {textDecorationLine: string}\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 = useMemo(() => new Animated.Value(0), []);\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 <View\n style={[\n styleSheet.gradient,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`\n },\n web: {\n // @ts-ignore\n backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`\n }\n })\n ]}\n />\n <View\n style={[\n styleSheet.gradient2,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'\n }\n })\n ]}\n />\n </Animated.View>\n\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <Animated.View\n style={[styleSheet.animatedLogoWrapper, {transform: [{scale: interpolateScale}]}]}\n >\n <Animated.View style={[styleSheet.logoBG, fadeInFinalLogo.animatedStyle]} />\n <Animated.View style={[styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]}>\n <LogoCoorp fill=\"#0061FF\" />\n </Animated.View>\n <Animated.View style={[styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]}>\n <LogoCoorp fill=\"#fff\" />\n </Animated.View>\n </Animated.View>\n </Touchable>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQrCode]}\n onPress={onQRCodeButtonPress}\n testID=\"qr-code-button\"\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQrCodeText}>{locales.ctaQrCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onReceiveEmailButtonPress}\n testID=\"receive-email-button\"\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Welcome;\n"],"mappings":"AAAA,OAAOA,KAAK,IA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AAC,eACPtE,KAAA,CAAA2G,aAAA,CAAC3F,SAAS;IAACsG,OAAO,EAAEpC,WAAY;IAAC0B,KAAK,EAAExB,UAAU,CAACX;EAAK,gBACtDzE,KAAA,CAAA2G,aAAA,CAACzF,IAAI;IAAC0F,KAAK,EAAExB,UAAU,CAACV;EAAU,GAAEK,OAAO,CAACL,SAAgB,CAAC,eAC7D1E,KAAA,CAAA2G,aAAA,CAACzF,IAAI;IAAC0F,KAAK,EAAExB,UAAU,CAACT;EAAQ,GAAEI,OAAO,CAACJ,OAAc,CAC/C,CACP,CACO,CACF,CAAC;AAEpB,CAAC;AAED,eAAeE,OAAO","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/gradient/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/gradient/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACvC,OAAO,EAAO,SAAS,EAAuB,MAAM,cAAc,CAAC;AAGnE,oBAAY,KAAK,GAAG;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,oBAAoB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;CACvE,CAAC;AAEF,QAAA,MAAM,QAAQ,qFAQX,KAAK,sBAoDP,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
var
|
|
6
|
+
var _reactNative = require("react-native");
|
|
7
7
|
var _colorjs = _interopRequireDefault(require("colorjs.io"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
const Gradient = ({
|
|
@@ -15,9 +15,17 @@ const Gradient = ({
|
|
|
15
15
|
testID,
|
|
16
16
|
pointerEvents
|
|
17
17
|
}) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
// Validate colors array - ensure all values are valid strings
|
|
19
|
+
const validColors = colors?.filter(c => c && typeof c === 'string') || [];
|
|
20
|
+
|
|
21
|
+
// Fallback if no valid colors provided
|
|
22
|
+
if (validColors.length === 0) {
|
|
23
|
+
console.warn('Gradient: No valid colors provided, using transparent fallback');
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
|
|
25
|
+
}
|
|
26
|
+
let calculatedColors = validColors;
|
|
27
|
+
if (validColors.length === 1) {
|
|
28
|
+
const [raw] = validColors;
|
|
21
29
|
const transparent = new _colorjs.default(raw).to('srgb');
|
|
22
30
|
transparent.alpha = 0;
|
|
23
31
|
calculatedColors = transparencyPosition === 'top' ? [transparent.toString(), raw, raw] : [raw, raw, transparent.toString()];
|
|
@@ -31,9 +39,22 @@ const Gradient = ({
|
|
|
31
39
|
height
|
|
32
40
|
});
|
|
33
41
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
|
|
43
|
+
// Build CSS gradient string (vertical by default)
|
|
44
|
+
const gradientString = `linear-gradient(180deg, ${calculatedColors.join(', ')})`;
|
|
45
|
+
const gradientStyle = _reactNative.Platform.select({
|
|
46
|
+
default: {
|
|
47
|
+
// @ts-ignore - experimental_backgroundImage is not yet in types
|
|
48
|
+
experimental_backgroundImage: gradientString
|
|
49
|
+
},
|
|
50
|
+
web: {
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
backgroundImage: gradientString
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const combinedStyle = _reactNative.StyleSheet.flatten([gradientStyle, ..._style]);
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
57
|
+
style: combinedStyle,
|
|
37
58
|
pointerEvents: pointerEvents,
|
|
38
59
|
testID: testID
|
|
39
60
|
}, children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["_react","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["_react","_interopRequireDefault","require","_reactNative","_colorjs","e","__esModule","default","Gradient","children","colors","transparencyPosition","height","style","testID","pointerEvents","validColors","filter","c","length","console","warn","createElement","Fragment","calculatedColors","raw","transparent","Color","to","alpha","toString","_style","push","gradientString","join","gradientStyle","Platform","select","experimental_backgroundImage","web","backgroundImage","combinedStyle","StyleSheet","flatten","View","_default","exports"],"sources":["../../../src/atom/gradient/index.native.tsx"],"sourcesContent":["import React, {ReactNode} from 'react';\nimport {View, ViewStyle, StyleSheet, Platform} from 'react-native';\nimport Color from 'colorjs.io';\n\nexport type Props = {\n children?: ReactNode;\n colors: Array<string>;\n transparencyPosition?: 'top' | 'bottom';\n height?: number;\n style?: ViewStyle | ViewStyle[];\n testID?: string;\n pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only' | undefined;\n};\n\nconst Gradient = ({\n children,\n colors,\n transparencyPosition = 'top',\n height,\n style,\n testID,\n pointerEvents\n}: Props) => {\n // Validate colors array - ensure all values are valid strings\n const validColors = colors?.filter(c => c && typeof c === 'string') || [];\n\n // Fallback if no valid colors provided\n if (validColors.length === 0) {\n console.warn('Gradient: No valid colors provided, using transparent fallback');\n return <>{children}</>;\n }\n\n let calculatedColors = validColors;\n if (validColors.length === 1) {\n const [raw] = validColors;\n const transparent = new Color(raw).to('srgb');\n transparent.alpha = 0;\n\n calculatedColors =\n transparencyPosition === 'top'\n ? [transparent.toString(), raw, raw]\n : [raw, raw, transparent.toString()];\n }\n\n const _style: ViewStyle[] = [];\n\n if (style) {\n _style.push(style as ViewStyle);\n }\n if (height) {\n _style.push({height});\n }\n\n // Build CSS gradient string (vertical by default)\n const gradientString = `linear-gradient(180deg, ${calculatedColors.join(', ')})`;\n\n const gradientStyle: ViewStyle = Platform.select({\n default: {\n // @ts-ignore - experimental_backgroundImage is not yet in types\n experimental_backgroundImage: gradientString\n },\n web: {\n // @ts-ignore\n backgroundImage: gradientString\n }\n });\n\n const combinedStyle = StyleSheet.flatten([gradientStyle, ..._style]);\n\n return (\n <View style={combinedStyle} pointerEvents={pointerEvents} testID={testID}>\n {children}\n </View>\n );\n};\n\nexport default Gradient;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA+B,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAY/B,MAAMG,QAAQ,GAAGA,CAAC;EAChBC,QAAQ;EACRC,MAAM;EACNC,oBAAoB,GAAG,KAAK;EAC5BC,MAAM;EACNC,KAAK;EACLC,MAAM;EACNC;AACK,CAAC,KAAK;EACX;EACA,MAAMC,WAAW,GAAGN,MAAM,EAAEO,MAAM,CAACC,CAAC,IAAIA,CAAC,IAAI,OAAOA,CAAC,KAAK,QAAQ,CAAC,IAAI,EAAE;;EAEzE;EACA,IAAIF,WAAW,CAACG,MAAM,KAAK,CAAC,EAAE;IAC5BC,OAAO,CAACC,IAAI,CAAC,gEAAgE,CAAC;IAC9E,oBAAOrB,MAAA,CAAAO,OAAA,CAAAe,aAAA,CAAAtB,MAAA,CAAAO,O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G,CAAC;AAEX,CAAC;AAAC,IAAAoC,QAAA,GAAAC,OAAA,CAAAvC,OAAA,GAEaC,QAAQ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/loader/index.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAA0C,UAAU,EAAC,MAAM,cAAc,CAAC;AAoCjF,oBAAY,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAKF,QAAA,MAAM,MAAM,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/loader/index.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAA0C,UAAU,EAAC,MAAM,cAAc,CAAC;AAoCjF,oBAAY,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAKF,QAAA,MAAM,MAAM,UAAW,KAAK,sBAyK3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -96,7 +96,11 @@ const Loader = props => {
|
|
|
96
96
|
useNativeDriver: false,
|
|
97
97
|
easing: _reactNative.Easing.inOut(_reactNative.Easing.sin)
|
|
98
98
|
})]))]);
|
|
99
|
-
|
|
99
|
+
|
|
100
|
+
// Start animation in next tick to avoid React 18 frozen object error
|
|
101
|
+
setTimeout(() => {
|
|
102
|
+
_animation.start();
|
|
103
|
+
}, 0);
|
|
100
104
|
return () => {
|
|
101
105
|
_animation.stop();
|
|
102
106
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["_reactNativeAnimation","require","_react","_interopRequireWildcard","_reactNative","_templateContext","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","createStyleSheet","theme","StyleSheet","create","container","alignItems","justifyContent","dot","position","blue","backgroundColor","colors","cta","red","negative","green","positive","yellow","battle","CYCLE_DURATION","MIN_TIME","Loader","props","templateContext","useTemplateContext","styleSheet","setStylesheet","useState","hidden","setHidden","minTimeIsSpent","setMinTimeSpent","rotation","useRef","Animated","Value","current","scale","hideAnimation","useAnimateProp","property","fromValue","toValue","onComplete","height","color","readyToHide","useEffect","_stylesheet","start","setTimeout","_animation","parallel","loop","sequence","timing","duration","useNativeDriver","easing","Easing","inOut","sin","stop","interpolatedScale","interpolate","inputRange","outputRange","interpolatedRotation","dotWidth","dotTranslate","dotStyle","width","borderRadius","createElement","View","style","animatedStyle","transform","scaleX","scaleY","rotateZ","translateX","_default","exports"],"sources":["../../../src/atom/loader/index.native.tsx"],"sourcesContent":["import {useAnimateProp} from '@coorpacademy/react-native-animation';\nimport React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, Easing, ViewStyle, ColorValue} from 'react-native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\n\ntype StyleSheetType = {\n container: ViewStyle;\n dot: ViewStyle;\n blue: ViewStyle;\n red: ViewStyle;\n green: ViewStyle;\n yellow: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n alignItems: 'center',\n justifyContent: 'center'\n },\n dot: {\n position: 'absolute'\n },\n blue: {\n backgroundColor: theme.colors.cta\n },\n red: {\n backgroundColor: theme.colors.negative\n },\n green: {\n backgroundColor: theme.colors.positive\n },\n yellow: {\n backgroundColor: theme.colors.battle\n }\n });\n\nexport type Props = {\n color?: ColorValue;\n height?: number;\n readyToHide: boolean;\n};\n\nconst CYCLE_DURATION = 3000;\nconst MIN_TIME = 1000;\n\nconst Loader = (props: Props) => {\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [hidden, setHidden] = useState<boolean>(false);\n const [minTimeIsSpent, setMinTimeSpent] = useState<boolean>(false);\n\n const rotation = useRef<Animated.Value>(new Animated.Value(0)).current;\n const scale = useRef<Animated.Value>(new Animated.Value(0)).current;\n\n const hideAnimation = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n onComplete: () => {\n setHidden(true);\n }\n });\n\n const {height = 60, color, readyToHide} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n if (readyToHide && minTimeIsSpent && !hidden) {\n hideAnimation.start();\n }\n }, [hidden, hideAnimation, readyToHide, minTimeIsSpent]);\n\n useEffect(() => {\n setTimeout(() => {\n setMinTimeSpent(true);\n }, MIN_TIME);\n\n const _animation = Animated.parallel([\n Animated.loop(\n Animated.sequence([\n Animated.timing(scale, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(scale, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 2,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 3,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n ),\n Animated.loop(\n Animated.sequence([\n Animated.timing(rotation, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(rotation, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n )\n ]);\n\n _animation.start();\n\n return () => {\n _animation.stop();\n };\n // eslint bad warning --> effect only onmount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n if (hidden) {\n return null;\n }\n\n const interpolatedScale = scale.interpolate({\n inputRange: [0, 0.45, 1, 1.32, 1.5, 2, 2.3, 2.64, 3],\n outputRange: [0.5, 0.2, 0.5, 0.5, 0.8, 0.5, 0.5, 0.3, 0.5]\n });\n\n const interpolatedRotation = rotation.interpolate({\n inputRange: [0, 1],\n outputRange: ['0deg', '360deg']\n });\n const dotWidth = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [height / 2, height / 6, height / 2]\n });\n const dotTranslate = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [-25 * (height / 60), -35 * (height / 60), -25 * (height / 60)]\n });\n const dotStyle = {\n width: dotWidth,\n height: height / 6,\n borderRadius: height / 12\n };\n\n return (\n <Animated.View style={hideAnimation.animatedStyle}>\n <Animated.View\n style={[\n styleSheet.container,\n {\n height,\n width: height,\n transform: [\n {scaleX: interpolatedScale},\n {scaleY: interpolatedScale},\n {rotateZ: interpolatedRotation}\n ]\n }\n ]}\n >\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.red,\n dotStyle,\n {transform: [{rotateZ: '45deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.green,\n dotStyle,\n {transform: [{rotateZ: '135deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.yellow,\n dotStyle,\n {transform: [{rotateZ: '225deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.blue,\n dotStyle,\n {transform: [{rotateZ: '315deg'}, {translateX: dotTranslate}]}\n ]}\n />\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Loader;\n"],"mappings":";;;;AAAA,IAAAA,qBAA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EAAE;QAACC,UAAU,EAAEZ;MAAY,CAAC;IAAC,CAAC;EAC9D,CACH,CAAC,eACF7F,MAAA,CAAAU,OAAA,CAAAuF,aAAA,CAAC/F,YAAA,CAAAwD,QAAQ,CAACwC,IAAI;IACZC,KAAK,EAAE,CACLlD,UAAU,CAAClB,GAAG,EACdsC,KAAK,GAAG;MAACnC,eAAe,EAAEmC;IAAK,CAAC,GAAGpB,UAAU,CAAChB,IAAI,EAClD6D,QAAQ,EACR;MAACO,SAAS,EAAE,CAAC;QAACG,OAAO,EAAE;MAAQ,CAAC,EAAE;QAACC,UAAU,EAAEZ;MAAY,CAAC;IAAC,CAAC;EAC9D,CACH,CACY,CACF,CAAC;AAEpB,CAAC;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAjG,OAAA,GAEamC,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["_reactNativeAnimation","require","_react","_interopRequireWildcard","_reactNative","_templateContext","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","createStyleSheet","theme","StyleSheet","create","container","alignItems","justifyContent","dot","position","blue","backgroundColor","colors","cta","red","negative","green","positive","yellow","battle","CYCLE_DURATION","MIN_TIME","Loader","props","templateContext","useTemplateContext","styleSheet","setStylesheet","useState","hidden","setHidden","minTimeIsSpent","setMinTimeSpent","rotation","useRef","Animated","Value","current","scale","hideAnimation","useAnimateProp","property","fromValue","toValue","onComplete","height","color","readyToHide","useEffect","_stylesheet","start","setTimeout","_animation","parallel","loop","sequence","timing","duration","useNativeDriver","easing","Easing","inOut","sin","stop","interpolatedScale","interpolate","inputRange","outputRange","interpolatedRotation","dotWidth","dotTranslate","dotStyle","width","borderRadius","createElement","View","style","animatedStyle","transform","scaleX","scaleY","rotateZ","translateX","_default","exports"],"sources":["../../../src/atom/loader/index.native.tsx"],"sourcesContent":["import {useAnimateProp} from '@coorpacademy/react-native-animation';\nimport React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, Easing, ViewStyle, ColorValue} from 'react-native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\n\ntype StyleSheetType = {\n container: ViewStyle;\n dot: ViewStyle;\n blue: ViewStyle;\n red: ViewStyle;\n green: ViewStyle;\n yellow: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n alignItems: 'center',\n justifyContent: 'center'\n },\n dot: {\n position: 'absolute'\n },\n blue: {\n backgroundColor: theme.colors.cta\n },\n red: {\n backgroundColor: theme.colors.negative\n },\n green: {\n backgroundColor: theme.colors.positive\n },\n yellow: {\n backgroundColor: theme.colors.battle\n }\n });\n\nexport type Props = {\n color?: ColorValue;\n height?: number;\n readyToHide: boolean;\n};\n\nconst CYCLE_DURATION = 3000;\nconst MIN_TIME = 1000;\n\nconst Loader = (props: Props) => {\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [hidden, setHidden] = useState<boolean>(false);\n const [minTimeIsSpent, setMinTimeSpent] = useState<boolean>(false);\n\n const rotation = useRef<Animated.Value>(new Animated.Value(0)).current;\n const scale = useRef<Animated.Value>(new Animated.Value(0)).current;\n\n const hideAnimation = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n onComplete: () => {\n setHidden(true);\n }\n });\n\n const {height = 60, color, readyToHide} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n if (readyToHide && minTimeIsSpent && !hidden) {\n hideAnimation.start();\n }\n }, [hidden, hideAnimation, readyToHide, minTimeIsSpent]);\n\n useEffect(() => {\n setTimeout(() => {\n setMinTimeSpent(true);\n }, MIN_TIME);\n\n const _animation = Animated.parallel([\n Animated.loop(\n Animated.sequence([\n Animated.timing(scale, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(scale, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 2,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 3,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n ),\n Animated.loop(\n Animated.sequence([\n Animated.timing(rotation, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(rotation, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n )\n ]);\n\n // Start animation in next tick to avoid React 18 frozen object error\n setTimeout(() => {\n _animation.start();\n }, 0);\n\n return () => {\n _animation.stop();\n };\n // eslint bad warning --> effect only onmount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n if (hidden) {\n return null;\n }\n\n const interpolatedScale = scale.interpolate({\n inputRange: [0, 0.45, 1, 1.32, 1.5, 2, 2.3, 2.64, 3],\n outputRange: [0.5, 0.2, 0.5, 0.5, 0.8, 0.5, 0.5, 0.3, 0.5]\n });\n\n const interpolatedRotation = rotation.interpolate({\n inputRange: [0, 1],\n outputRange: ['0deg', '360deg']\n });\n const dotWidth = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [height / 2, height / 6, height / 2]\n });\n const dotTranslate = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [-25 * (height / 60), -35 * (height / 60), -25 * (height / 60)]\n });\n const dotStyle = {\n width: dotWidth,\n height: height / 6,\n borderRadius: height / 12\n };\n\n return (\n <Animated.View style={hideAnimation.animatedStyle}>\n <Animated.View\n style={[\n styleSheet.container,\n {\n height,\n width: height,\n transform: [\n {scaleX: interpolatedScale},\n {scaleY: interpolatedScale},\n {rotateZ: interpolatedRotation}\n ]\n }\n ]}\n >\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.red,\n dotStyle,\n {transform: [{rotateZ: '45deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.green,\n dotStyle,\n {transform: [{rotateZ: '135deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.yellow,\n dotStyle,\n {transform: [{rotateZ: '225deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.blue,\n dotStyle,\n {transform: [{rotateZ: '315deg'}, {translateX: dotTranslate}]}\n ]}\n />\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Loader;\n"],"mappings":";;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AAA8E,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAA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.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/confirm-email-sent/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/confirm-email-sent/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AA0JjD,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,gBAAgB,UAAW,KAAK,sBA4FrC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -4,7 +4,6 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _reactNative = require("react-native");
|
|
7
|
-
var _reactNativeLinearGradient = _interopRequireDefault(require("react-native-linear-gradient"));
|
|
8
7
|
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
9
8
|
var _reactNativeAnimation = require("@coorpacademy/react-native-animation");
|
|
10
9
|
var _index = _interopRequireDefault(require("../../../hoc/touchable/index.native"));
|
|
@@ -174,14 +173,28 @@ const ConfirmEmailSent = props => {
|
|
|
174
173
|
style: styleSheet.wrapper
|
|
175
174
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
176
175
|
style: [styleSheet.gradients, translateGradients.animatedStyle]
|
|
177
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
176
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
177
|
+
style: [styleSheet.gradient, _reactNative.Platform.select({
|
|
178
|
+
default: {
|
|
179
|
+
// @ts-ignore
|
|
180
|
+
experimental_backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'
|
|
181
|
+
},
|
|
182
|
+
web: {
|
|
183
|
+
// @ts-ignore
|
|
184
|
+
backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'
|
|
185
|
+
}
|
|
186
|
+
})]
|
|
187
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
188
|
+
style: [styleSheet.gradient2, _reactNative.Platform.select({
|
|
189
|
+
default: {
|
|
190
|
+
// @ts-ignore
|
|
191
|
+
experimental_backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'
|
|
192
|
+
},
|
|
193
|
+
web: {
|
|
194
|
+
// @ts-ignore
|
|
195
|
+
backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'
|
|
196
|
+
}
|
|
197
|
+
})]
|
|
185
198
|
})), /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
186
199
|
style: [styleSheet.content, fadeInContent.animatedStyle]
|
|
187
200
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeLinearGradient","_interopRequireDefault","_novaIcons","_reactNativeAnimation","_index","_templateContext","_index2","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SCREEN","Dimensions","createStyleSheet","theme","StyleSheet","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","backButton","position","closeIcon","fill","width","height","gradients","gradient","opacity","transform","rotate","gradient2","content","checkIconWrapper","backgroundColor","marginVertical","borderRadius","checkIconInnerWrapper","padding","checkIcon","title","color","fontWeight","textAlign","fontSize","lineHeight","paddingVertical","description","ctaWrapper","ctaOpenInbox","flexDirection","overflow","colors","cta","ctaOpenInboxText","marginLeft","mailIcon","ConfirmEmailSent","props","locales","onClose","onOpenInbox","useTemplateContext","styleSheet","setStylesheet","useState","translateGradients","useTranslateY","fromValue","toValue","duration","delay","fadeInContent","useAnimateProp","property","useEffect","_stylesheet","start","createElement","Animated","View","style","animatedStyle","locations","NovaCompositionCoorpacademyCheck","successTitle","successDescription","onPress","testID","NovaSolidStatusClose","NovaCompositionCoorpacademyEmail","successCta","_default","exports"],"sources":["../../../../src/template/mobile-login/confirm-email-sent/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Animated, Dimensions, StyleSheet, TextStyle, View, ViewStyle} from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport {\n NovaSolidStatusClose as CloseIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon,\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\nconst SCREEN = Dimensions.get('screen');\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n content: ViewStyle;\n backButton: ViewStyle;\n closeIcon: ViewStyle & {fill?: string};\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n ctaWrapper: ViewStyle;\n ctaOpenInbox: ViewStyle;\n ctaOpenInboxText: TextStyle;\n mailIcon: ViewStyle & {fill?: string};\n checkIconWrapper: ViewStyle;\n checkIconInnerWrapper: ViewStyle;\n checkIcon: ViewStyle & {fill?: string};\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create<StyleSheetType>({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n backButton: {\n position: 'absolute',\n top: 60,\n left: 30\n },\n closeIcon: {\n fill: '#515161',\n width: 20,\n height: 20\n } as ViewStyle & {fill?: string},\n gradients: {\n position: 'absolute',\n top: 0,\n height: SCREEN.height,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -80,\n bottom: 400,\n left: -180,\n right: -180,\n opacity: 1,\n transform: [{rotate: '15deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -30,\n bottom: 0,\n left: 0,\n right: 0,\n opacity: 0.6\n },\n content: {\n width: '100%',\n justifyContent: 'space-around',\n alignItems: 'center'\n },\n checkIconWrapper: {\n backgroundColor: '#E8FCF8',\n width: 64,\n height: 64,\n marginVertical: 12,\n borderRadius: 16,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIconInnerWrapper: {\n backgroundColor: '#18BB98',\n width: 24,\n height: 24,\n padding: 4,\n borderRadius: 50,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIcon: {\n fill: '#fff',\n width: 12,\n height: 12\n } as ViewStyle & {fill?: string},\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n textAlign: 'center',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n color: '#1D1D2B',\n fontWeight: '400',\n textAlign: 'center',\n fontSize: 17,\n lineHeight: 24,\n paddingVertical: 8\n },\n ctaWrapper: {\n position: 'absolute',\n width: '100%',\n bottom: 60\n },\n ctaOpenInbox: {\n paddingVertical: 12,\n marginVertical: 4,\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden',\n backgroundColor: theme.colors.cta\n },\n ctaOpenInboxText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n } as ViewStyle & {fill?: string}\n });\n\nexport type Props = {\n onClose: () => void;\n onOpenInbox: () => void;\n locales: {\n successTitle: string;\n successDescription: string;\n successCta: string;\n };\n};\n\nconst ConfirmEmailSent = (props: Props) => {\n const {locales, onClose, onOpenInbox} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 50,\n toValue: -SCREEN.height * 0.4,\n duration: 250,\n delay: 650\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n translateGradients.start();\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Animated.View style={styleSheet.wrapper}>\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <LinearGradient\n colors={['#179c57', '#fff0']}\n locations={[0, 0.5]}\n style={styleSheet.gradient}\n />\n <LinearGradient\n colors={['#18BB98', '#18BB9800']}\n locations={[0, 1]}\n style={styleSheet.gradient2}\n />\n </Animated.View>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <View style={styleSheet.checkIconWrapper}>\n <View style={styleSheet.checkIconInnerWrapper}>\n <CheckIcon style={styleSheet.checkIcon} />\n </View>\n </View>\n <Text style={styleSheet.title}>{locales.successTitle}</Text>\n <Text style={styleSheet.description}>{locales.successDescription}</Text>\n </Animated.View>\n\n <Touchable style={styleSheet.backButton} onPress={onClose} testID=\"close-button\">\n <CloseIcon style={styleSheet.closeIcon} />\n </Touchable>\n\n <Animated.View style={[styleSheet.ctaWrapper, fadeInContent.animatedStyle]}>\n <Touchable style={styleSheet.ctaOpenInbox} onPress={onOpenInbox} testID=\"open-inbox-button\">\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaOpenInboxText}>{locales.successCta}</Text>\n </Touchable>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default ConfirmEmailSent;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAKA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AAEA,IAAAQ,OAAA,GAAAL,sBAAA,CAAAH,OAAA;AAAmD,SAAAG,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAj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AAa,CAACU,aAAa;EAAE,gBACzE5G,MAAA,CAAAa,OAAA,CAAA2F,aAAA,CAAChG,MAAA,CAAAK,OAAS;IAAC8F,KAAK,EAAElB,UAAU,CAACd,YAAa;IAACsC,OAAO,EAAE1B,WAAY;IAAC2B,MAAM,EAAC;EAAmB,gBACzFlH,MAAA,CAAAa,OAAA,CAAA2F,aAAA,CAAClG,UAAA,CAAA8G,gCAAQ;IAACT,KAAK,EAAElB,UAAU,CAACP;EAAS,CAAE,CAAC,eACxClF,MAAA,CAAAa,OAAA,CAAA2F,aAAA,CAAC9F,OAAA,CAAAG,OAAI;IAAC8F,KAAK,EAAElB,UAAU,CAACT;EAAiB,GAAEK,OAAO,CAACgC,UAAiB,CAC3D,CACE,CACF,CAAC;AAEpB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA1G,OAAA,GAEasE,gBAAgB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["_react","_interopRequireWildcard","require","_reactNative","_novaIcons","_reactNativeAnimation","_index","_interopRequireDefault","_templateContext","_index2","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SCREEN","Dimensions","createStyleSheet","theme","StyleSheet","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","backButton","position","closeIcon","fill","width","height","gradients","gradient","opacity","transform","rotate","gradient2","content","checkIconWrapper","backgroundColor","marginVertical","borderRadius","checkIconInnerWrapper","padding","checkIcon","title","color","fontWeight","textAlign","fontSize","lineHeight","paddingVertical","description","ctaWrapper","ctaOpenInbox","flexDirection","overflow","colors","cta","ctaOpenInboxText","marginLeft","mailIcon","ConfirmEmailSent","props","locales","onClose","onOpenInbox","useTemplateContext","styleSheet","setStylesheet","useState","translateGradients","useTranslateY","fromValue","toValue","duration","delay","fadeInContent","useAnimateProp","property","useEffect","_stylesheet","start","createElement","Animated","View","style","animatedStyle","Platform","select","experimental_backgroundImage","web","backgroundImage","NovaCompositionCoorpacademyCheck","successTitle","successDescription","onPress","testID","NovaSolidStatusClose","NovaCompositionCoorpacademyEmail","successCta","_default","exports"],"sources":["../../../../src/template/mobile-login/confirm-email-sent/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Animated, Dimensions, StyleSheet, TextStyle, View, ViewStyle, Platform} from 'react-native';\nimport {\n NovaSolidStatusClose as CloseIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon,\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\nconst SCREEN = Dimensions.get('screen');\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n content: ViewStyle;\n backButton: ViewStyle;\n closeIcon: ViewStyle & {fill?: string};\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n ctaWrapper: ViewStyle;\n ctaOpenInbox: ViewStyle;\n ctaOpenInboxText: TextStyle;\n mailIcon: ViewStyle & {fill?: string};\n checkIconWrapper: ViewStyle;\n checkIconInnerWrapper: ViewStyle;\n checkIcon: ViewStyle & {fill?: string};\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create<StyleSheetType>({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n backButton: {\n position: 'absolute',\n top: 60,\n left: 30\n },\n closeIcon: {\n fill: '#515161',\n width: 20,\n height: 20\n } as ViewStyle & {fill?: string},\n gradients: {\n position: 'absolute',\n top: 0,\n height: SCREEN.height,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -80,\n bottom: 400,\n left: -180,\n right: -180,\n opacity: 1,\n transform: [{rotate: '15deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -30,\n bottom: 0,\n left: 0,\n right: 0,\n opacity: 0.6\n },\n content: {\n width: '100%',\n justifyContent: 'space-around',\n alignItems: 'center'\n },\n checkIconWrapper: {\n backgroundColor: '#E8FCF8',\n width: 64,\n height: 64,\n marginVertical: 12,\n borderRadius: 16,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIconInnerWrapper: {\n backgroundColor: '#18BB98',\n width: 24,\n height: 24,\n padding: 4,\n borderRadius: 50,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIcon: {\n fill: '#fff',\n width: 12,\n height: 12\n } as ViewStyle & {fill?: string},\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n textAlign: 'center',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n color: '#1D1D2B',\n fontWeight: '400',\n textAlign: 'center',\n fontSize: 17,\n lineHeight: 24,\n paddingVertical: 8\n },\n ctaWrapper: {\n position: 'absolute',\n width: '100%',\n bottom: 60\n },\n ctaOpenInbox: {\n paddingVertical: 12,\n marginVertical: 4,\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden',\n backgroundColor: theme.colors.cta\n },\n ctaOpenInboxText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n } as ViewStyle & {fill?: string}\n });\n\nexport type Props = {\n onClose: () => void;\n onOpenInbox: () => void;\n locales: {\n successTitle: string;\n successDescription: string;\n successCta: string;\n };\n};\n\nconst ConfirmEmailSent = (props: Props) => {\n const {locales, onClose, onOpenInbox} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 50,\n toValue: -SCREEN.height * 0.4,\n duration: 250,\n delay: 650\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n translateGradients.start();\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Animated.View style={styleSheet.wrapper}>\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <View\n style={[\n styleSheet.gradient,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'\n }\n })\n ]}\n />\n <View\n style={[\n styleSheet.gradient2,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'\n }\n })\n ]}\n />\n </Animated.View>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <View style={styleSheet.checkIconWrapper}>\n <View style={styleSheet.checkIconInnerWrapper}>\n <CheckIcon style={styleSheet.checkIcon} />\n </View>\n </View>\n <Text style={styleSheet.title}>{locales.successTitle}</Text>\n <Text style={styleSheet.description}>{locales.successDescription}</Text>\n </Animated.View>\n\n <Touchable style={styleSheet.backButton} onPress={onClose} testID=\"close-button\">\n <CloseIcon style={styleSheet.closeIcon} />\n </Touchable>\n\n <Animated.View style={[styleSheet.ctaWrapper, fadeInContent.animatedStyle]}>\n <Touchable style={styleSheet.ctaOpenInbox} onPress={onOpenInbox} testID=\"open-inbox-button\">\n <MailIcon style={styleSheet.m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,IAAI;IAACC,KAAK,EAAE,CAAClB,UAAU,CAACf,UAAU,EAAEwB,aAAa,CAACU,aAAa;EAAE,gBACzE3G,MAAA,CAAAY,OAAA,CAAA2F,aAAA,CAACjG,MAAA,CAAAM,OAAS;IAAC8F,KAAK,EAAElB,UAAU,CAACd,YAAa;IAAC0C,OAAO,EAAE9B,WAAY;IAAC+B,MAAM,EAAC;EAAmB,gBACzFrH,MAAA,CAAAY,OAAA,CAAA2F,aAAA,CAACnG,UAAA,CAAAmH,gCAAQ;IAACb,KAAK,EAAElB,UAAU,CAACP;EAAS,CAAE,CAAC,eACxCjF,MAAA,CAAAY,OAAA,CAAA2F,aAAA,CAAC9F,OAAA,CAAAG,OAAI;IAAC8F,KAAK,EAAElB,UAAU,CAACT;EAAiB,GAAEK,OAAO,CAACoC,UAAiB,CAC3D,CACE,CACF,CAAC;AAEpB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA9G,OAAA,GAEasE,gBAAgB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAgLlE,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,sBA2J5B,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -4,7 +4,6 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _reactNative = require("react-native");
|
|
7
|
-
var _reactNativeLinearGradient = _interopRequireDefault(require("react-native-linear-gradient"));
|
|
8
7
|
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
9
8
|
var _reactNativeAnimation = require("@coorpacademy/react-native-animation");
|
|
10
9
|
var _index = _interopRequireDefault(require("../../../hoc/touchable/index.native"));
|
|
@@ -231,14 +230,28 @@ const Welcome = props => {
|
|
|
231
230
|
testID: "welcome"
|
|
232
231
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
233
232
|
style: [styleSheet.gradients, translateGradients.animatedStyle]
|
|
234
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
233
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
234
|
+
style: [styleSheet.gradient, _reactNative.Platform.select({
|
|
235
|
+
default: {
|
|
236
|
+
// @ts-ignore
|
|
237
|
+
experimental_backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`
|
|
238
|
+
},
|
|
239
|
+
web: {
|
|
240
|
+
// @ts-ignore
|
|
241
|
+
backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`
|
|
242
|
+
}
|
|
243
|
+
})]
|
|
244
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
245
|
+
style: [styleSheet.gradient2, _reactNative.Platform.select({
|
|
246
|
+
default: {
|
|
247
|
+
// @ts-ignore
|
|
248
|
+
experimental_backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'
|
|
249
|
+
},
|
|
250
|
+
web: {
|
|
251
|
+
// @ts-ignore
|
|
252
|
+
backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'
|
|
253
|
+
}
|
|
254
|
+
})]
|
|
242
255
|
})), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
243
256
|
onLongPress: onDemoPress,
|
|
244
257
|
style: styleSheet.logo
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeLinearGradient","_interopRequireDefault","_novaIcons","_reactNativeAnimation","_index","_templateContext","_index2","_colors","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","cm_primary_blue","COLORS","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","useMemo","Animated","Value","interpolateScale","interpolate","inputRange","outputRange","useEffect","_stylesheet","start","animatedScale","timing","useNativeDriver","createElement","View","style","animatedStyle","testID","locations","onLongPress","scale","NovaCompositionCoorpacademyLogoCoorp","onPress","NovaCompositionCoorpacademyQrCode","NovaCompositionCoorpacademyEmail","_default","exports"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useMemo, 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';\nimport {COLORS} from '../../../variables/colors';\n\nconst {cm_primary_blue} = COLORS;\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 & {fill?: string};\n mailIcon: ViewStyle & {fill?: string};\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<StyleSheetType>({\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 } as ViewStyle & {fill?: string},\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 } as ViewStyle & {fill?: string},\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 } as ViewStyle & {textDecorationLine: string}\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 = useMemo(() => new Animated.Value(0), []);\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={[cm_primary_blue, '#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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oH,KAAK,EAAE,CAAC/B,UAAU,CAAC3B,MAAM,EAAE2B,UAAU,CAACf,cAAc,CAAE;IACtDqD,OAAO,EAAExC,yBAA0B;IACnCmC,MAAM,EAAC;EAAsB,gBAE7BpI,MAAA,CAAAc,OAAA,CAAAkH,aAAA,CAAC1H,UAAA,CAAAqI,gCAAQ;IAACT,KAAK,EAAE/B,UAAU,CAACb;EAAS,CAAE,CAAC,eACxCtF,MAAA,CAAAc,OAAA,CAAAkH,aAAA,CAACtH,OAAA,CAAAI,OAAI;IAACoH,KAAK,EAAE/B,UAAU,CAACd;EAAmB,GAAEQ,OAAO,CAACT,cAAqB,CACjE,CACP,CAAC,eACPpF,MAAA,CAAAc,OAAA,CAAAkH,aAAA,CAACxH,MAAA,CAAAM,OAAS;IAAC2H,OAAO,EAAEzC,WAAY;IAACkC,KAAK,EAAE/B,UAAU,CAACZ;EAAK,gBACtDvF,MAAA,CAAAc,OAAA,CAAAkH,aAAA,CAACtH,OAAA,CAAAI,OAAI;IAACoH,KAAK,EAAE/B,UAAU,CAACX;EAAU,GAAEK,OAAO,CAACL,SAAgB,CAAC,eAC7DxF,MAAA,CAAAc,OAAA,CAAAkH,aAAA,CAACtH,OAAA,CAAAI,OAAI;IAACoH,KAAK,EAAE/B,UAAU,CAACV;EAAQ,GAAEI,OAAO,CAACJ,OAAc,CAC/C,CACP,CACO,CACF,CAAC;AAEpB,CAAC;AAAC,IAAAmD,QAAA,GAAAC,OAAA,CAAA/H,OAAA,GAEa6E,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["_react","_interopRequireWildcard","require","_reactNative","_novaIcons","_reactNativeAnimation","_index","_interopRequireDefault","_templateContext","_index2","_colors","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","cm_primary_blue","COLORS","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","useMemo","Animated","Value","interpolateScale","interpolate","inputRange","outputRange","useEffect","_stylesheet","start","animatedScale","timing","useNativeDriver","createElement","View","style","animatedStyle","testID","Platform","select","experimental_backgroundImage","web","backgroundImage","onLongPress","scale","NovaCompositionCoorpacademyLogoCoorp","onPress","NovaCompositionCoorpacademyQrCode","NovaCompositionCoorpacademyEmail","_default","exports"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useMemo, useRef, useState} from 'react';\nimport {Animated, StyleSheet, TextStyle, View, ViewStyle, Platform} from 'react-native';\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';\nimport {COLORS} from '../../../variables/colors';\n\nconst {cm_primary_blue} = COLORS;\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 & {fill?: string};\n mailIcon: ViewStyle & {fill?: string};\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<StyleSheetType>({\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 } as ViewStyle & {fill?: string},\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 } as ViewStyle & {fill?: string},\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 } as ViewStyle & {textDecorationLine: string}\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 = useMemo(() => new Animated.Value(0), []);\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 <View\n style={[\n styleSheet.gradient,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`\n },\n web: {\n // @ts-ignore\n backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`\n }\n })\n ]}\n />\n <View\n style={[\n styleSheet.gradient2,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'\n }\n })\n ]}\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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAiD,SAAAK,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA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AAAa,OAAA,CAAAkH,aAAA,CAACtH,OAAA,CAAAI,OAAI;IAACoH,KAAK,EAAE/B,UAAU,CAACd;EAAmB,GAAEQ,OAAO,CAACT,cAAqB,CACjE,CACP,CAAC,eACPnF,MAAA,CAAAa,OAAA,CAAAkH,aAAA,CAACzH,MAAA,CAAAO,OAAS;IAAC+H,OAAO,EAAE7C,WAAY;IAACkC,KAAK,EAAE/B,UAAU,CAACZ;EAAK,gBACtDtF,MAAA,CAAAa,OAAA,CAAAkH,aAAA,CAACtH,OAAA,CAAAI,OAAI;IAACoH,KAAK,EAAE/B,UAAU,CAACX;EAAU,GAAEK,OAAO,CAACL,SAAgB,CAAC,eAC7DvF,MAAA,CAAAa,OAAA,CAAAkH,aAAA,CAACtH,OAAA,CAAAI,OAAI;IAACoH,KAAK,EAAE/B,UAAU,CAACV;EAAQ,GAAEI,OAAO,CAACJ,OAAc,CAC/C,CACP,CACO,CACF,CAAC;AAEpB,CAAC;AAAC,IAAAuD,QAAA,GAAAC,OAAA,CAAAnI,OAAA,GAEa6E,OAAO","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.40.14-react18.
|
|
3
|
+
"version": "11.40.14-react18.84+29f13812e",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"Soualmi Djamel <djamel.soualmi@coorpacademy.com>"
|
|
60
60
|
],
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@coorpacademy/nova-icons": "4.5.2-react18.
|
|
63
|
-
"@coorpacademy/react-native-animation": "1.1.1-react18.
|
|
62
|
+
"@coorpacademy/nova-icons": "4.5.2-react18.695+c1684bf25",
|
|
63
|
+
"@coorpacademy/react-native-animation": "1.1.1-react18.1297+c1684bf25",
|
|
64
64
|
"@fortawesome/fontawesome-svg-core": "^6.5.1",
|
|
65
65
|
"@fortawesome/free-solid-svg-icons": "^6.5.1",
|
|
66
66
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"@coorpacademy/eslint-plugin-coorpacademy": "^10.0.0",
|
|
110
110
|
"@coorpacademy/react-native-mock-render": "^0.2.9",
|
|
111
111
|
"@coorpacademy/translate": "6.3.0",
|
|
112
|
-
"@coorpacademy/webpack-config": "13.1.4-react18.
|
|
112
|
+
"@coorpacademy/webpack-config": "13.1.4-react18.1107+c1684bf25",
|
|
113
113
|
"@react-native-community/blur": "^4.2.0",
|
|
114
114
|
"@storybook/addon-actions": "^6.5.12",
|
|
115
115
|
"@storybook/addon-controls": "^6.5.12",
|
|
@@ -149,7 +149,6 @@
|
|
|
149
149
|
"react-dom": "18.3.1",
|
|
150
150
|
"react-native": "0.76.5",
|
|
151
151
|
"react-native-camera": "https://github.com/CoorpAcademy/react-native-camera#master",
|
|
152
|
-
"react-native-linear-gradient": "^2.6.2",
|
|
153
152
|
"react-native-modal": "11.5.6",
|
|
154
153
|
"react-native-qrcode-scanner": "^1.5.3",
|
|
155
154
|
"react-native-render-html": "^6.3.4",
|
|
@@ -169,5 +168,5 @@
|
|
|
169
168
|
"last 2 versions",
|
|
170
169
|
"IE 11"
|
|
171
170
|
],
|
|
172
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "29f13812e3372805621babab2977b2d9036580eb"
|
|
173
172
|
}
|