@coorpacademy/components 10.24.2 → 10.24.3-alpha.8

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 (81) hide show
  1. package/es/atom/provider/web-context.js +1 -1
  2. package/es/atom/provider/web-context.js.map +1 -1
  3. package/es/hoc/animation-scheduler/index.js +3 -3
  4. package/es/hoc/animation-scheduler/index.js.map +1 -1
  5. package/es/hoc/swapper/index.js +1 -1
  6. package/es/hoc/swapper/index.js.map +1 -1
  7. package/es/hoc/transition/index.js +1 -1
  8. package/es/hoc/transition/index.js.map +1 -1
  9. package/es/molecule/add-to-my-list/index.js +1 -1
  10. package/es/molecule/add-to-my-list/index.js.map +1 -1
  11. package/es/molecule/card/index.js +1 -1
  12. package/es/molecule/card/index.js.map +1 -1
  13. package/es/molecule/cm-popin/index.js.map +1 -1
  14. package/es/molecule/dashboard/battle-request-list/index.js +1 -1
  15. package/es/molecule/dashboard/battle-request-list/index.js.map +1 -1
  16. package/es/molecule/dashboard/news-list/index.js +1 -1
  17. package/es/molecule/dashboard/news-list/index.js.map +1 -1
  18. package/es/molecule/dashboard/review-banner/index.js +1 -1
  19. package/es/molecule/dashboard/review-banner/index.js.map +1 -1
  20. package/es/molecule/dashboard/start-battle/index.js +1 -1
  21. package/es/molecule/dashboard/start-battle/index.js.map +1 -1
  22. package/es/molecule/share/index.js +1 -1
  23. package/es/molecule/share/index.js.map +1 -1
  24. package/es/organism/review-congrats/index.js +3 -3
  25. package/es/organism/review-congrats/index.js.map +1 -1
  26. package/es/organism/review-stacked-slides/index.js +3 -6
  27. package/es/organism/review-stacked-slides/index.js.map +1 -1
  28. package/es/organism/review-stacked-slides/index.native.js +3 -6
  29. package/es/organism/review-stacked-slides/index.native.js.map +1 -1
  30. package/es/template/app-player/popin-end/summary.js +3 -4
  31. package/es/template/app-player/popin-end/summary.js.map +1 -1
  32. package/es/template/app-review/skills/index.native.js +146 -107
  33. package/es/template/app-review/skills/index.native.js.map +1 -1
  34. package/es/template/app-review/skills/prop-types.js +17 -0
  35. package/es/template/app-review/skills/prop-types.js.map +1 -0
  36. package/es/template/app-review/template-context.js +1 -1
  37. package/es/template/app-review/template-context.js.map +1 -1
  38. package/es/template/common/dashboard/index.js +1 -1
  39. package/es/template/common/dashboard/index.js.map +1 -1
  40. package/es/types/translations.js.map +1 -1
  41. package/lib/atom/provider/web-context.js +1 -1
  42. package/lib/atom/provider/web-context.js.map +1 -1
  43. package/lib/hoc/animation-scheduler/index.js +3 -3
  44. package/lib/hoc/animation-scheduler/index.js.map +1 -1
  45. package/lib/hoc/swapper/index.js +1 -1
  46. package/lib/hoc/swapper/index.js.map +1 -1
  47. package/lib/hoc/transition/index.js +1 -1
  48. package/lib/hoc/transition/index.js.map +1 -1
  49. package/lib/molecule/add-to-my-list/index.js +1 -1
  50. package/lib/molecule/add-to-my-list/index.js.map +1 -1
  51. package/lib/molecule/card/index.js +1 -1
  52. package/lib/molecule/card/index.js.map +1 -1
  53. package/lib/molecule/cm-popin/index.js.map +1 -1
  54. package/lib/molecule/dashboard/battle-request-list/index.js +1 -1
  55. package/lib/molecule/dashboard/battle-request-list/index.js.map +1 -1
  56. package/lib/molecule/dashboard/news-list/index.js +1 -1
  57. package/lib/molecule/dashboard/news-list/index.js.map +1 -1
  58. package/lib/molecule/dashboard/review-banner/index.js +1 -1
  59. package/lib/molecule/dashboard/review-banner/index.js.map +1 -1
  60. package/lib/molecule/dashboard/start-battle/index.js +1 -1
  61. package/lib/molecule/dashboard/start-battle/index.js.map +1 -1
  62. package/lib/molecule/share/index.js +1 -1
  63. package/lib/molecule/share/index.js.map +1 -1
  64. package/lib/organism/review-congrats/index.js +3 -3
  65. package/lib/organism/review-congrats/index.js.map +1 -1
  66. package/lib/organism/review-stacked-slides/index.js +3 -6
  67. package/lib/organism/review-stacked-slides/index.js.map +1 -1
  68. package/lib/organism/review-stacked-slides/index.native.js +3 -6
  69. package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
  70. package/lib/template/app-player/popin-end/summary.js +3 -4
  71. package/lib/template/app-player/popin-end/summary.js.map +1 -1
  72. package/lib/template/app-review/skills/index.native.js +146 -111
  73. package/lib/template/app-review/skills/index.native.js.map +1 -1
  74. package/lib/template/app-review/skills/prop-types.js +29 -0
  75. package/lib/template/app-review/skills/prop-types.js.map +1 -0
  76. package/lib/template/app-review/template-context.js +1 -1
  77. package/lib/template/app-review/template-context.js.map +1 -1
  78. package/lib/template/common/dashboard/index.js +1 -1
  79. package/lib/template/common/dashboard/index.js.map +1 -1
  80. package/lib/types/translations.js.map +1 -1
  81. package/package.json +4 -4
@@ -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 className={style.mainContainer} aria-label={ariaLabel} data-name={dataName}>\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 <ButtonLink\n {...buttonRevising}\n className={style.buttonRevise}\n data-name=\"revise-skill-link\"\n />\n <ButtonLink {...buttonRevisingSkill} className={style.buttonRevise} />\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,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;IAOJC,cAPI;IAQJC;EARI,IASFR,KATJ;EAWA,MAAM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jB,KAAK,CAAC8B;EAAtD,GANF,CAhBF,CAVF,CADF;AAsCD,CAzDD;;AA2DAtB,cAAc,CAACP,SAAf,2CAA2BA,SAA3B;AAEA,eAAeO,cAAf"}
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 className={style.mainContainer} aria-label={ariaLabel} data-name={dataName}>\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-name=\"revise-skill-link\"\n />\n ) : null}\n {buttonRevisingSkill ? (\n <ButtonLink {...buttonRevisingSkill} className={style.buttonRevise} />\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,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;IAOJC,cAPI;IAQJC;EARI,IASFR,KATJ;EAWA,MAAMN,SAAS,GAAGP,MAAM,CAAC,IAAD,CAAxB;EAEAD,SAAS,CAAC,MAAM;IACd,MAAMuB,KAAK,GAAGC,UAAU,CAACjB,SAAS,CAACC,SAAD,CAAV,EAAuB,IAAvB,CAAxB;IACA,OAAO,MAAMe,KAAK,IAAIE,YAAY,CAACF,KAAD,CAAlC;EACD,CA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{ _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
-
3
1
  import React from 'react';
4
2
  import classnames from 'classnames';
5
3
  import _toString from 'lodash/fp/toString';
@@ -47,14 +45,13 @@ const StackedSlides = ({
47
45
  key: `slide-${slideIndex}`,
48
46
  "data-name": `slide-${slideIndex}`,
49
47
  className: classnames(style.slideBase, getSlideAnimation(animationType, position), endReview ? style.endReview : null)
50
- }, /*#__PURE__*/React.createElement(ReviewSlide, _extends({
48
+ }, /*#__PURE__*/React.createElement(ReviewSlide, {
51
49
  slideIndex: _toString(slideIndex),
52
50
  slide,
53
51
  validateButton,
54
- correctionPopinProps
55
- }, {
52
+ correctionPopinProps,
56
53
  key: slideIndex
57
- })));
54
+ }));
58
55
  stackedSlides.push(slideView);
59
56
  }
60
57
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","classnames","_toString","ReviewSlide","propTypes","style","TOTAL_SLIDES_STACK","stylesByPosition","position0","position1","position2","position3","position4","getSlideAnimation","action","position","slideOutHideAndIn","slideOutAndIn","hiddenSlide","StackedSlides","slides","endReview","validateButton","correctionPopinProps","stackedSlides","slideIndex","slide","animationType","slideView","slideBase","push","stackedSlidesYAxisOverflowContainer","stackedSlidesContainer"],"sources":["../../../src/organism/review-stacked-slides/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport _toString from 'lodash/fp/toString';\nimport ReviewSlide from '../review-slide';\nimport propTypes from './prop-types';\nimport style from './style.css';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst stylesByPosition = {\n 0: style.position0,\n 1: style.position1,\n 2: style.position2,\n 3: style.position3,\n 4: style.position4\n};\n\nconst getSlideAnimation = (action, position) => {\n switch (action) {\n case 'unstack':\n return style.slideOutHideAndIn;\n case 'restack':\n return style.slideOutAndIn;\n default:\n return position < 0 ? style.hiddenSlide : stylesByPosition[position];\n }\n};\n\nconst StackedSlides = ({slides, endReview, validateButton, correctionPopinProps}) => {\n const stackedSlides = [];\n // eslint-disable-next-line fp/no-loops\n for (let slideIndex = 0; slideIndex < TOTAL_SLIDES_STACK; slideIndex++) {\n const slide = slides[_toString(slideIndex)];\n const {animationType, position} = slide;\n\n const slideView = (\n <div\n key={`slide-${slideIndex}`}\n data-name={`slide-${slideIndex}`}\n className={classnames(\n style.slideBase,\n getSlideAnimation(animationType, position),\n endReview ? style.endReview : null\n )}\n >\n <ReviewSlide\n {...{\n slideIndex: _toString(slideIndex),\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n </div>\n );\n stackedSlides.push(slideView);\n }\n\n return (\n <div\n key=\"stacked-slides-container-y-overflow\"\n className={style.stackedSlidesYAxisOverflowContainer}\n >\n <div\n key=\"stacked-slides-container\"\n data-name=\"stacked-slides-container\"\n className={style.stackedSlidesContainer}\n >\n {stackedSlides}\n </div>\n </div>\n );\n};\n\nStackedSlides.propTypes = propTypes;\n\nexport default StackedSlides;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,oBAAtB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,OAAO,MAAMC,kBAAkB,GAAG,CAA3B;AAEP,MAAMC,gBAAgB,GAAG;EACvB,GAAGF,KAAK,CAACG,SADc;EAEvB,GAAGH,KAAK,CAACI,SAFc;EAGvB,GAAGJ,KAAK,CAACK,SAHc;EAIvB,GAAGL,KAAK,CAACM,SAJc;EAKvB,GAAGN,KAAK,CAACO;AALc,CAAzB;;AAQA,MAAMC,iBAAiB,GAAG,CAACC,MAAD,EAASC,QAAT,KAAsB;EAC9C,QAAQD,MAAR;IACE,KAAK,SAAL;MACE,O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,aAAa,CAACf,SAAd,2CAA0BA,SAA1B;AAEA,eAAee,aAAf"}
1
+ {"version":3,"file":"index.js","names":["React","classnames","_toString","ReviewSlide","propTypes","style","TOTAL_SLIDES_STACK","stylesByPosition","position0","position1","position2","position3","position4","getSlideAnimation","action","position","slideOutHideAndIn","slideOutAndIn","hiddenSlide","StackedSlides","slides","endReview","validateButton","correctionPopinProps","stackedSlides","slideIndex","slide","animationType","slideView","slideBase","push","stackedSlidesYAxisOverflowContainer","stackedSlidesContainer"],"sources":["../../../src/organism/review-stacked-slides/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport _toString from 'lodash/fp/toString';\nimport ReviewSlide from '../review-slide';\nimport propTypes from './prop-types';\nimport style from './style.css';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst stylesByPosition = {\n 0: style.position0,\n 1: style.position1,\n 2: style.position2,\n 3: style.position3,\n 4: style.position4\n};\n\nconst getSlideAnimation = (action, position) => {\n switch (action) {\n case 'unstack':\n return style.slideOutHideAndIn;\n case 'restack':\n return style.slideOutAndIn;\n default:\n return position < 0 ? style.hiddenSlide : stylesByPosition[position];\n }\n};\n\nconst StackedSlides = ({slides, endReview, validateButton, correctionPopinProps}) => {\n const stackedSlides = [];\n // eslint-disable-next-line fp/no-loops\n for (let slideIndex = 0; slideIndex < TOTAL_SLIDES_STACK; slideIndex++) {\n const slide = slides[_toString(slideIndex)];\n const {animationType, position} = slide;\n\n const slideView = (\n <div\n key={`slide-${slideIndex}`}\n data-name={`slide-${slideIndex}`}\n className={classnames(\n style.slideBase,\n getSlideAnimation(animationType, position),\n endReview ? style.endReview : null\n )}\n >\n <ReviewSlide\n {...{\n slideIndex: _toString(slideIndex),\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n </div>\n );\n stackedSlides.push(slideView);\n }\n\n return (\n <div\n key=\"stacked-slides-container-y-overflow\"\n className={style.stackedSlidesYAxisOverflowContainer}\n >\n <div\n key=\"stacked-slides-container\"\n data-name=\"stacked-slides-container\"\n className={style.stackedSlidesContainer}\n >\n {stackedSlides}\n </div>\n </div>\n );\n};\n\nStackedSlides.propTypes = propTypes;\n\nexport default StackedSlides;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,oBAAtB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,OAAO,MAAMC,kBAAkB,GAAG,CAA3B;AAEP,MAAMC,gBAAgB,GAAG;EACvB,GAAGF,KAAK,CAACG,SADc;EAEvB,GAAGH,KAAK,CAACI,SAFc;EAGvB,GAAGJ,KAAK,CAACK,SAHc;EAIvB,GAAGL,KAAK,CAACM,SAJc;EAKvB,GAAGN,KAAK,CAACO;AALc,CAAzB;;AAQA,MAAMC,iBAAiB,GAAG,CAACC,MAAD,EAASC,QAAT,KAAsB;EAC9C,QAAQD,MAAR;IACE,KAAK,SAAL;MACE,OAAOT,KAAK,CAACW,iBAAb;;IACF,KAAK,SAAL;MACE,OAAOX,KAAK,CAACY,aAAb;;IACF;MACE,OAAOF,QAAQ,GAAG,CAAX,GAAeV,KAAK,CAACa,WAArB,GAAmCX,gBAAgB,CAACQ,QAAD,CAA1D;EANJ;AAQD,CATD;;AAWA,MAAMI,aAAa,GAAG,CAAC;EAACC,MAAD;EAASC,SAAT;EAAoBC,cAApB;EAAoCC;AAApC,CAAD,KAA+D;EACnF,MAAMC,aAAa,GAAG,EAAtB,CADmF,CAEnF;;EACA,KAAK,IAAIC,UAAU,GAAG,CAAtB,EAAyBA,UAAU,GAAGnB,kBAAtC,EAA0DmB,UAAU,EAApE,EAAwE;IACtE,MAAMC,KAAK,GAAGN,MAAM,CAAClB,SAAS,CAACuB,UAAD,CAAV,CAApB;;IACA,MAAM;MAACE,aAAD;MAAgBZ;IAAhB,IAA4BW,KAAlC;IAEA,MAAME,SAAS,gBACb;MACE,GAAG,EAAG,SAAQH,UAAW,EAD3B;MAEE,aAAY,SAAQA,UAAW,EAFjC;MAGE,SAAS,EAAExB,UAAU,CACnBI,KAAK,CAACwB,SADa,EAEnBhB,iBAAiB,CAACc,aAAD,EAAgBZ,QAAhB,CAFE,EAGnBM,SAAS,GAAGhB,KAAK,CAACgB,SAAT,GAAqB,IAHX;IAHvB,gBASE,oBAAC,WAAD;MAEII,UAAU,EAAEvB,SAAS,CAACuB,UAAD,CAFzB;MAGIC,KAHJ;MAIIJ,cAJJ;MAKIC,oBALJ;MAOE,GAAG,EAAEE;IAPP,EATF,CADF;IAqBAD,aAAa,CAACM,IAAd,CAAmBF,SAAnB;EACD;;EAED,oBACE;IACE,GAAG,EAAC,qCADN;IAEE,SAAS,EAAEvB,KAAK,CAAC0B;EAFnB,gBAIE;IACE,GAAG,EAAC,0BADN;IAEE,aAAU,0BAFZ;IAGE,SAAS,EAAE1B,KAAK,CAAC2B;EAHnB,GAKGR,aALH,CAJF,CADF;AAcD,CA7CD;;AA+CAL,aAAa,CAACf,SAAd,2CAA0BA,SAA1B;AAEA,eAAee,aAAf"}
@@ -1,5 +1,3 @@
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
-
3
1
  import React from 'react';
4
2
  import { StyleSheet, View } from 'react-native';
5
3
  import keys from 'lodash/fp/keys';
@@ -23,15 +21,14 @@ const StackedSlides = props => {
23
21
  const stackedSlides = indexes.map(slideIndex => {
24
22
  const slide = slides[slideIndex]; // const {animationType, hidden, position} = slide;
25
23
 
26
- return /*#__PURE__*/React.createElement(Slide, _extends({
24
+ return /*#__PURE__*/React.createElement(Slide, {
27
25
  num: Number.parseInt(slideIndex),
28
26
  slideIndex,
29
27
  slide,
30
28
  validateButton,
31
- correctionPopinProps
32
- }, {
29
+ correctionPopinProps,
33
30
  key: slideIndex
34
- }));
31
+ });
35
32
  });
36
33
  return /*#__PURE__*/React.createElement(View, {
37
34
  style: style.slides
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["React","StyleSheet","View","keys","Slide","TOTAL_SLIDES_STACK","style","create","slides","flex","height","width","StackedSlides","props","validateButton","correctionPopinProps","indexes","reverse","stackedSlides","map","slideIndex","slide","num","Number","parseInt"],"sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {StyleSheet, View} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport Slide from '../review-slide/index.native';\nimport {Props} from './prop-types';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst style = StyleSheet.create({\n slides: {\n flex: 1,\n height: '100%',\n width: '100%'\n }\n});\n\nconst StackedSlides = (props: Props) => {\n const {slides, validateButton, correctionPopinProps} = props;\n\n const indexes = keys(slides).reverse();\n const stackedSlides = indexes.map(slideIndex => {\n const slide = slides[slideIndex];\n // const {animationType, hidden, position} = slide;\n\n return (\n <Slide\n {...{\n num: Number.parseInt(slideIndex),\n slideIndex,\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n );\n });\n\n return <View style={style.slides}>{stackedSlides}</View>;\n};\n\nexport default StackedSlides;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAQC,UAAR,EAAoBC,IAApB,QAA+B,cAA/B;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,KAAP,MAAkB,8BAAlB;AAGA,OAAO,MAAMC,kBAAkB,GAAG,CAA3B;AAEP,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,MAAMC,aAAa,GAAIC,KAAD,IAAkB;EACtC,MAAM;IAACL,MAAD;IAASM,cAAT;IAAyBC;EAAzB,IAAiDF,KAAvD;EAEA,MAAMG,OAAO,GAAGb,IAAI,CAACK,MAAD,CAAJ,CAAaS,OAAb,EAAhB;EACA,MAAMC,aAAa,GAAGF,OAAO,CAACG,GAAR,CAAYC,UAAU,IAAI;IAC9C,MAAMC,KAAK,GAAGb,MAAM,CAACY,UAAD,CAApB,CAD8C,CAE9C;;IAEA,oBACE,oBAAC,KAAD,WACM;MACFE,GAAG,EAAEC,MAAM,CAACC,QAAP,CAAgBJ,UAAhB,CADH;MAEFA,UAFE;MAGFC,KAHE;MAIFP,cAJE;MAKFC;IALE,CADN;MAQE,GAAG,EAAEK;IARP,GADF;EAYD,CAhBqB,CAAtB;EAkBA,oBAAO,oBAAC,IAAD;IAAM,KAAK,EAAEd,KAAK,CAACE;EAAnB,GAA4BU,aAA5B,CAAP;AACD,CAvBD;;AAyBA,eAAeN,aAAf"}
1
+ {"version":3,"file":"index.native.js","names":["React","StyleSheet","View","keys","Slide","TOTAL_SLIDES_STACK","style","create","slides","flex","height","width","StackedSlides","props","validateButton","correctionPopinProps","indexes","reverse","stackedSlides","map","slideIndex","slide","num","Number","parseInt"],"sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {StyleSheet, View} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport Slide from '../review-slide/index.native';\nimport {Props} from './prop-types';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst style = StyleSheet.create({\n slides: {\n flex: 1,\n height: '100%',\n width: '100%'\n }\n});\n\nconst StackedSlides = (props: Props) => {\n const {slides, validateButton, correctionPopinProps} = props;\n\n const indexes = keys(slides).reverse();\n const stackedSlides = indexes.map(slideIndex => {\n const slide = slides[slideIndex];\n // const {animationType, hidden, position} = slide;\n\n return (\n <Slide\n {...{\n num: Number.parseInt(slideIndex),\n slideIndex,\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n );\n });\n\n return <View style={style.slides}>{stackedSlides}</View>;\n};\n\nexport default StackedSlides;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAQC,UAAR,EAAoBC,IAApB,QAA+B,cAA/B;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,KAAP,MAAkB,8BAAlB;AAGA,OAAO,MAAMC,kBAAkB,GAAG,CAA3B;AAEP,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,MAAMC,aAAa,GAAIC,KAAD,IAAkB;EACtC,MAAM;IAACL,MAAD;IAASM,cAAT;IAAyBC;EAAzB,IAAiDF,KAAvD;EAEA,MAAMG,OAAO,GAAGb,IAAI,CAACK,MAAD,CAAJ,CAAaS,OAAb,EAAhB;EACA,MAAMC,aAAa,GAAGF,OAAO,CAACG,GAAR,CAAYC,UAAU,IAAI;IAC9C,MAAMC,KAAK,GAAGb,MAAM,CAACY,UAAD,CAApB,CAD8C,CAE9C;;IAEA,oBACE,oBAAC,KAAD;MAEIE,GAAG,EAAEC,MAAM,CAACC,QAAP,CAAgBJ,UAAhB,CAFT;MAGIA,UAHJ;MAIIC,KAJJ;MAKIP,cALJ;MAMIC,oBANJ;MAQE,GAAG,EAAEK;IARP,EADF;EAYD,CAhBqB,CAAtB;EAkBA,oBAAO,oBAAC,IAAD;IAAM,KAAK,EAAEd,KAAK,CAACE;EAAnB,GAA4BU,aAA5B,CAAP;AACD,CAvBD;;AAyBA,eAAeN,aAAf"}
@@ -311,7 +311,7 @@ const BackgroundScorm = props => {
311
311
  className: style.organismPlayerResultContainerScorm
312
312
  }, failed === false ? /*#__PURE__*/React.createElement("div", {
313
313
  className: style.animationContainer
314
- }, /*#__PURE__*/React.createElement(AtomLottieWrapper, _extends({
314
+ }, /*#__PURE__*/React.createElement(AtomLottieWrapper, {
315
315
  'aria-label': 'aria lottie',
316
316
  'data-name': 'default-lottie',
317
317
  className: undefined,
@@ -323,15 +323,14 @@ const BackgroundScorm = props => {
323
323
  animationClassName: ''
324
324
  },
325
325
  ie11ImageBackup: 'https://static-staging.coorpacademy.com/animations/review/conffeti_congrats.svg',
326
- animationControl: undefined
327
- }, {
326
+ animationControl: undefined,
328
327
  loop: false,
329
328
  animationControl: 'play',
330
329
  autoplay: true,
331
330
  "data-name": "lottie-wrapper",
332
331
  className: style.lottie,
333
332
  backupImageClassName: style.ie11Backup
334
- }))) : null, /*#__PURE__*/React.createElement("div", {
333
+ })) : null, /*#__PURE__*/React.createElement("div", {
335
334
  className: style.background
336
335
  }, /*#__PURE__*/React.createElement("div", {
337
336
  className: style.largeCircle
@@ -1 +1 @@
1
- {"version":3,"file":"summary.js","names":["React","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","Provider","Button","Link","Discussion","Loader","Card","Feedback","CardsList","PopinHeader","AtomLottieWrapper","style","Header","props","SimpleAction","color","prefix","title","button","buttonTitle","linkProps","simpleWrapper","simpleTexts","simplePrefix","simpleTitle","innerHTML","__html","backgroundColor","simpleButton","propTypes","string","shape","NextCourse","card","nextCourseWrapper","nextCourseTexts","nextCoursePrefix","nextCourseTitle","nextCourseCard","Subscribe","description","subscribeWrapper","subscribeTexts","subscribeDescription","subscribeTitle","subscribeButtonWrapper","subscribeButton","submitValue","actions","simple","subscribe","nextCourse","Action","type","actionProps","Type","oneOf","CardsLoader","loaderWrapper","CommentConfirmation","context","onClick","commentSectionTitle","confirmationLinkText","skin","dark","commentSection","commentSectionIconWrapper","commentSectionIcon","commentSectionTexts","commentSectionLink","node","children","contextTypes","childContextTypes","CommentSection","isSent","edition","confirmation","bool","Cards","cards","cardsWrapper","Footer","footer","Summary","header","recommendation","comment","action","feedback","mode","primary","commentView","discussionWrapper","footerView","feedbackView","failed","summaryWrapper","BackgroundScorm","organismPlayerResultContainerScorm","animationContainer","className","undefined","animationSrc","loop","autoplay","rendererSettings","hideOnTransparent","animationClassName","ie11ImageBackup","animationControl","lottie","ie11Backup","background","largeCircle","mediumCircle","smallCircle","content","href","func","isRequired"],"sources":["../../../../src/template/app-player/popin-end/summary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get, getOr, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaSolidStatusCheckCircle2 as CheckIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Link from '../../../atom/link';\nimport Discussion from '../../../organism/discussion';\nimport Loader from '../../../atom/loader';\nimport Card from '../../../molecule/card';\nimport Feedback from '../../../molecule/feedback';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport PopinHeader from '../popin-header';\nimport AtomLottieWrapper from '../../../atom/lottie-wrapper';\nimport style from './summary.css';\n\nconst Header = props => <PopinHeader {...props} />;\n\nconst SimpleAction = ({color, prefix, title, button}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div data-name=\"simpleAction\" className={style.simpleWrapper}>\n <div className={style.simpleTexts}>\n <span data-name=\"simplePrefix\" className={style.simplePrefix}>\n {prefix}\n </span>\n <span\n data-name=\"simpleTitle\"\n className={classnames(style.simpleTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <Button\n {...linkProps}\n type=\"link\"\n style={{\n backgroundColor: color\n }}\n className={style.simpleButton}\n submitValue={buttonTitle}\n />\n </div>\n );\n};\nSimpleAction.propTypes = {\n color: PropTypes.string,\n prefix: PropTypes.string,\n title: PropTypes.string,\n button: PropTypes.shape(Button.propTypes)\n};\n\nconst NextCourse = ({title, prefix, card}) => (\n <div data-name=\"nextCourse\" className={style.nextCourseWrapper}>\n <div className={style.nextCourseTexts}>\n <div className={style.nextCoursePrefix}>{prefix}</div>\n <div\n className={classnames(style.nextCourseTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <div className={style.nextCourseCard}>\n <Card {...card} dataName={'popin-end-next-course'} />\n </div>\n </div>\n);\nNextCourse.propTypes = {\n title: PropTypes.string,\n prefix: PropTypes.string,\n card: PropTypes.shape(CardsList.propTypes)\n};\n\nconst Subscribe = ({title, description, button, card}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div className={style.subscribeWrapper}>\n <div className={style.subscribeTexts}>\n <div className={style.subscribeDescription}>{description}</div>\n <div\n className={classnames(style.subscribeTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div className={style.subscribeButtonWrapper}>\n <Button\n {...linkProps}\n type=\"link\"\n className={style.subscribeButton}\n submitValue={buttonTitle}\n />\n </div>\n </div>\n <div>\n <Card {...card} dataName={'popin-end-subscribe'} />\n </div>\n </div>\n );\n};\n\nSubscribe.propTypes = {\n ...Button.propTypes.propTypes,\n title: Button.propTypes.submitValue\n};\n\nconst actions = {\n simple: SimpleAction,\n subscribe: Subscribe,\n nextCourse: NextCourse\n};\n\nconst Action = props => {\n const {type, ...actionProps} = props;\n const Type = get(type, actions);\n\n return Type ? <Type {...actionProps} /> : null;\n};\n\nAction.propTypes = {\n type: PropTypes.oneOf(keys(actions))\n};\n\nconst CardsLoader = () => (\n <div className={style.loaderWrapper}>\n <Loader />\n </div>\n);\n\nconst CommentConfirmation = (props, context) => {\n const {onClick, commentSectionTitle, confirmationLinkText} = props;\n const {skin} = context;\n const dark = get('common.dark', skin);\n\n return (\n <div className={style.commentSection}>\n <div className={style.commentSectionIconWrapper}>\n <CheckIcon className={style.commentSectionIcon} color={dark} />\n </div>\n <div className={style.commentSectionTexts}>\n <p>{commentSectionTitle}</p>\n <Link onClick={onClick} className={style.commentSectionLink}>\n {confirmationLinkText}\n </Link>\n </div>\n </div>\n );\n};\n\nCommentConfirmation.propTypes = {\n commentSectionTitle: PropTypes.node,\n confirmationLinkText: Link.propTypes.children,\n onClick: Link.propTypes.onClick\n};\n\nCommentConfirmation.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nconst CommentSection = props => {\n const {isSent, edition, confirmation} = props;\n if (isSent) {\n const {onClick, commentSectionTitle, confirmationLinkText} = confirmation;\n return (\n <CommentConfirmation\n onClick={onClick}\n commentSectionTitle={commentSectionTitle}\n confirmationLinkText={confirmationLinkText}\n />\n );\n }\n\n return <Discussion {...edition} />;\n};\n\nCommentSection.propTypes = {\n isSent: PropTypes.bool,\n edition: PropTypes.shape(Discussion.propTypes),\n confirmation: PropTypes.shape(CommentConfirmation.propTypes)\n};\n\nconst Cards = props => {\n const {cards} = props;\n\n return get('cards', props) === null ? (\n <CardsLoader />\n ) : (\n (isEmpty(cards) ? null : (\n <div className={style.cardsWrapper}>\n <CardsList {...props} dataName={'popin-end-recommendation'} />\n </div>\n )) || null\n );\n};\n\nCards.propTypes = CardsList.propTypes;\n\nconst Footer = ({title, color, ...linkProps}) => (\n <Link\n {...linkProps}\n style={{\n color\n }}\n className={style.footer}\n data-name=\"nextLink\"\n data-popin=\"popinEnd\"\n data-next=\"home\"\n >\n {title}\n </Link>\n);\n\nFooter.propTypes = {\n ...Link.propTypes,\n title: Link.propTypes.children,\n color: PropTypes.string\n};\n\nconst Summary = (props, context) => {\n const {header, recommendation, comment, footer, action, feedback, mode} = props;\n const {skin} = context;\n const primary = getOr('#f0f', 'common.primary', skin);\n const commentView =\n mode !== 'scorm' && comment && header ? (\n <div className={style.discussionWrapper}>\n <CommentSection {...comment} />\n </div>\n ) : null;\n const footerView =\n mode !== 'scorm' && footer && header ? <Footer {...footer} color={primary} /> : null;\n const feedbackView = feedback ? <Feedback {...feedback} mode={mode} /> : null;\n\n return (\n <BackgroundScorm mode={mode} failed={header.failed}>\n <div className={mode !== 'scorm' ? style.summaryWrapper : null}>\n <Header {...header} mode={mode} />\n {feedbackView}\n <Action {...action} color={primary} />\n <Cards {...recommendation} />\n {commentView}\n {footerView}\n </div>\n </BackgroundScorm>\n );\n};\n\nconst BackgroundScorm = props => {\n const {mode = 'default', children, failed} = props;\n if (mode === 'scorm')\n return (\n <div className={style.organismPlayerResultContainerScorm}>\n {failed === false ? (\n <div className={style.animationContainer}>\n <AtomLottieWrapper\n {...{\n 'aria-label': 'aria lottie',\n 'data-name': 'default-lottie',\n className: undefined,\n animationSrc:\n 'https://static-staging.coorpacademy.com/animations/review/confetti.json',\n loop: undefined,\n autoplay: true,\n rendererSettings: {\n hideOnTransparent: false,\n animationClassName: ''\n },\n ie11ImageBackup:\n 'https://static-staging.coorpacademy.com/animations/review/conffeti_congrats.svg',\n animationControl: undefined\n }}\n loop={false}\n animationControl={'play'}\n autoplay\n data-name=\"lottie-wrapper\"\n className={style.lottie}\n backupImageClassName={style.ie11Backup}\n />\n </div>\n ) : null}\n <div className={style.background}>\n <div className={style.largeCircle} />\n <div className={style.mediumCircle} />\n <div className={style.smallCircle} />\n </div>\n <div className={style.content}>{children}</div>\n </div>\n );\n return children;\n};\n\nSummary.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSummary.propTypes = {\n header: PropTypes.shape(PopinHeader.propTypes),\n footer: PropTypes.shape({\n title: PropTypes.string,\n href: Link.propTypes.href,\n onClick: PropTypes.func\n }),\n comment: PropTypes.shape(CommentSection.propTypes),\n action: PropTypes.shape({\n type: PropTypes.oneOf(keys(actions)).isRequired\n }),\n recommendation: PropTypes.shape(CardsList.propTypes),\n feedback: PropTypes.shape(Feedback.propTypes),\n mode: PropTypes.oneOf(['scorm', 'default'])\n};\n\nexport default Summary;\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,2BAA2B,IAAIC,SAAvC,QAAuD,0BAAvD;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OA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BtB,WAAW,CAACoB,SAA5B,CADU;EAElBuD,MAAM,EAAEvF,SAAS,CAACkC,KAAV,CAAgB;IACtBd,KAAK,EAAEpB,SAAS,CAACiC,MADK;IAEtByF,IAAI,EAAEpH,IAAI,CAAC0B,SAAL,CAAe0F,IAFC;IAGtB1D,OAAO,EAAEhE,SAAS,CAAC2H;EAHG,CAAhB,CAFU;EAOlBhC,OAAO,EAAE3F,SAAS,CAACkC,KAAV,CAAgB4C,cAAc,CAAC9C,SAA/B,CAPS;EAQlB4D,MAAM,EAAE5F,SAAS,CAACkC,KAAV,CAAgB;IACtBsB,IAAI,EAAExD,SAAS,CAAC2D,KAAV,CAAgB,MAAKR,OAAL,CAAhB,EAA+ByE;EADf,CAAhB,CARU;EAWlBlC,cAAc,EAAE1F,SAAS,CAACkC,KAAV,CAAgBvB,SAAS,CAACqB,SAA1B,CAXE;EAYlB6D,QAAQ,EAAE7F,SAAS,CAACkC,KAAV,CAAgBxB,QAAQ,CAACsB,SAAzB,CAZQ;EAalB8D,IAAI,EAAE9F,SAAS,CAAC2D,KAAV,CAAgB,CAAC,OAAD,EAAU,SAAV,CAAhB;AAbY,CAApB;AAgBA,eAAe6B,OAAf"}
1
+ {"version":3,"file":"summary.js","names":["React","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","Provider","Button","Link","Discussion","Loader","Card","Feedback","CardsList","PopinHeader","AtomLottieWrapper","style","Header","props","SimpleAction","color","prefix","title","button","buttonTitle","linkProps","simpleWrapper","simpleTexts","simplePrefix","simpleTitle","innerHTML","__html","backgroundColor","simpleButton","propTypes","string","shape","NextCourse","card","nextCourseWrapper","nextCourseTexts","nextCoursePrefix","nextCourseTitle","nextCourseCard","Subscribe","description","subscribeWrapper","subscribeTexts","subscribeDescription","subscribeTitle","subscribeButtonWrapper","subscribeButton","submitValue","actions","simple","subscribe","nextCourse","Action","type","actionProps","Type","oneOf","CardsLoader","loaderWrapper","CommentConfirmation","context","onClick","commentSectionTitle","confirmationLinkText","skin","dark","commentSection","commentSectionIconWrapper","commentSectionIcon","commentSectionTexts","commentSectionLink","node","children","contextTypes","childContextTypes","CommentSection","isSent","edition","confirmation","bool","Cards","cards","cardsWrapper","Footer","footer","Summary","header","recommendation","comment","action","feedback","mode","primary","commentView","discussionWrapper","footerView","feedbackView","failed","summaryWrapper","BackgroundScorm","organismPlayerResultContainerScorm","animationContainer","className","undefined","animationSrc","loop","autoplay","rendererSettings","hideOnTransparent","animationClassName","ie11ImageBackup","animationControl","lottie","ie11Backup","background","largeCircle","mediumCircle","smallCircle","content","href","func","isRequired"],"sources":["../../../../src/template/app-player/popin-end/summary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get, getOr, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaSolidStatusCheckCircle2 as CheckIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Link from '../../../atom/link';\nimport Discussion from '../../../organism/discussion';\nimport Loader from '../../../atom/loader';\nimport Card from '../../../molecule/card';\nimport Feedback from '../../../molecule/feedback';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport PopinHeader from '../popin-header';\nimport AtomLottieWrapper from '../../../atom/lottie-wrapper';\nimport style from './summary.css';\n\nconst Header = props => <PopinHeader {...props} />;\n\nconst SimpleAction = ({color, prefix, title, button}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div data-name=\"simpleAction\" className={style.simpleWrapper}>\n <div className={style.simpleTexts}>\n <span data-name=\"simplePrefix\" className={style.simplePrefix}>\n {prefix}\n </span>\n <span\n data-name=\"simpleTitle\"\n className={classnames(style.simpleTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <Button\n {...linkProps}\n type=\"link\"\n style={{\n backgroundColor: color\n }}\n className={style.simpleButton}\n submitValue={buttonTitle}\n />\n </div>\n );\n};\nSimpleAction.propTypes = {\n color: PropTypes.string,\n prefix: PropTypes.string,\n title: PropTypes.string,\n button: PropTypes.shape(Button.propTypes)\n};\n\nconst NextCourse = ({title, prefix, card}) => (\n <div data-name=\"nextCourse\" className={style.nextCourseWrapper}>\n <div className={style.nextCourseTexts}>\n <div className={style.nextCoursePrefix}>{prefix}</div>\n <div\n className={classnames(style.nextCourseTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <div className={style.nextCourseCard}>\n <Card {...card} dataName={'popin-end-next-course'} />\n </div>\n </div>\n);\nNextCourse.propTypes = {\n title: PropTypes.string,\n prefix: PropTypes.string,\n card: PropTypes.shape(CardsList.propTypes)\n};\n\nconst Subscribe = ({title, description, button, card}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div className={style.subscribeWrapper}>\n <div className={style.subscribeTexts}>\n <div className={style.subscribeDescription}>{description}</div>\n <div\n className={classnames(style.subscribeTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div className={style.subscribeButtonWrapper}>\n <Button\n {...linkProps}\n type=\"link\"\n className={style.subscribeButton}\n submitValue={buttonTitle}\n />\n </div>\n </div>\n <div>\n <Card {...card} dataName={'popin-end-subscribe'} />\n </div>\n </div>\n );\n};\n\nSubscribe.propTypes = {\n ...Button.propTypes.propTypes,\n title: Button.propTypes.submitValue\n};\n\nconst actions = {\n simple: SimpleAction,\n subscribe: Subscribe,\n nextCourse: NextCourse\n};\n\nconst Action = props => {\n const {type, ...actionProps} = props;\n const Type = get(type, actions);\n\n return Type ? <Type {...actionProps} /> : null;\n};\n\nAction.propTypes = {\n type: PropTypes.oneOf(keys(actions))\n};\n\nconst CardsLoader = () => (\n <div className={style.loaderWrapper}>\n <Loader />\n </div>\n);\n\nconst CommentConfirmation = (props, context) => {\n const {onClick, commentSectionTitle, confirmationLinkText} = props;\n const {skin} = context;\n const dark = get('common.dark', skin);\n\n return (\n <div className={style.commentSection}>\n <div className={style.commentSectionIconWrapper}>\n <CheckIcon className={style.commentSectionIcon} color={dark} />\n </div>\n <div className={style.commentSectionTexts}>\n <p>{commentSectionTitle}</p>\n <Link onClick={onClick} className={style.commentSectionLink}>\n {confirmationLinkText}\n </Link>\n </div>\n </div>\n );\n};\n\nCommentConfirmation.propTypes = {\n commentSectionTitle: PropTypes.node,\n confirmationLinkText: Link.propTypes.children,\n onClick: Link.propTypes.onClick\n};\n\nCommentConfirmation.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nconst CommentSection = props => {\n const {isSent, edition, confirmation} = props;\n if (isSent) {\n const {onClick, commentSectionTitle, confirmationLinkText} = confirmation;\n return (\n <CommentConfirmation\n onClick={onClick}\n commentSectionTitle={commentSectionTitle}\n confirmationLinkText={confirmationLinkText}\n />\n );\n }\n\n return <Discussion {...edition} />;\n};\n\nCommentSection.propTypes = {\n isSent: PropTypes.bool,\n edition: PropTypes.shape(Discussion.propTypes),\n confirmation: PropTypes.shape(CommentConfirmation.propTypes)\n};\n\nconst Cards = props => {\n const {cards} = props;\n\n return get('cards', props) === null ? (\n <CardsLoader />\n ) : (\n (isEmpty(cards) ? null : (\n <div className={style.cardsWrapper}>\n <CardsList {...props} dataName={'popin-end-recommendation'} />\n </div>\n )) || null\n );\n};\n\nCards.propTypes = CardsList.propTypes;\n\nconst Footer = ({title, color, ...linkProps}) => (\n <Link\n {...linkProps}\n style={{\n color\n }}\n className={style.footer}\n data-name=\"nextLink\"\n data-popin=\"popinEnd\"\n data-next=\"home\"\n >\n {title}\n </Link>\n);\n\nFooter.propTypes = {\n ...Link.propTypes,\n title: Link.propTypes.children,\n color: PropTypes.string\n};\n\nconst Summary = (props, context) => {\n const {header, recommendation, comment, footer, action, feedback, mode} = props;\n const {skin} = context;\n const primary = getOr('#f0f', 'common.primary', skin);\n const commentView =\n mode !== 'scorm' && comment && header ? (\n <div className={style.discussionWrapper}>\n <CommentSection {...comment} />\n </div>\n ) : null;\n const footerView =\n mode !== 'scorm' && footer && header ? <Footer {...footer} color={primary} /> : null;\n const feedbackView = feedback ? <Feedback {...feedback} mode={mode} /> : null;\n\n return (\n <BackgroundScorm mode={mode} failed={header.failed}>\n <div className={mode !== 'scorm' ? style.summaryWrapper : null}>\n <Header {...header} mode={mode} />\n {feedbackView}\n <Action {...action} color={primary} />\n <Cards {...recommendation} />\n {commentView}\n {footerView}\n </div>\n </BackgroundScorm>\n );\n};\n\nconst BackgroundScorm = props => {\n const {mode = 'default', children, failed} = props;\n if (mode === 'scorm')\n return (\n <div className={style.organismPlayerResultContainerScorm}>\n {failed === false ? (\n <div className={style.animationContainer}>\n <AtomLottieWrapper\n {...{\n 'aria-label': 'aria lottie',\n 'data-name': 'default-lottie',\n className: undefined,\n animationSrc:\n 'https://static-staging.coorpacademy.com/animations/review/confetti.json',\n loop: undefined,\n autoplay: true,\n rendererSettings: {\n hideOnTransparent: false,\n animationClassName: ''\n },\n ie11ImageBackup:\n 'https://static-staging.coorpacademy.com/animations/review/conffeti_congrats.svg',\n animationControl: undefined\n }}\n loop={false}\n animationControl={'play'}\n autoplay\n data-name=\"lottie-wrapper\"\n className={style.lottie}\n backupImageClassName={style.ie11Backup}\n />\n </div>\n ) : null}\n <div className={style.background}>\n <div className={style.largeCircle} />\n <div className={style.mediumCircle} />\n <div className={style.smallCircle} />\n </div>\n <div className={style.content}>{children}</div>\n </div>\n );\n return children;\n};\n\nSummary.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSummary.propTypes = {\n header: PropTypes.shape(PopinHeader.propTypes),\n footer: PropTypes.shape({\n title: PropTypes.string,\n href: Link.propTypes.href,\n onClick: PropTypes.func\n }),\n comment: PropTypes.shape(CommentSection.propTypes),\n action: PropTypes.shape({\n type: PropTypes.oneOf(keys(actions)).isRequired\n }),\n recommendation: PropTypes.shape(CardsList.propTypes),\n feedback: PropTypes.shape(Feedback.propTypes),\n mode: PropTypes.oneOf(['scorm', 'default'])\n};\n\nexport default Summary;\n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OA,QAAP;AACD,CA1CD;;AA4CAa,OAAO,CAACZ,YAAR,GAAuB;EACrBT,IAAI,EAAE/D,QAAQ,CAACyE,iBAAT,CAA2BV;AADZ,CAAvB;AAIAqB,OAAO,CAACxD,SAAR,2CAAoB;EAClByD,MAAM,EAAEzF,SAAS,CAACkC,KAAV,CAAgBtB,WAAW,CAACoB,SAA5B,CADU;EAElBuD,MAAM,EAAEvF,SAAS,CAACkC,KAAV,CAAgB;IACtBd,KAAK,EAAEpB,SAAS,CAACiC,MADK;IAEtByF,IAAI,EAAEpH,IAAI,CAAC0B,SAAL,CAAe0F,IAFC;IAGtB1D,OAAO,EAAEhE,SAAS,CAAC2H;EAHG,CAAhB,CAFU;EAOlBhC,OAAO,EAAE3F,SAAS,CAACkC,KAAV,CAAgB4C,cAAc,CAAC9C,SAA/B,CAPS;EAQlB4D,MAAM,EAAE5F,SAAS,CAACkC,KAAV,CAAgB;IACtBsB,IAAI,EAAExD,SAAS,CAAC2D,KAAV,CAAgB,MAAKR,OAAL,CAAhB,EAA+ByE;EADf,CAAhB,CARU;EAWlBlC,cAAc,EAAE1F,SAAS,CAACkC,KAAV,CAAgBvB,SAAS,CAACqB,SAA1B,CAXE;EAYlB6D,QAAQ,EAAE7F,SAAS,CAACkC,KAAV,CAAgBxB,QAAQ,CAACsB,SAAzB,CAZQ;EAalB8D,IAAI,EAAE9F,SAAS,CAAC2D,KAAV,CAAgB,CAAC,OAAD,EAAU,SAAV,CAAhB;AAbY,CAApB;AAgBA,eAAe6B,OAAf"}
@@ -1,38 +1,35 @@
1
- import * as React from 'react';
2
- import PropTypes from 'prop-types';
1
+ import React, { useState, useEffect } from 'react';
3
2
  import { View, FlatList, Pressable, StyleSheet, Text } from 'react-native';
4
- import { NovaCompositionNavigationArrowRight as ArrowRight } from '@coorpacademy/nova-icons';
5
- import propTypes, { ListSkillsPropTypes, NoSkillsPropTypes } from '../../../organism/review-skills/prop-types'; // import theme from '../../../modules/theme';
6
- // import translations from '../../../translations';
7
- // import {HEADER_HEIGHT} from '../../../app-shared/components/header-v2';
8
- // import noSkillsImage from '../../../assets/images/revision-no-skills.png';
9
- // import Touchable from '../../../app-shared/components/touchable';
10
-
11
- const styles = StyleSheet.create({
3
+ import { NovaCompositionNavigationArrowRight as ArrowRight, NovaCompositionCoorpacademyEmptyStateHomeRevision as EmptyStateHomeRevision } from '@coorpacademy/nova-icons';
4
+ import { useTemplateContext } from '../template-context';
5
+ import { HEADER_HEIGHT } from '../../../organism/header-v2/index.native';
6
+
7
+ const createStyleSheet = theme => StyleSheet.create({
12
8
  container: {
13
9
  flex: 1,
14
- padding: 20 // paddingTop: HEADER_HEIGHT + 20,
15
- // backgroundColor: theme.colors.white
16
-
10
+ padding: 20,
11
+ paddingTop: HEADER_HEIGHT + 20,
12
+ backgroundColor: theme.colors.white
17
13
  },
18
14
  title: {
19
- // fontSize: theme.fontSize.xlarge,
20
- // fontWeight: theme.fontWeight.bold,
21
- lineHeight: 28 // color: theme.colors.text.primary,
22
- // marginBottom: theme.spacing.base,
23
- // marginTop: theme.spacing.small
24
-
15
+ fontSize: theme.fontSize.xlarge,
16
+ fontWeight: theme.fontWeight.bold,
17
+ lineHeight: 28,
18
+ color: theme.colors.text.primary,
19
+ marginBottom: theme.spacing.base,
20
+ marginTop: theme.spacing.small
25
21
  },
26
- subtitle: {// fontSize: theme.fontSize.xlarge,
27
- // color: theme.colors.text.primary,
28
- // marginBottom: theme.spacing.tiny
22
+ subtitle: {
23
+ fontSize: theme.fontSize.xlarge,
24
+ color: theme.colors.text.primary,
25
+ marginBottom: theme.spacing.tiny
29
26
  },
30
27
  text: {
31
28
  fontSize: 16,
32
29
  lineHeight: 22,
33
- // color: theme.colors.text.primary,
34
- opacity: 0.7 // marginBottom: theme.spacing.base
35
-
30
+ color: theme.colors.text.primary,
31
+ opacity: 0.7,
32
+ marginBottom: theme.spacing.base
36
33
  },
37
34
  noSkillsImage: {
38
35
  flex: 1,
@@ -40,18 +37,20 @@ const styles = StyleSheet.create({
40
37
  width: 320,
41
38
  height: 300
42
39
  },
43
- skills: {},
40
+ skills: {
41
+ paddingBottom: 100
42
+ },
44
43
  skill: {
45
44
  display: 'flex',
46
45
  flexDirection: 'row',
47
46
  overflow: 'hidden',
48
47
  alignItems: 'center',
49
48
  height: 118,
50
- borderRadius: 8 // backgroundColor: theme.colors.gray.lighter,
51
- // marginTop: theme.spacing.micro,
52
- // marginBottom: theme.spacing.micro,
53
- // padding: theme.spacing.base
54
-
49
+ borderRadius: 8,
50
+ backgroundColor: theme.colors.gray.lighter,
51
+ marginTop: theme.spacing.micro,
52
+ marginBottom: theme.spacing.micro,
53
+ padding: theme.spacing.base
55
54
  },
56
55
  skillTexts: {
57
56
  flex: 1,
@@ -60,20 +59,18 @@ const styles = StyleSheet.create({
60
59
  skillTitle: {
61
60
  fontSize: 18,
62
61
  fontWeight: '600',
63
- lineHeight: 22 // color: theme.colors.text.primary,
64
- // marginBottom: theme.spacing.tiny
65
-
62
+ lineHeight: 22,
63
+ color: theme.colors.text.primary,
64
+ marginBottom: theme.spacing.tiny
66
65
  },
67
66
  skillInfo: {
68
67
  fontSize: 12,
69
- lineHeight: 16 // color: theme.colors.gray.medium
70
-
71
- },
72
- extraSpace: {
73
- height: 100
68
+ lineHeight: 16,
69
+ color: theme.colors.gray.medium
74
70
  }
75
71
  }); // -----------------------------------------------------------------------------
76
72
 
73
+
77
74
  const onSelectSkill = title => () => {
78
75
  // eslint-disable-next-line no-console
79
76
  console.log('pressed on', {
@@ -81,99 +78,141 @@ const onSelectSkill = title => () => {
81
78
  });
82
79
  };
83
80
 
84
- const ExtraSpace = () => /*#__PURE__*/React.createElement(View, {
85
- style: styles.extraSpace
86
- });
87
-
88
81
  const Skill = ({
89
82
  title,
90
83
  info
91
- }) => /*#__PURE__*/React.createElement(Pressable, {
92
- style: styles.skill,
93
- onPress: onSelectSkill(title)
94
- }, /*#__PURE__*/React.createElement(View, {
95
- style: styles.skillTexts
96
- }, /*#__PURE__*/React.createElement(Text, {
97
- style: styles.skillTitle
98
- }, title), /*#__PURE__*/React.createElement(Text, {
99
- style: styles.skillInfo
100
- }, info)), /*#__PURE__*/React.createElement(ArrowRight, {
101
- color: "#ededed",
102
- height: 20,
103
- width: 20
104
- }));
105
-
106
- Skill.propTypes = process.env.NODE_ENV !== "production" ? {
107
- title: PropTypes.string,
108
- info: PropTypes.string
109
- } : {}; // -----------------------------------------------------------------------------
84
+ }) => {
85
+ const templateContext = useTemplateContext();
86
+ const [styleSheet, setStylesheet] = useState(null);
87
+ const {
88
+ theme
89
+ } = templateContext;
90
+ useEffect(() => {
91
+ const _stylesheet = createStyleSheet(theme);
92
+
93
+ setStylesheet(_stylesheet);
94
+ }, [theme]);
95
+
96
+ if (!styleSheet) {
97
+ return null;
98
+ }
99
+
100
+ return /*#__PURE__*/React.createElement(Pressable, {
101
+ style: styleSheet.skill,
102
+ onPress: onSelectSkill(title)
103
+ }, /*#__PURE__*/React.createElement(View, {
104
+ style: styleSheet.skillTexts
105
+ }, /*#__PURE__*/React.createElement(Text, {
106
+ style: styleSheet.skillTitle
107
+ }, title), /*#__PURE__*/React.createElement(Text, {
108
+ style: styleSheet.skillInfo
109
+ }, info)), /*#__PURE__*/React.createElement(ArrowRight, {
110
+ color: "#ededed",
111
+ height: 20,
112
+ width: 20
113
+ }));
114
+ }; // -----------------------------------------------------------------------------
115
+
110
116
 
111
117
  const Item = ({
112
118
  item: {
113
119
  title,
114
- info,
115
- isExtraSpace = false
120
+ info
116
121
  }
117
- }) => isExtraSpace ? /*#__PURE__*/React.createElement(ExtraSpace, null) : /*#__PURE__*/React.createElement(Skill, {
122
+ }) => /*#__PURE__*/React.createElement(Skill, {
118
123
  title: title,
119
124
  info: info
120
125
  });
121
126
 
122
- const List = ({
123
- skills
124
- }) => /*#__PURE__*/React.createElement(FlatList, {
125
- contentContainerStyle: styles.skills,
126
- data: skills,
127
- renderItem: Item
128
- });
127
+ const List = props => {
128
+ const templateContext = useTemplateContext();
129
+ const [styleSheet, setStylesheet] = useState(null);
130
+ const {
131
+ theme
132
+ } = templateContext;
133
+ const {
134
+ skills
135
+ } = props;
136
+ useEffect(() => {
137
+ const _stylesheet = createStyleSheet(theme);
138
+
139
+ setStylesheet(_stylesheet);
140
+ }, [theme]);
141
+
142
+ if (!styleSheet) {
143
+ return null;
144
+ }
145
+
146
+ const formattedDataList = [];
147
+ skills.map(skill => formattedDataList.push({
148
+ title: skill.skillTitle,
149
+ info: skill.skillAriaLabel
150
+ }));
151
+ return /*#__PURE__*/React.createElement(FlatList, {
152
+ contentContainerStyle: styleSheet.skills,
153
+ data: formattedDataList,
154
+ renderItem: Item
155
+ });
156
+ }; // -----------------------------------------------------------------------------
157
+
158
+
159
+ const NoSkills = () => {
160
+ const templateContext = useTemplateContext();
161
+ const [styleSheet, setStylesheet] = useState(null);
162
+ const {
163
+ theme,
164
+ translations
165
+ } = templateContext;
166
+ useEffect(() => {
167
+ const _stylesheet = createStyleSheet(theme);
129
168
 
130
- Item.propTypes = process.env.NODE_ENV !== "production" ? {
131
- item: PropTypes.shape({
132
- title: PropTypes.string,
133
- info: PropTypes.string,
134
- isExtraSpace: PropTypes.bool
135
- })
136
- } : {};
137
- List.propTypes = process.env.NODE_ENV !== "production" ? {
138
- skills: ListSkillsPropTypes.listSkills
139
- } : {}; // -----------------------------------------------------------------------------
140
-
141
- /*
142
- title: translations.revision.home.noSkills
143
- text: translations.revision.home.noSkillsDetails
144
- image: use web svg
145
- <ImageBackground source={noSkillsImage} style={styles.noSkillsImage} />
146
- */
147
-
148
- const NoSkills = ({
149
- titleNoSkills,
150
- textNoSkills
151
- }) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
152
- style: styles.subtitle
153
- }, titleNoSkills), /*#__PURE__*/React.createElement(Text, {
154
- style: styles.text
155
- }, textNoSkills));
156
-
157
- NoSkills.propTypes = process.env.NODE_ENV !== "production" ? NoSkillsPropTypes : {}; // -----------------------------------------------------------------------------
169
+ setStylesheet(_stylesheet);
170
+ }, [theme]);
171
+
172
+ if (!styleSheet) {
173
+ return null;
174
+ }
175
+
176
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
177
+ style: styleSheet.subtitle
178
+ }, translations.appReview?.noSkills?.title), /*#__PURE__*/React.createElement(Text, {
179
+ style: styleSheet.text
180
+ }, translations.appReview?.noSkills?.text), /*#__PURE__*/React.createElement(EmptyStateHomeRevision, {
181
+ style: styleSheet.noSkillsImage
182
+ }));
183
+ }; // -----------------------------------------------------------------------------
158
184
  // title --> translations.revision.home.title
159
185
 
186
+
160
187
  const Skills = props => {
161
188
  const {
162
189
  title,
163
190
  listSkills
164
191
  } = props;
192
+ const templateContext = useTemplateContext();
193
+ const [styleSheet, setStylesheet] = useState(null);
194
+ const {
195
+ theme
196
+ } = templateContext;
197
+ useEffect(() => {
198
+ const _stylesheet = createStyleSheet(theme);
199
+
200
+ setStylesheet(_stylesheet);
201
+ }, [theme]); // ------------------------------------
202
+
203
+ if (!styleSheet) {
204
+ return null;
205
+ }
206
+
165
207
  return /*#__PURE__*/React.createElement(View, {
166
- style: styles.container
208
+ style: styleSheet.container
167
209
  }, /*#__PURE__*/React.createElement(Text, {
168
- style: styles.title
210
+ style: styleSheet.title
169
211
  }, title), !listSkills || listSkills.length === 0 ? /*#__PURE__*/React.createElement(NoSkills, null) : /*#__PURE__*/React.createElement(List, {
170
- skills: [...listSkills, {
171
- isExtraSpace: true
172
- }]
212
+ skills: listSkills
173
213
  }));
174
- };
214
+ }; // -----------------------------------------------------------------------------
175
215
 
176
- Skills.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {}; // -----------------------------------------------------------------------------
177
216
 
178
217
  export default Skills;
179
218
  //# sourceMappingURL=index.native.js.map