@coorpacademy/components 11.6.1 → 11.7.3-alpha.29

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 (207) hide show
  1. package/README.md +3 -3
  2. package/es/atom/loader/index.native.d.ts +10 -0
  3. package/es/atom/loader/index.native.d.ts.map +1 -0
  4. package/es/atom/loader/index.native.js +192 -0
  5. package/es/atom/loader/index.native.js.map +1 -0
  6. package/es/atom/select/index.d.ts +18 -0
  7. package/es/atom/select/index.d.ts.map +1 -1
  8. package/es/atom/select/index.js +69 -15
  9. package/es/atom/select/index.js.map +1 -1
  10. package/es/molecule/answer/index.d.ts.map +1 -1
  11. package/es/molecule/answer/index.js +17 -12
  12. package/es/molecule/answer/index.js.map +1 -1
  13. package/es/molecule/brand-form-group/index.d.ts +18 -0
  14. package/es/molecule/empty-state-dashboard/index.d.ts +23 -0
  15. package/es/molecule/empty-state-dashboard/index.d.ts.map +1 -0
  16. package/es/molecule/empty-state-dashboard/index.js +31 -0
  17. package/es/molecule/empty-state-dashboard/index.js.map +1 -0
  18. package/es/molecule/empty-state-dashboard/style.css +55 -0
  19. package/es/molecule/empty-state-dashboard/types.d.ts +19 -0
  20. package/es/molecule/empty-state-dashboard/types.d.ts.map +1 -0
  21. package/es/molecule/empty-state-dashboard/types.js +19 -0
  22. package/es/molecule/empty-state-dashboard/types.js.map +1 -0
  23. package/es/molecule/filters/filters-wrapper.d.ts +1 -0
  24. package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
  25. package/es/molecule/filters/filters-wrapper.js +9 -5
  26. package/es/molecule/filters/filters-wrapper.js.map +1 -1
  27. package/es/molecule/filters/index.d.ts +10 -0
  28. package/es/molecule/filters/index.d.ts.map +1 -1
  29. package/es/molecule/filters/index.js +6 -3
  30. package/es/molecule/filters/index.js.map +1 -1
  31. package/es/molecule/questions/drop-down/index.d.ts +1 -0
  32. package/es/molecule/questions/drop-down/index.d.ts.map +1 -1
  33. package/es/molecule/questions/drop-down/index.js +9 -5
  34. package/es/molecule/questions/drop-down/index.js.map +1 -1
  35. package/es/molecule/questions/qcm/index.d.ts +1 -0
  36. package/es/molecule/questions/qcm/index.d.ts.map +1 -1
  37. package/es/molecule/questions/qcm/index.js +9 -5
  38. package/es/molecule/questions/qcm/index.js.map +1 -1
  39. package/es/molecule/questions/qcm-drag/index.d.ts +3 -1
  40. package/es/molecule/questions/qcm-drag/index.d.ts.map +1 -1
  41. package/es/molecule/questions/qcm-drag/index.js +9 -5
  42. package/es/molecule/questions/qcm-drag/index.js.map +1 -1
  43. package/es/molecule/questions/qcm-graphic/index.d.ts +1 -0
  44. package/es/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
  45. package/es/molecule/questions/qcm-graphic/index.js +9 -5
  46. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  47. package/es/molecule/questions/question-range/index.d.ts +1 -0
  48. package/es/molecule/questions/question-range/index.d.ts.map +1 -1
  49. package/es/molecule/questions/question-range/index.js +10 -6
  50. package/es/molecule/questions/question-range/index.js.map +1 -1
  51. package/es/molecule/questions/template/index.d.ts +6 -2
  52. package/es/molecule/questions/template/index.d.ts.map +1 -1
  53. package/es/molecule/questions/template/index.js +9 -5
  54. package/es/molecule/questions/template/index.js.map +1 -1
  55. package/es/molecule/setup-slide/index.d.ts +9 -0
  56. package/es/molecule/setup-slider/index.d.ts +9 -0
  57. package/es/organism/brand-form/index.d.ts +18 -0
  58. package/es/organism/list-item/index.d.ts +8 -6
  59. package/es/organism/list-item/index.d.ts.map +1 -1
  60. package/es/organism/list-item/index.js +16 -2
  61. package/es/organism/list-item/index.js.map +1 -1
  62. package/es/organism/list-item/style.css +18 -0
  63. package/es/organism/list-items/index.d.ts +2 -0
  64. package/es/organism/list-items/index.js +5 -1
  65. package/es/organism/list-items/index.js.map +1 -1
  66. package/es/organism/user-preferences/index.d.ts +1 -0
  67. package/es/organism/user-preferences/index.d.ts.map +1 -1
  68. package/es/organism/user-preferences/index.js +9 -5
  69. package/es/organism/user-preferences/index.js.map +1 -1
  70. package/es/organism/wizard-contents/index.d.ts +18 -0
  71. package/es/template/activity/index.d.ts +36 -40
  72. package/es/template/activity/index.d.ts.map +1 -1
  73. package/es/template/activity/index.js +89 -111
  74. package/es/template/activity/index.js.map +1 -1
  75. package/es/template/activity/stars-summary.d.ts +9 -18
  76. package/es/template/activity/stars-summary.d.ts.map +1 -1
  77. package/es/template/activity/stars-summary.js +94 -122
  78. package/es/template/activity/stars-summary.js.map +1 -1
  79. package/es/template/back-office/brand-update/index.d.ts +56 -0
  80. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  81. package/es/template/back-office/brand-update/index.js +12 -3
  82. package/es/template/back-office/brand-update/index.js.map +1 -1
  83. package/es/template/back-office/brand-update/style.css +5 -1
  84. package/es/template/common/search-page/index.d.ts +11 -0
  85. package/es/template/common/search-page/index.d.ts.map +1 -1
  86. package/es/template/common/search-page/index.js +6 -3
  87. package/es/template/common/search-page/index.js.map +1 -1
  88. package/es/util/button-icons.d.ts +1 -0
  89. package/es/util/button-icons.d.ts.map +1 -1
  90. package/es/util/button-icons.js +3 -2
  91. package/es/util/button-icons.js.map +1 -1
  92. package/lib/atom/loader/index.native.d.ts +10 -0
  93. package/lib/atom/loader/index.native.d.ts.map +1 -0
  94. package/lib/atom/loader/index.native.js +205 -0
  95. package/lib/atom/loader/index.native.js.map +1 -0
  96. package/lib/atom/select/index.d.ts +18 -0
  97. package/lib/atom/select/index.d.ts.map +1 -1
  98. package/lib/atom/select/index.js +72 -14
  99. package/lib/atom/select/index.js.map +1 -1
  100. package/lib/molecule/answer/index.d.ts.map +1 -1
  101. package/lib/molecule/answer/index.js +18 -13
  102. package/lib/molecule/answer/index.js.map +1 -1
  103. package/lib/molecule/brand-form-group/index.d.ts +18 -0
  104. package/lib/molecule/empty-state-dashboard/index.d.ts +23 -0
  105. package/lib/molecule/empty-state-dashboard/index.d.ts.map +1 -0
  106. package/lib/molecule/empty-state-dashboard/index.js +42 -0
  107. package/lib/molecule/empty-state-dashboard/index.js.map +1 -0
  108. package/lib/molecule/empty-state-dashboard/style.css +55 -0
  109. package/lib/molecule/empty-state-dashboard/types.d.ts +19 -0
  110. package/lib/molecule/empty-state-dashboard/types.d.ts.map +1 -0
  111. package/lib/molecule/empty-state-dashboard/types.js +29 -0
  112. package/lib/molecule/empty-state-dashboard/types.js.map +1 -0
  113. package/lib/molecule/filters/filters-wrapper.d.ts +1 -0
  114. package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
  115. package/lib/molecule/filters/filters-wrapper.js +9 -5
  116. package/lib/molecule/filters/filters-wrapper.js.map +1 -1
  117. package/lib/molecule/filters/index.d.ts +10 -0
  118. package/lib/molecule/filters/index.d.ts.map +1 -1
  119. package/lib/molecule/filters/index.js +6 -3
  120. package/lib/molecule/filters/index.js.map +1 -1
  121. package/lib/molecule/questions/drop-down/index.d.ts +1 -0
  122. package/lib/molecule/questions/drop-down/index.d.ts.map +1 -1
  123. package/lib/molecule/questions/drop-down/index.js +9 -5
  124. package/lib/molecule/questions/drop-down/index.js.map +1 -1
  125. package/lib/molecule/questions/qcm/index.d.ts +1 -0
  126. package/lib/molecule/questions/qcm/index.d.ts.map +1 -1
  127. package/lib/molecule/questions/qcm/index.js +9 -5
  128. package/lib/molecule/questions/qcm/index.js.map +1 -1
  129. package/lib/molecule/questions/qcm-drag/index.d.ts +3 -1
  130. package/lib/molecule/questions/qcm-drag/index.d.ts.map +1 -1
  131. package/lib/molecule/questions/qcm-drag/index.js +9 -5
  132. package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
  133. package/lib/molecule/questions/qcm-graphic/index.d.ts +1 -0
  134. package/lib/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
  135. package/lib/molecule/questions/qcm-graphic/index.js +9 -5
  136. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  137. package/lib/molecule/questions/question-range/index.d.ts +1 -0
  138. package/lib/molecule/questions/question-range/index.d.ts.map +1 -1
  139. package/lib/molecule/questions/question-range/index.js +10 -6
  140. package/lib/molecule/questions/question-range/index.js.map +1 -1
  141. package/lib/molecule/questions/template/index.d.ts +6 -2
  142. package/lib/molecule/questions/template/index.d.ts.map +1 -1
  143. package/lib/molecule/questions/template/index.js +9 -5
  144. package/lib/molecule/questions/template/index.js.map +1 -1
  145. package/lib/molecule/setup-slide/index.d.ts +9 -0
  146. package/lib/molecule/setup-slider/index.d.ts +9 -0
  147. package/lib/organism/brand-form/index.d.ts +18 -0
  148. package/lib/organism/list-item/index.d.ts +8 -6
  149. package/lib/organism/list-item/index.d.ts.map +1 -1
  150. package/lib/organism/list-item/index.js +16 -2
  151. package/lib/organism/list-item/index.js.map +1 -1
  152. package/lib/organism/list-item/style.css +18 -0
  153. package/lib/organism/list-items/index.d.ts +2 -0
  154. package/lib/organism/list-items/index.js +5 -1
  155. package/lib/organism/list-items/index.js.map +1 -1
  156. package/lib/organism/user-preferences/index.d.ts +1 -0
  157. package/lib/organism/user-preferences/index.d.ts.map +1 -1
  158. package/lib/organism/user-preferences/index.js +9 -5
  159. package/lib/organism/user-preferences/index.js.map +1 -1
  160. package/lib/organism/wizard-contents/index.d.ts +18 -0
  161. package/lib/template/activity/index.d.ts +36 -40
  162. package/lib/template/activity/index.d.ts.map +1 -1
  163. package/lib/template/activity/index.js +95 -110
  164. package/lib/template/activity/index.js.map +1 -1
  165. package/lib/template/activity/stars-summary.d.ts +9 -18
  166. package/lib/template/activity/stars-summary.d.ts.map +1 -1
  167. package/lib/template/activity/stars-summary.js +90 -119
  168. package/lib/template/activity/stars-summary.js.map +1 -1
  169. package/lib/template/back-office/brand-update/index.d.ts +56 -0
  170. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  171. package/lib/template/back-office/brand-update/index.js +13 -3
  172. package/lib/template/back-office/brand-update/index.js.map +1 -1
  173. package/lib/template/back-office/brand-update/style.css +5 -1
  174. package/lib/template/common/search-page/index.d.ts +11 -0
  175. package/lib/template/common/search-page/index.d.ts.map +1 -1
  176. package/lib/template/common/search-page/index.js +6 -3
  177. package/lib/template/common/search-page/index.js.map +1 -1
  178. package/lib/util/button-icons.d.ts +1 -0
  179. package/lib/util/button-icons.d.ts.map +1 -1
  180. package/lib/util/button-icons.js +2 -1
  181. package/lib/util/button-icons.js.map +1 -1
  182. package/locales/bs/global.json +8 -1
  183. package/locales/cs/global.json +9 -1
  184. package/locales/de/global.json +9 -1
  185. package/locales/en/global.json +1 -1
  186. package/locales/es/global.json +9 -1
  187. package/locales/et/global.json +9 -1
  188. package/locales/fr/global.json +1 -1
  189. package/locales/hr/global.json +9 -1
  190. package/locales/hu/global.json +9 -1
  191. package/locales/hy/global.json +0 -1
  192. package/locales/it/global.json +9 -1
  193. package/locales/ja/global.json +9 -1
  194. package/locales/ko/global.json +9 -1
  195. package/locales/nl/global.json +9 -1
  196. package/locales/pl/global.json +9 -1
  197. package/locales/pt/global.json +9 -1
  198. package/locales/ro/global.json +9 -1
  199. package/locales/ru/global.json +1 -1
  200. package/locales/sk/global.json +9 -1
  201. package/locales/tl/global.json +9 -1
  202. package/locales/tr/global.json +9 -1
  203. package/locales/uk/global.json +9 -1
  204. package/locales/vi/global.json +9 -1
  205. package/locales/zh/global.json +9 -1
  206. package/locales/zh_TW/global.json +9 -1
  207. package/package.json +3 -3
@@ -19,6 +19,7 @@ declare namespace UserPreferences {
19
19
  requiredSelection: PropTypes.Requireable<boolean>;
20
20
  }> | null | undefined)[]>;
21
21
  const moreInfoAriaLabel: PropTypes.Requireable<string>;
22
+ const groupAriaLabel: PropTypes.Requireable<string>;
22
23
  }
23
24
  }
24
25
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/user-preferences/index.js"],"names":[],"mappings":";AAoCA,0DAaC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/user-preferences/index.js"],"names":[],"mappings":";AAoCA,0DAeC"}
@@ -46,19 +46,23 @@ Settings.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, InputS
46
46
  const UserPreferences = props => {
47
47
  const {
48
48
  preferences = [],
49
- moreInfoAriaLabel
49
+ moreInfoAriaLabel,
50
+ groupAriaLabel
50
51
  } = props;
51
- return /*#__PURE__*/React.createElement("div", {
52
- className: style.preferences
52
+ return /*#__PURE__*/React.createElement("form", null, /*#__PURE__*/React.createElement("div", {
53
+ className: style.preferences,
54
+ role: "group",
55
+ "aria-label": groupAriaLabel
53
56
  }, _map(settings => /*#__PURE__*/React.createElement(Settings, _extends({}, settings, {
54
57
  key: settings.label,
55
58
  moreInfoAriaLabel: moreInfoAriaLabel
56
- })), preferences));
59
+ })), preferences)));
57
60
  };
58
61
 
59
62
  UserPreferences.propTypes = process.env.NODE_ENV !== "production" ? {
60
63
  preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),
61
- moreInfoAriaLabel: PropTypes.string
64
+ moreInfoAriaLabel: PropTypes.string,
65
+ groupAriaLabel: PropTypes.string
62
66
  } : {};
63
67
  export default UserPreferences;
64
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionCoorpacademyInformationIcon","InfoIcon","InputSwitch","style","Settings","props","label","description","moreInfoAriaLabel","settings","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","string","isRequired","UserPreferences","preferences","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, isEmpty} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyInformationIcon as InfoIcon} from '@coorpacademy/nova-icons';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const {label, description, moreInfoAriaLabel, ...settings} = props;\n return (\n <div className={style.settings}>\n <InputSwitch {...settings} />\n <span className={style.label}>{label}</span>\n {isEmpty(description) ? null : (\n <div className={style.infoIconWrapper}>\n <InfoIcon\n height={16}\n width={16}\n className={style.infoIcon}\n aria-label={moreInfoAriaLabel}\n />\n <div className={style.showToolTip}>\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n ...InputSwitch.propTypes,\n label: PropTypes.string.isRequired,\n description: PropTypes.string\n};\n\nconst UserPreferences = props => {\n const {preferences = [], moreInfoAriaLabel} = props;\n\n return (\n <div className={style.preferences}>\n {map(\n settings => (\n <Settings {...settings} key={settings.label} moreInfoAriaLabel={moreInfoAriaLabel} />\n ),\n preferences\n )}\n </div>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),\n moreInfoAriaLabel: PropTypes.string\n};\n\nexport default UserPreferences;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,0CAA0C,IAAIC,QAAtD,QAAqE,0BAArE;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,KAAD;IAAQC,WAAR;IAAqBC;EAArB,IAAuDH,KAA7D;EAAA,MAAiDI,QAAjD,iCAA6DJ,KAA7D;;EACA,oBACE;IAAK,SAAS,EAAEF,KAAK,CAACM;EAAtB,gBACE,oBAAC,WAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEN,KAAK,CAACG;EAAvB,GAA+BA,KAA/B,CAFF,EAGG,SAAQC,WAAR,IAAuB,IAAvB,gBACC;IAAK,SAAS,EAAEJ,KAAK,CAACO;EAAtB,gBACE,oBAAC,QAAD;IACE,MAAM,EAAE,EADV;IAEE,KAAK,EAAE,EAFT;IAGE,SAAS,EAAEP,KAAK,CAACQ,QAHnB;IAIE,cAAYH;EAJd,EADF,eAOE;IAAK,SAAS,EAAEL,KAAK,CAACS;EAAtB,gBACE;IAAK,SAAS,EAAET,KAAK,CAACU;EAAtB,GAAyCN,WAAzC,CADF,CAPF,CAJJ,CADF;AAmBD,CArBD;;AAuBAH,QAAQ,CAACU,SAAT,wDACKZ,WAAW,CAACY,SADjB;EAEER,KAAK,EAAEP,SAAS,CAACgB,MAAV,CAAiBC,UAF1B;EAGET,WAAW,EAAER,SAAS,CAACgB;AAHzB;;AAMA,MAAME,eAAe,GAAGZ,KAAK,IAAI;EAC/B,MAAM;IAACa,WAAW,GAAG,EAAf;IAAmBV;EAAnB,IAAwCH,KAA9C;EAEA,oBACE;IAAK,SAAS,EAAEF,KAAK,CAACe;EAAtB,GACG,KACCT,QAAQ,iBACN,oBAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACH,KAAtC;IAA6C,iBAAiB,EAAEE;EAAhE,GAFH,EAICU,WAJD,CADH,CADF;AAUD,CAbD;;AAeAD,eAAe,CAACH,SAAhB,2CAA4B;EAC1BI,WAAW,EAAEnB,SAAS,CAACoB,OAAV,CAAkBpB,SAAS,CAACqB,KAAV,CAAgBhB,QAAQ,CAACU,SAAzB,CAAlB,CADa;EAE1BN,iBAAiB,EAAET,SAAS,CAACgB;AAFH,CAA5B;AAKA,eAAeE,eAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionCoorpacademyInformationIcon","InfoIcon","InputSwitch","style","Settings","props","label","description","moreInfoAriaLabel","settings","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","string","isRequired","UserPreferences","preferences","groupAriaLabel","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, groupAriaLabel} = props;\n\n return (\n <form>\n <div className={style.preferences} role=\"group\" aria-label={groupAriaLabel}>\n {map(\n settings => (\n <Settings {...settings} key={settings.label} moreInfoAriaLabel={moreInfoAriaLabel} />\n ),\n preferences\n )}\n </div>\n </form>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),\n moreInfoAriaLabel: PropTypes.string,\n groupAriaLabel: PropTypes.string\n};\n\nexport default UserPreferences;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,0CAA0C,IAAIC,QAAtD,QAAqE,0BAArE;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,KAAD;IAAQC,WAAR;IAAqBC;EAArB,IAAuDH,KAA7D;EAAA,MAAiDI,QAAjD,iCAA6DJ,KAA7D;;EACA,oBACE;IAAK,SAAS,EAAEF,KAAK,CAACM;EAAtB,gBACE,oBAAC,WAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEN,KAAK,CAACG;EAAvB,GAA+BA,KAA/B,CAFF,EAGG,SAAQC,WAAR,IAAuB,IAAvB,gBACC;IAAK,SAAS,EAAEJ,KAAK,CAACO;EAAtB,gBACE,oBAAC,QAAD;IACE,MAAM,EAAE,EADV;IAEE,KAAK,EAAE,EAFT;IAGE,SAAS,EAAEP,KAAK,CAACQ,QAHnB;IAIE,cAAYH;EAJd,EADF,eAOE;IAAK,SAAS,EAAEL,KAAK,CAACS;EAAtB,gBACE;IAAK,SAAS,EAAET,KAAK,CAACU;EAAtB,GAAyCN,WAAzC,CADF,CAPF,CAJJ,CADF;AAmBD,CArBD;;AAuBAH,QAAQ,CAACU,SAAT,wDACKZ,WAAW,CAACY,SADjB;EAEER,KAAK,EAAEP,SAAS,CAACgB,MAAV,CAAiBC,UAF1B;EAGET,WAAW,EAAER,SAAS,CAACgB;AAHzB;;AAMA,MAAME,eAAe,GAAGZ,KAAK,IAAI;EAC/B,MAAM;IAACa,WAAW,GAAG,EAAf;IAAmBV,iBAAnB;IAAsCW;EAAtC,IAAwDd,KAA9D;EAEA,oBACE,+CACE;IAAK,SAAS,EAAEF,KAAK,CAACe,WAAtB;IAAmC,IAAI,EAAC,OAAxC;IAAgD,cAAYC;EAA5D,GACG,KACCV,QAAQ,iBACN,oBAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACH,KAAtC;IAA6C,iBAAiB,EAAEE;EAAhE,GAFH,EAICU,WAJD,CADH,CADF,CADF;AAYD,CAfD;;AAiBAD,eAAe,CAACH,SAAhB,2CAA4B;EAC1BI,WAAW,EAAEnB,SAAS,CAACqB,OAAV,CAAkBrB,SAAS,CAACsB,KAAV,CAAgBjB,QAAQ,CAACU,SAAzB,CAAlB,CADa;EAE1BN,iBAAiB,EAAET,SAAS,CAACgB,MAFH;EAG1BI,cAAc,EAAEpB,SAAS,CAACgB;AAHA,CAA5B;AAMA,eAAeE,eAAf"}
@@ -143,6 +143,15 @@ declare namespace WizardContents {
143
143
  selected: PropTypes.Requireable<boolean>;
144
144
  validOption: PropTypes.Requireable<boolean>;
145
145
  }> | null | undefined)[]>;
146
+ optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
147
+ label: PropTypes.Validator<string>;
148
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
149
+ name: PropTypes.Validator<string>;
150
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
151
+ selected: PropTypes.Requireable<boolean>;
152
+ validOption: PropTypes.Requireable<boolean>;
153
+ }> | null | undefined)[]>;
154
+ }> | null | undefined)[]>;
146
155
  modified: PropTypes.Requireable<boolean>;
147
156
  error: PropTypes.Requireable<boolean>;
148
157
  'aria-label': PropTypes.Requireable<string>;
@@ -247,6 +256,15 @@ declare namespace WizardContents {
247
256
  selected: PropTypes.Requireable<boolean>;
248
257
  validOption: PropTypes.Requireable<boolean>;
249
258
  }> | null | undefined)[]>;
259
+ optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
260
+ label: PropTypes.Validator<string>;
261
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
262
+ name: PropTypes.Validator<string>;
263
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
264
+ selected: PropTypes.Requireable<boolean>;
265
+ validOption: PropTypes.Requireable<boolean>;
266
+ }> | null | undefined)[]>;
267
+ }> | null | undefined)[]>;
250
268
  modified: PropTypes.Requireable<boolean>;
251
269
  error: PropTypes.Requireable<boolean>;
252
270
  'aria-label': PropTypes.Requireable<string>;
@@ -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"}
@@ -1,13 +1,12 @@
1
- import _isEmpty from "lodash/fp/isEmpty";
2
- import _omit from "lodash/fp/omit";
3
- import _get from "lodash/fp/get";
4
-
5
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6
2
 
7
- import React from 'react';
3
+ import React, { useCallback } from 'react';
4
+ import get from 'lodash/fp/get';
5
+ import isEmpty from 'lodash/fp/isEmpty';
6
+ import omit from 'lodash/fp/omit';
8
7
  import PropTypes from 'prop-types';
9
8
  import classnames from 'classnames';
10
- import Provider from '../../atom/provider';
9
+ import Provider, { GetSkinFromContext } from '../../atom/provider';
11
10
  import Button from '../../atom/button';
12
11
  import Select from '../../atom/select';
13
12
  import Loader from '../../atom/loader';
@@ -16,112 +15,91 @@ import EngineStars from './engine-stars';
16
15
  import StarsSummary from './stars-summary';
17
16
  import style from './style.css';
18
17
 
19
- class Progression extends React.Component {
20
- constructor(props, context) {
21
- super(props, context);
22
-
23
- this.handleClick = e => {
24
- const {
25
- recommendation
26
- } = this.props;
27
- e.stopPropagation();
28
- e.preventDefault();
29
- const {
30
- onClick
31
- } = recommendation;
32
- onClick && onClick(e);
33
- };
34
-
35
- this.handleSelectTheme = e => {
36
- const {
37
- themeFilter: {
38
- onChange
39
- }
40
- } = this.props;
41
- onChange && onChange(e);
42
- };
43
-
44
- this.handleClick = this.handleClick.bind(this);
45
- this.handleSelectTheme = this.handleSelectTheme.bind(this);
46
- }
47
-
48
- render() {
18
+ const Progression = (props, legacyContext) => {
19
+ const {
20
+ mainTitle,
21
+ mainSubtitle,
22
+ recommendation = {},
23
+ progressions = [],
24
+ adaptiveAriaLabel,
25
+ total,
26
+ engines = [],
27
+ themeFilter = {},
28
+ loading
29
+ } = props;
30
+ const skin = GetSkinFromContext(legacyContext);
31
+ const {
32
+ onChange: themeFilterOnChange
33
+ } = themeFilter;
34
+ const handleClick = useCallback(e => {
35
+ e.stopPropagation();
36
+ e.preventDefault();
49
37
  const {
50
- mainTitle,
51
- mainSubtitle,
52
- recommendation = {},
53
- progressions = [],
54
- adaptiveAriaLabel,
55
- total,
56
- engines = [],
57
- themeFilter = {},
58
- loading
59
- } = this.props;
60
- const {
61
- skin
62
- } = this.context;
63
-
64
- const primary = _get('common.primary', skin);
65
-
66
- const loader = loading ? /*#__PURE__*/React.createElement("div", {
67
- className: style.loader
68
- }, /*#__PURE__*/React.createElement(Loader, null)) : null;
69
- const allProgressions = progressions.map(progression => /*#__PURE__*/React.createElement(ProgressionItem, _extends({}, _omit(['ref'], progression), {
70
- key: progression.ref,
71
- adaptiveAriaLabel: adaptiveAriaLabel
72
- })));
73
- const coreProgression = /*#__PURE__*/React.createElement("div", {
74
- "data-name": "activityCore",
75
- className: style.core
76
- }, allProgressions);
77
- const themeSelect = !_isEmpty(themeFilter.options) ? /*#__PURE__*/React.createElement(Select, {
78
- borderClassName: style.selectBorder,
79
- className: style.select,
80
- theme: "thematiques",
81
- options: themeFilter.options,
82
- onChange: this.handleSelectTheme
83
- }) : null;
84
- const recommendationSection = !_isEmpty(recommendation) ? /*#__PURE__*/React.createElement("div", {
85
- className: style.recommendationWrapper
86
- }, /*#__PURE__*/React.createElement("p", {
87
- className: style.recommendationSection
88
- }, recommendation.title, " "), /*#__PURE__*/React.createElement("p", {
89
- className: style.recommendationSection
90
- }, /*#__PURE__*/React.createElement("span", null, recommendation.subtitle, " "), /*#__PURE__*/React.createElement("span", {
91
- className: classnames(style.course, style.innerHTML) // eslint-disable-next-line react/no-danger
92
- ,
93
- dangerouslySetInnerHTML: {
94
- __html: recommendation.courseTitle
95
- }
96
- })), /*#__PURE__*/React.createElement(Button, {
97
- type: "link",
98
- onClick: this.handleClick,
99
- submitValue: recommendation.cta,
100
- style: {
101
- backgroundColor: primary
102
- },
103
- className: style.cta
104
- })) : null;
105
- return /*#__PURE__*/React.createElement("div", {
106
- className: style.default
107
- }, /*#__PURE__*/React.createElement("div", {
108
- "data-name": "activity-header"
109
- }, /*#__PURE__*/React.createElement("div", {
110
- className: style.mainTitle
111
- }, /*#__PURE__*/React.createElement("span", null, mainTitle), " ", mainSubtitle), /*#__PURE__*/React.createElement("div", {
112
- className: style.headerProgression
113
- }, /*#__PURE__*/React.createElement("div", {
114
- className: style.wrapperCta
115
- }, themeSelect, recommendationSection), /*#__PURE__*/React.createElement(StarsSummary, {
116
- engines: engines,
117
- total: total
118
- }))), /*#__PURE__*/React.createElement("div", {
119
- className: style.wrapperProgression,
120
- "data-name": "activityList"
121
- }, coreProgression, loader));
122
- }
123
-
124
- }
38
+ onClick
39
+ } = recommendation;
40
+ onClick && onClick(e);
41
+ }, [recommendation]);
42
+ const handleSelectTheme = useCallback(e => {
43
+ themeFilterOnChange && themeFilterOnChange(e);
44
+ }, [themeFilterOnChange]);
45
+ const primary = get('common.primary', skin);
46
+ const loader = loading ? /*#__PURE__*/React.createElement("div", {
47
+ className: style.loader
48
+ }, /*#__PURE__*/React.createElement(Loader, null)) : null;
49
+ const allProgressions = progressions.map(progression => /*#__PURE__*/React.createElement(ProgressionItem, _extends({}, omit(['ref'], progression), {
50
+ key: progression.ref,
51
+ adaptiveAriaLabel: adaptiveAriaLabel
52
+ })));
53
+ const coreProgression = /*#__PURE__*/React.createElement("div", {
54
+ "data-name": "activityCore",
55
+ className: style.core
56
+ }, allProgressions);
57
+ const themeSelect = !isEmpty(themeFilter.options) ? /*#__PURE__*/React.createElement(Select, {
58
+ borderClassName: style.selectBorder,
59
+ className: style.select,
60
+ theme: "thematiques",
61
+ options: themeFilter.options,
62
+ onChange: handleSelectTheme
63
+ }) : null;
64
+ const recommendationSection = !isEmpty(recommendation) ? /*#__PURE__*/React.createElement("div", {
65
+ className: style.recommendationWrapper
66
+ }, /*#__PURE__*/React.createElement("p", {
67
+ className: style.recommendationSection
68
+ }, recommendation.title, " "), /*#__PURE__*/React.createElement("p", {
69
+ className: style.recommendationSection
70
+ }, /*#__PURE__*/React.createElement("span", null, recommendation.subtitle, " "), /*#__PURE__*/React.createElement("span", {
71
+ className: classnames(style.course, style.innerHTML) // eslint-disable-next-line react/no-danger
72
+ ,
73
+ dangerouslySetInnerHTML: {
74
+ __html: recommendation.courseTitle
75
+ }
76
+ })), /*#__PURE__*/React.createElement(Button, {
77
+ type: "link",
78
+ onClick: handleClick,
79
+ submitValue: recommendation.cta,
80
+ style: {
81
+ backgroundColor: primary
82
+ },
83
+ className: style.cta
84
+ })) : null;
85
+ return /*#__PURE__*/React.createElement("div", {
86
+ className: style.default
87
+ }, /*#__PURE__*/React.createElement("div", {
88
+ "data-name": "activity-header"
89
+ }, /*#__PURE__*/React.createElement("div", {
90
+ className: style.mainTitle
91
+ }, /*#__PURE__*/React.createElement("span", null, mainTitle), " ", mainSubtitle), /*#__PURE__*/React.createElement("div", {
92
+ className: style.headerProgression
93
+ }, /*#__PURE__*/React.createElement("div", {
94
+ className: style.wrapperCta
95
+ }, themeSelect, recommendationSection), /*#__PURE__*/React.createElement(StarsSummary, {
96
+ engines: engines,
97
+ total: total
98
+ }))), /*#__PURE__*/React.createElement("div", {
99
+ className: style.wrapperProgression,
100
+ "data-name": "activityList"
101
+ }, coreProgression, loader));
102
+ };
125
103
 
126
104
  Progression.contextTypes = {
127
105
  skin: Provider.childContextTypes.skin
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","classnames","Provider","Button","Select","Loader","ProgressionItem","EngineStars","StarsSummary","style","Progression","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","allProgressions","map","progression","ref","coreProgression","core","themeSelect","options","selectBorder","select","recommendationSection","recommendationWrapper","title","subtitle","course","innerHTML","__html","courseTitle","cta","backgroundColor","default","headerProgression","wrapperCta","wrapperProgression","contextTypes","childContextTypes","propTypes","string","isRequired","shape","label","stars","number","arrayOf","bool","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,OAAOA,KAAP,MAAkB,OA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ACoE,MAAV,CAAiBJ;EAFH,CAAhB,EAGJA,UAPc;EAQjBjC,OAAO,EAAE/B,SAAS,CAACqE,OAAV,CAAkBrE,SAAS,CAACiE,KAAV,CAAgB1D,WAAW,CAACuD,SAA5B,CAAlB,CARQ;EASjB9B,OAAO,EAAEhC,SAAS,CAACsE,IAAV,CAAeN,UATP;EAUjBpC,YAAY,EAAE5B,SAAS,CAACqE,OAAV,CACZrE,SAAS,CAACiE,KAAV,cAAoB3D,eAAe,CAACwD,SAApC;IAA+CvB,GAAG,EAAEvC,SAAS,CAAC+D,MAAV,CAAiBC;EAArE,GADY,CAVG;EAajB1C,WAAW,EAAEtB,SAAS,CAACiE,KAAV,CAAgB;IAC3BtB,OAAO,EAAEvC,MAAM,CAAC0D,SAAP,CAAiBnB,OAAjB,CAAyBqB,UADP;IAE3BzC,QAAQ,EAAEnB,MAAM,CAAC0D,SAAP,CAAiBvC;EAFA,CAAhB,CAbI;EAiBjBN,cAAc,EAAEjB,SAAS,CAACiE,KAAV,CAAgB;IAC9BX,GAAG,EAAEtD,SAAS,CAAC+D,MAAV,CAAiBC,UADQ;IAE9BhB,KAAK,EAAEhD,SAAS,CAAC+D,MAAV,CAAiBC,UAFM;IAG9Bf,QAAQ,EAAEjD,SAAS,CAAC+D,MAAV,CAAiBC,UAHG;IAI9BX,WAAW,EAAErD,SAAS,CAAC+D,MAAV,CAAiBC,UAJA;IAK9B5C,OAAO,EAAEpB,SAAS,CAACuE;EALW,CAAhB;AAjBC,C;AA0IrB,eAAe7D,WAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","get","isEmpty","omit","PropTypes","classnames","Provider","GetSkinFromContext","Button","Select","Loader","ProgressionItem","EngineStars","StarsSummary","style","Progression","props","legacyContext","mainTitle","mainSubtitle","recommendation","progressions","adaptiveAriaLabel","total","engines","themeFilter","loading","skin","onChange","themeFilterOnChange","handleClick","e","stopPropagation","preventDefault","onClick","handleSelectTheme","primary","loader","allProgressions","map","progression","ref","coreProgression","core","themeSelect","options","selectBorder","select","recommendationSection","recommendationWrapper","title","subtitle","course","innerHTML","__html","courseTitle","cta","backgroundColor","default","headerProgression","wrapperCta","wrapperProgression","contextTypes","childContextTypes","propTypes","string","isRequired","shape","label","stars","number","arrayOf","bool","func"],"sources":["../../../src/template/activity/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport omit from 'lodash/fp/omit';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} 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\nconst Progression = (props, legacyContext) => {\n const {\n mainTitle,\n mainSubtitle,\n recommendation = {},\n progressions = [],\n adaptiveAriaLabel,\n total,\n engines = [],\n themeFilter = {},\n loading\n } = props;\n const skin = GetSkinFromContext(legacyContext);\n const {onChange: themeFilterOnChange} = themeFilter;\n\n const handleClick = useCallback(\n e => {\n e.stopPropagation();\n e.preventDefault();\n const {onClick} = recommendation;\n onClick && onClick(e);\n },\n [recommendation]\n );\n\n const handleSelectTheme = useCallback(\n e => {\n themeFilterOnChange && themeFilterOnChange(e);\n },\n [themeFilterOnChange]\n );\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={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={handleClick}\n submitValue={recommendation.cta}\n style={{\n backgroundColor: primary\n }}\n className={style.cta}\n />\n </div>\n ) : null;\n\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\nProgression.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nProgression.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\nexport default Progression;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,GAAP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,SAAS,CAAC+D,KAAV,CAAgBvD,WAAW,CAACoD,SAA5B,CAAlB,CARa;EAStBtC,OAAO,EAAEtB,SAAS,CAACoE,IAAV,CAAeN,UATF;EAUtB7C,YAAY,EAAEjB,SAAS,CAACmE,OAAV,CACZnE,SAAS,CAAC+D,KAAV,cAAoBxD,eAAe,CAACqD,SAApC;IAA+CvB,GAAG,EAAErC,SAAS,CAAC6D,MAAV,CAAiBC;EAArE,GADY,CAVQ;EAatBzC,WAAW,EAAErB,SAAS,CAAC+D,KAAV,CAAgB;IAC3BtB,OAAO,EAAEpC,MAAM,CAACuD,SAAP,CAAiBnB,OAAjB,CAAyBqB,UADP;IAE3BtC,QAAQ,EAAEnB,MAAM,CAACuD,SAAP,CAAiBpC;EAFA,CAAhB,CAbS;EAiBtBR,cAAc,EAAEhB,SAAS,CAAC+D,KAAV,CAAgB;IAC9BX,GAAG,EAAEpD,SAAS,CAAC6D,MAAV,CAAiBC,UADQ;IAE9BhB,KAAK,EAAE9C,SAAS,CAAC6D,MAAV,CAAiBC,UAFM;IAG9Bf,QAAQ,EAAE/C,SAAS,CAAC6D,MAAV,CAAiBC,UAHG;IAI9BX,WAAW,EAAEnD,SAAS,CAAC6D,MAAV,CAAiBC,UAJA;IAK9BhC,OAAO,EAAE9B,SAAS,CAACqE;EALW,CAAhB;AAjBM,CAAxB;AA0BA,eAAe1D,WAAf"}
@@ -1,11 +1,12 @@
1
1
  export default StarsSummary;
2
- declare class StarsSummary extends React.Component<any, any, any> {
3
- static propTypes: {
4
- total: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
2
+ declare function StarsSummary(props: any, legacyContext: any): JSX.Element | null;
3
+ declare namespace StarsSummary {
4
+ namespace propTypes {
5
+ const total: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
5
6
  label: PropTypes.Validator<string>;
6
7
  stars: PropTypes.Validator<number>;
7
8
  }>>>;
8
- engines: PropTypes.Requireable<(PropTypes.InferProps<{
9
+ const engines: PropTypes.Validator<(PropTypes.InferProps<{
9
10
  type: PropTypes.Validator<string>;
10
11
  stars: PropTypes.Validator<number>;
11
12
  title: PropTypes.Validator<string>;
@@ -19,9 +20,9 @@ declare class StarsSummary extends React.Component<any, any, any> {
19
20
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
20
21
  }>>;
21
22
  }> | null | undefined)[]>;
22
- };
23
- static contextTypes: {
24
- skin: PropTypes.Requireable<PropTypes.InferProps<{
23
+ }
24
+ namespace contextTypes {
25
+ const skin: PropTypes.Requireable<PropTypes.InferProps<{
25
26
  common: PropTypes.Requireable<{
26
27
  [x: string]: any;
27
28
  }>;
@@ -42,17 +43,7 @@ declare class StarsSummary extends React.Component<any, any, any> {
42
43
  [x: string]: any;
43
44
  }>;
44
45
  }>>;
45
- };
46
- constructor(props: any);
47
- state: {
48
- firstItem: number;
49
- totalItems: any;
50
- };
51
- handleOnLeft(): void;
52
- handleOnRight(): void;
53
- scrollTo(page: any): void;
54
- render(): JSX.Element | null;
46
+ }
55
47
  }
56
- import React from "react";
57
48
  import PropTypes from "prop-types";
58
49
  //# sourceMappingURL=stars-summary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stars-summary.d.ts","sourceRoot":"","sources":["../../../src/template/activity/stars-summary.js"],"names":[],"mappings":";AAkDA;IACE;;;;;;;;;;;;;;;;;;;MAME;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBAYC;IARC;;;MAGC;IAOH,qBAGC;IAED,sBAGC;IAED,0BAIC;IAED,6BAiDC;CACF"}
1
+ {"version":3,"file":"stars-summary.d.ts","sourceRoot":"","sources":["../../../src/template/activity/stars-summary.js"],"names":[],"mappings":";AA0DA,kFAiFC"}