@coorpacademy/components 11.2.3 → 11.2.4

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.
Files changed (56) hide show
  1. package/es/atom/choice/index.native.d.ts.map +1 -1
  2. package/es/atom/choice/index.native.js +3 -2
  3. package/es/atom/choice/index.native.js.map +1 -1
  4. package/es/molecule/card-content/index.d.ts.map +1 -1
  5. package/es/molecule/card-content/index.js +3 -3
  6. package/es/molecule/card-content/index.js.map +1 -1
  7. package/es/molecule/dashboard/cards-list/index.d.ts +4 -0
  8. package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
  9. package/es/molecule/dashboard/cards-list/index.js +11 -4
  10. package/es/molecule/dashboard/cards-list/index.js.map +1 -1
  11. package/es/organism/mooc-footer/index.d.ts +1 -1
  12. package/es/organism/mooc-footer/index.js +2 -2
  13. package/es/organism/mooc-footer/index.js.map +1 -1
  14. package/es/organism/review-slide/index.native.d.ts.map +1 -1
  15. package/es/organism/review-slide/index.native.js +16 -10
  16. package/es/organism/review-slide/index.native.js.map +1 -1
  17. package/es/organism/review-stacked-slides/index.native.d.ts.map +1 -1
  18. package/es/organism/review-stacked-slides/index.native.js +3 -2
  19. package/es/organism/review-stacked-slides/index.native.js.map +1 -1
  20. package/es/template/app-player/popin-end/index.d.ts +4 -0
  21. package/es/template/app-player/popin-end/summary.d.ts +4 -0
  22. package/es/template/common/dashboard/index.d.ts +10 -6
  23. package/es/template/common/dashboard/index.d.ts.map +1 -1
  24. package/es/template/common/dashboard/index.js +9 -3
  25. package/es/template/common/dashboard/index.js.map +1 -1
  26. package/es/template/common/search-page/index.d.ts +4 -0
  27. package/es/template/teams-dashboard/index.d.ts +4 -0
  28. package/lib/atom/choice/index.native.d.ts.map +1 -1
  29. package/lib/atom/choice/index.native.js +3 -2
  30. package/lib/atom/choice/index.native.js.map +1 -1
  31. package/lib/molecule/card-content/index.d.ts.map +1 -1
  32. package/lib/molecule/card-content/index.js +3 -3
  33. package/lib/molecule/card-content/index.js.map +1 -1
  34. package/lib/molecule/dashboard/cards-list/index.d.ts +4 -0
  35. package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
  36. package/lib/molecule/dashboard/cards-list/index.js +11 -4
  37. package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
  38. package/lib/organism/mooc-footer/index.d.ts +1 -1
  39. package/lib/organism/mooc-footer/index.js +2 -2
  40. package/lib/organism/mooc-footer/index.js.map +1 -1
  41. package/lib/organism/review-slide/index.native.d.ts.map +1 -1
  42. package/lib/organism/review-slide/index.native.js +15 -9
  43. package/lib/organism/review-slide/index.native.js.map +1 -1
  44. package/lib/organism/review-stacked-slides/index.native.d.ts.map +1 -1
  45. package/lib/organism/review-stacked-slides/index.native.js +2 -1
  46. package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
  47. package/lib/template/app-player/popin-end/index.d.ts +4 -0
  48. package/lib/template/app-player/popin-end/summary.d.ts +4 -0
  49. package/lib/template/common/dashboard/index.d.ts +10 -6
  50. package/lib/template/common/dashboard/index.d.ts.map +1 -1
  51. package/lib/template/common/dashboard/index.js +9 -3
  52. package/lib/template/common/dashboard/index.js.map +1 -1
  53. package/lib/template/common/search-page/index.d.ts +4 -0
  54. package/lib/template/teams-dashboard/index.d.ts +4 -0
  55. package/locales/.mtslconfig.json +1 -0
  56. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["socialLinksTypes","StoresLinks","onAppStoreButtonClick","appStoreButtonImageUrl","playStoreButtonImageUrl","onPlayStoreButtonClick","androidAlt","iosAlt","style","storeLinksContainer","imgApple","img","propTypes","PropTypes","func","string","MoocFooter","props","headSection","socialLinks","logoAriaLabel","socialLinksAriaLabel","siteMapSections","headSectionView","headSpacingContainer","headSectionWrapper","logoAndLabelWrapper","logoWrapper","coorpAppLogo","marketingLabel","title","mobileAppLinks","renderPagesFromSection","pages","pagesList","map","page","pindex","handleClick","onClick","link","pageLink","target","sections","section","index","sectionWrapper","sectionTitle","socialLinksView","socialLink","type","socialNetworks","logoSocialNetworksContainer","coorpLogo","socialNetworksWrapper","siteMap","siteMapSpacingContainer","siteMapContainer","sectionsContainer","shape","arrayOf","oneOf"],"sources":["../../../src/organism/mooc-footer/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport {\n NovaCompositionCoorpacademyCoorpApp as CoorpAppLogo,\n NovaCompositionCoorpacademyCoorpLogo as CoorpLogo\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport SocialLink from '../../atom/social-link';\nimport Picture from '../../atom/picture';\nimport style from './style.css';\n\nconst socialLinksTypes = ['facebook', 'twitter', 'linkedin', 'youtube', 'instagram'];\n\nconst StoresLinks = ({\n onAppStoreButtonClick,\n appStoreButtonImageUrl,\n playStoreButtonImageUrl,\n onPlayStoreButtonClick,\n 'android-alt': androidAlt,\n 'ios-alt': iosAlt\n}) => (\n <div className={style.storeLinksContainer}>\n <Picture\n className={style.imgApple}\n src={appStoreButtonImageUrl}\n onClick={onAppStoreButtonClick}\n alt={iosAlt}\n />\n <Picture\n className={style.img}\n src={playStoreButtonImageUrl}\n onClick={onPlayStoreButtonClick}\n alt={androidAlt}\n />\n </div>\n);\n\nStoresLinks.propTypes = {\n onAppStoreButtonClick: PropTypes.func,\n appStoreButtonImageUrl: PropTypes.string,\n playStoreButtonImageUrl: PropTypes.string,\n onPlayStoreButtonClick: PropTypes.func,\n 'android-alt': PropTypes.string,\n 'ios-alt': PropTypes.string\n};\n\nfunction MoocFooter(props) {\n const {\n headSection = {},\n socialLinks = [],\n 'logo-aria-label': logoAriaLabel,\n 'social-links-aria-label': socialLinksAriaLabel,\n siteMapSections = []\n } = props;\n\n // Header section of the footer (the marketing banner)\n\n const headSectionView = !isEmpty(headSection) ? (\n <div data-name=\"headSpacingContainer\" className={style.headSpacingContainer}>\n <div data-name=\"headSection\" className={style.headSectionWrapper}>\n <div className={style.logoAndLabelWrapper}>\n <div className={style.logoWrapper}>\n <CoorpAppLogo\n className={style.coorpAppLogo}\n aria-label={headSection['mobile-logo-aria-label']}\n />\n </div>\n <div data-name=\"mobile-marketing-text\" className={style.marketingLabel}>\n {headSection.title}\n </div>\n </div>\n <div data-name=\"mobile-apps-buttons-wrapper\" className={style.mobileAppLinks}>\n <StoresLinks\n // ignored due to naming conventions in JSX rather than a linting error\n // eslint-disable-next-line react/jsx-handler-names\n onAppStoreButtonClick={headSection.onAppStoreButtonClick}\n appStoreButtonImageUrl={headSection.appStoreButtonImageUrl}\n playStoreButtonImageUrl={headSection.playStoreButtonImageUrl}\n // eslint-disable-next-line react/jsx-handler-names\n onPlayStoreButtonClick={headSection.onPlayStoreButtonClick}\n android-alt={headSection['android-alt']}\n ios-alt={headSection['ios-alt']}\n />\n </div>\n </div>\n </div>\n ) : null;\n\n // Sitemap section of the footer (contains HELP, TOOLBOX... and other pages, as well as social links)\n\n const renderPagesFromSection = pages => {\n return (\n <ul className={style.pagesList} data-name=\"pages-list\">\n {pages.map((page, pindex) => {\n const handleClick = page.onClick;\n return (\n <li key={pindex}>\n <Link\n href={page.link}\n onClick={handleClick}\n title={page.title}\n data-text={page.title}\n className={style.pageLink}\n target={page.target}\n data-name={page.title}\n >\n {page.title}\n </Link>\n </li>\n );\n })}\n </ul>\n );\n };\n\n const sections = !isEmpty(siteMapSections)\n ? siteMapSections.map((section, index) => {\n return (\n <div key={index} className={style.sectionWrapper}>\n <p className={style.sectionTitle}>{section.title}</p>\n {renderPagesFromSection(section.pages)}\n </div>\n );\n })\n : null;\n\n const socialLinksView = socialLinks.map((socialLink, index) => {\n return (\n <li className={style.socialLink} key={index}>\n <SocialLink\n type={socialLink.type}\n link={socialLink.link}\n mode=\"footer\"\n aria-label={socialLink['aria-label']}\n />\n </li>\n );\n });\n\n const socialNetworks = (\n <div data-name=\"logo-social-networks-container\" className={style.logoSocialNetworksContainer}>\n <CoorpLogo\n className={style.coorpLogo}\n data-name=\"coorp-social-networks-logo\"\n aria-label={logoAriaLabel}\n />\n <ul\n data-name=\"social-networks-wrapper\"\n className={style.socialNetworksWrapper}\n aria-label={socialLinksAriaLabel}\n >\n {socialLinksView}\n </ul>\n </div>\n );\n\n const siteMap = (\n <div data-name=\"site-map-spacing-container\" className={style.siteMapSpacingContainer}>\n <div data-name=\"site-map\" className={style.siteMapContainer}>\n <div data-name=\"sections\" className={style.sectionsContainer}>\n {sections}\n </div>\n {socialNetworks}\n </div>\n </div>\n );\n\n return (\n <footer data-name=\"mooc-footer\">\n {headSectionView}\n {siteMap}\n </footer>\n );\n}\n\nMoocFooter.propTypes = {\n headSection: PropTypes.shape({\n title: PropTypes.string,\n onAppStoreButtonClick: PropTypes.func,\n appStoreButtonImageUrl: PropTypes.string,\n playStoreButtonImageUrl: PropTypes.string,\n onPlayStoreButtonClick: PropTypes.func,\n 'mobile-logo-aria-label': PropTypes.string,\n 'android-alt': PropTypes.string,\n 'ios-alt': PropTypes.string\n }),\n siteMapSections: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n pages: PropTypes.arrayOf(\n PropTypes.shape({title: PropTypes.string, link: PropTypes.string, target: PropTypes.string})\n )\n })\n ),\n socialLinks: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf(socialLinksTypes),\n link: PropTypes.string,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n ),\n 'logo-aria-label': PropTypes.string,\n 'social-links-aria-label': PropTypes.string\n};\n\nexport default MoocFooter;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAIA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,gBAAN,2CAAyB,CAAC,UAAD,EAAa,SAAb,EAAwB,UAAxB,EAAoC,SAApC,EAA+C,WAA/C,CAAzB;;AAEA,MAAMC,WAAW,GAAG,CAAC;EACnBC,qBADmB;EAEnBC,sBAFmB;EAGnBC,uBAHmB;EAInBC,sBAJmB;EAKnB,eAAeC,UALI;EAMnB,WAAWC;AANQ,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rl","playStoreButtonImageUrl","onPlayStoreButtonClick","androidAlt","iosAlt","style","storeLinksContainer","imgApple","img","propTypes","PropTypes","func","string","MoocFooter","props","headSection","socialLinks","logoAriaLabel","socialLinksAriaLabel","siteMapSections","headSectionView","headSpacingContainer","headSectionWrapper","logoAndLabelWrapper","logoWrapper","coorpAppLogo","marketingLabel","title","mobileAppLinks","renderPagesFromSection","pages","pagesList","map","page","pindex","handleClick","onClick","link","pageLink","target","sections","section","index","sectionWrapper","sectionTitle","socialLinksView","socialLink","type","socialNetworks","logoSocialNetworksContainer","coorpLogo","socialNetworksWrapper","siteMap","siteMapSpacingContainer","siteMapContainer","sectionsContainer","shape","arrayOf","oneOf"],"sources":["../../../src/organism/mooc-footer/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport {\n NovaCompositionCoorpacademyCoorpApp as CoorpAppLogo,\n NovaCompositionCoorpacademyCoorpLogo as CoorpLogo\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport SocialLink from '../../atom/social-link';\nimport Picture from '../../atom/picture';\nimport style from './style.css';\n\nconst socialLinksTypes = ['facebook', 'twitter', 'linkedin', 'youtube', 'instagram'];\n\nconst StoresLinks = ({\n onAppStoreButtonClick,\n appStoreButtonImageUrl,\n playStoreButtonImageUrl,\n onPlayStoreButtonClick,\n 'android-alt': androidAlt,\n 'ios-alt': iosAlt\n}) => (\n <div className={style.storeLinksContainer}>\n <Picture\n className={style.imgApple}\n src={appStoreButtonImageUrl}\n onClick={onAppStoreButtonClick}\n alt={iosAlt}\n />\n <Picture\n className={style.img}\n src={playStoreButtonImageUrl}\n onClick={onPlayStoreButtonClick}\n alt={androidAlt}\n />\n </div>\n);\n\nStoresLinks.propTypes = {\n onAppStoreButtonClick: PropTypes.func,\n appStoreButtonImageUrl: PropTypes.string,\n playStoreButtonImageUrl: PropTypes.string,\n onPlayStoreButtonClick: PropTypes.func,\n 'android-alt': PropTypes.string,\n 'ios-alt': PropTypes.string\n};\n\nfunction MoocFooter(props) {\n const {\n headSection = {},\n socialLinks = [],\n 'logo-aria-label': logoAriaLabel,\n 'social-links-aria-label': socialLinksAriaLabel,\n siteMapSections = []\n } = props;\n\n // Header section of the footer (the marketing banner)\n\n const headSectionView = !isEmpty(headSection) ? (\n <div data-name=\"headSpacingContainer\" className={style.headSpacingContainer}>\n <div data-name=\"headSection\" className={style.headSectionWrapper}>\n <div className={style.logoAndLabelWrapper}>\n <div className={style.logoWrapper}>\n <CoorpAppLogo\n className={style.coorpAppLogo}\n aria-label={headSection['logo-aria-label']}\n />\n </div>\n <div data-name=\"mobile-marketing-text\" className={style.marketingLabel}>\n {headSection.title}\n </div>\n </div>\n <div data-name=\"mobile-apps-buttons-wrapper\" className={style.mobileAppLinks}>\n <StoresLinks\n // ignored due to naming conventions in JSX rather than a linting error\n // eslint-disable-next-line react/jsx-handler-names\n onAppStoreButtonClick={headSection.onAppStoreButtonClick}\n appStoreButtonImageUrl={headSection.appStoreButtonImageUrl}\n playStoreButtonImageUrl={headSection.playStoreButtonImageUrl}\n // eslint-disable-next-line react/jsx-handler-names\n onPlayStoreButtonClick={headSection.onPlayStoreButtonClick}\n android-alt={headSection['android-alt']}\n ios-alt={headSection['ios-alt']}\n />\n </div>\n </div>\n </div>\n ) : null;\n\n // Sitemap section of the footer (contains HELP, TOOLBOX... and other pages, as well as social links)\n\n const renderPagesFromSection = pages => {\n return (\n <ul className={style.pagesList} data-name=\"pages-list\">\n {pages.map((page, pindex) => {\n const handleClick = page.onClick;\n return (\n <li key={pindex}>\n <Link\n href={page.link}\n onClick={handleClick}\n title={page.title}\n data-text={page.title}\n className={style.pageLink}\n target={page.target}\n data-name={page.title}\n >\n {page.title}\n </Link>\n </li>\n );\n })}\n </ul>\n );\n };\n\n const sections = !isEmpty(siteMapSections)\n ? siteMapSections.map((section, index) => {\n return (\n <div key={index} className={style.sectionWrapper}>\n <p className={style.sectionTitle}>{section.title}</p>\n {renderPagesFromSection(section.pages)}\n </div>\n );\n })\n : null;\n\n const socialLinksView = socialLinks.map((socialLink, index) => {\n return (\n <li className={style.socialLink} key={index}>\n <SocialLink\n type={socialLink.type}\n link={socialLink.link}\n mode=\"footer\"\n aria-label={socialLink['aria-label']}\n />\n </li>\n );\n });\n\n const socialNetworks = (\n <div data-name=\"logo-social-networks-container\" className={style.logoSocialNetworksContainer}>\n <CoorpLogo\n className={style.coorpLogo}\n data-name=\"coorp-social-networks-logo\"\n aria-label={logoAriaLabel}\n />\n <ul\n data-name=\"social-networks-wrapper\"\n className={style.socialNetworksWrapper}\n aria-label={socialLinksAriaLabel}\n >\n {socialLinksView}\n </ul>\n </div>\n );\n\n const siteMap = (\n <div data-name=\"site-map-spacing-container\" className={style.siteMapSpacingContainer}>\n <div data-name=\"site-map\" className={style.siteMapContainer}>\n <div data-name=\"sections\" className={style.sectionsContainer}>\n {sections}\n </div>\n {socialNetworks}\n </div>\n </div>\n );\n\n return (\n <footer data-name=\"mooc-footer\">\n {headSectionView}\n {siteMap}\n </footer>\n );\n}\n\nMoocFooter.propTypes = {\n headSection: PropTypes.shape({\n title: PropTypes.string,\n onAppStoreButtonClick: PropTypes.func,\n appStoreButtonImageUrl: PropTypes.string,\n playStoreButtonImageUrl: PropTypes.string,\n onPlayStoreButtonClick: PropTypes.func,\n 'logo-aria-label': PropTypes.string,\n 'android-alt': PropTypes.string,\n 'ios-alt': PropTypes.string\n }),\n siteMapSections: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n pages: PropTypes.arrayOf(\n PropTypes.shape({title: PropTypes.string, link: PropTypes.string, target: PropTypes.string})\n )\n })\n ),\n socialLinks: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf(socialLinksTypes),\n link: PropTypes.string,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n ),\n 'logo-aria-label': PropTypes.string,\n 'social-links-aria-label': PropTypes.string\n};\n\nexport default MoocFooter;\n"],"mappings":";;;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B,kBAAA,CAAUE,MAFF;IAGdwB,OAAO,EAAE1B,kBAAA,CAAUC,IAHL;IAId,cAAcD,kBAAA,CAAUE;EAJV,CAAhB,CADW,CAnBQ;EA2BrB,mBAAmBF,kBAAA,CAAUE,MA3BR;EA4BrB,2BAA2BF,kBAAA,CAAUE;AA5BhB,CAAvB;eA+BeC,U"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/index.native.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAa,gBAAgB,EAAa,MAAM,cAAc,CAAC;AA+JtE,QAAA,MAAM,KAAK,UAAW,gBAAgB,gBA8CrC,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/index.native.tsx"],"names":[],"mappings":";AAoBA,OAAO,EAAa,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAwKtE,QAAA,MAAM,KAAK,UAAW,gBAAgB,gBA8CrC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -44,10 +44,10 @@ const CorrectionPopin = ({
44
44
  animateCorrectionPopin
45
45
  }) => {
46
46
  const translateUp = (0, _reactNativeAnimation.useTranslateY)({
47
- fromValue: 1000,
47
+ fromValue: 500,
48
48
  toValue: 0,
49
- duration: 800,
50
- easing: _reactNative.Easing.bezier(0.37, 0, 0.63, 1)
49
+ duration: 500,
50
+ easing: _reactNative.Easing.bezier(0.34, 1.36, 0.64, 1)
51
51
  });
52
52
  (0, _react.useEffect)(() => translateUp.start(), []);
53
53
  if (!showCorrectionPopin) return null;
@@ -103,10 +103,12 @@ const createQuestionStyle = theme => _reactNative.StyleSheet.create({
103
103
  marginTop: theme.spacing.small,
104
104
  textAlign: 'center'
105
105
  },
106
- choicesContainer: {
107
- flex: 1,
108
- width: '100%',
109
- justifyContent: 'center'
106
+ choicesScrollView: {
107
+ marginVertical: 20,
108
+ width: '100%'
109
+ },
110
+ choicesScrollContent: {
111
+ padding: 10
110
112
  }
111
113
  });
112
114
 
@@ -133,8 +135,12 @@ const Question = props => {
133
135
  style: style.questionText
134
136
  }, questionText), /*#__PURE__*/_react.default.createElement(_index.default, {
135
137
  style: style.questionHelp
136
- }, (0, _get.default)('help', answerUI))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
137
- style: style.choicesContainer
138
+ }, (0, _get.default)('help', answerUI))), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
139
+ style: style.choicesScrollView,
140
+ contentContainerStyle: style.choicesScrollContent,
141
+ centerContent: true,
142
+ showsHorizontalScrollIndicator: false,
143
+ showsVerticalScrollIndicator: false
138
144
  }, /*#__PURE__*/_react.default.createElement(_index2.default, answerUI)));
139
145
  };
140
146
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["styles","StyleSheet","create","correctionPopinWrapper","position","bottom","width","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","translateUp","useTranslateY","fromValue","toValue","duration","easing","Easing","bezier","useEffect","start","klf","getOr","undefined","information","label","message","next","get","onClick","_correctionPopinProps","type","resultLabel","style","animatedStyle","createQuestionStyle","theme","questionHeading","justifyContent","questionOrigin","fontSize","lineHeight","color","colors","text","primary","marginBottom","spacing","tiny","marginTop","small","textAlign","questionText","fontWeight","questionHelp","gray","medium","choicesContainer","flex","Question","props","answerUI","useTemplateContext","setStyle","useState","questionStyle","createSlideStyle","num","screenWidth","slideWidth","slide","left","backgroundColor","height","alignItems","padding","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","Slide","validateButton","useWindowDimensions","slideStyle","loading","parentContentTitle","handleValidatePress","disabled"],"sources":["../../../src/organism/review-slide/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {\n Animated,\n Easing,\n StyleSheet,\n TextStyle,\n useWindowDimensions,\n View,\n ViewStyle\n} from 'react-native';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport {useTranslateY} from '@coorpacademy/react-native-animation';\nimport Text from '../../atom/text/index.native';\nimport Answer from '../../molecule/answer/index.native';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Button from '../../atom/button/index.native';\nimport {PopinProps, ReviewSlideProps, SlideProps} from './prop-types';\n\nconst styles = StyleSheet.create({\n correctionPopinWrapper: {\n position: 'absolute',\n bottom: 16,\n width: '105%'\n }\n});\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}: PopinProps) => {\n const translateUp = useTranslateY({\n fromValue: 1000,\n toValue: 0,\n duration: 800,\n easing: Easing.bezier(0.37, 0, 0.63, 1)\n });\n\n useEffect(() => translateUp.start(), []);\n\n if (!showCorrectionPopin) return null;\n\n const klf = getOr(undefined, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n const style = animateCorrectionPopin\n ? [styles.correctionPopinWrapper, translateUp.animatedStyle]\n : styles.correctionPopinWrapper;\n\n return (\n <Animated.View style={style}>\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </Animated.View>\n );\n};\n\ntype StyleSheetType = {\n questionHeading: ViewStyle;\n questionOrigin: ViewStyle;\n questionText: TextStyle;\n questionHelp: ViewStyle;\n choicesContainer: ViewStyle;\n};\n\nconst createQuestionStyle = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n questionHeading: {\n justifyContent: 'space-between'\n },\n questionOrigin: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.text.primary,\n marginBottom: theme.spacing.tiny,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n },\n questionText: {\n fontSize: 16,\n lineHeight: 22,\n fontWeight: '700',\n color: theme.colors.text.primary,\n textAlign: 'center'\n },\n questionHelp: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.gray.medium,\n marginBottom: 0,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n },\n choicesContainer: {\n flex: 1,\n width: '100%',\n justifyContent: 'center'\n }\n });\n\ntype QuestionProps = {\n answerUI: SlideProps['answerUI'];\n questionText: SlideProps['questionText'];\n questionOrigin: SlideProps['parentContentTitle'];\n};\n\nconst Question = (props: QuestionProps) => {\n const {answerUI, questionText, questionOrigin} = props;\n const {theme} = useTemplateContext();\n const [style, setStyle] = useState<StyleSheetType>();\n\n useEffect(() => {\n const questionStyle = createQuestionStyle(theme);\n setStyle(questionStyle);\n }, [theme]);\n\n if (!answerUI || !questionText || !style) return null;\n\n return (\n <>\n <View style={style.questionHeading}>\n <Text style={style.questionOrigin}>{questionOrigin}</Text>\n <Text style={style.questionText}>{questionText}</Text>\n <Text style={style.questionHelp}>{get('help', answerUI)}</Text>\n </View>\n <View style={style.choicesContainer}>\n <Answer {...answerUI} />\n </View>\n </>\n );\n};\n\ntype SlideStyle = {\n slide: ViewStyle;\n};\n\nconst createSlideStyle = (num: number, screenWidth: number): SlideStyle => {\n const slideWidth = screenWidth - 40 - num * 8;\n\n return StyleSheet.create({\n slide: {\n position: 'absolute',\n left: 20 + num * 4,\n bottom: 34 + num * 5,\n backgroundColor: '#fff', // theme.colors.white\n height: '90%',\n width: slideWidth,\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: 25,\n shadowColor: '#000',\n shadowOffset: {width: 0, height: -1},\n shadowOpacity: 0.05,\n shadowRadius: 16,\n elevation: 10 - num * 1,\n borderRadius: 16\n }\n });\n};\n\nconst Slide = (props: ReviewSlideProps) => {\n const {animatedStyle, slide, correctionPopinProps, validateButton, num, slideIndex = '0'} = props;\n\n const {width} = useWindowDimensions();\n const slideStyle = createSlideStyle(num, width);\n\n const {\n loading,\n parentContentTitle,\n questionText,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n if (loading) {\n return <View style={slideStyle.slide} />;\n }\n\n const {onClick: handleValidatePress} = validateButton;\n\n return (\n <Animated.View style={[slideStyle.slide, animatedStyle]}>\n <Question\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n key=\"question-container\"\n />\n <Button\n disabled={validateButton.disabled}\n submitValue={validateButton.label}\n onPress={handleValidatePress}\n testID={`slide-validate-button-${slideIndex}`}\n />\n {correctionPopinProps ? (\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n ) : null}\n </Animated.View>\n );\n};\n\nexport default Slide;\n"],"mappings":";;;;;AAAA;;AACA;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;AAGA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC/BC,sBAAsB,EAAE;IACtBC,QAAQ,EAAE,UADY;IAEtBC,MAAM,EAAE,EAFc;IAGtBC,KAAK,EAAE;EAHe;AADO,CAAlB,CAAf;;AAQA,MAAMC,eAAe,GAAG,CAAC;EACvBC,oBADuB;EAEvBC,UAFuB;EAGvBC,mBAHuB;EAIvBC;AAJuB,CAAD,KAKN;EAChB,MAAMC,WAAW,GAAG,IAAAC,mCAAA,EAAc;IAChCC,SAAS,EAAE,IADqB;IAEhCC,OAAO,EAAE,CAFuB;IAGhCC,QAAQ,EAAE,GAHsB;IAIhCC,MAAM,EAAEC,mBAAA,CAAOC,MAAP,CAAc,IAAd,EAAoB,CAApB,EAAuB,IAAvB,EAA6B,CAA7B;EAJwB,CAAd,CAApB;EAOA,IAAAC,gBAAA,EAAU,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,CA9CD;;eAgDewE,K"}
1
+ {"version":3,"file":"index.native.js","names":["styles","StyleSheet","create","correctionPopinWrapper","position","bottom","width","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","translateUp","useTranslateY","fromValue","toValue","duration","easing","Easing","bezier","useEffect","start","klf","getOr","undefined","information","label","message","next","get","onClick","_correctionPopinProps","type","resultLabel","style","animatedStyle","createQuestionStyle","theme","questionHeading","justifyContent","questionOrigin","fontSize","lineHeight","color","colors","text","primary","marginBottom","spacing","tiny","marginTop","small","textAlign","questionText","fontWeight","questionHelp","gray","medium","choicesScrollView","marginVertical","choicesScrollContent","padding","Question","props","answerUI","useTemplateContext","setStyle","useState","questionStyle","createSlideStyle","num","screenWidth","slideWidth","slide","left","backgroundColor","height","alignItems","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","Slide","validateButton","useWindowDimensions","slideStyle","loading","parentContentTitle","handleValidatePress","disabled"],"sources":["../../../src/organism/review-slide/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {\n Animated,\n Easing,\n ScrollView,\n StyleSheet,\n TextStyle,\n useWindowDimensions,\n View,\n ViewStyle\n} from 'react-native';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport {useTranslateY} from '@coorpacademy/react-native-animation';\nimport Text from '../../atom/text/index.native';\nimport Answer from '../../molecule/answer/index.native';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Button from '../../atom/button/index.native';\nimport {PopinProps, ReviewSlideProps, SlideProps} from './prop-types';\n\nconst styles = StyleSheet.create({\n correctionPopinWrapper: {\n position: 'absolute',\n bottom: 16,\n width: '105%'\n }\n});\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}: PopinProps) => {\n const translateUp = useTranslateY({\n fromValue: 500,\n toValue: 0,\n duration: 500,\n easing: Easing.bezier(0.34, 1.36, 0.64, 1)\n });\n\n useEffect(() => translateUp.start(), []);\n\n if (!showCorrectionPopin) return null;\n\n const klf = getOr(undefined, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n const style = animateCorrectionPopin\n ? [styles.correctionPopinWrapper, translateUp.animatedStyle]\n : styles.correctionPopinWrapper;\n\n return (\n <Animated.View style={style}>\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </Animated.View>\n );\n};\n\ntype StyleSheetType = {\n questionHeading: ViewStyle;\n questionOrigin: ViewStyle;\n questionText: TextStyle;\n questionHelp: ViewStyle;\n choicesScrollView: ViewStyle;\n choicesScrollContent: ViewStyle;\n};\n\nconst createQuestionStyle = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n questionHeading: {\n justifyContent: 'space-between'\n },\n questionOrigin: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.text.primary,\n marginBottom: theme.spacing.tiny,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n },\n questionText: {\n fontSize: 16,\n lineHeight: 22,\n fontWeight: '700',\n color: theme.colors.text.primary,\n textAlign: 'center'\n },\n questionHelp: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.gray.medium,\n marginBottom: 0,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n },\n choicesScrollView: {\n marginVertical: 20,\n width: '100%'\n },\n choicesScrollContent: {\n padding: 10\n }\n });\n\ntype QuestionProps = {\n answerUI: SlideProps['answerUI'];\n questionText: SlideProps['questionText'];\n questionOrigin: SlideProps['parentContentTitle'];\n};\n\nconst Question = (props: QuestionProps) => {\n const {answerUI, questionText, questionOrigin} = props;\n const {theme} = useTemplateContext();\n const [style, setStyle] = useState<StyleSheetType>();\n\n useEffect(() => {\n const questionStyle = createQuestionStyle(theme);\n setStyle(questionStyle);\n }, [theme]);\n\n if (!answerUI || !questionText || !style) return null;\n\n return (\n <>\n <View style={style.questionHeading}>\n <Text style={style.questionOrigin}>{questionOrigin}</Text>\n <Text style={style.questionText}>{questionText}</Text>\n <Text style={style.questionHelp}>{get('help', answerUI)}</Text>\n </View>\n <ScrollView\n style={style.choicesScrollView}\n contentContainerStyle={style.choicesScrollContent}\n centerContent\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n >\n <Answer {...answerUI} />\n </ScrollView>\n </>\n );\n};\n\ntype SlideStyle = {\n slide: ViewStyle;\n};\n\nconst createSlideStyle = (num: number, screenWidth: number): SlideStyle => {\n const slideWidth = screenWidth - 40 - num * 8;\n\n return StyleSheet.create({\n slide: {\n position: 'absolute',\n left: 20 + num * 4,\n bottom: 34 + num * 5,\n backgroundColor: '#fff', // theme.colors.white\n height: '90%',\n width: slideWidth,\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: 25,\n shadowColor: '#000',\n shadowOffset: {width: 0, height: -1},\n shadowOpacity: 0.05,\n shadowRadius: 16,\n elevation: 10 - num * 1,\n borderRadius: 16\n }\n });\n};\n\nconst Slide = (props: ReviewSlideProps) => {\n const {animatedStyle, slide, correctionPopinProps, validateButton, num, slideIndex = '0'} = props;\n\n const {width} = useWindowDimensions();\n const slideStyle = createSlideStyle(num, width);\n\n const {\n loading,\n parentContentTitle,\n questionText,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n if (loading) {\n return <View style={slideStyle.slide} />;\n }\n\n const {onClick: handleValidatePress} = validateButton;\n\n return (\n <Animated.View style={[slideStyle.slide, animatedStyle]}>\n <Question\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n key=\"question-container\"\n />\n <Button\n disabled={validateButton.disabled}\n submitValue={validateButton.label}\n onPress={handleValidatePress}\n testID={`slide-validate-button-${slideIndex}`}\n />\n {correctionPopinProps ? (\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n ) : null}\n </Animated.View>\n );\n};\n\nexport default Slide;\n"],"mappings":";;;;;AAAA;;AACA;;AAUA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;AAGA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC/BC,sBAAsB,EAAE;IACtBC,QAAQ,EAAE,UADY;IAEtBC,MAAM,EAAE,EAFc;IAGtBC,KAAK,EAAE;EAHe;AADO,CAAlB,CAAf;;AAQA,MAAMC,eAAe,GAAG,CAAC;EACvBC,oBADuB;EAEvBC,UAFuB;EAGvBC,mBAHuB;EAIvBC;AAJuB,CAAD,KAKN;EAChB,MAAMC,WAAW,GAAG,IAAAC,mCAAA,EAAc;IAChCC,SAAS,EAAE,GADqB;IAEhCC,OAAO,EAAE,CAFuB;IAGhCC,QAAQ,EAAE,GAHsB;IAIhCC,MAAM,EAAEC,mBAAA,CAAOC,MAAP,CAAc,IAAd,EAAoB,IAApB,EAA0B,IAA1B,EAAgC,CAAhC;EAJwB,CAAd,CAApB;EAOA,IAAAC,gBAAA,EAAU,MAAMR,WAAW,CAACS,KAAZ,EAAhB,EAAqC,EAArC;EAEA,IAAI,CAACX,mBAAL,EAA0B,OAAO,IAAP;EAE1B,MAAMY,GAAG,GAAG,IAAAC,cAAA,EAAMC,SAAN,EAAiB,KAAjB,EAAwBhB,oBAAxB,CAAZ;EACA,MAAMiB,WAAW,GAAG,IAAAF,cAAA,EAAM;IAACG,KAAK,EAAE,EAAR;IAAYC,OAAO,EAAE;EAArB,CAAN,EAAgC,aAAhC,EAA+Cn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C6E,cAA7C;IAA6Df,GAA7D;IAAkE7D,UAAU,GAAG;EAA/E,IAAsFsD,KAA5F;EAEA,MAAM;IAACzD;EAAD,IAAU,IAAAgF,gCAAA,GAAhB;EACA,MAAMC,UAAU,GAAGlB,gBAAgB,CAACC,GAAD,EAAMhE,KAAN,CAAnC;EAEA,MAAM;IACJkF,OADI;IAEJC,kBAFI;IAGJpC,YAHI;IAIJW,QAJI;IAKJtD,mBALI;IAMJC;EANI,IAOF8D,KAPJ;;EASA,IAAIe,OAAJ,EAAa;IACX,oBAAO,6BAAC,iBAAD;MAAM,KAAK,EAAED,UAAU,CAACd;IAAxB,EAAP;EACD;;EAED,MAAM;IAAC3C,OAAO,EAAE4D;EAAV,IAAiCL,cAAvC;EAEA,oBACE,6BAAC,qBAAD,CAAU,IAAV;IAAe,KAAK,EAAE,CAACE,UAAU,CAACd,KAAZ,EAAmBtC,aAAnB;EAAtB,gBACE,6BAAC,QAAD;IACE,cAAc,EAAEsD,kBADlB;IAEE,YAAY,EAAEpC,YAFhB;IAGE,QAAQ,EAAEW,QAHZ;IAIE,GAAG,EAAC;EAJN,EADF,eAOE,6BAAC,eAAD;IACE,QAAQ,EAAEqB,cAAc,CAACM,QAD3B;IAEE,WAAW,EAAEN,cAAc,CAAC3D,KAF9B;IAGE,OAAO,EAAEgE,mBAHX;IAIE,MAAM,EAAG,yBAAwBjF,UAAW;EAJ9C,EAPF,EAaGD,oBAAoB,gBACnB,6BAAC,eAAD;IACE,oBAAoB,EAAEA,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EADmB,GAQjB,IArBN,CADF;AAyBD,CA9CD;;eAgDeyE,K"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAEnD,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAyBpC,QAAA,MAAM,aAAa,UAAW,gBAAgB,gBA0G7C,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAEnD,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAyBpC,QAAA,MAAM,aAAa,UAAW,gBAAgB,gBA2G7C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -69,7 +69,8 @@ const StackedSlides = props => {
69
69
  const translateDown = (0, _reactNativeAnimation.useTranslateY)({
70
70
  fromValue: 0,
71
71
  toValue: windowHeight - 100,
72
- duration: 1000
72
+ duration: 500,
73
+ easing: _reactNative.Easing.cubic
73
74
  });
74
75
  (0, _react.useEffect)(() => {
75
76
  if (endReview) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["TOTAL_SLIDES_STACK","style","StyleSheet","create","slides","flex","height","width","FakeSlide","position","validateButton","loading","StackedSlides","props","windowHeight","useWindowDimensions","endReview","correctionPopinProps","unstacked","setUnstacked","useState","restacked","setRestacked","hideSlides","useTranslateY","fromValue","toValue","duration","translateDown","useEffect","start","restackingSlide","keys","find","k","animationType","unstackingSlide","remainingKeys","filter","orderedKeys","sort","k1","k2","animatedSlide","includes","toString","unstacking","restacking","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, StyleSheet, useWindowDimensions} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport {useTranslateY} from '@coorpacademy/react-native-animation';\nimport Slide from '../review-slide/index.native';\nimport type {ReviewSlideProps} from '../review-slide/prop-types';\nimport type {ReviewStackProps} from './prop-types';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst style = StyleSheet.create({\n slides: {\n flex: 1,\n height: '100%',\n width: '100%'\n }\n});\n\ntype FakeSlideProps = {position: number; validateButton: ReviewSlideProps['validateButton']};\nconst FakeSlide = ({position, validateButton}: FakeSlideProps) => (\n <Slide\n num={position}\n slide={{loading: true, position}}\n slideIndex={`${position}`}\n validateButton={validateButton}\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 [restacked, setRestacked] = useState<string | null>();\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: 1000\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 animatedSlide = restackingSlide || unstackingSlide;\n\n useEffect(() => {\n if (restacked && orderedKeys.includes(restacked)) {\n setRestacked(null);\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 restacking = restackingSlide && restacked !== restackingSlide;\n\n if (restacking) {\n translateDown.start(() => {\n setRestacked(restackingSlide);\n });\n }\n }, [restackingSlide, restacked, setRestacked, translateDown]);\n\n const stackedSlides = orderedKeys.map((slideIndex, index) => {\n const slide = slides[slideIndex];\n\n return (\n <Slide\n {...{\n num: orderedKeys.length - index,\n slideIndex,\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n );\n });\n\n if (animatedSlide) {\n stackedSlides.push(\n <Slide\n {...{\n num: 0,\n slideIndex: animatedSlide,\n slide: slides[animatedSlide],\n validateButton,\n correctionPopinProps\n }}\n animatedStyle={[translateDown.animatedStyle]}\n key={animatedSlide}\n />\n );\n }\n\n return (\n <Animated.View style={[style.slides, hideSlides.animatedStyle]}>\n {restacked ? (\n <FakeSlide position={orderedKeys.length + 1} validateButton={validateButton} />\n ) : null}\n {stackedSlides}\n </Animated.View>\n );\n};\n\nexport default StackedSlides;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAIO,MAAMA,kBAAkB,GAAG,CAA3B;;;AAEP,MAAMC,KAAK,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC9BC,MAAM,EAAE;IACNC,IAAI,EAAE,CADA;IAENC,MAAM,EAAE,MAFF;IAGNC,KAAK,EAAE;EAHD;AADsB,CAAlB,CAAd;;AASA,MAAMC,SAAS,GAAG,CAAC;EAACC,QAAD;EAAWC;AAAX,CAAD,kBAChB,6BAAC,cAAD;EACE,GAAG,EAAED,QADP;EAEE,KAAK,EAAE;IAACE,OAAO,EAAE,IAAV;IAAgBF;EAAhB,CAFT;EAGE,UAAU,EAAG,GAAEA,QAAS,EAH1B;EAIE,cAAc,EAAEC;AAJlB,EADF;AASA;AACA;AACA;AACA;AACA;;;AACA,MAAME,aAAa,GAAIC,KAAD,IAA6B;EACjD,MAAM;IAACP,MAAM,EAAEQ;EAAT,IAAyB,IAAAC,gCAAA,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cAAD;MAEIG,GAAG,EAAEd,WAAW,CAACe,MAAZ,GAAqBH,KAF9B;MAGID,UAHJ;MAIIE,KAJJ;MAKI1C,cALJ;MAMIO,oBANJ;MAQE,GAAG,EAAEiC;IARP,EADF;EAYD,CAfqB,CAAtB;;EAiBA,IAAIP,aAAJ,EAAmB;IACjBK,aAAa,CAACO,IAAd,eACE,6BAAC,cAAD;MAEIF,GAAG,EAAE,CAFT;MAGIH,UAAU,EAAEP,aAHhB;MAIIS,KAAK,EAAEhD,MAAM,CAACuC,aAAD,CAJjB;MAKIjC,cALJ;MAMIO,oBANJ;MAQE,aAAa,EAAE,CAACW,aAAa,CAAC4B,aAAf,CARjB;MASE,GAAG,EAAEb;IATP,EADF;EAaD;;EAED,oBACE,6BAAC,qBAAD,CAAU,IAAV;IAAe,KAAK,EAAE,CAAC1C,KAAK,CAACG,MAAP,EAAemB,UAAU,CAACiC,aAA1B;EAAtB,GACGnC,SAAS,gBACR,6BAAC,SAAD;IAAW,QAAQ,EAAEkB,WAAW,CAACe,MAAZ,GAAqB,CAA1C;IAA6C,cAAc,EAAE5C;EAA7D,EADQ,GAEN,IAHN,EAIGsC,aAJH,CADF;AAQD,CA1GD;;eA4GepC,a"}
1
+ {"version":3,"file":"index.native.js","names":["TOTAL_SLIDES_STACK","style","StyleSheet","create","slides","flex","height","width","FakeSlide","position","validateButton","loading","StackedSlides","props","windowHeight","useWindowDimensions","endReview","correctionPopinProps","unstacked","setUnstacked","useState","restacked","setRestacked","hideSlides","useTranslateY","fromValue","toValue","duration","translateDown","easing","Easing","cubic","useEffect","start","restackingSlide","keys","find","k","animationType","unstackingSlide","remainingKeys","filter","orderedKeys","sort","k1","k2","animatedSlide","includes","toString","unstacking","restacking","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 {useTranslateY} from '@coorpacademy/react-native-animation';\nimport Slide from '../review-slide/index.native';\nimport type {ReviewSlideProps} from '../review-slide/prop-types';\nimport type {ReviewStackProps} from './prop-types';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst style = StyleSheet.create({\n slides: {\n flex: 1,\n height: '100%',\n width: '100%'\n }\n});\n\ntype FakeSlideProps = {position: number; validateButton: ReviewSlideProps['validateButton']};\nconst FakeSlide = ({position, validateButton}: FakeSlideProps) => (\n <Slide\n num={position}\n slide={{loading: true, position}}\n slideIndex={`${position}`}\n validateButton={validateButton}\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 [restacked, setRestacked] = useState<string | null>();\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 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 animatedSlide = restackingSlide || unstackingSlide;\n\n useEffect(() => {\n if (restacked && orderedKeys.includes(restacked)) {\n setRestacked(null);\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 restacking = restackingSlide && restacked !== restackingSlide;\n\n if (restacking) {\n translateDown.start(() => {\n setRestacked(restackingSlide);\n });\n }\n }, [restackingSlide, restacked, setRestacked, translateDown]);\n\n const stackedSlides = orderedKeys.map((slideIndex, index) => {\n const slide = slides[slideIndex];\n\n return (\n <Slide\n {...{\n num: orderedKeys.length - index,\n slideIndex,\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n );\n });\n\n if (animatedSlide) {\n stackedSlides.push(\n <Slide\n {...{\n num: 0,\n slideIndex: animatedSlide,\n slide: slides[animatedSlide],\n validateButton,\n correctionPopinProps\n }}\n animatedStyle={[translateDown.animatedStyle]}\n key={animatedSlide}\n />\n );\n }\n\n return (\n <Animated.View style={[style.slides, hideSlides.animatedStyle]}>\n {restacked ? (\n <FakeSlide position={orderedKeys.length + 1} validateButton={validateButton} />\n ) : null}\n {stackedSlides}\n </Animated.View>\n );\n};\n\nexport default StackedSlides;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAIO,MAAMA,kBAAkB,GAAG,CAA3B;;;AAEP,MAAMC,KAAK,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC9BC,MAAM,EAAE;IACNC,IAAI,EAAE,CADA;IAENC,MAAM,EAAE,MAFF;IAGNC,KAAK,EAAE;EAHD;AADsB,CAAlB,CAAd;;AASA,MAAMC,SAAS,GAAG,CAAC;EAACC,QAAD;EAAWC;AAAX,CAAD,kBAChB,6BAAC,cAAD;EACE,GAAG,EAAED,QADP;EAEE,KAAK,EAAE;IAACE,OAAO,EAAE,IAAV;IAAgBF;EAAhB,CAFT;EAGE,UAAU,EAAG,GAAEA,QAAS,EAH1B;EAIE,cAAc,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,EAA2CM,aAA3C,CARH;EAUA,MAAMuB,aAAa,GAAGT,WAAW,CAACU,GAAZ,CAAgB,CAACC,UAAD,EAAaC,KAAb,KAAuB;IAC3D,MAAMC,KAAK,GAAGnD,MAAM,CAACiD,UAAD,CAApB;IAEA,oBACE,6BAAC,cAAD;MAEIG,GAAG,EAAEd,WAAW,CAACe,MAAZ,GAAqBH,KAF9B;MAGID,UAHJ;MAIIE,KAJJ;MAKI7C,cALJ;MAMIO,oBANJ;MAQE,GAAG,EAAEoC;IARP,EADF;EAYD,CAfqB,CAAtB;;EAiBA,IAAIP,aAAJ,EAAmB;IACjBK,aAAa,CAACO,IAAd,eACE,6BAAC,cAAD;MAEIF,GAAG,EAAE,CAFT;MAGIH,UAAU,EAAEP,aAHhB;MAIIS,KAAK,EAAEnD,MAAM,CAAC0C,aAAD,CAJjB;MAKIpC,cALJ;MAMIO,oBANJ;MAQE,aAAa,EAAE,CAACW,aAAa,CAAC+B,aAAf,CARjB;MASE,GAAG,EAAEb;IATP,EADF;EAaD;;EAED,oBACE,6BAAC,qBAAD,CAAU,IAAV;IAAe,KAAK,EAAE,CAAC7C,KAAK,CAACG,MAAP,EAAemB,UAAU,CAACoC,aAA1B;EAAtB,GACGtC,SAAS,gBACR,6BAAC,SAAD;IAAW,QAAQ,EAAEqB,WAAW,CAACe,MAAZ,GAAqB,CAA1C;IAA6C,cAAc,EAAE/C;EAA7D,EADQ,GAEN,IAHN,EAIGyC,aAJH,CADF;AAQD,CA3GD;;eA6GevC,a"}
@@ -111,6 +111,10 @@ declare namespace PopinEnd {
111
111
  cards: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
112
112
  onScroll: PropTypes.Requireable<(...args: any[]) => any>;
113
113
  onShowMore: PropTypes.Requireable<(...args: any[]) => any>;
114
+ 'arrows-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
115
+ showMoreOnLeftAriaLabel: PropTypes.Requireable<string>;
116
+ showMoreOnRightAriaLabel: PropTypes.Requireable<string>;
117
+ }>>;
114
118
  }>>;
115
119
  feedback: PropTypes.Requireable<PropTypes.InferProps<{
116
120
  title: PropTypes.Requireable<string>;
@@ -117,6 +117,10 @@ declare namespace Summary {
117
117
  cards: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
118
118
  onScroll: PropTypes.Requireable<(...args: any[]) => any>;
119
119
  onShowMore: PropTypes.Requireable<(...args: any[]) => any>;
120
+ 'arrows-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
121
+ showMoreOnLeftAriaLabel: PropTypes.Requireable<string>;
122
+ showMoreOnRightAriaLabel: PropTypes.Requireable<string>;
123
+ }>>;
120
124
  }>>;
121
125
  const feedback: PropTypes.Requireable<PropTypes.InferProps<{
122
126
  title: PropTypes.Requireable<string>;
@@ -1,11 +1,11 @@
1
1
  export default Dashboard;
2
2
  declare function Dashboard(props: any): JSX.Element;
3
3
  declare namespace Dashboard {
4
- namespace propTypes {
5
- const hero: any;
6
- const welcome: any;
7
- const sections: PropTypes.Requireable<((PropTypes.InferPropsInner<Pick<any, any>> & Partial<PropTypes.InferPropsInner<Pick<any, never>>>) | null | undefined)[]>;
8
- const cookie: PropTypes.Requireable<PropTypes.InferProps<{
4
+ const propTypes: {
5
+ hero: any;
6
+ welcome: any;
7
+ sections: PropTypes.Requireable<((PropTypes.InferPropsInner<Pick<any, any>> & Partial<PropTypes.InferPropsInner<Pick<any, never>>>) | null | undefined)[]>;
8
+ cookie: PropTypes.Requireable<PropTypes.InferProps<{
9
9
  content: PropTypes.Requireable<string>;
10
10
  mode: PropTypes.Requireable<string>;
11
11
  header: PropTypes.Requireable<string>;
@@ -55,7 +55,11 @@ declare namespace Dashboard {
55
55
  requiredSelection: PropTypes.Requireable<boolean>;
56
56
  }> | null | undefined)[]>;
57
57
  }>>;
58
- }
58
+ 'arrows-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
59
+ showMoreOnLeftAriaLabel: PropTypes.Requireable<string>;
60
+ showMoreOnRightAriaLabel: PropTypes.Requireable<string>;
61
+ }>>;
62
+ };
59
63
  }
60
64
  import PropTypes from "prop-types";
61
65
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/dashboard/index.js"],"names":[],"mappings":";AAqBA,oDAsCC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/dashboard/index.js"],"names":[],"mappings":";AAqBA,oDA4CC"}
@@ -27,6 +27,8 @@ var _style = _interopRequireDefault(require("./style.css"));
27
27
 
28
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
29
 
30
+ 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); }
31
+
30
32
  const Hero = /*#__PURE__*/_react.default.memo(function Hero({
31
33
  hero,
32
34
  welcome
@@ -46,7 +48,8 @@ const Dashboard = props => {
46
48
  sections = [],
47
49
  hero,
48
50
  welcome,
49
- cookie
51
+ cookie,
52
+ 'arrows-aria-label': showMoreOnLeftOrRightAriaLabel
50
53
  } = props;
51
54
 
52
55
  const buildSectionComponent = section => {
@@ -65,7 +68,9 @@ const Dashboard = props => {
65
68
  return /*#__PURE__*/_react.default.createElement(_battleRequestList.default, section);
66
69
 
67
70
  case 'cards':
68
- return /*#__PURE__*/_react.default.createElement(_cardsList.default, section);
71
+ return /*#__PURE__*/_react.default.createElement(_cardsList.default, _extends({}, section, {
72
+ "arrows-aria-label": showMoreOnLeftOrRightAriaLabel
73
+ }));
69
74
 
70
75
  case 'news':
71
76
  return /*#__PURE__*/_react.default.createElement(_newsList.default, section);
@@ -104,7 +109,8 @@ Dashboard.propTypes = process.env.NODE_ENV !== "production" ? {
104
109
  hero: Hero.propTypes.hero,
105
110
  welcome: Hero.propTypes.welcome,
106
111
  sections: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape(_battleRequestList.default.propTypes), _propTypes.default.shape(_cardsList.default.propTypes), _propTypes.default.shape(_newsList.default.propTypes), _propTypes.default.shape(_startBattle.default.propTypes), _propTypes.default.shape(_reviewBanner.default.propTypes)])),
107
- cookie: _propTypes.default.shape(_cmPopin.default.propTypes)
112
+ cookie: _propTypes.default.shape(_cmPopin.default.propTypes),
113
+ 'arrows-aria-label': _cardsList.default.propTypes['arrows-aria-label']
108
114
  } : {};
109
115
  var _default = Dashboard;
110
116
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Hero","React","memo","hero","welcome","style","propTypes","PropTypes","shape","HeroCard","Slide","Dashboard","props","sections","cookie","buildSectionComponent","section","type","buildSection","index","sectionView","sectionsList","key","map","wrapper","arrayOf","oneOfType","BattleRequestList","CardsList","NewsList","StartBattle","ReviewBanner","CMPopin"],"sources":["../../../../src/template/common/dashboard/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Slide from '../../../atom/slide';\nimport HeroCard from '../../../molecule/hero';\nimport BattleRequestList from '../../../molecule/dashboard/battle-request-list';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport NewsList from '../../../molecule/dashboard/news-list';\nimport StartBattle from '../../../molecule/dashboard/start-battle';\nimport CMPopin from '../../../molecule/cm-popin';\nimport ReviewBanner from '../../../molecule/dashboard/review-banner';\nimport style from './style.css';\n\nconst Hero = React.memo(function Hero({hero, welcome}) {\n return <div className={style.hero}>{hero ? <HeroCard {...hero} /> : <Slide {...welcome} />}</div>;\n});\n\nHero.propTypes = {\n hero: PropTypes.shape(HeroCard.propTypes),\n welcome: PropTypes.shape(Slide.propTypes)\n};\n\nconst Dashboard = props => {\n const {sections = [], hero, welcome, cookie} = props;\n\n const buildSectionComponent = section => {\n const {type} = section;\n switch (type) {\n case 'hero':\n return <Hero hero={hero} welcome={welcome} />;\n case 'battleRequests':\n return <BattleRequestList {...section} />;\n case 'cards':\n return <CardsList {...section} />;\n case 'news':\n return <NewsList {...section} />;\n case 'battle':\n return <StartBattle {...section} />;\n case 'review':\n return <ReviewBanner {...section} />;\n default:\n return null;\n }\n };\n\n const buildSection = (section, index) => {\n const sectionView = buildSectionComponent(section);\n\n return <div key={index}>{sectionView}</div>;\n };\n\n const sectionsList = [{type: 'hero', key: 'hero'}, ...sections].map(section => (\n <div key={section.key}>{buildSection(section)}</div>\n ));\n return (\n <div className={style.wrapper} data-name=\"dashboard\">\n {sectionsList}\n {cookie ? <CMPopin {...cookie} /> : null}\n </div>\n );\n};\n\nDashboard.propTypes = {\n hero: Hero.propTypes.hero,\n welcome: Hero.propTypes.welcome,\n sections: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape(BattleRequestList.propTypes),\n PropTypes.shape(CardsList.propTypes),\n PropTypes.shape(NewsList.propTypes),\n PropTypes.shape(StartBattle.propTypes),\n PropTypes.shape(ReviewBanner.propTypes)\n ])\n ),\n cookie: PropTypes.shape(CMPopin.propTypes)\n};\nexport default Dashboard;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,IAAI,gBAAGC,cAAA,CAAMC,IAAN,CAAW,SAASF,IAAT,CAAc;EAACG,IAAD;EAAOC;AAAP,CAAd,EAA+B;EACrD,oBAAO;IAAK,SAAS,EAAEC,cAAA,CAAMF;EAAtB,GAA6BA,IAAI,gBAAG,6BAAC,aAAD,EAAcA,IAAd,CAAH,gBAA4B,6BAAC,cAAD,EAAWC,OAAX,CAA7D,CAAP;AACD,CAFY,CAAb;;AAIAJ,IAAI,CAACM,SAAL,2CAAiB;EACfH,IAAI,EAAEI,kBAAA,CAAUC,KAAV,CAAgBC,aAAA,CAASH,SAAzB,CADS;EAEfF,OAAO,EAAEG,kBAAA,CAAUC,KAAV,CAAgBE,cAAA,CAAMJ,SAAtB;AAFM,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,gBAAG,6BAAC,gBAAD,EAAaA,MAAb,CAAH,GAA6B,IAFtC,CADF;AAMD,CAtCD;;AAwCAH,SAAS,CAACL,SAAV,2CAAsB;EACpBH,IAAI,EAAEH,IAAI,CAACM,SAAL,CAAeH,IADD;EAEpBC,OAAO,EAAEJ,IAAI,CAACM,SAAL,CAAeF,OAFJ;EAGpBS,QAAQ,EAAEN,kBAAA,CAAUkB,OAAV,CACRlB,kBAAA,CAAUmB,SAAV,CAAoB,CAClBnB,kBAAA,CAAUC,KAAV,CAAgBmB,0BAAA,CAAkBrB,SAAlC,CADkB,EAElBC,kBAAA,CAAUC,KAAV,CAAgBoB,kBAAA,CAAUtB,SAA1B,CAFkB,EAGlBC,kBAAA,CAAUC,KAAV,CAAgBqB,iBAAA,CAASvB,SAAzB,CAHkB,EAIlBC,kBAAA,CAAUC,KAAV,CAAgBsB,oBAAA,CAAYxB,SAA5B,CAJkB,EAKlBC,kBAAA,CAAUC,KAAV,CAAgBuB,qBAAA,CAAazB,SAA7B,CALkB,CAApB,CADQ,CAHU;EAYpBQ,MAAM,EAAEP,kBAAA,CAAUC,KAAV,CAAgBwB,gBAAA,CAAQ1B,SAAxB;AAZY,CAAtB;eAceK,S"}
1
+ {"version":3,"file":"index.js","names":["Hero","React","memo","hero","welcome","style","propTypes","PropTypes","shape","HeroCard","Slide","Dashboard","props","sections","cookie","showMoreOnLeftOrRightAriaLabel","buildSectionComponent","section","type","buildSection","index","sectionView","sectionsList","key","map","wrapper","arrayOf","oneOfType","BattleRequestList","CardsList","NewsList","StartBattle","ReviewBanner","CMPopin"],"sources":["../../../../src/template/common/dashboard/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Slide from '../../../atom/slide';\nimport HeroCard from '../../../molecule/hero';\nimport BattleRequestList from '../../../molecule/dashboard/battle-request-list';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport NewsList from '../../../molecule/dashboard/news-list';\nimport StartBattle from '../../../molecule/dashboard/start-battle';\nimport CMPopin from '../../../molecule/cm-popin';\nimport ReviewBanner from '../../../molecule/dashboard/review-banner';\nimport style from './style.css';\n\nconst Hero = React.memo(function Hero({hero, welcome}) {\n return <div className={style.hero}>{hero ? <HeroCard {...hero} /> : <Slide {...welcome} />}</div>;\n});\n\nHero.propTypes = {\n hero: PropTypes.shape(HeroCard.propTypes),\n welcome: PropTypes.shape(Slide.propTypes)\n};\n\nconst Dashboard = props => {\n const {\n sections = [],\n hero,\n welcome,\n cookie,\n 'arrows-aria-label': showMoreOnLeftOrRightAriaLabel\n } = props;\n\n const buildSectionComponent = section => {\n const {type} = section;\n switch (type) {\n case 'hero':\n return <Hero hero={hero} welcome={welcome} />;\n case 'battleRequests':\n return <BattleRequestList {...section} />;\n case 'cards':\n return <CardsList {...section} arrows-aria-label={showMoreOnLeftOrRightAriaLabel} />;\n case 'news':\n return <NewsList {...section} />;\n case 'battle':\n return <StartBattle {...section} />;\n case 'review':\n return <ReviewBanner {...section} />;\n default:\n return null;\n }\n };\n\n const buildSection = (section, index) => {\n const sectionView = buildSectionComponent(section);\n\n return <div key={index}>{sectionView}</div>;\n };\n\n const sectionsList = [{type: 'hero', key: 'hero'}, ...sections].map(section => (\n <div key={section.key}>{buildSection(section)}</div>\n ));\n return (\n <div className={style.wrapper} data-name=\"dashboard\">\n {sectionsList}\n {cookie ? <CMPopin {...cookie} /> : null}\n </div>\n );\n};\n\nDashboard.propTypes = {\n hero: Hero.propTypes.hero,\n welcome: Hero.propTypes.welcome,\n sections: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape(BattleRequestList.propTypes),\n PropTypes.shape(CardsList.propTypes),\n PropTypes.shape(NewsList.propTypes),\n PropTypes.shape(StartBattle.propTypes),\n PropTypes.shape(ReviewBanner.propTypes)\n ])\n ),\n cookie: PropTypes.shape(CMPopin.propTypes),\n 'arrows-aria-label': CardsList.propTypes['arrows-aria-label']\n};\nexport default Dashboard;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;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P,kBAAA,CAAUC,KAAV,CAAgByB,gBAAA,CAAQ3B,SAAxB,CAZY;EAapB,qBAAqBuB,kBAAA,CAAUvB,SAAV,CAAoB,mBAApB;AAbD,CAAtB;eAeeK,S"}
@@ -90,6 +90,10 @@ declare namespace SearchPage {
90
90
  cards: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
91
91
  onScroll: PropTypes.Requireable<(...args: any[]) => any>;
92
92
  onShowMore: PropTypes.Requireable<(...args: any[]) => any>;
93
+ 'arrows-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
94
+ showMoreOnLeftAriaLabel: PropTypes.Requireable<string>;
95
+ showMoreOnRightAriaLabel: PropTypes.Requireable<string>;
96
+ }>>;
93
97
  }>>;
94
98
  }
95
99
  }
@@ -38,6 +38,10 @@ declare namespace TeamsDashboard {
38
38
  cards: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
39
39
  onScroll: PropTypes.Requireable<(...args: any[]) => any>;
40
40
  onShowMore: PropTypes.Requireable<(...args: any[]) => any>;
41
+ 'arrows-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
42
+ showMoreOnLeftAriaLabel: PropTypes.Requireable<string>;
43
+ showMoreOnRightAriaLabel: PropTypes.Requireable<string>;
44
+ }>>;
41
45
  }> | null | undefined)[]>;
42
46
  const isLoading: PropTypes.Requireable<boolean>;
43
47
  }
@@ -0,0 +1 @@
1
+ {"ignore_dirs":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorpacademy/components",
3
- "version": "11.2.3",
3
+ "version": "11.2.4",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -159,5 +159,5 @@
159
159
  "last 2 versions",
160
160
  "IE 11"
161
161
  ],
162
- "gitHead": "28e55cb1f4cb5460111c0c93860dfc5264081f5e"
162
+ "gitHead": "f2f35ab23fac17677ebdead117fff3401d8252dc"
163
163
  }