@coorpacademy/components 10.30.10-alpha.6 → 10.30.10
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.map +1 -1
- package/es/atom/picture/index.js +3 -11
- 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/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +6 -6
- 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.map +1 -1
- package/lib/atom/picture/index.js +3 -11
- 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/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +6 -6
- 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/locales/.mtslconfig.json +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/picture/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/picture/index.js"],"names":[],"mappings":";AAsBA,kDAOC"}
|
package/es/atom/picture/index.js
CHANGED
|
@@ -22,16 +22,6 @@ const toSrcSet = ({
|
|
|
22
22
|
return _pipe(_set('srcSet', _pipe(_toPairs, _filter(([key, url]) => url), _map(([key, url]) => `${url} ${key}`), _join(','))(src)), _set('src', _get('1x', src)))({});
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
const toSetAlt = ({
|
|
26
|
-
alt
|
|
27
|
-
}) => {
|
|
28
|
-
return !alt ? {
|
|
29
|
-
alt: ''
|
|
30
|
-
} : {
|
|
31
|
-
alt
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
|
|
35
25
|
const Picture = props => {
|
|
36
26
|
const {
|
|
37
27
|
src
|
|
@@ -43,7 +33,9 @@ const Picture = props => {
|
|
|
43
33
|
});
|
|
44
34
|
}
|
|
45
35
|
|
|
46
|
-
return /*#__PURE__*/React.createElement("img", _extends({}, props, toSrcSet(props),
|
|
36
|
+
return /*#__PURE__*/React.createElement("img", _extends({}, props, toSrcSet(props), {
|
|
37
|
+
alt: ""
|
|
38
|
+
}));
|
|
47
39
|
};
|
|
48
40
|
|
|
49
41
|
Picture.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","SrcPropType","style","toSrcSet","src","key","url","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","SrcPropType","style","toSrcSet","src","key","url","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 Picture = props => {\n const {src} = props;\n if (isNil(src)) {\n return <div className={style.empty} />;\n }\n\n return <img {...props} {...toSrcSet(props)} alt=\"\" />;\n};\n\nPicture.propTypes = {\n src: PropTypes.oneOfType([SrcPropType, PropTypes.objectOf(SrcPropType)])\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,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IAACJ;EAAD,IAAQI,KAAd;;EACA,IAAI,OAAMJ,GAAN,CAAJ,EAAgB;IACd,oBAAO;MAAK,SAAS,EAAEF,KAAK,CAACO;IAAtB,EAAP;EACD;;EAED,oBAAO,wCAASD,KAAT,EAAoBL,QAAQ,CAACK,KAAD,CAA5B;IAAqC,GAAG,EAAC;EAAzC,GAAP;AACD,CAPD;;AASAD,OAAO,CAACG,SAAR,2CAAoB;EAClBN,GAAG,EAAEJ,SAAS,CAACW,SAAV,CAAoB,CAACV,WAAD,EAAcD,SAAS,CAACY,QAAV,CAAmBX,WAAnB,CAAd,CAApB;AADa,CAApB;AAIA,eAAeM,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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;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 </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 @@
|
|
|
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,IAAIC,OAHvB,QAIO,0BAJP;AAKA,OAAOC,IAAP,MAAiB,8BAAjB;AAEA,OAAOC,IAAP,MAAiB,8BAAjB;AACA,OAAOC,SAAP,MAAsB,kCAAtB;AACA,SAAQC,kBAAR,QAAiC,4CAAjC;;AA2BA,MAAMC,gBAAgB,GAAG,CAACC,KAAD,EAAeC,IAAf,KACvBd,UAAU,CAACe,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,KAAK,CAACM,MAAN,C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AAhC,GAA2CjB,KAAK,CAACM,MAAN,CAAaY;EAFjE,EADF,CADF,eAOE,oBAAC,IAAD;IAAM,KAAK,EAAEsE,UAAU,CAAC1D;EAAxB,GAAsCA,WAAtC,CAPF,CADF,eAUE,oBAAC,IAAD;IAAM,KAAK,EAAE0D,UAAU,CAACnD,eAAxB;IAAyC,kBAAkB,EAAC;EAA5D,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAEmD,UAAU,CAACjD,cAAxB;IAAwC,8BAA8B;EAAtE,gBACE,oBAAC,IAAD;IAAM,kBAAkB,EAAEqE,WAAW,CAAC9D,KAAtC;IAA6C,KAAK,EAAE0C,UAAU,CAAC1C;EAA/D,GACG8D,WAAW,CAAC9D,KADf,CADF,CADF,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;I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IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IArFD,2EASC;IAGC,kBAAsB;IA2ExB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAwBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyFE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAmBC;IAjBC;;;;MAIC;IA6CH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IArFD,2EASC;IAGC,kBAAsB;IA2ExB,6BAmZC;CACF"}
|
|
@@ -501,17 +501,17 @@ class MoocHeader extends React.Component {
|
|
|
501
501
|
onClick: this.handleOnMenuClose
|
|
502
502
|
}), /*#__PURE__*/React.createElement(Link, {
|
|
503
503
|
"data-name": "logo-mobile",
|
|
504
|
-
href: logo.href
|
|
504
|
+
href: logo.href,
|
|
505
|
+
"aria-label": logoAriaLabel
|
|
505
506
|
}, /*#__PURE__*/React.createElement(Picture, {
|
|
506
|
-
src: logoMobileUrl
|
|
507
|
-
alt: logoAriaLabel
|
|
507
|
+
src: logoMobileUrl
|
|
508
508
|
}))), /*#__PURE__*/React.createElement(Link, {
|
|
509
509
|
className: style.logo,
|
|
510
510
|
"data-name": "logo",
|
|
511
|
-
href: logo.href
|
|
511
|
+
href: logo.href,
|
|
512
|
+
"aria-label": logoAriaLabel
|
|
512
513
|
}, /*#__PURE__*/React.createElement(Picture, {
|
|
513
|
-
src: logoUrl
|
|
514
|
-
alt: logoAriaLabel
|
|
514
|
+
src: logoUrl
|
|
515
515
|
}))), searchFormView, /*#__PURE__*/React.createElement("div", {
|
|
516
516
|
className: isMenuOpen ? style.menuWrapper : style.hiddenMenuWrapper,
|
|
517
517
|
"data-name": "menu-wrapper"
|