@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.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/index.js"],"names":[],"mappings":"AAsBO,iMAmCN;;AAED,wDAkHC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/index.js"],"names":[],"mappings":"AAsBO,iMAmCN;;AAED,wDA4HC"}
@@ -109,9 +109,15 @@ const LottieWrapper = props => {
109
109
  /* istanbul ignore next */
110
110
  lottie.destroy(animationItem.name);
111
111
  }, [lottieAnimationClassName, containerRef, hideOnTransparent, loop, animationSrc, _isIE11, animationItem, autoplay]);
112
- return /*#__PURE__*/React.createElement("div", {
112
+ const accessibilityProps = ariaLabel ? {
113
+ 'aria-label': ariaLabel,
114
+ role: 'img'
115
+ } : {
116
+ 'aria-hidden': 'true',
117
+ role: 'presentation'
118
+ };
119
+ return /*#__PURE__*/React.createElement("div", _extends({}, accessibilityProps, {
113
120
  ref: containerRef,
114
- "aria-label": ariaLabel,
115
121
  "data-name": dataName,
116
122
  className: wrapperClassName,
117
123
  style: _extends({}, width && {
@@ -124,7 +130,7 @@ const LottieWrapper = props => {
124
130
  opacity: isAnimationVisible ? 1 : 0,
125
131
  transition: 'opacity 0.25s ease-in'
126
132
  })
127
- }, _isIE11 ? /*#__PURE__*/React.createElement("img", {
133
+ }), _isIE11 ? /*#__PURE__*/React.createElement("img", {
128
134
  src: ie11ImageBackup,
129
135
  className: ie11BackupImageClassName,
130
136
  "data-name": "ie11-backup-image"
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","useRef","useEffect","useState","classnames","lottie","get","has","includes","keys","omit","unfetch","style","propTypes","ANIMATION_CONTROL","isIE11","window","userAgent","hasMsCrypto","hasRevision","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","animationItem","setAnimationItem","isAnimationVisible","setIsAnimationVisible","_isIE11","wrapperClassName","lottieContainer","lottieAnimationClassName","ie11BackupImageClassName","backupImage","stop","destroy","name","maxWidth","maxHeight","opacity","transition"],"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,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,MAAxB,EAAgCC,SAAhC,EAA2CC,QAA3C,QAA0D,OAA1D;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,YAAnB;A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CAzBM,CAAT;EAoCA,oBACE;IACE,GAAG,EAAEJ,YADP;IAEE,cAAYuB,SAFd;IAGE,aAAWD,QAHb;IAIE,SAAS,EAAEa,gBAJb;IAKE,KAAK,eACCX,KAAK,IAAI;MACXA,KAAK,EAAG,GAAEA,KAAM,IADL;MAEXmB,QAAQ,EAAG,GAAEnB,KAAM;IAFR,CADV,EAKCC,MAAM,IAAI;MACZA,MAAM,EAAG,GAAEA,MAAO,IADN;MAEZmB,SAAS,EAAG,GAAEnB,MAAO;IAFT,CALX;MASHoB,OAAO,EAAEb,kBAAkB,GAAG,CAAH,GAAO,CAT/B;MAUHc,UAAU,EAAE;IAVT;EALP,GAkBGZ,OAAO,gBACN;IACE,GAAG,EAAER,eADP;IAEE,SAAS,EAAEY,wBAFb;IAGE,aAAU;EAHZ,EADM,GAMJ,IAxBN,CADF;AA4BD,CAlHD;;AAoHAlB,aAAa,CAAChC,SAAd,2CAA0BA,SAA1B;AAEA,eAAegC,aAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","useRef","useEffect","useState","classnames","lottie","get","has","includes","keys","omit","unfetch","style","propTypes","ANIMATION_CONTROL","isIE11","window","userAgent","hasMsCrypto","hasRevision","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","animationItem","setAnimationItem","isAnimationVisible","setIsAnimationVisible","_isIE11","wrapperClassName","lottieContainer","lottieAnimationClassName","ie11BackupImageClassName","backupImage","stop","destroy","name","accessibilityProps","role","maxWidth","maxHeight","opacity","transition"],"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\nexport default LottieWrapper;\n"],"mappings":";;AAAA,OAA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Aa,CAACY,IAA7B,CAAzD;EACD,CAzBQ,EAyBN,CACDL,wBADC,EAEDrC,YAFC,EAGDG,iBAHC,EAIDF,IAJC,EAKDF,YALC,EAMDmC,OANC,EAODJ,aAPC,EAQD1B,QARC,CAzBM,CAAT;EAoCA,MAAMuC,kBAAkB,GAAGpB,SAAS,GAChC;IACE,cAAcA,SADhB;IAEEqB,IAAI,EAAE;EAFR,CADgC,GAKhC;IACE,eAAe,MADjB;IAEEA,IAAI,EAAE;EAFR,CALJ;EAUA,oBACE,wCACMD,kBADN;IAEE,GAAG,EAAE3C,YAFP;IAGE,aAAWsB,QAHb;IAIE,SAAS,EAAEa,gBAJb;IAKE,KAAK,eACCX,KAAK,IAAI;MACXA,KAAK,EAAG,GAAEA,KAAM,IADL;MAEXqB,QAAQ,EAAG,GAAErB,KAAM;IAFR,CADV,EAKCC,MAAM,IAAI;MACZA,MAAM,EAAG,GAAEA,MAAO,IADN;MAEZqB,SAAS,EAAG,GAAErB,MAAO;IAFT,CALX;MASHsB,OAAO,EAAEf,kBAAkB,GAAG,CAAH,GAAO,CAT/B;MAUHgB,UAAU,EAAE;IAVT;EALP,IAkBGd,OAAO,gBACN;IACE,GAAG,EAAER,eADP;IAEE,SAAS,EAAEY,wBAFb;IAGE,aAAU;EAHZ,EADM,GAMJ,IAxBN,CADF;AA4BD,CA5HD;;AA8HAlB,aAAa,CAAChC,SAAd,2CAA0BA,SAA1B;AAEA,eAAegC,aAAf"}
@@ -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,oBAAoB,GAAG;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE;QACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,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"}
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,oBAAoB,GAAG;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE;QACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,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"}
@@ -7,7 +7,7 @@ export const ANIMATION_CONTROL = {
7
7
  loading: 'loading'
8
8
  };
9
9
  const propTypes = {
10
- 'aria-label': PropTypes.string.isRequired,
10
+ 'aria-label': PropTypes.string,
11
11
  'data-name': PropTypes.string,
12
12
  animationSrc: PropTypes.string.isRequired,
13
13
  loop: PropTypes.bool,
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["keys","PropTypes","ANIMATION_CONTROL","play","pause","stop","loading","propTypes","string","isRequired","animationSrc","loop","bool","rendererSettings","shape","hideOnTransparent","className","height","number","width","ie11ImageBackup","backupImageClassName","autoplay","animationControl","oneOf"],"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,OAAOA,IAAP,MAAiB,gBAAjB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAoBA,OAAO,MAAMC,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,cAAcN,SAAS,CAACO,MAAV,CAAiBC,UADf;EAEhB,aAAaR,SAAS,CAACO,MAFP;EAGhBE,YAAY,EAAET,SAAS,CAACO,MAAV,CAAiBC,UAHf;EAIhBE,IAAI,EAAEV,SAAS,CAACW,IAJA;EAKhBC,gBAAgB,EAAEZ,SAAS,CAACa,KAAV,CAAgB;IAChCC,iBAAiB,EAAEd,SAAS,CAACW,IADG;IAEhCI,SAAS,EAAEf,SAAS,CAACO;EAFW,CAAhB,CALF;EAShBS,MAAM,EAAEhB,SAAS,CAACiB,MATF;EAUhBC,KAAK,EAAElB,SAAS,CAACiB,MAVD;EAWhBF,SAAS,EAAEf,SAAS,CAACO,MAXL;EAYhBY,eAAe,EAAEnB,SAAS,CAACO,MAAV,CAAiBC,UAZlB;EAahBY,oBAAoB,EAAEpB,SAAS,CAACO,MAbhB;EAchBc,QAAQ,EAAErB,SAAS,CAACW,IAdJ;EAehBW,gBAAgB,EAAEtB,SAAS,CAACuB,KAAV,CAAgBxB,IAAI,CAACE,iBAAD,CAApB;AAfF,CAAlB;AAkBA,eAAeK,SAAf"}
1
+ {"version":3,"file":"prop-types.js","names":["keys","PropTypes","ANIMATION_CONTROL","play","pause","stop","loading","propTypes","string","animationSrc","isRequired","loop","bool","rendererSettings","shape","hideOnTransparent","className","height","number","width","ie11ImageBackup","backupImageClassName","autoplay","animationControl","oneOf"],"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,OAAOA,IAAP,MAAiB,gBAAjB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAoBA,OAAO,MAAMC,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,cAAcN,SAAS,CAACO,MADR;EAEhB,aAAaP,SAAS,CAACO,MAFP;EAGhBC,YAAY,EAAER,SAAS,CAACO,MAAV,CAAiBE,UAHf;EAIhBC,IAAI,EAAEV,SAAS,CAACW,IAJA;EAKhBC,gBAAgB,EAAEZ,SAAS,CAACa,KAAV,CAAgB;IAChCC,iBAAiB,EAAEd,SAAS,CAACW,IADG;IAEhCI,SAAS,EAAEf,SAAS,CAACO;EAFW,CAAhB,CALF;EAShBS,MAAM,EAAEhB,SAAS,CAACiB,MATF;EAUhBC,KAAK,EAAElB,SAAS,CAACiB,MAVD;EAWhBF,SAAS,EAAEf,SAAS,CAACO,MAXL;EAYhBY,eAAe,EAAEnB,SAAS,CAACO,MAAV,CAAiBE,UAZlB;EAahBW,oBAAoB,EAAEpB,SAAS,CAACO,MAbhB;EAchBc,QAAQ,EAAErB,SAAS,CAACW,IAdJ;EAehBW,gBAAgB,EAAEtB,SAAS,CAACuB,KAAV,CAAgBxB,IAAI,CAACE,iBAAD,CAApB;AAfF,CAAlB;AAkBA,eAAeK,SAAf"}
@@ -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"}
@@ -28,7 +28,8 @@ const getIcon = icon => {
28
28
  };
29
29
 
30
30
  const ToolTip = ({
31
- tooltipText
31
+ tooltipText,
32
+ 'aria-label': moreDetailsAriaLabel
32
33
  }) => {
33
34
  return /*#__PURE__*/React.createElement("div", {
34
35
  className: style.tooltipContainer
@@ -37,10 +38,11 @@ const ToolTip = ({
37
38
  }, /*#__PURE__*/React.createElement(InformationIcon, {
38
39
  className: style.informationIcon,
39
40
  width: 12,
40
- height: 12
41
+ height: 12,
42
+ "aria-label": moreDetailsAriaLabel
41
43
  })), /*#__PURE__*/React.createElement("div", {
42
44
  className: style.toolTip
43
- }, /*#__PURE__*/React.createElement("div", {
45
+ }, /*#__PURE__*/React.createElement("p", {
44
46
  className: style.tooltipText
45
47
  }, tooltipText)));
46
48
  };
@@ -82,13 +84,15 @@ const ReviewPresentation = props => {
82
84
  }, /*#__PURE__*/React.createElement("div", {
83
85
  className: style.reviewListText
84
86
  }, getIcon(key), " ", label.text), /*#__PURE__*/React.createElement(ToolTip, {
85
- tooltipText: label.tooltipText
87
+ tooltipText: label.tooltipText,
88
+ "aria-label": label.moreDetailsAriaLabel
86
89
  })));
87
90
  }, labelsList)));
88
91
  };
89
92
 
90
93
  ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
91
- tooltipText: PropTypes.string
94
+ tooltipText: PropTypes.string,
95
+ 'aria-label': PropTypes.string
92
96
  } : {};
93
97
  ReviewPresentation.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
94
98
  export default ReviewPresentation;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","getOr","map","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaCompositionCoorpacademyInformationIcon","InformationIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","style","propTypes","ICONS","skills","questions","lifes","allright","getIcon","icon","Icon","labelIcon","ToolTip","tooltipText","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","convert","cap","label","key","reviewList","reviewListItemWrapper","reviewListText","text","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,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAA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A1B;IAAuCC,UAAvC;IAAmDC;EAAnD,IAAiEJ,KAAvE;EAEA,oBACE;IAAK,SAAS,EAAElB,KAAK,CAACuB,aAAtB;IAAqC,cAAYJ;EAAjD,gBACE;IACE,SAAS,EAAEnB,KAAK,CAACoB,WADnB,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACI,MAAM,EAAEJ;IAAT;EAH3B,EADF,eAME;IACE,SAAS,EAAEpB,KAAK,CAACqB,UADnB,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACG,MAAM,EAAEH;IAAT;EAH3B,EANF,eAWE;IAAI,SAAS,EAAErB,KAAK,CAACyB;EAArB,GACGpC,GAAG,CAACqC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,KAAD,EAAQC,GAAR,KAAgB;IACzC,oBACE;MAAI,GAAG,EAAG,QAAOA,GAAI,EAArB;MAAwB,SAAS,EAAE7B,KAAK,CAAC8B;IAAzC,gBACE;MAAK,SAAS,EAAE9B,KAAK,CAAC+B,qBAAtB;MAA6C,gBAA7C;MAAsD,YAAS;IAA/D,gBACE;MAAK,SAAS,EAAE/B,KAAK,CAACgC;IAAtB,GACGzB,OAAO,CAACsB,GAAD,CADV,OACkBD,KAAK,CAACK,IADxB,CADF,eAIE,oBAAC,OAAD;MAAS,WAAW,EAAEL,KAAK,CAAChB;IAA5B,EAJF,CADF,CADF;EAUD,CAXA,EAWEU,UAXF,CADH,CAXF,CADF;AA4BD,CA/BD;;AAiCAX,OAAO,CAACV,SAAR,2CAAoB;EAClBW,WAAW,EAAEzB,SAAS,CAAC+C;AADL,CAApB;AAIAjB,kBAAkB,CAAChB,SAAnB,2CAA+BA,SAA/B;AAEA,eAAegB,kBAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","getOr","map","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaCompositionCoorpacademyInformationIcon","InformationIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","style","propTypes","ICONS","skills","questions","lifes","allright","getIcon","icon","Icon","labelIcon","ToolTip","tooltipText","moreDetailsAriaLabel","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","convert","cap","label","key","reviewList","reviewListItemWrapper","reviewListText","text","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,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,SACEC,2BAA2B,IAAIC,SADjC,EAEEC,6BAA6B,IAAIC,SAFnC,EAGEC,0CAA0C,IAAIC,eAHhD,EAIEC,+CAA+C,IAAIC,YAJrD,EAKEC,yCAAyC,IAAIC,UAL/C,QAMO,0BANP;AAOA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AAEA,MAAMC,KAAK,GAAG;EACZC,MAAM,EAAEJ,UADI;EAEZK,SAAS,EAAEP,YAFC;EAGZQ,KAAK,EAAEZ,SAHK;EAIZa,QAAQ,EAAEf;AAJE,CAAd;;AAOA,MAAMgB,OAAO,GAAGC,IAAI,IAAI;EACtB,MAAMC,IAAI,GAAGrB,KAAK,CAAC,IAAD,EAAOoB,IAAP,EAAaN,KAAb,CAAlB;EAEA;;EACA,IAAI,CAACO,IAAL,EAAW;IACT,oBAAO;MAAK,SAAS,EAAET,KAAK,CAACU;IAAtB,EAAP;EACD;;EACD,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AACgC,qBAAtB;MAA6C,gBAA7C;MAAsD,YAAS;IAA/D,gBACE;MAAK,SAAS,EAAEhC,KAAK,CAACiC;IAAtB,GACG1B,OAAO,CAACuB,GAAD,CADV,OACkBD,KAAK,CAACK,IADxB,CADF,eAIE,oBAAC,OAAD;MAAS,WAAW,EAAEL,KAAK,CAACjB,WAA5B;MAAyC,cAAYiB,KAAK,CAAChB;IAA3D,EAJF,CADF,CADF;EAUD,CAXA,EAWEU,UAXF,CADH,CAXF,CADF;AA4BD,CA9BD;;AAgCAZ,OAAO,CAACV,SAAR,2CAAoB;EAClBW,WAAW,EAAEzB,SAAS,CAACgD,MADL;EAElB,cAAchD,SAAS,CAACgD;AAFN,CAApB;AAKAjB,kBAAkB,CAACjB,SAAnB,2CAA+BA,SAA/B;AAEA,eAAeiB,kBAAf"}
@@ -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,CAAC;SAClC,GACD,SAAS,CAAC;QACd,SAAS,CAAC,EAAE;YACV,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAClC,CAAC;QACF,KAAK,CAAC,EACF;YACE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,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;QACd,SAAS,CAAC,EAAE;YACV,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,CAAC;QACF,KAAK,CAAC,EACF;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;QACd,QAAQ,CAAC,EACL;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;KACf,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAC,CAAC,CAAC;CACtF,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  const levelItem = PropTypes.shape({
3
3
  text: PropTypes.string,
4
- tooltipText: PropTypes.string
4
+ tooltipText: PropTypes.string,
5
+ moreDetailsAreaLabel: PropTypes.string
5
6
  });
6
7
  const propTypes = {
7
8
  'aria-label': PropTypes.string,
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["PropTypes","levelItem","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,OAAOA,SAAP,MAAsB,YAAtB;AAGA,MAAMC,SAAS,GAAGD,SAAS,CAACE,KAAV,CAAgB;EAChCC,IAAI,EAAEH,SAAS,CAACI,MADgB;EAEhCC,WAAW,EAAEL,SAAS,CAACI;AAFS,CAAhB,CAAlB;AAKA,MAAME,SAAS,GAAG;EAChB,cAAcN,SAAS,CAACI,MADR;EAEhBG,WAAW,EAAEP,SAAS,CAACI,MAFP;EAGhBI,UAAU,EAAER,SAAS,CAACI,MAHN;EAIhBK,UAAU,EAAET,SAAS,CAACE,KAAV,CAAgB;IAC1BQ,MAAM,EAAET,SADkB;IAE1BU,SAAS,EAAEV,SAFe;IAG1BW,KAAK,EAAEX,SAHmB;IAI1BY,QAAQ,EAAEZ;EAJgB,CAAhB;AAJI,CAAlB;AAYA,eAAeK,SAAf;AAEA,OAAO,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEf,SAAS,CAACgB;AADe,CAA7B;AAIP,OAAO,MAAMC,aAAa,GAAG;EAC3Bd,IAAI,EAAEH,SAAS,CAACI,MADW;EAE3Bc,IAAI,EAAElB,SAAS,CAACmB;AAFW,CAAtB"}
1
+ {"version":3,"file":"prop-types.js","names":["PropTypes","levelItem","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,OAAOA,SAAP,MAAsB,YAAtB;AAGA,MAAMC,SAAS,GAAGD,SAAS,CAACE,KAAV,CAAgB;EAChCC,IAAI,EAAEH,SAAS,CAACI,MADgB;EAEhCC,WAAW,EAAEL,SAAS,CAACI,MAFS;EAGhCE,oBAAoB,EAAEN,SAAS,CAACI;AAHA,CAAhB,CAAlB;AAMA,MAAMG,SAAS,GAAG;EAChB,cAAcP,SAAS,CAACI,MADR;EAEhBI,WAAW,EAAER,SAAS,CAACI,MAFP;EAGhBK,UAAU,EAAET,SAAS,CAACI,MAHN;EAIhBM,UAAU,EAAEV,SAAS,CAACE,KAAV,CAAgB;IAC1BS,MAAM,EAAEV,SADkB;IAE1BW,SAAS,EAAEX,SAFe;IAG1BY,KAAK,EAAEZ,SAHmB;IAI1Ba,QAAQ,EAAEb;EAJgB,CAAhB;AAJI,CAAlB;AAYA,eAAeM,SAAf;AAEA,OAAO,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEhB,SAAS,CAACiB;AADe,CAA7B;AAIP,OAAO,MAAMC,aAAa,GAAG;EAC3Bf,IAAI,EAAEH,SAAS,CAACI,MADW;EAE3Be,IAAI,EAAEnB,SAAS,CAACoB;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"}
@@ -1,9 +1,9 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import React, { useEffect, useRef } from 'react';
4
- import AtomLottieWrapper from '../../atom/lottie-wrapper';
4
+ import LottieWrapper from '../../atom/lottie-wrapper';
5
5
  import ButtonLink from '../../atom/button-link';
6
- import MoleculeReviewCardCongrats from '../../molecule/review-card-congrats';
6
+ import ReviewCardCongrats from '../../molecule/review-card-congrats';
7
7
  import style from './style.css';
8
8
  import propTypes from './prop-types';
9
9
  export const setScroll = container => () => {
@@ -34,7 +34,9 @@ const ReviewCongrats = props => {
34
34
  "aria-label": ariaLabel,
35
35
  "data-name": dataName,
36
36
  "data-testid": "congrats"
37
- }, /*#__PURE__*/React.createElement(AtomLottieWrapper, _extends({}, animationLottie, {
37
+ }, /*#__PURE__*/React.createElement(LottieWrapper
38
+ /** confetti animation */
39
+ , _extends({}, animationLottie, {
38
40
  loop: false,
39
41
  animationControl: 'play',
40
42
  autoplay: true,
@@ -48,12 +50,12 @@ const ReviewCongrats = props => {
48
50
  }, title), /*#__PURE__*/React.createElement("div", {
49
51
  ref: container,
50
52
  className: style.containerCards
51
- }, cardCongratsRank ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MoleculeReviewCardCongrats, _extends({}, cardCongratsStar, {
53
+ }, cardCongratsRank ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ReviewCardCongrats, _extends({}, cardCongratsStar, {
52
54
  className: style.cardStar
53
- })), /*#__PURE__*/React.createElement(MoleculeReviewCardCongrats, _extends({}, cardCongratsRank, {
55
+ })), /*#__PURE__*/React.createElement(ReviewCardCongrats, _extends({}, cardCongratsRank, {
54
56
  timerAnimation: 1800,
55
57
  className: style.cardRank
56
- }))) : /*#__PURE__*/React.createElement(MoleculeReviewCardCongrats, _extends({}, cardCongratsStar, {
58
+ }))) : /*#__PURE__*/React.createElement(ReviewCardCongrats, _extends({}, cardCongratsStar, {
57
59
  className: style.cardStarNoRank
58
60
  }))), /*#__PURE__*/React.createElement("div", {
59
61
  className: style.buttonContainer
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useEffect","useRef","AtomLottieWrapper","ButtonLink","MoleculeReviewCardCongrats","style","propTypes","setScroll","container","current","scrollTo","left","behavior","ReviewCongrats","props","ariaLabel","dataName","animationLottie","title","cardCongratsStar","cardCongratsRank","buttonRevising","buttonRevisingSkill","timer","setTimeout","clearTimeout","mainContainer","lottie","ie11Backup","containerCongrats","containerCards","cardStar","cardRank","cardStarNoRank","buttonContainer","buttonRevise"],"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,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,MAA1B,QAAuC,OAAvC;AACA,OAAOC,iBAAP,MAA8B,2BAA9B;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,0BAAP,MAAuC,qCAAvC;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AAEA,OAAO,MAAMC,SAAS,GAAGC,SAAS,IAAI,MAAM;EAC1CA,SAAS,CAACC,OAAV,EA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,SAAS,EAAEf,KAAK,CAAC2B;EAHnB,GAFF,CADe,gBAUf,oBAAC,0BAAD,eAAgCb,gBAAhC;IAAkD,SAAS,EAAEd,KAAK,CAAC4B;EAAnE,GAXJ,CAFF,eAgBE;IAAK,SAAS,EAAE5B,KAAK,CAAC6B;EAAtB,GACGb,cAAc,gBACb,oBAAC,UAAD,eACMA,cADN;IAEE,SAAS,EAAEhB,KAAK,CAAC8B,YAFnB;IAGE,eAAY;EAHd,GADa,GAMX,IAPN,EAQGb,mBAAmB,gBAClB,oBAAC,UAAD,eACMA,mBADN;IAEE,SAAS,EAAEjB,KAAK,CAAC8B,YAFnB;IAGE,eAAY;EAHd,GADkB,GAMhB,IAdN,CAhBF,CAfF,CADF;AAmDD,CAtED;;AAwEAtB,cAAc,CAACP,SAAf,2CAA2BA,SAA3B;AAEA,eAAeO,cAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useEffect","useRef","LottieWrapper","ButtonLink","ReviewCardCongrats","style","propTypes","setScroll","container","current","scrollTo","left","behavior","ReviewCongrats","props","ariaLabel","dataName","animationLottie","title","cardCongratsStar","cardCongratsRank","buttonRevising","buttonRevisingSkill","timer","setTimeout","clearTimeout","mainContainer","lottie","ie11Backup","containerCongrats","containerCards","cardStar","cardRank","cardStarNoRank","buttonContainer","buttonRevise"],"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,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,MAA1B,QAAuC,OAAvC;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,kBAAP,MAA+B,qCAA/B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AAEA,OAAO,MAAMC,SAAS,GAAGC,SAAS,IAAI,MAAM;EAC1CA,SAAS,CAACC,OAAV,EAAmBC,QAAnB,IACEF,SAAS,CAACC,OAAV,CAAkBC,QAAlB,CAA2B;IACzBC,IAAI,EAAE,IADmB;IAEzBC,QAAQ,EA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,EAAEd,KAAK,CAAC4B;EAA3D,GAXJ,CAFF,eAgBE;IAAK,SAAS,EAAE5B,KAAK,CAAC6B;EAAtB,GACGb,cAAc,gBACb,oBAAC,UAAD,eACMA,cADN;IAEE,SAAS,EAAEhB,KAAK,CAAC8B,YAFnB;IAGE,eAAY;EAHd,GADa,GAMX,IAPN,EAQGb,mBAAmB,gBAClB,oBAAC,UAAD,eACMA,mBADN;IAEE,SAAS,EAAEjB,KAAK,CAAC8B,YAFnB;IAGE,eAAY;EAHd,GADkB,GAMhB,IAdN,CAhBF,CAhBF,CADF;AAoDD,CAvED;;AAyEAtB,cAAc,CAACP,SAAf,2CAA2BA,SAA3B;AAEA,eAAeO,cAAf"}
@@ -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>;
@@ -42,7 +42,7 @@ const StackedSlides = props => {
42
42
  });
43
43
  const restackTranslation = useTranslateY({
44
44
  toValue: 0,
45
- fromValue: -windowHeight,
45
+ fromValue: windowHeight,
46
46
  duration: 1200,
47
47
  easing: Easing.out(Easing.cubic)
48
48
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["React","useEffect","useState","Animated","Easing","StyleSheet","useWindowDimensions","keys","useTranslateY","Slide","style","create","slides","flex","height","width","StackedSlides","props","windowHeight","endReview","validateButton","correctionPopinProps","unstacked","setUnstacked","restacking","setRestacking","restackingDone","setRestackingDone","hideSlides","fromValue","toValue","duration","translateDown","easing","cubic","restackTranslation","out","start","restackingSlide","find","k","animationType","unstackingSlide","remainingKeys","filter","position","orderedKeys","sort","k1","k2","animatedFrontSlide","undefined","animatedRestackedSlide","includes","toString","unstacking","startRestacking","stackedSlides","map","slideIndex","index","slide","num","length","push","animatedStyle"],"sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Animated, Easing, StyleSheet, useWindowDimensions} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport {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,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,QAAR,EAAkBC,MAAlB,EAA0BC,UAA1B,EAAsCC,mBAAtC,QAAgE,cAAhE;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,aAAR,QAA4B,sCAA5B;AACA,OAAOC,KAAP,MAAkB,8BAAlB;AAGA,MAAMC,KAAK,GAAGL,UAAU,CAACM,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,IAAyBZ,mBAAmB,EAAlD;EACA,MAAM;IAACa,SAAD;IAAYP,MAAZ;IAAoBQ,cAApB;IAAoCC;EAApC,IAA4DJ,KAAlE;EACA,MAAM,CAACK,SAAD,EAAYC,YAAZ,IAA4BrB,QAAQ,CAAW,EAAX,CAA1C;EACA,MAAM,CAACsB,UAAD,EAAaC,aAAb,IAA8BvB,QAA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AApB,CARjB;IASE,GAAG,EAAEzC;EATP,EADqB,GAYnB,IAbN,EAcGiC,aAdH,CADF;AAkBD,CAvID;;AAyIA,eAAezC,aAAf"}
1
+ {"version":3,"file":"index.native.js","names":["React","useEffect","useState","Animated","Easing","StyleSheet","useWindowDimensions","keys","useTranslateY","Slide","style","create","slides","flex","height","width","StackedSlides","props","windowHeight","endReview","validateButton","correctionPopinProps","unstacked","setUnstacked","restacking","setRestacking","restackingDone","setRestackingDone","hideSlides","fromValue","toValue","duration","translateDown","easing","cubic","restackTranslation","out","start","restackingSlide","find","k","animationType","unstackingSlide","remainingKeys","filter","position","orderedKeys","sort","k1","k2","animatedFrontSlide","undefined","animatedRestackedSlide","includes","toString","unstacking","startRestacking","stackedSlides","map","slideIndex","index","slide","num","length","push","animatedStyle"],"sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Animated, Easing, StyleSheet, useWindowDimensions} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport {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,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,QAAR,EAAkBC,MAAlB,EAA0BC,UAA1B,EAAsCC,mBAAtC,QAAgE,cAAhE;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,aAAR,QAA4B,sCAA5B;AACA,OAAOC,KAAP,MAAkB,8BAAlB;AAGA,MAAMC,KAAK,GAAGL,UAAU,CAACM,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,IAAyBZ,mBAAmB,EAAlD;EACA,MAAM;IAACa,SAAD;IAAYP,MAAZ;IAAoBQ,cAApB;IAAoCC;EAApC,IAA4DJ,KAAlE;EACA,MAAM,CAACK,SAAD,EAAYC,YAAZ,IAA4BrB,QAAQ,CAAW,EAAX,CAA1C;EACA,MAAM,CAACsB,UAAD,EAAaC,aAAb,IAA8BvB,QAAQ,CAAgB,IAAhB,CAA5C;EACA,MAAM,CAACwB,cAAD,EAAiBC,iBAAjB,IAAsCzB,QAAQ,CAAU,KAAV,CAApD;EAEA,MAAM0B,UAAU,GAAGpB,aAAa,CAA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
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"}
@@ -1,6 +1,6 @@
1
1
  import _isEmpty from "lodash/fp/isEmpty";
2
2
  import _map from "lodash/fp/map";
3
- const _excluded = ["label", "description"];
3
+ const _excluded = ["label", "description", "moreInfoAriaLabel"];
4
4
 
5
5
  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); }
6
6
 
@@ -15,7 +15,8 @@ import style from './style.css';
15
15
  const Settings = props => {
16
16
  const {
17
17
  label,
18
- description
18
+ description,
19
+ moreInfoAriaLabel
19
20
  } = props,
20
21
  settings = _objectWithoutPropertiesLoose(props, _excluded);
21
22
 
@@ -28,7 +29,8 @@ const Settings = props => {
28
29
  }, /*#__PURE__*/React.createElement(InfoIcon, {
29
30
  height: 16,
30
31
  width: 16,
31
- className: style.infoIcon
32
+ className: style.infoIcon,
33
+ "aria-label": moreInfoAriaLabel
32
34
  }), /*#__PURE__*/React.createElement("div", {
33
35
  className: style.showToolTip
34
36
  }, /*#__PURE__*/React.createElement("div", {
@@ -43,17 +45,20 @@ Settings.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, InputS
43
45
 
44
46
  const UserPreferences = props => {
45
47
  const {
46
- preferences = []
48
+ preferences = [],
49
+ moreInfoAriaLabel
47
50
  } = props;
48
51
  return /*#__PURE__*/React.createElement("div", {
49
52
  className: style.preferences
50
53
  }, _map(settings => /*#__PURE__*/React.createElement(Settings, _extends({}, settings, {
51
- key: settings.label
54
+ key: settings.label,
55
+ moreInfoAriaLabel: moreInfoAriaLabel
52
56
  })), preferences));
53
57
  };
54
58
 
55
59
  UserPreferences.propTypes = process.env.NODE_ENV !== "production" ? {
56
- preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes))
60
+ preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),
61
+ moreInfoAriaLabel: PropTypes.string
57
62
  } : {};
58
63
  export default UserPreferences;
59
64
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionCoorpacademyInformationIcon","InfoIcon","InputSwitch","style","Settings","props","label","description","settings","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","string","isRequired","UserPreferences","preferences","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, isEmpty} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyInformationIcon as InfoIcon} from '@coorpacademy/nova-icons';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const {label, description, ...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,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,0CAA0C,IAAIC,QAAtD,QAAqE,0BAArE;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,KAAD;IAAQC;EAAR,IAAoCF,KAA1C;EAAA,MAA8BG,QAA9B,iCAA0CH,KAA1C;;EACA,oBACE;IAAK,SAAS,EAAEF,KAAK,CAACK;EAAtB,gBACE,oBAAC,WAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEL,KAAK,CAACG;EAAvB,GAA+BA,KAA/B,CAFF,EAGG,SAAQC,WAAR,IAAuB,IAAvB,gBACC;IAAK,SAAS,EAAEJ,KAAK,CAACM;EAAtB,gBACE,oBAAC,QAAD;IAAU,MAAM,EAAE,EAAlB;IAAsB,KAAK,EAAE,EAA7B;IAAiC,SAAS,EAAEN,KAAK,CAACO;EAAlD,EADF,eAEE;IAAK,SAAS,EAAEP,KAAK,CAACQ;EAAtB,gBACE;IAAK,SAAS,EAAER,KAAK,CAACS;EAAtB,GAAyCL,WAAzC,CADF,CAFF,CAJJ,CADF;AAcD,CAhBD;;AAkBAH,QAAQ,CAACS,SAAT,wDACKX,WAAW,CAACW,SADjB;EAEEP,KAAK,EAAEP,SAAS,CAACe,MAAV,CAAiBC,UAF1B;EAGER,WAAW,EAAER,SAAS,CAACe;AAHzB;;AAMA,MAAME,eAAe,GAAGX,KAAK,IAAI;EAC/B,MAAM;IAACY,WAAW,GAAG;EAAf,IAAqBZ,KAA3B;EAEA,oBACE;IAAK,SAAS,EAAEF,KAAK,CAACc;EAAtB,GACG,KACCT,QAAQ,iBACN,oBAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACF;EAAtC,GAFH,EAICW,WAJD,CADH,CADF;AAUD,CAbD;;AAeAD,eAAe,CAACH,SAAhB,2CAA4B;EAC1BI,WAAW,EAAElB,SAAS,CAACmB,OAAV,CAAkBnB,SAAS,CAACoB,KAAV,CAAgBf,QAAQ,CAACS,SAAzB,CAAlB;AADa,CAA5B;AAIA,eAAeG,eAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionCoorpacademyInformationIcon","InfoIcon","InputSwitch","style","Settings","props","label","description","moreInfoAriaLabel","settings","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","string","isRequired","UserPreferences","preferences","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, isEmpty} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyInformationIcon as InfoIcon} from '@coorpacademy/nova-icons';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const {label, description, moreInfoAriaLabel, ...settings} = props;\n return (\n <div className={style.settings}>\n <InputSwitch {...settings} />\n <span className={style.label}>{label}</span>\n {isEmpty(description) ? null : (\n <div className={style.infoIconWrapper}>\n <InfoIcon\n height={16}\n width={16}\n className={style.infoIcon}\n aria-label={moreInfoAriaLabel}\n />\n <div className={style.showToolTip}>\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n ...InputSwitch.propTypes,\n label: PropTypes.string.isRequired,\n description: PropTypes.string\n};\n\nconst UserPreferences = props => {\n const {preferences = [], moreInfoAriaLabel} = props;\n\n return (\n <div className={style.preferences}>\n {map(\n settings => (\n <Settings {...settings} key={settings.label} moreInfoAriaLabel={moreInfoAriaLabel} />\n ),\n preferences\n )}\n </div>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTyp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ACCT,QAAQ,iBACN,oBAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACH,KAAtC;IAA6C,iBAAiB,EAAEE;EAAhE,GAFH,EAICU,WAJD,CADH,CADF;AAUD,CAbD;;AAeAD,eAAe,CAACH,SAAhB,2CAA4B;EAC1BI,WAAW,EAAEnB,SAAS,CAACoB,OAAV,CAAkBpB,SAAS,CAACqB,KAAV,CAAgBhB,QAAQ,CAACU,SAAzB,CAAlB,CADa;EAE1BN,iBAAiB,EAAET,SAAS,CAACgB;AAFH,CAA5B;AAKA,eAAeE,eAAf"}
@@ -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"}