@coorpacademy/components 11.2.10 → 11.2.11-alpha.10

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 (77) 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 +82 -20
  10. package/es/atom/review-presentation/index.js.map +1 -1
  11. package/es/atom/review-presentation/prop-types.d.ts +12 -0
  12. package/es/atom/review-presentation/prop-types.d.ts.map +1 -1
  13. package/es/atom/review-presentation/prop-types.js +3 -1
  14. package/es/atom/review-presentation/prop-types.js.map +1 -1
  15. package/es/atom/review-presentation/style.css +3 -14
  16. package/es/molecule/review-card-congrats/prop-types.d.ts +1 -1
  17. package/es/organism/review-congrats/index.d.ts.map +1 -1
  18. package/es/organism/review-congrats/index.js +8 -6
  19. package/es/organism/review-congrats/index.js.map +1 -1
  20. package/es/organism/review-congrats/prop-types.d.ts +3 -3
  21. package/es/organism/user-preferences/index.d.ts +1 -0
  22. package/es/organism/user-preferences/index.d.ts.map +1 -1
  23. package/es/organism/user-preferences/index.js +11 -6
  24. package/es/organism/user-preferences/index.js.map +1 -1
  25. package/es/template/activity/index.d.ts +2 -0
  26. package/es/template/activity/index.d.ts.map +1 -1
  27. package/es/template/activity/index.js +4 -1
  28. package/es/template/activity/index.js.map +1 -1
  29. package/es/template/activity/progression-item.d.ts +1 -0
  30. package/es/template/activity/progression-item.d.ts.map +1 -1
  31. package/es/template/activity/progression-item.js +5 -2
  32. package/es/template/activity/progression-item.js.map +1 -1
  33. package/es/template/app-review/index.d.ts +11 -3
  34. package/es/template/app-review/index.d.ts.map +1 -1
  35. package/es/template/app-review/player/prop-types.d.ts +3 -3
  36. package/es/template/app-review/prop-types.d.ts +11 -3
  37. package/es/template/app-review/prop-types.d.ts.map +1 -1
  38. package/es/template/review-dashboard-skills/index.d.ts +8 -0
  39. package/lib/atom/lottie-wrapper/index.d.ts.map +1 -1
  40. package/lib/atom/lottie-wrapper/index.js +9 -3
  41. package/lib/atom/lottie-wrapper/index.js.map +1 -1
  42. package/lib/atom/lottie-wrapper/prop-types.d.ts +2 -2
  43. package/lib/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
  44. package/lib/atom/lottie-wrapper/prop-types.js +1 -1
  45. package/lib/atom/lottie-wrapper/prop-types.js.map +1 -1
  46. package/lib/atom/review-presentation/index.d.ts.map +1 -1
  47. package/lib/atom/review-presentation/index.js +86 -20
  48. package/lib/atom/review-presentation/index.js.map +1 -1
  49. package/lib/atom/review-presentation/prop-types.d.ts +12 -0
  50. package/lib/atom/review-presentation/prop-types.d.ts.map +1 -1
  51. package/lib/atom/review-presentation/prop-types.js +3 -1
  52. package/lib/atom/review-presentation/prop-types.js.map +1 -1
  53. package/lib/atom/review-presentation/style.css +3 -14
  54. package/lib/molecule/review-card-congrats/prop-types.d.ts +1 -1
  55. package/lib/organism/review-congrats/index.d.ts.map +1 -1
  56. package/lib/organism/review-congrats/index.js +3 -1
  57. package/lib/organism/review-congrats/index.js.map +1 -1
  58. package/lib/organism/review-congrats/prop-types.d.ts +3 -3
  59. package/lib/organism/user-preferences/index.d.ts +1 -0
  60. package/lib/organism/user-preferences/index.d.ts.map +1 -1
  61. package/lib/organism/user-preferences/index.js +11 -6
  62. package/lib/organism/user-preferences/index.js.map +1 -1
  63. package/lib/template/activity/index.d.ts +2 -0
  64. package/lib/template/activity/index.d.ts.map +1 -1
  65. package/lib/template/activity/index.js +4 -1
  66. package/lib/template/activity/index.js.map +1 -1
  67. package/lib/template/activity/progression-item.d.ts +1 -0
  68. package/lib/template/activity/progression-item.d.ts.map +1 -1
  69. package/lib/template/activity/progression-item.js +5 -2
  70. package/lib/template/activity/progression-item.js.map +1 -1
  71. package/lib/template/app-review/index.d.ts +11 -3
  72. package/lib/template/app-review/index.d.ts.map +1 -1
  73. package/lib/template/app-review/player/prop-types.d.ts +3 -3
  74. package/lib/template/app-review/prop-types.d.ts +11 -3
  75. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  76. package/lib/template/review-dashboard-skills/index.d.ts +8 -0
  77. package/package.json +2 -2
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
 
6
- var _react = _interopRequireDefault(require("react"));
6
+ var _react = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
@@ -19,6 +19,12 @@ var _propTypes2 = _interopRequireDefault(require("./prop-types"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
26
+ 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); }
27
+
22
28
  const ICONS = {
23
29
  skills: _novaIcons.NovaLineSelectionCursorsCursorArrowTarget,
24
30
  questions: _novaIcons.NovaSolidInterfaceFeedbackInterfaceQuestionMark,
@@ -26,7 +32,9 @@ const ICONS = {
26
32
  allright: _novaIcons.NovaSolidStatusCheckCircle2
27
33
  };
28
34
 
29
- const getIcon = icon => {
35
+ const ReviewIcon = ({
36
+ icon
37
+ }) => {
30
38
  const Icon = (0, _getOr.default)(null, icon, ICONS);
31
39
  /* istanbul ignore next */
32
40
 
@@ -42,21 +50,69 @@ const getIcon = icon => {
42
50
  };
43
51
 
44
52
  const ToolTip = ({
45
- tooltipText
53
+ tooltipText,
54
+ 'aria-label': moreDetailsAriaLabel,
55
+ 'data-testid': dataTestId,
56
+ closeToolTipInformationTextAriaLabel
46
57
  }) => {
58
+ const [toolTipIsVisible, setToolTipIsVisible] = (0, _react.useState)(false);
59
+ const handleKeyPress = (0, _react.useCallback)(event => {
60
+ if (event.key === 'Enter') {
61
+ setToolTipIsVisible(!toolTipIsVisible);
62
+ } else if (event.key === 'Tab' || event.key === 'Escape') {
63
+ setToolTipIsVisible(false);
64
+ }
65
+ }, [setToolTipIsVisible, toolTipIsVisible]);
66
+ const handleMouseOver = (0, _react.useCallback)(() => setToolTipIsVisible(true), [setToolTipIsVisible]);
67
+ const handleMouseLeave = (0, _react.useCallback)(() => setToolTipIsVisible(false), [setToolTipIsVisible]);
68
+ const customStyle = {
69
+ visibility: toolTipIsVisible ? 'visible' : 'hidden',
70
+ opacity: toolTipIsVisible ? 1 : 0
71
+ };
47
72
  return /*#__PURE__*/_react.default.createElement("div", {
48
73
  className: _style.default.tooltipContainer
49
- }, /*#__PURE__*/_react.default.createElement("div", {
50
- className: _style.default.tooltipIconContainer
74
+ }, /*#__PURE__*/_react.default.createElement("button", {
75
+ type: "button",
76
+ className: _style.default.tooltipIconContainer,
77
+ "data-testid": dataTestId,
78
+ onMouseOver: handleMouseOver,
79
+ onMouseLeave: handleMouseLeave,
80
+ onKeyDown: handleKeyPress,
81
+ tabIndex: 0
51
82
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyInformationIcon, {
52
83
  className: _style.default.informationIcon,
53
84
  width: 12,
54
- height: 12
55
- })), /*#__PURE__*/_react.default.createElement("div", {
56
- className: _style.default.toolTip
57
- }, /*#__PURE__*/_react.default.createElement("div", {
85
+ height: 12,
86
+ "aria-label": moreDetailsAriaLabel
87
+ })), toolTipIsVisible ? /*#__PURE__*/_react.default.createElement("div", {
88
+ className: _style.default.toolTip,
89
+ style: customStyle,
90
+ "data-testid": "review-presentation-tooltip",
91
+ "aria-label": closeToolTipInformationTextAriaLabel
92
+ }, /*#__PURE__*/_react.default.createElement("p", {
58
93
  className: _style.default.tooltipText
59
- }, tooltipText)));
94
+ }, tooltipText)) : null);
95
+ };
96
+
97
+ const ReviewListItemWrapper = ({
98
+ iconKey,
99
+ label
100
+ }) => {
101
+ return /*#__PURE__*/_react.default.createElement("div", {
102
+ className: _style.default.reviewListItemWrapper,
103
+ "data-tip": true,
104
+ "data-for": "reviewListItem",
105
+ tabIndex: 0
106
+ }, /*#__PURE__*/_react.default.createElement("div", {
107
+ className: _style.default.reviewListText
108
+ }, /*#__PURE__*/_react.default.createElement(ReviewIcon, {
109
+ icon: iconKey
110
+ }), " ", label.text), /*#__PURE__*/_react.default.createElement(ToolTip, {
111
+ tooltipText: label.tooltipText,
112
+ "aria-label": label.moreDetailsAriaLabel,
113
+ closeToolTipInformationTextAriaLabel: label.closeToolTipInformationTextAriaLabel,
114
+ "data-testid": `review-list-item-tooltip-button-${iconKey}`
115
+ }));
60
116
  };
61
117
 
62
118
  const ReviewPresentation = props => {
@@ -89,21 +145,31 @@ const ReviewPresentation = props => {
89
145
  return /*#__PURE__*/_react.default.createElement("li", {
90
146
  key: `step-${key}`,
91
147
  className: _style.default.reviewList
92
- }, /*#__PURE__*/_react.default.createElement("div", {
93
- className: _style.default.reviewListItemWrapper,
94
- "data-tip": true,
95
- "data-for": "reviewListItem"
96
- }, /*#__PURE__*/_react.default.createElement("div", {
97
- className: _style.default.reviewListText
98
- }, getIcon(key), " ", label.text), /*#__PURE__*/_react.default.createElement(ToolTip, {
99
- tooltipText: label.tooltipText
100
- })));
148
+ }, /*#__PURE__*/_react.default.createElement(ReviewListItemWrapper, {
149
+ iconKey: key,
150
+ label: label,
151
+ tooltipText: label.tooltipText,
152
+ "aria-label": label.moreDetailsAriaLabel
153
+ }));
101
154
  }, labelsList)));
102
155
  };
103
156
 
104
157
  ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
105
- tooltipText: _propTypes.default.string
158
+ tooltipText: _propTypes.default.string,
159
+ 'aria-label': _propTypes.default.string,
160
+ 'data-testid': _propTypes.default.string,
161
+ closeToolTipInformationTextAriaLabel: _propTypes.default.string
162
+ } : {};
163
+ ReviewIcon.propTypes = process.env.NODE_ENV !== "production" ? {
164
+ icon: _propTypes.default.string
106
165
  } : {};
166
+ ReviewListItemWrapper.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, ToolTip.propTypes, {
167
+ iconKey: _propTypes.default.string,
168
+ label: _propTypes.default.shape({
169
+ tooltipText: _propTypes.default.string,
170
+ moreDetailsAriaLabel: _propTypes.default.string
171
+ })
172
+ }) : {};
107
173
  ReviewPresentation.propTypes = process.env.NODE_ENV !== "production" ? _propTypes2.default : {};
108
174
  var _default = ReviewPresentation;
109
175
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ICONS","skills","TargetIcon","questions","QuestionIcon","lifes","HeartIcon","allright","CheckIcon","getIcon","icon","Icon","getOr","style","labelIcon","ToolTip","tooltipText","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","map","convert","cap","label","key","reviewList","reviewListItemWrapper","reviewListText","text","propTypes","PropTypes","string"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst getIcon = icon => {\n const Icon = getOr(null, icon, ICONS);\n\n /* istanbul ignore next */\n if (!Icon) {\n return <div className={style.labelIcon} />;\n }\n return <Icon className={style.labelIcon} />;\n};\n\nconst ToolTip = ({tooltipText}) => {\n return (\n <div className={style.tooltipContainer}>\n <div className={style.tooltipIconContainer}>\n <InformationIcon className={style.informationIcon} width={12} height={12} />\n </div>\n <div className={style.toolTip}>\n <div className={style.tooltipText}>{tooltipText}</div>\n </div>\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n\n return (\n <div className={style.reviewWrapper} aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul className={style.reviewListWrapper}>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\">\n <div className={style.reviewListText}>\n {getIcon(key)} {label.text}\n </div>\n <ToolTip tooltipText={label.tooltipText} />\n </div>\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nToolTip.propTypes = {\n tooltipText: PropTypes.string\n};\n\nReviewPresentation.propTypes = propTypes;\n\nexport default ReviewPresentation;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAOA;;AACA;;;;AAEA,MAAMA,KAAK,GAAG;EACZC,MAAM,EAAEC,oDADI;EAEZC,SAAS,EAAEC,0DAFC;EAGZC,KAAK,EAAEC,wCAHK;EAIZC,QAAQ,EAAEC;AAJE,CAAd;;AAOA,MAAMC,OAAO,GAAGC,IAAI,IAAI;EACtB,MAAMC,IAAI,GAAG,IAAAC,cAAA,EAAM,IAAN,EAAYF,IAAZ,EAAkBV,KAAlB,CAAb;EAEA;;EACA,IAAI,CAACW,IAAL,EAAW;IACT,oBAAO;MAAK,SAAS,EAAEE,cAAA,CAAMC;IAAtB,EAAP;EACD;;EACD,oBAAO,6BAAC,IAAD;IAAM,SAAS,EAAED,cAAA,CAAMC;EAAvB,EAAP;AACD,CARD;;AAUA,MAAMC,OAAO,GAAG,CAAC;EAACC;AAAD,CAAD,KAAmB;EACjC,oBACE;IAAK,SAAS,EAAEH,cAAA,CAAMI;EAAtB,gBACE;IAAK,SAAS,EAAEJ,cAAA,CAAMK;EAAtB,gBACE,6BAAC,qDAAD;IAAiB,SAAS,EAAEL,cAAA,CAAMM,eAAlC;IAAmD,KAAK,EAAE,EAA1D;IAA8D,MAAM,EAAE;EAAtE,EADF,CADF,eAIE;IAAK,SAAS,EAAEN,cAAA,CAAMO;EAAtB,gBACE;IAAK,SAAS,EAAEP,cAAA,CAAMG;EAAtB,GAAoCA,WAApC,CADF,CAJF,CADF;AAUD,CAXD;;AAaA,MAAMK,kBAAkB,GAAGC,KAAK,IAAI;EAClC,MAAM;IAAC,cAAcC,SAAf;IAA0BC,WAA1B;IAAuCC,UAAvC;IAAmDC;EAAnD,IAAiEJ,KAAvE;EAEA,oBACE;IAAK,SAAS,EAAET,cAAA,CAAMc,aAAtB;IAAqC,cAAYJ;EAAjD,gBACE;IACE,SAAS,EAAEV,cAAA,CAAMW,WADnB,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACI,MAAM,EAAEJ;IAAT;EAH3B,EADF,eAME;IACE,SAAS,EAAEX,cAAA,CAAMY,UADnB,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACG,MAAM,EAAEH;IAAT;EAH3B,EANF,eAWE;IAAI,SAAS,EAAEZ,cAAA,CAAMgB;EAArB,GACGC,YAAA,CAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,KAAD,EAAQC,GAAR,KAAgB;IACzC,oBACE;MAAI,GAAG,EAAG,QAAOA,GAAI,EAArB;MAAwB,SAAS,EAAErB,cAAA,CAAMsB;IAAzC,gBACE;MAAK,SAAS,EAAEtB,cAAA,CAAMuB,qBAAtB;MAA6C,gBAA7C;MAAsD,YAAS;IAA/D,gBACE;MAAK,SAAS,EAAEvB,cAAA,CAAMwB;IAAtB,GACG5B,OAAO,CAACyB,GAAD,CADV,OACkBD,KAAK,CAACK,IADxB,CADF,eAIE,6BAAC,OAAD;MAAS,WAAW,EAAEL,KAAK,CAACjB;IAA5B,EAJF,CADF,CADF;EAUD,CAXA,EAWEU,UAXF,CADH,CAXF,CADF;AA4BD,CA/BD;;AAiCAX,OAAO,CAACwB,SAAR,2CAAoB;EAClBvB,WAAW,EAAEwB,kBAAA,CAAUC;AADL,CAApB;AAIApB,kBAAkB,CAACkB,SAAnB,2CAA+BA,mBAA/B;eAEelB,kB"}
1
+ {"version":3,"file":"index.js","names":["ICONS","skills","TargetIcon","questions","QuestionIcon","lifes","HeartIcon","allright","CheckIcon","ReviewIcon","icon","Icon","getOr","style","labelIcon","ToolTip","tooltipText","moreDetailsAriaLabel","dataTestId","closeToolTipInformationTextAriaLabel","toolTipIsVisible","setToolTipIsVisible","useState","handleKeyPress","useCallback","event","key","handleMouseOver","handleMouseLeave","customStyle","visibility","opacity","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewListItemWrapper","iconKey","label","reviewListItemWrapper","reviewListText","text","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","map","convert","cap","reviewList","propTypes","PropTypes","string","shape"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React, {useState, useCallback} 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 ReviewIcon = ({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 = ({\n tooltipText,\n 'aria-label': moreDetailsAriaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel\n}) => {\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n const handleKeyPress = useCallback(\n event => {\n if (event.key === 'Enter') {\n setToolTipIsVisible(!toolTipIsVisible);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setToolTipIsVisible(false);\n }\n },\n [setToolTipIsVisible, toolTipIsVisible]\n );\n const handleMouseOver = useCallback(() => setToolTipIsVisible(true), [setToolTipIsVisible]);\n\n const handleMouseLeave = useCallback(() => setToolTipIsVisible(false), [setToolTipIsVisible]);\n const customStyle = {\n visibility: toolTipIsVisible ? 'visible' : 'hidden',\n opacity: toolTipIsVisible ? 1 : 0\n };\n return (\n <div className={style.tooltipContainer}>\n <button\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid={dataTestId}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={12}\n height={12}\n aria-label={moreDetailsAriaLabel}\n />\n </button>\n {toolTipIsVisible ? (\n <div\n className={style.toolTip}\n style={customStyle}\n data-testid=\"review-presentation-tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n <p className={style.tooltipText}>{tooltipText}</p>\n </div>\n ) : null}\n </div>\n );\n};\n\nconst ReviewListItemWrapper = ({iconKey, label}) => {\n return (\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\" tabIndex={0}>\n <div className={style.reviewListText}>\n <ReviewIcon icon={iconKey} /> {label.text}\n </div>\n <ToolTip\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n closeToolTipInformationTextAriaLabel={label.closeToolTipInformationTextAriaLabel}\n data-testid={`review-list-item-tooltip-button-${iconKey}`}\n />\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 <ReviewListItemWrapper\n iconKey={key}\n label={label}\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n />\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nToolTip.propTypes = {\n tooltipText: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-testid': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string\n};\n\nReviewIcon.propTypes = {\n icon: PropTypes.string\n};\n\nReviewListItemWrapper.propTypes = {\n ...ToolTip.propTypes,\n iconKey: PropTypes.string,\n label: PropTypes.shape({\n tooltipText: PropTypes.string,\n moreDetailsAriaLabel: PropTypes.string\n })\n};\n\nReviewPresentation.propTypes = propTypes;\n\nexport default ReviewPresentation;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAOA;;AACA;;;;;;;;;;AAEA,MAAMA,KAAK,GAAG;EACZC,MAAM,EAAEC,oDADI;EAEZC,SAAS,EAAEC,0DAFC;EAGZC,KAAK,EAAEC,wCAHK;EAIZC,QAAQ,EAAEC;AAJE,CAAd;;AAOA,MAAMC,UAAU,GAAG,CAAC;EAACC;AAAD,CAAD,KAAY;EAC7B,MAAMC,IAAI,GAAG,IAAAC,cAAA,EAAM,IAAN,EAAYF,IAAZ,EAAkBV,KAAlB,CAAb;EAEA;;EACA,IAAI,CAACW,IAAL,EAAW;IACT,oBAAO;MAAK,SAAS,EAAEE,cAAA,CAAMC;IAAtB,EAAP;EACD;;EACD,oBAAO,6BAAC,IAAD;IAAM,SAAS,EAAED,cAAA,CAAMC;EAAvB,EAAP;AACD,CARD;;AAUA,MAAMC,OAAO,GAAG,CAAC;EACfC,WADe;EAEf,cAAcC,oBAFC;EAGf,eAAeC,UAHA;EAIfC;AAJe,CAAD,KAKV;EACJ,MAAM,CAACC,gBAAD,EAAmBC,mBAAnB,IAA0C,IAAAC,eAAA,EAAS,KAAT,CAAhD;EACA,MAAMC,cAAc,GAAG,IAAAC,kBAAA,EACrBC,KAAK,IAAI;IACP,IAAIA,KAAK,CAACC,GAAN,KAAc,OAAlB,EAA2B;MACzBL,mB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GADX;MAEE,KAAK,EAAEY,KAFT;MAGE,WAAW,EAAEA,KAAK,CAACtB,WAHrB;MAIE,cAAYsB,KAAK,CAACrB;IAJpB,EADF,CADF;EAUD,CAXA,EAWE8B,UAXF,CADH,CAXF,CADF;AA4BD,CA/BD;;AAiCAhC,OAAO,CAACwC,SAAR,2CAAoB;EAClBvC,WAAW,EAAEwC,kBAAA,CAAUC,MADL;EAElB,cAAcD,kBAAA,CAAUC,MAFN;EAGlB,eAAeD,kBAAA,CAAUC,MAHP;EAIlBtC,oCAAoC,EAAEqC,kBAAA,CAAUC;AAJ9B,CAApB;AAOAhD,UAAU,CAAC8C,SAAX,2CAAuB;EACrB7C,IAAI,EAAE8C,kBAAA,CAAUC;AADK,CAAvB;AAIArB,qBAAqB,CAACmB,SAAtB,wDACKxC,OAAO,CAACwC,SADb;EAEElB,OAAO,EAAEmB,kBAAA,CAAUC,MAFrB;EAGEnB,KAAK,EAAEkB,kBAAA,CAAUE,KAAV,CAAgB;IACrB1C,WAAW,EAAEwC,kBAAA,CAAUC,MADF;IAErBxC,oBAAoB,EAAEuC,kBAAA,CAAUC;EAFX,CAAhB;AAHT;AASAf,kBAAkB,CAACa,SAAnB,2CAA+BA,mBAA/B;eAEeb,kB"}
@@ -9,18 +9,26 @@ 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>;
13
+ closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
12
14
  }>>;
13
15
  questions: PropTypes.Requireable<PropTypes.InferProps<{
14
16
  text: PropTypes.Requireable<string>;
15
17
  tooltipText: PropTypes.Requireable<string>;
18
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
19
+ closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
16
20
  }>>;
17
21
  lifes: PropTypes.Requireable<PropTypes.InferProps<{
18
22
  text: PropTypes.Requireable<string>;
19
23
  tooltipText: PropTypes.Requireable<string>;
24
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
25
+ closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
20
26
  }>>;
21
27
  allright: PropTypes.Requireable<PropTypes.InferProps<{
22
28
  text: PropTypes.Requireable<string>;
23
29
  tooltipText: PropTypes.Requireable<string>;
30
+ moreDetailsAreaLabel: PropTypes.Requireable<string>;
31
+ closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
24
32
  }>>;
25
33
  }>>;
26
34
  };
@@ -40,18 +48,22 @@ export declare type OnboardingProps = {
40
48
  skills?: {
41
49
  text?: string | undefined;
42
50
  tooltipText?: string | undefined;
51
+ 'aria-label'?: string | undefined;
43
52
  } | undefined;
44
53
  questions?: {
45
54
  text?: string | undefined;
46
55
  tooltipText?: string | undefined;
56
+ 'aria-label'?: string | undefined;
47
57
  };
48
58
  lifes?: {
49
59
  text?: string | undefined;
50
60
  tooltipText?: string | undefined;
61
+ 'aria-label'?: string | undefined;
51
62
  } | undefined;
52
63
  allright?: {
53
64
  text?: string | undefined;
54
65
  tooltipText?: string | undefined;
66
+ 'aria-label'?: string | undefined;
55
67
  } | undefined;
56
68
  };
57
69
  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,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAClC,GACD,SAAS,CAAC;QACd,QAAQ,CAAC,EACL;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAClC,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
+ {"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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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"}
@@ -9,7 +9,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
9
9
 
10
10
  const levelItem = _propTypes.default.shape({
11
11
  text: _propTypes.default.string,
12
- tooltipText: _propTypes.default.string
12
+ tooltipText: _propTypes.default.string,
13
+ moreDetailsAreaLabel: _propTypes.default.string,
14
+ closeToolTipInformationTextAriaLabel: _propTypes.default.string
13
15
  });
14
16
 
15
17
  const propTypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ColorValue, GestureResponderEvent, ViewStyle} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":";;;;;AAAA;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG;AAFS,CAAhB,CAAlB;;AAKA,MAAME,SAAS,GAAG;EAChB,cAAcL,kBAAA,CAAUG,MADR;EAEhBG,WAAW,EAAEN,kBAAA,CAAUG,MAFP;EAGhBI,UAAU,EAAEP,kBAAA,CAAUG,MAHN;EAIhBK,UAAU,EAAER,kBAAA,CAAUC,KAAV,CAAgB;IAC1BQ,MAAM,EAAEV,SADkB;IAE1BW,SAAS,EAAEX,SAFe;IAG1BY,KAAK,EAAEZ,SAHmB;IAI1Ba,QAAQ,EAAEb;EAJgB,CAAhB;AAJI,CAAlB;eAYeM,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEd,kBAAA,CAAUe;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3Bd,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3Bc,IAAI,EAAEjB,kBAAA,CAAUkB;AAFW,CAAtB"}
1
+ {"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","moreDetailsAreaLabel","closeToolTipInformationTextAriaLabel","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 closeToolTipInformationTextAriaLabel: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":";;;;;AAAA;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG,MAFS;EAGhCE,oBAAoB,EAAEL,kBAAA,CAAUG,MAHA;EAIhCG,oCAAoC,EAAEN,kBAAA,CAAUG;AAJhB,CAAhB,CAAlB;;AAOA,MAAMI,SAAS,GAAG;EAChB,cAAcP,kBAAA,CAAUG,MADR;EAEhBK,WAAW,EAAER,kBAAA,CAAUG,MAFP;EAGhBM,UAAU,EAAET,kBAAA,CAAUG,MAHN;EAIhBO,UAAU,EAAEV,kBAAA,CAAUC,KAAV,CAAgB;IAC1BU,MAAM,EAAEZ,SADkB;IAE1Ba,SAAS,EAAEb,SAFe;IAG1Bc,KAAK,EAAEd,SAHmB;IAI1Be,QAAQ,EAAEf;EAJgB,CAAhB;AAJI,CAAlB;eAYeQ,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEhB,kBAAA,CAAUiB;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3BhB,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3BgB,IAAI,EAAEnB,kBAAA,CAAUoB;AAFW,CAAtB"}
@@ -82,8 +82,6 @@
82
82
  }
83
83
 
84
84
  .toolTip {
85
- visibility: hidden;
86
- opacity: 0;
87
85
  transition: opacity 0.8s;
88
86
  position: absolute;
89
87
  height: auto;
@@ -97,8 +95,8 @@
97
95
  .toolTip::before {
98
96
  content: '';
99
97
  display: inline-block;
100
- visibility: hidden;
101
- opacity: 0;
98
+ visibility: inherit;
99
+ opacity: inherit;
102
100
  width: 15px;
103
101
  height: 15px;
104
102
  transform: rotate(-45deg);
@@ -126,19 +124,10 @@
126
124
  position: relative;
127
125
  }
128
126
 
129
- .reviewListItemWrapper:hover .tooltipContainer .toolTip {
130
- visibility: visible;
131
- opacity: 1;
132
- }
133
-
134
- .reviewListItemWrapper:hover .tooltipContainer .toolTip::before {
135
- visibility: visible;
136
- opacity: 1;
137
- }
138
-
139
127
  .tooltipIconContainer {
140
128
  display: flex;
141
129
  justify-content: flex-end;
130
+ border: none;
142
131
  }
143
132
 
144
133
  @media tablet {
@@ -16,7 +16,7 @@ declare const _default: {
16
16
  'aria-label': PropTypes.Requireable<string>;
17
17
  'data-name': PropTypes.Requireable<string>;
18
18
  animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
19
- 'aria-label': PropTypes.Validator<string>;
19
+ 'aria-label': PropTypes.Requireable<string>;
20
20
  'data-name': PropTypes.Requireable<string>;
21
21
  animationSrc: PropTypes.Validator<string>;
22
22
  loop: PropTypes.Requireable<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/review-congrats/index.js"],"names":[],"mappings":"AAOO,sDAMN;;AAED,yDAsEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/review-congrats/index.js"],"names":[],"mappings":"AAOO,sDAMN;;AAED,yDAuEC"}
@@ -53,7 +53,9 @@ const ReviewCongrats = props => {
53
53
  "aria-label": ariaLabel,
54
54
  "data-name": dataName,
55
55
  "data-testid": "congrats"
56
- }, /*#__PURE__*/_react.default.createElement(_lottieWrapper.default, _extends({}, animationLottie, {
56
+ }, /*#__PURE__*/_react.default.createElement(_lottieWrapper.default
57
+ /** confetti animation */
58
+ , _extends({}, animationLottie, {
57
59
  loop: false,
58
60
  animationControl: 'play',
59
61
  autoplay: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["setScroll","container","current","scrollTo","left","behavior","ReviewCongrats","props","ariaLabel","dataName","animationLottie","title","cardCongratsStar","cardCongratsRank","buttonRevising","buttonRevisingSkill","useRef","useEffect","timer","setTimeout","clearTimeout","style","mainContainer","lottie","ie11Backup","containerCongrats","containerCards","cardStar","cardRank","cardStarNoRank","buttonContainer","buttonRevise","propTypes"],"sources":["../../../src/organism/review-congrats/index.js"],"sourcesContent":["import React, {useEffect, useRef} from 'react';\nimport AtomLottieWrapper from '../../atom/lottie-wrapper';\nimport ButtonLink from '../../atom/button-link';\nimport MoleculeReviewCardCongrats from '../../molecule/review-card-congrats';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nexport const setScroll = container => () => {\n container.current?.scrollTo &&\n container.current.scrollTo({\n left: 1000,\n behavior: 'smooth'\n });\n};\n\nconst ReviewCongrats = props => {\n const {\n 'aria-label': ariaLabel,\n 'data-name': dataName,\n animationLottie,\n title,\n cardCongratsStar,\n cardCongratsRank,\n buttonRevising,\n buttonRevisingSkill\n } = props;\n\n const container = useRef(null);\n\n useEffect(() => {\n const timer = setTimeout(setScroll(container), 2000);\n return () => timer && clearTimeout(timer);\n }, []);\n\n return (\n <div\n className={style.mainContainer}\n aria-label={ariaLabel}\n data-name={dataName}\n data-testid=\"congrats\"\n >\n <AtomLottieWrapper\n {...animationLottie}\n loop={false}\n animationControl={'play'}\n autoplay\n data-name=\"lottie-wrapper\"\n className={style.lottie}\n backupImageClassName={style.ie11Backup}\n />\n <div className={style.containerCongrats}>\n <div className={style.title}>{title}</div>\n <div ref={container} className={style.containerCards}>\n {cardCongratsRank ? (\n <>\n <MoleculeReviewCardCongrats {...cardCongratsStar} className={style.cardStar} />\n <MoleculeReviewCardCongrats\n {...cardCongratsRank}\n timerAnimation={1800}\n className={style.cardRank}\n />\n </>\n ) : (\n <MoleculeReviewCardCongrats {...cardCongratsStar} className={style.cardStarNoRank} />\n )}\n </div>\n <div className={style.buttonContainer}>\n {buttonRevising ? (\n <ButtonLink\n {...buttonRevising}\n className={style.buttonRevise}\n data-testid=\"revise-skill-link\"\n />\n ) : null}\n {buttonRevisingSkill ? (\n <ButtonLink\n {...buttonRevisingSkill}\n className={style.buttonRevise}\n data-testid=\"revise-another-skill-link\"\n />\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nReviewCongrats.propTypes = propTypes;\n\nexport default ReviewCongrats;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,SAAS,GAAGC,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,MA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B,GACGhB,cAAc,gBACb,6BAAC,mBAAD,eACMA,cADN;IAEE,SAAS,EAAEO,cAAA,CAAMU,YAFnB;IAGE,eAAY;EAHd,GADa,GAMX,IAPN,EAQGhB,mBAAmB,gBAClB,6BAAC,mBAAD,eACMA,mBADN;IAEE,SAAS,EAAEM,cAAA,CAAMU,YAFnB;IAGE,eAAY;EAHd,GADkB,GAMhB,IAdN,CAhBF,CAfF,CADF;AAmDD,CAtED;;AAwEAzB,cAAc,CAAC0B,SAAf,2CAA2BA,kBAA3B;eAEe1B,c"}
1
+ {"version":3,"file":"index.js","names":["setScroll","container","current","scrollTo","left","behavior","ReviewCongrats","props","ariaLabel","dataName","animationLottie","title","cardCongratsStar","cardCongratsRank","buttonRevising","buttonRevisingSkill","useRef","useEffect","timer","setTimeout","clearTimeout","style","mainContainer","lottie","ie11Backup","containerCongrats","containerCards","cardStar","cardRank","cardStarNoRank","buttonContainer","buttonRevise","propTypes"],"sources":["../../../src/organism/review-congrats/index.js"],"sourcesContent":["import React, {useEffect, useRef} from 'react';\nimport LottieWrapper from '../../atom/lottie-wrapper';\nimport ButtonLink from '../../atom/button-link';\nimport ReviewCardCongrats from '../../molecule/review-card-congrats';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nexport const setScroll = container => () => {\n container.current?.scrollTo &&\n container.current.scrollTo({\n left: 1000,\n behavior: 'smooth'\n });\n};\n\nconst ReviewCongrats = props => {\n const {\n 'aria-label': ariaLabel,\n 'data-name': dataName,\n animationLottie,\n title,\n cardCongratsStar,\n cardCongratsRank,\n buttonRevising,\n buttonRevisingSkill\n } = props;\n\n const container = useRef(null);\n\n useEffect(() => {\n const timer = setTimeout(setScroll(container), 2000);\n return () => timer && clearTimeout(timer);\n }, []);\n\n return (\n <div\n className={style.mainContainer}\n aria-label={ariaLabel}\n data-name={dataName}\n data-testid=\"congrats\"\n >\n <LottieWrapper\n /** confetti animation */\n {...animationLottie}\n loop={false}\n animationControl={'play'}\n autoplay\n data-name=\"lottie-wrapper\"\n className={style.lottie}\n backupImageClassName={style.ie11Backup}\n />\n <div className={style.containerCongrats}>\n <div className={style.title}>{title}</div>\n <div ref={container} className={style.containerCards}>\n {cardCongratsRank ? (\n <>\n <ReviewCardCongrats {...cardCongratsStar} className={style.cardStar} />\n <ReviewCardCongrats\n {...cardCongratsRank}\n timerAnimation={1800}\n className={style.cardRank}\n />\n </>\n ) : (\n <ReviewCardCongrats {...cardCongratsStar} className={style.cardStarNoRank} />\n )}\n </div>\n <div className={style.buttonContainer}>\n {buttonRevising ? (\n <ButtonLink\n {...buttonRevising}\n className={style.buttonRevise}\n data-testid=\"revise-skill-link\"\n />\n ) : null}\n {buttonRevisingSkill ? (\n <ButtonLink\n {...buttonRevisingSkill}\n className={style.buttonRevise}\n data-testid=\"revise-another-skill-link\"\n />\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nReviewCongrats.propTypes = propTypes;\n\nexport default ReviewCongrats;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,SAAS,GAAGC,SAAS,IAAI,MAAM;EAC1CA,SAAS,CAACC,OAAV,EAAmBC,QAAnB,IACEF,SAAS,CAACC,OAAV,CAAkBC,QAAlB,CAA2B;IACzBC,IAAI,EAAE,IADmB;IAEzBC,QAAQ,EAAE;EAFe,CAA3B,CADF;AAKD,CANM;;;;AAQP,MAAMC,cAAc,GAAGC,KAAK,IAAI;EAC9B,MAAM;IACJ,cAAcC,SADV;IAEJ,aAAaC,QAFT;IAGJC,eAHI;IAIJC,KAJI;IAKJC,gBALI;IAMJC,gBANI;IAOJC,cAPI;IAQJC;EARI,IASFR,KATJ;EAWA,MAAMN,SAAS,GAAG,IAAAe,aAAA,EAAO,IAAP,CAAlB;EAEA,IAAAC,gBAAA,EAAU,MAAM;IACd,MAAMC,KAAK,GAAGC,UAAU,CAACnB,SAAS,CAACC,SAAD,CAAV,EAAuB,IAAvB,CAAxB;IACA,OAAO,MAAMiB,K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A,kBAA3B;eAEe1B,c"}
@@ -5,7 +5,7 @@ declare const propTypes: {
5
5
  'aria-label': PropTypes.Requireable<string>;
6
6
  'data-name': PropTypes.Requireable<string>;
7
7
  animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
8
- 'aria-label': PropTypes.Validator<string>;
8
+ 'aria-label': PropTypes.Requireable<string>;
9
9
  'data-name': PropTypes.Requireable<string>;
10
10
  animationSrc: PropTypes.Validator<string>;
11
11
  loop: PropTypes.Requireable<boolean>;
@@ -26,7 +26,7 @@ declare const propTypes: {
26
26
  'aria-label': PropTypes.Requireable<string>;
27
27
  'data-name': PropTypes.Requireable<string>;
28
28
  animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
29
- 'aria-label': PropTypes.Validator<string>;
29
+ 'aria-label': PropTypes.Requireable<string>;
30
30
  'data-name': PropTypes.Requireable<string>;
31
31
  animationSrc: PropTypes.Validator<string>;
32
32
  loop: PropTypes.Requireable<boolean>;
@@ -54,7 +54,7 @@ declare const propTypes: {
54
54
  'aria-label': PropTypes.Requireable<string>;
55
55
  'data-name': PropTypes.Requireable<string>;
56
56
  animationLottie: PropTypes.Requireable<PropTypes.InferProps<{
57
- 'aria-label': PropTypes.Validator<string>;
57
+ 'aria-label': PropTypes.Requireable<string>;
58
58
  'data-name': PropTypes.Requireable<string>;
59
59
  animationSrc: PropTypes.Validator<string>;
60
60
  loop: PropTypes.Requireable<boolean>;
@@ -18,6 +18,7 @@ declare namespace UserPreferences {
18
18
  'data-name': PropTypes.Requireable<string>;
19
19
  requiredSelection: PropTypes.Requireable<boolean>;
20
20
  }> | null | undefined)[]>;
21
+ const moreInfoAriaLabel: PropTypes.Requireable<string>;
21
22
  }
22
23
  }
23
24
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/user-preferences/index.js"],"names":[],"mappings":";AA+BA,0DAaC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/user-preferences/index.js"],"names":[],"mappings":";AAoCA,0DAaC"}
@@ -17,7 +17,7 @@ var _inputSwitch = _interopRequireDefault(require("../../atom/input-switch"));
17
17
 
18
18
  var _style = _interopRequireDefault(require("./style.css"));
19
19
 
20
- const _excluded = ["label", "description"];
20
+ const _excluded = ["label", "description", "moreInfoAriaLabel"];
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
@@ -28,7 +28,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
28
28
  const Settings = props => {
29
29
  const {
30
30
  label,
31
- description
31
+ description,
32
+ moreInfoAriaLabel
32
33
  } = props,
33
34
  settings = _objectWithoutPropertiesLoose(props, _excluded);
34
35
 
@@ -41,7 +42,8 @@ const Settings = props => {
41
42
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyInformationIcon, {
42
43
  height: 16,
43
44
  width: 16,
44
- className: _style.default.infoIcon
45
+ className: _style.default.infoIcon,
46
+ "aria-label": moreInfoAriaLabel
45
47
  }), /*#__PURE__*/_react.default.createElement("div", {
46
48
  className: _style.default.showToolTip
47
49
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -56,17 +58,20 @@ Settings.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, _input
56
58
 
57
59
  const UserPreferences = props => {
58
60
  const {
59
- preferences = []
61
+ preferences = [],
62
+ moreInfoAriaLabel
60
63
  } = props;
61
64
  return /*#__PURE__*/_react.default.createElement("div", {
62
65
  className: _style.default.preferences
63
66
  }, (0, _map2.default)(settings => /*#__PURE__*/_react.default.createElement(Settings, _extends({}, settings, {
64
- key: settings.label
67
+ key: settings.label,
68
+ moreInfoAriaLabel: moreInfoAriaLabel
65
69
  })), preferences));
66
70
  };
67
71
 
68
72
  UserPreferences.propTypes = process.env.NODE_ENV !== "production" ? {
69
- preferences: _propTypes.default.arrayOf(_propTypes.default.shape(Settings.propTypes))
73
+ preferences: _propTypes.default.arrayOf(_propTypes.default.shape(Settings.propTypes)),
74
+ moreInfoAriaLabel: _propTypes.default.string
70
75
  } : {};
71
76
  var _default = UserPreferences;
72
77
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Settings","props","label","description","settings","style","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","InputSwitch","PropTypes","string","isRequired","UserPreferences","preferences","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, isEmpty} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyInformationIcon as InfoIcon} from '@coorpacademy/nova-icons';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const {label, description, ...settings} = props;\n return (\n <div className={style.settings}>\n <InputSwitch {...settings} />\n <span className={style.label}>{label}</span>\n {isEmpty(description) ? null : (\n <div className={style.infoIconWrapper}>\n <InfoIcon height={16} width={16} className={style.infoIcon} />\n <div className={style.showToolTip}>\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n ...InputSwitch.propTypes,\n label: PropTypes.string.isRequired,\n description: PropTypes.string\n};\n\nconst UserPreferences = props => {\n const {preferences = []} = props;\n\n return (\n <div className={style.preferences}>\n {map(\n settings => (\n <Settings {...settings} key={settings.label} />\n ),\n preferences\n )}\n </div>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes))\n};\n\nexport default UserPreferences;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,KAAD;IAAQC;EAAR,IAAoCF,KAA1C;EAAA,MAA8BG,QAA9B,iCAA0CH,KAA1C;;EACA,oBACE;IAAK,SAAS,EAAEI,cAAA,CAAMD;EAAtB,gBACE,6BAAC,oBAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEC,cAAA,CAAMH;EAAvB,GAA+BA,KAA/B,CAFF,EAGG,uBAAQC,WAAR,IAAuB,IAAvB,gBACC;IAAK,SAAS,EAAEE,cAAA,CAAMC;EAAtB,gBACE,6BAAC,qDAAD;IAAU,MAAM,EAAE,EAAlB;IAAsB,KAAK,EAAE,EAA7B;IAAiC,SAAS,EAAED,cAAA,CAAME;EAAlD,EADF,eAEE;IAAK,SAAS,EAAEF,cAAA,CAAMG;EAAtB,gBACE;IAAK,SAAS,EAAEH,cAAA,CAAMI;EAAtB,GAAyCN,WAAzC,CADF,CAFF,CAJJ,CADF;AAcD,CAhBD;;AAkBAH,QAAQ,CAACU,SAAT,wDACKC,oBAAA,CAAYD,SADjB;EAEER,KAAK,EAAEU,kBAAA,CAAUC,MAAV,CAAiBC,UAF1B;EAGEX,WAAW,EAAES,kBAAA,CAAUC;AAHzB;;AAMA,MAAME,eAAe,GAAGd,KAAK,IAAI;EAC/B,MAAM;IAACe,WAAW,GAAG;EAAf,IAAqBf,KAA3B;EAEA,oBACE;IAAK,SAAS,EAAEI,cAAA,CAAMW;EAAtB,GACG,mBACCZ,QAAQ,iBACN,6BAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACF;EAAtC,GAFH,EAICc,WAJD,CADH,CADF;AAUD,CAbD;;AAeAD,eAAe,CAACL,SAAhB,2CAA4B;EAC1BM,WAAW,EAAEJ,kBAAA,CAAUK,OAAV,CAAkBL,kBAAA,CAAUM,KAAV,CAAgBlB,QAAQ,CAACU,SAAzB,CAAlB;AADa,CAA5B;eAIeK,e"}
1
+ {"version":3,"file":"index.js","names":["Settings","props","label","description","moreInfoAriaLabel","settings","style","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","InputSwitch","PropTypes","string","isRequired","UserPreferences","preferences","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, isEmpty} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyInformationIcon as InfoIcon} from '@coorpacademy/nova-icons';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const {label, description, moreInfoAriaLabel, ...settings} = props;\n return (\n <div className={style.settings}>\n <InputSwitch {...settings} />\n <span className={style.label}>{label}</span>\n {isEmpty(description) ? null : (\n <div className={style.infoIconWrapper}>\n <InfoIcon\n height={16}\n width={16}\n className={style.infoIcon}\n aria-label={moreInfoAriaLabel}\n />\n <div className={style.showToolTip}>\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n ...InputSwitch.propTypes,\n label: PropTypes.string.isRequired,\n description: PropTypes.string\n};\n\nconst UserPreferences = props => {\n const {preferences = [], moreInfoAriaLabel} = props;\n\n return (\n <div className={style.preferences}>\n {map(\n settings => (\n <Settings {...settings} key={settings.label} moreInfoAriaLabel={moreInfoAriaLabel} />\n ),\n preferences\n )}\n </div>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),\n moreInfoAriaLabel: PropTypes.string\n};\n\nexport default UserPreferences;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,KAAD;IAAQC,WAAR;IAAqBC;EAArB,IAAuDH,KAA7D;EAAA,MAAiDI,QAAjD,iCAA6DJ,KAA7D;;EACA,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMD;EAAtB,gBACE,6BAAC,oBAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEC,cAAA,CAAMJ;EAAvB,GAA+BA,KAA/B,CAFF,EAGG,uBAAQC,WAAR,IAAuB,IAAvB,gBACC;IAAK,SAAS,EAAEG,cAAA,CAAMC;EAAtB,gBACE,6BAAC,qDAAD;IACE,MAAM,EAAE,EADV;IAEE,KAAK,EAAE,EAFT;IAGE,SAAS,EAAED,cAAA,CAAME,QAHnB;IAIE,cAAYJ;EAJd,EADF,eAOE;IAAK,SAAS,EAAEE,cAAA,CAAMG;EAAtB,gBACE;IAAK,SAAS,EAAEH,cAAA,CAAMI;EAAtB,GAAyCP,WAAzC,CADF,CAPF,CAJJ,CADF;AAmBD,CArBD;;AAuBAH,QAAQ,CAACW,SAAT,wDACKC,oBAAA,CAAYD,SADjB;EAEET,KAAK,EAAEW,kBAAA,CAAUC,MAAV,CAAiBC,UAF1B;EAGEZ,WAAW,EAAEU,kBAAA,CAAUC;AAHzB;;AAMA,MAAME,eAAe,GAAGf,KAAK,IAAI;EAC/B,MAAM;IAACgB,WAAW,GAAG,EAAf;IAAmBb;EAAnB,IAAwCH,KAA9C;EAEA,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMW;EAAtB,GACG,mBACCZ,QAAQ,iBACN,6BAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACH,KAAtC;IAA6C,iBAAiB,EAAEE;EAAhE,GAFH,EAICa,WAJD,CADH,CADF;AAUD,CAbD;;AAeAD,eAAe,CAACL,SAAhB,2CAA4B;EAC1BM,WAAW,EAAEJ,kBAAA,CAAUK,OAAV,CAAkBL,kBAAA,CAAUM,KAAV,CAAgBnB,QAAQ,CAACW,SAAzB,CAAlB,CADa;EAE1BP,iBAAiB,EAAES,kBAAA,CAAUC;AAFH,CAA5B;eAKeE,e"}
@@ -3,6 +3,7 @@ declare class Progression extends React.Component<any, any, any> {
3
3
  static propTypes: {
4
4
  mainTitle: PropTypes.Validator<string>;
5
5
  mainSubtitle: PropTypes.Validator<string>;
6
+ adaptiveAriaLabel: PropTypes.Requireable<string>;
6
7
  total: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
7
8
  label: PropTypes.Validator<string>;
8
9
  stars: PropTypes.Validator<number>;
@@ -32,6 +33,7 @@ declare class Progression extends React.Component<any, any, any> {
32
33
  label: PropTypes.Validator<string>;
33
34
  level: PropTypes.Validator<string>;
34
35
  state: PropTypes.Validator<string>;
36
+ adaptiveAriaLabel: PropTypes.Requireable<string>;
35
37
  type: PropTypes.Validator<string>;
36
38
  adaptive: PropTypes.Validator<boolean>;
37
39
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/activity/index.js"],"names":[],"mappings":";AAaA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,sCAIC;IAED,8BAME;IAEF,oCAKE;IAEF,sBA+EC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/activity/index.js"],"names":[],"mappings":";AAaA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,sCAIC;IAED,8BAME;IAEF,oCAKE;IAEF,sBAoFC;CACF"}
@@ -70,6 +70,7 @@ class Progression extends _react.default.Component {
70
70
  mainSubtitle,
71
71
  recommendation = {},
72
72
  progressions = [],
73
+ adaptiveAriaLabel,
73
74
  total,
74
75
  engines = [],
75
76
  themeFilter = {},
@@ -83,7 +84,8 @@ class Progression extends _react.default.Component {
83
84
  className: _style.default.loader
84
85
  }, /*#__PURE__*/_react.default.createElement(_loader.default, null)) : null;
85
86
  const allProgressions = progressions.map(progression => /*#__PURE__*/_react.default.createElement(_progressionItem.default, _extends({}, (0, _omit2.default)(['ref'], progression), {
86
- key: progression.ref
87
+ key: progression.ref,
88
+ adaptiveAriaLabel: adaptiveAriaLabel
87
89
  })));
88
90
 
89
91
  const coreProgression = /*#__PURE__*/_react.default.createElement("div", {
@@ -146,6 +148,7 @@ Progression.contextTypes = {
146
148
  Progression.propTypes = process.env.NODE_ENV !== "production" ? {
147
149
  mainTitle: _propTypes.default.string.isRequired,
148
150
  mainSubtitle: _propTypes.default.string.isRequired,
151
+ adaptiveAriaLabel: _propTypes.default.string,
149
152
  total: _propTypes.default.shape({
150
153
  label: _propTypes.default.string.isRequired,
151
154
  stars: _propTypes.default.number.isRequired
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Progression","React","Component","constructor","props","context","handleClick","e","recommendation","stopPropagation","preventDefault","onClick","handleSelectTheme","themeFilter","onChange","bind","render","mainTitle","mainSubtitle","progressions","total","engines","loading","skin","primary","loader","style","allProgressions","map","progression","ref","coreProgression","core","themeSelect","options","selectBorder","select","recommendationSection","recommendationWrapper","title","subtitle","classnames","course","innerHTML","__html","courseTitle","cta","backgroundColor","default","headerProgression","wrapperCta","wrapperProgression","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","isRequired","shape","label","stars","number","arrayOf","EngineStars","bool","ProgressionItem","Select","func"],"sources":["../../../src/template/activity/index.js"],"sourcesContent":["import React from 'react';\nimport {get, omit, isEmpty} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Button from '../../atom/button';\nimport Select from '../../atom/select';\nimport Loader from '../../atom/loader';\nimport ProgressionItem from './progression-item';\nimport EngineStars from './engine-stars';\nimport StarsSummary from './stars-summary';\nimport style from './style.css';\n\nclass Progression extends React.Component {\n static propTypes = {\n mainTitle: PropTypes.string.isRequired,\n mainSubtitle: PropTypes.string.isRequired,\n total: PropTypes.shape({\n label: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired\n }).isRequired,\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)),\n loading: PropTypes.bool.isRequired,\n progressions: PropTypes.arrayOf(\n PropTypes.shape({...ProgressionItem.propTypes, ref: PropTypes.string.isRequired})\n ),\n themeFilter: PropTypes.shape({\n options: Select.propTypes.options.isRequired,\n onChange: Select.propTypes.onChange\n }),\n recommendation: PropTypes.shape({\n cta: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n courseTitle: PropTypes.string.isRequired,\n onClick: PropTypes.func\n })\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props, context) {\n super(props, context);\n this.handleClick = this.handleClick.bind(this);\n this.handleSelectTheme = this.handleSelectTheme.bind(this);\n }\n\n handleClick = e => {\n const {recommendation} = this.props;\n e.stopPropagation();\n e.preventDefault();\n const {onClick} = recommendation;\n onClick && onClick(e);\n };\n\n handleSelectTheme = e => {\n const {\n themeFilter: {onChange}\n } = this.props;\n onChange && onChange(e);\n };\n\n render() {\n const {\n mainTitle,\n mainSubtitle,\n recommendation = {},\n progressions = [],\n total,\n engines = [],\n themeFilter = {},\n loading\n } = this.props;\n const {skin} = this.context;\n\n const primary = get('common.primary', skin);\n const loader = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : null;\n const allProgressions = progressions.map(progression => (\n <ProgressionItem {...omit(['ref'], progression)} key={progression.ref} />\n ));\n\n const coreProgression = (\n <div data-name=\"activityCore\" className={style.core}>\n {allProgressions}\n </div>\n );\n const themeSelect = !isEmpty(themeFilter.options) ? (\n <Select\n borderClassName={style.selectBorder}\n className={style.select}\n theme=\"thematiques\"\n options={themeFilter.options}\n onChange={this.handleSelectTheme}\n />\n ) : null;\n const recommendationSection = !isEmpty(recommendation) ? (\n <div className={style.recommendationWrapper}>\n <p className={style.recommendationSection}>{recommendation.title} </p>\n <p className={style.recommendationSection}>\n <span>{recommendation.subtitle} </span>\n <span\n className={classnames(style.course, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: recommendation.courseTitle}}\n />\n </p>\n <Button\n type=\"link\"\n onClick={this.handleClick}\n submitValue={recommendation.cta}\n style={{\n backgroundColor: primary\n }}\n className={style.cta}\n />\n </div>\n ) : null;\n return (\n <div className={style.default}>\n <div data-name=\"activity-header\">\n <div className={style.mainTitle}>\n <span>{mainTitle}</span> {mainSubtitle}\n </div>\n <div className={style.headerProgression}>\n <div className={style.wrapperCta}>\n {themeSelect}\n {recommendationSection}\n </div>\n <StarsSummary engines={engines} total={total} />\n </div>\n </div>\n <div className={style.wrapperProgression} data-name=\"activityList\">\n {coreProgression}\n {loader}\n </div>\n </div>\n );\n }\n}\n\nexport default Progression;\n"],"mappings":";;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,WAAN,SAA0BC,cAAA,CAAMC,SAAhC,CAA0C;EA8BxCC,WAAW,CAACC,KAAD,EAAQC,OAAR,EAAiB;IAC1B,MAAMD,KAAN,EAAaC,OAAb;;IAD0B,KAM5BC,WAN4B,GAMdC,CAAC,IAAI;MACjB,MAAM;QAACC;MAAD,IAAmB,KAAKJ,KAA9B;MACAG,CAAC,CAACE,eAAF;MACAF,CAAC,CAACG,cAAF;MACA,MAAM;QAACC;MAAD,IAAYH,cAAlB;MACAG,OAAO,IAAIA,OAAO,CAACJ,CAAD,CAAlB;IACD,CAZ2B;;IAAA,KAc5BK,iBAd4B,GAcRL,CAAC,IAAI;MACvB,MAAM;QACJM,WAAW,EAAE;UAACC;QAAD;MADT,IAEF,KAAKV,KAFT;MAGAU,QAAQ,IAAIA,QAAQ,CAACP,CAAD,CAApB;IACD,CAnB2B;;IAE1B,KAAKD,WAAL,GAAmB,KAAKA,WAAL,CAAiBS,IAAjB,CAAsB,IAAtB,CAAnB;IACA,KAAKH,iBAAL,GAAyB,KAAKA,iBAAL,CAAuBG,IAAvB,CAA4B,IAA5B,CAAzB;EACD;;EAiBDC,MAAM,GAAG;IACP,MAAM;MACJC,SADI;MAEJC,YAFI;MAGJV,cAAc,GAAG,EAHb;MAIJW,YAAY,GAAG,EAJX;MAKJC,KALI;MAMJC,OAAO,GAAG,EANN;MAOJR,W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B,EAGJA,UANc;EAOjBrC,OAAO,EAAEmC,kBAAA,CAAUO,OAAV,CAAkBP,kBAAA,CAAUG,KAAV,CAAgBK,oBAAA,CAAYT,SAA5B,CAAlB,CAPQ;EAQjBjC,OAAO,EAAEkC,kBAAA,CAAUS,IAAV,CAAeP,UARP;EASjBvC,YAAY,EAAEqC,kBAAA,CAAUO,OAAV,CACZP,kBAAA,CAAUG,KAAV,cAAoBO,wBAAA,CAAgBX,SAApC;IAA+CzB,GAAG,EAAE0B,kBAAA,CAAUC,MAAV,CAAiBC;EAArE,GADY,CATG;EAYjB7C,WAAW,EAAE2C,kBAAA,CAAUG,KAAV,CAAgB;IAC3BzB,OAAO,EAAEiC,eAAA,CAAOZ,SAAP,CAAiBrB,OAAjB,CAAyBwB,UADP;IAE3B5C,QAAQ,EAAEqD,eAAA,CAAOZ,SAAP,CAAiBzC;EAFA,CAAhB,CAZI;EAgBjBN,cAAc,EAAEgD,kBAAA,CAAUG,KAAV,CAAgB;IAC9Bb,GAAG,EAAEU,kBAAA,CAAUC,MAAV,CAAiBC,UADQ;IAE9BnB,KAAK,EAAEiB,kBAAA,CAAUC,MAAV,CAAiBC,UAFM;IAG9BlB,QAAQ,EAAEgB,kBAAA,CAAUC,MAAV,CAAiBC,UAHG;IAI9Bb,WAAW,EAAEW,kBAAA,CAAUC,MAAV,CAAiBC,UAJA;IAK9B/C,OAAO,EAAE6C,kBAAA,CAAUY;EALW,CAAhB;AAhBC,C;eAoINpE,W"}
1
+ {"version":3,"file":"index.js","names":["Progression","React","Component","constructor","props","context","handleClick","e","recommendation","stopPropagation","preventDefault","onClick","handleSelectTheme","themeFilter","onChange","bind","render","mainTitle","mainSubtitle","progressions","adaptiveAriaLabel","total","engines","loading","skin","primary","loader","style","allProgressions","map","progression","ref","coreProgression","core","themeSelect","options","selectBorder","select","recommendationSection","recommendationWrapper","title","subtitle","classnames","course","innerHTML","__html","courseTitle","cta","backgroundColor","default","headerProgression","wrapperCta","wrapperProgression","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","isRequired","shape","label","stars","number","arrayOf","EngineStars","bool","ProgressionItem","Select","func"],"sources":["../../../src/template/activity/index.js"],"sourcesContent":["import React from 'react';\nimport {get, omit, isEmpty} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Button from '../../atom/button';\nimport Select from '../../atom/select';\nimport Loader from '../../atom/loader';\nimport ProgressionItem from './progression-item';\nimport EngineStars from './engine-stars';\nimport StarsSummary from './stars-summary';\nimport style from './style.css';\n\nclass Progression extends React.Component {\n static propTypes = {\n mainTitle: PropTypes.string.isRequired,\n mainSubtitle: PropTypes.string.isRequired,\n adaptiveAriaLabel: PropTypes.string,\n total: PropTypes.shape({\n label: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired\n }).isRequired,\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)),\n loading: PropTypes.bool.isRequired,\n progressions: PropTypes.arrayOf(\n PropTypes.shape({...ProgressionItem.propTypes, ref: PropTypes.string.isRequired})\n ),\n themeFilter: PropTypes.shape({\n options: Select.propTypes.options.isRequired,\n onChange: Select.propTypes.onChange\n }),\n recommendation: PropTypes.shape({\n cta: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n courseTitle: PropTypes.string.isRequired,\n onClick: PropTypes.func\n })\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props, context) {\n super(props, context);\n this.handleClick = this.handleClick.bind(this);\n this.handleSelectTheme = this.handleSelectTheme.bind(this);\n }\n\n handleClick = e => {\n const {recommendation} = this.props;\n e.stopPropagation();\n e.preventDefault();\n const {onClick} = recommendation;\n onClick && onClick(e);\n };\n\n handleSelectTheme = e => {\n const {\n themeFilter: {onChange}\n } = this.props;\n onChange && onChange(e);\n };\n\n render() {\n const {\n mainTitle,\n mainSubtitle,\n recommendation = {},\n progressions = [],\n adaptiveAriaLabel,\n total,\n engines = [],\n themeFilter = {},\n loading\n } = this.props;\n const {skin} = this.context;\n\n const primary = get('common.primary', skin);\n const loader = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : null;\n const allProgressions = progressions.map(progression => (\n <ProgressionItem\n {...omit(['ref'], progression)}\n key={progression.ref}\n adaptiveAriaLabel={adaptiveAriaLabel}\n />\n ));\n\n const coreProgression = (\n <div data-name=\"activityCore\" className={style.core}>\n {allProgressions}\n </div>\n );\n const themeSelect = !isEmpty(themeFilter.options) ? (\n <Select\n borderClassName={style.selectBorder}\n className={style.select}\n theme=\"thematiques\"\n options={themeFilter.options}\n onChange={this.handleSelectTheme}\n />\n ) : null;\n const recommendationSection = !isEmpty(recommendation) ? (\n <div className={style.recommendationWrapper}>\n <p className={style.recommendationSection}>{recommendation.title} </p>\n <p className={style.recommendationSection}>\n <span>{recommendation.subtitle} </span>\n <span\n className={classnames(style.course, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: recommendation.courseTitle}}\n />\n </p>\n <Button\n type=\"link\"\n onClick={this.handleClick}\n submitValue={recommendation.cta}\n style={{\n backgroundColor: primary\n }}\n className={style.cta}\n />\n </div>\n ) : null;\n return (\n <div className={style.default}>\n <div data-name=\"activity-header\">\n <div className={style.mainTitle}>\n <span>{mainTitle}</span> {mainSubtitle}\n </div>\n <div className={style.headerProgression}>\n <div className={style.wrapperCta}>\n {themeSelect}\n {recommendationSection}\n </div>\n <StarsSummary engines={engines} total={total} />\n </div>\n </div>\n <div className={style.wrapperProgression} data-name=\"activityList\">\n {coreProgression}\n {loader}\n </div>\n </div>\n );\n }\n}\n\nexport default Progression;\n"],"mappings":";;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,WAAN,SAA0BC,cAAA,CAAMC,SAAhC,CAA0C;EA+BxCC,WAAW,CAACC,KAAD,EAAQC,OAAR,EAA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KAAV,CAAgB;IAC3BzB,OAAO,EAAEiC,eAAA,CAAOZ,SAAP,CAAiBrB,OAAjB,CAAyBwB,UADP;IAE3B7C,QAAQ,EAAEsD,eAAA,CAAOZ,SAAP,CAAiB1C;EAFA,CAAhB,CAbI;EAiBjBN,cAAc,EAAEiD,kBAAA,CAAUG,KAAV,CAAgB;IAC9Bb,GAAG,EAAEU,kBAAA,CAAUC,MAAV,CAAiBC,UADQ;IAE9BnB,KAAK,EAAEiB,kBAAA,CAAUC,MAAV,CAAiBC,UAFM;IAG9BlB,QAAQ,EAAEgB,kBAAA,CAAUC,MAAV,CAAiBC,UAHG;IAI9Bb,WAAW,EAAEW,kBAAA,CAAUC,MAAV,CAAiBC,UAJA;IAK9BhD,OAAO,EAAE8C,kBAAA,CAAUY;EALW,CAAhB;AAjBC,C;eA0INrE,W"}
@@ -10,6 +10,7 @@ declare namespace ProgressionItem {
10
10
  const label: PropTypes.Validator<string>;
11
11
  const level: PropTypes.Validator<string>;
12
12
  const state: PropTypes.Validator<string>;
13
+ const adaptiveAriaLabel: PropTypes.Requireable<string>;
13
14
  const type: PropTypes.Validator<string>;
14
15
  const adaptive: PropTypes.Validator<boolean>;
15
16
  const onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"progression-item.d.ts","sourceRoot":"","sources":["../../../src/template/activity/progression-item.js"],"names":[],"mappings":";AAmCA,wEAwFC"}
1
+ {"version":3,"file":"progression-item.d.ts","sourceRoot":"","sources":["../../../src/template/activity/progression-item.js"],"names":[],"mappings":";AAmCA,wEAyFC"}