@coorpacademy/components 11.2.10 → 11.2.12

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 (93) hide show
  1. package/es/atom/lottie-wrapper/index.d.ts.map +1 -1
  2. package/es/atom/lottie-wrapper/index.js +9 -3
  3. package/es/atom/lottie-wrapper/index.js.map +1 -1
  4. package/es/atom/lottie-wrapper/prop-types.d.ts +2 -2
  5. package/es/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
  6. package/es/atom/lottie-wrapper/prop-types.js +1 -1
  7. package/es/atom/lottie-wrapper/prop-types.js.map +1 -1
  8. package/es/atom/review-presentation/index.d.ts.map +1 -1
  9. package/es/atom/review-presentation/index.js +9 -5
  10. package/es/atom/review-presentation/index.js.map +1 -1
  11. package/es/atom/review-presentation/prop-types.d.ts +8 -0
  12. package/es/atom/review-presentation/prop-types.d.ts.map +1 -1
  13. package/es/atom/review-presentation/prop-types.js +2 -1
  14. package/es/atom/review-presentation/prop-types.js.map +1 -1
  15. package/es/molecule/review-card-congrats/prop-types.d.ts +1 -1
  16. package/es/organism/review-congrats/index.d.ts.map +1 -1
  17. package/es/organism/review-congrats/index.js +8 -6
  18. package/es/organism/review-congrats/index.js.map +1 -1
  19. package/es/organism/review-congrats/prop-types.d.ts +3 -3
  20. package/es/organism/review-stacked-slides/index.native.js +1 -1
  21. package/es/organism/review-stacked-slides/index.native.js.map +1 -1
  22. package/es/organism/user-preferences/index.d.ts +1 -0
  23. package/es/organism/user-preferences/index.d.ts.map +1 -1
  24. package/es/organism/user-preferences/index.js +11 -6
  25. package/es/organism/user-preferences/index.js.map +1 -1
  26. package/es/template/activity/index.d.ts +2 -0
  27. package/es/template/activity/index.d.ts.map +1 -1
  28. package/es/template/activity/index.js +4 -1
  29. package/es/template/activity/index.js.map +1 -1
  30. package/es/template/activity/progression-item.d.ts +1 -0
  31. package/es/template/activity/progression-item.d.ts.map +1 -1
  32. package/es/template/activity/progression-item.js +5 -2
  33. package/es/template/activity/progression-item.js.map +1 -1
  34. package/es/template/app-review/index.d.ts +4 -47
  35. package/es/template/app-review/index.d.ts.map +1 -1
  36. package/es/template/app-review/index.js +0 -10
  37. package/es/template/app-review/index.js.map +1 -1
  38. package/es/template/app-review/index.native.d.ts.map +1 -1
  39. package/es/template/app-review/index.native.js +0 -8
  40. package/es/template/app-review/index.native.js.map +1 -1
  41. package/es/template/app-review/player/prop-types.d.ts +3 -3
  42. package/es/template/app-review/prop-types.d.ts +4 -51
  43. package/es/template/app-review/prop-types.d.ts.map +1 -1
  44. package/es/template/app-review/prop-types.js +1 -5
  45. package/es/template/app-review/prop-types.js.map +1 -1
  46. package/es/template/review-dashboard-skills/index.d.ts +4 -0
  47. package/lib/atom/lottie-wrapper/index.d.ts.map +1 -1
  48. package/lib/atom/lottie-wrapper/index.js +9 -3
  49. package/lib/atom/lottie-wrapper/index.js.map +1 -1
  50. package/lib/atom/lottie-wrapper/prop-types.d.ts +2 -2
  51. package/lib/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
  52. package/lib/atom/lottie-wrapper/prop-types.js +1 -1
  53. package/lib/atom/lottie-wrapper/prop-types.js.map +1 -1
  54. package/lib/atom/review-presentation/index.d.ts.map +1 -1
  55. package/lib/atom/review-presentation/index.js +9 -5
  56. package/lib/atom/review-presentation/index.js.map +1 -1
  57. package/lib/atom/review-presentation/prop-types.d.ts +8 -0
  58. package/lib/atom/review-presentation/prop-types.d.ts.map +1 -1
  59. package/lib/atom/review-presentation/prop-types.js +2 -1
  60. package/lib/atom/review-presentation/prop-types.js.map +1 -1
  61. package/lib/molecule/review-card-congrats/prop-types.d.ts +1 -1
  62. package/lib/organism/review-congrats/index.d.ts.map +1 -1
  63. package/lib/organism/review-congrats/index.js +3 -1
  64. package/lib/organism/review-congrats/index.js.map +1 -1
  65. package/lib/organism/review-congrats/prop-types.d.ts +3 -3
  66. package/lib/organism/review-stacked-slides/index.native.js +1 -1
  67. package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
  68. package/lib/organism/user-preferences/index.d.ts +1 -0
  69. package/lib/organism/user-preferences/index.d.ts.map +1 -1
  70. package/lib/organism/user-preferences/index.js +11 -6
  71. package/lib/organism/user-preferences/index.js.map +1 -1
  72. package/lib/template/activity/index.d.ts +2 -0
  73. package/lib/template/activity/index.d.ts.map +1 -1
  74. package/lib/template/activity/index.js +4 -1
  75. package/lib/template/activity/index.js.map +1 -1
  76. package/lib/template/activity/progression-item.d.ts +1 -0
  77. package/lib/template/activity/progression-item.d.ts.map +1 -1
  78. package/lib/template/activity/progression-item.js +5 -2
  79. package/lib/template/activity/progression-item.js.map +1 -1
  80. package/lib/template/app-review/index.d.ts +4 -47
  81. package/lib/template/app-review/index.d.ts.map +1 -1
  82. package/lib/template/app-review/index.js +0 -12
  83. package/lib/template/app-review/index.js.map +1 -1
  84. package/lib/template/app-review/index.native.d.ts.map +1 -1
  85. package/lib/template/app-review/index.native.js +0 -9
  86. package/lib/template/app-review/index.native.js.map +1 -1
  87. package/lib/template/app-review/player/prop-types.d.ts +3 -3
  88. package/lib/template/app-review/prop-types.d.ts +4 -51
  89. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  90. package/lib/template/app-review/prop-types.js +1 -7
  91. package/lib/template/app-review/prop-types.js.map +1 -1
  92. package/lib/template/review-dashboard-skills/index.d.ts +4 -0
  93. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["isIE11","window","userAgent","get","hasMsCrypto","has","hasRevision","includes","hasTrident","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","ie11ImageBackup","backupImageClassName","animationControl","animationClassName","useRef","animationItem","setAnimationItem","useState","isAnimationVisible","setIsAnimationVisible","_isIE11","useMemo","wrapperClassName","classnames","style","lottieContainer","lottieAnimationClassName","ie11BackupImageClassName","backupImage","useEffect","keys","omit","ANIMATION_CONTROL","stop","lottie","unfetch","destroy","name","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 get from 'lodash/fp/get';\nimport has from 'lodash/fp/has';\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\nconst isIE11 = () => {\n if (typeof window === 'undefined') return;\n const userAgent = get('navigator.userAgent', window);\n const hasMsCrypto = has('msCrypto', window);\n const hasRevision = includes('rv:', userAgent);\n const hasTrident = includes('Trident/', userAgent);\n\n return hasMsCrypto || (hasRevision && hasTrident);\n};\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 ie11ImageBackup,\n backupImageClassName,\n autoplay = true,\n animationControl\n } = props;\n\n const {className: animationClassName, hideOnTransparent = true} = rendererSettings;\n\n const containerRef = useRef(null);\n\n // lottie's animation instance\n const [animationItem, setAnimationItem] = useState(null);\n\n const [isAnimationVisible, setIsAnimationVisible] = useState(autoplay);\n\n const _isIE11 = useMemo(() => isIE11(), []);\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 const ie11BackupImageClassName = useMemo(\n () => classnames(backupImageClassName, style.backupImage),\n [backupImageClassName]\n );\n\n useEffect(() => {\n // enzyme does not handle well the state update after an async useEffect in tests\n // to remove when the migration towards @testing-library/react is done\n /* istanbul ignore next */\n if (includes(animationControl, keys(omit('loading', ANIMATION_CONTROL))) && !autoplay) {\n setIsAnimationVisible(true);\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 if (!_isIE11 && !animationItem) {\n /* istanbul ignore else */\n if (typeof window !== 'undefined') {\n window.lottie = lottie;\n }\n const animation = await fetchAndLoadAnimation(\n lottie,\n unfetch,\n animationSrc,\n containerRef,\n loop,\n lottieAnimationClassName,\n hideOnTransparent,\n autoplay\n );\n\n /* istanbul ignore next */\n setAnimationItem(animation);\n }\n };\n\n loadAnimation();\n return () => animationItem && /* istanbul ignore next */ lottie.destroy(animationItem.name);\n }, [\n lottieAnimationClassName,\n containerRef,\n hideOnTransparent,\n loop,\n animationSrc,\n _isIE11,\n animationItem,\n autoplay\n ]);\n\n return (\n <div\n ref={containerRef}\n aria-label={ariaLabel}\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 {_isIE11 ? (\n <img\n src={ie11ImageBackup}\n className={ie11BackupImageClassName}\n data-name=\"ie11-backup-image\"\n />\n ) : null}\n </div>\n );\n};\n\nLottieWrapper.propTypes = propTypes;\n\nexport default LottieWrapper;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAG,MAAM;EACnB,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;EACnC,MAAMC,SAAS,GAAG,IAAAC,YAAA,EAAI,qBAAJ,EAA2BF,MAA3B,CAAlB;EACA,MAAMG,WAAW,GAAG,IAAAC,YAAA,EAAI,UAAJ,EAAgBJ,MAAhB,CAApB;EACA,MAAMK,WAAW,GAAG,IAAAC,iBAAA,EAAS,KAAT,EAAgBL,SAAhB,CAApB;EACA,MAAMM,UAAU,GAAG,IAAAD,iBAAA,EAAS,UAAT,EAAqBL,SAArB,CAAnB;EAEA,OAAOE,WAAW,IAAKE,WAAW,IAAIE,UAAtC;AACD,CARD;;AAUO,MAAMC,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,EAArB;EACA,MAAMC,WAAW,GAAG,MAAMV,MAAM,CAACO,YAAD,EAAe;IAC7CI,OAAO,EAAE;MACP,oBAAoB,gBADb;MAEP,gBAAgB;IAFT;EADoC,CAAf,CAAhC;EAOA,MAAMC,aAAa,GAAG,MAAMF,WAAW,CAACG,IAAZ,EAA5B;;EAEA,MAAMC,SAAS,GACbf,OAAO,CAACgB,aAAR,IACAhB,OAAO,CAACgB,aAAR,CAAsB;IACpBC,SAAS,EAAEd,YAAY,CAACe,OADJ;IACa;IACjCC,QAAQ,EAAE,KAFU;IAGpBZ,QAHoB;I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DF,YALC,EAMDqC,OANC,EAODL,aAPC,EAQD3B,QARC,CAzBH;EAoCA,oBACE;IACE,GAAG,EAAEJ,YADP;IAEE,cAAYuB,SAFd;IAGE,aAAWD,QAHb;IAIE,SAAS,EAAEgB,gBAJb;IAKE,KAAK,eACCd,KAAK,IAAI;MACXA,KAAK,EAAG,GAAEA,KAAM,IADL;MAEX8B,QAAQ,EAAG,GAAE9B,KAAM;IAFR,CADV,EAKCC,MAAM,IAAI;MACZA,MAAM,EAAG,GAAEA,MAAO,IADN;MAEZ8B,SAAS,EAAG,GAAE9B,MAAO;IAFT,CALX;MASH+B,OAAO,EAAEtB,kBAAkB,GAAG,CAAH,GAAO,CAT/B;MAUHuB,UAAU,EAAE;IAVT;EALP,GAkBGrB,OAAO,gBACN;IACE,GAAG,EAAEV,eADP;IAEE,SAAS,EAAEiB,wBAFb;IAGE,aAAU;EAHZ,EADM,GAMJ,IAxBN,CADF;AA4BD,CAlHD;;AAoHAvB,aAAa,CAACsC,SAAd,2CAA0BA,kBAA1B;eAEetC,a"}
1
+ {"version":3,"file":"index.js","names":["isIE11","window","userAgent","get","hasMsCrypto","has","hasRevision","includes","hasTrident","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","ie11ImageBackup","backupImageClassName","animationControl","animationClassName","useRef","animationItem","setAnimationItem","useState","isAnimationVisible","setIsAnimationVisible","_isIE11","useMemo","wrapperClassName","classnames","style","lottieContainer","lottieAnimationClassName","ie11BackupImageClassName","backupImage","useEffect","keys","omit","ANIMATION_CONTROL","stop","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 get from 'lodash/fp/get';\nimport has from 'lodash/fp/has';\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\nconst isIE11 = () => {\n if (typeof window === 'undefined') return;\n const userAgent = get('navigator.userAgent', window);\n const hasMsCrypto = has('msCrypto', window);\n const hasRevision = includes('rv:', userAgent);\n const hasTrident = includes('Trident/', userAgent);\n\n return hasMsCrypto || (hasRevision && hasTrident);\n};\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 ie11ImageBackup,\n backupImageClassName,\n autoplay = true,\n animationControl\n } = props;\n\n const {className: animationClassName, hideOnTransparent = true} = rendererSettings;\n\n const containerRef = useRef(null);\n\n // lottie's animation instance\n const [animationItem, setAnimationItem] = useState(null);\n\n const [isAnimationVisible, setIsAnimationVisible] = useState(autoplay);\n\n const _isIE11 = useMemo(() => isIE11(), []);\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 const ie11BackupImageClassName = useMemo(\n () => classnames(backupImageClassName, style.backupImage),\n [backupImageClassName]\n );\n\n useEffect(() => {\n // enzyme does not handle well the state update after an async useEffect in tests\n // to remove when the migration towards @testing-library/react is done\n /* istanbul ignore next */\n if (includes(animationControl, keys(omit('loading', ANIMATION_CONTROL))) && !autoplay) {\n setIsAnimationVisible(true);\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 if (!_isIE11 && !animationItem) {\n /* istanbul ignore else */\n if (typeof window !== 'undefined') {\n window.lottie = lottie;\n }\n const animation = await fetchAndLoadAnimation(\n lottie,\n unfetch,\n animationSrc,\n containerRef,\n loop,\n lottieAnimationClassName,\n hideOnTransparent,\n autoplay\n );\n\n /* istanbul ignore next */\n setAnimationItem(animation);\n }\n };\n\n loadAnimation();\n return () => animationItem && /* istanbul ignore next */ lottie.destroy(animationItem.name);\n }, [\n lottieAnimationClassName,\n containerRef,\n hideOnTransparent,\n loop,\n animationSrc,\n _isIE11,\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 {_isIE11 ? (\n <img\n src={ie11ImageBackup}\n className={ie11BackupImageClassName}\n data-name=\"ie11-backup-image\"\n />\n ) : null}\n </div>\n );\n};\n\nLottieWrapper.propTypes = propTypes;\n\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AAcA,SADhB;IAEEgC,IAAI,EAAE;EAFR,CADgC,GAKhC;IACE,eAAe,MADjB;IAEEA,IAAI,EAAE;EAFR,CALJ;EAUA,oBACE,iDACMD,kBADN;IAEE,GAAG,EAAEtD,YAFP;IAGE,aAAWsB,QAHb;IAIE,SAAS,EAAEgB,gBAJb;IAKE,KAAK,eACCd,KAAK,IAAI;MACXA,KAAK,EAAG,GAAEA,KAAM,IADL;MAEXgC,QAAQ,EAAG,GAAEhC,KAAM;IAFR,CADV,EAKCC,MAAM,IAAI;MACZA,MAAM,EAAG,GAAEA,MAAO,IADN;MAEZgC,SAAS,EAAG,GAAEhC,MAAO;IAFT,CALX;MASHiC,OAAO,EAAExB,kBAAkB,GAAG,CAAH,GAAO,CAT/B;MAUHyB,UAAU,EAAE;IAVT;EALP,IAkBGvB,OAAO,gBACN;IACE,GAAG,EAAEV,eADP;IAEE,SAAS,EAAEiB,wBAFb;IAGE,aAAU;EAHZ,EADM,GAMJ,IAxBN,CADF;AA4BD,CA5HD;;AA8HAvB,aAAa,CAACwC,SAAd,2CAA0BA,kBAA1B;eAEexC,a"}
@@ -1,6 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  export declare type LottieAnimationProps = {
3
- 'aria-label': string;
3
+ 'aria-label'?: string;
4
4
  'data-name'?: string;
5
5
  animationSrc: string;
6
6
  loop?: boolean;
@@ -23,7 +23,7 @@ export declare const ANIMATION_CONTROL: {
23
23
  loading: string;
24
24
  };
25
25
  declare const propTypes: {
26
- 'aria-label': PropTypes.Validator<string>;
26
+ 'aria-label': PropTypes.Requireable<string>;
27
27
  'data-name': PropTypes.Requireable<string>;
28
28
  animationSrc: PropTypes.Validator<string>;
29
29
  loop: PropTypes.Requireable<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,oBAAY,oBA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AAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;CAK7B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -17,7 +17,7 @@ const ANIMATION_CONTROL = {
17
17
  };
18
18
  exports.ANIMATION_CONTROL = ANIMATION_CONTROL;
19
19
  const propTypes = {
20
- 'aria-label': _propTypes.default.string.isRequired,
20
+ 'aria-label': _propTypes.default.string,
21
21
  'data-name': _propTypes.default.string,
22
22
  animationSrc: _propTypes.default.string.isRequired,
23
23
  loop: _propTypes.default.bool,
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["ANIMATION_CONTROL","play","pause","stop","loading","propTypes","PropTypes","string","isRequired","animationSrc","loop","bool","rendererSettings","shape","hideOnTransparent","className","height","number","width","ie11ImageBackup","backupImageClassName","autoplay","animationControl","oneOf","keys"],"sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"sourcesContent":["import keys from 'lodash/fp/keys';\nimport PropTypes from 'prop-types';\n\nexport type LottieAnimationProps = {\n 'aria-label': string;\n 'data-name'?: string;\n animationSrc: string;\n loop?: boolean;\n rendererSettings?: {\n hideOnTransparent?: boolean;\n className?: string;\n };\n height?: number;\n width?: number;\n className?: string;\n ie11ImageBackup: string;\n backupImageClassName?: string;\n autoplay?: boolean;\n animationControl?: 'play' | 'pause' | 'stop' | 'loading';\n};\n\nexport const ANIMATION_CONTROL = {\n play: 'play',\n pause: 'pause',\n stop: 'stop',\n loading: 'loading'\n};\n\nconst propTypes = {\n 'aria-label': PropTypes.string.isRequired,\n 'data-name': PropTypes.string,\n animationSrc: PropTypes.string.isRequired,\n loop: PropTypes.bool,\n rendererSettings: PropTypes.shape({\n hideOnTransparent: PropTypes.bool,\n className: PropTypes.string\n }),\n height: PropTypes.number,\n width: PropTypes.number,\n className: PropTypes.string,\n ie11ImageBackup: PropTypes.string.isRequired,\n backupImageClassName: PropTypes.string,\n autoplay: PropTypes.bool,\n animationControl: PropTypes.oneOf(keys(ANIMATION_CONTROL))\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA;;AACA;;;;AAoBO,MAAMA,iBAAiB,GAAG;EAC/BC,IAAI,EAAE,MADyB;EAE/BC,KAAK,EAAE,OAFwB;EAG/BC,IAAI,EAAE,MAHyB;EAI/BC,OAAO,EAAE;AAJsB,CAA1B;;AAOP,MAAMC,SAAS,GAAG;EAChB,cAAcC,kBAAA,CAAUC,MAAV,CAAiBC,UADf;EAEhB,aAAaF,kBAAA,CAAUC,MAFP;EAGhBE,YAAY,EAAEH,kBAAA,CAAUC,MAAV,CAAiBC,UAHf;EAIhBE,IAAI,EAAEJ,kBAAA,CAAUK,IAJA;EAKhBC,gBAAgB,EAAEN,kBAAA,CAAUO,KAAV,CAAgB;IAChCC,iBAAiB,EAAER,kBAAA,CAAUK,IADG;IAEhCI,SAAS,EAAET,kBAAA,CAAUC;EAFW,CAAhB,CALF;EAShBS,MAAM,EAAEV,kBAAA,CAAUW,MATF;EAUhBC,KAAK,EAAEZ,kBAAA,CAAUW,MAVD;EAWhBF,SAAS,EAAET,kBAAA,CAAUC,MAXL;EAYhBY,eAAe,EAAEb,kBAAA,CAAUC,MAAV,CAAiBC,UAZlB;EAahBY,oBAAoB,EAAEd,kBAAA,CAAUC,MAbhB;EAchBc,QAAQ,EAAEf,kBAAA,CAAUK,IAdJ;EAehBW,gBAAgB,EAAEhB,kBAAA,CAAUiB,KAAV,CAAgB,IAAAC,aAAA,EAAKxB,iBAAL,CAAhB;AAfF,CAAlB;eAkBeK,S"}
1
+ {"version":3,"file":"prop-types.js","names":["ANIMATION_CONTROL","play","pause","stop","loading","propTypes","PropTypes","string","animationSrc","isRequired","loop","bool","rendererSettings","shape","hideOnTransparent","className","height","number","width","ie11ImageBackup","backupImageClassName","autoplay","animationControl","oneOf","keys"],"sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"sourcesContent":["import keys from 'lodash/fp/keys';\nimport PropTypes from 'prop-types';\n\nexport type LottieAnimationProps = {\n 'aria-label'?: string;\n 'data-name'?: string;\n animationSrc: string;\n loop?: boolean;\n rendererSettings?: {\n hideOnTransparent?: boolean;\n className?: string;\n };\n height?: number;\n width?: number;\n className?: string;\n ie11ImageBackup: string;\n backupImageClassName?: string;\n autoplay?: boolean;\n animationControl?: 'play' | 'pause' | 'stop' | 'loading';\n};\n\nexport const ANIMATION_CONTROL = {\n play: 'play',\n pause: 'pause',\n stop: 'stop',\n loading: 'loading'\n};\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n animationSrc: PropTypes.string.isRequired,\n loop: PropTypes.bool,\n rendererSettings: PropTypes.shape({\n hideOnTransparent: PropTypes.bool,\n className: PropTypes.string\n }),\n height: PropTypes.number,\n width: PropTypes.number,\n className: PropTypes.string,\n ie11ImageBackup: PropTypes.string.isRequired,\n backupImageClassName: PropTypes.string,\n autoplay: PropTypes.bool,\n animationControl: PropTypes.oneOf(keys(ANIMATION_CONTROL))\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA;;AACA;;;;AAoBO,MAAMA,iBAAiB,GAAG;EAC/BC,IAAI,EAAE,MADyB;EAE/BC,KAAK,EAAE,OAFwB;EAG/BC,IAAI,EAAE,MAHyB;EAI/BC,OAAO,EAAE;AAJsB,CAA1B;;AAOP,MAAMC,SAAS,GAAG;EAChB,cAAcC,kBAAA,CAAUC,MADR;EAEhB,aAAaD,kBAAA,CAAUC,MAFP;EAGhBC,YAAY,EAAEF,kBAAA,CAAUC,MAAV,CAAiBE,UAHf;EAIhBC,IAAI,EAAEJ,kBAAA,CAAUK,IAJA;EAKhBC,gBAAgB,EAAEN,kBAAA,CAAUO,KAAV,CAAgB;IAChCC,iBAAiB,EAAER,kBAAA,CAAUK,IADG;IAEhCI,SAAS,EAAET,kBAAA,CAAUC;EAFW,CAAhB,CALF;EAShBS,MAAM,EAAEV,kBAAA,CAAUW,MATF;EAUhBC,KAAK,EAAEZ,kBAAA,CAAUW,MAVD;EAWhBF,SAAS,EAAET,kBAAA,CAAUC,MAXL;EAYhBY,eAAe,EAAEb,kBAAA,CAAUC,MAAV,CAAiBE,UAZlB;EAahBW,oBAAoB,EAAEd,kBAAA,CAAUC,MAbhB;EAchBc,QAAQ,EAAEf,kBAAA,CAAUK,IAdJ;EAehBW,gBAAgB,EAAEhB,kBAAA,CAAUiB,KAAV,CAAgB,IAAAC,aAAA,EAAKxB,iBAAL,CAAhB;AAfF,CAAlB;eAkBeK,S"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.js"],"names":[],"mappings":";AA4CA,6DA+BC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.js"],"names":[],"mappings":";AAiDA,6DA8BC"}
@@ -42,7 +42,8 @@ const getIcon = icon => {
42
42
  };
43
43
 
44
44
  const ToolTip = ({
45
- tooltipText
45
+ tooltipText,
46
+ 'aria-label': moreDetailsAriaLabel
46
47
  }) => {
47
48
  return /*#__PURE__*/_react.default.createElement("div", {
48
49
  className: _style.default.tooltipContainer
@@ -51,10 +52,11 @@ const ToolTip = ({
51
52
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyInformationIcon, {
52
53
  className: _style.default.informationIcon,
53
54
  width: 12,
54
- height: 12
55
+ height: 12,
56
+ "aria-label": moreDetailsAriaLabel
55
57
  })), /*#__PURE__*/_react.default.createElement("div", {
56
58
  className: _style.default.toolTip
57
- }, /*#__PURE__*/_react.default.createElement("div", {
59
+ }, /*#__PURE__*/_react.default.createElement("p", {
58
60
  className: _style.default.tooltipText
59
61
  }, tooltipText)));
60
62
  };
@@ -96,13 +98,15 @@ const ReviewPresentation = props => {
96
98
  }, /*#__PURE__*/_react.default.createElement("div", {
97
99
  className: _style.default.reviewListText
98
100
  }, getIcon(key), " ", label.text), /*#__PURE__*/_react.default.createElement(ToolTip, {
99
- tooltipText: label.tooltipText
101
+ tooltipText: label.tooltipText,
102
+ "aria-label": label.moreDetailsAriaLabel
100
103
  })));
101
104
  }, labelsList)));
102
105
  };
103
106
 
104
107
  ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
105
- tooltipText: _propTypes.default.string
108
+ tooltipText: _propTypes.default.string,
109
+ 'aria-label': _propTypes.default.string
106
110
  } : {};
107
111
  ReviewPresentation.propTypes = process.env.NODE_ENV !== "production" ? _propTypes2.default : {};
108
112
  var _default = ReviewPresentation;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ICONS","skills","TargetIcon","questions","QuestionIcon","lifes","HeartIcon","allright","CheckIcon","getIcon","icon","Icon","getOr","style","labelIcon","ToolTip","tooltipText","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","map","convert","cap","label","key","reviewList","reviewListItemWrapper","reviewListText","text","propTypes","PropTypes","string"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst getIcon = icon => {\n const Icon = getOr(null, icon, ICONS);\n\n /* istanbul ignore next */\n if (!Icon) {\n return <div className={style.labelIcon} />;\n }\n return <Icon className={style.labelIcon} />;\n};\n\nconst ToolTip = ({tooltipText}) => {\n return (\n <div className={style.tooltipContainer}>\n <div className={style.tooltipIconContainer}>\n <InformationIcon className={style.informationIcon} width={12} height={12} />\n </div>\n <div className={style.toolTip}>\n <div className={style.tooltipText}>{tooltipText}</div>\n </div>\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n\n return (\n <div className={style.reviewWrapper} aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul className={style.reviewListWrapper}>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\">\n <div className={style.reviewListText}>\n {getIcon(key)} {label.text}\n </div>\n <ToolTip tooltipText={label.tooltipText} />\n </div>\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nToolTip.propTypes = {\n tooltipText: PropTypes.string\n};\n\nReviewPresentation.propTypes = propTypes;\n\nexport default ReviewPresentation;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAOA;;AACA;;;;AAEA,MAAMA,KAAK,GAAG;EACZC,MAAM,EAAEC,oDADI;EAEZC,SAAS,EAAEC,0DAFC;EAGZC,KAAK,EAAEC,wCAHK;EAIZC,QAAQ,EAAEC;AAJE,CAAd;;AAOA,MAAMC,OAAO,GAAGC,IAAI,IAAI;EACtB,MAAMC,IAAI,GAAG,IAAAC,cAAA,EAAM,IAAN,EAAYF,IAAZ,EAAkBV,KAAlB,CAAb;EAEA;;EACA,IAAI,CAACW,IAAL,EAAW;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zC,gBACE;MAAK,SAAS,EAAEtB,cAAA,CAAMuB,qBAAtB;MAA6C,gBAA7C;MAAsD,YAAS;IAA/D,gBACE;MAAK,SAAS,EAAEvB,cAAA,CAAMwB;IAAtB,GACG5B,OAAO,CAACyB,GAAD,CADV,OACkBD,KAAK,CAACK,IADxB,CADF,eAIE,6BAAC,OAAD;MAAS,WAAW,EAAEL,KAAK,CAACjB;IAA5B,EAJF,CADF,CADF;EAUD,CAXA,EAWEU,UAXF,CADH,CAXF,CADF;AA4BD,CA/BD;;AAiCAX,OAAO,CAACwB,SAAR,2CAAoB;EAClBvB,WAAW,EAAEwB,kBAAA,CAAUC;AADL,CAApB;AAIApB,kBAAkB,CAACkB,SAAnB,2CAA+BA,mBAA/B;eAEelB,kB"}
1
+ {"version":3,"file":"index.js","names":["ICONS","skills","TargetIcon","questions","QuestionIcon","lifes","HeartIcon","allright","CheckIcon","getIcon","icon","Icon","getOr","style","labelIcon","ToolTip","tooltipText","moreDetailsAriaLabel","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","map","convert","cap","label","key","reviewList","reviewListItemWrapper","reviewListText","text","propTypes","PropTypes","string"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst getIcon = icon => {\n const Icon = getOr(null, icon, ICONS);\n\n /* istanbul ignore next */\n if (!Icon) {\n return <div className={style.labelIcon} />;\n }\n return <Icon className={style.labelIcon} />;\n};\n\nconst ToolTip = ({tooltipText, 'aria-label': moreDetailsAriaLabel}) => {\n return (\n <div className={style.tooltipContainer}>\n <div className={style.tooltipIconContainer}>\n <InformationIcon\n className={style.informationIcon}\n width={12}\n height={12}\n aria-label={moreDetailsAriaLabel}\n />\n </div>\n <div className={style.toolTip}>\n <p className={style.tooltipText}>{tooltipText}</p>\n </div>\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n return (\n <div className={style.reviewWrapper} aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul className={style.reviewListWrapper}>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\">\n <div className={style.reviewListText}>\n {getIcon(key)} {label.text}\n </div>\n <ToolTip tooltipText={label.tooltipText} aria-label={label.moreDetailsAriaLabel} />\n </div>\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nToolTip.propTypes = {\n tooltipText: PropTypes.string,\n 'aria-label': PropTypes.string\n};\n\nReviewPresentation.propTypes = propTypes;\n\nexport default ReviewPresentation;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAOA;;AACA;;;;AAEA,MAAMA,KAAK,GAAG;EACZC,MAAM,EAAEC,oDADI;EAEZC,SAAS,EAAEC,0DAFC;EAGZC,KAAK,EAAEC,wCAHK;EAIZC,QAAQ,EAAEC;AAJE,CAAd;;AAOA,MAAMC,OAAO,GAAGC,IAAI,IAAI;EACtB,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G,EAAE;EAAN,CAAZ,EAA0B,CAACC,KAAD,EAAQC,GAAR,KAAgB;IACzC,oBACE;MAAI,GAAG,EAAG,QAAOA,GAAI,EAArB;MAAwB,SAAS,EAAEtB,cAAA,CAAMuB;IAAzC,gBACE;MAAK,SAAS,EAAEvB,cAAA,CAAMwB,qBAAtB;MAA6C,gBAA7C;MAAsD,YAAS;IAA/D,gBACE;MAAK,SAAS,EAAExB,cAAA,CAAMyB;IAAtB,GACG7B,OAAO,CAAC0B,GAAD,CADV,OACkBD,KAAK,CAACK,IADxB,CADF,eAIE,6BAAC,OAAD;MAAS,WAAW,EAAEL,KAAK,CAAClB,WAA5B;MAAyC,cAAYkB,KAAK,CAACjB;IAA3D,EAJF,CADF,CADF;EAUD,CAXA,EAWEU,UAXF,CADH,CAXF,CADF;AA4BD,CA9BD;;AAgCAZ,OAAO,CAACyB,SAAR,2CAAoB;EAClBxB,WAAW,EAAEyB,kBAAA,CAAUC,MADL;EAElB,cAAcD,kBAAA,CAAUC;AAFN,CAApB;AAKApB,kBAAkB,CAACkB,SAAnB,2CAA+BA,mBAA/B;eAEelB,kB"}
@@ -9,18 +9,22 @@ declare const propTypes: {
9
9
  skills: PropTypes.Requireable<PropTypes.InferProps<{
10
10
  text: PropTypes.Requireable<string>;
11
11
  tooltipText: PropTypes.Requireable<string>;
12
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
12
13
  }>>;
13
14
  questions: PropTypes.Requireable<PropTypes.InferProps<{
14
15
  text: PropTypes.Requireable<string>;
15
16
  tooltipText: PropTypes.Requireable<string>;
17
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
16
18
  }>>;
17
19
  lifes: PropTypes.Requireable<PropTypes.InferProps<{
18
20
  text: PropTypes.Requireable<string>;
19
21
  tooltipText: PropTypes.Requireable<string>;
22
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
20
23
  }>>;
21
24
  allright: PropTypes.Requireable<PropTypes.InferProps<{
22
25
  text: PropTypes.Requireable<string>;
23
26
  tooltipText: PropTypes.Requireable<string>;
27
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
24
28
  }>>;
25
29
  }>>;
26
30
  };
@@ -40,18 +44,22 @@ export declare type OnboardingProps = {
40
44
  skills?: {
41
45
  text?: string | undefined;
42
46
  tooltipText?: string | undefined;
47
+ 'aria-label'?: string | undefined;
43
48
  } | undefined;
44
49
  questions?: {
45
50
  text?: string | undefined;
46
51
  tooltipText?: string | undefined;
52
+ 'aria-label'?: string | undefined;
47
53
  };
48
54
  lifes?: {
49
55
  text?: string | undefined;
50
56
  tooltipText?: string | undefined;
57
+ 'aria-label'?: string | undefined;
51
58
  } | undefined;
52
59
  allright?: {
53
60
  text?: string | undefined;
54
61
  tooltipText?: string | undefined;
62
+ 'aria-label'?: string | undefined;
55
63
  } | undefined;
56
64
  };
57
65
  onPress: (event: GestureResponderEvent) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/prop-types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,UAAU,EAAE,qBAAqB,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAO1E,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;CAUd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;CAGzB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE;QACX,MAAM,CAAC,EACH;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,C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 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
9
9
 
10
10
  const levelItem = _propTypes.default.shape({
11
11
  text: _propTypes.default.string,
12
- tooltipText: _propTypes.default.string
12
+ tooltipText: _propTypes.default.string,
13
+ moreDetailsAreaLabel: _propTypes.default.string
13
14
  });
14
15
 
15
16
  const propTypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ColorValue, GestureResponderEvent, ViewStyle} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":";;;;;AAAA;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG;AAFS,CAAhB,CAAlB;;AAKA,MAAME,SAAS,GAAG;EAChB,cAAcL,kBAAA,CAAUG,MADR;EAEhBG,WAAW,EAAEN,kBAAA,CAAUG,MAFP;EAGhBI,UAAU,EAAEP,kBAAA,CAAUG,MAHN;EAIhBK,UAAU,EAAER,kBAAA,CAAUC,KAAV,CAAgB;IAC1BQ,MAAM,EAAEV,SADkB;IAE1BW,SAAS,EAAEX,SAFe;IAG1BY,KAAK,EAAEZ,SAHmB;IAI1Ba,QAAQ,EAAEb;EAJgB,CAAhB;AAJI,CAAlB;eAYeM,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEd,kBAAA,CAAUe;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3Bd,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3Bc,IAAI,EAAEjB,kBAAA,CAAUkB;AAFW,CAAtB"}
1
+ {"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","moreDetailsAreaLabel","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ColorValue, GestureResponderEvent, ViewStyle} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string,\n moreDetailsAreaLabel: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":";;;;;AAAA;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG,MAFS;EAGhCE,oBAAoB,EAAEL,kBAAA,CAAUG;AAHA,CAAhB,CAAlB;;AAMA,MAAMG,SAAS,GAAG;EAChB,cAAcN,kBAAA,CAAUG,MADR;EAEhBI,WAAW,EAAEP,kBAAA,CAAUG,MAFP;EAGhBK,UAAU,EAAER,kBAAA,CAAUG,MAHN;EAIhBM,UAAU,EAAET,kBAAA,CAAUC,KAAV,CAAgB;IAC1BS,MAAM,EAAEX,SADkB;IAE1BY,SAAS,EAAEZ,SAFe;IAG1Ba,KAAK,EAAEb,SAHmB;IAI1Bc,QAAQ,EAAEd;EAJgB,CAAhB;AAJI,CAAlB;eAYeO,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEf,kBAAA,CAAUgB;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3Bf,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3Be,IAAI,EAAElB,kBAAA,CAAUmB;AAFW,CAAtB"}
@@ -16,7 +16,7 @@ declare const _default: {
16
16
  'aria-label': PropTypes.Requireable<string>;
17
17
  'data-name': PropTypes.Requireable<string>;
18
18
  animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
19
- 'aria-label': PropTypes.Validator<string>;
19
+ 'aria-label': PropTypes.Requireable<string>;
20
20
  'data-name': PropTypes.Requireable<string>;
21
21
  animationSrc: PropTypes.Validator<string>;
22
22
  loop: PropTypes.Requireable<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/review-congrats/index.js"],"names":[],"mappings":"AAOO,sDAMN;;AAED,yDAsEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/review-congrats/index.js"],"names":[],"mappings":"AAOO,sDAMN;;AAED,yDAuEC"}
@@ -53,7 +53,9 @@ const ReviewCongrats = props => {
53
53
  "aria-label": ariaLabel,
54
54
  "data-name": dataName,
55
55
  "data-testid": "congrats"
56
- }, /*#__PURE__*/_react.default.createElement(_lottieWrapper.default, _extends({}, animationLottie, {
56
+ }, /*#__PURE__*/_react.default.createElement(_lottieWrapper.default
57
+ /** confetti animation */
58
+ , _extends({}, animationLottie, {
57
59
  loop: false,
58
60
  animationControl: 'play',
59
61
  autoplay: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["setScroll","container","current","scrollTo","left","behavior","ReviewCongrats","props","ariaLabel","dataName","animationLottie","title","cardCongratsStar","cardCongratsRank","buttonRevising","buttonRevisingSkill","useRef","useEffect","timer","setTimeout","clearTimeout","style","mainContainer","lottie","ie11Backup","containerCongrats","containerCards","cardStar","cardRank","cardStarNoRank","buttonContainer","buttonRevise","propTypes"],"sources":["../../../src/organism/review-congrats/index.js"],"sourcesContent":["import React, {useEffect, useRef} from 'react';\nimport AtomLottieWrapper from '../../atom/lottie-wrapper';\nimport ButtonLink from '../../atom/button-link';\nimport MoleculeReviewCardCongrats from '../../molecule/review-card-congrats';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nexport const setScroll = container => () => {\n container.current?.scrollTo &&\n container.current.scrollTo({\n left: 1000,\n behavior: 'smooth'\n });\n};\n\nconst ReviewCongrats = props => {\n const {\n 'aria-label': ariaLabel,\n 'data-name': dataName,\n animationLottie,\n title,\n cardCongratsStar,\n cardCongratsRank,\n buttonRevising,\n buttonRevisingSkill\n } = props;\n\n const container = useRef(null);\n\n useEffect(() => {\n const timer = setTimeout(setScroll(container), 2000);\n return () => timer && clearTimeout(timer);\n }, []);\n\n return (\n <div\n className={style.mainContainer}\n aria-label={ariaLabel}\n data-name={dataName}\n data-testid=\"congrats\"\n >\n <AtomLottieWrapper\n {...animationLottie}\n loop={false}\n animationControl={'play'}\n autoplay\n data-name=\"lottie-wrapper\"\n className={style.lottie}\n backupImageClassName={style.ie11Backup}\n />\n <div className={style.containerCongrats}>\n <div className={style.title}>{title}</div>\n <div ref={container} className={style.containerCards}>\n {cardCongratsRank ? (\n <>\n <MoleculeReviewCardCongrats {...cardCongratsStar} className={style.cardStar} />\n <MoleculeReviewCardCongrats\n {...cardCongratsRank}\n timerAnimation={1800}\n className={style.cardRank}\n />\n </>\n ) : (\n <MoleculeReviewCardCongrats {...cardCongratsStar} className={style.cardStarNoRank} />\n )}\n </div>\n <div className={style.buttonContainer}>\n {buttonRevising ? (\n <ButtonLink\n {...buttonRevising}\n className={style.buttonRevise}\n data-testid=\"revise-skill-link\"\n />\n ) : null}\n {buttonRevisingSkill ? (\n <ButtonLink\n {...buttonRevisingSkill}\n className={style.buttonRevise}\n data-testid=\"revise-another-skill-link\"\n />\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nReviewCongrats.propTypes = propTypes;\n\nexport default ReviewCongrats;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,SAAS,GAAGC,S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,2BAAD,eACMd,gBADN;IAEE,cAAc,EAAE,IAFlB;IAGE,SAAS,EAAEQ,cAAA,CAAMO;EAHnB,GAFF,CADe,gBAUf,6BAAC,2BAAD,eAAgChB,gBAAhC;IAAkD,SAAS,EAAES,cAAA,CAAMQ;EAAnE,GAXJ,CAFF,eAgBE;IAAK,SAAS,EAAER,cAAA,CAAMS;EAAtB,GACGhB,cAAc,gBACb,6BAAC,mBAAD,eACMA,cADN;IAEE,SAAS,EAAEO,cAAA,CAAMU,YAFnB;IAGE,eAAY;EAHd,GADa,GAMX,IAPN,EAQGhB,mBAAmB,gBAClB,6BAAC,mBAAD,eACMA,mBADN;IAEE,SAAS,EAAEM,cAAA,CAAMU,YAFnB;IAGE,eAAY;EAHd,GADkB,GAMhB,IAdN,CAhBF,CAfF,CADF;AAmDD,CAtED;;AAwEAzB,cAAc,CAAC0B,SAAf,2CAA2BA,kBAA3B;eAEe1B,c"}
1
+ {"version":3,"file":"index.js","names":["setScroll","container","current","scrollTo","left","behavior","ReviewCongrats","props","ariaLabel","dataName","animationLottie","title","cardCongratsStar","cardCongratsRank","buttonRevising","buttonRevisingSkill","useRef","useEffect","timer","setTimeout","clearTimeout","style","mainContainer","lottie","ie11Backup","containerCongrats","containerCards","cardStar","cardRank","cardStarNoRank","buttonContainer","buttonRevise","propTypes"],"sources":["../../../src/organism/review-congrats/index.js"],"sourcesContent":["import React, {useEffect, useRef} from 'react';\nimport LottieWrapper from '../../atom/lottie-wrapper';\nimport ButtonLink from '../../atom/button-link';\nimport ReviewCardCongrats from '../../molecule/review-card-congrats';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nexport const setScroll = container => () => {\n container.current?.scrollTo &&\n container.current.scrollTo({\n left: 1000,\n behavior: 'smooth'\n });\n};\n\nconst ReviewCongrats = props => {\n const {\n 'aria-label': ariaLabel,\n 'data-name': dataName,\n animationLottie,\n title,\n cardCongratsStar,\n cardCongratsRank,\n buttonRevising,\n buttonRevisingSkill\n } = props;\n\n const container = useRef(null);\n\n useEffect(() => {\n const timer = setTimeout(setScroll(container), 2000);\n return () => timer && clearTimeout(timer);\n }, []);\n\n return (\n <div\n className={style.mainContainer}\n aria-label={ariaLabel}\n data-name={dataName}\n data-testid=\"congrats\"\n >\n <LottieWrapper\n /** confetti animation */\n {...animationLottie}\n loop={false}\n animationControl={'play'}\n autoplay\n data-name=\"lottie-wrapper\"\n className={style.lottie}\n backupImageClassName={style.ie11Backup}\n />\n <div className={style.containerCongrats}>\n <div className={style.title}>{title}</div>\n <div ref={container} className={style.containerCards}>\n {cardCongratsRank ? (\n <>\n <ReviewCardCongrats {...cardCongratsStar} className={style.cardStar} />\n <ReviewCardCongrats\n {...cardCongratsRank}\n timerAnimation={1800}\n className={style.cardRank}\n />\n </>\n ) : (\n <ReviewCardCongrats {...cardCongratsStar} className={style.cardStarNoRank} />\n )}\n </div>\n <div className={style.buttonContainer}>\n {buttonRevising ? (\n <ButtonLink\n {...buttonRevising}\n className={style.buttonRevise}\n data-testid=\"revise-skill-link\"\n />\n ) : null}\n {buttonRevisingSkill ? (\n <ButtonLink\n {...buttonRevisingSkill}\n className={style.buttonRevise}\n data-testid=\"revise-another-skill-link\"\n />\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nReviewCongrats.propTypes = propTypes;\n\nexport default ReviewCongrats;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,SAAS,GAAGC,SAAS,IAAI,MAAM;EAC1CA,SAAS,CAACC,OAAV,EAAmBC,QAAnB,IACEF,SAAS,CAACC,OAAV,CAAkBC,QAAlB,CAA2B;IACzBC,IAAI,EAAE,IADmB;IAEzBC,QAAQ,EAAE;EAFe,CAA3B,CADF;AAKD,CANM;;;;AAQP,MAAMC,cAAc,GAAGC,KAAK,IAAI;EAC9B,MAAM;IACJ,cAAcC,SADV;IAEJ,aAAaC,QAFT;IAGJC,eAHI;IAIJC,KAJI;IAKJC,gBALI;IAMJC,gBANI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IAGE,eAAY;EAHd,GADa,GAMX,IAPN,EAQGhB,mBAAmB,gBAClB,6BAAC,mBAAD,eACMA,mBADN;IAEE,SAAS,EAAEM,cAAA,CAAMU,YAFnB;IAGE,eAAY;EAHd,GADkB,GAMhB,IAdN,CAhBF,CAhBF,CADF;AAoDD,CAvED;;AAyEAzB,cAAc,CAAC0B,SAAf,2CAA2BA,kBAA3B;eAEe1B,c"}
@@ -5,7 +5,7 @@ declare const propTypes: {
5
5
  'aria-label': PropTypes.Requireable<string>;
6
6
  'data-name': PropTypes.Requireable<string>;
7
7
  animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
8
- 'aria-label': PropTypes.Validator<string>;
8
+ 'aria-label': PropTypes.Requireable<string>;
9
9
  'data-name': PropTypes.Requireable<string>;
10
10
  animationSrc: PropTypes.Validator<string>;
11
11
  loop: PropTypes.Requireable<boolean>;
@@ -26,7 +26,7 @@ declare const propTypes: {
26
26
  'aria-label': PropTypes.Requireable<string>;
27
27
  'data-name': PropTypes.Requireable<string>;
28
28
  animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
29
- 'aria-label': PropTypes.Validator<string>;
29
+ 'aria-label': PropTypes.Requireable<string>;
30
30
  'data-name': PropTypes.Requireable<string>;
31
31
  animationSrc: PropTypes.Validator<string>;
32
32
  loop: PropTypes.Requireable<boolean>;
@@ -54,7 +54,7 @@ declare const propTypes: {
54
54
  'aria-label': PropTypes.Requireable<string>;
55
55
  'data-name': PropTypes.Requireable<string>;
56
56
  animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
57
- 'aria-label': PropTypes.Validator<string>;
57
+ 'aria-label': PropTypes.Requireable<string>;
58
58
  'data-name': PropTypes.Requireable<string>;
59
59
  animationSrc: PropTypes.Validator<string>;
60
60
  loop: PropTypes.Requireable<boolean>;
@@ -59,7 +59,7 @@ const StackedSlides = props => {
59
59
  });
60
60
  const restackTranslation = (0, _reactNativeAnimation.useTranslateY)({
61
61
  toValue: 0,
62
- fromValue: -windowHeight,
62
+ fromValue: windowHeight,
63
63
  duration: 1200,
64
64
  easing: _reactNative.Easing.out(_reactNative.Easing.cubic)
65
65
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["style","StyleSheet","create","slides","flex","height","width","StackedSlides","props","windowHeight","useWindowDimensions","endReview","validateButton","correctionPopinProps","unstacked","setUnstacked","useState","restacking","setRestacking","restackingDone","setRestackingDone","hideSlides","useTranslateY","fromValue","toValue","duration","translateDown","easing","Easing","cubic","restackTranslation","out","useEffect","start","restackingSlide","keys","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 {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 = useTranslateY({\n toValue: 0,\n fromValue: -windowHeight,\n duration: 1200,\n easing: Easing.out(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 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;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAGA,MAAMA,KAAK,GAAGC,uBAAA,CAAWC,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,IAAyB,IAAAC,gCAAA,GAA/B;EACA,MAAM;IAACC,SAAD;IAAYR,MAAZ;IAAoBS,cAApB;IAAoCC;EAApC,IAA4DL,KAAlE;EACA,MAAM,CAACM,SAAD,EAAYC,YAAZ,IAA4B,IAAAC,eAAA,EAAmB,EAAnB,CAAlC;EACA,MAAM,CAACC,UAAD,EAAaC,aAAb,IAA8B,IAAAF,eAAA,EAAwB,IAAxB,CAApC;EACA,MAAM,CAACG,cAAD,EAAiBC,iBAAjB,IAAsC,IAAAJ,eAAA,EAAkB,KAAlB,CAA5C;EAEA,MAAMK,UAAU,GAAG,IAAAC,mCAAA,EAAc;IAC/BC,SAAS,EAAE,CADoB;IAE/BC,OAAO,EAAEf,YAFsB;IAG/BgB,QAAQ,EAAE;EAHqB,CAAd,CAAnB;EAMA,MAAMC,aAAa,GAAG,IAAAJ,mCAAA,EAAc;IAClCC,SAAS,EAAE,CADuB;IAElCC,OAAO,EAAEf,YAAY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MAAMC,KAAK,GAAGvD,MAAM,CAACqD,UAAD,CAApB;IACA,MAAMG,GAAG,GAAGhB,WAAW,CAACiB,MAAZ,GAAqBH,KAAjC;IAEA,oBACE,6BAAC,cAAD;MAEIE,GAFJ;MAGIH,UAHJ;MAIIE,KAJJ;MAKI9C,cALJ;MAMIC,oBANJ;MAQE,GAAG,EAAE2C;IARP,EADF;EAYD,CAhBqB,CAAtB;;EAkBA,IAAIT,kBAAJ,EAAwB;IACtBO,aAAa,CAACO,IAAd,eACE,6BAAC,cAAD;MAEIF,GAAG,EAAE,CAFT;MAGIH,UAAU,EAAET,kBAHhB;MAIIW,KAAK,EAAEvD,MAAM,CAAC4C,kBAAD,CAJjB;MAKInC,cALJ;MAMIC,oBANJ;MAQE,aAAa,EAAE,CAACa,aAAa,CAACoC,aAAf,CARjB;MASE,GAAG,EAAEf;IATP,EADF;EAaD;;EAED,oBACE,6BAAC,qBAAD,CAAU,IAAV;IAAe,KAAK,EAAE,CAAC/C,KAAK,CAACG,MAAP,EAAekB,UAAU,CAACyC,aAA1B;EAAtB,GACGb,sBAAsB,gBACrB,6BAAC,cAAD;IAEIU,GAAG,EAAEhB,WAAW,CAACiB,MAAZ,GAAqB,CAF9B;IAGIJ,UAAU,EAAEvC,UAHhB;IAIIyC,KAAK,EAAEvD,MAAM,CAACc,UAAD,CAJjB;IAKIL,cALJ;IAMIC,oBANJ;IAQE,aAAa,EAAE,CAACiB,kBAAkB,CAACgC,aAApB,CARjB;IASE,GAAG,EAAE7C;EATP,EADqB,GAYnB,IAbN,EAcGqC,aAdH,CADF;AAkBD,CAvID;;eAyIe/C,a"}
1
+ {"version":3,"file":"index.native.js","names":["style","StyleSheet","create","slides","flex","height","width","StackedSlides","props","windowHeight","useWindowDimensions","endReview","validateButton","correctionPopinProps","unstacked","setUnstacked","useState","restacking","setRestacking","restackingDone","setRestackingDone","hideSlides","useTranslateY","fromValue","toValue","duration","translateDown","easing","Easing","cubic","restackTranslation","out","useEffect","start","restackingSlide","keys","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 {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 = useTranslateY({\n toValue: 0,\n fromValue: windowHeight,\n duration: 1200,\n easing: Easing.out(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 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":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D;MAEIF,GAAG,EAAE,CAFT;MAGIH,UAAU,EAAET,kBAHhB;MAIIW,KAAK,EAAEvD,MAAM,CAAC4C,kBAAD,CAJjB;MAKInC,cALJ;MAMIC,oBANJ;MAQE,aAAa,EAAE,CAACa,aAAa,CAACoC,aAAf,CARjB;MASE,GAAG,EAAEf;IATP,EADF;EAaD;;EAED,oBACE,6BAAC,qBAAD,CAAU,IAAV;IAAe,KAAK,EAAE,CAAC/C,KAAK,CAACG,MAAP,EAAekB,UAAU,CAACyC,aAA1B;EAAtB,GACGb,sBAAsB,gBACrB,6BAAC,cAAD;IAEIU,GAAG,EAAEhB,WAAW,CAACiB,MAAZ,GAAqB,CAF9B;IAGIJ,UAAU,EAAEvC,UAHhB;IAIIyC,KAAK,EAAEvD,MAAM,CAACc,UAAD,CAJjB;IAKIL,cALJ;IAMIC,oBANJ;IAQE,aAAa,EAAE,CAACiB,kBAAkB,CAACgC,aAApB,CARjB;IASE,GAAG,EAAE7C;EATP,EADqB,GAYnB,IAbN,EAcGqC,aAdH,CADF;AAkBD,CAvID;;eAyIe/C,a"}
@@ -18,6 +18,7 @@ declare namespace UserPreferences {
18
18
  'data-name': PropTypes.Requireable<string>;
19
19
  requiredSelection: PropTypes.Requireable<boolean>;
20
20
  }> | null | undefined)[]>;
21
+ const moreInfoAriaLabel: PropTypes.Requireable<string>;
21
22
  }
22
23
  }
23
24
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/user-preferences/index.js"],"names":[],"mappings":";AA+BA,0DAaC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/user-preferences/index.js"],"names":[],"mappings":";AAoCA,0DAaC"}
@@ -17,7 +17,7 @@ var _inputSwitch = _interopRequireDefault(require("../../atom/input-switch"));
17
17
 
18
18
  var _style = _interopRequireDefault(require("./style.css"));
19
19
 
20
- const _excluded = ["label", "description"];
20
+ const _excluded = ["label", "description", "moreInfoAriaLabel"];
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
@@ -28,7 +28,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
28
28
  const Settings = props => {
29
29
  const {
30
30
  label,
31
- description
31
+ description,
32
+ moreInfoAriaLabel
32
33
  } = props,
33
34
  settings = _objectWithoutPropertiesLoose(props, _excluded);
34
35
 
@@ -41,7 +42,8 @@ const Settings = props => {
41
42
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyInformationIcon, {
42
43
  height: 16,
43
44
  width: 16,
44
- className: _style.default.infoIcon
45
+ className: _style.default.infoIcon,
46
+ "aria-label": moreInfoAriaLabel
45
47
  }), /*#__PURE__*/_react.default.createElement("div", {
46
48
  className: _style.default.showToolTip
47
49
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -56,17 +58,20 @@ Settings.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, _input
56
58
 
57
59
  const UserPreferences = props => {
58
60
  const {
59
- preferences = []
61
+ preferences = [],
62
+ moreInfoAriaLabel
60
63
  } = props;
61
64
  return /*#__PURE__*/_react.default.createElement("div", {
62
65
  className: _style.default.preferences
63
66
  }, (0, _map2.default)(settings => /*#__PURE__*/_react.default.createElement(Settings, _extends({}, settings, {
64
- key: settings.label
67
+ key: settings.label,
68
+ moreInfoAriaLabel: moreInfoAriaLabel
65
69
  })), preferences));
66
70
  };
67
71
 
68
72
  UserPreferences.propTypes = process.env.NODE_ENV !== "production" ? {
69
- preferences: _propTypes.default.arrayOf(_propTypes.default.shape(Settings.propTypes))
73
+ preferences: _propTypes.default.arrayOf(_propTypes.default.shape(Settings.propTypes)),
74
+ moreInfoAriaLabel: _propTypes.default.string
70
75
  } : {};
71
76
  var _default = UserPreferences;
72
77
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Settings","props","label","description","settings","style","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","InputSwitch","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, ...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 height={16} width={16} className={style.infoIcon} />\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 = []} = props;\n\n return (\n <div className={style.preferences}>\n {map(\n settings => (\n <Settings {...settings} key={settings.label} />\n ),\n preferences\n )}\n </div>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes))\n};\n\nexport default UserPreferences;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,KAAD;IAAQC;EAAR,IAAoCF,KAA1C;EAAA,MAA8BG,QAA9B,iCAA0CH,KAA1C;;EACA,oBACE;IAAK,SAAS,EAAEI,cAAA,CAAMD;EAAtB,gBACE,6BAAC,oBAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEC,cAAA,CAAMH;EAAvB,GAA+BA,KAA/B,CAFF,EAGG,uBAAQC,WAAR,IAAuB,IAAvB,gBACC;IAAK,SAAS,EAAEE,cAAA,CAAMC;EAAtB,gBACE,6BAAC,qDAAD;IAAU,MAAM,EAAE,EAAlB;IAAsB,KAAK,EAAE,EAA7B;IAAiC,SAAS,EAAED,cAAA,CAAME;EAAlD,EADF,eAEE;IAAK,SAAS,EAAEF,cAAA,CAAMG;EAAtB,gBACE;IAAK,SAAS,EAAEH,cAAA,CAAMI;EAAtB,GAAyCN,WAAzC,CADF,CAFF,CAJJ,CADF;AAcD,CAhBD;;AAkBAH,QAAQ,CAACU,SAAT,wDACKC,oBAAA,CAAYD,SADjB;EAEER,KAAK,EAAEU,kBAAA,CAAUC,MAAV,CAAiBC,UAF1B;EAGEX,WAAW,EAAES,kBAAA,CAAUC;AAHzB;;AAMA,MAAME,eAAe,GAAGd,KAAK,IAAI;EAC/B,MAAM;IAACe,WAAW,GAAG;EAAf,IAAqBf,KAA3B;EAEA,oBACE;IAAK,SAAS,EAAEI,cAAA,CAAMW;EAAtB,GACG,mBACCZ,QAAQ,iBACN,6BAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACF;EAAtC,GAFH,EAICc,WAJD,CADH,CADF;AAUD,CAbD;;AAeAD,eAAe,CAACL,SAAhB,2CAA4B;EAC1BM,WAAW,EAAEJ,kBAAA,CAAUK,OAAV,CAAkBL,kBAAA,CAAUM,KAAV,CAAgBlB,QAAQ,CAACU,SAAzB,CAAlB;AADa,CAA5B;eAIeK,e"}
1
+ {"version":3,"file":"index.js","names":["Settings","props","label","description","moreInfoAriaLabel","settings","style","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","InputSwitch","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.propTypes)),\n moreInfoAriaLabel: PropTypes.string\n};\n\nexport default UserPreferences;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,KAAD;IAAQC,WAAR;IAAqBC;EAArB,IAAuDH,KAA7D;EAAA,MAAiDI,QAAjD,iCAA6DJ,KAA7D;;EACA,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMD;EAAtB,gBACE,6BAAC,oBAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEC,cAAA,CAAMJ;EAAvB,GAA+BA,KAA/B,CAFF,EAGG,uBAAQC,WAAR,IAAuB,IAAvB,gBACC;IAAK,SAAS,EAAEG,cAAA,CAAMC;EAAtB,gBACE,6BAAC,qDAAD;IACE,MAAM,EAAE,EADV;IAEE,KAAK,EAAE,EAFT;IAGE,SAAS,EAAED,cAAA,CAAME,QAHnB;IAIE,cAAYJ;EAJd,EADF,eAOE;IAAK,SAAS,EAAEE,cAAA,CAAMG;EAAtB,gBACE;IAAK,SAAS,EAAEH,cAAA,CAAMI;EAAtB,GAAyCP,WAAzC,CADF,CAPF,CAJJ,CADF;AAmBD,CArBD;;AAuBAH,QAAQ,CAACW,SAAT,wDACKC,oBAAA,CAAYD,SADjB;EAEET,KAAK,EAAEW,kBAAA,CAAUC,MAAV,CAAiBC,UAF1B;EAGEZ,WAAW,EAAEU,kBAAA,CAAUC;AAHzB;;AAMA,MAAME,eAAe,GAAGf,KAAK,IAAI;EAC/B,MAAM;IAACgB,WAAW,GAAG,EAAf;IAAmBb;EAAnB,IAAwCH,KAA9C;EAEA,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMW;EAAtB,GACG,mBACCZ,QAAQ,iBACN,6BAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACH,KAAtC;IAA6C,iBAAiB,EAAEE;EAAhE,GAFH,EAICa,WAJD,CADH,CADF;AAUD,CAbD;;AAeAD,eAAe,CAACL,SAAhB,2CAA4B;EAC1BM,WAAW,EAAEJ,kBAAA,CAAUK,OAAV,CAAkBL,kBAAA,CAAUM,KAAV,CAAgBnB,QAAQ,CAACW,SAAzB,CAAlB,CADa;EAE1BP,iBAAiB,EAAES,kBAAA,CAAUC;AAFH,CAA5B;eAKeE,e"}
@@ -3,6 +3,7 @@ declare class Progression extends React.Component<any, any, any> {
3
3
  static propTypes: {
4
4
  mainTitle: PropTypes.Validator<string>;
5
5
  mainSubtitle: PropTypes.Validator<string>;
6
+ adaptiveAriaLabel: PropTypes.Requireable<string>;
6
7
  total: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
7
8
  label: PropTypes.Validator<string>;
8
9
  stars: PropTypes.Validator<number>;
@@ -32,6 +33,7 @@ declare class Progression extends React.Component<any, any, any> {
32
33
  label: PropTypes.Validator<string>;
33
34
  level: PropTypes.Validator<string>;
34
35
  state: PropTypes.Validator<string>;
36
+ adaptiveAriaLabel: PropTypes.Requireable<string>;
35
37
  type: PropTypes.Validator<string>;
36
38
  adaptive: PropTypes.Validator<boolean>;
37
39
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/activity/index.js"],"names":[],"mappings":";AAaA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,sCAIC;IAED,8BAME;IAEF,oCAKE;IAEF,sBA+EC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/activity/index.js"],"names":[],"mappings":";AAaA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,sCAIC;IAED,8BAME;IAEF,oCAKE;IAEF,sBAoFC;CACF"}
@@ -70,6 +70,7 @@ class Progression extends _react.default.Component {
70
70
  mainSubtitle,
71
71
  recommendation = {},
72
72
  progressions = [],
73
+ adaptiveAriaLabel,
73
74
  total,
74
75
  engines = [],
75
76
  themeFilter = {},
@@ -83,7 +84,8 @@ class Progression extends _react.default.Component {
83
84
  className: _style.default.loader
84
85
  }, /*#__PURE__*/_react.default.createElement(_loader.default, null)) : null;
85
86
  const allProgressions = progressions.map(progression => /*#__PURE__*/_react.default.createElement(_progressionItem.default, _extends({}, (0, _omit2.default)(['ref'], progression), {
86
- key: progression.ref
87
+ key: progression.ref,
88
+ adaptiveAriaLabel: adaptiveAriaLabel
87
89
  })));
88
90
 
89
91
  const coreProgression = /*#__PURE__*/_react.default.createElement("div", {
@@ -146,6 +148,7 @@ Progression.contextTypes = {
146
148
  Progression.propTypes = process.env.NODE_ENV !== "production" ? {
147
149
  mainTitle: _propTypes.default.string.isRequired,
148
150
  mainSubtitle: _propTypes.default.string.isRequired,
151
+ adaptiveAriaLabel: _propTypes.default.string,
149
152
  total: _propTypes.default.shape({
150
153
  label: _propTypes.default.string.isRequired,
151
154
  stars: _propTypes.default.number.isRequired