@coorpacademy/components 11.4.5-alpha.36 → 11.4.5-alpha.5

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 (134) hide show
  1. package/es/atom/provider/index.d.ts +1 -0
  2. package/es/atom/provider/index.d.ts.map +1 -1
  3. package/es/atom/provider/index.js +11 -1
  4. package/es/atom/provider/index.js.map +1 -1
  5. package/es/atom/provider/web-context.d.ts +1 -1
  6. package/es/atom/provider/web-context.d.ts.map +1 -1
  7. package/es/atom/provider/web-context.js +2 -1
  8. package/es/atom/provider/web-context.js.map +1 -1
  9. package/es/atom/review-header-step-item/index.d.ts.map +1 -1
  10. package/es/atom/review-header-step-item/index.js +24 -6
  11. package/es/atom/review-header-step-item/index.js.map +1 -1
  12. package/es/globals.d.js.map +1 -1
  13. package/es/molecule/add-to-my-list/index.js +1 -3
  14. package/es/molecule/add-to-my-list/index.js.map +1 -1
  15. package/es/molecule/answer/index.d.ts.map +1 -1
  16. package/es/molecule/answer/index.js +6 -16
  17. package/es/molecule/answer/index.js.map +1 -1
  18. package/es/molecule/card/notification.js +1 -3
  19. package/es/molecule/card/notification.js.map +1 -1
  20. package/es/molecule/filters/filters-wrapper.d.ts +0 -1
  21. package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
  22. package/es/molecule/filters/filters-wrapper.js +5 -9
  23. package/es/molecule/filters/filters-wrapper.js.map +1 -1
  24. package/es/molecule/filters/index.d.ts +0 -1
  25. package/es/molecule/filters/index.d.ts.map +1 -1
  26. package/es/molecule/filters/index.js +3 -6
  27. package/es/molecule/filters/index.js.map +1 -1
  28. package/es/molecule/forum/forum-post/index.d.ts.map +1 -1
  29. package/es/molecule/forum/forum-post/index.js +1 -2
  30. package/es/molecule/forum/forum-post/index.js.map +1 -1
  31. package/es/molecule/questions/drop-down/index.d.ts +0 -1
  32. package/es/molecule/questions/drop-down/index.js +3 -7
  33. package/es/molecule/questions/drop-down/index.js.map +1 -1
  34. package/es/molecule/questions/qcm/index.d.ts +0 -1
  35. package/es/molecule/questions/qcm/index.js +3 -7
  36. package/es/molecule/questions/qcm/index.js.map +1 -1
  37. package/es/molecule/questions/qcm-drag/index.d.ts +1 -3
  38. package/es/molecule/questions/qcm-drag/index.d.ts.map +1 -1
  39. package/es/molecule/questions/qcm-drag/index.js +3 -7
  40. package/es/molecule/questions/qcm-drag/index.js.map +1 -1
  41. package/es/molecule/questions/qcm-graphic/index.d.ts +0 -1
  42. package/es/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
  43. package/es/molecule/questions/qcm-graphic/index.js +3 -7
  44. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  45. package/es/molecule/questions/question-range/index.d.ts +0 -1
  46. package/es/molecule/questions/question-range/index.js +4 -8
  47. package/es/molecule/questions/question-range/index.js.map +1 -1
  48. package/es/molecule/questions/template/index.d.ts +2 -6
  49. package/es/molecule/questions/template/index.d.ts.map +1 -1
  50. package/es/molecule/questions/template/index.js +3 -7
  51. package/es/molecule/questions/template/index.js.map +1 -1
  52. package/es/molecule/share/index.d.ts.map +1 -1
  53. package/es/molecule/share/index.js +1 -5
  54. package/es/molecule/share/index.js.map +1 -1
  55. package/es/organism/user-preferences/index.d.ts +0 -1
  56. package/es/organism/user-preferences/index.js +3 -7
  57. package/es/organism/user-preferences/index.js.map +1 -1
  58. package/es/template/app-review/template-context.d.ts +1 -1
  59. package/es/template/app-review/template-context.d.ts.map +1 -1
  60. package/es/template/app-review/template-context.js +2 -1
  61. package/es/template/app-review/template-context.js.map +1 -1
  62. package/es/template/common/search-page/index.d.ts +0 -2
  63. package/es/template/common/search-page/index.d.ts.map +1 -1
  64. package/es/template/common/search-page/index.js +4 -8
  65. package/es/template/common/search-page/index.js.map +1 -1
  66. package/lib/atom/provider/index.d.ts +1 -0
  67. package/lib/atom/provider/index.d.ts.map +1 -1
  68. package/lib/atom/provider/index.js +10 -1
  69. package/lib/atom/provider/index.js.map +1 -1
  70. package/lib/atom/provider/web-context.d.ts +1 -1
  71. package/lib/atom/provider/web-context.d.ts.map +1 -1
  72. package/lib/atom/provider/web-context.js +3 -1
  73. package/lib/atom/provider/web-context.js.map +1 -1
  74. package/lib/atom/review-header-step-item/index.d.ts.map +1 -1
  75. package/lib/atom/review-header-step-item/index.js +25 -6
  76. package/lib/atom/review-header-step-item/index.js.map +1 -1
  77. package/lib/globals.d.js.map +1 -1
  78. package/lib/molecule/add-to-my-list/index.js +1 -3
  79. package/lib/molecule/add-to-my-list/index.js.map +1 -1
  80. package/lib/molecule/answer/index.d.ts.map +1 -1
  81. package/lib/molecule/answer/index.js +6 -16
  82. package/lib/molecule/answer/index.js.map +1 -1
  83. package/lib/molecule/card/notification.js +1 -3
  84. package/lib/molecule/card/notification.js.map +1 -1
  85. package/lib/molecule/filters/filters-wrapper.d.ts +0 -1
  86. package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
  87. package/lib/molecule/filters/filters-wrapper.js +5 -9
  88. package/lib/molecule/filters/filters-wrapper.js.map +1 -1
  89. package/lib/molecule/filters/index.d.ts +0 -1
  90. package/lib/molecule/filters/index.d.ts.map +1 -1
  91. package/lib/molecule/filters/index.js +3 -6
  92. package/lib/molecule/filters/index.js.map +1 -1
  93. package/lib/molecule/forum/forum-post/index.d.ts.map +1 -1
  94. package/lib/molecule/forum/forum-post/index.js +1 -2
  95. package/lib/molecule/forum/forum-post/index.js.map +1 -1
  96. package/lib/molecule/questions/drop-down/index.d.ts +0 -1
  97. package/lib/molecule/questions/drop-down/index.js +3 -7
  98. package/lib/molecule/questions/drop-down/index.js.map +1 -1
  99. package/lib/molecule/questions/qcm/index.d.ts +0 -1
  100. package/lib/molecule/questions/qcm/index.js +3 -7
  101. package/lib/molecule/questions/qcm/index.js.map +1 -1
  102. package/lib/molecule/questions/qcm-drag/index.d.ts +1 -3
  103. package/lib/molecule/questions/qcm-drag/index.d.ts.map +1 -1
  104. package/lib/molecule/questions/qcm-drag/index.js +3 -7
  105. package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
  106. package/lib/molecule/questions/qcm-graphic/index.d.ts +0 -1
  107. package/lib/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
  108. package/lib/molecule/questions/qcm-graphic/index.js +3 -7
  109. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  110. package/lib/molecule/questions/question-range/index.d.ts +0 -1
  111. package/lib/molecule/questions/question-range/index.js +4 -8
  112. package/lib/molecule/questions/question-range/index.js.map +1 -1
  113. package/lib/molecule/questions/template/index.d.ts +2 -6
  114. package/lib/molecule/questions/template/index.d.ts.map +1 -1
  115. package/lib/molecule/questions/template/index.js +3 -7
  116. package/lib/molecule/questions/template/index.js.map +1 -1
  117. package/lib/molecule/share/index.d.ts.map +1 -1
  118. package/lib/molecule/share/index.js +1 -5
  119. package/lib/molecule/share/index.js.map +1 -1
  120. package/lib/organism/user-preferences/index.d.ts +0 -1
  121. package/lib/organism/user-preferences/index.js +3 -7
  122. package/lib/organism/user-preferences/index.js.map +1 -1
  123. package/lib/template/app-review/template-context.d.ts +1 -1
  124. package/lib/template/app-review/template-context.d.ts.map +1 -1
  125. package/lib/template/app-review/template-context.js +3 -1
  126. package/lib/template/app-review/template-context.js.map +1 -1
  127. package/lib/template/common/search-page/index.d.ts +0 -2
  128. package/lib/template/common/search-page/index.d.ts.map +1 -1
  129. package/lib/template/common/search-page/index.js +4 -8
  130. package/lib/template/common/search-page/index.js.map +1 -1
  131. package/locales/en/global.json +5 -3
  132. package/locales/fr/global.json +1 -6
  133. package/locales/ru/global.json +1 -6
  134. package/package.json +2 -2
@@ -46,13 +46,10 @@ Settings.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, InputS
46
46
  const UserPreferences = props => {
47
47
  const {
48
48
  preferences = [],
49
- moreInfoAriaLabel,
50
- groupAriaLabel
49
+ moreInfoAriaLabel
51
50
  } = props;
52
51
  return /*#__PURE__*/React.createElement("div", {
53
- className: style.preferences,
54
- role: "group",
55
- "aria-label": groupAriaLabel
52
+ className: style.preferences
56
53
  }, _map(settings => /*#__PURE__*/React.createElement(Settings, _extends({}, settings, {
57
54
  key: settings.label,
58
55
  moreInfoAriaLabel: moreInfoAriaLabel
@@ -61,8 +58,7 @@ const UserPreferences = props => {
61
58
 
62
59
  UserPreferences.propTypes = process.env.NODE_ENV !== "production" ? {
63
60
  preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),
64
- moreInfoAriaLabel: PropTypes.string,
65
- groupAriaLabel: PropTypes.string
61
+ moreInfoAriaLabel: PropTypes.string
66
62
  } : {};
67
63
  export default UserPreferences;
68
64
  //# 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","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 <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 );\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;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;AAUD,CAbD;;AAeAD,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"}
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"}
@@ -22,7 +22,7 @@ export declare type TemplateContextValues = {
22
22
  handleBlur?: HandleBlur;
23
23
  handleFocus?: HandleFocus;
24
24
  };
25
- translate: (arg: string) => string;
25
+ translate: (key: string, data?: Record<string, string>) => string;
26
26
  };
27
27
  declare type Props = {
28
28
  values: TemplateContextValues;
@@ -1 +1 @@
1
- {"version":3,"file":"template-context.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/template-context.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,SAAS,EAAa,MAAM,OAAO,CAAC;AAClE,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,KAAK,EAAoB,MAAM,8BAA8B,CAAC;AACtE,OAAqB,EAAC,KAAK,EAAC,MAAM,8BAA8B,CAAC;AACjE,OAAkC,EAAC,YAAY,EAAC,MAAM,6CAA6C,CAAC;AACpG,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,oBAAY,UAAU,GAAG,MAAM,IAAI,CAAC;AACpC,oBAAY,WAAW,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;AACrD,oBAAY,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC;AAE5C,oBAAY,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,KAAK,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,CAAC;IACF,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC,CAAC;AAEF,aAAK,KAAK,GAAG;IAAC,MAAM,EAAE,qBAAqB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,CAAC;AAclE,QAAA,MAAM,kBAAkB,QAAO,qBAU9B,CAAC;AAEF,QAAA,MAAM,eAAe,yBAAwB,KAAK,gBAEjD,CAAC;AAEF,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,CAAC"}
1
+ {"version":3,"file":"template-context.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/template-context.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,SAAS,EAAa,MAAM,OAAO,CAAC;AAElE,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,E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ademy/translate';
2
3
  import { defaultBrandTheme } from '../../variables/brand.native';
3
4
  import defaultTheme from '../../variables/theme.native';
4
5
  import defaultMobileTranslations from '../../variables/default-mobile-translations';
@@ -11,7 +12,7 @@ const Context = /*#__PURE__*/createContext({
11
12
  statusBarHeight: 42
12
13
  },
13
14
  store: {},
14
- translate: arg => arg
15
+ translate: mockTranslate
15
16
  });
16
17
 
17
18
  const useTemplateContext = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"template-context.js","names":["React","createContext","useContext","defaultBrandTheme","defaultTheme","defaultMobileTranslations","Context","theme","brandTheme","translations","display","headerHeight","statusBarHeight","store","translate","arg","useTemplateContext","context","Error","TemplateContext","values","children"],"sources":["../../../src/template/app-review/template-context.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext} from 'react';\nimport {Analytics} from '../../variables/analytics';\nimport {Brand, defaultBrandTheme} from '../../variables/brand.native';\nimport defaultTheme, {Theme} from '../../variables/theme.native';\nimport defaultMobileTranslations, {Translations} from '../../variables/default-mobile-translations';\nimport {Vibration} from '../../variables/vibration';\n\nexport type HandleBlur = () => void;\nexport type HandleFocus = (id: string) => () => void;\nexport type FocusedSelectId = string | null;\n\nexport type TemplateContextValues = {\n analytics?: Analytics;\n brandTheme: Brand;\n theme: Theme;\n translations: Translations;\n vibration?: Vibration;\n display: {\n headerHeight: number;\n statusBarHeight: number;\n };\n store: {\n focusedSelectId?: FocusedSelectId;\n handleBlur?: HandleBlur;\n handleFocus?: HandleFocus;\n };\n translate: (arg: string) => string;\n};\n\ntype Props = {values: TemplateContextValues; children: ReactNode};\n\nconst Context = createContext({\n theme: defaultTheme,\n brandTheme: defaultBrandTheme,\n translations: defaultMobileTranslations,\n display: {\n headerHeight: 67,\n statusBarHeight: 42\n },\n store: {},\n translate: (arg: string) => arg\n});\n\nconst useTemplateContext = (): TemplateContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error(\n `❌ [TemplateContext] useTemplateContext must be used within a provider <TemplateContext>`\n );\n }\n\n return context;\n};\n\nconst TemplateContext = ({values, children}: Props) => {\n return <Context.Provider value={values}>{children}</Context.Provider>;\n};\n\nexport {TemplateContext, useTemplateContext};\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,aAAf,EAAyCC,UAAzC,QAA0D,OAA1D;AAEA,SAAeC,iBAAf,QAAuC,8BAAvC;AACA,OAAOC,YAAP,MAAkC,8BAAlC;AACA,OAAOC,yBAAP,MAAsD,6CAAtD;AA2BA,MAAMC,OAAO,gBAAGL,aAAa,CAAC;EAC5BM,KAAK,EAAEH,YADqB;EAE5BI,UAAU,EAAEL,iBAFgB;EAG5BM,YAAY,EAAEJ,yBAHc;EAI5BK,OAAO,EAAE;IACPC,YAAY,EAAE,EADP;IAEPC,eAAe,EAAE;EAFV,CAJmB;EAQ5BC,KAAK,EAAE,EARqB;EAS5BC,SAAS,EAAGC,GAAD,IAAiBA;AATA,CAAD,CAA7B;;AAYA,MAAMC,kBAAkB,GAAG,MAA6B;EACtD,MAAMC,OAAO,GAAGf,UAAU,CAACI,OAAD,CAA1B;;EAEA,IAAI,CAACW,OAAL,EAAc;IACZ,MAAM,IAAIC,KAAJ,CACH,yFADG,CAAN;EAGD;;EAED,OAAOD,OAAP;AACD,CAVD;;AAYA,MAAME,eAAe,GAAG,CAAC;EAACC,MAAD;EAASC;AAAT,CAAD,KAA+B;EACrD,oBAAO,oBAAC,OAAD,CAAS,QAAT;IAAkB,KAAK,EAAED;EAAzB,GAAkCC,QAAlC,CAAP;AACD,CAFD;;AAIA,SAAQF,eAAR,EAAyBH,kBAAzB"}
1
+ {"version":3,"file":"template-context.js","names":["React","createContext","useContext","mockTranslate","defaultBrandTheme","defaultTheme","defaultMobileTranslations","Context","theme","brandTheme","translations","display","headerHeight","statusBarHeight","store","translate","useTemplateContext","context","Error","TemplateContext","values","children"],"sources":["../../../src/template/app-review/template-context.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext} from 'react';\nimport {mockTranslate} from '@coorpacademy/translate';\nimport {Analytics} from '../../variables/analytics';\nimport {Brand, defaultBrandTheme} from '../../variables/brand.native';\nimport defaultTheme, {Theme} from '../../variables/theme.native';\nimport defaultMobileTranslations, {Translations} from '../../variables/default-mobile-translations';\nimport {Vibration} from '../../variables/vibration';\n\nexport type HandleBlur = () => void;\nexport type HandleFocus = (id: string) => () => void;\nexport type FocusedSelectId = string | null;\n\nexport type TemplateContextValues = {\n analytics?: Analytics;\n brandTheme: Brand;\n theme: Theme;\n translations: Translations;\n vibration?: Vibration;\n display: {\n headerHeight: number;\n statusBarHeight: number;\n };\n store: {\n focusedSelectId?: FocusedSelectId;\n handleBlur?: HandleBlur;\n handleFocus?: HandleFocus;\n };\n translate: (key: string, data?: Record<string, string>) => string;\n};\n\ntype Props = {values: TemplateContextValues; children: ReactNode};\n\nconst Context = createContext({\n theme: defaultTheme,\n brandTheme: defaultBrandTheme,\n translations: defaultMobileTranslations,\n display: {\n headerHeight: 67,\n statusBarHeight: 42\n },\n store: {},\n translate: mockTranslate\n});\n\nconst useTemplateContext = (): TemplateContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error(\n `❌ [TemplateContext] useTemplateContext must be used within a provider <TemplateContext>`\n );\n }\n\n return context;\n};\n\nconst TemplateContext = ({values, children}: Props) => {\n return <Context.Provider value={values}>{children}</Context.Provider>;\n};\n\nexport {TemplateContext, useTemplateContext};\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,aAAf,EAAyCC,UAAzC,QAA0D,OAA1D;AACA,SAAQC,aAAR,QAA4B,yBAA5B;AAEA,SAAeC,iBAAf,QAAuC,8BAAvC;AACA,OAAOC,YAAP,MAAkC,8BAAlC;AACA,OAAOC,yBAAP,MAAsD,6CAAtD;AA2BA,MAAMC,OAAO,gBAAGN,aAAa,CAAC;EAC5BO,KAAK,EAAEH,YADqB;EAE5BI,UAAU,EAAEL,iBAFgB;EAG5BM,YAAY,EAAEJ,yBAHc;EAI5BK,OAAO,EAAE;IACPC,YAAY,EAAE,EADP;IAEPC,eAAe,EAAE;EAFV,CAJmB;EAQ5BC,KAAK,EAAE,EARqB;EAS5BC,SAAS,EAAEZ;AATiB,CAAD,CAA7B;;AAYA,MAAMa,kBAAkB,GAAG,MAA6B;EACtD,MAAMC,OAAO,GAAGf,UAAU,CAACK,OAAD,CAA1B;;EAEA,IAAI,CAACU,OAAL,EAAc;IACZ,MAAM,IAAIC,KAAJ,CACH,yFADG,CAAN;EAGD;;EAED,OAAOD,OAAP;AACD,CAVD;;AAYA,MAAME,eAAe,GAAG,CAAC;EAACC,MAAD;EAASC;AAAT,CAAD,KAA+B;EACrD,oBAAO,oBAAC,OAAD,CAAS,QAAT;IAAkB,KAAK,EAAED;EAAzB,GAAkCC,QAAlC,CAAP;AACD,CAFD;;AAIA,SAAQF,eAAR,EAAyBH,kBAAzB"}
@@ -64,7 +64,6 @@ declare namespace SearchPage {
64
64
  onToggleSorts: PropTypes.Requireable<(...args: any[]) => any>;
65
65
  moreSortAriaLabel: PropTypes.Requireable<string>;
66
66
  moreFilterAriaLabel: PropTypes.Requireable<string>;
67
- filterGroupAriaLabel: PropTypes.Requireable<string>;
68
67
  }>>;
69
68
  const cards: PropTypes.Requireable<PropTypes.InferProps<{
70
69
  list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
@@ -101,7 +100,6 @@ declare namespace SearchPage {
101
100
  }>>;
102
101
  const moreSortAriaLabel: PropTypes.Requireable<string>;
103
102
  const moreFilterAriaLabel: PropTypes.Requireable<string>;
104
- const filterGroupAriaLabel: PropTypes.Requireable<string>;
105
103
  }
106
104
  }
107
105
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,mEAoDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,mEAgDC"}
@@ -21,8 +21,7 @@ const SearchPage = (props, context) => {
21
21
  clearFilters,
22
22
  recommendations,
23
23
  moreSortAriaLabel,
24
- moreFilterAriaLabel,
25
- filterGroupAriaLabel
24
+ moreFilterAriaLabel
26
25
  } = props;
27
26
  const {
28
27
  skin
@@ -45,14 +44,12 @@ const SearchPage = (props, context) => {
45
44
  }))), recommendationsView) : /*#__PURE__*/React.createElement(CardsGrid, cards);
46
45
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Filters, _extends({}, searchFilters, {
47
46
  moreSortAriaLabel: moreSortAriaLabel,
48
- moreFilterAriaLabel: moreFilterAriaLabel,
49
- filterGroupAriaLabel: filterGroupAriaLabel
47
+ moreFilterAriaLabel: moreFilterAriaLabel
50
48
  })), /*#__PURE__*/React.createElement("div", {
51
49
  "data-name": "searchResult",
52
50
  className: style.cardsWrapper
53
51
  }, /*#__PURE__*/React.createElement("div", {
54
- className: style.title,
55
- role: "status"
52
+ className: style.title
56
53
  }, title), cardsView));
57
54
  };
58
55
 
@@ -67,8 +64,7 @@ SearchPage.propTypes = process.env.NODE_ENV !== "production" ? {
67
64
  clearFilters: PropTypes.shape(Button.propTypes),
68
65
  recommendations: PropTypes.shape(CardsList.propTypes),
69
66
  moreSortAriaLabel: PropTypes.string,
70
- moreFilterAriaLabel: PropTypes.string,
71
- filterGroupAriaLabel: PropTypes.string
67
+ moreFilterAriaLabel: PropTypes.string
72
68
  } : {};
73
69
  export default SearchPage;
74
70
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","filterGroupAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","childContextTypes","propTypes","string","shape"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel,\n filterGroupAriaLabel\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n filterGroupAriaLabel={filterGroupAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title} role=\"status\">\n {title}\n </div>\n {cardsView}\n </div>\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAA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ACE;IAAK,SAAS,EAAEtB,KAAK,CAACI,KAAtB;IAA6B,IAAI,EAAC;EAAlC,GACGA,KADH,CADF,EAIGY,SAJH,CAPF,CADF;AAgBD,CApDD;;AAsDAf,UAAU,CAACsB,YAAX,GAA0B;EACxBV,IAAI,EAAElB,QAAQ,CAAC6B,iBAAT,CAA2BX;AADT,CAA1B;AAIAZ,UAAU,CAACwB,SAAX,2CAAuB;EACrBlB,cAAc,EAAEb,SAAS,CAACgC,MADL;EAErBtB,KAAK,EAAEV,SAAS,CAACgC,MAFI;EAGrBrB,aAAa,EAAEX,SAAS,CAACiC,KAAV,CAAgB9B,OAAO,CAAC4B,SAAxB,CAHM;EAIrBnB,KAAK,EAAEZ,SAAS,CAACiC,KAAV,CAAgB7B,SAAS,CAAC2B,SAA1B,CAJc;EAKrBjB,YAAY,EAAEd,SAAS,CAACiC,KAAV,CAAgB/B,MAAM,CAAC6B,SAAvB,CALO;EAMrBhB,eAAe,EAAEf,SAAS,CAACiC,KAAV,CAAgB5B,SAAS,CAAC0B,SAA1B,CANI;EAOrBf,iBAAiB,EAAEhB,SAAS,CAACgC,MAPR;EAQrBf,mBAAmB,EAAEjB,SAAS,CAACgC,MARV;EASrBd,oBAAoB,EAAElB,SAAS,CAACgC;AATX,CAAvB;AAYA,eAAezB,UAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","style","SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","childContextTypes","propTypes","string","shape"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title}>{title}</div>\n {cardsView}\n </div>\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,OAAP,MAAoB,2BAApB;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,SAAP,MAAsB,wCAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;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AC+B,MADL;EAErBrB,KAAK,EAAEV,SAAS,CAAC+B,MAFI;EAGrBpB,aAAa,EAAEX,SAAS,CAACgC,KAAV,CAAgB7B,OAAO,CAAC2B,SAAxB,CAHM;EAIrBlB,KAAK,EAAEZ,SAAS,CAACgC,KAAV,CAAgB5B,SAAS,CAAC0B,SAA1B,CAJc;EAKrBhB,YAAY,EAAEd,SAAS,CAACgC,KAAV,CAAgB9B,MAAM,CAAC4B,SAAvB,CALO;EAMrBf,eAAe,EAAEf,SAAS,CAACgC,KAAV,CAAgB3B,SAAS,CAACyB,SAA1B,CANI;EAOrBd,iBAAiB,EAAEhB,SAAS,CAAC+B,MAPR;EAQrBd,mBAAmB,EAAEjB,SAAS,CAAC+B;AARV,CAAvB;AAWA,eAAexB,UAAf"}
@@ -2,6 +2,7 @@ export default Provider;
2
2
  import WebContext from "./web-context";
3
3
  import { useWebContext } from "./web-context";
4
4
  export function GetSkinFromContext(legacyContext: any): any;
5
+ export function GetTranslateFromContext(legacyContext: any): any;
5
6
  declare class Provider extends React.Component<any, any, any> {
6
7
  static propTypes: {
7
8
  history: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/provider/index.js"],"names":[],"mappings":";;;AAqGA,4DAMC;AAnDD;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQE;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKE;IAEF;;;;MAQC;IAED,sCAKC;IADC;;;;;MAA+D;IAGjE;;;;;MAEC;CAMF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/provider/index.js"],"names":[],"mappings":";;;AAqGA,4DAMC;AAED,iEAKC;AA1DD;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQE;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKE;IAEF;;;;MAQC;IAED,sCAKC;IADC;;;;;MAA+D;IAGjE;;;;;MAEC;CAMF"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = exports.GetSkinFromContext = void 0;
4
+ exports.default = exports.GetTranslateFromContext = exports.GetSkinFromContext = void 0;
5
5
 
6
6
  var _getOr2 = _interopRequireDefault(require("lodash/fp/getOr"));
7
7
 
@@ -144,6 +144,15 @@ const GetSkinFromContext = legacyContext => {
144
144
  };
145
145
 
146
146
  exports.GetSkinFromContext = GetSkinFromContext;
147
+
148
+ const GetTranslateFromContext = legacyContext => {
149
+ const context = (0, _webContext.useWebContext)();
150
+ const legacyTranslate = (0, _get2.default)('translate', legacyContext);
151
+ const translate = (0, _getOr2.default)(legacyTranslate, 'translate', context);
152
+ return translate;
153
+ };
154
+
155
+ exports.GetTranslateFromContext = GetTranslateFromContext;
147
156
  var _default = Provider;
148
157
  exports.default = _default;
149
158
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DEFAULT_SKIN","common","good","bad","primary","life","brand","primaryAdd1","primaryAdd2","primaryAdd3","primaryAdd4","xtraLightGrey","light","medium","dark","grey","orangeAdd","orange","positive","lightGreen","negative","battle","white","black","mergeSkin","skin","historyShape","PropTypes","shape","createHref","func","push","skinShape","objectOf","ColorPropType","images","SrcPropType","logo","login","icons","HexPropType","mod","courses","arrayOf","texts","translateShape","Provider","React","Component","getDerivedStateFromProps","props","history","translate","constructor","context","Vimeo","state","getChildContext","render","children","Children","only","childContextTypes","object","propTypes","node","isRequired","GetSkinFromContext","legacyContext","useWebContext","legacySkin"],"sources":["../../../src/atom/provider/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {defaultsDeep, get, getOr} from 'lodash/fp';\nimport {SrcPropType, ColorPropType, HexPropType} from '../../util/proptypes';\nimport WebContext, {useWebContext} from './web-context';\n\nconst DEFAULT_SKIN = {\n common: {\n good: '#24b694',\n bad: '#ed1c24',\n primary: '#00B0FF',\n life: '#ed1c24',\n brand: '#00B0FF',\n primaryAdd1: '#B3E5FC',\n primaryAdd2: '#0091EA',\n primaryAdd3: '#0277BD',\n primaryAdd4: '#015798',\n xtraLightGrey: '#FAFAFA',\n light: '#ECEFF1',\n medium: '#90A4AE',\n dark: '#546E7A',\n grey: '#607D8B',\n orangeAdd: '#FF7043',\n orange: '#FFA000',\n positive: '#3EC483',\n lightGreen: '#66BB6A',\n negative: '#F73F52',\n battle: '#FFE100',\n white: '#FFFFFF',\n black: '#14171A'\n }\n};\n\nconst mergeSkin = (skin = {}) => defaultsDeep(DEFAULT_SKIN, skin);\n\nconst historyShape = PropTypes.shape({\n createHref: PropTypes.func,\n push: PropTypes.func\n});\n\nconst skinShape = PropTypes.shape({\n common: PropTypes.objectOf(ColorPropType),\n images: PropTypes.shape({\n 'logo-mobile': SrcPropType,\n logo: SrcPropType,\n 'logo-email': SrcPropType,\n login: SrcPropType\n }),\n icons: PropTypes.objectOf(HexPropType),\n mod: PropTypes.objectOf(ColorPropType),\n courses: PropTypes.arrayOf(ColorPropType),\n texts: PropTypes.objectOf(ColorPropType)\n});\n\nconst translateShape = PropTypes.func;\n\nclass Provider extends React.Component {\n static propTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n children: PropTypes.node.isRequired,\n Vimeo: PropTypes.shape({\n common: PropTypes.func\n })\n };\n\n static childContextTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n Vimeo: PropTypes.object\n };\n\n static getDerivedStateFromProps(props) {\n const {history, skin, translate} = props;\n\n return {\n history,\n skin: mergeSkin(skin),\n translate\n };\n }\n\n constructor(props, context) {\n super(props, context);\n const {history, skin, translate, Vimeo} = props;\n // eslint-disable-next-line react/no-unused-state\n this.state = {history, skin: mergeSkin(skin), translate, Vimeo};\n }\n\n getChildContext() {\n return this.state;\n }\n\n render() {\n const {children} = this.props;\n return React.Children.only(children);\n }\n}\n\nconst GetSkinFromContext = legacyContext => {\n const context = useWebContext();\n const legacySkin = get('skin', legacyContext);\n const skin = getOr(legacySkin, 'skin', context);\n\n return skin;\n};\n\nexport {WebContext, useWebContext, GetSkinFromContext};\nexport default Provider;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;AAEA,MAAMA,YAAY,GAAG;EACnBC,MAAM,EAAE;IACNC,IAAI,EAAE,SADA;IAENC,GAAG,EAAE,SAFC;IAGNC,OAAO,EAAE,SAHH;IAINC,IAAI,EAAE,SAJA;IAKNC,KAAK,EAAE,SALD;IAMNC,WAAW,EAAE,SANP;IAONC,WAAW,EAAE,SAPP;IAQNC,WAAW,EAAE,SARP;IASNC,WAAW,EAAE,SATP;IAUNC,aAAa,EAAE,SAVT;IAWNC,KAAK,EAAE,SAXD;IAYNC,MAAM,EAAE,SAZF;IAaNC,IAAI,EAAE,SAbA;IAcNC,IAAI,EAAE,SAdA;IAeNC,SAAS,EAAE,SAfL;IAgBNC,MAAM,EAAE,SAhBF;IAiBNC,QAAQ,EAAE,SAjBJ;IAkBNC,UAAU,EAAE,SAlBN;IAmBNC,QAAQ,EAAE,SAnBJ;IAoBNC,MAAM,EAAE,SApBF;IAqBNC,KAAK,EAAE,SArBD;IAsBNC,KAAK,EAAE;EAtBD;AADW,CAArB;;AA2BA,MAAMC,SAAS,GAAG,CAACC,IAAI,GAAG,EAAR,KAAe,4BAAazB,YAAb,EAA2ByB,IAA3B,CAAjC;;AAEA,MAAMC,YAAY,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EACnCC,UAAU,EAAEF,kBAAA,CAAUG,IADa;EAEnCC,IAAI,EAAEJ,kBAAA,CAAUG;AAFmB,CAAhB,CAArB;;AAKA,MAAME,SAAS,GAAGL,kBAAA,CAAUC,KAAV,CAAgB;EAChC3B,MAAM,EAAE0B,kBAAA,CAAUM,QAAV,CAAmBC,wBAAnB,CADwB;EAEhCC,MAAM,EAAER,kBAAA,CAAUC,KAAV,CAAgB;IACtB,eAAeQ,sBADO;IAEtBC,IAAI,E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YADgB;EAEzBD,IAAI,EAAEO,SAFmB;EAGzBoB,SAAS,EAAEP,cAHc;EAIzBU,KAAK,EAAE5B,kBAAA,CAAUoC;AAJQ,C;AAXvBjB,Q,CACGkB,S,2CAAY;EACjBb,OAAO,EAAEzB,YADQ;EAEjBD,IAAI,EAAEO,SAFW;EAGjBoB,SAAS,EAAEP,cAHM;EAIjBc,QAAQ,EAAEhC,kBAAA,CAAUsC,IAAV,CAAeC,UAJR;EAKjBX,KAAK,EAAE5B,kBAAA,CAAUC,KAAV,CAAgB;IACrB3B,MAAM,EAAE0B,kBAAA,CAAUG;EADG,CAAhB;AALU,C;;AA4CrB,MAAMqC,kBAAkB,GAAGC,aAAa,IAAI;EAC1C,MAAMd,OAAO,GAAG,IAAAe,yBAAA,GAAhB;EACA,MAAMC,UAAU,GAAG,mBAAI,MAAJ,EAAYF,aAAZ,CAAnB;EACA,MAAM3C,IAAI,GAAG,qBAAM6C,UAAN,EAAkB,MAAlB,EAA0BhB,OAA1B,CAAb;EAEA,OAAO7B,IAAP;AACD,CAND;;;eASeqB,Q"}
1
+ {"version":3,"file":"index.js","names":["DEFAULT_SKIN","common","good","bad","primary","life","brand","primaryAdd1","primaryAdd2","primaryAdd3","primaryAdd4","xtraLightGrey","light","medium","dark","grey","orangeAdd","orange","positive","lightGreen","negative","battle","white","black","mergeSkin","skin","historyShape","PropTypes","shape","createHref","func","push","skinShape","objectOf","ColorPropType","images","SrcPropType","logo","login","icons","HexPropType","mod","courses","arrayOf","texts","translateShape","Provider","React","Component","getDerivedStateFromProps","props","history","translate","constructor","context","Vimeo","state","getChildContext","render","children","Children","only","childContextTypes","object","propTypes","node","isRequired","GetSkinFromContext","legacyContext","useWebContext","legacySkin","GetTranslateFromContext","legacyTranslate"],"sources":["../../../src/atom/provider/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {defaultsDeep, get, getOr} from 'lodash/fp';\nimport {SrcPropType, ColorPropType, HexPropType} from '../../util/proptypes';\nimport WebContext, {useWebContext} from './web-context';\n\nconst DEFAULT_SKIN = {\n common: {\n good: '#24b694',\n bad: '#ed1c24',\n primary: '#00B0FF',\n life: '#ed1c24',\n brand: '#00B0FF',\n primaryAdd1: '#B3E5FC',\n primaryAdd2: '#0091EA',\n primaryAdd3: '#0277BD',\n primaryAdd4: '#015798',\n xtraLightGrey: '#FAFAFA',\n light: '#ECEFF1',\n medium: '#90A4AE',\n dark: '#546E7A',\n grey: '#607D8B',\n orangeAdd: '#FF7043',\n orange: '#FFA000',\n positive: '#3EC483',\n lightGreen: '#66BB6A',\n negative: '#F73F52',\n battle: '#FFE100',\n white: '#FFFFFF',\n black: '#14171A'\n }\n};\n\nconst mergeSkin = (skin = {}) => defaultsDeep(DEFAULT_SKIN, skin);\n\nconst historyShape = PropTypes.shape({\n createHref: PropTypes.func,\n push: PropTypes.func\n});\n\nconst skinShape = PropTypes.shape({\n common: PropTypes.objectOf(ColorPropType),\n images: PropTypes.shape({\n 'logo-mobile': SrcPropType,\n logo: SrcPropType,\n 'logo-email': SrcPropType,\n login: SrcPropType\n }),\n icons: PropTypes.objectOf(HexPropType),\n mod: PropTypes.objectOf(ColorPropType),\n courses: PropTypes.arrayOf(ColorPropType),\n texts: PropTypes.objectOf(ColorPropType)\n});\n\nconst translateShape = PropTypes.func;\n\nclass Provider extends React.Component {\n static propTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n children: PropTypes.node.isRequired,\n Vimeo: PropTypes.shape({\n common: PropTypes.func\n })\n };\n\n static childContextTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n Vimeo: PropTypes.object\n };\n\n static getDerivedStateFromProps(props) {\n const {history, skin, translate} = props;\n\n return {\n history,\n skin: mergeSkin(skin),\n translate\n };\n }\n\n constructor(props, context) {\n super(props, context);\n const {history, skin, translate, Vimeo} = props;\n // eslint-disable-next-line react/no-unused-state\n this.state = {history, skin: mergeSkin(skin), translate, Vimeo};\n }\n\n getChildContext() {\n return this.state;\n }\n\n render() {\n const {children} = this.props;\n return React.Children.only(children);\n }\n}\n\nconst GetSkinFromContext = legacyContext => {\n const context = useWebContext();\n const legacySkin = get('skin', legacyContext);\n const skin = getOr(legacySkin, 'skin', context);\n\n return skin;\n};\n\nconst GetTranslateFromContext = legacyContext => {\n const context = useWebContext();\n const legacyTranslate = get('translate', legacyContext);\n const translate = getOr(legacyTranslate, 'translate', context);\n return translate;\n};\n\nexport {WebContext, useWebContext, GetSkinFromContext, GetTranslateFromContext};\nexport default Provider;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;AAEA,MAAMA,YAAY,GAAG;EACnBC,MAAM,EAAE;IACNC,IAAI,EAAE,SADA;IAENC,GAAG,EAAE,SAFC;IAGNC,OAAO,EAAE,SAHH;IAINC,IAAI,EAAE,SAJA;IAKNC,KAAK,EAAE,SALD;IAMNC,WAAW,EAAE,SANP;IAONC,WAAW,EAAE,SAPP;IAQNC,WAAW,EAAE,SARP;IASNC,WAAW,EAAE,SATP;IAUNC,aAAa,EAAE,SAVT;IAWNC,KAAK,EAAE,SAXD;IAYNC,MAAM,EAAE,SAZF;IAaNC,IAAI,EAAE,SAbA;IAcNC,IAAI,EAAE,SAdA;IAeNC,SAAS,EAAE,SAfL;IAgBNC,MAAM,EAAE,SAhBF;IAiBNC,QAAQ,EAAE,SAjBJ;IAkBNC,UAAU,EAAE,SAlBN;IAmBNC,QAAQ,EAAE,SAnBJ;IAoBNC,MAAM,EAAE,SApBF;IAqBNC,KAAK,EAAE,SArBD;IAsBNC,KAAK,EAAE;EAtBD;AADW,CAArB;;AA2BA,MAAMC,SAAS,GAAG,CAACC,IAAI,GAAG,EAAR,KAAe,4BAAazB,YAAb,EAA2ByB,IAA3B,CAAjC;;AAEA,MAAMC,YAAY,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EACnCC,UAAU,EAAEF,kBAAA,CAAUG,IADa;EAEnCC,IAAI,EAAEJ,kBAAA,CAAUG;AAF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translate: (key: string, data?: unknown) => string;
9
+ translate: (key: string, data?: Record<string, string>) => string;
10
10
  };
11
11
  declare type Props = WebContextValues & {
12
12
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"web-context.d.ts","sourceRoot":"","sources":["../../../src/atom/provider/web-context.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,SAAS,EAAa,MAAM,OAAO,CAAC;AAElE,aAAK,IAAI,GAAG;IACV,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;CACpD,CAAC;AAMF,aAAK,KAAK,GAAG,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,UAAU,2BAA0B,KAAK,gBAE9C,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,gBAQhC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"web-context.d.ts","sourceRoot":"","sources":["../../../src/atom/provider/web-context.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,SAAS,EAAa,MAAM,OAAO,CAAC;AAGlE,aAAK,IAAI,GAAG;IACV,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;CACnE,CAAC;AAMF,aAAK,KAAK,GAAG,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,UAAU,2BAA0B,KAAK,gBAE9C,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,gBAQhC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -5,6 +5,8 @@ exports.useWebContext = exports.default = void 0;
5
5
 
6
6
  var _react = _interopRequireWildcard(require("react"));
7
7
 
8
+ var _translate = require("@coorpacademy/translate");
9
+
8
10
  const _excluded = ["children"];
9
11
 
10
12
  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); }
@@ -14,7 +16,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
14
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
15
17
 
16
18
  const Context = /*#__PURE__*/(0, _react.createContext)({
17
- translate: key => key
19
+ translate: _translate.mockTranslate
18
20
  });
19
21
 
20
22
  const WebContext = _ref => {
@@ -1 +1 @@
1
- {"version":3,"file":"web-context.js","names":["Context","createContext","translate","key","WebContext","children","value","useWebContext","context","useContext","Error"],"sources":["../../../src/atom/provider/web-context.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext} from 'react';\n\ntype Skin = {\n common: {\n primary: string;\n };\n};\n\ntype WebContextValues = {\n skin?: Skin;\n translate: (key: string, data?: unknown) => string;\n};\n\nconst Context = createContext({\n translate: (key: string) => key\n});\n\ntype Props = WebContextValues & {\n children: ReactNode;\n};\n\nconst WebContext = ({children, ...value}: Props) => {\n return <Context.Provider value={value}>{children}</Context.Provider>;\n};\n\nexport const useWebContext = (): WebContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error('❌ [WebContext] useWebContext must be used within a provider <WebContext>');\n }\n\n return context;\n};\n\nexport default WebContext;\n"],"mappings":";;;;;AAAA;;;;;;;;;;AAaA,MAAMA,OAAO,gBAAG,IAAAC,oBAAA,EAAc;EAC5BC,SAAS,EAAGC,GAAD,IAAiBA;AADA,CAAd,CAAhB;;AAQA,MAAMC,UAAU,GAAG,QAAiC;EAAA,IAAhC;IAACC;EAAD,CAAgC;EAAA,IAAlBC,KAAkB;;EAClD,oBAAO,6BAAC,OAAD,CAAS,QAAT;IAAkB,KAAK,EAAEA;EAAzB,GAAiCD,QAAjC,CAAP;AACD,CAFD;;AAIO,MAAME,aAAa,GAAG,MAAwB;EACnD,MAAMC,OAAO,GAAG,IAAAC,iBAAA,EAAWT,OAAX,CAAhB;;EAEA,IAAI,CAACQ,OAAL,EAAc;IACZ,MAAM,IAAIE,KAAJ,CAAU,0EAAV,CAAN;EACD;;EAED,OAAOF,OAAP;AACD,CARM;;;eAUQJ,U"}
1
+ {"version":3,"file":"web-context.js","names":["Context","createContext","translate","mockTranslate","WebContext","children","value","useWebContext","context","useContext","Error"],"sources":["../../../src/atom/provider/web-context.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext} from 'react';\nimport {mockTranslate} from '@coorpacademy/translate';\n\ntype Skin = {\n common: {\n primary: string;\n };\n};\n\ntype WebContextValues = {\n skin?: Skin;\n translate: (key: string, data?: Record<string, string>) => string;\n};\n\nconst Context = createContext({\n translate: mockTranslate\n});\n\ntype Props = WebContextValues & {\n children: ReactNode;\n};\n\nconst WebContext = ({children, ...value}: Props) => {\n return <Context.Provider value={value}>{children}</Context.Provider>;\n};\n\nexport const useWebContext = (): WebContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error('❌ [WebContext] useWebContext must be used within a provider <WebContext>');\n }\n\n return context;\n};\n\nexport default WebContext;\n"],"mappings":";;;;;AAAA;;AACA;;;;;;;;;;AAaA,MAAMA,OAAO,gBAAG,IAAAC,oBAAA,EAAc;EAC5BC,SAAS,EAAEC;AADiB,CAAd,CAAhB;;AAQA,MAAMC,UAAU,GAAG,QAAiC;EAAA,IAAhC;IAACC;EAAD,CAAgC;EAAA,IAAlBC,KAAkB;;EAClD,oBAAO,6BAAC,OAAD,CAAS,QAAT;IAAkB,KAAK,EAAEA;EAAzB,GAAiCD,QAAjC,CAAP;AACD,CAFD;;AAIO,MAAME,aAAa,GAAG,MAAwB;EACnD,MAAMC,OAAO,GAAG,IAAAC,iBAAA,EAAWT,OAAX,CAAhB;;EAEA,IAAI,CAACQ,OAAL,EAAc;IACZ,MAAM,IAAIE,KAAJ,CAAU,0EAAV,CAAN;EACD;;EAED,OAAOF,OAAP;AACD,CARM;;;eAUQJ,U"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-header-step-item/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAiCvD,QAAA,MAAM,oBAAoB;YAAW,mBAAmB;;;;;;CAevD,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-header-step-item/index.tsx"],"names":[],"mappings":";AAQA,OAAkB,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAsDvD,QAAA,MAAM,oBAAoB;YAAW,mBAAmB;;;;;;CAevD,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
@@ -9,34 +9,50 @@ var _classnames = _interopRequireDefault(require("classnames"));
9
9
 
10
10
  var _novaIcons = require("@coorpacademy/nova-icons");
11
11
 
12
+ var _provider = require("../provider");
13
+
12
14
  var _style = _interopRequireDefault(require("./style.css"));
13
15
 
14
16
  var _types = _interopRequireDefault(require("./types"));
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
18
- const Content = ({
19
- icon,
20
- current,
21
- value
22
- }) => {
20
+ const Content = props => {
21
+ const {
22
+ icon,
23
+ current,
24
+ value
25
+ } = props;
26
+ const translate = (0, _provider.GetTranslateFromContext)();
23
27
  let child;
28
+ let ariaDescription;
24
29
 
25
30
  switch (icon) {
26
31
  case 'no-answer':
27
32
  child = value;
33
+ ariaDescription = current ? translate('review_header_step_item.current_question', {
34
+ headerStepValue: value
35
+ }) : translate('review_header_step_item.not_answered_question', {
36
+ headerStepValue: value
37
+ });
28
38
  break;
29
39
 
30
40
  case 'right':
31
41
  child = /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyCheck, {
32
42
  className: (0, _classnames.default)(_style.default.rightIcon, current && _style.default.currentRightIcon)
33
43
  });
44
+ ariaDescription = translate('review_header_step_item.correct_question', {
45
+ headerStepValue: value
46
+ });
34
47
  break;
35
48
 
36
49
  case 'wrong':
37
50
  child = /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusClose, {
38
51
  className: (0, _classnames.default)(_style.default.wrongIcon, current && _style.default.currentWrongIcon)
39
52
  });
53
+ ariaDescription = translate('review_header_step_item.incorrect_question', {
54
+ headerStepValue: value
55
+ });
40
56
  break;
41
57
 
42
58
  default:
@@ -45,7 +61,10 @@ const Content = ({
45
61
 
46
62
  return /*#__PURE__*/_react.default.createElement("span", {
47
63
  className: _style.default.value,
48
- "aria-label": `step ${value}`
64
+ "aria-label": translate('review_header_step_item.aria_label', {
65
+ headerStepValue: value
66
+ }),
67
+ "aria-describedby": ariaDescription
49
68
  }, child);
50
69
  };
51
70
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Content","icon","current","value","child","classnames","style","rightIcon","currentRightIcon","wrongIcon","currentWrongIcon","ReviewHeaderStepItem","props","default","right","wrong","propTypes"],"sources":["../../../src/atom/review-header-step-item/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\nimport propTypes, {HeaderStepItemProps} from './types';\n\nconst Content = ({icon, current, value}: HeaderStepItemProps) => {\n let child;\n\n switch (icon) {\n case 'no-answer':\n child = value;\n break;\n\n case 'right':\n child = (\n <RightIcon className={classnames(style.rightIcon, current && style.currentRightIcon)} />\n );\n break;\n\n case 'wrong':\n child = (\n <WrongIcon className={classnames(style.wrongIcon, current && style.currentWrongIcon)} />\n );\n break;\n\n default:\n return null;\n }\n\n return (\n <span className={style.value} aria-label={`step ${value}`}>\n {child}\n </span>\n );\n};\n\nconst ReviewHeaderStepItem = (props: HeaderStepItemProps) => {\n const {icon, current} = props;\n return (\n <div\n className={classnames(\n style.default,\n icon === 'right' && style.right,\n icon === 'wrong' && style.wrong,\n current && style.current\n )}\n data-name=\"header-step-item\"\n >\n <Content {...props} />\n </div>\n );\n};\n\nReviewHeaderStepItem.propTypes = propTypes;\n\nexport default ReviewHeaderStepItem;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;AACA;;;;AAEA,MAAMA,OAAO,GAAG,CAAC;EAACC,IAAD;EAAOC,OAAP;EAAgBC;AAAhB,CAAD,KAAiD;EAC/D,IAAIC,KAAJ;;EAEA,QAAQH,IAAR;IACE,KAAK,WAAL;MACEG,KAAK,GAAGD,KAAR;MACA;;IAEF,KAAK,OAAL;MACEC,KAAK,gBACH,6BAAC,2CAAD;QAAW,SAAS,EAAE,IAAAC,mBAAA,EAAWC,cAAA,CAAMC,SAAjB,EAA4BL,OAAO,IAAII,cAAA,CAAME,gBAA7C;MAAtB,EADF;MAGA;;IAEF,KAAK,OAAL;MACEJ,KAAK,gBACH,6BAAC,+BAAD;QAAW,SAAS,EAAE,IAAAC,mBAAA,EAAWC,cAAA,CAAMG,SAAjB,EAA4BP,OAAO,IAAII,cAAA,CAAMI,gBAA7C;MAAtB,EADF;MAGA;;IAEF;MACE,OAAO,IAAP;EAlBJ;;EAqBA,oBACE;IAAM,SAAS,EAAEJ,cAAA,CAAMH,KAAvB;IAA8B,cAAa,QAAOA,KAAM;EAAxD,GACGC,KADH,CADF;AAKD,CA7BD;;AA+BA,MAAMO,oBAAoB,GAAIC,KAAD,IAAgC;EAC3D,MAAM;IAACX,IAAD;IAAOC;EAAP,IAAkBU,KAAxB;EACA,oBACE;IACE,SAAS,EAAE,IAAAP,mBAAA,EACTC,cAAA,CAAMO,OADG,EAETZ,IAAI,KAAK,OAAT,IAAoBK,cAAA,CAAMQ,KAFjB,EAGTb,IAAI,KAAK,OAAT,IAAoBK,cAAA,CAAMS,KAHjB,EAITb,OAAO,IAAII,cAAA,CAAMJ,OAJR,CADb;IAOE,aAAU;EAPZ,gBASE,6BAAC,OAAD,EAAaU,KAAb,CATF,CADF;AAaD,CAfD;;AAiBAD,oBAAoB,CAACK,SAArB,2CAAiCA,cAAjC;eAEeL,oB"}
1
+ {"version":3,"file":"index.js","names":["Content","props","icon","current","value","translate","GetTranslateFromContext","child","ariaDescription","headerStepValue","classnames","style","rightIcon","currentRightIcon","wrongIcon","currentWrongIcon","ReviewHeaderStepItem","default","right","wrong","propTypes"],"sources":["../../../src/atom/review-header-step-item/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport {GetTranslateFromContext} from '../provider';\nimport style from './style.css';\nimport propTypes, {HeaderStepItemProps} from './types';\n\nconst Content = (props: HeaderStepItemProps) => {\n const {icon, current, value} = props;\n const translate = GetTranslateFromContext();\n let child;\n let ariaDescription;\n switch (icon) {\n case 'no-answer':\n child = value;\n ariaDescription = current\n ? translate('review_header_step_item.current_question', {\n headerStepValue: value\n })\n : translate('review_header_step_item.not_answered_question', {\n headerStepValue: value\n });\n break;\n\n case 'right':\n child = (\n <RightIcon className={classnames(style.rightIcon, current && style.currentRightIcon)} />\n );\n ariaDescription = translate('review_header_step_item.correct_question', {\n headerStepValue: value\n });\n break;\n\n case 'wrong':\n child = (\n <WrongIcon className={classnames(style.wrongIcon, current && style.currentWrongIcon)} />\n );\n ariaDescription = translate('review_header_step_item.incorrect_question', {\n headerStepValue: value\n });\n break;\n\n default:\n return null;\n }\n\n return (\n <span\n className={style.value}\n aria-label={translate('review_header_step_item.aria_label', {\n headerStepValue: value\n })}\n aria-describedby={ariaDescription}\n >\n {child}\n </span>\n );\n};\n\nconst ReviewHeaderStepItem = (props: HeaderStepItemProps) => {\n const {icon, current} = props;\n return (\n <div\n className={classnames(\n style.default,\n icon === 'right' && style.right,\n icon === 'wrong' && style.wrong,\n current && style.current\n )}\n data-name=\"header-step-item\"\n >\n <Content {...props} />\n </div>\n );\n};\n\nReviewHeaderStepItem.propTypes = propTypes;\n\nexport default ReviewHeaderStepItem;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAIC,KAAD,IAAgC;EAC9C,MAAM;IAACC,IAAD;IAAOC,OAAP;IAAgBC;EAAhB,IAAyBH,KAA/B;EACA,MAAMI,SAAS,GAAG,IAAAC,iCAAA,GAAlB;EACA,IAAIC,KAAJ;EACA,IAAIC,eAAJ;;EACA,QAAQN,IAAR;IACE,KAAK,WAAL;MACEK,KAAK,GAAGH,KAAR;MACAI,eAAe,GAAGL,OAAO,GACrBE,SAAS,CAAC,0CAAD,EAA6C;QACpDI,eAAe,EAAEL;MADmC,CAA7C,CADY,GAIrBC,SAAS,CAAC,+CAAD,EAAkD;QACzDI,eAAe,EAAEL;MADwC,CAAlD,CAJb;MAOA;;IAEF,KAAK,OAAL;MACEG,KAAK,gBACH,6BAAC,2CAAD;QAAW,SAAS,EAAE,IAAAG,mBAAA,EAAWC,cAAA,CAAMC,SAAjB,EAA4BT,OAAO,IAAIQ,cAAA,CAAME,gBAA7C;MAAtB,EADF;MAGAL,eAAe,GAAGH,SAAS,CAAC,0CAAD,EAA6C;QACtEI,eAAe,EAAEL;MADqD,CAA7C,CAA3B;MAGA;;IAEF,KAAK,OAAL;MACEG,KAAK,gBACH,6BAAC,+BAAD;QAAW,SAAS,EAAE,IAAAG,mBAAA,EAAWC,cAAA,CAAMG,SAAjB,EAA4BX,OAAO,IAAIQ,cAAA,CAAMI,gBAA7C;MAAtB,EADF;MAGAP,eAAe,GAAGH,SAAS,CAAC,4CAAD,EAA+C;QACxEI,eAAe,EAAEL;MADuD,CAA/C,CAA3B;MAGA;;IAEF;MACE,OAAO,IAAP;EA/BJ;;EAkCA,oBACE;IACE,SAAS,EAAEO,cAAA,CAAMP,KADnB;IAEE,cAAYC,SAAS,CAAC,oCAAD,EAAuC;MAC1DI,eAAe,EAAEL;IADyC,CAAvC,CAFvB;IAKE,oBAAkBI;EALpB,GAOGD,KAPH,CADF;AAWD,CAlDD;;AAoDA,MAAMS,oBAAoB,GAAIf,KAAD,IAAgC;EAC3D,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAkBF,KAAxB;EACA,oBACE;IACE,SAAS,EAAE,IAAAS,mBAAA,EACTC,cAAA,CAAMM,OADG,EAETf,IAAI,KAAK,OAAT,IAAoBS,cAAA,CAAMO,KAFjB,EAGThB,IAAI,KAAK,OAAT,IAAoBS,cAAA,CAAMQ,KAHjB,EAIThB,OAAO,IAAIQ,cAAA,CAAMR,OAJR,CADb;IAOE,aAAU;EAPZ,gBASE,6BAAC,OAAD,EAAaF,KAAb,CATF,CADF;AAaD,CAfD;;AAiBAe,oBAAoB,CAACI,SAArB,2CAAiCA,cAAjC;eAEeJ,oB"}
@@ -1 +1 @@
1
- {"version":3,"file":"globals.d.js","names":[],"sources":["../src/globals.d.ts"],"sourcesContent":["declare module '@coorpacademy/nova-icons';\ndeclare module '@coorpacademy/react-native-slider';\ndeclare module '@react-native-community/blur';\ndeclare module 'react-native/*';\ndeclare module 'color';\ndeclare module 'classnames';\ndeclare module '*.css';\n"],"mappings":""}
1
+ {"version":3,"file":"globals.d.js","names":[],"sources":["../src/globals.d.ts"],"sourcesContent":["declare module '@coorpacademy/nova-icons';\ndeclare module '@coorpacademy/react-native-slider';\ndeclare module '@react-native-community/blur';\ndeclare module '@coorpacademy/translate';\ndeclare module 'react-native/*';\ndeclare module 'color';\ndeclare module 'classnames';\ndeclare module '*.css';\n"],"mappings":""}
@@ -64,9 +64,7 @@ const AddToMyListFeedback = ({
64
64
  className: _style.default.checkIcon,
65
65
  width: 13,
66
66
  height: 13
67
- }), /*#__PURE__*/_react.default.createElement("p", {
68
- role: "status"
69
- }, favorite ? addToMyListText : removeFromMyListText));
67
+ }), /*#__PURE__*/_react.default.createElement("p", null, favorite ? addToMyListText : removeFromMyListText));
70
68
  };
71
69
 
72
70
  exports.AddToMyListFeedback = AddToMyListFeedback;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ADD_TO_MY_LIST_STATUS","IDLE","SUCCESS","StatusContext","React","createContext","AddToMyListStatusProvider","children","status","setStatus","useState","useEffect","timeoutId","DURATION","setTimeout","clearTimeout","statusValue","useMemo","AddToMyListFeedback","addToMyListText","removeFromMyListText","favorite","useContext","classnames","styles","feedback","checkIcon","AddToMyList","style","addToMyListButton","onFavoriteClick","cb","onClick","container","cta","wrapper","shareIcon","propTypes","PropTypes","node","string","bool","func"],"sources":["../../../src/molecule/add-to-my-list/index.js"],"sourcesContent":["import React, {useState, useContext, useEffect, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionNavigationMore as MoreIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport styles from './style.css';\n\nconst ADD_TO_MY_LIST_STATUS = {\n IDLE: 'IDLE',\n SUCCESS: 'SUCCESS'\n};\n\nconst StatusContext = React.createContext(ADD_TO_MY_LIST_STATUS.IDLE);\n\nexport const AddToMyListStatusProvider = ({children}) => {\n const [status, setStatus] = useState(ADD_TO_MY_LIST_STATUS.IDLE);\n useEffect(() => {\n let timeoutId;\n const DURATION = 3000;\n if (status !== ADD_TO_MY_LIST_STATUS.IDLE) {\n timeoutId = setTimeout(() => setStatus(ADD_TO_MY_LIST_STATUS.IDLE), DURATION);\n }\n return () => clearTimeout(timeoutId);\n }, [status]);\n const statusValue = useMemo(() => [status, setStatus], [status, setStatus]);\n return <StatusContext.Provider value={statusValue}>{children}</StatusContext.Provider>;\n};\n\nexport const AddToMyListFeedback = ({addToMyListText, removeFromMyListText, favorite}) => {\n const [status] = useContext(StatusContext);\n if (status === ADD_TO_MY_LIST_STATUS.IDLE) return null;\n\n return (\n <div className={classnames(styles.feedback)} data-name={'add-to-my-list-feedback'}>\n <CheckIcon className={styles.checkIcon} width={13} height={13} />\n <p role=\"status\">{favorite ? addToMyListText : removeFromMyListText}</p>\n </div>\n );\n};\n\nconst AddToMyList = ({style, addToMyListButton, favorite, onFavoriteClick}) => {\n const [, setStatus] = useContext(StatusContext);\n const cb = () => setStatus(ADD_TO_MY_LIST_STATUS.SUCCESS);\n\n function onClick() {\n onFavoriteClick(cb);\n }\n\n return (\n <div className={(styles.container, style)}>\n <Link data-name={'add-to-my-list-button'} onClick={onClick} className={styles.cta}>\n <div className={styles.wrapper}>\n {favorite ? (\n <CheckIcon className={styles.shareIcon} width={15} height={15} />\n ) : (\n <MoreIcon className={styles.shareIcon} width={12} height={12} />\n )}\n <p>{addToMyListButton}</p>\n </div>\n </Link>\n </div>\n );\n};\n\nAddToMyListStatusProvider.propTypes = {\n children: PropTypes.node\n};\n\nAddToMyListFeedback.propTypes = {\n addToMyListText: PropTypes.string,\n removeFromMyListText: PropTypes.string,\n favorite: PropTypes.bool\n};\n\nAddToMyList.propTypes = {\n style: PropTypes.string,\n addToMyListButton: PropTypes.string,\n favorite: PropTypes.bool,\n onFavoriteClick: PropTypes.func\n};\n\nexport default AddToMyList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;AACA;;;;;;;;AAEA,MAAMA,qBAAqB,GAAG;EAC5BC,IAAI,EAAE,MADsB;EAE5BC,OAAO,EAAE;AAFmB,CAA9B;;AAKA,MAAMC,aA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CAAwB;EACtBT,KAAK,EAAEU,kBAAA,CAAUE,MADK;EAEtBX,iBAAiB,EAAES,kBAAA,CAAUE,MAFP;EAGtBnB,QAAQ,EAAEiB,kBAAA,CAAUG,IAHE;EAItBX,eAAe,EAAEQ,kBAAA,CAAUI;AAJL,CAAxB;eAOef,W"}
1
+ {"version":3,"file":"index.js","names":["ADD_TO_MY_LIST_STATUS","IDLE","SUCCESS","StatusContext","React","createContext","AddToMyListStatusProvider","children","status","setStatus","useState","useEffect","timeoutId","DURATION","setTimeout","clearTimeout","statusValue","useMemo","AddToMyListFeedback","addToMyListText","removeFromMyListText","favorite","useContext","classnames","styles","feedback","checkIcon","AddToMyList","style","addToMyListButton","onFavoriteClick","cb","onClick","container","cta","wrapper","shareIcon","propTypes","PropTypes","node","string","bool","func"],"sources":["../../../src/molecule/add-to-my-list/index.js"],"sourcesContent":["import React, {useState, useContext, useEffect, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionNavigationMore as MoreIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport styles from './style.css';\n\nconst ADD_TO_MY_LIST_STATUS = {\n IDLE: 'IDLE',\n SUCCESS: 'SUCCESS'\n};\n\nconst StatusContext = React.createContext(ADD_TO_MY_LIST_STATUS.IDLE);\n\nexport const AddToMyListStatusProvider = ({children}) => {\n const [status, setStatus] = useState(ADD_TO_MY_LIST_STATUS.IDLE);\n useEffect(() => {\n let timeoutId;\n const DURATION = 3000;\n if (status !== ADD_TO_MY_LIST_STATUS.IDLE) {\n timeoutId = setTimeout(() => setStatus(ADD_TO_MY_LIST_STATUS.IDLE), DURATION);\n }\n return () => clearTimeout(timeoutId);\n }, [status]);\n const statusValue = useMemo(() => [status, setStatus], [status, setStatus]);\n return <StatusContext.Provider value={statusValue}>{children}</StatusContext.Provider>;\n};\n\nexport const AddToMyListFeedback = ({addToMyListText, removeFromMyListText, favorite}) => {\n const [status] = useContext(StatusContext);\n if (status === ADD_TO_MY_LIST_STATUS.IDLE) return null;\n\n return (\n <div className={classnames(styles.feedback)} data-name={'add-to-my-list-feedback'}>\n <CheckIcon className={styles.checkIcon} width={13} height={13} />\n <p>{favorite ? addToMyListText : removeFromMyListText}</p>\n </div>\n );\n};\n\nconst AddToMyList = ({style, addToMyListButton, favorite, onFavoriteClick}) => {\n const [, setStatus] = useContext(StatusContext);\n const cb = () => setStatus(ADD_TO_MY_LIST_STATUS.SUCCESS);\n\n function onClick() {\n onFavoriteClick(cb);\n }\n\n return (\n <div className={(styles.container, style)}>\n <Link data-name={'add-to-my-list-button'} onClick={onClick} className={styles.cta}>\n <div className={styles.wrapper}>\n {favorite ? (\n <CheckIcon className={styles.shareIcon} width={15} height={15} />\n ) : (\n <MoreIcon className={styles.shareIcon} width={12} height={12} />\n )}\n <p>{addToMyListButton}</p>\n </div>\n </Link>\n </div>\n );\n};\n\nAddToMyListStatusProvider.propTypes = {\n children: PropTypes.node\n};\n\nAddToMyListFeedback.propTypes = {\n addToMyListText: PropTypes.string,\n removeFromMyListText: PropTypes.string,\n favorite: PropTypes.bool\n};\n\nAddToMyList.propTypes = {\n style: PropTypes.string,\n addToMyListButton: PropTypes.string,\n favorite: PropTypes.bool,\n onFavoriteClick: PropTypes.func\n};\n\nexport default AddToMyList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;AACA;;;;;;;;AAEA,MAAMA,qBAAqB,GAAG;EAC5BC,IAAI,EAAE,MADsB;EAE5BC,OAAO,EAAE;AAFmB,CAA9B;;AAKA,MAAMC,aAAa,gBAAGC,cAAA,CAAMC,aAAN,CAAoBL,qBAAqB,CAACC,IAA1C,CAAtB;;AAEO,MAAMK,yBAAyB,GAAG,CAAC;EAACC;AAAD,CAAD,KAAgB;EACvD,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAASV,qBAAqB,CAACC,IAA/B,CAA5B;EACA,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["../../../src/molecule/answer/index.js"],"names":[],"mappings":";AAkFA,iDASC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/index.js"],"names":[],"mappings":";AA4EA,iDASC"}
@@ -98,38 +98,28 @@ const Switch = ({
98
98
  switch (type) {
99
99
  case 'qcmDrag':
100
100
  return /*#__PURE__*/_react.default.createElement(_qcmDrag.default, _extends({}, model, {
101
- help: help,
102
- groupAriaLabel: translate('answer_the_question')
101
+ help: help
103
102
  }));
104
103
 
105
104
  case 'qcm':
106
- return /*#__PURE__*/_react.default.createElement(_qcm.default, _extends({}, model, {
107
- groupAriaLabel: translate('answer_the_question')
108
- }));
105
+ return /*#__PURE__*/_react.default.createElement(_qcm.default, model);
109
106
 
110
107
  case 'qcmGraphic':
111
- return /*#__PURE__*/_react.default.createElement(_qcmGraphic.default, _extends({}, model, {
112
- groupAriaLabel: translate('answer_the_question')
113
- }));
108
+ return /*#__PURE__*/_react.default.createElement(_qcmGraphic.default, model);
114
109
 
115
110
  case 'freeText':
116
111
  return /*#__PURE__*/_react.default.createElement(_freeText.default, model);
117
112
 
118
113
  case 'dropDown':
119
114
  return /*#__PURE__*/_react.default.createElement(_dropDown.default, _extends({}, model, {
120
- "aria-label": translate('drop_down_icon'),
121
- groupAriaLabel: translate('answer_the_question')
115
+ "aria-label": translate('drop_down_icon')
122
116
  }));
123
117
 
124
118
  case 'slider':
125
- return /*#__PURE__*/_react.default.createElement(_questionRange.default, _extends({}, model, {
126
- groupAriaLabel: translate('answer_the_question')
127
- }));
119
+ return /*#__PURE__*/_react.default.createElement(_questionRange.default, model);
128
120
 
129
121
  case 'template':
130
- return /*#__PURE__*/_react.default.createElement(_template.default, _extends({}, model, {
131
- groupAriaLabel: translate('answer_the_question')
132
- }));
122
+ return /*#__PURE__*/_react.default.createElement(_template.default, model);
133
123
  }
134
124
  };
135
125
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["MediaView","media","videoId","type","childProps","TYPE_IMAGE","style","backgroundImage","url","TYPE_VIDEO","video","TYPE_AUDIO","audio","propTypes","MediaViewPropTypes","Switch","model","help","translate","contextTypes","Provider","childContextTypes","Answer","props","wrapper"],"sources":["../../../src/molecule/answer/index.js"],"sourcesContent":["import React from 'react';\nimport {omit} from 'lodash/fp';\nimport VideoPlayer from '../video-player';\nimport DropDown from '../questions/drop-down';\nimport FreeText from '../questions/free-text';\nimport QcmDrag from '../questions/qcm-drag';\nimport Qcm from '../questions/qcm';\nimport QcmGraphic from '../questions/qcm-graphic';\nimport QuestionRange from '../questions/question-range';\nimport Template from '../questions/template';\nimport Provider from '../../atom/provider';\nimport Audio from '../audio';\nimport style from './style.css';\nimport propTypes, {MediaViewPropTypes, TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from './prop-types';\n\nconst MediaView = ({media}) => {\n const {videoId, type, ...childProps} = media;\n switch (type) {\n case TYPE_IMAGE:\n return (\n <div\n className={style.media}\n style={{\n backgroundImage: `url(${media.url})`\n }}\n />\n );\n case TYPE_VIDEO:\n return (\n <div className={style.video}>\n <VideoPlayer {...omit('id', childProps)} id={videoId} height=\"100%\" width=\"100%\" />\n </div>\n );\n case TYPE_AUDIO:\n return (\n <div className={style.audio}>\n <Audio {...omit('id', childProps)} height=\"100%\" width=\"100%\" />\n </div>\n );\n default:\n return null;\n }\n};\n\nMediaView.propTypes = MediaViewPropTypes;\n\nconst Switch = ({model, help}, {translate}) => {\n const {type} = model;\n\n switch (type) {\n case 'qcmDrag':\n return <QcmDrag {...model} help={help} groupAriaLabel={translate('answer_the_question')} />;\n case 'qcm':\n return <Qcm {...model} groupAriaLabel={translate('answer_the_question')} />;\n case 'qcmGraphic':\n return <QcmGraphic {...model} groupAriaLabel={translate('answer_the_question')} />;\n case 'freeText':\n return <FreeText {...model} />;\n case 'dropDown':\n return (\n <DropDown\n {...model}\n aria-label={translate('drop_down_icon')}\n groupAriaLabel={translate('answer_the_question')}\n />\n );\n case 'slider':\n return <QuestionRange {...model} groupAriaLabel={translate('answer_the_question')} />;\n case 'template':\n return <Template {...model} groupAriaLabel={translate('answer_the_question')} />;\n }\n};\n\nSwitch.propTypes = {\n model: propTypes.model,\n help: propTypes.help\n};\n\nSwitch.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst Answer = props => {\n const {model, media, help} = props;\n\n return (\n <div data-name=\"answer\" className={style.wrapper}>\n {media ? <MediaView media={media} /> : null}\n <Switch model={model} help={help} />\n </div>\n );\n};\n\nAnswer.propTypes = propTypes;\n\nexport default Answer;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,KAAa;EAC7B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAiCF,KAAvC;EAAA,MAAyBG,UAAzB,iCAAuCH,KAAvC;;EACA,QAAQE,IAAR;IACE,KAAKE,qBAAL;MACE,oBACE;QACE,SAAS,EAAEC,cAAA,CAAML,KADnB;QAEE,KAAK,EAAE;UACLM,eAAe,EAAG,OAAMN,KAAK,CAACO,GAAI;QAD7B;MAFT,EADF;;IAQF,KAAKC,qBAAL;MACE,oBACE;QAAK,SAAS,EAAEH,cAAA,CAAMI;MAAtB,gBACE,6BAAC,oBAAD,eAAiB,oBAAK,IAAL,EAAWN,UAAX,CAAjB;QAAyC,EAAE,EAAEF,OAA7C;QAAsD,MAAM,EAAC,MAA7D;QAAoE,KAAK,EAAC;MAA1E,GADF,CADF;;IAKF,KAAKS,qBAAL;MACE,oBACE;QAAK,SAAS,EAAEL,cAAA,CAAMM;MAAtB,gBACE,6BAAC,cAAD,eAAW,oBAAK,IAAL,EAAWR,UAAX,CAAX;QAAmC,MAAM,EAAC,MAA1C;QAAiD,KAAK,EAAC;MAAvD,GADF,CADF;;IAKF;MACE,OAAO,IAAP;EAvBJ;AAyBD,CA3BD;;AA6BAJ,SAA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AMI,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IAACP,KAAD;IAAQf,KAAR;IAAegB;EAAf,IAAuBM,KAA7B;EAEA,oBACE;IAAK,aAAU,QAAf;IAAwB,SAAS,EAAEjB,cAAA,CAAMkB;EAAzC,GACGvB,KAAK,gBAAG,6BAAC,SAAD;IAAW,KAAK,EAAEA;EAAlB,EAAH,GAAiC,IADzC,eAEE,6BAAC,MAAD;IAAQ,KAAK,EAAEe,KAAf;IAAsB,IAAI,EAAEC;EAA5B,EAFF,CADF;AAMD,CATD;;AAWAK,MAAM,CAACT,SAAP,2CAAmBA,kBAAnB;eAEeS,M"}
1
+ {"version":3,"file":"index.js","names":["MediaView","media","videoId","type","childProps","TYPE_IMAGE","style","backgroundImage","url","TYPE_VIDEO","video","TYPE_AUDIO","audio","propTypes","MediaViewPropTypes","Switch","model","help","translate","contextTypes","Provider","childContextTypes","Answer","props","wrapper"],"sources":["../../../src/molecule/answer/index.js"],"sourcesContent":["import React from 'react';\nimport {omit} from 'lodash/fp';\nimport VideoPlayer from '../video-player';\nimport DropDown from '../questions/drop-down';\nimport FreeText from '../questions/free-text';\nimport QcmDrag from '../questions/qcm-drag';\nimport Qcm from '../questions/qcm';\nimport QcmGraphic from '../questions/qcm-graphic';\nimport QuestionRange from '../questions/question-range';\nimport Template from '../questions/template';\nimport Provider from '../../atom/provider';\nimport Audio from '../audio';\nimport style from './style.css';\nimport propTypes, {MediaViewPropTypes, TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from './prop-types';\n\nconst MediaView = ({media}) => {\n const {videoId, type, ...childProps} = media;\n switch (type) {\n case TYPE_IMAGE:\n return (\n <div\n className={style.media}\n style={{\n backgroundImage: `url(${media.url})`\n }}\n />\n );\n case TYPE_VIDEO:\n return (\n <div className={style.video}>\n <VideoPlayer {...omit('id', childProps)} id={videoId} height=\"100%\" width=\"100%\" />\n </div>\n );\n case TYPE_AUDIO:\n return (\n <div className={style.audio}>\n <Audio {...omit('id', childProps)} height=\"100%\" width=\"100%\" />\n </div>\n );\n default:\n return null;\n }\n};\n\nMediaView.propTypes = MediaViewPropTypes;\n\nconst Switch = ({model, help}, {translate}) => {\n const {type} = model;\n\n switch (type) {\n case 'qcmDrag':\n return <QcmDrag {...model} help={help} />;\n case 'qcm':\n return <Qcm {...model} />;\n case 'qcmGraphic':\n return <QcmGraphic {...model} />;\n case 'freeText':\n return <FreeText {...model} />;\n case 'dropDown':\n return <DropDown {...model} aria-label={translate('drop_down_icon')} />;\n case 'slider':\n return <QuestionRange {...model} />;\n case 'template':\n return <Template {...model} />;\n }\n};\n\nSwitch.propTypes = {\n model: propTypes.model,\n help: propTypes.help\n};\n\nSwitch.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst Answer = props => {\n const {model, media, help} = props;\n\n return (\n <div data-name=\"answer\" className={style.wrapper}>\n {media ? <MediaView media={media} /> : null}\n <Switch model={model} help={help} />\n </div>\n );\n};\n\nAnswer.propTypes = propTypes;\n\nexport default Answer;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,KAAa;EAC7B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAiCF,KAAvC;EAAA,MAAyBG,UAAzB,iCAAuCH,KAAvC;;EACA,QAAQE,IAAR;IACE,KAAKE,qBAAL;MACE,oBACE;QACE,SAAS,EAAEC,cAAA,CAAML,KADnB;QAEE,KAAK,EAAE;UACLM,eAAe,EAAG,OAAMN,KAAK,CAACO,GAAI;QAD7B;MAFT,EADF;;IAQF,KAAKC,qBAAL;MACE,oBACE;QAAK,SAAS,EAAEH,cAAA,CAAMI;MAAtB,gBACE,6BAAC,oBAAD,eAAiB,oBAAK,IAAL,EAAWN,UAAX,CAAjB;QAAyC,EAAE,EAAEF,OAA7C;QAAsD,MAAM,EAAC,MA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B,CAAtB;;AAIA,MAAMI,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IAACP,KAAD;IAAQf,KAAR;IAAegB;EAAf,IAAuBM,KAA7B;EAEA,oBACE;IAAK,aAAU,QAAf;IAAwB,SAAS,EAAEjB,cAAA,CAAMkB;EAAzC,GACGvB,KAAK,gBAAG,6BAAC,SAAD;IAAW,KAAK,EAAEA;EAAlB,EAAH,GAAiC,IADzC,eAEE,6BAAC,MAAD;IAAQ,KAAK,EAAEe,KAAf;IAAsB,IAAI,EAAEC;EAA5B,EAFF,CADF;AAMD,CATD;;AAWAK,MAAM,CAACT,SAAP,2CAAmBA,kBAAnB;eAEeS,M"}
@@ -51,9 +51,7 @@ const Notification = props => {
51
51
  stroke: null
52
52
  }), /*#__PURE__*/_react.default.createElement("div", {
53
53
  className: _notification.default.message
54
- }, /*#__PURE__*/_react.default.createElement("span", {
55
- role: "status"
56
- }, message))));
54
+ }, /*#__PURE__*/_react.default.createElement("span", null, message))));
57
55
  };
58
56
 
59
57
  Notification.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -1 +1 @@
1
- {"version":3,"file":"notification.js","names":["NOTIFICATION_ICON","addFavorite","CheckIcon","removeFavorite","MoreIcon","lock","LockIcon","unlock","UnlockIcon","handleOverlayClick","e","stopPropagation","preventDefault","Notification","props","message","icon","IconType","classnames","style","showOverlay","notificationWrapper","notification","propTypes","PropTypes","string","isRequired","oneOf"],"sources":["../../../src/molecule/card/notification.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, keys} from 'lodash/fp';\nimport {\n NovaCompositionNavigationMore as MoreIcon,\n NovaSolidLoginLocked as LockIcon,\n NovaSolidLocksLockUnlock1 as UnlockIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon\n} from '@coorpacademy/nova-icons';\nimport style from './notification.css';\n\nconst NOTIFICATION_ICON = {\n addFavorite: CheckIcon,\n removeFavorite: MoreIcon,\n lock: LockIcon,\n unlock: UnlockIcon\n};\n\nconst handleOverlayClick = e => {\n e.stopPropagation();\n e.preventDefault();\n return false;\n};\n\nconst Notification = props => {\n const {message, icon} = props;\n\n const IconType = get(icon, NOTIFICATION_ICON);\n return (\n <div\n data-name=\"notification\"\n data-type={icon}\n onClick={handleOverlayClick}\n className={classnames(style.showOverlay, style.notificationWrapper)}\n >\n <div className={style.notification}>\n <IconType className={style.icon} color={null} stroke={null} />\n <div className={style.message}>\n <span role=\"status\">{message}</span>\n </div>\n </div>\n </div>\n );\n};\nNotification.propTypes = {\n message: PropTypes.string.isRequired,\n icon: PropTypes.oneOf(keys(NOTIFICATION_ICON)).isRequired\n};\n\nexport default Notification;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAMA;;;;AAEA,MAAMA,iBAAiB,GAAG;EACxBC,WAAW,EAAEC,2CADW;EAExBC,cAAc,EAAEC,wCAFQ;EAGxBC,IAAI,EAAEC,+BAHkB;EAIxBC,MAAM,EAAEC;AAJgB,CAA1B;;AAOA,MAAMC,kBAAkB,GAAGC,CAAC,IAAI;EAC9BA,CAAC,CAACC,eAAF;EACAD,CAAC,CAACE,cAAF;EACA,OAAO,KAAP;AACD,CAJD;;AAMA,MAAMC,YAAY,GAAGC,KAAK,IAAI;EAC5B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAkBF,KAAxB;EAEA,MAAMG,QAAQ,GAAG,mBAAID,IAAJ,EAAUhB,iBAAV,CAAjB;EACA,oBACE;IACE,aAAU,cADZ;IAEE,aAAWgB,IAFb;IAGE,OAAO,EAAEP,kBAHX;IAIE,SAAS,EAAE,IAAAS,mBAAA,EAAWC,qBAAA,CAAMC,WAAjB,EAA8BD,qBAAA,CAAME,mBAApC;EAJb,gBAME;IAAK,SAAS,EAAEF,qBAAA,CAAMG;EAAtB,gBACE,6BAAC,QAAD;IAAU,SAAS,EAAEH,qBAAA,CAAMH,IAA3B;IAAiC,KAAK,EAAE,IAAxC;IAA8C,MAAM,EAAE;EAAtD,EADF,eAEE;IAAK,SAAS,EAAEG,qBAAA,CAAMJ;EAAtB,gBACE;IAAM,IAAI,EAAC;EAAX,GAAqBA,OAArB,CADF,CAFF,CANF,CADF;AAeD,CAnBD;;AAoBAF,YAAY,CAACU,SAAb,2CAAyB;EACvBR,OAAO,EAAES,kBAAA,CAAUC,MAAV,CAAiBC,UADH;EAEvBV,IAAI,EAAEQ,kBAAA,CAAUG,KAAV,CAAgB,oBAAK3B,iBAAL,CAAhB,EAAyC0B;AAFxB,CAAzB;eAKeb,Y"}
1
+ {"version":3,"file":"notification.js","names":["NOTIFICATION_ICON","addFavorite","CheckIcon","removeFavorite","MoreIcon","lock","LockIcon","unlock","UnlockIcon","handleOverlayClick","e","stopPropagation","preventDefault","Notification","props","message","icon","IconType","classnames","style","showOverlay","notificationWrapper","notification","propTypes","PropTypes","string","isRequired","oneOf"],"sources":["../../../src/molecule/card/notification.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, keys} from 'lodash/fp';\nimport {\n NovaCompositionNavigationMore as MoreIcon,\n NovaSolidLoginLocked as LockIcon,\n NovaSolidLocksLockUnlock1 as UnlockIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon\n} from '@coorpacademy/nova-icons';\nimport style from './notification.css';\n\nconst NOTIFICATION_ICON = {\n addFavorite: CheckIcon,\n removeFavorite: MoreIcon,\n lock: LockIcon,\n unlock: UnlockIcon\n};\n\nconst handleOverlayClick = e => {\n e.stopPropagation();\n e.preventDefault();\n return false;\n};\n\nconst Notification = props => {\n const {message, icon} = props;\n\n const IconType = get(icon, NOTIFICATION_ICON);\n return (\n <div\n data-name=\"notification\"\n data-type={icon}\n onClick={handleOverlayClick}\n className={classnames(style.showOverlay, style.notificationWrapper)}\n >\n <div className={style.notification}>\n <IconType className={style.icon} color={null} stroke={null} />\n <div className={style.message}>\n <span>{message}</span>\n </div>\n </div>\n </div>\n );\n};\nNotification.propTypes = {\n message: PropTypes.string.isRequired,\n icon: PropTypes.oneOf(keys(NOTIFICATION_ICON)).isRequired\n};\n\nexport default Notification;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAMA;;;;AAEA,MAAMA,iBAAiB,GAAG;EACxBC,WAAW,EAAEC,2CADW;EAExBC,cAAc,EAAEC,wCAFQ;EAGxBC,IAAI,EAAEC,+BAHkB;EAIxBC,MAAM,EAAEC;AAJgB,CAA1B;;AAOA,MAAMC,kBAAkB,GAAGC,CAAC,IAAI;EAC9BA,CAAC,CAACC,eAAF;EACAD,CAAC,CAACE,cAAF;EACA,OAAO,KAAP;AACD,CAJD;;AAMA,MAAMC,YAAY,GAAGC,KAAK,IAAI;EAC5B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAkBF,KAAxB;EAEA,MAAMG,QAAQ,GAAG,mBAAID,IAAJ,EAAUhB,iBAAV,CAAjB;EACA,oBACE;IACE,aAAU,cADZ;IAEE,aAAWgB,IAFb;IAGE,OAAO,EAAEP,kBAHX;IAIE,SAAS,EAAE,IAAAS,mBAAA,EAAWC,qBAAA,CAAMC,WAAjB,EAA8BD,qBAAA,CAAME,mBAApC;EAJb,gBAME;IAAK,SAAS,EAAEF,qBAAA,CAAMG;EAAtB,gBACE,6BAAC,QAAD;IAAU,SAAS,EAAEH,qBAAA,CAAMH,IAA3B;IAAiC,KAAK,EAAE,IAAxC;IAA8C,MAAM,EAAE;EAAtD,EADF,eAEE;IAAK,SAAS,EAAEG,qBAAA,CAAMJ;EAAtB,gBACE,2CAAOA,OAAP,CADF,CAFF,CANF,CADF;AAeD,CAnBD;;AAoBAF,YAAY,CAACU,SAAb,2CAAyB;EACvBR,OAAO,EAAES,kBAAA,CAAUC,MAAV,CAAiBC,UADH;EAEvBV,IAAI,EAAEQ,kBAAA,CAAUG,KAAV,CAAgB,oBAAK3B,iBAAL,CAAhB,EAAyC0B;AAFxB,CAAzB;eAKeb,Y"}
@@ -7,7 +7,6 @@ declare namespace FiltersWapper {
7
7
  type: PropTypes.Validator<string>;
8
8
  fieldName: PropTypes.Validator<string>;
9
9
  }> | null | undefined)[]>;
10
- const filterGroupAriaLabel: PropTypes.Requireable<string>;
11
10
  }
12
11
  }
13
12
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,sEA6DC"}
1
+ {"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,sEAuDC"}