@coorpacademy/components 10.30.10-alpha.7 → 10.30.11-alpha.1
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/picture/index.d.ts +1 -0
- package/es/atom/picture/index.js +5 -4
- package/es/atom/picture/index.js.map +1 -1
- package/es/behaviours/use-translate-vertically.native.d.ts +16 -0
- package/es/behaviours/use-translate-vertically.native.d.ts.map +1 -0
- package/es/behaviours/use-translate-vertically.native.js +44 -0
- package/es/behaviours/use-translate-vertically.native.js.map +1 -0
- package/es/behaviours/use-update-opacity.native.d.ts +14 -0
- package/es/behaviours/use-update-opacity.native.d.ts.map +1 -0
- package/es/behaviours/use-update-opacity.native.js +55 -0
- package/es/behaviours/use-update-opacity.native.js.map +1 -0
- package/es/molecule/card-congrats/index.native.js +2 -2
- package/es/molecule/card-congrats/index.native.js.map +1 -1
- package/es/molecule/card-congrats/types.d.ts +1 -1
- package/es/molecule/card-congrats/types.d.ts.map +1 -1
- package/es/molecule/card-congrats/types.js.map +1 -1
- package/es/molecule/review-correction-popin/index.native.d.ts.map +1 -1
- package/es/molecule/review-correction-popin/index.native.js +12 -25
- package/es/molecule/review-correction-popin/index.native.js.map +1 -1
- package/es/organism/get-the-app/index.d.ts.map +1 -1
- package/es/organism/get-the-app/index.js +15 -2
- package/es/organism/get-the-app/index.js.map +1 -1
- package/es/organism/mooc-footer/index.d.ts.map +1 -1
- package/es/organism/mooc-footer/index.js +3 -2
- package/es/organism/mooc-footer/index.js.map +1 -1
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +0 -2
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/review-congrats/index.native.d.ts.map +1 -1
- package/es/organism/review-congrats/index.native.js +91 -15
- package/es/organism/review-congrats/index.native.js.map +1 -1
- package/es/organism/review-slide/index.native.d.ts.map +1 -1
- package/es/organism/review-slide/index.native.js +10 -22
- package/es/organism/review-slide/index.native.js.map +1 -1
- package/es/organism/review-stacked-slides/index.native.d.ts.map +1 -1
- package/es/organism/review-stacked-slides/index.native.js +17 -4
- package/es/organism/review-stacked-slides/index.native.js.map +1 -1
- package/lib/atom/picture/index.d.ts +1 -0
- package/lib/atom/picture/index.js +5 -4
- package/lib/atom/picture/index.js.map +1 -1
- package/lib/behaviours/use-translate-vertically.native.d.ts +16 -0
- package/lib/behaviours/use-translate-vertically.native.d.ts.map +1 -0
- package/lib/behaviours/use-translate-vertically.native.js +51 -0
- package/lib/behaviours/use-translate-vertically.native.js.map +1 -0
- package/lib/behaviours/use-update-opacity.native.d.ts +14 -0
- package/lib/behaviours/use-update-opacity.native.d.ts.map +1 -0
- package/lib/behaviours/use-update-opacity.native.js +62 -0
- package/lib/behaviours/use-update-opacity.native.js.map +1 -0
- package/lib/molecule/card-congrats/index.native.js +2 -2
- package/lib/molecule/card-congrats/index.native.js.map +1 -1
- package/lib/molecule/card-congrats/types.d.ts +1 -1
- package/lib/molecule/card-congrats/types.d.ts.map +1 -1
- package/lib/molecule/card-congrats/types.js.map +1 -1
- package/lib/molecule/review-correction-popin/index.native.d.ts.map +1 -1
- package/lib/molecule/review-correction-popin/index.native.js +12 -24
- package/lib/molecule/review-correction-popin/index.native.js.map +1 -1
- package/lib/organism/get-the-app/index.d.ts.map +1 -1
- package/lib/organism/get-the-app/index.js +16 -2
- package/lib/organism/get-the-app/index.js.map +1 -1
- package/lib/organism/mooc-footer/index.d.ts.map +1 -1
- package/lib/organism/mooc-footer/index.js +4 -2
- package/lib/organism/mooc-footer/index.js.map +1 -1
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +0 -2
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/review-congrats/index.native.d.ts.map +1 -1
- package/lib/organism/review-congrats/index.native.js +91 -13
- package/lib/organism/review-congrats/index.native.js.map +1 -1
- package/lib/organism/review-slide/index.native.d.ts.map +1 -1
- package/lib/organism/review-slide/index.native.js +10 -21
- package/lib/organism/review-slide/index.native.js.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.d.ts.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.js +21 -3
- package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
- package/package.json +2 -2
package/es/atom/picture/index.js
CHANGED
|
@@ -25,11 +25,11 @@ const toSrcSet = ({
|
|
|
25
25
|
const toSetAlt = ({
|
|
26
26
|
alt
|
|
27
27
|
}) => {
|
|
28
|
-
return
|
|
28
|
+
return alt ? {
|
|
29
|
+
alt
|
|
30
|
+
} : {
|
|
29
31
|
alt: '',
|
|
30
32
|
'aria-hidden': true
|
|
31
|
-
} : {
|
|
32
|
-
alt
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -48,7 +48,8 @@ const Picture = props => {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
Picture.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
51
|
-
src: PropTypes.oneOfType([SrcPropType, PropTypes.objectOf(SrcPropType)])
|
|
51
|
+
src: PropTypes.oneOfType([SrcPropType, PropTypes.objectOf(SrcPropType)]),
|
|
52
|
+
alt: PropTypes.string
|
|
52
53
|
} : {};
|
|
53
54
|
export default Picture;
|
|
54
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","SrcPropType","style","toSrcSet","src","key","url","toSetAlt","alt","Picture","props","empty","propTypes","oneOfType","objectOf"],"sources":["../../../src/atom/picture/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {filter, get, isNil, isObject, join, map, pipe, set, toPairs} from 'lodash/fp';\nimport {SrcPropType} from '../../util/proptypes';\nimport style from './style.css';\n\nconst toSrcSet = ({src}) => {\n if (!isObject(src)) return {};\n return pipe(\n set(\n 'srcSet',\n pipe(\n toPairs,\n filter(([key, url]) => url),\n map(([key, url]) => `${url} ${key}`),\n join(',')\n )(src)\n ),\n set('src', get('1x', src))\n )({});\n};\n\nconst toSetAlt = ({alt}) => {\n return
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","SrcPropType","style","toSrcSet","src","key","url","toSetAlt","alt","Picture","props","empty","propTypes","oneOfType","objectOf","string"],"sources":["../../../src/atom/picture/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {filter, get, isNil, isObject, join, map, pipe, set, toPairs} from 'lodash/fp';\nimport {SrcPropType} from '../../util/proptypes';\nimport style from './style.css';\n\nconst toSrcSet = ({src}) => {\n if (!isObject(src)) return {};\n return pipe(\n set(\n 'srcSet',\n pipe(\n toPairs,\n filter(([key, url]) => url),\n map(([key, url]) => `${url} ${key}`),\n join(',')\n )(src)\n ),\n set('src', get('1x', src))\n )({});\n};\n\nconst toSetAlt = ({alt}) => {\n return alt ? {alt} : {alt: '', 'aria-hidden': true};\n};\n\nconst Picture = props => {\n const {src} = props;\n if (isNil(src)) {\n return <div className={style.empty} />;\n }\n return <img {...props} {...toSrcSet(props)} {...toSetAlt(props)} />;\n};\n\nPicture.propTypes = {\n src: PropTypes.oneOfType([SrcPropType, PropTypes.objectOf(SrcPropType)]),\n alt: PropTypes.string\n};\n\nexport default Picture;\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,WAAR,QAA0B,sBAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAAC;EAACC;AAAD,CAAD,KAAW;EAC1B,IAAI,CAAC,UAASA,GAAT,CAAL,EAAoB,OAAO,EAAP;EACpB,OAAO,MACL,KACE,QADF,EAEE,gBAEE,QAAO,CAAC,CAACC,GAAD,EAAMC,GAAN,CAAD,KAAgBA,GAAvB,CAFF,EAGE,KAAI,CAAC,CAACD,GAAD,EAAMC,GAAN,CAAD,KAAiB,GAAEA,GAAI,IAAGD,GAAI,EAAlC,CAHF,EAIE,MAAK,GAAL,CAJF,EAKED,GALF,CAFF,CADK,EAUL,KAAI,KAAJ,EAAW,KAAI,IAAJ,EAAUA,GAAV,CAAX,CAVK,EAWL,EAXK,CAAP;AAYD,CAdD;;AAgBA,MAAMG,QAAQ,GAAG,CAAC;EAACC;AAAD,CAAD,KAAW;EAC1B,OAAOA,GAAG,GAAG;IAACA;EAAD,CAAH,GAAW;IAACA,GAAG,EAAE,EAAN;IAAU,eAAe;EAAzB,CAArB;AACD,CAFD;;AAIA,MAAMC,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IAACN;EAAD,IAAQM,KAAd;;EACA,IAAI,OAAMN,GAAN,CAAJ,EAAgB;IACd,oBAAO;MAAK,SAAS,EAAEF,KAAK,CAACS;IAAtB,EAAP;EACD;;EACD,oBAAO,wCAASD,KAAT,EAAoBP,QAAQ,CAACO,KAAD,CAA5B,EAAyCH,QAAQ,CAACG,KAAD,CAAjD,EAAP;AACD,CAND;;AAQAD,OAAO,CAACG,SAAR,2CAAoB;EAClBR,GAAG,EAAEJ,SAAS,CAACa,SAAV,CAAoB,CAACZ,WAAD,EAAcD,SAAS,CAACc,QAAV,CAAmBb,WAAnB,CAAd,CAApB,CADa;EAElBO,GAAG,EAAER,SAAS,CAACe;AAFG,CAApB;AAKA,eAAeN,OAAf"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Animated } from 'react-native';
|
|
2
|
+
declare type Params = Omit<Animated.TimingAnimationConfig, 'useNativeDriver' | 'toValue'> & {
|
|
3
|
+
onFinished?: () => void;
|
|
4
|
+
fromValue?: number;
|
|
5
|
+
toValue?: Animated.TimingAnimationConfig['toValue'];
|
|
6
|
+
};
|
|
7
|
+
declare const useTranslateVertically: (params?: Params) => {
|
|
8
|
+
translate: () => void;
|
|
9
|
+
animatedY: {
|
|
10
|
+
transform: {
|
|
11
|
+
translateY: Animated.Value;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default useTranslateVertically;
|
|
16
|
+
//# sourceMappingURL=use-translate-vertically.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-translate-vertically.native.d.ts","sourceRoot":"","sources":["../../src/behaviours/use-translate-vertically.native.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEtC,aAAK,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,iBAAiB,GAAG,SAAS,CAAC,GAAG;IAClF,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,QAAQ,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;CACrD,CAAC;AAEF,QAAA,MAAM,sBAAsB,YAAY,MAAM;;;;;;;CAkB7C,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const _excluded = ["fromValue", "toValue", "duration", "onFinished"];
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
|
|
7
|
+
import { useCallback, useRef } from 'react';
|
|
8
|
+
import { Animated } from 'react-native';
|
|
9
|
+
|
|
10
|
+
const useTranslateVertically = (params = {}) => {
|
|
11
|
+
const {
|
|
12
|
+
fromValue = 0,
|
|
13
|
+
toValue = 100,
|
|
14
|
+
duration = 550,
|
|
15
|
+
onFinished
|
|
16
|
+
} = params,
|
|
17
|
+
othersParams = _objectWithoutPropertiesLoose(params, _excluded);
|
|
18
|
+
|
|
19
|
+
const translateY = useRef(new Animated.Value(fromValue)).current;
|
|
20
|
+
const translate = useCallback(() => {
|
|
21
|
+
Animated.timing(translateY, _extends({}, othersParams, {
|
|
22
|
+
toValue,
|
|
23
|
+
duration,
|
|
24
|
+
useNativeDriver: true
|
|
25
|
+
})).start(({
|
|
26
|
+
finished
|
|
27
|
+
}) => {
|
|
28
|
+
if (finished) {
|
|
29
|
+
onFinished?.();
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}, [onFinished, duration, othersParams, toValue, translateY]);
|
|
33
|
+
return {
|
|
34
|
+
translate,
|
|
35
|
+
animatedY: {
|
|
36
|
+
transform: [{
|
|
37
|
+
translateY
|
|
38
|
+
}]
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default useTranslateVertically;
|
|
44
|
+
//# sourceMappingURL=use-translate-vertically.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-translate-vertically.native.js","names":["useCallback","useRef","Animated","useTranslateVertically","params","fromValue","toValue","duration","onFinished","othersParams","translateY","Value","current","translate","timing","useNativeDriver","start","finished","animatedY","transform"],"sources":["../../src/behaviours/use-translate-vertically.native.tsx"],"sourcesContent":["import {useCallback, useRef} from 'react';\nimport {Animated} from 'react-native';\n\ntype Params = Omit<Animated.TimingAnimationConfig, 'useNativeDriver' | 'toValue'> & {\n onFinished?: () => void;\n fromValue?: number;\n toValue?: Animated.TimingAnimationConfig['toValue'];\n};\n\nconst useTranslateVertically = (params: Params = {}) => {\n const {fromValue = 0, toValue = 100, duration = 550, onFinished, ...othersParams} = params;\n const translateY = useRef(new Animated.Value(fromValue)).current;\n\n const translate = useCallback(() => {\n Animated.timing(translateY, {\n ...othersParams,\n toValue,\n duration,\n useNativeDriver: true\n }).start(({finished}) => {\n if (finished) {\n onFinished?.();\n }\n });\n }, [onFinished, duration, othersParams, toValue, translateY]);\n\n return {translate, animatedY: {transform: [{translateY}]}};\n};\n\nexport default useTranslateVertically;\n"],"mappings":";;;;;;AAAA,SAAQA,WAAR,EAAqBC,MAArB,QAAkC,OAAlC;AACA,SAAQC,QAAR,QAAuB,cAAvB;;AAQA,MAAMC,sBAAsB,GAAG,CAACC,MAAc,GAAG,EAAlB,KAAyB;EACtD,MAAM;IAACC,SAAS,GAAG,CAAb;IAAgBC,OAAO,GAAG,GAA1B;IAA+BC,QAAQ,GAAG,GAA1C;IAA+CC;EAA/C,IAA8EJ,MAApF;EAAA,MAAoEK,YAApE,iCAAoFL,MAApF;;EACA,MAAMM,UAAU,GAAGT,MAAM,CAAC,IAAIC,QAAQ,CAACS,KAAb,CAAmBN,SAAnB,CAAD,CAAN,CAAsCO,OAAzD;EAEA,MAAMC,SAAS,GAAGb,WAAW,CAAC,MAAM;IAClCE,QAAQ,CAACY,MAAT,CAAgBJ,UAAhB,eACKD,YADL;MAEEH,OAFF;MAGEC,QAHF;MAIEQ,eAAe,EAAE;IAJnB,IAKGC,KALH,CAKS,CAAC;MAACC;IAAD,CAAD,KAAgB;MACvB,IAAIA,QAAJ,EAAc;QACZT,UAAU;MACX;IACF,CATD;EAUD,CAX4B,EAW1B,CAACA,UAAD,EAAaD,QAAb,EAAuBE,YAAvB,EAAqCH,OAArC,EAA8CI,UAA9C,CAX0B,CAA7B;EAaA,OAAO;IAACG,SAAD;IAAYK,SAAS,EAAE;MAACC,SAAS,EAAE,CAAC;QAACT;MAAD,CAAD;IAAZ;EAAvB,CAAP;AACD,CAlBD;;AAoBA,eAAeP,sBAAf"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Animated } from 'react-native';
|
|
2
|
+
declare type Params = Omit<Animated.TimingAnimationConfig, 'useNativeDriver' | 'toValue'> & {
|
|
3
|
+
onFadeInFinished?: () => void;
|
|
4
|
+
onFadeOutFinished?: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare const useUpdateOpacity: (params?: Params) => {
|
|
7
|
+
fadeIn: () => void;
|
|
8
|
+
fadeOut: () => void;
|
|
9
|
+
animatedOpacity: {
|
|
10
|
+
opacity: Animated.Value;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default useUpdateOpacity;
|
|
14
|
+
//# sourceMappingURL=use-update-opacity.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-update-opacity.native.d.ts","sourceRoot":"","sources":["../../src/behaviours/use-update-opacity.native.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEtC,aAAK,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,iBAAiB,GAAG,SAAS,CAAC,GAAG;IAClF,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC;AAEF,QAAA,MAAM,gBAAgB,YAAY,MAAM;;;;;;CAgCvC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const _excluded = ["duration", "onFadeInFinished", "onFadeOutFinished"];
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
|
|
7
|
+
import { useCallback, useRef } from 'react';
|
|
8
|
+
import { Animated } from 'react-native';
|
|
9
|
+
|
|
10
|
+
const useUpdateOpacity = (params = {}) => {
|
|
11
|
+
const {
|
|
12
|
+
duration = 750,
|
|
13
|
+
onFadeInFinished,
|
|
14
|
+
onFadeOutFinished
|
|
15
|
+
} = params,
|
|
16
|
+
othersParams = _objectWithoutPropertiesLoose(params, _excluded);
|
|
17
|
+
|
|
18
|
+
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
19
|
+
const fadeIn = useCallback(() => {
|
|
20
|
+
Animated.timing(fadeAnim, _extends({}, othersParams, {
|
|
21
|
+
toValue: 1,
|
|
22
|
+
duration,
|
|
23
|
+
useNativeDriver: true
|
|
24
|
+
})).start(({
|
|
25
|
+
finished
|
|
26
|
+
}) => {
|
|
27
|
+
if (finished) {
|
|
28
|
+
onFadeInFinished?.();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}, [duration, fadeAnim, onFadeInFinished, othersParams]);
|
|
32
|
+
const fadeOut = useCallback(() => {
|
|
33
|
+
Animated.timing(fadeAnim, _extends({}, othersParams, {
|
|
34
|
+
toValue: 0,
|
|
35
|
+
duration,
|
|
36
|
+
useNativeDriver: true
|
|
37
|
+
})).start(({
|
|
38
|
+
finished
|
|
39
|
+
}) => {
|
|
40
|
+
if (finished) {
|
|
41
|
+
onFadeOutFinished?.();
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}, [duration, fadeAnim, onFadeOutFinished, othersParams]);
|
|
45
|
+
return {
|
|
46
|
+
fadeIn,
|
|
47
|
+
fadeOut,
|
|
48
|
+
animatedOpacity: {
|
|
49
|
+
opacity: fadeAnim
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default useUpdateOpacity;
|
|
55
|
+
//# sourceMappingURL=use-update-opacity.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-update-opacity.native.js","names":["useCallback","useRef","Animated","useUpdateOpacity","params","duration","onFadeInFinished","onFadeOutFinished","othersParams","fadeAnim","Value","current","fadeIn","timing","toValue","useNativeDriver","start","finished","fadeOut","animatedOpacity","opacity"],"sources":["../../src/behaviours/use-update-opacity.native.tsx"],"sourcesContent":["import {useCallback, useRef} from 'react';\nimport {Animated} from 'react-native';\n\ntype Params = Omit<Animated.TimingAnimationConfig, 'useNativeDriver' | 'toValue'> & {\n onFadeInFinished?: () => void;\n onFadeOutFinished?: () => void;\n};\n\nconst useUpdateOpacity = (params: Params = {}) => {\n const {duration = 750, onFadeInFinished, onFadeOutFinished, ...othersParams} = params;\n\n const fadeAnim = useRef(new Animated.Value(0)).current;\n\n const fadeIn = useCallback(() => {\n Animated.timing(fadeAnim, {\n ...othersParams,\n toValue: 1,\n duration,\n useNativeDriver: true\n }).start(({finished}) => {\n if (finished) {\n onFadeInFinished?.();\n }\n });\n }, [duration, fadeAnim, onFadeInFinished, othersParams]);\n\n const fadeOut = useCallback(() => {\n Animated.timing(fadeAnim, {\n ...othersParams,\n toValue: 0,\n duration,\n useNativeDriver: true\n }).start(({finished}) => {\n if (finished) {\n onFadeOutFinished?.();\n }\n });\n }, [duration, fadeAnim, onFadeOutFinished, othersParams]);\n\n return {fadeIn, fadeOut, animatedOpacity: {opacity: fadeAnim}};\n};\n\nexport default useUpdateOpacity;\n"],"mappings":";;;;;;AAAA,SAAQA,WAAR,EAAqBC,MAArB,QAAkC,OAAlC;AACA,SAAQC,QAAR,QAAuB,cAAvB;;AAOA,MAAMC,gBAAgB,GAAG,CAACC,MAAc,GAAG,EAAlB,KAAyB;EAChD,MAAM;IAACC,QAAQ,GAAG,GAAZ;IAAiBC,gBAAjB;IAAmCC;EAAnC,IAAyEH,MAA/E;EAAA,MAA+DI,YAA/D,iCAA+EJ,MAA/E;;EAEA,MAAMK,QAAQ,GAAGR,MAAM,CAAC,IAAIC,QAAQ,CAACQ,KAAb,CAAmB,CAAnB,CAAD,CAAN,CAA8BC,OAA/C;EAEA,MAAMC,MAAM,GAAGZ,WAAW,CAAC,MAAM;IAC/BE,QAAQ,CAACW,MAAT,CAAgBJ,QAAhB,eACKD,YADL;MAEEM,OAAO,EAAE,CAFX;MAGET,QAHF;MAIEU,eAAe,EAAE;IAJnB,IAKGC,KALH,CAKS,CAAC;MAACC;IAAD,CAAD,KAAgB;MACvB,IAAIA,QAAJ,EAAc;QACZX,gBAAgB;MACjB;IACF,CATD;EAUD,CAXyB,EAWvB,CAACD,QAAD,EAAWI,QAAX,EAAqBH,gBAArB,EAAuCE,YAAvC,CAXuB,CAA1B;EAaA,MAAMU,OAAO,GAAGlB,WAAW,CAAC,MAAM;IAChCE,QAAQ,CAACW,MAAT,CAAgBJ,QAAhB,eACKD,YADL;MAEEM,OAAO,EAAE,CAFX;MAGET,QAHF;MAIEU,eAAe,EAAE;IAJnB,IAKGC,KALH,CAKS,CAAC;MAACC;IAAD,CAAD,KAAgB;MACvB,IAAIA,QAAJ,EAAc;QACZV,iBAAiB;MAClB;IACF,CATD;EAUD,CAX0B,EAWxB,CAACF,QAAD,EAAWI,QAAX,EAAqBF,iBAArB,EAAwCC,YAAxC,CAXwB,CAA3B;EAaA,OAAO;IAACI,MAAD;IAASM,OAAT;IAAkBC,eAAe,EAAE;MAACC,OAAO,EAAEX;IAAV;EAAnC,CAAP;AACD,CAhCD;;AAkCA,eAAeN,gBAAf"}
|
|
@@ -76,13 +76,13 @@ const CardCongrats = ({
|
|
|
76
76
|
style: styleSheet.card
|
|
77
77
|
}, /*#__PURE__*/React.createElement(View, {
|
|
78
78
|
style: styleSheet.animation
|
|
79
|
-
}, /*#__PURE__*/React.createElement(LottieView, {
|
|
79
|
+
}, animationUri ? /*#__PURE__*/React.createElement(LottieView, {
|
|
80
80
|
source: {
|
|
81
81
|
uri: animationUri
|
|
82
82
|
},
|
|
83
83
|
autoPlay: true,
|
|
84
84
|
loop: false
|
|
85
|
-
})), /*#__PURE__*/React.createElement(Text, {
|
|
85
|
+
}) : null), /*#__PURE__*/React.createElement(Text, {
|
|
86
86
|
style: styleSheet.cardTitle
|
|
87
87
|
}, text), /*#__PURE__*/React.createElement(View, {
|
|
88
88
|
style: [styleSheet.reward, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","StyleSheet","Text","View","LottieView","useTemplateContext","BOX_STYLE","createStyleSheet","theme","create","animation","marginBottom","width","height","card","alignItems","paddingTop","paddingBottom","borderRadius","margin","backgroundColor","colors","white","cardTitle","fontWeight","fontSize","lineHeight","color","text","primary","reward","rewardText","marginHorizontal","iconBig","iconSmall","CardCongrats","animationUri","Icon","value","iconColor","textColor","direction","styleSheet","setStylesheet","_stylesheet","uri","flexDirection"],"sources":["../../../src/molecule/card-congrats/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native';\nimport LottieView from 'lottie-react-native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport {BOX_STYLE} from '../../variables/shadow';\nimport {CardCongratsProps} from './types';\n\ntype StyleSheetType = {\n animation: ViewStyle;\n card: ViewStyle;\n cardTitle: TextStyle;\n iconBig: ViewStyle;\n iconSmall: ViewStyle;\n reward: ViewStyle;\n rewardText: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n animation: {\n marginBottom: 12,\n width: 132,\n height: 132\n },\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n card: {\n alignItems: 'center',\n paddingTop: 32,\n paddingBottom: 24,\n borderRadius: 24,\n margin: 10,\n width: 280,\n height: 317,\n ...BOX_STYLE,\n backgroundColor: theme.colors.white\n },\n cardTitle: {\n fontWeight: '400',\n fontSize: 32,\n lineHeight: 40,\n color: theme.colors.text.primary\n },\n reward: {\n alignItems: 'center'\n },\n rewardText: {\n fontWeight: '700',\n fontSize: 64,\n lineHeight: 77,\n marginHorizontal: 10\n },\n iconBig: {\n width: 70,\n height: 70\n },\n iconSmall: {\n width: 53,\n height: 53\n }\n });\n\nconst CardCongrats = ({\n animationUri,\n Icon,\n value,\n text,\n iconColor,\n textColor,\n direction\n}: CardCongratsProps) => {\n const {theme} = useTemplateContext();\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.card}>\n <View style={styleSheet.animation}>\n <LottieView source={{uri: animationUri}} autoPlay loop={false}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","StyleSheet","Text","View","LottieView","useTemplateContext","BOX_STYLE","createStyleSheet","theme","create","animation","marginBottom","width","height","card","alignItems","paddingTop","paddingBottom","borderRadius","margin","backgroundColor","colors","white","cardTitle","fontWeight","fontSize","lineHeight","color","text","primary","reward","rewardText","marginHorizontal","iconBig","iconSmall","CardCongrats","animationUri","Icon","value","iconColor","textColor","direction","styleSheet","setStylesheet","_stylesheet","uri","flexDirection"],"sources":["../../../src/molecule/card-congrats/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native';\nimport LottieView from 'lottie-react-native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport {BOX_STYLE} from '../../variables/shadow';\nimport {CardCongratsProps} from './types';\n\ntype StyleSheetType = {\n animation: ViewStyle;\n card: ViewStyle;\n cardTitle: TextStyle;\n iconBig: ViewStyle;\n iconSmall: ViewStyle;\n reward: ViewStyle;\n rewardText: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n animation: {\n marginBottom: 12,\n width: 132,\n height: 132\n },\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n card: {\n alignItems: 'center',\n paddingTop: 32,\n paddingBottom: 24,\n borderRadius: 24,\n margin: 10,\n width: 280,\n height: 317,\n ...BOX_STYLE,\n backgroundColor: theme.colors.white\n },\n cardTitle: {\n fontWeight: '400',\n fontSize: 32,\n lineHeight: 40,\n color: theme.colors.text.primary\n },\n reward: {\n alignItems: 'center'\n },\n rewardText: {\n fontWeight: '700',\n fontSize: 64,\n lineHeight: 77,\n marginHorizontal: 10\n },\n iconBig: {\n width: 70,\n height: 70\n },\n iconSmall: {\n width: 53,\n height: 53\n }\n });\n\nconst CardCongrats = ({\n animationUri,\n Icon,\n value,\n text,\n iconColor,\n textColor,\n direction\n}: CardCongratsProps) => {\n const {theme} = useTemplateContext();\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.card}>\n <View style={styleSheet.animation}>\n {animationUri ? <LottieView source={{uri: animationUri}} autoPlay loop={false} /> : null}\n </View>\n <Text style={styleSheet.cardTitle}>{text}</Text>\n <View style={[styleSheet.reward, {flexDirection: direction}]}>\n <Text style={[styleSheet.rewardText, {color: textColor}]}>{value}</Text>\n <Icon style={styleSheet.iconSmall} color={iconColor} />\n </View>\n </View>\n );\n};\n\nexport default CardCongrats;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,UAAR,EAAoBC,IAApB,EAAqCC,IAArC,QAA2D,cAA3D;AACA,OAAOC,UAAP,MAAuB,qBAAvB;AACA,SAAQC,kBAAR,QAAiC,4CAAjC;AAEA,SAAQC,SAAR,QAAwB,wBAAxB;;AAaA,MAAMC,gBAAgB,GAAIC,KAAD,IACvBP,UAAU,CAACQ,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,YAAY,EAAE,EADL;IAETC,KAAK,EAAE,GAFE;IAGTC,MAAM,EAAE;EAHC,CADK;EAMhB;EACAC,IAAI;I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,OAAO,IAAP;EACD;;EAED,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAEA,UAAU,CAAC5B;EAAxB,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAE4B,UAAU,CAAChC;EAAxB,GACG0B,YAAY,gBAAG,oBAAC,UAAD;IAAY,MAAM,EAAE;MAACS,GAAG,EAAET;IAAN,CAApB;IAAyC,QAAQ,MAAjD;IAAkD,IAAI,EAAE;EAAxD,EAAH,GAAuE,IADtF,CADF,eAIE,oBAAC,IAAD;IAAM,KAAK,EAAEM,UAAU,CAACnB;EAAxB,GAAoCK,IAApC,CAJF,eAKE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACc,UAAU,CAACZ,MAAZ,EAAoB;MAACgB,aAAa,EAAEL;IAAhB,CAApB;EAAb,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACC,UAAU,CAACX,UAAZ,EAAwB;MAACJ,KAAK,EAAEa;IAAR,CAAxB;EAAb,GAA2DF,KAA3D,CADF,eAEE,oBAAC,IAAD;IAAM,KAAK,EAAEI,UAAU,CAACR,SAAxB;IAAmC,KAAK,EAAEK;EAA1C,EAFF,CALF,CADF;AAYD,CAlCD;;AAoCA,eAAeJ,YAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/card-congrats/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAEnD,oBAAY,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/card-congrats/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAEnD,oBAAY,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;QAAC,KAAK,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAC,CAAC,CAAC;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;CACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/molecule/card-congrats/types.ts"],"sourcesContent":["import {ColorValue, ViewStyle} from 'react-native';\n\nexport type CardCongratsProps = {\n animationUri: string;\n Icon: React.FC<{style: ViewStyle; color: ColorValue}>;\n value: string;\n text: string;\n iconColor: ColorValue;\n textColor: ColorValue;\n direction: ViewStyle['flexDirection'];\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/molecule/card-congrats/types.ts"],"sourcesContent":["import {ColorValue, ViewStyle} from 'react-native';\n\nexport type CardCongratsProps = {\n animationUri: string | null;\n Icon: React.FC<{style: ViewStyle; color: ColorValue}>;\n value: string;\n text: string;\n iconColor: ColorValue;\n textColor: ColorValue;\n direction: ViewStyle['flexDirection'];\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAgC,0BAA0B,EAAC,MAAM,cAAc,CAAC;AAyPvF,QAAA,MAAM,qBAAqB,kDAMxB,0BAA0B,uBAiD5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
|
-
import React, { useCallback, useEffect,
|
|
3
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
4
4
|
import { Animated, Easing, StyleSheet, View } from 'react-native';
|
|
5
5
|
import { NovaCompositionCoorpacademyCheck as RightIcon, NovaSolidStatusClose as WrongIcon, NovaLineLoginKey1 as KlfIcon } from '@coorpacademy/nova-icons';
|
|
6
6
|
import Html from '../../atom/html/index.native';
|
|
7
7
|
import Text from '../../atom/text/index.native';
|
|
8
8
|
import Touchable from '../../hoc/touchable/index.native';
|
|
9
9
|
import { useTemplateContext } from '../../template/app-review/template-context';
|
|
10
|
+
import useUpdateOpacity from '../../behaviours/use-update-opacity.native';
|
|
10
11
|
|
|
11
12
|
const createStyleSheet = (theme, type) => StyleSheet.create({
|
|
12
13
|
wrapper: {
|
|
@@ -54,8 +55,7 @@ const createStyleSheet = (theme, type) => StyleSheet.create({
|
|
|
54
55
|
fontWeight: '600',
|
|
55
56
|
lineHeight: 24,
|
|
56
57
|
marginLeft: 12,
|
|
57
|
-
textTransform: 'uppercase'
|
|
58
|
-
wordBreak: 'break-word'
|
|
58
|
+
textTransform: 'uppercase'
|
|
59
59
|
},
|
|
60
60
|
feedbackSection: {
|
|
61
61
|
marginVertical: theme.spacing.medium
|
|
@@ -72,8 +72,7 @@ const createStyleSheet = (theme, type) => StyleSheet.create({
|
|
|
72
72
|
color: theme.colors.white,
|
|
73
73
|
fontSize: 14,
|
|
74
74
|
fontWeight: theme.fontWeight.extraBold,
|
|
75
|
-
lineHeight: 17
|
|
76
|
-
wordBreak: 'break-word'
|
|
75
|
+
lineHeight: 17
|
|
77
76
|
},
|
|
78
77
|
htmlInfoMessage: {
|
|
79
78
|
color: theme.colors.white,
|
|
@@ -181,23 +180,13 @@ const KlfButton = ({
|
|
|
181
180
|
styleSheet
|
|
182
181
|
}) => {
|
|
183
182
|
const [displayTooltip, setDisplayTooltip] = useState(false);
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}).start();
|
|
192
|
-
}, [fadeAnim]);
|
|
193
|
-
const fadeOut = useCallback(() => {
|
|
194
|
-
Animated.timing(fadeAnim, {
|
|
195
|
-
toValue: 0,
|
|
196
|
-
duration: 500,
|
|
197
|
-
easing: Easing.bezier(0.25, 1, 0.5, 1),
|
|
198
|
-
useNativeDriver: true
|
|
199
|
-
}).start();
|
|
200
|
-
}, [fadeAnim]);
|
|
183
|
+
const {
|
|
184
|
+
fadeIn,
|
|
185
|
+
fadeOut,
|
|
186
|
+
animatedOpacity
|
|
187
|
+
} = useUpdateOpacity({
|
|
188
|
+
easing: Easing.bezier(0.25, 1, 0.5, 1)
|
|
189
|
+
});
|
|
201
190
|
const handlePressKey = useCallback(() => {
|
|
202
191
|
setDisplayTooltip(!displayTooltip);
|
|
203
192
|
!displayTooltip ? fadeIn() : fadeOut();
|
|
@@ -220,9 +209,7 @@ const KlfButton = ({
|
|
|
220
209
|
return /*#__PURE__*/React.createElement(View, {
|
|
221
210
|
style: containerButtonKlf
|
|
222
211
|
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
223
|
-
style: [containerTooltip,
|
|
224
|
-
opacity: fadeAnim
|
|
225
|
-
}]
|
|
212
|
+
style: [containerTooltip, animatedOpacity]
|
|
226
213
|
}, /*#__PURE__*/React.createElement(Touchable, {
|
|
227
214
|
style: buttonTooltip,
|
|
228
215
|
accessibilityLabel: `aria-label-tooltip`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useCallback","useEffect","useRef","useState","Animated","Easing","StyleSheet","View","NovaCompositionCoorpacademyCheck","RightIcon","NovaSolidStatusClose","WrongIcon","NovaLineLoginKey1","KlfIcon","Html","Text","Touchable","useTemplateContext","createStyleSheet","theme","type","create","wrapper","height","color","colors","white","display","popin","padding","spacing","medium","borderRadius","flexDirection","alignItems","backgroundColor","negative","positive","shadowColor","shadowOpacity","shadowOffset","width","shadowRadius","elevation","correctionSection","iconCircle","justifyContent","opacity","icon","resultLabel","fontSize","fontWeight","lineHeight","marginLeft","textTransform","wordBreak","feedbackSection","marginVertical","labelContainer","alignSelf","paddingHorizontal","tiny","paddingVertical","micro","marginBottom","label","extraBold","htmlInfoMessage","button","base","small","buttonText","cta","bold","textAlign","containerButtonKlf","buttonKlf","buttonKlfActive","buttonKlfText","iconKey","marginRight","containerTooltip","zIndex","position","black","buttonTooltip","bottom","right","htmlTooltipText","text","primary","triangleTooltip","borderStyle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderTopWidth","borderLeftColor","borderTopColor","borderRightColor","borderBottomColor","transform","rotate","left","top","KlfButton","klf","styleSheet","displayTooltip","setDisplayTooltip","fadeAnim","Value","current","fadeIn","timing","toValue","duration","easing","bezier","useNativeDriver","start","fadeOut","handlePressKey","tooltip","ICONS","wrong","ReviewCorrectionPopin","information","next","templateContext","setStylesheet","handlePressNext","onClick","Icon","_stylesheet","message"],"sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useRef, useState} from 'react';\nimport {Animated, Easing, TextStyle, StyleSheet, View, ViewStyle} from 'react-native';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon,\n NovaLineLoginKey1 as KlfIcon\n} from '@coorpacademy/nova-icons';\nimport Html from '../../atom/html/index.native';\nimport {Theme} from '../../variables/theme.native';\nimport Text from '../../atom/text/index.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {ReviewCorrectionPopinKLFProps, ReviewCorrectionPopinProps} from './prop-types';\n\ninterface StyleSheetType {\n wrapper: ViewStyle;\n popin: ViewStyle;\n correctionSection: ViewStyle;\n iconCircle: ViewStyle;\n icon: ViewStyle;\n resultLabel: TextStyle;\n feedbackSection: ViewStyle;\n labelContainer: ViewStyle;\n label: TextStyle;\n htmlInfoMessage: TextStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n buttonKlf: ViewStyle;\n buttonKlfActive: TextStyle;\n buttonKlfText: TextStyle;\n iconKey: ViewStyle;\n containerTooltip: ViewStyle;\n buttonTooltip: ViewStyle;\n containerButtonKlf: ViewStyle;\n triangleTooltip: ViewStyle;\n htmlTooltipText: TextStyle;\n}\n\nconst createStyleSheet = (theme: Theme, type: string): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n height: 'auto',\n color: theme.colors.white,\n display: 'flex'\n },\n popin: {\n padding: theme.spacing.medium,\n borderRadius: 16,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n backgroundColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowOpacity: 0.5,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 15,\n elevation: 4\n },\n correctionSection: {\n flexDirection: 'row',\n alignItems: 'center',\n width: '80%'\n },\n iconCircle: {\n width: 60,\n height: 60,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n opacity: 0.7,\n borderRadius: 50\n },\n icon: {\n height: 30,\n width: 30\n },\n resultLabel: {\n color: theme.colors.white,\n fontSize: 24,\n fontWeight: '600',\n lineHeight: 24,\n marginLeft: 12,\n textTransform: 'uppercase',\n wordBreak: 'break-word'\n },\n feedbackSection: {\n marginVertical: theme.spacing.medium\n },\n labelContainer: {\n alignSelf: 'flex-start',\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n borderRadius: 56,\n paddingHorizontal: theme.spacing.tiny,\n paddingVertical: theme.spacing.micro,\n marginBottom: 8\n },\n label: {\n color: theme.colors.white,\n fontSize: 14,\n fontWeight: theme.fontWeight.extraBold,\n lineHeight: 17,\n wordBreak: 'break-word'\n },\n htmlInfoMessage: {\n color: theme.colors.white,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 19\n },\n button: {\n alignSelf: 'stretch',\n backgroundColor: theme.colors.white,\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small\n },\n buttonText: {\n color: theme.colors.cta,\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n containerButtonKlf: {\n width: '100%'\n },\n buttonKlf: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small,\n marginBottom: theme.spacing.tiny\n },\n buttonKlfActive: {\n backgroundColor:\n 'linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), rgba(255, 255, 255, 0.1)'\n },\n buttonKlfText: {\n color: 'white',\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n iconKey: {\n width: 12,\n height: 12,\n marginRight: theme.spacing.tiny\n },\n containerTooltip: {\n zIndex: 30,\n position: 'relative',\n shadowColor: theme.colors.black,\n shadowOpacity: 0.3,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 8\n },\n buttonTooltip: {\n flexDirection: 'column',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n borderRadius: 15,\n padding: theme.spacing.small,\n width: '112%',\n position: 'absolute',\n bottom: 4,\n right: -15,\n zIndex: 20\n },\n htmlTooltipText: {\n color: theme.colors.text.primary,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 22,\n textAlign: 'center'\n },\n triangleTooltip: {\n width: 0,\n height: 0,\n backgroundColor: 'transparent',\n borderStyle: 'solid',\n borderLeftWidth: 13,\n borderRightWidth: 13,\n borderBottomWidth: 13,\n borderTopWidth: 13,\n borderLeftColor: 'transparent',\n borderTopColor: 'transparent',\n borderRightColor: theme.colors.white,\n borderBottomColor: theme.colors.white,\n transform: [{rotate: '45deg'}],\n position: 'absolute',\n left: 110,\n top: -20,\n borderRadius: 4\n }\n });\n\nconst KlfButton = ({\n klf,\n styleSheet\n}: {\n klf: ReviewCorrectionPopinKLFProps;\n styleSheet: StyleSheetType;\n}) => {\n const [displayTooltip, setDisplayTooltip] = useState(false);\n\n const fadeAnim = useRef(new Animated.Value(0)).current;\n\n const fadeIn = useCallback(() => {\n Animated.timing(fadeAnim, {\n toValue: 1,\n duration: 1000,\n easing: Easing.bezier(0.25, 1, 0.5, 1),\n useNativeDriver: true\n }).start();\n }, [fadeAnim]);\n\n const fadeOut = useCallback(() => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n duration: 500,\n easing: Easing.bezier(0.25, 1, 0.5, 1),\n useNativeDriver: true\n }).start();\n }, [fadeAnim]);\n\n const handlePressKey = useCallback(() => {\n setDisplayTooltip(!displayTooltip);\n !displayTooltip ? fadeIn() : fadeOut();\n }, [displayTooltip, fadeIn, fadeOut]);\n\n const {\n buttonKlf,\n buttonKlfActive,\n buttonKlfText,\n containerButtonKlf,\n containerTooltip,\n buttonTooltip,\n htmlTooltipText,\n iconKey,\n triangleTooltip\n } = styleSheet;\n\n const {label, tooltip} = klf;\n\n return (\n <View style={containerButtonKlf}>\n <Animated.View style={[containerTooltip, {opacity: fadeAnim}]}>\n <Touchable\n style={buttonTooltip}\n accessibilityLabel={`aria-label-tooltip`}\n isHighlight\n onPress={handlePressKey}\n testID=\"button-tooltip\"\n >\n <Html style={htmlTooltipText}>{tooltip}</Html>\n </Touchable>\n <View style={triangleTooltip} />\n </Animated.View>\n <Touchable\n style={displayTooltip ? {...buttonKlf, ...buttonKlfActive} : buttonKlf}\n accessibilityLabel={`aria-label-${label}`}\n onPress={handlePressKey}\n testID=\"button-klf\"\n >\n <KlfIcon style={iconKey} color=\"white\" />\n <Text style={buttonKlfText}>{label}</Text>\n </Touchable>\n </View>\n );\n};\n\nconst ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n};\n\nconst ReviewCorrectionPopin = ({\n information,\n klf,\n next,\n type,\n resultLabel\n}: ReviewCorrectionPopinProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme} = templateContext;\n const handlePressNext = next.onClick;\n\n const Icon = ICONS[type];\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, type);\n setStylesheet(_stylesheet);\n }, [theme, type]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.wrapper}>\n <View style={styleSheet.popin}>\n <View style={styleSheet.correctionSection}>\n <View style={styleSheet.iconCircle}>\n <Icon\n style={styleSheet.icon}\n color={type === 'wrong' ? theme.colors.negative : theme.colors.positive}\n />\n </View>\n <Text style={styleSheet.resultLabel}>{resultLabel}</Text>\n </View>\n <View style={styleSheet.feedbackSection} accessibilityLabel=\"answer-information\">\n <View style={styleSheet.labelContainer} needsOffscreenAlphaCompositing>\n <Text accessibilityLabel={information.label} style={styleSheet.label}>\n {information.label}\n </Text>\n </View>\n <Html style={styleSheet.htmlInfoMessage}>{information.message}</Html>\n </View>\n {klf && type === 'wrong' ? <KlfButton styleSheet={styleSheet} klf={klf} /> : null}\n <Touchable\n style={styleSheet.button}\n onPress={handlePressNext}\n accessibilityLabel={next['aria-label']}\n testID={next['data-name']}\n >\n <Text style={styleSheet.buttonText}>{next.label}</Text>\n </Touchable>\n </View>\n </View>\n );\n};\n\nexport default ReviewCorrectionPopin;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,SAA5B,EAAuCC,MAAvC,EAA+CC,QAA/C,QAA8D,OAA9D;AACA,SAAQC,QAAR,EAAkBC,MAAlB,EAAqCC,UAArC,EAAiDC,IAAjD,QAAuE,cAAvE;AACA,SACEC,gCAAgC,IAAIC,SADtC,EAEEC,oBAAoB,IAAIC,SAF1B,EAGEC,iBAAiB,IAA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,eAME,oBAAC,IAAD;IAAM,KAAK,EAAE0C,UAAU,CAACxC;EAAxB,GAA0C4D,WAAW,CAACQ,OAAtD,CANF,CAVF,EAkBG7B,GAAG,IAAItF,IAAI,KAAK,OAAhB,gBAA0B,oBAAC,SAAD;IAAW,UAAU,EAAEuF,UAAvB;IAAmC,GAAG,EAAED;EAAxC,EAA1B,GAA4E,IAlB/E,eAmBE,oBAAC,SAAD;IACE,KAAK,EAAEC,UAAU,CAACvC,MADpB;IAEE,OAAO,EAAE+D,eAFX;IAGE,kBAAkB,EAAEH,IAAI,CAAC,YAAD,CAH1B;IAIE,MAAM,EAAEA,IAAI,CAAC,WAAD;EAJd,gBAME,oBAAC,IAAD;IAAM,KAAK,EAAErB,UAAU,CAACpC;EAAxB,GAAqCyD,IAAI,CAAC/D,KAA1C,CANF,CAnBF,CADF,CADF;AAgCD,CAvDD;;AAyDA,eAAe6D,qBAAf"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useCallback","useEffect","useState","Animated","Easing","StyleSheet","View","NovaCompositionCoorpacademyCheck","RightIcon","NovaSolidStatusClose","WrongIcon","NovaLineLoginKey1","KlfIcon","Html","Text","Touchable","useTemplateContext","useUpdateOpacity","createStyleSheet","theme","type","create","wrapper","height","color","colors","white","display","popin","padding","spacing","medium","borderRadius","flexDirection","alignItems","backgroundColor","negative","positive","shadowColor","shadowOpacity","shadowOffset","width","shadowRadius","elevation","correctionSection","iconCircle","justifyContent","opacity","icon","resultLabel","fontSize","fontWeight","lineHeight","marginLeft","textTransform","feedbackSection","marginVertical","labelContainer","alignSelf","paddingHorizontal","tiny","paddingVertical","micro","marginBottom","label","extraBold","htmlInfoMessage","button","base","small","buttonText","cta","bold","textAlign","containerButtonKlf","buttonKlf","buttonKlfActive","buttonKlfText","iconKey","marginRight","containerTooltip","zIndex","position","black","buttonTooltip","bottom","right","htmlTooltipText","text","primary","triangleTooltip","borderStyle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderTopWidth","borderLeftColor","borderTopColor","borderRightColor","borderBottomColor","transform","rotate","left","top","KlfButton","klf","styleSheet","displayTooltip","setDisplayTooltip","fadeIn","fadeOut","animatedOpacity","easing","bezier","handlePressKey","tooltip","ICONS","wrong","ReviewCorrectionPopin","information","next","templateContext","setStylesheet","handlePressNext","onClick","Icon","_stylesheet","message"],"sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState} from 'react';\nimport {Animated, Easing, TextStyle, StyleSheet, View, ViewStyle} from 'react-native';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon,\n NovaLineLoginKey1 as KlfIcon\n} from '@coorpacademy/nova-icons';\nimport Html from '../../atom/html/index.native';\nimport {Theme} from '../../variables/theme.native';\nimport Text from '../../atom/text/index.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport useUpdateOpacity from '../../behaviours/use-update-opacity.native';\nimport {ReviewCorrectionPopinKLFProps, ReviewCorrectionPopinProps} from './prop-types';\n\ninterface StyleSheetType {\n wrapper: ViewStyle;\n popin: ViewStyle;\n correctionSection: ViewStyle;\n iconCircle: ViewStyle;\n icon: ViewStyle;\n resultLabel: TextStyle;\n feedbackSection: ViewStyle;\n labelContainer: ViewStyle;\n label: TextStyle;\n htmlInfoMessage: TextStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n buttonKlf: ViewStyle;\n buttonKlfActive: TextStyle;\n buttonKlfText: TextStyle;\n iconKey: ViewStyle;\n containerTooltip: ViewStyle;\n buttonTooltip: ViewStyle;\n containerButtonKlf: ViewStyle;\n triangleTooltip: ViewStyle;\n htmlTooltipText: TextStyle;\n}\n\nconst createStyleSheet = (theme: Theme, type: string): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n height: 'auto',\n color: theme.colors.white,\n display: 'flex'\n },\n popin: {\n padding: theme.spacing.medium,\n borderRadius: 16,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n backgroundColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowOpacity: 0.5,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 15,\n elevation: 4\n },\n correctionSection: {\n flexDirection: 'row',\n alignItems: 'center',\n width: '80%'\n },\n iconCircle: {\n width: 60,\n height: 60,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n opacity: 0.7,\n borderRadius: 50\n },\n icon: {\n height: 30,\n width: 30\n },\n resultLabel: {\n color: theme.colors.white,\n fontSize: 24,\n fontWeight: '600',\n lineHeight: 24,\n marginLeft: 12,\n textTransform: 'uppercase'\n },\n feedbackSection: {\n marginVertical: theme.spacing.medium\n },\n labelContainer: {\n alignSelf: 'flex-start',\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n borderRadius: 56,\n paddingHorizontal: theme.spacing.tiny,\n paddingVertical: theme.spacing.micro,\n marginBottom: 8\n },\n label: {\n color: theme.colors.white,\n fontSize: 14,\n fontWeight: theme.fontWeight.extraBold,\n lineHeight: 17\n },\n htmlInfoMessage: {\n color: theme.colors.white,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 19\n },\n button: {\n alignSelf: 'stretch',\n backgroundColor: theme.colors.white,\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small\n },\n buttonText: {\n color: theme.colors.cta,\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n containerButtonKlf: {\n width: '100%'\n },\n buttonKlf: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small,\n marginBottom: theme.spacing.tiny\n },\n buttonKlfActive: {\n backgroundColor:\n 'linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), rgba(255, 255, 255, 0.1)'\n },\n buttonKlfText: {\n color: 'white',\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n iconKey: {\n width: 12,\n height: 12,\n marginRight: theme.spacing.tiny\n },\n containerTooltip: {\n zIndex: 30,\n position: 'relative',\n shadowColor: theme.colors.black,\n shadowOpacity: 0.3,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 8\n },\n buttonTooltip: {\n flexDirection: 'column',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n borderRadius: 15,\n padding: theme.spacing.small,\n width: '112%',\n position: 'absolute',\n bottom: 4,\n right: -15,\n zIndex: 20\n },\n htmlTooltipText: {\n color: theme.colors.text.primary,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 22,\n textAlign: 'center'\n },\n triangleTooltip: {\n width: 0,\n height: 0,\n backgroundColor: 'transparent',\n borderStyle: 'solid',\n borderLeftWidth: 13,\n borderRightWidth: 13,\n borderBottomWidth: 13,\n borderTopWidth: 13,\n borderLeftColor: 'transparent',\n borderTopColor: 'transparent',\n borderRightColor: theme.colors.white,\n borderBottomColor: theme.colors.white,\n transform: [{rotate: '45deg'}],\n position: 'absolute',\n left: 110,\n top: -20,\n borderRadius: 4\n }\n });\n\nconst KlfButton = ({\n klf,\n styleSheet\n}: {\n klf: ReviewCorrectionPopinKLFProps;\n styleSheet: StyleSheetType;\n}) => {\n const [displayTooltip, setDisplayTooltip] = useState(false);\n const {fadeIn, fadeOut, animatedOpacity} = useUpdateOpacity({\n easing: Easing.bezier(0.25, 1, 0.5, 1)\n });\n\n const handlePressKey = useCallback(() => {\n setDisplayTooltip(!displayTooltip);\n !displayTooltip ? fadeIn() : fadeOut();\n }, [displayTooltip, fadeIn, fadeOut]);\n\n const {\n buttonKlf,\n buttonKlfActive,\n buttonKlfText,\n containerButtonKlf,\n containerTooltip,\n buttonTooltip,\n htmlTooltipText,\n iconKey,\n triangleTooltip\n } = styleSheet;\n\n const {label, tooltip} = klf;\n\n return (\n <View style={containerButtonKlf}>\n <Animated.View style={[containerTooltip, animatedOpacity]}>\n <Touchable\n style={buttonTooltip}\n accessibilityLabel={`aria-label-tooltip`}\n isHighlight\n onPress={handlePressKey}\n testID=\"button-tooltip\"\n >\n <Html style={htmlTooltipText}>{tooltip}</Html>\n </Touchable>\n <View style={triangleTooltip} />\n </Animated.View>\n <Touchable\n style={displayTooltip ? {...buttonKlf, ...buttonKlfActive} : buttonKlf}\n accessibilityLabel={`aria-label-${label}`}\n onPress={handlePressKey}\n testID=\"button-klf\"\n >\n <KlfIcon style={iconKey} color=\"white\" />\n <Text style={buttonKlfText}>{label}</Text>\n </Touchable>\n </View>\n );\n};\n\nconst ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n};\n\nconst ReviewCorrectionPopin = ({\n information,\n klf,\n next,\n type,\n resultLabel\n}: ReviewCorrectionPopinProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme} = templateContext;\n const handlePressNext = next.onClick;\n\n const Icon = ICONS[type];\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, type);\n setStylesheet(_stylesheet);\n }, [theme, type]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.wrapper}>\n <View style={styleSheet.popin}>\n <View style={styleSheet.correctionSection}>\n <View style={styleSheet.iconCircle}>\n <Icon\n style={styleSheet.icon}\n color={type === 'wrong' ? theme.colors.negative : theme.colors.positive}\n />\n </View>\n <Text style={styleSheet.resultLabel}>{resultLabel}</Text>\n </View>\n <View style={styleSheet.feedbackSection} accessibilityLabel=\"answer-information\">\n <View style={styleSheet.labelContainer} needsOffscreenAlphaCompositing>\n <Text accessibilityLabel={information.label} style={styleSheet.label}>\n {information.label}\n </Text>\n </View>\n <Html style={styleSheet.htmlInfoMessage}>{information.message}</Html>\n </View>\n {klf && type === 'wrong' ? <KlfButton styleSheet={styleSheet} klf={klf} /> : null}\n <Touchable\n style={styleSheet.button}\n onPress={handlePressNext}\n accessibilityLabel={next['aria-label']}\n testID={next['data-name']}\n >\n <Text style={styleSheet.buttonText}>{next.label}</Text>\n </Touchable>\n </View>\n </View>\n );\n};\n\nexport default ReviewCorrectionPopin;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,SAA5B,EAAuCC,QAAvC,QAAsD,OAAtD;AACA,SAAQC,QAAR,EAAkBC,MAAlB,EAAqCC,UAArC,EAAiDC,IAAjD,QAAuE,cAAvE;AACA,SACEC,gCAAgC,IAAIC,SADtC,EAEEC,oBAAoB,IAAIC,SAF1B,EAGEC,iBAAiB,IAAIC,OAHvB,QAIO,0BAJP;AAKA,OAAOC,IAAP,MAAiB,8BAAjB;AAEA,OAAOC,IAAP,MAAiB,8BAAjB;AACA,OAAOC,SAAP,MAAsB,kCAAtB;AACA,SAAQC,kBAAR,QAAiC,4CAAjC;AACA,OAAOC,gBAAP,MAA6B,4CAA7B;;AA2BA,MAAMC,gBAAgB,GAAG,CAACC,KAAD,EAAeC,IAAf,KACvBf,UAAU,CAACgB,MAAX,CAAkB;EAChBC,OAAO,EAAE;IACPC,MAAM,EAAE,MADD;IAEPC,KAAK,EAAEL,KAAK,CAACM,MAAN,CAAaC,KAFb;IAGPC,OAAO,EAAE;EAHF,CADO;EAMhBC,KAAK,EAAE;IACLC,OAAO,EAAEV,KAAK,CAACW,OAAN,CAAcC,MADlB;IAELC,YAAY,EAAE,EAFT;IAGLL,OAAO,EAAE,MAHJ;IAILM,aAAa,EAAE,QAJV;IAKLC,UAAU,EAAE,YALP;IAMLC,eAAe,EAAEf,IAAI,KAAK,OAAT,GAAmBD,KAAK,CAACM,MAAN,CAAaW,QAAhC,GAA2CjB,KAAK,CAACM,MAAN,CAAaY,QANpE;IAOLC,WAAW,EAAElB,IAAI,KAAK,OAAT,GAAmBD,KAAK,CAACM,MAAN,CAAaW,QAAhC,GAA2CjB,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AAED;EAAxC,EAA1B,GAA4E,IAlB/E,eAmBE,oBAAC,SAAD;IACE,KAAK,EAAEC,UAAU,CAACvC,MADpB;IAEE,OAAO,EAAEwD,eAFX;IAGE,kBAAkB,EAAEH,IAAI,CAAC,YAAD,CAH1B;IAIE,MAAM,EAAEA,IAAI,CAAC,WAAD;EAJd,gBAME,oBAAC,IAAD;IAAM,KAAK,EAAEd,UAAU,CAACpC;EAAxB,GAAqCkD,IAAI,CAACxD,KAA1C,CANF,CAnBF,CADF,CADF;AAgCD,CAvDD;;AAyDA,eAAesD,qBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/get-the-app/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/get-the-app/index.js"],"names":[],"mappings":";AAoIA,kEA+DC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3ED;;gBAMC"}
|
|
@@ -6,6 +6,7 @@ import React from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { NovaCompositionCoorpacademyMagicWand as MagicWand, NovaCompositionCoorpacademyCoorpApp as CoorpAppLogo } from '@coorpacademy/nova-icons';
|
|
8
8
|
import Button from '../../atom/button';
|
|
9
|
+
import Picture from '../../atom/picture';
|
|
9
10
|
import style from './style.css';
|
|
10
11
|
|
|
11
12
|
const Header = ({
|
|
@@ -93,10 +94,22 @@ const StoresLinks = ({
|
|
|
93
94
|
onAppStoreButtonClick,
|
|
94
95
|
appStoreButtonImageUrl,
|
|
95
96
|
playStoreButtonImageUrl,
|
|
96
|
-
onPlayStoreButtonClick
|
|
97
|
+
onPlayStoreButtonClick,
|
|
98
|
+
'android-alt': androidAlt,
|
|
99
|
+
'ios-alt': iosAlt
|
|
97
100
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
98
101
|
className: style.storeLinksContainer
|
|
99
|
-
}
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Picture, {
|
|
103
|
+
className: style.img,
|
|
104
|
+
src: appStoreButtonImageUrl,
|
|
105
|
+
onClick: onAppStoreButtonClick,
|
|
106
|
+
alt: iosAlt
|
|
107
|
+
}), /*#__PURE__*/React.createElement(Picture, {
|
|
108
|
+
className: style.img,
|
|
109
|
+
src: playStoreButtonImageUrl,
|
|
110
|
+
onClick: onPlayStoreButtonClick,
|
|
111
|
+
alt: androidAlt
|
|
112
|
+
}));
|
|
100
113
|
|
|
101
114
|
StoresLinks.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
102
115
|
onAppStoreButtonClick: PropTypes.func,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionCoorpacademyMagicWand","MagicWand","NovaCompositionCoorpacademyCoorpApp","CoorpAppLogo","Button","style","Header","step","header","subHeader","headerContainer","headerWrapper","propTypes","string","QrCodeImage","showMobileAppAccess","qrCodeImageUrl","preMessage","linkMessage","endMessage","qrcodeWrapper","qrcodeOverlay","qrcodeModal","qrcodeModalLink","bool","MagicLink","disabled","submitValue","magicLinkUrl","color","buttonWrapper","iconWrapper","magicLinkIcon","StoresLinks","onAppStoreButtonClick","appStoreButtonImageUrl","playStoreButtonImageUrl","onPlayStoreButtonClick","storeLinksContainer","func","Divider","word","dividerWrapper","divider","GetTheApp","props","context","storeStep","connectionStep","qrCodeStep","magicLinkStep","diviserWord","skin","primaryColor","container","coorpAppLogoWrapper","coorpAppLogo","store","secondStepWrapper","connectionWrapper","wrapper","shape"],"sources":["../../../src/organism/get-the-app/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionCoorpacademyMagicWand as MagicWand,\n NovaCompositionCoorpacademyCoorpApp as CoorpAppLogo\n} from '@coorpacademy/nova-icons';\nimport {get} from 'lodash/fp';\nimport Button from '../../atom/button';\nimport style from './style.css';\n\nconst Header = ({step, header, subHeader}) => (\n <div className={style.headerContainer}>\n {step ? (\n <div className={style.headerWrapper}>\n <h1 className={style.step}>{step}</h1>\n <h1 className={style.header}>{header}</h1>\n </div>\n ) : (\n <h1 className={style.header}>{header} </h1>\n )}\n {subHeader ? <h4 className={style.subHeader}>{subHeader} </h4> : null}\n </div>\n);\n\nHeader.propTypes = {\n step: PropTypes.string,\n header: PropTypes.string,\n subHeader: PropTypes.string\n};\n\nconst QrCodeImage = ({\n showMobileAppAccess,\n qrCodeImageUrl,\n preMessage,\n linkMessage,\n endMessage\n}) => {\n return (\n <div className={style.qrcodeWrapper}>\n <img src={qrCodeImageUrl} />\n {showMobileAppAccess ? (\n <div className={style.qrcodeOverlay}>\n <div className={style.qrcodeModal}>\n <span>{preMessage} </span>\n <a href=\"mailto:assistance@coorpacademy.com\" className={style.qrcodeModalLink}>\n <span>{linkMessage} </span>\n </a>\n <span>{endMessage} </span>\n </div>\n </div>\n ) : null}\n </div>\n );\n};\nQrCodeImage.propTypes = {\n showMobileAppAccess: PropTypes.bool,\n qrCodeImageUrl: PropTypes.string,\n preMessage: PropTypes.string,\n linkMessage: PropTypes.string,\n endMessage: PropTypes.string\n};\n\nconst MagicLink = ({disabled, submitValue, magicLinkUrl, color}) => {\n return (\n <div className={style.buttonWrapper}>\n <Button\n color={color}\n disabled={disabled}\n isLinkDisabled={disabled}\n href={magicLinkUrl}\n type=\"link\"\n submitValue={null}\n >\n <div className={style.iconWrapper}>\n <MagicWand className={style.magicLinkIcon} />\n <p>{submitValue}</p>\n </div>\n </Button>\n </div>\n );\n};\n\nMagicLink.propTypes = {\n magicLinkUrl: PropTypes.string,\n disabled: PropTypes.bool,\n submitValue: PropTypes.string\n};\n\nconst StoresLinks = ({\n onAppStoreButtonClick,\n appStoreButtonImageUrl,\n playStoreButtonImageUrl,\n onPlayStoreButtonClick\n}) => (\n <div className={style.storeLinksContainer}>\n {/* <img className={style.img} src={appStoreButtonImageUrl} onClick={onAppStoreButtonClick} />\n <img className={style.img} src={playStoreButtonImageUrl} onClick={onPlayStoreButtonClick} /> */}\n </div>\n);\n\nStoresLinks.propTypes = {\n onAppStoreButtonClick: PropTypes.func,\n appStoreButtonImageUrl: PropTypes.string,\n playStoreButtonImageUrl: PropTypes.string,\n onPlayStoreButtonClick: PropTypes.func\n};\n\nconst Divider = ({word}) => (\n <div className={style.dividerWrapper}>\n <div className={style.divider} />\n <p>{word}</p>\n <div className={style.divider} />\n </div>\n);\n\nDivider.propTypes = {\n word: PropTypes.string\n};\n\nconst GetTheApp = (props, context) => {\n const {\n onAppStoreButtonClick,\n appStoreButtonImageUrl,\n playStoreButtonImageUrl,\n onPlayStoreButtonClick,\n storeStep,\n connectionStep,\n qrCodeStep,\n magicLinkStep,\n diviserWord,\n qrCodeImageUrl,\n magicLinkUrl,\n disabled,\n showMobileAppAccess,\n submitValue,\n preMessage,\n linkMessage,\n endMessage\n } = props;\n const {skin} = context;\n const primaryColor = get('common.primary', skin);\n return (\n <div className={style.container}>\n <div className={style.coorpAppLogoWrapper}>\n <CoorpAppLogo height={51} width={250} className={style.coorpAppLogo} />\n </div>\n <div className={style.store}>\n <Header {...storeStep} />\n <StoresLinks\n onAppStoreButtonClick={onAppStoreButtonClick}\n appStoreButtonImageUrl={appStoreButtonImageUrl}\n playStoreButtonImageUrl={playStoreButtonImageUrl}\n onPlayStoreButtonClick={onPlayStoreButtonClick}\n />\n </div>\n <div className={style.secondStepWrapper}>\n <Header {...connectionStep} />\n <div className={style.connectionWrapper}>\n <div className={style.wrapper}>\n <Header {...qrCodeStep} />\n <QrCodeImage\n showMobileAppAccess={showMobileAppAccess}\n qrCodeImageUrl={qrCodeImageUrl}\n preMessage={preMessage}\n linkMessage={linkMessage}\n endMessage={endMessage}\n />\n </div>\n <Divider word={diviserWord} />\n <div className={style.wrapper}>\n <Header {...magicLinkStep} />\n <MagicLink\n color={primaryColor}\n submitValue={submitValue}\n disabled={disabled}\n magicLinkUrl={magicLinkUrl}\n />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nGetTheApp.propTypes = {\n ...StoresLinks.propTypes,\n storeStep: PropTypes.shape(Header.propTypes),\n connectionStep: PropTypes.shape(Header.propTypes),\n qrCodeStep: PropTypes.shape(Header.propTypes),\n magicLinkStep: PropTypes.shape(Header.propTypes),\n ...QrCodeImage.propTypes,\n diviserWord: Divider.propTypes.word,\n ...MagicLink.propTypes\n};\n\nexport default GetTheApp;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SACEC,oCAAoC,IAAIC,SAD1C,EAEEC,mCAAmC,IAAIC,YAFzC,QAGO,0BAHP;AAKA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,MAAM,GAAG,CAAC;EAACC,IAAD;EAAOC,MAAP;EAAeC;AAAf,CAAD,kBACb;EAAK,SAAS,EAAEJ,KAAK,CAACK;AAAtB,GACGH,IAAI,gBACH;EAAK,SAAS,EAAEF,KAAK,CAACM;AAAtB,gBACE;EAAI,SAAS,EAAEN,KAAK,CAACE;AAArB,GAA4BA,IAA5B,CADF,eAEE;EAAI,SAAS,EAAEF,KAAK,CAACG;AAArB,GAA8BA,MAA9B,CAFF,CADG,gBAMH;EAAI,SAAS,EAAEH,KAAK,CAACG;AAArB,GAA8BA,MAA9B,MAPJ,EASGC,SAAS,gBAAG;EAAI,SAAS,EAAEJ,KAAK,CAACI;AAArB,GAAiCA,SAAjC,MAAH,GAAuD,IATnE,CADF;;AAcAH,MAAM,CAACM,SAAP,2CAAmB;EACjBL,IAAI,EAAER,SAAS,CAACc,MADC;EAEjBL,MAAM,EAAET,SAAS,CAACc,MAFD;EAGjBJ,SAAS,EAAEV,SAAS,CAACc;AAHJ,CAAnB;;AAMA,MAAMC,WAAW,GAAG,CAAC;EACnBC,mBADmB;EAEnBC,cAFmB;EAGnBC,UAHmB;EAInBC,WAJmB;EAKnBC;AALmB,CAAD,KAMd;EACJ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,EAAEjD,SAAS,CAAC8D,KAAV,CAAgBvD,MAAM,CAACM,SAAvB,CAHlB;EAIEqC,UAAU,EAAElD,SAAS,CAAC8D,KAAV,CAAgBvD,MAAM,CAACM,SAAvB,CAJd;EAKEsC,aAAa,EAAEnD,SAAS,CAAC8D,KAAV,CAAgBvD,MAAM,CAACM,SAAvB;AALjB,GAMKE,WAAW,CAACF,SANjB;EAOEuC,WAAW,EAAEX,OAAO,CAAC5B,SAAR,CAAkB6B;AAPjC,GAQKhB,SAAS,CAACb,SARf;AAWA,eAAegC,SAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionCoorpacademyMagicWand","MagicWand","NovaCompositionCoorpacademyCoorpApp","CoorpAppLogo","Button","Picture","style","Header","step","header","subHeader","headerContainer","headerWrapper","propTypes","string","QrCodeImage","showMobileAppAccess","qrCodeImageUrl","preMessage","linkMessage","endMessage","qrcodeWrapper","qrcodeOverlay","qrcodeModal","qrcodeModalLink","bool","MagicLink","disabled","submitValue","magicLinkUrl","color","buttonWrapper","iconWrapper","magicLinkIcon","StoresLinks","onAppStoreButtonClick","appStoreButtonImageUrl","playStoreButtonImageUrl","onPlayStoreButtonClick","androidAlt","iosAlt","storeLinksContainer","img","func","Divider","word","dividerWrapper","divider","GetTheApp","props","context","storeStep","connectionStep","qrCodeStep","magicLinkStep","diviserWord","skin","primaryColor","container","coorpAppLogoWrapper","coorpAppLogo","store","secondStepWrapper","connectionWrapper","wrapper","shape"],"sources":["../../../src/organism/get-the-app/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionCoorpacademyMagicWand as MagicWand,\n NovaCompositionCoorpacademyCoorpApp as CoorpAppLogo\n} from '@coorpacademy/nova-icons';\nimport {get} from 'lodash/fp';\nimport Button from '../../atom/button';\nimport Picture from '../../atom/picture';\nimport style from './style.css';\n\nconst Header = ({step, header, subHeader}) => (\n <div className={style.headerContainer}>\n {step ? (\n <div className={style.headerWrapper}>\n <h1 className={style.step}>{step}</h1>\n <h1 className={style.header}>{header}</h1>\n </div>\n ) : (\n <h1 className={style.header}>{header} </h1>\n )}\n {subHeader ? <h4 className={style.subHeader}>{subHeader} </h4> : null}\n </div>\n);\n\nHeader.propTypes = {\n step: PropTypes.string,\n header: PropTypes.string,\n subHeader: PropTypes.string\n};\n\nconst QrCodeImage = ({\n showMobileAppAccess,\n qrCodeImageUrl,\n preMessage,\n linkMessage,\n endMessage\n}) => {\n return (\n <div className={style.qrcodeWrapper}>\n <img src={qrCodeImageUrl} />\n {showMobileAppAccess ? (\n <div className={style.qrcodeOverlay}>\n <div className={style.qrcodeModal}>\n <span>{preMessage} </span>\n <a href=\"mailto:assistance@coorpacademy.com\" className={style.qrcodeModalLink}>\n <span>{linkMessage} </span>\n </a>\n <span>{endMessage} </span>\n </div>\n </div>\n ) : null}\n </div>\n );\n};\nQrCodeImage.propTypes = {\n showMobileAppAccess: PropTypes.bool,\n qrCodeImageUrl: PropTypes.string,\n preMessage: PropTypes.string,\n linkMessage: PropTypes.string,\n endMessage: PropTypes.string\n};\n\nconst MagicLink = ({disabled, submitValue, magicLinkUrl, color}) => {\n return (\n <div className={style.buttonWrapper}>\n <Button\n color={color}\n disabled={disabled}\n isLinkDisabled={disabled}\n href={magicLinkUrl}\n type=\"link\"\n submitValue={null}\n >\n <div className={style.iconWrapper}>\n <MagicWand className={style.magicLinkIcon} />\n <p>{submitValue}</p>\n </div>\n </Button>\n </div>\n );\n};\n\nMagicLink.propTypes = {\n magicLinkUrl: PropTypes.string,\n disabled: PropTypes.bool,\n submitValue: PropTypes.string\n};\n\nconst StoresLinks = ({\n onAppStoreButtonClick,\n appStoreButtonImageUrl,\n playStoreButtonImageUrl,\n onPlayStoreButtonClick,\n 'android-alt': androidAlt,\n 'ios-alt': iosAlt\n}) => (\n <div className={style.storeLinksContainer}>\n <Picture\n className={style.img}\n src={appStoreButtonImageUrl}\n onClick={onAppStoreButtonClick}\n alt={iosAlt}\n />\n <Picture\n className={style.img}\n src={playStoreButtonImageUrl}\n onClick={onPlayStoreButtonClick}\n alt={androidAlt}\n />\n </div>\n);\n\nStoresLinks.propTypes = {\n onAppStoreButtonClick: PropTypes.func,\n appStoreButtonImageUrl: PropTypes.string,\n playStoreButtonImageUrl: PropTypes.string,\n onPlayStoreButtonClick: PropTypes.func\n};\n\nconst Divider = ({word}) => (\n <div className={style.dividerWrapper}>\n <div className={style.divider} />\n <p>{word}</p>\n <div className={style.divider} />\n </div>\n);\n\nDivider.propTypes = {\n word: PropTypes.string\n};\n\nconst GetTheApp = (props, context) => {\n const {\n onAppStoreButtonClick,\n appStoreButtonImageUrl,\n playStoreButtonImageUrl,\n onPlayStoreButtonClick,\n storeStep,\n connectionStep,\n qrCodeStep,\n magicLinkStep,\n diviserWord,\n qrCodeImageUrl,\n magicLinkUrl,\n disabled,\n showMobileAppAccess,\n submitValue,\n preMessage,\n linkMessage,\n endMessage\n } = props;\n const {skin} = context;\n const primaryColor = get('common.primary', skin);\n return (\n <div className={style.container}>\n <div className={style.coorpAppLogoWrapper}>\n <CoorpAppLogo height={51} width={250} className={style.coorpAppLogo} />\n </div>\n <div className={style.store}>\n <Header {...storeStep} />\n <StoresLinks\n onAppStoreButtonClick={onAppStoreButtonClick}\n appStoreButtonImageUrl={appStoreButtonImageUrl}\n playStoreButtonImageUrl={playStoreButtonImageUrl}\n onPlayStoreButtonClick={onPlayStoreButtonClick}\n />\n </div>\n <div className={style.secondStepWrapper}>\n <Header {...connectionStep} />\n <div className={style.connectionWrapper}>\n <div className={style.wrapper}>\n <Header {...qrCodeStep} />\n <QrCodeImage\n showMobileAppAccess={showMobileAppAccess}\n qrCodeImageUrl={qrCodeImageUrl}\n preMessage={preMessage}\n linkMessage={linkMessage}\n endMessage={endMessage}\n />\n </div>\n <Divider word={diviserWord} />\n <div className={style.wrapper}>\n <Header {...magicLinkStep} />\n <MagicLink\n color={primaryColor}\n submitValue={submitValue}\n disabled={disabled}\n magicLinkUrl={magicLinkUrl}\n />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nGetTheApp.propTypes = {\n ...StoresLinks.propTypes,\n storeStep: PropTypes.shape(Header.propTypes),\n connectionStep: PropTypes.shape(Header.propTypes),\n qrCodeStep: PropTypes.shape(Header.propTypes),\n magicLinkStep: PropTypes.shape(Header.propTypes),\n ...QrCodeImage.propTypes,\n diviserWord: Divider.propTypes.word,\n ...MagicLink.propTypes\n};\n\nexport default GetTheApp;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SACEC,oCAAoC,IAAIC,SAD1C,EAEEC,mCAAmC,IAAIC,YAFzC,QAGO,0BAHP;AAKA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,MAAM,GAAG,CAAC;EAACC,IAAD;EAAOC,MAAP;EAAeC;AAAf,CAAD,kBACb;EAAK,SAAS,EAAEJ,KAAK,CAACK;AAAtB,GACGH,IAAI,gBACH;EAAK,SAAS,EAAEF,KAAK,CAACM;AAAtB,gBACE;EAAI,SAAS,EAAEN,KAAK,CAACE;AAArB,GAA4BA,IAA5B,CADF,eAEE;EAAI,SAAS,EAAEF,KAAK,CAACG;AAArB,GAA8BA,MAA9B,CAFF,CADG,gBAMH;EAAI,SAAS,EAAEH,KAAK,CAACG;AAArB,GAA8BA,MAA9B,MAPJ,EASGC,SAAS,gBAAG;EAAI,SAAS,EAAEJ,KAAK,CAACI;AAArB,GAAiCA,SAAjC,MAAH,GAAuD,IATnE,CADF;;AAcAH,MAAM,CAACM,SAAP,2CAAmB;EACjBL,IAAI,EAAET,SAAS,CAACe,MADC;EAEjBL,MAAM,EAAEV,SAAS,CAACe,MAFD;EAGjBJ,SAAS,EAAEX,SAAS,CAACe;AAHJ,CAAnB;;AAMA,MAAMC,WAAW,GAAG,CAAC;EACnBC,mBADmB;EAE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YE;IAAK,SAAS,EAAEjD,KAAK,CAAC0D;EAAtB,gBACE,oBAAC,MAAD,EAAYV,aAAZ,CADF,eAEE,oBAAC,SAAD;IACE,KAAK,EAAEG,YADT;IAEE,WAAW,EAAE7B,WAFf;IAGE,QAAQ,EAAED,QAHZ;IAIE,YAAY,EAAEE;EAJhB,EAFF,CAZF,CAFF,CAbF,CADF;AAyCD,CA/DD;;AAiEAmB,SAAS,CAACnC,SAAV,wDACKqB,WAAW,CAACrB,SADjB;EAEEsC,SAAS,EAAEpD,SAAS,CAACkE,KAAV,CAAgB1D,MAAM,CAACM,SAAvB,CAFb;EAGEuC,cAAc,EAAErD,SAAS,CAACkE,KAAV,CAAgB1D,MAAM,CAACM,SAAvB,CAHlB;EAIEwC,UAAU,EAAEtD,SAAS,CAACkE,KAAV,CAAgB1D,MAAM,CAACM,SAAvB,CAJd;EAKEyC,aAAa,EAAEvD,SAAS,CAACkE,KAAV,CAAgB1D,MAAM,CAACM,SAAvB;AALjB,GAMKE,WAAW,CAACF,SANjB;EAOE0C,WAAW,EAAEX,OAAO,CAAC/B,SAAR,CAAkBgC;AAPjC,GAQKnB,SAAS,CAACb,SARf;AAWA,eAAemC,SAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-footer/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-footer/index.js"],"names":[],"mappings":";AA+CA,qDA+HC"}
|
|
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { NovaCompositionCoorpacademyCoorpApp as CoorpAppLogo, NovaCompositionCoorpacademyCoorpLogo as CoorpLogo } from '@coorpacademy/nova-icons';
|
|
5
5
|
import Link from '../../atom/link';
|
|
6
6
|
import SocialLink from '../../atom/social-link';
|
|
7
|
+
import Picture from '../../atom/picture';
|
|
7
8
|
import style from './style.css';
|
|
8
9
|
const socialLinksTypes = process.env.NODE_ENV !== "production" ? ['facebook', 'twitter', 'linkedin', 'youtube', 'instagram'] : {};
|
|
9
10
|
|
|
@@ -16,12 +17,12 @@ const StoresLinks = ({
|
|
|
16
17
|
'ios-alt': iosAlt
|
|
17
18
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
18
19
|
className: style.storeLinksContainer
|
|
19
|
-
}, /*#__PURE__*/React.createElement(
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Picture, {
|
|
20
21
|
className: style.imgApple,
|
|
21
22
|
src: appStoreButtonImageUrl,
|
|
22
23
|
onClick: onAppStoreButtonClick,
|
|
23
24
|
alt: iosAlt
|
|
24
|
-
}), /*#__PURE__*/React.createElement(
|
|
25
|
+
}), /*#__PURE__*/React.createElement(Picture, {
|
|
25
26
|
className: style.img,
|
|
26
27
|
src: playStoreButtonImageUrl,
|
|
27
28
|
onClick: onPlayStoreButtonClick,
|