@coorpacademy/components 11.2.13-alpha.2 → 11.2.13-alpha.36
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/lottie-wrapper/index.d.ts.map +1 -1
- package/es/atom/lottie-wrapper/index.js +12 -16
- package/es/atom/lottie-wrapper/index.js.map +1 -1
- package/es/atom/review-background/index.d.ts.map +1 -1
- package/es/atom/review-background/index.js +18 -9
- package/es/atom/review-background/index.js.map +1 -1
- package/es/molecule/add-to-my-list/index.js +3 -1
- package/es/molecule/add-to-my-list/index.js.map +1 -1
- package/es/molecule/card/notification.js +3 -1
- package/es/molecule/card/notification.js.map +1 -1
- package/es/molecule/cm-popin/index.native.d.ts +5 -0
- package/es/molecule/cm-popin/index.native.d.ts.map +1 -0
- package/es/molecule/cm-popin/index.native.js +124 -0
- package/es/molecule/cm-popin/index.native.js.map +1 -0
- package/es/molecule/cm-popin/types.d.ts +3 -3
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/molecule/forum/forum-post/index.d.ts.map +1 -1
- package/es/molecule/forum/forum-post/index.js +2 -1
- package/es/molecule/forum/forum-post/index.js.map +1 -1
- package/es/molecule/questions/free-text/index.d.ts.map +1 -1
- package/es/molecule/questions/free-text/index.js +1 -2
- package/es/molecule/questions/free-text/index.js.map +1 -1
- package/es/molecule/share/index.d.ts.map +1 -1
- package/es/molecule/share/index.js +5 -1
- package/es/molecule/share/index.js.map +1 -1
- package/es/organism/mobile-navigation/index.native.d.ts.map +1 -1
- package/es/organism/mobile-navigation/index.native.js +3 -3
- package/es/organism/mobile-navigation/index.native.js.map +1 -1
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +7 -5
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/review-header/index.native.d.ts.map +1 -1
- package/es/organism/review-header/index.native.js +34 -3
- package/es/organism/review-header/index.native.js.map +1 -1
- package/es/organism/review-slide/index.d.ts.map +1 -1
- package/es/organism/review-slide/index.js +31 -2
- package/es/organism/review-slide/index.js.map +1 -1
- package/es/organism/review-stacked-slides/index.native.js +6 -6
- package/es/organism/review-stacked-slides/index.native.js.map +1 -1
- package/es/organism/user-preferences/index.js +2 -1
- package/es/organism/user-preferences/index.js.map +1 -1
- package/es/template/app-review/player/index.native.d.ts.map +1 -1
- package/es/template/app-review/player/index.native.js +4 -2
- package/es/template/app-review/player/index.native.js.map +1 -1
- package/es/template/app-review/skills/index.d.ts.map +1 -1
- package/es/template/app-review/skills/index.js +1 -6
- package/es/template/app-review/skills/index.js.map +1 -1
- package/es/template/app-review/skills/style.css +0 -5
- package/es/template/back-office/brand-update/style.css +1 -0
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +2 -1
- package/es/template/common/search-page/index.js.map +1 -1
- package/lib/atom/lottie-wrapper/index.d.ts.map +1 -1
- package/lib/atom/lottie-wrapper/index.js +13 -16
- package/lib/atom/lottie-wrapper/index.js.map +1 -1
- package/lib/atom/review-background/index.d.ts.map +1 -1
- package/lib/atom/review-background/index.js +18 -9
- package/lib/atom/review-background/index.js.map +1 -1
- package/lib/molecule/add-to-my-list/index.js +3 -1
- package/lib/molecule/add-to-my-list/index.js.map +1 -1
- package/lib/molecule/card/notification.js +3 -1
- package/lib/molecule/card/notification.js.map +1 -1
- package/lib/molecule/cm-popin/index.native.d.ts +5 -0
- package/lib/molecule/cm-popin/index.native.d.ts.map +1 -0
- package/lib/molecule/cm-popin/index.native.js +141 -0
- package/lib/molecule/cm-popin/index.native.js.map +1 -0
- package/lib/molecule/cm-popin/types.d.ts +3 -3
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/molecule/forum/forum-post/index.d.ts.map +1 -1
- package/lib/molecule/forum/forum-post/index.js +2 -1
- package/lib/molecule/forum/forum-post/index.js.map +1 -1
- package/lib/molecule/questions/free-text/index.d.ts.map +1 -1
- package/lib/molecule/questions/free-text/index.js +1 -2
- package/lib/molecule/questions/free-text/index.js.map +1 -1
- package/lib/molecule/share/index.d.ts.map +1 -1
- package/lib/molecule/share/index.js +5 -1
- package/lib/molecule/share/index.js.map +1 -1
- package/lib/organism/mobile-navigation/index.native.d.ts.map +1 -1
- package/lib/organism/mobile-navigation/index.native.js +2 -2
- package/lib/organism/mobile-navigation/index.native.js.map +1 -1
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +7 -5
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/review-header/index.native.d.ts.map +1 -1
- package/lib/organism/review-header/index.native.js +36 -3
- package/lib/organism/review-header/index.native.js.map +1 -1
- package/lib/organism/review-slide/index.d.ts.map +1 -1
- package/lib/organism/review-slide/index.js +30 -1
- package/lib/organism/review-slide/index.js.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.js +5 -5
- package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
- package/lib/organism/user-preferences/index.js +2 -1
- package/lib/organism/user-preferences/index.js.map +1 -1
- package/lib/template/app-review/player/index.native.d.ts.map +1 -1
- package/lib/template/app-review/player/index.native.js +5 -2
- package/lib/template/app-review/player/index.native.js.map +1 -1
- package/lib/template/app-review/skills/index.d.ts.map +1 -1
- package/lib/template/app-review/skills/index.js +1 -7
- package/lib/template/app-review/skills/index.js.map +1 -1
- package/lib/template/app-review/skills/style.css +0 -5
- package/lib/template/back-office/brand-update/style.css +1 -0
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +2 -1
- package/lib/template/common/search-page/index.js.map +1 -1
- package/locales/en/global.json +5 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","Animated","Easing","StyleSheet","useWindowDimensions","keys","useTranslateY","Slide","style","create","slides","flex","height","width","StackedSlides","props","windowHeight","endReview","validateButton","correctionPopinProps","unstacked","setUnstacked","restacking","setRestacking","restackingDone","setRestackingDone","hideSlides","fromValue","toValue","duration","translateDown","easing","cubic","restackTranslation","
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","Animated","Easing","StyleSheet","useWindowDimensions","keys","useAnimateProp","useTranslateY","Slide","style","create","slides","flex","height","width","StackedSlides","props","windowHeight","endReview","validateButton","correctionPopinProps","unstacked","setUnstacked","restacking","setRestacking","restackingDone","setRestackingDone","hideSlides","fromValue","toValue","duration","translateDown","easing","cubic","restackTranslation","property","start","restackingSlide","find","k","animationType","unstackingSlide","remainingKeys","filter","position","orderedKeys","sort","k1","k2","animatedFrontSlide","undefined","animatedRestackedSlide","includes","toString","unstacking","startRestacking","stackedSlides","map","slideIndex","index","slide","num","length","push","animatedStyle"],"sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Animated, Easing, StyleSheet, useWindowDimensions} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Slide from '../review-slide/index.native';\nimport type {ReviewStackProps} from './prop-types';\n\nconst style = StyleSheet.create({\n slides: {\n flex: 1,\n height: '100%',\n width: '100%'\n }\n});\n\n/*\n - slides are ordered to be played from left to right: [0,1,2,3]\n - slides are piled on the view, so we need to reverse the order:\n -> it's like our eye is looking from the right [3,2,1,0] <-- oO\n*/\nconst StackedSlides = (props: ReviewStackProps) => {\n const {height: windowHeight} = useWindowDimensions();\n const {endReview, slides, validateButton, correctionPopinProps} = props;\n const [unstacked, setUnstacked] = useState<string[]>([]);\n const [restacking, setRestacking] = useState<string | null>(null);\n const [restackingDone, setRestackingDone] = useState<boolean>(false);\n\n const hideSlides = useTranslateY({\n fromValue: 0,\n toValue: windowHeight,\n duration: 800\n });\n\n const translateDown = useTranslateY({\n fromValue: 0,\n toValue: windowHeight - 100,\n duration: 500,\n easing: Easing.cubic\n });\n\n const restackTranslation = useAnimateProp({\n property: 'opacity',\n toValue: 1,\n fromValue: 0,\n duration: 700\n });\n\n useEffect(() => {\n if (endReview) {\n hideSlides.start();\n }\n }, [endReview, hideSlides]);\n\n const restackingSlide = keys(slides).find(k => slides[k].animationType === 'restack');\n const unstackingSlide = keys(slides).find(k => slides[k].animationType === 'unstack');\n\n const remainingKeys = keys(slides).filter(\n k => slides[k].position >= 0 && !slides[k].animationType\n );\n\n const orderedKeys = remainingKeys.sort((k1, k2) =>\n slides[k2].position > slides[k1].position ? 1 : -1\n );\n\n const animatedFrontSlide =\n unstackingSlide || (restackingSlide && restacking === null ? restackingSlide : undefined);\n\n const animatedRestackedSlide = restacking !== null;\n\n useEffect(() => {\n if (restacking !== null && orderedKeys.includes(restacking)) {\n setRestacking(null);\n setRestackingDone(false);\n }\n // this effect is required only when the list orderedKeys changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [orderedKeys.toString()]);\n\n useEffect(() => {\n const unstacking = unstackingSlide && !unstacked.includes(unstackingSlide);\n\n if (unstacking) {\n translateDown.start(() => {\n setUnstacked([...unstacked, unstackingSlide]);\n });\n }\n }, [unstackingSlide, unstacked, setUnstacked, translateDown]);\n\n useEffect(() => {\n const startRestacking = !restackingDone && restackingSlide && restacking !== restackingSlide;\n\n if (startRestacking) {\n translateDown.start(() => {\n setRestacking(restackingSlide);\n restackTranslation.start(() => {\n setRestackingDone(true);\n });\n });\n }\n // this effect is required only to trigger the restack animation when a new restackingSlide is set\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [restackingSlide, restacking]);\n\n const stackedSlides = orderedKeys.map((slideIndex, index) => {\n const slide = slides[slideIndex];\n const num = orderedKeys.length - index;\n\n return (\n <Slide\n {...{\n num,\n slideIndex,\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n );\n });\n\n if (animatedFrontSlide) {\n stackedSlides.push(\n <Slide\n {...{\n num: 0,\n slideIndex: animatedFrontSlide,\n slide: slides[animatedFrontSlide],\n validateButton,\n correctionPopinProps\n }}\n animatedStyle={[translateDown.animatedStyle]}\n key={animatedFrontSlide}\n />\n );\n }\n\n return (\n <Animated.View style={[style.slides, hideSlides.animatedStyle]}>\n {animatedRestackedSlide ? (\n <Slide\n {...{\n num: orderedKeys.length + 1,\n slideIndex: restacking,\n slide: slides[restacking],\n validateButton,\n correctionPopinProps\n }}\n animatedStyle={[restackTranslation.animatedStyle]}\n key={restacking}\n />\n ) : null}\n {stackedSlides}\n </Animated.View>\n );\n};\n\nexport default StackedSlides;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,QAAR,EAAkBC,MAAlB,EAA0BC,UAA1B,EAAsCC,mBAAtC,QAAgE,cAAhE;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,cAAR,EAAwBC,aAAxB,QAA4C,sCAA5C;AACA,OAAOC,KAAP,MAAkB,8BAAlB;AAGA,MAAMC,KAAK,GAAGN,UAAU,CAACO,MAAX,CAAkB;EAC9BC,MAAM,EAAE;IACNC,IAAI,EAAE,CADA;IAENC,MAAM,EAAE,MAFF;IAGNC,KAAK,EAAE;EAHD;AADsB,CAAlB,CAAd;AAQA;AACA;AACA;AACA;AACA;;AACA,MAAMC,aAAa,GAAIC,KAAD,IAA6B;EACjD,MAAM;IAACH,MAAM,EAAEI;EAAT,IAAyBb,mBAAmB,EAAlD;EACA,MAAM;IAACc,SAAD;IAAYP,MAAZ;IAAoBQ,cAApB;IAAoCC;EAApC,IAA4DJ,KAAlE;EACA,MAAM,CAACK,SAAD,EAAYC,YAAZ,IAA4BtB,QAAQ,CAAW,EAAX,CAA1C;EACA,MAAM,CAACuB,UAAD,EAAaC,aAAb,IAA8BxB,QAAQ,CAAgB,IAAhB,CAA5C;EACA,MAAM,CAACyB,cAAD,EAAiBC,iBAAjB,IAAsC1B,QAAQ,CAAU,KAAV,CAApD;EAEA,MAAM2B,UAAU,G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|
50
50
|
} = props;
|
|
51
51
|
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
className: style.preferences
|
|
52
|
+
className: style.preferences,
|
|
53
|
+
role: "group"
|
|
53
54
|
}, _map(settings => /*#__PURE__*/React.createElement(Settings, _extends({}, settings, {
|
|
54
55
|
key: settings.label,
|
|
55
56
|
moreInfoAriaLabel: moreInfoAriaLabel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionCoorpacademyInformationIcon","InfoIcon","InputSwitch","style","Settings","props","label","description","moreInfoAriaLabel","settings","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","string","isRequired","UserPreferences","preferences","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, isEmpty} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyInformationIcon as InfoIcon} from '@coorpacademy/nova-icons';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const {label, description, moreInfoAriaLabel, ...settings} = props;\n return (\n <div className={style.settings}>\n <InputSwitch {...settings} />\n <span className={style.label}>{label}</span>\n {isEmpty(description) ? null : (\n <div className={style.infoIconWrapper}>\n <InfoIcon\n height={16}\n width={16}\n className={style.infoIcon}\n aria-label={moreInfoAriaLabel}\n />\n <div className={style.showToolTip}>\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n ...InputSwitch.propTypes,\n label: PropTypes.string.isRequired,\n description: PropTypes.string\n};\n\nconst UserPreferences = props => {\n const {preferences = [], moreInfoAriaLabel} = props;\n\n return (\n <div className={style.preferences}>\n {map(\n settings => (\n <Settings {...settings} key={settings.label} moreInfoAriaLabel={moreInfoAriaLabel} />\n ),\n preferences\n )}\n </div>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTypes.shape(Settings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":"index.js","names":["React","PropTypes","NovaCompositionCoorpacademyInformationIcon","InfoIcon","InputSwitch","style","Settings","props","label","description","moreInfoAriaLabel","settings","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","string","isRequired","UserPreferences","preferences","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, isEmpty} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyInformationIcon as InfoIcon} from '@coorpacademy/nova-icons';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const {label, description, moreInfoAriaLabel, ...settings} = props;\n return (\n <div className={style.settings}>\n <InputSwitch {...settings} />\n <span className={style.label}>{label}</span>\n {isEmpty(description) ? null : (\n <div className={style.infoIconWrapper}>\n <InfoIcon\n height={16}\n width={16}\n className={style.infoIcon}\n aria-label={moreInfoAriaLabel}\n />\n <div className={style.showToolTip}>\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n ...InputSwitch.propTypes,\n label: PropTypes.string.isRequired,\n description: PropTypes.string\n};\n\nconst UserPreferences = props => {\n const {preferences = [], moreInfoAriaLabel} = props;\n\n return (\n <div className={style.preferences} role=\"group\">\n {map(\n settings => (\n <Settings {...settings} key={settings.label} moreInfoAriaLabel={moreInfoAriaLabel} />\n ),\n preferences\n )}\n </div>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),\n moreInfoAriaLabel: PropTypes.string\n};\n\nexport default UserPreferences;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,0CAA0C,IAAIC,QAAtD,QAAqE,0BAArE;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QA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AAV,CAAgBhB,QAAQ,CAACU,SAAzB,CAAlB,CADa;EAE1BN,iBAAiB,EAAET,SAAS,CAACgB;AAFH,CAA5B;AAKA,eAAeE,eAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/player/index.native.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/player/index.native.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAmB/C,QAAA,MAAM,MAAM,UAAW,iBAAiB,uBAwBvC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { View, StyleSheet } from 'react-native';
|
|
|
3
3
|
import StackedSlides from '../../../organism/review-stacked-slides/index.native';
|
|
4
4
|
import ReviewCongrats from '../../../organism/review-congrats/index.native';
|
|
5
5
|
import ReviewHeader from '../../../organism/review-header/index.native';
|
|
6
|
+
import QuitPopinReview from '../../../molecule/cm-popin/index.native';
|
|
6
7
|
import { useTemplateContext } from '../template-context';
|
|
7
8
|
|
|
8
9
|
const createStyleSheet = theme => StyleSheet.create({
|
|
@@ -21,7 +22,8 @@ const Slides = props => {
|
|
|
21
22
|
const {
|
|
22
23
|
congrats,
|
|
23
24
|
header,
|
|
24
|
-
stack
|
|
25
|
+
stack,
|
|
26
|
+
quitPopin
|
|
25
27
|
} = props;
|
|
26
28
|
const {
|
|
27
29
|
theme
|
|
@@ -39,7 +41,7 @@ const Slides = props => {
|
|
|
39
41
|
|
|
40
42
|
return /*#__PURE__*/React.createElement(View, {
|
|
41
43
|
style: styleSheet.container
|
|
42
|
-
}, /*#__PURE__*/React.createElement(ReviewHeader, header), stack ? /*#__PURE__*/React.createElement(StackedSlides, stack) : null, congrats ? /*#__PURE__*/React.createElement(ReviewCongrats, congrats) : null);
|
|
44
|
+
}, /*#__PURE__*/React.createElement(ReviewHeader, header), stack ? /*#__PURE__*/React.createElement(StackedSlides, stack) : null, congrats ? /*#__PURE__*/React.createElement(ReviewCongrats, congrats) : null, quitPopin ? /*#__PURE__*/React.createElement(QuitPopinReview, quitPopin) : null);
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
export default Slides;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","View","StyleSheet","StackedSlides","ReviewCongrats","ReviewHeader","useTemplateContext","createStyleSheet","theme","create","container","flex","width","height","backgroundColor","colors","white","flexDirection","justifyContent","alignItems","Slides","props","congrats","header","stack","styleSheet","setStylesheet","_stylesheet"],"sources":["../../../../src/template/app-review/player/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {View, StyleSheet, ViewStyle} from 'react-native';\nimport StackedSlides from '../../../organism/review-stacked-slides/index.native';\nimport ReviewCongrats from '../../../organism/review-congrats/index.native';\nimport ReviewHeader from '../../../organism/review-header/index.native';\nimport {Theme} from '../../../variables/theme.native';\nimport {useTemplateContext} from '../template-context';\nimport {ReviewPlayerProps} from './prop-types';\n\ntype StyleSheetType = {\n container: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n flex: 1,\n width: '100%',\n height: '100%',\n backgroundColor: theme.colors.white,\n flexDirection: 'column',\n justifyContent: 'space-between',\n alignItems: 'center'\n }\n });\n\nconst Slides = (props: ReviewPlayerProps) => {\n const {congrats, header, stack} = props;\n\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.container}>\n <ReviewHeader {...header} />\n {stack ? <StackedSlides {...stack} /> : null}\n {congrats ? <ReviewCongrats {...congrats} /> : null}\n </View>\n );\n};\n\nexport default Slides;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,QAA0C,cAA1C;AACA,OAAOC,aAAP,MAA0B,sDAA1B;AACA,OAAOC,cAAP,MAA2B,gDAA3B;AACA,OAAOC,YAAP,MAAyB,8CAAzB;AAEA,SAAQC,kBAAR,QAAiC,qBAAjC;;AAOA,MAAMC,gBAAgB,GAAIC,KAAD,
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","View","StyleSheet","StackedSlides","ReviewCongrats","ReviewHeader","QuitPopinReview","useTemplateContext","createStyleSheet","theme","create","container","flex","width","height","backgroundColor","colors","white","flexDirection","justifyContent","alignItems","Slides","props","congrats","header","stack","quitPopin","styleSheet","setStylesheet","_stylesheet"],"sources":["../../../../src/template/app-review/player/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {View, StyleSheet, ViewStyle} from 'react-native';\nimport StackedSlides from '../../../organism/review-stacked-slides/index.native';\nimport ReviewCongrats from '../../../organism/review-congrats/index.native';\nimport ReviewHeader from '../../../organism/review-header/index.native';\nimport QuitPopinReview from '../../../molecule/cm-popin/index.native';\nimport {Theme} from '../../../variables/theme.native';\nimport {useTemplateContext} from '../template-context';\nimport {ReviewPlayerProps} from './prop-types';\n\ntype StyleSheetType = {\n container: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n flex: 1,\n width: '100%',\n height: '100%',\n backgroundColor: theme.colors.white,\n flexDirection: 'column',\n justifyContent: 'space-between',\n alignItems: 'center'\n }\n });\n\nconst Slides = (props: ReviewPlayerProps) => {\n const {congrats, header, stack, quitPopin} = props;\n\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.container}>\n <ReviewHeader {...header} />\n {stack ? <StackedSlides {...stack} /> : null}\n {congrats ? <ReviewCongrats {...congrats} /> : null}\n {quitPopin ? <QuitPopinReview {...quitPopin} /> : null}\n </View>\n );\n};\n\nexport default Slides;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,QAA0C,cAA1C;AACA,OAAOC,aAAP,MAA0B,sDAA1B;AACA,OAAOC,cAAP,MAA2B,gDAA3B;AACA,OAAOC,YAAP,MAAyB,8CAAzB;AACA,OAAOC,eAAP,MAA4B,yCAA5B;AAEA,SAAQC,kBAAR,QAAiC,qBAAjC;;AAOA,MAAMC,gBAAgB,GAAIC,KAAD,IACvBP,UAAU,CAACQ,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,IAAI,EAAE,CADG;IAETC,KAAK,EAAE,MAFE;IAGTC,MAAM,EAAE,MAHC;IAITC,eAAe,EAAEN,KAAK,CAACO,MAAN,CAAaC,KAJrB;IAKTC,aAAa,EAAE,QALN;IAMTC,cAAc,EAAE,eANP;IAOTC,UAAU,EAAE;EAPH;AADK,CAAlB,CADF;;AAaA,MAAMC,MAAM,GAAIC,KAAD,IAA8B;EAC3C,MAAM;IAACC,QAAD;IAAWC,MAAX;IAAmBC,KAAnB;IAA0BC;EAA1B,IAAuCJ,KAA7C;EAEA,MAAM;IAACb;EAAD,IAAUF,kBAAkB,EAAlC;EAEA,MAAM,CAACoB,UAAD,EAAaC,aAAb,IAA8B5B,QAAQ,CAAwB,IAAxB,CAA5C;EAEAD,SAAS,CAAC,MAAM;IACd,MAAM8B,WAAW,GAAGrB,gBAAgB,CAACC,KAAD,CAApC;;IACAmB,aAAa,CAACC,WAAD,CAAb;EACD,CAHQ,EAGN,CAACpB,KAAD,CAHM,CAAT;;EAKA,IAAI,CAACkB,UAAL,EAAiB;IACf,OAAO,IAAP;EACD;;EAED,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAEA,UAAU,CAAChB;EAAxB,gBACE,oBAAC,YAAD,EAAkBa,MAAlB,CADF,EAEGC,KAAK,gBAAG,oBAAC,aAAD,EAAmBA,KAAnB,CAAH,GAAkC,IAF1C,EAGGF,QAAQ,gBAAG,oBAAC,cAAD,EAAoBA,QAApB,CAAH,GAAsC,IAHjD,EAIGG,SAAS,gBAAG,oBAAC,eAAD,EAAqBA,SAArB,CAAH,GAAwC,IAJpD,CADF;AAQD,CAxBD;;AA0BA,eAAeL,MAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/skills/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/skills/index.js"],"names":[],"mappings":";AAQA,uDAkCC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import isEmpty from 'lodash/fp/isEmpty';
|
|
3
|
-
import { NovaCompositionCoorpacademyInformationIcon as InformationIcon } from '@coorpacademy/nova-icons';
|
|
4
3
|
import Loader from '../../../atom/loader';
|
|
5
4
|
import ReviewListSkills from '../../../organism/review-skills';
|
|
6
5
|
import ReviewNoSkills from '../../../organism/review-no-skills';
|
|
@@ -23,11 +22,7 @@ const ReviewSkills = props => {
|
|
|
23
22
|
"aria-label": ariaLabel
|
|
24
23
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25
24
|
className: style.title
|
|
26
|
-
}, title, /*#__PURE__*/React.createElement(
|
|
27
|
-
className: style.informationIcon,
|
|
28
|
-
width: 12,
|
|
29
|
-
height: 12
|
|
30
|
-
})), isLoading ? /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
}, title), isLoading ? /*#__PURE__*/React.createElement("div", {
|
|
31
26
|
className: style.loaderContainer
|
|
32
27
|
}, /*#__PURE__*/React.createElement(Loader, {
|
|
33
28
|
className: style.loader,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","isEmpty","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","isEmpty","Loader","ReviewListSkills","ReviewNoSkills","style","propTypes","ReviewSkills","props","ariaLabel","title","listSkills","titleNoSkills","textNoSkills","iconSkillAriaLabel","isLoading","isLoadingAriaLabel","containerReviewSkill","loaderContainer","loader"],"sources":["../../../../src/template/app-review/skills/index.js"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport Loader from '../../../atom/loader';\nimport ReviewListSkills from '../../../organism/review-skills';\nimport ReviewNoSkills from '../../../organism/review-no-skills';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ReviewSkills = props => {\n const {\n 'aria-label': ariaLabel,\n title,\n listSkills,\n titleNoSkills,\n textNoSkills,\n iconSkillAriaLabel,\n isLoading = false,\n isLoadingAriaLabel\n } = props;\n\n return (\n <div className={style.containerReviewSkill} aria-label={ariaLabel}>\n <div className={style.title}>{title}</div>\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"default\" aria-label={isLoadingAriaLabel} />\n </div>\n ) : (\n <div>\n {!isEmpty(listSkills) ? (\n <ReviewListSkills listSkills={listSkills} />\n ) : (\n <ReviewNoSkills\n titleNoSkills={titleNoSkills}\n textNoSkills={textNoSkills}\n iconSkillAriaLabel={iconSkillAriaLabel}\n />\n )}\n </div>\n )}\n </div>\n );\n};\n\nReviewSkills.propTypes = propTypes;\n\nexport default ReviewSkills;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,gBAAP,MAA6B,iCAA7B;AACA,OAAOC,cAAP,MAA2B,oCAA3B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;;AAEA,MAAMC,YAAY,GAAGC,KAAK,IAAI;EAC5B,MAAM;IACJ,cAAcC,SADV;IAEJC,KAFI;IAGJC,UAHI;IAIJC,aAJI;IAKJC,YALI;IAMJC,kBANI;IAOJC,SAAS,GAAG,KAPR;IAQJC;EARI,IASFR,KATJ;EAWA,oBACE;IAAK,SAAS,EAAEH,KAAK,CAACY,oBAAtB;IAA4C,cAAYR;EAAxD,gBACE;IAAK,SAAS,EAAEJ,KAAK,CAACK;EAAtB,GAA8BA,KAA9B,CADF,EAEGK,SAAS,gBACR;IAAK,SAAS,EAAEV,KAAK,CAACa;EAAtB,gBACE,oBAAC,MAAD;IAAQ,SAAS,EAAEb,KAAK,CAACc,MAAzB;IAAiC,KAAK,EAAC,SAAvC;IAAiD,cAAYH;EAA7D,EADF,CADQ,gBAKR,iCACG,CAACf,OAAO,CAACU,UAAD,CAAR,gBACC,oBAAC,gBAAD;IAAkB,UAAU,EAAEA;EAA9B,EADD,gBAGC,oBAAC,cAAD;IACE,aAAa,EAAEC,aADjB;IAEE,YAAY,EAAEC,YAFhB;IAGE,kBAAkB,EAAEC;EAHtB,EAJJ,CAPJ,CADF;AAsBD,CAlCD;;AAoCAP,YAAY,CAACD,SAAb,2CAAyBA,SAAzB;AAEA,eAAeC,YAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,mEAkDC"}
|
|
@@ -49,7 +49,8 @@ const SearchPage = (props, context) => {
|
|
|
49
49
|
"data-name": "searchResult",
|
|
50
50
|
className: style.cardsWrapper
|
|
51
51
|
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
className: style.title
|
|
52
|
+
className: style.title,
|
|
53
|
+
role: "status"
|
|
53
54
|
}, title), cardsView));
|
|
54
55
|
};
|
|
55
56
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","childContextTypes","propTypes","string","shape"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","childContextTypes","propTypes","string","shape"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title} role=\"status\">\n {title}\n </div>\n {cardsView}\n </div>\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string\n};\n\nex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AAEX,KAAK,CAACqB;EAA/C,gBACE;IAAK,SAAS,EAAErB,KAAK,CAACI,KAAtB;IAA6B,IAAI,EAAC;EAAlC,GACGA,KADH,CADF,EAIGW,SAJH,CANF,CADF;AAeD,CAlDD;;AAoDAd,UAAU,CAACqB,YAAX,GAA0B;EACxBV,IAAI,EAAEjB,QAAQ,CAAC4B,iBAAT,CAA2BX;AADT,CAA1B;AAIAX,UAAU,CAACuB,SAAX,2CAAuB;EACrBjB,cAAc,EAAEb,SAAS,CAAC+B,MADL;EAErBrB,KAAK,EAAEV,SAAS,CAAC+B,MAFI;EAGrBpB,aAAa,EAAEX,SAAS,CAACgC,KAAV,CAAgB7B,OAAO,CAAC2B,SAAxB,CAHM;EAIrBlB,KAAK,EAAEZ,SAAS,CAACgC,KAAV,CAAgB5B,SAAS,CAAC0B,SAA1B,CAJc;EAKrBhB,YAAY,EAAEd,SAAS,CAACgC,KAAV,CAAgB9B,MAAM,CAAC4B,SAAvB,CALO;EAMrBf,eAAe,EAAEf,SAAS,CAACgC,KAAV,CAAgB3B,SAAS,CAACyB,SAA1B,CANI;EAOrBd,iBAAiB,EAAEhB,SAAS,CAAC+B,MAPR;EAQrBd,mBAAmB,EAAEjB,SAAS,CAAC+B;AARV,CAAvB;AAWA,eAAexB,UAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/index.js"],"names":[],"mappings":"AAWO,iMAmCN;;AAED,wDAwGC"}
|
|
@@ -11,6 +11,8 @@ var _lottieWeb = _interopRequireDefault(require("lottie-web"));
|
|
|
11
11
|
|
|
12
12
|
var _includes = _interopRequireDefault(require("lodash/fp/includes"));
|
|
13
13
|
|
|
14
|
+
var _isNil = _interopRequireDefault(require("lodash/fp/isNil"));
|
|
15
|
+
|
|
14
16
|
var _keys = _interopRequireDefault(require("lodash/fp/keys"));
|
|
15
17
|
|
|
16
18
|
var _omit = _interopRequireDefault(require("lodash/fp/omit"));
|
|
@@ -76,19 +78,18 @@ const LottieWrapper = props => {
|
|
|
76
78
|
className: animationClassName,
|
|
77
79
|
hideOnTransparent = true
|
|
78
80
|
} = rendererSettings;
|
|
79
|
-
const containerRef = (0, _react.useRef)(null);
|
|
81
|
+
const containerRef = (0, _react.useRef)(null);
|
|
82
|
+
const isCancelledRef = (0, _react.useRef)(null); // lottie's animation instance
|
|
80
83
|
|
|
81
84
|
const [animationItem, setAnimationItem] = (0, _react.useState)(null);
|
|
82
85
|
const [isAnimationVisible, setIsAnimationVisible] = (0, _react.useState)(autoplay);
|
|
83
86
|
const wrapperClassName = (0, _react.useMemo)(() => (0, _classnames.default)(className, _style.default.lottieContainer), [className]);
|
|
84
87
|
const lottieAnimationClassName = (0, _react.useMemo)(() => (0, _classnames.default)(animationClassName, _style.default.animation), [animationClassName]);
|
|
85
88
|
(0, _react.useEffect)(() => {
|
|
86
|
-
|
|
87
|
-
// to remove when the migration towards @testing-library/react is done
|
|
88
|
-
|
|
89
|
-
/* istanbul ignore next */
|
|
90
|
-
if (containerRef.current && (0, _includes.default)(animationControl, (0, _keys.default)((0, _omit.default)('loading', _propTypes.ANIMATION_CONTROL))) && !autoplay) {
|
|
89
|
+
if ((0, _includes.default)(animationControl, (0, _keys.default)((0, _omit.default)('loading', _propTypes.ANIMATION_CONTROL))) && !autoplay) {
|
|
91
90
|
setIsAnimationVisible(true);
|
|
91
|
+
/* istanbul ignore next */
|
|
92
|
+
|
|
92
93
|
if (animationItem) animationItem[animationControl]();
|
|
93
94
|
if (animationControl === _propTypes.ANIMATION_CONTROL.stop) setIsAnimationVisible(false);
|
|
94
95
|
}
|
|
@@ -96,23 +97,19 @@ const LottieWrapper = props => {
|
|
|
96
97
|
(0, _react.useEffect)(() => {
|
|
97
98
|
const loadAnimation = async () => {
|
|
98
99
|
/* istanbul ignore else */
|
|
99
|
-
if (!animationItem) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const animation = await fetchAndLoadAnimation(_lottieWeb.default, _isomorphicUnfetch.default, animationSrc, containerRef, loop, lottieAnimationClassName, hideOnTransparent, autoplay);
|
|
106
|
-
containerRef.current && setAnimationItem(animation);
|
|
100
|
+
if (!animationItem && typeof window !== 'undefined') {
|
|
101
|
+
window.lottie = _lottieWeb.default;
|
|
102
|
+
const animation = await fetchAndLoadAnimation(window.lottie, _isomorphicUnfetch.default, animationSrc, containerRef, loop, lottieAnimationClassName, hideOnTransparent, autoplay);
|
|
103
|
+
(0, _isNil.default)(isCancelledRef.current) && setAnimationItem(animation);
|
|
107
104
|
}
|
|
108
105
|
};
|
|
109
106
|
|
|
110
107
|
loadAnimation();
|
|
111
108
|
return () => {
|
|
112
|
-
|
|
109
|
+
isCancelledRef.current = true;
|
|
113
110
|
return animationItem &&
|
|
114
111
|
/* istanbul ignore next */
|
|
115
|
-
|
|
112
|
+
window.lottie.destroy(animationItem.name);
|
|
116
113
|
};
|
|
117
114
|
}, [lottieAnimationClassName, containerRef, hideOnTransparent, loop, animationSrc, animationItem, autoplay]);
|
|
118
115
|
const accessibilityProps = ariaLabel ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["fetchAndLoadAnimation","_lottie","_fetch","animationSrc","containerRef","loop","animationClassnames","hideOnTransparent","autoplay","animationUrl","URL","toString","fetchResult","headers","animationData","json","animation","loadAnimation","container","current","renderer","rendererSettings","className","preserveAspectRatio","LottieWrapper","props","dataName","ariaLabel","width","height","animationControl","animationClassName","useRef","animationItem","setAnimationItem","useState","isAnimationVisible","setIsAnimationVisible","wrapperClassName","useMemo","classnames","style","lottieContainer","lottieAnimationClassName","useEffect","includes","keys","omit","ANIMATION_CONTROL","stop","window","lottie","unfetch","destroy","name","accessibilityProps","role","maxWidth","maxHeight","opacity","transition","propTypes"],"sources":["../../../src/atom/lottie-wrapper/index.js"],"sourcesContent":["import React, {useMemo, useRef, useEffect, useState} from 'react';\nimport classnames from 'classnames';\nimport lottie from 'lottie-web';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport omit from 'lodash/fp/omit';\nimport unfetch from 'isomorphic-unfetch';\nimport style from './style.css';\nimport propTypes, {ANIMATION_CONTROL} from './prop-types';\n\nexport const fetchAndLoadAnimation = async (\n _lottie,\n _fetch,\n animationSrc,\n containerRef,\n loop,\n animationClassnames,\n hideOnTransparent,\n autoplay\n) => {\n const animationUrl = new URL(animationSrc).toString();\n const fetchResult = await _fetch(animationUrl, {\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n 'Content-Type': 'application/json'\n }\n });\n\n const animationData = await fetchResult.json();\n\n const animation =\n _lottie.loadAnimation &&\n _lottie.loadAnimation({\n container: containerRef.current, // the dom element that will contain the animation\n renderer: 'svg',\n autoplay,\n loop,\n animationData,\n rendererSettings: {\n className: animationClassnames,\n hideOnTransparent,\n preserveAspectRatio: 'xMidYMid meet' // same options as a preserveAspectRatio prop\n }\n });\n return animation;\n};\n\nconst LottieWrapper = props => {\n const {\n className,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n animationSrc,\n loop = false,\n rendererSettings = {},\n width,\n height,\n autoplay = true,\n animationControl\n } = props;\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["fetchAndLoadAnimation","_lottie","_fetch","animationSrc","containerRef","loop","animationClassnames","hideOnTransparent","autoplay","animationUrl","URL","toString","fetchResult","headers","animationData","json","animation","loadAnimation","container","current","renderer","rendererSettings","className","preserveAspectRatio","LottieWrapper","props","dataName","ariaLabel","width","height","animationControl","animationClassName","useRef","isCancelledRef","animationItem","setAnimationItem","useState","isAnimationVisible","setIsAnimationVisible","wrapperClassName","useMemo","classnames","style","lottieContainer","lottieAnimationClassName","useEffect","includes","keys","omit","ANIMATION_CONTROL","stop","window","lottie","unfetch","isNil","destroy","name","accessibilityProps","role","maxWidth","maxHeight","opacity","transition","propTypes"],"sources":["../../../src/atom/lottie-wrapper/index.js"],"sourcesContent":["import React, {useMemo, useRef, useEffect, useState} from 'react';\nimport classnames from 'classnames';\nimport lottie from 'lottie-web';\nimport includes from 'lodash/fp/includes';\nimport isNil from 'lodash/fp/isNil';\nimport keys from 'lodash/fp/keys';\nimport omit from 'lodash/fp/omit';\nimport unfetch from 'isomorphic-unfetch';\nimport style from './style.css';\nimport propTypes, {ANIMATION_CONTROL} from './prop-types';\n\nexport const fetchAndLoadAnimation = async (\n _lottie,\n _fetch,\n animationSrc,\n containerRef,\n loop,\n animationClassnames,\n hideOnTransparent,\n autoplay\n) => {\n const animationUrl = new URL(animationSrc).toString();\n const fetchResult = await _fetch(animationUrl, {\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n 'Content-Type': 'application/json'\n }\n });\n\n const animationData = await fetchResult.json();\n\n const animation =\n _lottie.loadAnimation &&\n _lottie.loadAnimation({\n container: containerRef.current, // the dom element that will contain the animation\n renderer: 'svg',\n autoplay,\n loop,\n animationData,\n rendererSettings: {\n className: animationClassnames,\n hideOnTransparent,\n preserveAspectRatio: 'xMidYMid meet' // same options as a preserveAspectRatio prop\n }\n });\n return animation;\n};\n\nconst LottieWrapper = props => {\n const {\n className,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n animationSrc,\n loop = false,\n rendererSettings = {},\n width,\n height,\n autoplay = true,\n animationControl\n } = props;\n const {className: animationClassName, hideOnTransparent = true} = rendererSettings;\n\n const containerRef = useRef(null);\n const isCancelledRef = useRef(null);\n\n // lottie's animation instance\n const [animationItem, setAnimationItem] = useState(null);\n\n const [isAnimationVisible, setIsAnimationVisible] = useState(autoplay);\n\n const wrapperClassName = useMemo(() => classnames(className, style.lottieContainer), [className]);\n\n const lottieAnimationClassName = useMemo(\n () => classnames(animationClassName, style.animation),\n [animationClassName]\n );\n\n useEffect(() => {\n if (includes(animationControl, keys(omit('loading', ANIMATION_CONTROL))) && !autoplay) {\n setIsAnimationVisible(true);\n /* istanbul ignore next */\n if (animationItem) animationItem[animationControl]();\n if (animationControl === ANIMATION_CONTROL.stop) setIsAnimationVisible(false);\n }\n }, [animationControl, animationItem, autoplay]);\n\n useEffect(() => {\n const loadAnimation = async () => {\n /* istanbul ignore else */\n if (!animationItem && typeof window !== 'undefined') {\n window.lottie = lottie;\n const animation = await fetchAndLoadAnimation(\n window.lottie,\n unfetch,\n animationSrc,\n containerRef,\n loop,\n lottieAnimationClassName,\n hideOnTransparent,\n autoplay\n );\n\n isNil(isCancelledRef.current) && setAnimationItem(animation);\n }\n };\n\n loadAnimation();\n return () => {\n isCancelledRef.current = true;\n return animationItem && /* istanbul ignore next */ window.lottie.destroy(animationItem.name);\n };\n }, [\n lottieAnimationClassName,\n containerRef,\n hideOnTransparent,\n loop,\n animationSrc,\n animationItem,\n autoplay\n ]);\n\n const accessibilityProps = ariaLabel\n ? {\n 'aria-label': ariaLabel,\n role: 'img'\n }\n : {\n 'aria-hidden': 'true',\n role: 'presentation'\n };\n\n return (\n <div\n {...accessibilityProps}\n ref={containerRef}\n data-name={dataName}\n className={wrapperClassName}\n style={{\n ...(width && {\n width: `${width}px`,\n maxWidth: `${width}px`\n }),\n ...(height && {\n height: `${height}px`,\n maxHeight: `${height}px`\n }),\n opacity: isAnimationVisible ? 1 : 0,\n transition: 'opacity 0.25s ease-in'\n }}\n />\n );\n};\n\nLottieWrapper.propTypes = propTypes;\n\nexport default LottieWrapper;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,qBAAqB,GAAG,OACnCC,OADmC,EAEnCC,MAFmC,EAGnCC,YAHmC,EAInCC,YAJmC,EAKnCC,IALmC,EAMnCC,mBANmC,EAOnCC,iBAPmC,EAQnCC,QARmC,KAShC;EACH,MAAMC,YAAY,GAAG,IAAIC,GAAJ,CAAQP,YAAR,EAAsBQ,QAAtB,EAAr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cAAc,CAACd,OAAf,GAAyB,IAAzB;MACA,OAAOe,aAAa;MAAI;MAA2BiB,MAAM,CAACC,MAAP,CAAcG,OAAd,CAAsBrB,aAAa,CAACsB,IAApC,CAAnD;IACD,CAHD;EAID,CAzBD,EAyBG,CACDZ,wBADC,EAEDxC,YAFC,EAGDG,iBAHC,EAIDF,IAJC,EAKDF,YALC,EAMD+B,aANC,EAOD1B,QAPC,CAzBH;EAmCA,MAAMiD,kBAAkB,GAAG9B,SAAS,GAChC;IACE,cAAcA,SADhB;IAEE+B,IAAI,EAAE;EAFR,CADgC,GAKhC;IACE,eAAe,MADjB;IAEEA,IAAI,EAAE;EAFR,CALJ;EAUA,oBACE,iDACMD,kBADN;IAEE,GAAG,EAAErD,YAFP;IAGE,aAAWsB,QAHb;IAIE,SAAS,EAAEa,gBAJb;IAKE,KAAK,eACCX,KAAK,IAAI;MACXA,KAAK,EAAG,GAAEA,KAAM,IADL;MAEX+B,QAAQ,EAAG,GAAE/B,KAAM;IAFR,CADV,EAKCC,MAAM,IAAI;MACZA,MAAM,EAAG,GAAEA,MAAO,IADN;MAEZ+B,SAAS,EAAG,GAAE/B,MAAO;IAFT,CALX;MASHgC,OAAO,EAAExB,kBAAkB,GAAG,CAAH,GAAO,CAT/B;MAUHyB,UAAU,EAAE;IAVT;EALP,GADF;AAoBD,CAxGD;;AA0GAtC,aAAa,CAACuC,SAAd,2CAA0BA,kBAA1B;eAEevC,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-background/index.js"],"names":[],"mappings":";AAIA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-background/index.js"],"names":[],"mappings":";AAIA,2DAmBC"}
|
|
@@ -17,23 +17,32 @@ const ReviewBackground = props => {
|
|
|
17
17
|
} = props;
|
|
18
18
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
19
|
className: _style.default.mainContainer,
|
|
20
|
-
"aria-label": ariaLabel
|
|
20
|
+
"aria-label": ariaLabel,
|
|
21
|
+
tabIndex: -1
|
|
21
22
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
-
className: _style.default.container
|
|
23
|
+
className: _style.default.container,
|
|
24
|
+
tabIndex: -1
|
|
23
25
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
24
|
-
className: _style.default.interrogationLeft
|
|
26
|
+
className: _style.default.interrogationLeft,
|
|
27
|
+
tabIndex: -1
|
|
25
28
|
}, "?"), /*#__PURE__*/_react.default.createElement("span", {
|
|
26
|
-
className: _style.default.interrogationRight
|
|
29
|
+
className: _style.default.interrogationRight,
|
|
30
|
+
tabIndex: -1
|
|
27
31
|
}, "?"), /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
-
className: _style.default.recYellow
|
|
32
|
+
className: _style.default.recYellow,
|
|
33
|
+
tabIndex: -1
|
|
29
34
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
-
className: _style.default.recRed
|
|
35
|
+
className: _style.default.recRed,
|
|
36
|
+
tabIndex: -1
|
|
31
37
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
-
className: _style.default.recBlue
|
|
38
|
+
className: _style.default.recBlue,
|
|
39
|
+
tabIndex: -1
|
|
33
40
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
-
className: _style.default.recGreen
|
|
41
|
+
className: _style.default.recGreen,
|
|
42
|
+
tabIndex: -1
|
|
35
43
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
36
|
-
className: _style.default.recGreenLight
|
|
44
|
+
className: _style.default.recGreenLight,
|
|
45
|
+
tabIndex: -1
|
|
37
46
|
})));
|
|
38
47
|
};
|
|
39
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReviewBackground","props","ariaLabel","style","mainContainer","container","interrogationLeft","interrogationRight","recYellow","recRed","recBlue","recGreen","recGreenLight","propTypes"],"sources":["../../../src/atom/review-background/index.js"],"sourcesContent":["import React from 'react';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ReviewBackground = props => {\n const {'aria-label': ariaLabel} = props;\n return (\n <div className={style.mainContainer} aria-label={ariaLabel}>\n <div className={style.container}>\n <span className={style.interrogationLeft}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReviewBackground","props","ariaLabel","style","mainContainer","container","interrogationLeft","interrogationRight","recYellow","recRed","recBlue","recGreen","recGreenLight","propTypes"],"sources":["../../../src/atom/review-background/index.js"],"sourcesContent":["import React from 'react';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ReviewBackground = props => {\n const {'aria-label': ariaLabel} = props;\n return (\n <div className={style.mainContainer} aria-label={ariaLabel} tabIndex={-1}>\n <div className={style.container} tabIndex={-1}>\n <span className={style.interrogationLeft} tabIndex={-1}>\n ?\n </span>\n <span className={style.interrogationRight} tabIndex={-1}>\n ?\n </span>\n <div className={style.recYellow} tabIndex={-1} />\n <div className={style.recRed} tabIndex={-1} />\n <div className={style.recBlue} tabIndex={-1} />\n <div className={style.recGreen} tabIndex={-1} />\n <div className={style.recGreenLight} tabIndex={-1} />\n </div>\n </div>\n );\n};\n\nReviewBackground.propTypes = propTypes;\n\nexport default ReviewBackground;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;AAEA,MAAMA,gBAAgB,GAAGC,KAAK,IAAI;EAChC,MAAM;IAAC,cAAcC;EAAf,IAA4BD,KAAlC;EACA,oBACE;IAAK,SAAS,EAAEE,cAAA,CAAMC,aAAtB;IAAqC,cAAYF,SAAjD;IAA4D,QAAQ,EAAE,CAAC;EAAvE,gBACE;IAAK,SAAS,EAAEC,cAAA,CAAME,SAAtB;IAAiC,QAAQ,EAAE,CAAC;EAA5C,gBACE;IAAM,SAAS,EAAEF,cAAA,CAAMG,iBAAvB;IAA0C,QAAQ,EAAE,CAAC;EAArD,OADF,eAIE;IAAM,SAAS,EAAEH,cAAA,CAAMI,kBAAvB;IAA2C,QAAQ,EAAE,CAAC;EAAtD,OAJF,eAOE;IAAK,SAAS,EAAEJ,cAAA,CAAMK,SAAtB;IAAiC,QAAQ,EAAE,CAAC;EAA5C,EAPF,eAQE;IAAK,SAAS,EAAEL,cAAA,CAAMM,MAAtB;IAA8B,QAAQ,EAAE,CAAC;EAAzC,EARF,eASE;IAAK,SAAS,EAAEN,cAAA,CAAMO,OAAtB;IAA+B,QAAQ,EAAE,CAAC;EAA1C,EATF,eAUE;IAAK,SAAS,EAAEP,cAAA,CAAMQ,QAAtB;IAAgC,QAAQ,EAAE,CAAC;EAA3C,EAVF,eAWE;IAAK,SAAS,EAAER,cAAA,CAAMS,aAAtB;IAAqC,QAAQ,EAAE,CAAC;EAAhD,EAXF,CADF,CADF;AAiBD,CAnBD;;AAqBAZ,gBAAgB,CAACa,SAAjB,2CAA6BA,kBAA7B;eAEeb,gB"}
|
|
@@ -64,7 +64,9 @@ const AddToMyListFeedback = ({
|
|
|
64
64
|
className: _style.default.checkIcon,
|
|
65
65
|
width: 13,
|
|
66
66
|
height: 13
|
|
67
|
-
}), /*#__PURE__*/_react.default.createElement("p",
|
|
67
|
+
}), /*#__PURE__*/_react.default.createElement("p", {
|
|
68
|
+
role: "status"
|
|
69
|
+
}, favorite ? addToMyListText : removeFromMyListText));
|
|
68
70
|
};
|
|
69
71
|
|
|
70
72
|
exports.AddToMyListFeedback = AddToMyListFeedback;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ADD_TO_MY_LIST_STATUS","IDLE","SUCCESS","StatusContext","React","createContext","AddToMyListStatusProvider","children","status","setStatus","useState","useEffect","timeoutId","DURATION","setTimeout","clearTimeout","statusValue","useMemo","AddToMyListFeedback","addToMyListText","removeFromMyListText","favorite","useContext","classnames","styles","feedback","checkIcon","AddToMyList","style","addToMyListButton","onFavoriteClick","cb","onClick","container","cta","wrapper","shareIcon","propTypes","PropTypes","node","string","bool","func"],"sources":["../../../src/molecule/add-to-my-list/index.js"],"sourcesContent":["import React, {useState, useContext, useEffect, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionNavigationMore as MoreIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport styles from './style.css';\n\nconst ADD_TO_MY_LIST_STATUS = {\n IDLE: 'IDLE',\n SUCCESS: 'SUCCESS'\n};\n\nconst StatusContext = React.createContext(ADD_TO_MY_LIST_STATUS.IDLE);\n\nexport const AddToMyListStatusProvider = ({children}) => {\n const [status, setStatus] = useState(ADD_TO_MY_LIST_STATUS.IDLE);\n useEffect(() => {\n let timeoutId;\n const DURATION = 3000;\n if (status !== ADD_TO_MY_LIST_STATUS.IDLE) {\n timeoutId = setTimeout(() => setStatus(ADD_TO_MY_LIST_STATUS.IDLE), DURATION);\n }\n return () => clearTimeout(timeoutId);\n }, [status]);\n const statusValue = useMemo(() => [status, setStatus], [status, setStatus]);\n return <StatusContext.Provider value={statusValue}>{children}</StatusContext.Provider>;\n};\n\nexport const AddToMyListFeedback = ({addToMyListText, removeFromMyListText, favorite}) => {\n const [status] = useContext(StatusContext);\n if (status === ADD_TO_MY_LIST_STATUS.IDLE) return null;\n\n return (\n <div className={classnames(styles.feedback)} data-name={'add-to-my-list-feedback'}>\n <CheckIcon className={styles.checkIcon} width={13} height={13} />\n <p>{favorite ? addToMyListText : removeFromMyListText}</p>\n </div>\n );\n};\n\nconst AddToMyList = ({style, addToMyListButton, favorite, onFavoriteClick}) => {\n const [, setStatus] = useContext(StatusContext);\n const cb = () => setStatus(ADD_TO_MY_LIST_STATUS.SUCCESS);\n\n function onClick() {\n onFavoriteClick(cb);\n }\n\n return (\n <div className={(styles.container, style)}>\n <Link data-name={'add-to-my-list-button'} onClick={onClick} className={styles.cta}>\n <div className={styles.wrapper}>\n {favorite ? (\n <CheckIcon className={styles.shareIcon} width={15} height={15} />\n ) : (\n <MoreIcon className={styles.shareIcon} width={12} height={12} />\n )}\n <p>{addToMyListButton}</p>\n </div>\n </Link>\n </div>\n );\n};\n\nAddToMyListStatusProvider.propTypes = {\n children: PropTypes.node\n};\n\nAddToMyListFeedback.propTypes = {\n addToMyListText: PropTypes.string,\n removeFromMyListText: PropTypes.string,\n favorite: PropTypes.bool\n};\n\nAddToMyList.propTypes = {\n style: PropTypes.string,\n addToMyListButton: PropTypes.string,\n favorite: PropTypes.bool,\n onFavoriteClick: PropTypes.func\n};\n\nexport default AddToMyList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;AACA;;;;;;;;AAEA,MAAMA,qBAAqB,GAAG;EAC5BC,IAAI,EAAE,MADsB;EAE5BC,OAAO,EAAE;AAFmB,CAA9B;;AAKA,MAAMC,aAAa,gBAAGC,cAAA,CAAMC,aAAN,CAAoBL,qBAAqB,CAACC,IAA1C,CAAtB;;AAEO,MAAMK,yBAAyB,GAAG,CAAC;EAACC;AAAD,CAAD,KAAgB;EACvD,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAASV,qBAAqB,CAACC,IAA/B,CAA5B;EACA,IAAAU,gBAAA,EAAU,MAAM;IACd,IAAIC,SAAJ;IACA,MAAMC,QAAQ,GAAG,IAAjB;;IACA,IAAIL,MAAM,KAAKR,qBAAqB,CAACC,IAArC,EAA2C;MACzCW,SAAS,GAAGE,UAAU,CAAC,MAAML,SAAS,CAACT,qBAAqB,CAACC,IAAvB,CAAhB,EAA8CY,QAA9C,CAAtB;IACD;;IACD,OAAO,MAAME,YAAY,CAACH,SAAD,CAAzB;EACD,CAPD,EAOG,CAACJ,MAAD,CAPH;EAQA,MAAMQ,WAAW,GAAG,IAAAC,cAAA,EAAQ,MAAM,CAACT,MAAD,EAASC,SAAT,CAAd,EAAmC,CAACD,MAAD,EAASC,SAAT,CAAnC,CAApB;EACA,oBAAO,6BAAC,aAAD,CAAe,QAAf;IAAwB,KAAK,EAAEO;EAA/B,GAA6CT,QAA7C,CAAP;AACD,CAZM;;;;AAcA,MAAMW,mBAAmB,GAAG,CAAC;EAACC,eAAD;EAAkBC,oBAAlB;EAAwCC;AAAxC,CAAD,KAAuD;EACxF,MAAM,CAACb,MAAD,IAAW,IAAAc,iBAAA,EAAWnB,aAAX,CAAjB;EACA,IAAIK,MAAM,KAAKR,qBAAqB,CAACC,IAArC,EAA2C,OAAO,IAAP;EAE3C,oBACE;IAAK,SAAS,EAAE,IAAAsB,mBAAA,EAAWC,cAAA,CAAOC,QAAlB,CAAhB;IAA6C,aAAW;EAAxD,gBACE,6BAAC,2CAAD;IAAW,SAAS,EAAED,cAAA,CAAOE,SAA7B;IAAwC,KAAK,EAAE,EAA/C;IAAmD,MAAM,EAAE;EAA3D,EADF,eAEE,
|
|
1
|
+
{"version":3,"file":"index.js","names":["ADD_TO_MY_LIST_STATUS","IDLE","SUCCESS","StatusContext","React","createContext","AddToMyListStatusProvider","children","status","setStatus","useState","useEffect","timeoutId","DURATION","setTimeout","clearTimeout","statusValue","useMemo","AddToMyListFeedback","addToMyListText","removeFromMyListText","favorite","useContext","classnames","styles","feedback","checkIcon","AddToMyList","style","addToMyListButton","onFavoriteClick","cb","onClick","container","cta","wrapper","shareIcon","propTypes","PropTypes","node","string","bool","func"],"sources":["../../../src/molecule/add-to-my-list/index.js"],"sourcesContent":["import React, {useState, useContext, useEffect, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionNavigationMore as MoreIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport styles from './style.css';\n\nconst ADD_TO_MY_LIST_STATUS = {\n IDLE: 'IDLE',\n SUCCESS: 'SUCCESS'\n};\n\nconst StatusContext = React.createContext(ADD_TO_MY_LIST_STATUS.IDLE);\n\nexport const AddToMyListStatusProvider = ({children}) => {\n const [status, setStatus] = useState(ADD_TO_MY_LIST_STATUS.IDLE);\n useEffect(() => {\n let timeoutId;\n const DURATION = 3000;\n if (status !== ADD_TO_MY_LIST_STATUS.IDLE) {\n timeoutId = setTimeout(() => setStatus(ADD_TO_MY_LIST_STATUS.IDLE), DURATION);\n }\n return () => clearTimeout(timeoutId);\n }, [status]);\n const statusValue = useMemo(() => [status, setStatus], [status, setStatus]);\n return <StatusContext.Provider value={statusValue}>{children}</StatusContext.Provider>;\n};\n\nexport const AddToMyListFeedback = ({addToMyListText, removeFromMyListText, favorite}) => {\n const [status] = useContext(StatusContext);\n if (status === ADD_TO_MY_LIST_STATUS.IDLE) return null;\n\n return (\n <div className={classnames(styles.feedback)} data-name={'add-to-my-list-feedback'}>\n <CheckIcon className={styles.checkIcon} width={13} height={13} />\n <p role=\"status\">{favorite ? addToMyListText : removeFromMyListText}</p>\n </div>\n );\n};\n\nconst AddToMyList = ({style, addToMyListButton, favorite, onFavoriteClick}) => {\n const [, setStatus] = useContext(StatusContext);\n const cb = () => setStatus(ADD_TO_MY_LIST_STATUS.SUCCESS);\n\n function onClick() {\n onFavoriteClick(cb);\n }\n\n return (\n <div className={(styles.container, style)}>\n <Link data-name={'add-to-my-list-button'} onClick={onClick} className={styles.cta}>\n <div className={styles.wrapper}>\n {favorite ? (\n <CheckIcon className={styles.shareIcon} width={15} height={15} />\n ) : (\n <MoreIcon className={styles.shareIcon} width={12} height={12} />\n )}\n <p>{addToMyListButton}</p>\n </div>\n </Link>\n </div>\n );\n};\n\nAddToMyListStatusProvider.propTypes = {\n children: PropTypes.node\n};\n\nAddToMyListFeedback.propTypes = {\n addToMyListText: PropTypes.string,\n removeFromMyListText: PropTypes.string,\n favorite: PropTypes.bool\n};\n\nAddToMyList.propTypes = {\n style: PropTypes.string,\n addToMyListButton: PropTypes.string,\n favorite: PropTypes.bool,\n onFavoriteClick: PropTypes.func\n};\n\nexport default AddToMyList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;AACA;;;;;;;;AAEA,MAAMA,qBAAqB,GAAG;EAC5B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,QAAQ,EAAEiB,kBAAA,CAAUG;AAHU,CAAhC;AAMAd,WAAW,CAACU,SAAZ,2CAAwB;EACtBT,KAAK,EAAEU,kBAAA,CAAUE,MADK;EAEtBX,iBAAiB,EAAES,kBAAA,CAAUE,MAFP;EAGtBnB,QAAQ,EAAEiB,kBAAA,CAAUG,IAHE;EAItBX,eAAe,EAAEQ,kBAAA,CAAUI;AAJL,CAAxB;eAOef,W"}
|
|
@@ -51,7 +51,9 @@ const Notification = props => {
|
|
|
51
51
|
stroke: null
|
|
52
52
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
53
53
|
className: _notification.default.message
|
|
54
|
-
}, /*#__PURE__*/_react.default.createElement("span",
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
55
|
+
role: "status"
|
|
56
|
+
}, message))));
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
Notification.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","names":["NOTIFICATION_ICON","addFavorite","CheckIcon","removeFavorite","MoreIcon","lock","LockIcon","unlock","UnlockIcon","handleOverlayClick","e","stopPropagation","preventDefault","Notification","props","message","icon","IconType","classnames","style","showOverlay","notificationWrapper","notification","propTypes","PropTypes","string","isRequired","oneOf"],"sources":["../../../src/molecule/card/notification.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, keys} from 'lodash/fp';\nimport {\n NovaCompositionNavigationMore as MoreIcon,\n NovaSolidLoginLocked as LockIcon,\n NovaSolidLocksLockUnlock1 as UnlockIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon\n} from '@coorpacademy/nova-icons';\nimport style from './notification.css';\n\nconst NOTIFICATION_ICON = {\n addFavorite: CheckIcon,\n removeFavorite: MoreIcon,\n lock: LockIcon,\n unlock: UnlockIcon\n};\n\nconst handleOverlayClick = e => {\n e.stopPropagation();\n e.preventDefault();\n return false;\n};\n\nconst Notification = props => {\n const {message, icon} = props;\n\n const IconType = get(icon, NOTIFICATION_ICON);\n return (\n <div\n data-name=\"notification\"\n data-type={icon}\n onClick={handleOverlayClick}\n className={classnames(style.showOverlay, style.notificationWrapper)}\n >\n <div className={style.notification}>\n <IconType className={style.icon} color={null} stroke={null} />\n <div className={style.message}>\n <span>{message}</span>\n </div>\n </div>\n </div>\n );\n};\nNotification.propTypes = {\n message: PropTypes.string.isRequired,\n icon: PropTypes.oneOf(keys(NOTIFICATION_ICON)).isRequired\n};\n\nexport default Notification;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAMA;;;;AAEA,MAAMA,iBAAiB,GAAG;EACxBC,WAAW,EAAEC,2CADW;EAExBC,cAAc,EAAEC,wCAFQ;EAGxBC,IAAI,EAAEC,+BAHkB;EAIxBC,MAAM,EAAEC;AAJgB,CAA1B;;AAOA,MAAMC,kBAAkB,GAAGC,CAAC,IAAI;EAC9BA,CAAC,CAACC,eAAF;EACAD,CAAC,CAACE,cAAF;EACA,OAAO,KAAP;AACD,CAJD;;AAMA,MAAMC,YAAY,GAAGC,KAAK,IAAI;EAC5B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAkBF,KAAxB;EAEA,MAAMG,QAAQ,GAAG,mBAAID,IAAJ,EAAUhB,iBAAV,CAAjB;EACA,oBACE;IACE,aAAU,cADZ;IAEE,aAAWgB,IAFb;IAGE,OAAO,EAAEP,kBAHX;IAIE,SAAS,EAAE,IAAAS,mBAAA,EAAWC,qBAAA,CAAMC,WAAjB,EAA8BD,qBAAA,CAAME,mBAApC;EAJb,gBAME;IAAK,SAAS,EAAEF,qBAAA,CAAMG;EAAtB,gBACE,6BAAC,QAAD;IAAU,SAAS,EAAEH,qBAAA,CAAMH,IAA3B;IAAiC,KAAK,EAAE,IAAxC;IAA8C,MAAM,EAAE;EAAtD,EADF,eAEE;IAAK,SAAS,EAAEG,qBAAA,CAAMJ;EAAtB,gBACE,
|
|
1
|
+
{"version":3,"file":"notification.js","names":["NOTIFICATION_ICON","addFavorite","CheckIcon","removeFavorite","MoreIcon","lock","LockIcon","unlock","UnlockIcon","handleOverlayClick","e","stopPropagation","preventDefault","Notification","props","message","icon","IconType","classnames","style","showOverlay","notificationWrapper","notification","propTypes","PropTypes","string","isRequired","oneOf"],"sources":["../../../src/molecule/card/notification.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, keys} from 'lodash/fp';\nimport {\n NovaCompositionNavigationMore as MoreIcon,\n NovaSolidLoginLocked as LockIcon,\n NovaSolidLocksLockUnlock1 as UnlockIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon\n} from '@coorpacademy/nova-icons';\nimport style from './notification.css';\n\nconst NOTIFICATION_ICON = {\n addFavorite: CheckIcon,\n removeFavorite: MoreIcon,\n lock: LockIcon,\n unlock: UnlockIcon\n};\n\nconst handleOverlayClick = e => {\n e.stopPropagation();\n e.preventDefault();\n return false;\n};\n\nconst Notification = props => {\n const {message, icon} = props;\n\n const IconType = get(icon, NOTIFICATION_ICON);\n return (\n <div\n data-name=\"notification\"\n data-type={icon}\n onClick={handleOverlayClick}\n className={classnames(style.showOverlay, style.notificationWrapper)}\n >\n <div className={style.notification}>\n <IconType className={style.icon} color={null} stroke={null} />\n <div className={style.message}>\n <span role=\"status\">{message}</span>\n </div>\n </div>\n </div>\n );\n};\nNotification.propTypes = {\n message: PropTypes.string.isRequired,\n icon: PropTypes.oneOf(keys(NOTIFICATION_ICON)).isRequired\n};\n\nexport default Notification;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAMA;;;;AAEA,MAAMA,iBAAiB,GAAG;EACxBC,WAAW,EAAEC,2CADW;EAExBC,cAAc,EAAEC,wCAFQ;EAGxBC,IAAI,EAAEC,+BAHkB;EAIxBC,MAAM,EAAEC;AAJgB,CAA1B;;AAOA,MAAMC,kBAAkB,GAAGC,CAAC,IAAI;EAC9BA,CAA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