@coorpacademy/components 11.6.0 → 11.7.2

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 (117) hide show
  1. package/es/atom/review-presentation/index.native.js +1 -1
  2. package/es/atom/review-presentation/index.native.js.map +1 -1
  3. package/es/atom/select/index.d.ts.map +1 -1
  4. package/es/atom/select/index.js +48 -11
  5. package/es/atom/select/index.js.map +1 -1
  6. package/es/molecule/answer/index.d.ts.map +1 -1
  7. package/es/molecule/answer/index.js +1 -9
  8. package/es/molecule/answer/index.js.map +1 -1
  9. package/es/molecule/empty-state-dashboard/index.d.ts +23 -0
  10. package/es/molecule/empty-state-dashboard/index.d.ts.map +1 -0
  11. package/es/molecule/empty-state-dashboard/index.js +31 -0
  12. package/es/molecule/empty-state-dashboard/index.js.map +1 -0
  13. package/es/molecule/empty-state-dashboard/style.css +55 -0
  14. package/es/molecule/empty-state-dashboard/types.d.ts +19 -0
  15. package/es/molecule/empty-state-dashboard/types.d.ts.map +1 -0
  16. package/es/molecule/empty-state-dashboard/types.js +19 -0
  17. package/es/molecule/empty-state-dashboard/types.js.map +1 -0
  18. package/es/organism/list-item/index.d.ts +8 -6
  19. package/es/organism/list-item/index.d.ts.map +1 -1
  20. package/es/organism/list-item/index.js +16 -2
  21. package/es/organism/list-item/index.js.map +1 -1
  22. package/es/organism/list-item/style.css +18 -0
  23. package/es/organism/list-items/index.d.ts +2 -0
  24. package/es/organism/list-items/index.js +5 -1
  25. package/es/organism/list-items/index.js.map +1 -1
  26. package/es/organism/review-header/index.native.d.ts.map +1 -1
  27. package/es/organism/review-header/index.native.js +8 -7
  28. package/es/organism/review-header/index.native.js.map +1 -1
  29. package/es/template/activity/index.d.ts +36 -40
  30. package/es/template/activity/index.d.ts.map +1 -1
  31. package/es/template/activity/index.js +89 -111
  32. package/es/template/activity/index.js.map +1 -1
  33. package/es/template/activity/stars-summary.d.ts +9 -18
  34. package/es/template/activity/stars-summary.d.ts.map +1 -1
  35. package/es/template/activity/stars-summary.js +94 -122
  36. package/es/template/activity/stars-summary.js.map +1 -1
  37. package/es/template/back-office/brand-update/index.d.ts +20 -0
  38. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  39. package/es/template/back-office/brand-update/index.js +12 -3
  40. package/es/template/back-office/brand-update/index.js.map +1 -1
  41. package/es/template/back-office/brand-update/style.css +5 -1
  42. package/es/util/button-icons.d.ts +1 -0
  43. package/es/util/button-icons.d.ts.map +1 -1
  44. package/es/util/button-icons.js +3 -2
  45. package/es/util/button-icons.js.map +1 -1
  46. package/lib/atom/review-presentation/index.native.js +1 -1
  47. package/lib/atom/review-presentation/index.native.js.map +1 -1
  48. package/lib/atom/select/index.d.ts.map +1 -1
  49. package/lib/atom/select/index.js +46 -9
  50. package/lib/atom/select/index.js.map +1 -1
  51. package/lib/molecule/answer/index.d.ts.map +1 -1
  52. package/lib/molecule/answer/index.js +1 -10
  53. package/lib/molecule/answer/index.js.map +1 -1
  54. package/lib/molecule/empty-state-dashboard/index.d.ts +23 -0
  55. package/lib/molecule/empty-state-dashboard/index.d.ts.map +1 -0
  56. package/lib/molecule/empty-state-dashboard/index.js +42 -0
  57. package/lib/molecule/empty-state-dashboard/index.js.map +1 -0
  58. package/lib/molecule/empty-state-dashboard/style.css +55 -0
  59. package/lib/molecule/empty-state-dashboard/types.d.ts +19 -0
  60. package/lib/molecule/empty-state-dashboard/types.d.ts.map +1 -0
  61. package/lib/molecule/empty-state-dashboard/types.js +29 -0
  62. package/lib/molecule/empty-state-dashboard/types.js.map +1 -0
  63. package/lib/organism/list-item/index.d.ts +8 -6
  64. package/lib/organism/list-item/index.d.ts.map +1 -1
  65. package/lib/organism/list-item/index.js +16 -2
  66. package/lib/organism/list-item/index.js.map +1 -1
  67. package/lib/organism/list-item/style.css +18 -0
  68. package/lib/organism/list-items/index.d.ts +2 -0
  69. package/lib/organism/list-items/index.js +5 -1
  70. package/lib/organism/list-items/index.js.map +1 -1
  71. package/lib/organism/review-header/index.native.d.ts.map +1 -1
  72. package/lib/organism/review-header/index.native.js +8 -7
  73. package/lib/organism/review-header/index.native.js.map +1 -1
  74. package/lib/template/activity/index.d.ts +36 -40
  75. package/lib/template/activity/index.d.ts.map +1 -1
  76. package/lib/template/activity/index.js +95 -110
  77. package/lib/template/activity/index.js.map +1 -1
  78. package/lib/template/activity/stars-summary.d.ts +9 -18
  79. package/lib/template/activity/stars-summary.d.ts.map +1 -1
  80. package/lib/template/activity/stars-summary.js +90 -119
  81. package/lib/template/activity/stars-summary.js.map +1 -1
  82. package/lib/template/back-office/brand-update/index.d.ts +20 -0
  83. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  84. package/lib/template/back-office/brand-update/index.js +13 -3
  85. package/lib/template/back-office/brand-update/index.js.map +1 -1
  86. package/lib/template/back-office/brand-update/style.css +5 -1
  87. package/lib/util/button-icons.d.ts +1 -0
  88. package/lib/util/button-icons.d.ts.map +1 -1
  89. package/lib/util/button-icons.js +2 -1
  90. package/lib/util/button-icons.js.map +1 -1
  91. package/locales/bs/global.json +8 -1
  92. package/locales/cs/global.json +8 -1
  93. package/locales/de/global.json +8 -1
  94. package/locales/en/global.json +0 -1
  95. package/locales/es/global.json +8 -1
  96. package/locales/et/global.json +8 -1
  97. package/locales/fr/global.json +0 -1
  98. package/locales/hr/global.json +8 -1
  99. package/locales/hu/global.json +8 -1
  100. package/locales/hy/global.json +0 -1
  101. package/locales/it/global.json +8 -1
  102. package/locales/ja/global.json +8 -1
  103. package/locales/ko/global.json +8 -1
  104. package/locales/nl/global.json +8 -1
  105. package/locales/pl/global.json +8 -1
  106. package/locales/pt/global.json +8 -1
  107. package/locales/ro/global.json +8 -1
  108. package/locales/ru/global.json +0 -1
  109. package/locales/sk/global.json +8 -1
  110. package/locales/tl/global.json +8 -1
  111. package/locales/tr/global.json +8 -1
  112. package/locales/uk/global.json +8 -1
  113. package/locales/vi/global.json +8 -1
  114. package/locales/zh/global.json +8 -1
  115. package/locales/zh_TW/global.json +8 -1
  116. package/package.json +2 -2
  117. package/locales/.mtslconfig.json +0 -1
@@ -20,16 +20,20 @@ var _style = _interopRequireDefault(require("./style.css"));
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
22
  const ListItem = props => {
23
+ let isPublished = false;
23
24
  const {
24
25
  bulletPointMenuButton,
25
26
  buttonLink,
26
27
  tags,
27
- title
28
+ title,
29
+ order,
30
+ 'aria-label': ariaLabel
28
31
  } = props;
29
32
 
30
33
  const tagsView = _map2.default.convert({
31
34
  cap: false
32
35
  })((tag, index) => {
36
+ isPublished = tag.type === 'published';
33
37
  return /*#__PURE__*/_react.default.createElement("div", {
34
38
  key: index,
35
39
  className: _style.default.tag
@@ -38,7 +42,15 @@ const ListItem = props => {
38
42
 
39
43
  return /*#__PURE__*/_react.default.createElement("div", {
40
44
  className: _style.default.wrapper
45
+ }, isPublished ? /*#__PURE__*/_react.default.createElement("div", {
46
+ className: _style.default.orderWrapper
41
47
  }, /*#__PURE__*/_react.default.createElement("div", {
48
+ className: _style.default.order,
49
+ "aria-label": ariaLabel
50
+ }, order + 1), /*#__PURE__*/_react.default.createElement("div", {
51
+ className: _style.default.title,
52
+ title: title
53
+ }, title)) : /*#__PURE__*/_react.default.createElement("div", {
42
54
  className: _style.default.title,
43
55
  title: title
44
56
  }, title), /*#__PURE__*/_react.default.createElement("div", {
@@ -75,7 +87,9 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
75
87
  label: _propTypes.default.string,
76
88
  type: _propTypes.default.oneOf(['published', 'draft', 'archived', 'revised', 'default'])
77
89
  })),
78
- title: _propTypes.default.string.isRequired
90
+ title: _propTypes.default.string.isRequired,
91
+ order: _propTypes.default.number,
92
+ 'aria-label': _propTypes.default.string
79
93
  } : {};
80
94
  var _default = ListItem;
81
95
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItem","props","bulletPointMenuButton","buttonLink","tags","title","tagsView","convert","cap","tag","index","style","wrapper","settings","edit","propTypes","PropTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","type","onClick","func","ariaLabel","dataName","icon","position","oneOf","isRequired"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n const {bulletPointMenuButton, buttonLink, tags, title} = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n <div className={style.title} title={title}>\n {title}\n </div>\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired\n};\n\nexport default ListItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACx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1BO,IAAI,EAAER,kBAAA,CAAUG,MADU;IAE1BI,KAAK,EAAEP,kBAAA,CAAUG,MAFS;IAG1BQ,SAAS,EAAEX,kBAAA,CAAUG,MAHK;IAI1BS,QAAQ,EAAEZ,kBAAA,CAAUG,MAJM;IAK1BU,IAAI,EAAEb,kBAAA,CAAUC,KAAV,CAAgB;MACpBa,QAAQ,EAAEd,kBAAA,CAAUG,MADA;MAEpBK,IAAI,EAAER,kBAAA,CAAUG;IAFI,CAAhB,CALoB;IAS1BM,OAAO,EAAET,kBAAA,CAAUU;EATO,CAAhB,CAdO;EAyBnBtB,IAAI,EAAEY,kBAAA,CAAUM,OAAV,CACJN,kBAAA,CAAUC,KAAV,CAAgB;IACdM,KAAK,EAAEP,kBAAA,CAAUG,MADH;IAEdK,IAAI,EAAER,kBAAA,CAAUe,KAAV,CAAgB,CAAC,WAAD,EAAc,OAAd,EAAuB,UAAvB,EAAmC,SAAnC,EAA8C,SAA9C,CAAhB;EAFQ,CAAhB,CADI,CAzBa;EA+BnB1B,KAAK,EAAEW,kBAAA,CAAUG,MAAV,CAAiBa;AA/BL,CAArB;eAkCehC,Q"}
1
+ {"version":3,"file":"index.js","names":["ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","tagsView","convert","cap","tag","index","type","style","wrapper","orderWrapper","settings","edit","propTypes","PropTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {bulletPointMenuButton, buttonLink, tags, title, order, 'aria-label': ariaLabel} = props;\n\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished ? (\n <div className={style.orderWrapper}>\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n <div className={style.title} title={title}>\n {title}\n </div>\n </div>\n ) : (\n <div className={style.title} title={title}>\n {title}\n </div>\n )}\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired,\n order: PropTypes.number,\n 'aria-label': PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,IAAIC,WAAW,GAAG,KAAlB;EACA,MAAM;IAACC,qBAAD;IAAwBC,UAAxB;IAAoCC,IAApC;IAA0CC,KAA1C;IAAiDC,KAAjD;IAAwD,cAAcC;EAAtE,IAAmFP,KAAzF;;EAEA,MAAMQ,QAAQ,GAAG,cAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;E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O,EAAER,kBAAA,CAAUS;IAJL,CAAhB,CADO,CAH4B;IAWrCD,OAAO,EAAER,kBAAA,CAAUS;EAXkB,CAAhB,CADJ;EAcnB1B,UAAU,EAAEiB,kBAAA,CAAUC,KAAV,CAAgB;IAC1BR,IAAI,EAAEO,kBAAA,CAAUG,MADU;IAE1BI,KAAK,EAAEP,kBAAA,CAAUG,MAFS;IAG1BhB,SAAS,EAAEa,kBAAA,CAAUG,MAHK;IAI1BO,QAAQ,EAAEV,kBAAA,CAAUG,MAJM;IAK1BQ,IAAI,EAAEX,kBAAA,CAAUC,KAAV,CAAgB;MACpBW,QAAQ,EAAEZ,kBAAA,CAAUG,MADA;MAEpBV,IAAI,EAAEO,kBAAA,CAAUG;IAFI,CAAhB,CALoB;IAS1BK,OAAO,EAAER,kBAAA,CAAUS;EATO,CAAhB,CAdO;EAyBnBzB,IAAI,EAAEgB,kBAAA,CAAUM,OAAV,CACJN,kBAAA,CAAUC,KAAV,CAAgB;IACdM,KAAK,EAAEP,kBAAA,CAAUG,MADH;IAEdV,IAAI,EAAEO,kBAAA,CAAUa,KAAV,CAAgB,CAAC,WAAD,EAAc,OAAd,EAAuB,UAAvB,EAAmC,SAAnC,EAA8C,SAA9C,CAAhB;EAFQ,CAAhB,CADI,CAzBa;EA+BnB5B,KAAK,EAAEe,kBAAA,CAAUG,MAAV,CAAiBW,UA/BL;EAgCnB5B,KAAK,EAAEc,kBAAA,CAAUe,MAhCE;EAiCnB,cAAcf,kBAAA,CAAUG;AAjCL,CAArB;eAoCexB,Q"}
@@ -4,6 +4,7 @@
4
4
  @value xtraLightGrey from colors;
5
5
  @value cm_grey_900 from colors;
6
6
  @value primaryAdd1 from colors;
7
+ @value cm_grey_400 from colors;
7
8
 
8
9
  .wrapper {
9
10
  align-items: center;
@@ -51,3 +52,20 @@
51
52
  margin: 0 16px 0 0;
52
53
  min-width: 93px;
53
54
  }
55
+
56
+ .order {
57
+ width: 6px;
58
+ height: 20px;
59
+ font-family: 'Gilroy';
60
+ font-style: normal;
61
+ font-weight: 600;
62
+ font-size: 14px;
63
+ line-height: 20px;
64
+ color: cm_grey_400;
65
+ margin: 0 16px 0 0;
66
+ }
67
+ .orderWrapper {
68
+ align-items: center;
69
+ display: flex;
70
+ width: 100%;
71
+ }
@@ -56,6 +56,8 @@ declare namespace ListItems {
56
56
  type: PropTypes.Requireable<string>;
57
57
  }> | null | undefined)[]>;
58
58
  title: PropTypes.Validator<string>;
59
+ order: PropTypes.Requireable<number>;
60
+ 'aria-label': PropTypes.Requireable<string>;
59
61
  }> | null | undefined)[]>;
60
62
  title: PropTypes.Requireable<string>;
61
63
  };
@@ -17,6 +17,8 @@ var _style = _interopRequireDefault(require("./style.css"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
+ 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); }
21
+
20
22
  const ListItems = ({
21
23
  title,
22
24
  buttonLink,
@@ -27,7 +29,9 @@ const ListItems = ({
27
29
  key: item.id,
28
30
  className: _style.default.item,
29
31
  "data-name": `content-${index}`
30
- }, /*#__PURE__*/_react.default.createElement(_listItem.default, item)));
32
+ }, /*#__PURE__*/_react.default.createElement(_listItem.default, _extends({}, item, {
33
+ order: index
34
+ }))));
31
35
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
32
36
  className: _style.default.header
33
37
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItems","title","buttonLink","items","ariaLabel","itemsView","map","item","index","id","style","header","buttonCreate","list","propTypes","PropTypes","string","shape","ButtonLink","arrayOf","ListItem"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel}) => {\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} />\n </li>\n ));\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string\n};\n\nexport default ListItems;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC,KAAD;EAAQC,UAAR;EAAoBC,KAApB;EAA2B,cAAcC;AAAzC,CAAD,KAAyD;EACzE,MAAMC,SAAS,GAAGF,KAAK,CAACG,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,kBAC1B;IAAI,GAAG,EAAED,IAAI,CAACE,EAAd;IAAkB,SAAS,EAAEC,cAAA,CAAMH,IAAnC;IAAyC,aAAY,WAAUC,KAAM;EAArE,gBACE,6BAAC,iBAAD,EAAcD,IAAd,CADF,CADgB,CAAlB;EAMA,oBACE,uDACE;IAAK,SAAS,EAAEG,cAAA,CAAMC;EAAtB,gBACE;IAAK,SAAS,EAAED,cAAA,CAAMT;EAAtB,gBACE,6BAAC,cAAD;IAAO,KAAK,EAAEA,KAAd;IAAqB,IAAI,EAAE,YAA3B;IAAyC,aAAW;EAApD,EADF,CADF,eAIE;IAAK,SAAS,EAAES,cAAA,CAAME;EAAtB,gBACE,6BAAC,mBAAD,EAAgBV,UAAhB,CADF,CAJF,CADF,eASE;IAAI,SAAS,EAAEQ,cAAA,CAAMG,IAArB;IAA2B,cAAYT,SAAvC;IAAkD,aAAW;EAA7D,GACGC,SADH,CATF,CADF;AAeD,CAtBD;;AAwBAL,SAAS,CAACc,SAAV,2CAAsB;EACpB,cAAcC,kBAAA,CAAUC,MADJ;EAEpBd,UAAU,EAAEa,kBAAA,CAAUE,KAAV,CAAgBC,mBAAA,CAAWJ,SAA3B,CAFQ;EAGpBX,KAAK,EAAEY,kBAAA,CAAUI,OAAV,CAAkBJ,kBAAA,CAAUE,KAAV,CAAgBG,iBAAA,CAASN,SAAzB,CAAlB,CAHa;EAIpBb,KAAK,EAAEc,kBAAA,CAAUC;AAJG,CAAtB;eAOehB,S"}
1
+ {"version":3,"file":"index.js","names":["ListItems","title","buttonLink","items","ariaLabel","itemsView","map","item","index","id","style","header","buttonCreate","list","propTypes","PropTypes","string","shape","ButtonLink","arrayOf","ListItem"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel}) => {\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} />\n </li>\n ));\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string\n};\n\nexport default ListItems;\n"],"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../../../src/organism/review-header/index.native.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAqCpC,QAAA,MAAM,YAAY,UAAW,WAAW,gBAqBvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/organism/review-header/index.native.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAsCpC,QAAA,MAAM,YAAY,UAAW,WAAW,gBAqBvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -22,7 +22,8 @@ const style = _reactNative.StyleSheet.create({
22
22
  flexDirection: 'row',
23
23
  justifyContent: 'center',
24
24
  alignItems: 'center',
25
- alignContent: 'center'
25
+ alignContent: 'center',
26
+ width: '100%'
26
27
  },
27
28
  header: {
28
29
  width: '80%',
@@ -30,14 +31,14 @@ const style = _reactNative.StyleSheet.create({
30
31
  alignItems: 'center',
31
32
  justifyContent: 'center',
32
33
  height: 70,
33
- paddingTop: 25
34
+ paddingTop: 8
34
35
  },
35
- iconContainer: {
36
+ touchArea: {
36
37
  position: 'absolute',
37
- right: 5,
38
- bottom: 10,
38
+ right: 24,
39
39
  borderRadius: 12,
40
- padding: 5
40
+ paddingTop: 16,
41
+ padding: 8
41
42
  },
42
43
  icon: {
43
44
  width: 12,
@@ -57,7 +58,7 @@ const ReviewHeader = props => {
57
58
  }, steps.map(step => /*#__PURE__*/_react.default.createElement(_index.default, _extends({}, step, {
58
59
  key: step.value
59
60
  })))), /*#__PURE__*/_react.default.createElement(_index2.default, {
60
- style: style.iconContainer,
61
+ style: style.touchArea,
61
62
  isHighlight: true,
62
63
  onPress: onQuitClick,
63
64
  accessibilityLabel: "open-popin-button",
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["style","StyleSheet","create","container","flexDirection","justifyContent","alignItems","alignContent","header","width","height","paddingTop","iconContainer","position","right","bottom","borderRadius","padding","icon","ReviewHeader","props","steps","onQuitClick","map","step","value"],"sources":["../../../src/organism/review-header/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {StyleSheet, View, ViewStyle} from 'react-native';\nimport {NovaSolidStatusClose as CloseIcon} from '@coorpacademy/nova-icons';\nimport Step from '../../atom/review-header-step-item/index.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {HeaderProps} from './types';\n\ntype StyleSheetType = {\n container: ViewStyle;\n header: ViewStyle;\n iconContainer: ViewStyle;\n icon: ViewStyle;\n};\n\nconst style: StyleSheetType = StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n alignContent: 'center'\n },\n header: {\n width: '80%',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n height: 70,\n paddingTop: 25\n },\n iconContainer: {\n position: 'absolute',\n right: 5,\n bottom: 10,\n borderRadius: 12,\n padding: 5\n },\n icon: {\n width: 12,\n height: 12\n }\n});\n\nconst ReviewHeader = (props: HeaderProps) => {\n const {steps, onQuitClick} = props;\n\n return (\n <View style={style.container}>\n <View style={style.header}>\n {steps.map(step => (\n <Step {...step} key={step.value} />\n ))}\n </View>\n <Touchable\n style={style.iconContainer}\n isHighlight\n onPress={onQuitClick}\n accessibilityLabel=\"open-popin-button\"\n testID=\"open-popin-button\"\n >\n <CloseIcon style={style.icon} color=\"#06265B\" />\n </Touchable>\n </View>\n );\n};\n\nexport default ReviewHeader;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAUA,MAAMA,KAAqB,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC9CC,SAAS,EAAE;IACTC,aAAa,EAAE,KADN;IAETC,cAAc,EAAE,QAFP;IAGTC,UAAU,EAAE,QAHH;IAITC,YAAY,EAAE;EAJL,CADmC;EAO9CC,MAAM,EAAE;IACNC,KAAK,EAAE,KADD;IAENL,aAAa,EAAE,KAFT;IAGNE,UAAU,EAAE,QAHN;IAIND,cAAc,EAAE,QAJV;IAKNK,MAAM,EAAE,EALF;IAMNC,UAAU,EAAE;EANN,CAPsC;EAe9CC,aAAa,EAAE;IACbC,QAAQ,EAAE,UADG;IAEbC,KAAK,EAAE,CAFM;IAGbC,MAAM,EAAE,EAHK;IAIbC,YAAY,EAAE,EAJD;IAKbC,OAAO,EAAE;EALI,CAf+B;EAsB9CC,IAAI,EAAE;IACJT,KAAK,EAAE,EADH;IAEJC,MAAM,EAAE;EAFJ;AAtBwC,CAAlB,CAA9B;;AA4BA,MAAMS,YAAY,GAAIC,KAAD,IAAwB;EAC3C,MAAM;IAACC,KAAD;IAAQC;EAAR,IAAuBF,KAA7B;EAEA,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEpB,KAAK,CAACG;EAAnB,gBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEH,KAAK,CAACQ;EAAnB,GACGa,KAAK,CAACE,GAAN,CAAUC,IAAI,iBACb,6BAAC,cAAD,eAAUA,IAAV;IAAgB,GAAG,EAAEA,IAAI,CAACC;EAA1B,GADD,CADH,CADF,eAME,6BAAC,eAAD;IACE,KAAK,EAAEzB,KAAK,CAACY,aADf;IAEE,WAAW,MAFb;IAGE,OAAO,EAAEU,WAHX;IAIE,kBAAkB,EAAC,mBAJrB;IAKE,MAAM,EAAC;EALT,gBAOE,6BAAC,+BAAD;IAAW,KAAK,EAAEtB,KAAK,CAACkB,IAAxB;IAA8B,KAAK,EAAC;EAApC,EAPF,CANF,CADF;AAkBD,CArBD;;eAuBeC,Y"}
1
+ {"version":3,"file":"index.native.js","names":["style","StyleSheet","create","container","flexDirection","justifyContent","alignItems","alignContent","width","header","height","paddingTop","touchArea","position","right","borderRadius","padding","icon","ReviewHeader","props","steps","onQuitClick","map","step","value"],"sources":["../../../src/organism/review-header/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {StyleSheet, View, ViewStyle} from 'react-native';\nimport {NovaSolidStatusClose as CloseIcon} from '@coorpacademy/nova-icons';\nimport Step from '../../atom/review-header-step-item/index.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {HeaderProps} from './types';\n\ntype StyleSheetType = {\n container: ViewStyle;\n header: ViewStyle;\n touchArea: ViewStyle;\n icon: ViewStyle;\n};\n\nconst style: StyleSheetType = StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n alignContent: 'center',\n width: '100%'\n },\n header: {\n width: '80%',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n height: 70,\n paddingTop: 8\n },\n touchArea: {\n position: 'absolute',\n right: 24,\n borderRadius: 12,\n paddingTop: 16,\n padding: 8\n },\n icon: {\n width: 12,\n height: 12\n }\n});\n\nconst ReviewHeader = (props: HeaderProps) => {\n const {steps, onQuitClick} = props;\n\n return (\n <View style={style.container}>\n <View style={style.header}>\n {steps.map(step => (\n <Step {...step} key={step.value} />\n ))}\n </View>\n <Touchable\n style={style.touchArea}\n isHighlight\n onPress={onQuitClick}\n accessibilityLabel=\"open-popin-button\"\n testID=\"open-popin-button\"\n >\n <CloseIcon style={style.icon} color=\"#06265B\" />\n </Touchable>\n </View>\n );\n};\n\nexport default ReviewHeader;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAUA,MAAMA,KAAqB,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC9CC,SAAS,EAAE;IACTC,aAAa,EAAE,KADN;IAETC,cAAc,EAAE,QAFP;IAGTC,UAAU,EAAE,QAHH;IAITC,YAAY,EAAE,QAJL;IAKTC,KAAK,EAAE;EALE,CADmC;EAQ9CC,MAAM,EAAE;IACND,KAAK,EAAE,KADD;IAENJ,aAAa,EAAE,KAFT;IAGNE,UAAU,EAAE,QAHN;IAIND,cAAc,EAAE,QAJV;IAKNK,MAAM,EAAE,EALF;IAMNC,UAAU,EAAE;EANN,CARsC;EAgB9CC,SAAS,EAAE;IACTC,QAAQ,EAAE,UADD;IAETC,KAAK,EAAE,EAFE;IAGTC,YAAY,EAAE,EAHL;IAITJ,UAAU,EAAE,EAJH;IAKTK,OAAO,EAAE;EALA,CAhBmC;EAuB9CC,IAAI,EAAE;IACJT,KAAK,EAAE,EADH;IAEJE,MAAM,EAAE;EAFJ;AAvBwC,CAAlB,CAA9B;;AA6BA,MAAMQ,YAAY,GAAIC,KAAD,IAAwB;EAC3C,MAAM;IAACC,KAAD;IAAQC;EAAR,IAAuBF,KAA7B;EAEA,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEnB,KAAK,CAACG;EAAnB,gBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEH,KAAK,CAACS;EAAnB,GACGW,KAAK,CAACE,GAAN,CAAUC,IAAI,iBACb,6BAAC,cAAD,eAAUA,IAAV;IAAgB,GAAG,EAAEA,IAAI,CAACC;EAA1B,GADD,CADH,CADF,eAME,6BAAC,eAAD;IACE,KAAK,EAAExB,KAAK,CAACY,SADf;IAEE,WAAW,MAFb;IAGE,OAAO,EAAES,WAHX;IAIE,kBAAkB,EAAC,mBAJrB;IAKE,MAAM,EAAC;EALT,gBAOE,6BAAC,+BAAD;IAAW,KAAK,EAAErB,KAAK,CAACiB,IAAxB;IAA8B,KAAK,EAAC;EAApC,EAPF,CANF,CADF;AAkBD,CArBD;;eAuBeC,Y"}
@@ -1,14 +1,38 @@
1
1
  export default Progression;
2
- declare class Progression extends React.Component<any, any, any> {
3
- static propTypes: {
4
- mainTitle: PropTypes.Validator<string>;
5
- mainSubtitle: PropTypes.Validator<string>;
6
- adaptiveAriaLabel: PropTypes.Requireable<string>;
7
- total: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
2
+ declare function Progression(props: any, legacyContext: any): JSX.Element;
3
+ declare namespace Progression {
4
+ namespace contextTypes {
5
+ const skin: PropTypes.Requireable<PropTypes.InferProps<{
6
+ common: PropTypes.Requireable<{
7
+ [x: string]: any;
8
+ }>;
9
+ images: PropTypes.Requireable<PropTypes.InferProps<{
10
+ 'logo-mobile': PropTypes.Requireable<any>;
11
+ logo: PropTypes.Requireable<any>;
12
+ 'logo-email': PropTypes.Requireable<any>;
13
+ login: PropTypes.Requireable<any>;
14
+ }>>;
15
+ icons: PropTypes.Requireable<{
16
+ [x: string]: any;
17
+ }>;
18
+ mod: PropTypes.Requireable<{
19
+ [x: string]: any;
20
+ }>;
21
+ courses: PropTypes.Requireable<any[]>;
22
+ texts: PropTypes.Requireable<{
23
+ [x: string]: any;
24
+ }>;
25
+ }>>;
26
+ }
27
+ namespace propTypes {
28
+ const mainTitle: PropTypes.Validator<string>;
29
+ const mainSubtitle: PropTypes.Validator<string>;
30
+ const adaptiveAriaLabel: PropTypes.Requireable<string>;
31
+ const total: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
8
32
  label: PropTypes.Validator<string>;
9
33
  stars: PropTypes.Validator<number>;
10
34
  }>>>;
11
- engines: PropTypes.Requireable<(PropTypes.InferProps<{
35
+ const engines: PropTypes.Requireable<(PropTypes.InferProps<{
12
36
  type: PropTypes.Validator<string>;
13
37
  stars: PropTypes.Validator<number>;
14
38
  title: PropTypes.Validator<string>;
@@ -22,8 +46,8 @@ declare class Progression extends React.Component<any, any, any> {
22
46
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
23
47
  }>>;
24
48
  }> | null | undefined)[]>;
25
- loading: PropTypes.Validator<boolean>;
26
- progressions: PropTypes.Requireable<(PropTypes.InferProps<{
49
+ const loading: PropTypes.Validator<boolean>;
50
+ const progressions: PropTypes.Requireable<(PropTypes.InferProps<{
27
51
  ref: PropTypes.Validator<string>;
28
52
  completion: PropTypes.Validator<number>;
29
53
  stars: PropTypes.Validator<number>;
@@ -38,7 +62,7 @@ declare class Progression extends React.Component<any, any, any> {
38
62
  adaptive: PropTypes.Validator<boolean>;
39
63
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
40
64
  }> | null | undefined)[]>;
41
- themeFilter: PropTypes.Requireable<PropTypes.InferProps<{
65
+ const themeFilter: PropTypes.Requireable<PropTypes.InferProps<{
42
66
  options: PropTypes.Validator<(PropTypes.InferProps<{
43
67
  name: PropTypes.Validator<string>;
44
68
  value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
@@ -47,42 +71,14 @@ declare class Progression extends React.Component<any, any, any> {
47
71
  }> | null | undefined)[]>;
48
72
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
49
73
  }>>;
50
- recommendation: PropTypes.Requireable<PropTypes.InferProps<{
74
+ const recommendation: PropTypes.Requireable<PropTypes.InferProps<{
51
75
  cta: PropTypes.Validator<string>;
52
76
  title: PropTypes.Validator<string>;
53
77
  subtitle: PropTypes.Validator<string>;
54
78
  courseTitle: PropTypes.Validator<string>;
55
79
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
56
80
  }>>;
57
- };
58
- static contextTypes: {
59
- skin: PropTypes.Requireable<PropTypes.InferProps<{
60
- common: PropTypes.Requireable<{
61
- [x: string]: any;
62
- }>;
63
- images: PropTypes.Requireable<PropTypes.InferProps<{
64
- 'logo-mobile': PropTypes.Requireable<any>;
65
- logo: PropTypes.Requireable<any>;
66
- 'logo-email': PropTypes.Requireable<any>;
67
- login: PropTypes.Requireable<any>;
68
- }>>;
69
- icons: PropTypes.Requireable<{
70
- [x: string]: any;
71
- }>;
72
- mod: PropTypes.Requireable<{
73
- [x: string]: any;
74
- }>;
75
- courses: PropTypes.Requireable<any[]>;
76
- texts: PropTypes.Requireable<{
77
- [x: string]: any;
78
- }>;
79
- }>>;
80
- };
81
- constructor(props: any, context: any);
82
- handleClick: (e: any) => void;
83
- handleSelectTheme: (e: any) => void;
84
- render(): JSX.Element;
81
+ }
85
82
  }
86
- import React from "react";
87
83
  import PropTypes from "prop-types";
88
84
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/activity/index.js"],"names":[],"mappings":";AAeA,0EAuGC"}
@@ -3,19 +3,19 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
 
6
- var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
6
+ var _react = _interopRequireWildcard(require("react"));
7
7
 
8
- var _omit2 = _interopRequireDefault(require("lodash/fp/omit"));
8
+ var _get = _interopRequireDefault(require("lodash/fp/get"));
9
9
 
10
- var _get2 = _interopRequireDefault(require("lodash/fp/get"));
10
+ var _isEmpty = _interopRequireDefault(require("lodash/fp/isEmpty"));
11
11
 
12
- var _react = _interopRequireDefault(require("react"));
12
+ var _omit = _interopRequireDefault(require("lodash/fp/omit"));
13
13
 
14
14
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
15
 
16
16
  var _classnames = _interopRequireDefault(require("classnames"));
17
17
 
18
- var _provider = _interopRequireDefault(require("../../atom/provider"));
18
+ var _provider = _interopRequireWildcard(require("../../atom/provider"));
19
19
 
20
20
  var _button = _interopRequireDefault(require("../../atom/button"));
21
21
 
@@ -33,114 +33,99 @@ var _style = _interopRequireDefault(require("./style.css"));
33
33
 
34
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
35
 
36
+ 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); }
37
+
38
+ 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; }
39
+
36
40
  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); }
37
41
 
38
- class Progression extends _react.default.Component {
39
- constructor(props, context) {
40
- super(props, context);
41
-
42
- this.handleClick = e => {
43
- const {
44
- recommendation
45
- } = this.props;
46
- e.stopPropagation();
47
- e.preventDefault();
48
- const {
49
- onClick
50
- } = recommendation;
51
- onClick && onClick(e);
52
- };
53
-
54
- this.handleSelectTheme = e => {
55
- const {
56
- themeFilter: {
57
- onChange
58
- }
59
- } = this.props;
60
- onChange && onChange(e);
61
- };
62
-
63
- this.handleClick = this.handleClick.bind(this);
64
- this.handleSelectTheme = this.handleSelectTheme.bind(this);
65
- }
66
-
67
- render() {
42
+ const Progression = (props, legacyContext) => {
43
+ const {
44
+ mainTitle,
45
+ mainSubtitle,
46
+ recommendation = {},
47
+ progressions = [],
48
+ adaptiveAriaLabel,
49
+ total,
50
+ engines = [],
51
+ themeFilter = {},
52
+ loading
53
+ } = props;
54
+ const skin = (0, _provider.GetSkinFromContext)(legacyContext);
55
+ const {
56
+ onChange: themeFilterOnChange
57
+ } = themeFilter;
58
+ const handleClick = (0, _react.useCallback)(e => {
59
+ e.stopPropagation();
60
+ e.preventDefault();
68
61
  const {
69
- mainTitle,
70
- mainSubtitle,
71
- recommendation = {},
72
- progressions = [],
73
- adaptiveAriaLabel,
74
- total,
75
- engines = [],
76
- themeFilter = {},
77
- loading
78
- } = this.props;
79
- const {
80
- skin
81
- } = this.context;
82
- const primary = (0, _get2.default)('common.primary', skin);
83
- const loader = loading ? /*#__PURE__*/_react.default.createElement("div", {
84
- className: _style.default.loader
85
- }, /*#__PURE__*/_react.default.createElement(_loader.default, null)) : null;
86
- const allProgressions = progressions.map(progression => /*#__PURE__*/_react.default.createElement(_progressionItem.default, _extends({}, (0, _omit2.default)(['ref'], progression), {
87
- key: progression.ref,
88
- adaptiveAriaLabel: adaptiveAriaLabel
89
- })));
90
-
91
- const coreProgression = /*#__PURE__*/_react.default.createElement("div", {
92
- "data-name": "activityCore",
93
- className: _style.default.core
94
- }, allProgressions);
95
-
96
- const themeSelect = !(0, _isEmpty2.default)(themeFilter.options) ? /*#__PURE__*/_react.default.createElement(_select.default, {
97
- borderClassName: _style.default.selectBorder,
98
- className: _style.default.select,
99
- theme: "thematiques",
100
- options: themeFilter.options,
101
- onChange: this.handleSelectTheme
102
- }) : null;
103
- const recommendationSection = !(0, _isEmpty2.default)(recommendation) ? /*#__PURE__*/_react.default.createElement("div", {
104
- className: _style.default.recommendationWrapper
105
- }, /*#__PURE__*/_react.default.createElement("p", {
106
- className: _style.default.recommendationSection
107
- }, recommendation.title, " "), /*#__PURE__*/_react.default.createElement("p", {
108
- className: _style.default.recommendationSection
109
- }, /*#__PURE__*/_react.default.createElement("span", null, recommendation.subtitle, " "), /*#__PURE__*/_react.default.createElement("span", {
110
- className: (0, _classnames.default)(_style.default.course, _style.default.innerHTML) // eslint-disable-next-line react/no-danger
111
- ,
112
- dangerouslySetInnerHTML: {
113
- __html: recommendation.courseTitle
114
- }
115
- })), /*#__PURE__*/_react.default.createElement(_button.default, {
116
- type: "link",
117
- onClick: this.handleClick,
118
- submitValue: recommendation.cta,
119
- style: {
120
- backgroundColor: primary
121
- },
122
- className: _style.default.cta
123
- })) : null;
124
- return /*#__PURE__*/_react.default.createElement("div", {
125
- className: _style.default.default
126
- }, /*#__PURE__*/_react.default.createElement("div", {
127
- "data-name": "activity-header"
128
- }, /*#__PURE__*/_react.default.createElement("div", {
129
- className: _style.default.mainTitle
130
- }, /*#__PURE__*/_react.default.createElement("span", null, mainTitle), " ", mainSubtitle), /*#__PURE__*/_react.default.createElement("div", {
131
- className: _style.default.headerProgression
132
- }, /*#__PURE__*/_react.default.createElement("div", {
133
- className: _style.default.wrapperCta
134
- }, themeSelect, recommendationSection), /*#__PURE__*/_react.default.createElement(_starsSummary.default, {
135
- engines: engines,
136
- total: total
137
- }))), /*#__PURE__*/_react.default.createElement("div", {
138
- className: _style.default.wrapperProgression,
139
- "data-name": "activityList"
140
- }, coreProgression, loader));
141
- }
142
-
143
- }
62
+ onClick
63
+ } = recommendation;
64
+ onClick && onClick(e);
65
+ }, [recommendation]);
66
+ const handleSelectTheme = (0, _react.useCallback)(e => {
67
+ themeFilterOnChange && themeFilterOnChange(e);
68
+ }, [themeFilterOnChange]);
69
+ const primary = (0, _get.default)('common.primary', skin);
70
+ const loader = loading ? /*#__PURE__*/_react.default.createElement("div", {
71
+ className: _style.default.loader
72
+ }, /*#__PURE__*/_react.default.createElement(_loader.default, null)) : null;
73
+ const allProgressions = progressions.map(progression => /*#__PURE__*/_react.default.createElement(_progressionItem.default, _extends({}, (0, _omit.default)(['ref'], progression), {
74
+ key: progression.ref,
75
+ adaptiveAriaLabel: adaptiveAriaLabel
76
+ })));
77
+
78
+ const coreProgression = /*#__PURE__*/_react.default.createElement("div", {
79
+ "data-name": "activityCore",
80
+ className: _style.default.core
81
+ }, allProgressions);
82
+
83
+ const themeSelect = !(0, _isEmpty.default)(themeFilter.options) ? /*#__PURE__*/_react.default.createElement(_select.default, {
84
+ borderClassName: _style.default.selectBorder,
85
+ className: _style.default.select,
86
+ theme: "thematiques",
87
+ options: themeFilter.options,
88
+ onChange: handleSelectTheme
89
+ }) : null;
90
+ const recommendationSection = !(0, _isEmpty.default)(recommendation) ? /*#__PURE__*/_react.default.createElement("div", {
91
+ className: _style.default.recommendationWrapper
92
+ }, /*#__PURE__*/_react.default.createElement("p", {
93
+ className: _style.default.recommendationSection
94
+ }, recommendation.title, " "), /*#__PURE__*/_react.default.createElement("p", {
95
+ className: _style.default.recommendationSection
96
+ }, /*#__PURE__*/_react.default.createElement("span", null, recommendation.subtitle, " "), /*#__PURE__*/_react.default.createElement("span", {
97
+ className: (0, _classnames.default)(_style.default.course, _style.default.innerHTML) // eslint-disable-next-line react/no-danger
98
+ ,
99
+ dangerouslySetInnerHTML: {
100
+ __html: recommendation.courseTitle
101
+ }
102
+ })), /*#__PURE__*/_react.default.createElement(_button.default, {
103
+ type: "link",
104
+ onClick: handleClick,
105
+ submitValue: recommendation.cta,
106
+ style: {
107
+ backgroundColor: primary
108
+ },
109
+ className: _style.default.cta
110
+ })) : null;
111
+ return /*#__PURE__*/_react.default.createElement("div", {
112
+ className: _style.default.default
113
+ }, /*#__PURE__*/_react.default.createElement("div", {
114
+ "data-name": "activity-header"
115
+ }, /*#__PURE__*/_react.default.createElement("div", {
116
+ className: _style.default.mainTitle
117
+ }, /*#__PURE__*/_react.default.createElement("span", null, mainTitle), " ", mainSubtitle), /*#__PURE__*/_react.default.createElement("div", {
118
+ className: _style.default.headerProgression
119
+ }, /*#__PURE__*/_react.default.createElement("div", {
120
+ className: _style.default.wrapperCta
121
+ }, themeSelect, recommendationSection), /*#__PURE__*/_react.default.createElement(_starsSummary.default, {
122
+ engines: engines,
123
+ total: total
124
+ }))), /*#__PURE__*/_react.default.createElement("div", {
125
+ className: _style.default.wrapperProgression,
126
+ "data-name": "activityList"
127
+ }, coreProgression, loader));
128
+ };
144
129
 
145
130
  Progression.contextTypes = {
146
131
  skin: _provider.default.childContextTypes.skin