@coorpacademy/components 11.4.5-alpha.35 → 11.4.5-alpha.37

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 (86) hide show
  1. package/es/molecule/answer/index.d.ts.map +1 -1
  2. package/es/molecule/answer/index.js +16 -6
  3. package/es/molecule/answer/index.js.map +1 -1
  4. package/es/molecule/filters/filters-wrapper.d.ts +1 -0
  5. package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
  6. package/es/molecule/filters/filters-wrapper.js +9 -5
  7. package/es/molecule/filters/filters-wrapper.js.map +1 -1
  8. package/es/molecule/filters/index.d.ts +1 -0
  9. package/es/molecule/filters/index.d.ts.map +1 -1
  10. package/es/molecule/filters/index.js +6 -3
  11. package/es/molecule/filters/index.js.map +1 -1
  12. package/es/molecule/questions/drop-down/index.d.ts +1 -0
  13. package/es/molecule/questions/drop-down/index.d.ts.map +1 -1
  14. package/es/molecule/questions/drop-down/index.js +8 -5
  15. package/es/molecule/questions/drop-down/index.js.map +1 -1
  16. package/es/molecule/questions/qcm/index.d.ts +1 -0
  17. package/es/molecule/questions/qcm/index.d.ts.map +1 -1
  18. package/es/molecule/questions/qcm/index.js +8 -5
  19. package/es/molecule/questions/qcm/index.js.map +1 -1
  20. package/es/molecule/questions/qcm-drag/index.d.ts +3 -1
  21. package/es/molecule/questions/qcm-drag/index.d.ts.map +1 -1
  22. package/es/molecule/questions/qcm-drag/index.js +8 -5
  23. package/es/molecule/questions/qcm-drag/index.js.map +1 -1
  24. package/es/molecule/questions/qcm-graphic/index.d.ts +1 -0
  25. package/es/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
  26. package/es/molecule/questions/qcm-graphic/index.js +8 -5
  27. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  28. package/es/molecule/questions/question-range/index.d.ts +1 -0
  29. package/es/molecule/questions/question-range/index.d.ts.map +1 -1
  30. package/es/molecule/questions/question-range/index.js +9 -6
  31. package/es/molecule/questions/question-range/index.js.map +1 -1
  32. package/es/molecule/questions/template/index.d.ts +6 -2
  33. package/es/molecule/questions/template/index.d.ts.map +1 -1
  34. package/es/molecule/questions/template/index.js +8 -5
  35. package/es/molecule/questions/template/index.js.map +1 -1
  36. package/es/organism/user-preferences/index.d.ts.map +1 -1
  37. package/es/organism/user-preferences/index.js +2 -2
  38. package/es/organism/user-preferences/index.js.map +1 -1
  39. package/es/template/common/search-page/index.d.ts +2 -0
  40. package/es/template/common/search-page/index.d.ts.map +1 -1
  41. package/es/template/common/search-page/index.js +6 -3
  42. package/es/template/common/search-page/index.js.map +1 -1
  43. package/lib/molecule/answer/index.d.ts.map +1 -1
  44. package/lib/molecule/answer/index.js +16 -6
  45. package/lib/molecule/answer/index.js.map +1 -1
  46. package/lib/molecule/filters/filters-wrapper.d.ts +1 -0
  47. package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
  48. package/lib/molecule/filters/filters-wrapper.js +9 -5
  49. package/lib/molecule/filters/filters-wrapper.js.map +1 -1
  50. package/lib/molecule/filters/index.d.ts +1 -0
  51. package/lib/molecule/filters/index.d.ts.map +1 -1
  52. package/lib/molecule/filters/index.js +6 -3
  53. package/lib/molecule/filters/index.js.map +1 -1
  54. package/lib/molecule/questions/drop-down/index.d.ts +1 -0
  55. package/lib/molecule/questions/drop-down/index.d.ts.map +1 -1
  56. package/lib/molecule/questions/drop-down/index.js +8 -5
  57. package/lib/molecule/questions/drop-down/index.js.map +1 -1
  58. package/lib/molecule/questions/qcm/index.d.ts +1 -0
  59. package/lib/molecule/questions/qcm/index.d.ts.map +1 -1
  60. package/lib/molecule/questions/qcm/index.js +8 -5
  61. package/lib/molecule/questions/qcm/index.js.map +1 -1
  62. package/lib/molecule/questions/qcm-drag/index.d.ts +3 -1
  63. package/lib/molecule/questions/qcm-drag/index.d.ts.map +1 -1
  64. package/lib/molecule/questions/qcm-drag/index.js +8 -5
  65. package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
  66. package/lib/molecule/questions/qcm-graphic/index.d.ts +1 -0
  67. package/lib/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
  68. package/lib/molecule/questions/qcm-graphic/index.js +8 -5
  69. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  70. package/lib/molecule/questions/question-range/index.d.ts +1 -0
  71. package/lib/molecule/questions/question-range/index.d.ts.map +1 -1
  72. package/lib/molecule/questions/question-range/index.js +9 -6
  73. package/lib/molecule/questions/question-range/index.js.map +1 -1
  74. package/lib/molecule/questions/template/index.d.ts +6 -2
  75. package/lib/molecule/questions/template/index.d.ts.map +1 -1
  76. package/lib/molecule/questions/template/index.js +8 -5
  77. package/lib/molecule/questions/template/index.js.map +1 -1
  78. package/lib/organism/user-preferences/index.d.ts.map +1 -1
  79. package/lib/organism/user-preferences/index.js +2 -2
  80. package/lib/organism/user-preferences/index.js.map +1 -1
  81. package/lib/template/common/search-page/index.d.ts +2 -0
  82. package/lib/template/common/search-page/index.d.ts.map +1 -1
  83. package/lib/template/common/search-page/index.js +6 -3
  84. package/lib/template/common/search-page/index.js.map +1 -1
  85. package/locales/en/global.json +1 -0
  86. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","classnames","Provider","GetSkinFromContext","getShadowBoxColorFromPrimary","style","QCMImage","props","legacyContext","answers","skin","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","boxShadow","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","innerHTML","__html","wrapper","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCMImage = (props, legacyContext) => {\n const {answers} = props;\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image, ariaLabel} = answer;\n\n return (\n <div\n onClick={onClick}\n data-selected={selected}\n data-name=\"answerGraphic\"\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n className={selected ? style.selected : style.answer}\n key={key}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor: selected ? primarySkinColor : '#F4F4F5'\n }}\n className={style.background}\n />\n <div data-name=\"answerContent\" className={style.content}>\n <div\n className={style.imageWrapper}\n data-name=\"answerImage\"\n aria-label={ariaLabel || title}\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div data-name=\"answerText\" className={style.titleWrapper}>\n <div\n title={title}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n </div>\n );\n });\n\n return (\n <div data-name=\"qcm-graphic-wrapper\" className={style.wrapper} role=\"group\">\n {answersViews}\n </div>\n );\n};\n\nQCMImage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCMImage.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n image: PropTypes.string,\n ariaLabel: PropTypes.string\n })\n )\n};\n\nexport default QCMImage;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,wBAA3C;AACA,SAAQC,4BAAR,QAA2C,iDAA3C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACzC,MAAM;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MAAT;IAJ3B,EADF,CATF,CAnBF,CADF;EAwCD,CA3CoB,CAArB;EA6CA,oBACE;IAAK,aAAU,qBAAf;IAAqC,SAAS,EAAEZ,KAAK,CAACyB,OAAtD;IAA+D,IAAI,EAAC;EAApE,GACGlB,YADH,CADF;AAKD,CAvDD;;AAyDAN,QAAQ,CAACyB,YAAT,GAAwB;EACtBrB,IAAI,EAAER,QAAQ,CAAC8B,iBAAT,CAA2BtB;AADX,CAAxB;AAIAJ,QAAQ,CAAC2B,SAAT,2CAAqB;EACnBxB,OAAO,EAAET,SAAS,CAACkC,OAAV,CACPlC,SAAS,CAACmC,KAAV,CAAgB;IACdlB,KAAK,EAAEjB,SAAS,CAACoC,MADH;IAEdlB,QAAQ,EAAElB,SAAS,CAACqC,IAFN;IAGdrB,OAAO,EAAEhB,SAAS,CAACsC,IAHL;IAIdnB,KAAK,EAAEnB,SAAS,CAACoC,MAJH;IAKdhB,SAAS,EAAEpB,SAAS,CAACoC;EALP,CAAhB,CADO;AADU,CAArB;AAYA,eAAe9B,QAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","classnames","Provider","GetSkinFromContext","getShadowBoxColorFromPrimary","style","QCMImage","props","legacyContext","answers","groupAriaLabel","skin","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","boxShadow","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","innerHTML","__html","wrapper","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCMImage = (props, legacyContext) => {\n const {answers, groupAriaLabel} = props;\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image, ariaLabel} = answer;\n\n return (\n <div\n onClick={onClick}\n data-selected={selected}\n data-name=\"answerGraphic\"\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n className={selected ? style.selected : style.answer}\n key={key}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor: selected ? primarySkinColor : '#F4F4F5'\n }}\n className={style.background}\n />\n <div data-name=\"answerContent\" className={style.content}>\n <div\n className={style.imageWrapper}\n data-name=\"answerImage\"\n aria-label={ariaLabel || title}\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div data-name=\"answerText\" className={style.titleWrapper}>\n <div\n title={title}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n </div>\n );\n });\n\n return (\n <form>\n <div\n data-name=\"qcm-graphic-wrapper\"\n className={style.wrapper}\n role=\"group\"\n aria-label={groupAriaLabel}\n >\n {answersViews}\n </div>\n </form>\n );\n};\n\nQCMImage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCMImage.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n image: PropTypes.string,\n ariaLabel: PropTypes.string\n })\n ),\n groupAriaLabel: PropTypes.string\n};\n\nexport default QCMImage;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,wBAA3C;AACA,SAAQC,4BAAR,QAA2C,iDAA3C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAACC,KAAD,EAAQC,aAAR,KA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BAAuB,EAAE;QAACC,MAAM,EAAEZ;MAAT;IAJ3B,EADF,CATF,CAnBF,CADF;EAwCD,CA3CoB,CAArB;EA6CA,oBACE,+CACE;IACE,aAAU,qBADZ;IAEE,SAAS,EAAEb,KAAK,CAAC0B,OAFnB;IAGE,IAAI,EAAC,OAHP;IAIE,cAAYrB;EAJd,GAMGG,YANH,CADF,CADF;AAYD,CA9DD;;AAgEAP,QAAQ,CAAC0B,YAAT,GAAwB;EACtBrB,IAAI,EAAET,QAAQ,CAAC+B,iBAAT,CAA2BtB;AADX,CAAxB;AAIAL,QAAQ,CAAC4B,SAAT,2CAAqB;EACnBzB,OAAO,EAAET,SAAS,CAACmC,OAAV,CACPnC,SAAS,CAACoC,KAAV,CAAgB;IACdlB,KAAK,EAAElB,SAAS,CAACqC,MADH;IAEdlB,QAAQ,EAAEnB,SAAS,CAACsC,IAFN;IAGdrB,OAAO,EAAEjB,SAAS,CAACuC,IAHL;IAIdnB,KAAK,EAAEpB,SAAS,CAACqC,MAJH;IAKdhB,SAAS,EAAErB,SAAS,CAACqC;EALP,CAAhB,CADO,CADU;EAUnB3B,cAAc,EAAEV,SAAS,CAACqC;AAVP,CAArB;AAaA,eAAe/B,QAAf"}
@@ -28,6 +28,7 @@ declare namespace QuestionRange {
28
28
  title: PropTypes.Requireable<string>;
29
29
  minLabel: PropTypes.Requireable<string>;
30
30
  maxLabel: PropTypes.Requireable<string>;
31
+ groupAriaLabel: PropTypes.Requireable<string>;
31
32
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
32
33
  onChangeEnd: PropTypes.Requireable<(...args: any[]) => any>;
33
34
  multi: PropTypes.Requireable<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/question-range/index.js"],"names":[],"mappings":";AAQA,4EAiCC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/question-range/index.js"],"names":[],"mappings":";AAQA,4EAmCC"}
@@ -1,5 +1,5 @@
1
1
  import _getOr from "lodash/fp/getOr";
2
- const _excluded = ["title", "minLabel", "maxLabel"];
2
+ const _excluded = ["title", "minLabel", "maxLabel", "groupAriaLabel"];
3
3
 
4
4
  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); }
5
5
 
@@ -16,7 +16,8 @@ const QuestionRange = (props, legacyContext) => {
16
16
  const {
17
17
  title,
18
18
  minLabel,
19
- maxLabel
19
+ maxLabel,
20
+ groupAriaLabel
20
21
  } = props,
21
22
  rangeProps = _objectWithoutPropertiesLoose(props, _excluded);
22
23
 
@@ -27,9 +28,10 @@ const QuestionRange = (props, legacyContext) => {
27
28
  const titleStyle = {
28
29
  color: defaultColor
29
30
  };
30
- return /*#__PURE__*/React.createElement("div", {
31
+ return /*#__PURE__*/React.createElement("form", null, /*#__PURE__*/React.createElement("div", {
31
32
  className: style.wrapper,
32
- role: "group"
33
+ role: "group",
34
+ "aria-label": groupAriaLabel
33
35
  }, /*#__PURE__*/React.createElement("span", {
34
36
  style: titleStyle,
35
37
  className: classnames(style.title, style.innerHTML) // eslint-disable-next-line react/no-danger
@@ -51,7 +53,7 @@ const QuestionRange = (props, legacyContext) => {
51
53
  dangerouslySetInnerHTML: {
52
54
  __html: maxLabel
53
55
  }
54
- })));
56
+ }))));
55
57
  };
56
58
 
57
59
  QuestionRange.contextTypes = {
@@ -60,7 +62,8 @@ QuestionRange.contextTypes = {
60
62
  QuestionRange.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, Range.propTypes, {
61
63
  title: PropTypes.string,
62
64
  minLabel: PropTypes.string,
63
- maxLabel: PropTypes.string
65
+ maxLabel: PropTypes.string,
66
+ groupAriaLabel: PropTypes.string
64
67
  }) : {};
65
68
  export default QuestionRange;
66
69
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","classnames","Provider","GetSkinFromContext","Range","style","QuestionRange","props","legacyContext","title","minLabel","maxLabel","rangeProps","skin","defaultColor","titleStyle","color","wrapper","innerHTML","__html","labelWrapper","label","contextTypes","childContextTypes","propTypes","string"],"sources":["../../../../src/molecule/questions/question-range/index.js"],"sourcesContent":["import React from 'react';\nimport {getOr} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport Range from '../../../atom/range';\nimport style from './style.css';\n\nconst QuestionRange = (props, legacyContext) => {\n const {title, minLabel, maxLabel, ...rangeProps} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const titleStyle = {\n color: defaultColor\n };\n\n return (\n <div className={style.wrapper} role=\"group\">\n <span\n style={titleStyle}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <Range {...rangeProps} />\n <div className={style.labelWrapper}>\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: minLabel}}\n />\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: maxLabel}}\n />\n </div>\n </div>\n );\n};\n\nQuestionRange.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQuestionRange.propTypes = {\n ...Range.propTypes,\n title: PropTypes.string,\n minLabel: PropTypes.string,\n maxLabel: PropTypes.string\n};\n\nexport default QuestionRange;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,wBAA3C;AACA,OAAOC,KAAP,MAA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,KAAK,EAAET,SAAS,CAACyB,MAFnB;EAGEf,QAAQ,EAAEV,SAAS,CAACyB,MAHtB;EAIEd,QAAQ,EAAEX,SAAS,CAACyB;AAJtB;AAOA,eAAenB,aAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","classnames","Provider","GetSkinFromContext","Range","style","QuestionRange","props","legacyContext","title","minLabel","maxLabel","groupAriaLabel","rangeProps","skin","defaultColor","titleStyle","color","wrapper","innerHTML","__html","labelWrapper","label","contextTypes","childContextTypes","propTypes","string"],"sources":["../../../../src/molecule/questions/question-range/index.js"],"sourcesContent":["import React from 'react';\nimport {getOr} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport Range from '../../../atom/range';\nimport style from './style.css';\n\nconst QuestionRange = (props, legacyContext) => {\n const {title, minLabel, maxLabel, groupAriaLabel, ...rangeProps} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const titleStyle = {\n color: defaultColor\n };\n\n return (\n <form>\n <div className={style.wrapper} role=\"group\" aria-label={groupAriaLabel}>\n <span\n style={titleStyle}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <Range {...rangeProps} />\n <div className={style.labelWrapper}>\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: minLabel}}\n />\n <span\n className={classnames(style.label, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: maxLabel}}\n />\n </div>\n </div>\n </form>\n );\n};\n\nQuestionRange.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQuestionRange.propTypes = {\n ...Range.propTypes,\n title: PropTypes.string,\n minLabel: PropTypes.string,\n maxLabel: PropTypes.string,\n groupAriaLabel: PropTypes.string\n};\n\nexport default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;IAFF;IAGE,uBAAuB,EAAE;MAACC,MAAM,EAAET;IAAT;EAH3B,EANF,CARF,CADF,CADF;AAyBD,CAnCD;;AAqCAL,aAAa,CAACiB,YAAd,GAA6B;EAC3BT,IAAI,EAAEZ,QAAQ,CAACsB,iBAAT,CAA2BV;AADN,CAA7B;AAIAR,aAAa,CAACmB,SAAd,wDACKrB,KAAK,CAACqB,SADX;EAEEhB,KAAK,EAAET,SAAS,CAAC0B,MAFnB;EAGEhB,QAAQ,EAAEV,SAAS,CAAC0B,MAHtB;EAIEf,QAAQ,EAAEX,SAAS,CAAC0B,MAJtB;EAKEd,cAAc,EAAEZ,SAAS,CAAC0B;AAL5B;AAQA,eAAepB,aAAf"}
@@ -1,7 +1,8 @@
1
1
  export default Template;
2
- declare function Template({ template, answers }: {
2
+ declare function Template({ template, answers, groupAriaLabel }: {
3
3
  template: any;
4
4
  answers: any;
5
+ groupAriaLabel: any;
5
6
  }): JSX.Element;
6
7
  declare namespace Template {
7
8
  namespace propTypes {
@@ -16,6 +17,7 @@ declare namespace Template {
16
17
  }> | null | undefined)[]>;
17
18
  theme: PropTypes.Requireable<string>;
18
19
  'aria-label': PropTypes.Requireable<string>;
20
+ groupAriaLabel: PropTypes.Requireable<string>;
19
21
  }, never>> & Partial<PropTypes.InferPropsInner<Pick<{
20
22
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
21
23
  options: PropTypes.Requireable<(PropTypes.InferProps<{
@@ -26,7 +28,9 @@ declare namespace Template {
26
28
  }> | null | undefined)[]>;
27
29
  theme: PropTypes.Requireable<string>;
28
30
  'aria-label': PropTypes.Requireable<string>;
29
- }, "aria-label" | "onChange" | "theme" | "options">>>) | null | undefined)[]>;
31
+ groupAriaLabel: PropTypes.Requireable<string>;
32
+ }, "aria-label" | "onChange" | "theme" | "options" | "groupAriaLabel">>>) | null | undefined)[]>;
33
+ const groupAriaLabel: PropTypes.Requireable<string>;
30
34
  }
31
35
  }
32
36
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/template/index.js"],"names":[],"mappings":";AAQA;;;gBAsCC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/template/index.js"],"names":[],"mappings":";AAQA;;;;gBA6CC"}
@@ -15,7 +15,8 @@ import style from './style.css';
15
15
 
16
16
  const Template = ({
17
17
  template,
18
- answers
18
+ answers,
19
+ groupAriaLabel
19
20
  }) => {
20
21
  const totalTemplate = parseTemplateString(template);
21
22
 
@@ -59,11 +60,12 @@ const Template = ({
59
60
  }
60
61
  }, totalTemplate);
61
62
 
62
- return /*#__PURE__*/React.createElement("div", {
63
+ return /*#__PURE__*/React.createElement("form", null, /*#__PURE__*/React.createElement("div", {
63
64
  "data-name": "template-wrapper",
64
65
  className: style.wrapper,
65
- role: "group"
66
- }, templateCompose);
66
+ role: "group",
67
+ "aria-label": groupAriaLabel
68
+ }, templateCompose));
67
69
  };
68
70
 
69
71
  const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends({}, DropDown.propTypes, {
@@ -71,7 +73,8 @@ const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends({}, DropD
71
73
  }) : {};
72
74
  Template.propTypes = process.env.NODE_ENV !== "production" ? {
73
75
  template: PropTypes.string,
74
- answers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)]))
76
+ answers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)])),
77
+ groupAriaLabel: PropTypes.string
75
78
  } : {};
76
79
  export default Template;
77
80
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","parseTemplateString","DropDown","FreeText","style","Template","template","answers","totalTemplate","templateCompose","convert","cap","part","key","type","textPart","__html","value","field","name","fieldType","fieldProps","fieldView","text","answerType","wrapper","TextPropTypes","propTypes","string","arrayOf","oneOfType","shape"],"sources":["../../../../src/molecule/questions/template/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, find} from 'lodash/fp';\nimport parseTemplateString from '../../../util/parse-template-string';\nimport DropDown from '../drop-down';\nimport FreeText from '../free-text';\nimport style from './style.css';\n\nconst Template = ({template, answers}) => {\n const totalTemplate = parseTemplateString(template);\n const templateCompose = map.convert({cap: false})((part, key) => {\n const type = part.type;\n if (type === 'string') {\n return (\n <span\n key={key}\n className={style.textPart}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: part.value}}\n />\n );\n }\n if (type === 'answerField') {\n const field = find({name: part.value}, answers);\n if (!field) return null;\n const {type: fieldType, ...fieldProps} = field;\n const fieldView =\n fieldType === 'text' ? (\n <FreeText {...fieldProps} className={style.text} />\n ) : (\n <DropDown {...fieldProps} theme=\"player\" />\n );\n\n return (\n <div className={style.answerType} key={part.value}>\n {fieldView}\n </div>\n );\n }\n }, totalTemplate);\n\n return (\n <div data-name=\"template-wrapper\" className={style.wrapper} role=\"group\">\n {templateCompose}\n </div>\n );\n};\n\nconst TextPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string\n};\n\nTemplate.propTypes = {\n template: PropTypes.string,\n answers: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)])\n )\n};\n\nexport default Template;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,mBAAP,MAAgC,qCAAhC;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAAC;EAACC,QAAD;EAAWC;AAAX,CAAD,KAAyB;EACxC,MAAMC,aAAa,GAAGP,mBAAmB,CAACK,QAAD,CAAzC;;E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CAAqB;EACnBrB,QAAQ,EAAEN,SAAS,CAAC4B,MADD;EAEnBrB,OAAO,EAAEP,SAAS,CAAC6B,OAAV,CACP7B,SAAS,CAAC8B,SAAV,CAAoB,CAAC9B,SAAS,CAAC+B,KAAV,CAAgB7B,QAAQ,CAACyB,SAAzB,CAAD,EAAsC3B,SAAS,CAAC+B,KAAV,CAAgBL,aAAhB,CAAtC,CAApB,CADO;AAFU,CAArB;AAOA,eAAerB,QAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","parseTemplateString","DropDown","FreeText","style","Template","template","answers","groupAriaLabel","totalTemplate","templateCompose","convert","cap","part","key","type","textPart","__html","value","field","name","fieldType","fieldProps","fieldView","text","answerType","wrapper","TextPropTypes","propTypes","string","arrayOf","oneOfType","shape"],"sources":["../../../../src/molecule/questions/template/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, find} from 'lodash/fp';\nimport parseTemplateString from '../../../util/parse-template-string';\nimport DropDown from '../drop-down';\nimport FreeText from '../free-text';\nimport style from './style.css';\n\nconst Template = ({template, answers, groupAriaLabel}) => {\n const totalTemplate = parseTemplateString(template);\n const templateCompose = map.convert({cap: false})((part, key) => {\n const type = part.type;\n if (type === 'string') {\n return (\n <span\n key={key}\n className={style.textPart}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: part.value}}\n />\n );\n }\n if (type === 'answerField') {\n const field = find({name: part.value}, answers);\n if (!field) return null;\n const {type: fieldType, ...fieldProps} = field;\n const fieldView =\n fieldType === 'text' ? (\n <FreeText {...fieldProps} className={style.text} />\n ) : (\n <DropDown {...fieldProps} theme=\"player\" />\n );\n\n return (\n <div className={style.answerType} key={part.value}>\n {fieldView}\n </div>\n );\n }\n }, totalTemplate);\n\n return (\n <form>\n <div\n data-name=\"template-wrapper\"\n className={style.wrapper}\n role=\"group\"\n aria-label={groupAriaLabel}\n >\n {templateCompose}\n </div>\n </form>\n );\n};\n\nconst TextPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string\n};\n\nTemplate.propTypes = {\n template: PropTypes.string,\n answers: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)])\n ),\n groupAriaLabel: PropTypes.string\n};\n\nexport default Template;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,mBAAP,MAAgC,qCAAhC;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAAC;EAACC,QAAD;EAAWC,OAAX;EAAoBC;AAApB,CAAD,KAAyC;EACxD,MAAMC,aAAa,GAAGR,mBAAmB,CAACK,QAAD,CAAzC;;EACA,MAAMI,eAAe,GAAG,KAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,IAAD,EAAOC,GAAP,KAAe;IAC/D,MAAMC,IAAI,GAAGF,IAAI,CAACE,IAAlB;;IACA,IAAIA,IAAI,KAAK,QAAb,EAAuB;MACrB,oBACE;QACE,GAAG,EAAED,GADP;QAEE,SAAS,EAAEV,KAAK,CAACY,QAFnB,CAGE;QAHF;QAIE,uBAAuB,EAAE;UAACC,MAAM,EAAEJ,IAAI,CAACK;QAAd;MAJ3B,EADF;IAQD;;IACD,IAAIH,IAAI,KAAK,aAAb,EAA4B;MAC1B,MAAMI,KAAK,GAAG,MAAK;QAACC,IAAI,EAAEP,IAAI,CAACK;MAAZ,CAAL,EAAyBX,OAAzB,CAAd;;MACA,IAAI,CAACY,KAAL,EAAY,OAAO,IAAP;;MACZ,MAAM;QAACJ,IAAI,EAAEM;MAAP,IAAmCF,KAAzC;MAAA,MAA2BG,UAA3B,iCAAyCH,KAAzC;;MACA,MAAMI,SAAS,GACbF,SAAS,KAAK,MAAd,gBACE,oBAAC,QAAD,eAAcC,UAAd;QAA0B,SAAS,EAAElB,KAAK,CAACoB;MAA3C,GADF,gBAGE,oBAAC,QAAD,eAAcF,UAAd;QAA0B,KAAK,EAAC;MAAhC,GAJJ;MAOA,oBACE;QAAK,SAAS,EAAElB,KAAK,CAACqB,UAAtB;QAAkC,GAAG,EAAEZ,IAAI,CAACK;MAA5C,GACGK,SADH,CADF;IAKD;EACF,CA7BuB,EA6BrBd,aA7BqB,CAAxB;;EA+BA,oBACE,+CACE;IACE,aAAU,kBADZ;IAEE,SAAS,EAAEL,KAAK,CAACsB,OAFnB;IAGE,IAAI,EAAC,OAHP;IAIE,cAAYlB;EAJd,GAMGE,eANH,CADF,CADF;AAYD,CA7CD;;AA+CA,MAAMiB,aAAN,wDACKzB,QAAQ,CAAC0B,SADd;EAEEb,IAAI,EAAEf,SAAS,CAAC6B;AAFlB;AAKAxB,QAAQ,CAACuB,SAAT,2CAAqB;EACnBtB,QAAQ,EAAEN,SAAS,CAAC6B,MADD;EAEnBtB,OAAO,EAAEP,SAAS,CAAC8B,OAAV,CACP9B,SAAS,CAAC+B,SAAV,CAAoB,CAAC/B,SAAS,CAACgC,KAAV,CAAgB9B,QAAQ,CAAC0B,SAAzB,CAAD,EAAsC5B,SAAS,CAACgC,KAAV,CAAgBL,aAAhB,CAAtC,CAApB,CADO,CAFU;EAKnBnB,cAAc,EAAER,SAAS,CAAC6B;AALP,CAArB;AAQA,eAAexB,QAAf"}
@@ -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"}
@@ -49,14 +49,14 @@ const UserPreferences = props => {
49
49
  moreInfoAriaLabel,
50
50
  groupAriaLabel
51
51
  } = props;
52
- return /*#__PURE__*/React.createElement("div", {
52
+ return /*#__PURE__*/React.createElement("form", null, /*#__PURE__*/React.createElement("div", {
53
53
  className: style.preferences,
54
54
  role: "group",
55
55
  "aria-label": groupAriaLabel
56
56
  }, _map(settings => /*#__PURE__*/React.createElement(Settings, _extends({}, settings, {
57
57
  key: settings.label,
58
58
  moreInfoAriaLabel: moreInfoAriaLabel
59
- })), preferences));
59
+ })), preferences)));
60
60
  };
61
61
 
62
62
  UserPreferences.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -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","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"}
@@ -64,6 +64,7 @@ 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>;
67
68
  }>>;
68
69
  const cards: PropTypes.Requireable<PropTypes.InferProps<{
69
70
  list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
@@ -100,6 +101,7 @@ declare namespace SearchPage {
100
101
  }>>;
101
102
  const moreSortAriaLabel: PropTypes.Requireable<string>;
102
103
  const moreFilterAriaLabel: PropTypes.Requireable<string>;
104
+ const filterGroupAriaLabel: PropTypes.Requireable<string>;
103
105
  }
104
106
  }
105
107
  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,mEAkDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,mEAoDC"}
@@ -21,7 +21,8 @@ const SearchPage = (props, context) => {
21
21
  clearFilters,
22
22
  recommendations,
23
23
  moreSortAriaLabel,
24
- moreFilterAriaLabel
24
+ moreFilterAriaLabel,
25
+ filterGroupAriaLabel
25
26
  } = props;
26
27
  const {
27
28
  skin
@@ -44,7 +45,8 @@ const SearchPage = (props, context) => {
44
45
  }))), recommendationsView) : /*#__PURE__*/React.createElement(CardsGrid, cards);
45
46
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Filters, _extends({}, searchFilters, {
46
47
  moreSortAriaLabel: moreSortAriaLabel,
47
- moreFilterAriaLabel: moreFilterAriaLabel
48
+ moreFilterAriaLabel: moreFilterAriaLabel,
49
+ filterGroupAriaLabel: filterGroupAriaLabel
48
50
  })), /*#__PURE__*/React.createElement("div", {
49
51
  "data-name": "searchResult",
50
52
  className: style.cardsWrapper
@@ -65,7 +67,8 @@ SearchPage.propTypes = process.env.NODE_ENV !== "production" ? {
65
67
  clearFilters: PropTypes.shape(Button.propTypes),
66
68
  recommendations: PropTypes.shape(CardsList.propTypes),
67
69
  moreSortAriaLabel: PropTypes.string,
68
- moreFilterAriaLabel: PropTypes.string
70
+ moreFilterAriaLabel: PropTypes.string,
71
+ filterGroupAriaLabel: PropTypes.string
69
72
  } : {};
70
73
  export default SearchPage;
71
74
  //# 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","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} 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};\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;;AAEA,MAAMC,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IACJC,KADI;IAEJC,aAFI;IAGJC,KAHI;IAIJC,cAJI;IAKJC,YALI;IAMJC,eANI;IAOJC,iBAPI;IAQJC;EARI,IASFT,KATJ;EAWA,MAAM;IAACU;EAAD,IAAST,OAAf;;EACA,MAAMU,YAAY,GAAG,OAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAArB;;EAEA,MAAME,mBAAmB,GAAG,SAAQL,eAAR,IAA2B,IAA3B,gBAAkC,oBAAC,SAAD,EAAeA,eAAf,CAA9D;EAEA,MAAMM,SAAS,GAAG,SAAQT,KAAK,CAACU,IAAd,iBAChB,8CACE;IAAK,SAAS,EAAEhB,KAAK,CAACiB;EAAtB,gBACE;IAAK,SAAS,EAAEjB,KAAK,CAACkB;EAAtB,GAAqCX,cAArC,CADF,eAEE,oBAAC,MAAD,eACMC,YADN;IAEE,aAAU,iBAFZ;IAGE,SAAS,EAAER,KAAK,CAACmB,KAHnB;IAIE,KAAK,EAAE;MAACC,UAAU,EAAEP;IAAb,CAJT;IAKE,IAAI,EAAC;EALP,GAFF,CADF,EAWGC,mBAXH,CADgB,gBAehB,oBAAC,SAAD,EAAeR,KAAf,CAfF;EAkBA,oBACE,8CACE,oBAAC,OAAD,eACMD,aADN;IAEE,iBAAiB,EAAEK,iBAFrB;IAGE,mBAAmB,EAAEC;EAHvB,GADF,eAME;IAAK,aAAU,cAAf;IAA8B,SAAS,EAAEX,KAAK,CAACqB;EAA/C,gBACE;IAAK,SAAS,EAAErB,KAAK,CAACI,KAAtB;IAA6B,IAAI,EAAC;EAAlC,GACGA,KADH,CADF,EAIGW,SAJH,CANF,CADF;AAeD,CAlDD;;AAoDAd,UAAU,CAACqB,YAAX,GAA0B;EACxBV,IAAI,EAAEjB,QAAQ,CAAC4B,iBAAT,CAA2BX;AADT,CAA1B;AAIAX,UAAU,CAACuB,SAAX,2CAAuB;EACrBjB,cAAc,EAAEb,SAAS,CAAC+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"}
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,SAAP,MAAsB,YAAtB;AAEA,OA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AAK,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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/index.js"],"names":[],"mappings":";AA4EA,iDASC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/index.js"],"names":[],"mappings":";AAkFA,iDASC"}
@@ -98,28 +98,38 @@ const Switch = ({
98
98
  switch (type) {
99
99
  case 'qcmDrag':
100
100
  return /*#__PURE__*/_react.default.createElement(_qcmDrag.default, _extends({}, model, {
101
- help: help
101
+ help: help,
102
+ groupAriaLabel: translate('answer_the_question')
102
103
  }));
103
104
 
104
105
  case 'qcm':
105
- return /*#__PURE__*/_react.default.createElement(_qcm.default, model);
106
+ return /*#__PURE__*/_react.default.createElement(_qcm.default, _extends({}, model, {
107
+ groupAriaLabel: translate('answer_the_question')
108
+ }));
106
109
 
107
110
  case 'qcmGraphic':
108
- return /*#__PURE__*/_react.default.createElement(_qcmGraphic.default, model);
111
+ return /*#__PURE__*/_react.default.createElement(_qcmGraphic.default, _extends({}, model, {
112
+ groupAriaLabel: translate('answer_the_question')
113
+ }));
109
114
 
110
115
  case 'freeText':
111
116
  return /*#__PURE__*/_react.default.createElement(_freeText.default, model);
112
117
 
113
118
  case 'dropDown':
114
119
  return /*#__PURE__*/_react.default.createElement(_dropDown.default, _extends({}, model, {
115
- "aria-label": translate('drop_down_icon')
120
+ "aria-label": translate('drop_down_icon'),
121
+ groupAriaLabel: translate('answer_the_question')
116
122
  }));
117
123
 
118
124
  case 'slider':
119
- return /*#__PURE__*/_react.default.createElement(_questionRange.default, model);
125
+ return /*#__PURE__*/_react.default.createElement(_questionRange.default, _extends({}, model, {
126
+ groupAriaLabel: translate('answer_the_question')
127
+ }));
120
128
 
121
129
  case 'template':
122
- return /*#__PURE__*/_react.default.createElement(_template.default, model);
130
+ return /*#__PURE__*/_react.default.createElement(_template.default, _extends({}, model, {
131
+ groupAriaLabel: translate('answer_the_question')
132
+ }));
123
133
  }
124
134
  };
125
135
 
@@ -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} />;\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,IAA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E,SAAS,CAAC,gBAAD;MAA1C,GAAP;;IACF,KAAK,QAAL;MACE,oBAAO,6BAAC,sBAAD,EAAmBF,KAAnB,CAAP;;IACF,KAAK,UAAL;MACE,oBAAO,6BAAC,iBAAD,EAAcA,KAAd,CAAP;EAdJ;AAgBD,CAnBD;;AAqBAD,MAAM,CAACF,SAAP,2CAAmB;EACjBG,KAAK,EAAEH,kBAAA,CAAUG,KADA;EAEjBC,IAAI,EAAEJ,kBAAA,CAAUI;AAFC,CAAnB;AAKAF,MAAM,CAACI,YAAP,GAAsB;EACpBD,SAAS,EAAEE,iBAAA,CAASC,iBAAT,CAA2BH;AADlB,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"}
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;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AACT,SAAP,2CAAmBA,kBAAnB;eAEeS,M"}
@@ -7,6 +7,7 @@ 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>;
10
11
  }
11
12
  }
12
13
  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,sEAuDC"}
1
+ {"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,sEA6DC"}
@@ -30,7 +30,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
30
30
  const FiltersWapper = (props, context) => {
31
31
  const {
32
32
  filters,
33
- className
33
+ className,
34
+ filterGroupAriaLabel
34
35
  } = props;
35
36
 
36
37
  const buildFilter = (filter, idx) => {
@@ -94,9 +95,11 @@ const FiltersWapper = (props, context) => {
94
95
  })(buildFilter, filters);
95
96
 
96
97
  const emptyFilters = (0, _isEmpty2.default)(filters);
97
- return /*#__PURE__*/_react.default.createElement("div", {
98
- className: (0, _classnames.default)(className, emptyFilters ? _filtersWapper.default.wrapperNone : _filtersWapper.default.wrapper)
99
- }, filtersList);
98
+ return /*#__PURE__*/_react.default.createElement("form", null, /*#__PURE__*/_react.default.createElement("div", {
99
+ className: (0, _classnames.default)(className, emptyFilters ? _filtersWapper.default.wrapperNone : _filtersWapper.default.wrapper),
100
+ role: "group",
101
+ "aria-label": filterGroupAriaLabel
102
+ }, filtersList));
100
103
  };
101
104
 
102
105
  FiltersWapper.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -104,7 +107,8 @@ FiltersWapper.propTypes = process.env.NODE_ENV !== "production" ? {
104
107
  filters: _propTypes.default.arrayOf(_propTypes.default.shape({
105
108
  type: _propTypes.default.oneOf(['select', 'range', 'radio', 'switch']).isRequired,
106
109
  fieldName: _propTypes.default.string.isRequired
107
- }))
110
+ })),
111
+ filterGroupAriaLabel: _propTypes.default.string
108
112
  } : {};
109
113
  var _default = FiltersWapper;
110
114
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"filters-wrapper.js","names":["FiltersWapper","props","context","filters","className","buildFilter","filter","idx","type","fieldName","style","choice","title","radioGroup","timerWrapper","timerSubtitle","subtitle","toggle","display","filtersList","convert","cap","emptyFilters","classnames","wrapperNone","wrapper","propTypes","PropTypes","string","arrayOf","shape","oneOf","isRequired"],"sources":["../../../src/molecule/filters/filters-wrapper.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport RangeSlider from '../../atom/range';\nimport style from './filters-wapper.css';\n\nconst FiltersWapper = (props, context) => {\n const {filters, className} = props;\n\n const buildFilter = (filter, idx) => {\n const {type, fieldName} = filter;\n switch (type) {\n case 'select':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <Select {...filter} />\n </div>\n );\n case 'radio':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <RadioGroup {...filter} className={style.radioGroup} />\n </div>\n );\n case 'range':\n return (\n <div\n data-name=\"choice\"\n data-filter-type={fieldName}\n className={style.timerWrapper}\n key={idx}\n >\n <label>\n <span className={style.title}>{filter.title}</span>\n <p className={style.timerSubtitle}>{filter.subtitle}</p>\n <RangeSlider {...filter} />\n </label>\n </div>\n );\n case 'switch':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <div className={style.toggle}>\n <InputSwitch {...filter.display} />\n </div>\n </div>\n );\n default:\n return null;\n }\n };\n\n const filtersList = map.convert({cap: false})(buildFilter, filters);\n const emptyFilters = isEmpty(filters);\n return (\n <div className={classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)}>\n {filtersList}\n </div>\n );\n};\n\nFiltersWapper.propTypes = {\n className: PropTypes.string,\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf(['select', 'range', 'radio', 'switch']).isRequired,\n fieldName: PropTypes.string.isRequired\n })\n )\n};\nexport default FiltersWapper;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,aAAa,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACxC,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAuBH,KAA7B;;EAEA,MAAMI,WAAW,GAAG,CAACC,MAAD,EAASC,GAAT,KAAiB;IACnC,MAAM;MAACC,IAAD;MAAOC;IAAP,IAAoBH,MAA1B;;IACA,QAAQE,IAAR;MACE,KAAK,QAAL;QACE,oBACE;UAAK,aAAU,QAAf;UAAwB,oBAAkBC,SAA1C;UAAqD,SAAS,EAAEC,sBAAA,CAAMC,MAAtE;UAA8E,GAAG,EAAEJ;QAAnF,gBACE,6BAAC,eAAD,EAAYD,MAAZ,CADF,CADF;;MAKF,KAAK,OAAL;QACE,oBACE;UAAK,aAAU,QAAf;UAAwB,oBAAkBG,SAA1C;UAAqD,SAAS,EAAEC,sBAAA,CAAMC,MAAtE;UAA8E,GAAG,EAAEJ;QAAnF,gBACE;UAAG,SAAS,EAAEG,sBAAA,CAAME;QAApB,GAA4BN,MAAM,CAACM,KAAnC,CADF,eAEE,6BAAC,mBAAD,eAAgBN,MAAhB;UAAwB,SAAS,EAAEI,sBAAA,CAAMG;QAAzC,GAFF,CADF;;MAMF,KAAK,OAAL;QACE,oBACE;UACE,aAAU,QADZ;UAEE,oBAAkBJ,SAFpB;UAGE,SAAS,EAAEC,sBAAA,CAAMI,YAHnB;UAIE,GAAG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SAAS,EAAEkB,kBAAA,CAAUC,MAAV,CAAiBI;EAFd,CAAhB,CADO;AAFe,CAA1B;eASehC,a"}
1
+ {"version":3,"file":"filters-wrapper.js","names":["FiltersWapper","props","context","filters","className","filterGroupAriaLabel","buildFilter","filter","idx","type","fieldName","style","choice","title","radioGroup","timerWrapper","timerSubtitle","subtitle","toggle","display","filtersList","convert","cap","emptyFilters","classnames","wrapperNone","wrapper","propTypes","PropTypes","string","arrayOf","shape","oneOf","isRequired"],"sources":["../../../src/molecule/filters/filters-wrapper.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport RangeSlider from '../../atom/range';\nimport style from './filters-wapper.css';\n\nconst FiltersWapper = (props, context) => {\n const {filters, className, filterGroupAriaLabel} = props;\n\n const buildFilter = (filter, idx) => {\n const {type, fieldName} = filter;\n switch (type) {\n case 'select':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <Select {...filter} />\n </div>\n );\n case 'radio':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <RadioGroup {...filter} className={style.radioGroup} />\n </div>\n );\n case 'range':\n return (\n <div\n data-name=\"choice\"\n data-filter-type={fieldName}\n className={style.timerWrapper}\n key={idx}\n >\n <label>\n <span className={style.title}>{filter.title}</span>\n <p className={style.timerSubtitle}>{filter.subtitle}</p>\n <RangeSlider {...filter} />\n </label>\n </div>\n );\n case 'switch':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <div className={style.toggle}>\n <InputSwitch {...filter.display} />\n </div>\n </div>\n );\n default:\n return null;\n }\n };\n\n const filtersList = map.convert({cap: false})(buildFilter, filters);\n const emptyFilters = isEmpty(filters);\n return (\n <form>\n <div\n className={classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)}\n role=\"group\"\n aria-label={filterGroupAriaLabel}\n >\n {filtersList}\n </div>\n </form>\n );\n};\n\nFiltersWapper.propTypes = {\n className: PropTypes.string,\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf(['select', 'range', 'radio', 'switch']).isRequired,\n fieldName: PropTypes.string.isRequired\n })\n ),\n filterGroupAriaLabel: PropTypes.string\n};\nexport default FiltersWapper;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,aAAa,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACxC,MAAM;IAACC,OAAD;IAAUC,SAAV;IAAqBC;EAArB,IAA6CJ,KAAnD;;EAEA,MAAMK,WAAW,GAAG,CAACC,MAAD,EAASC,GAAT,KAAiB;IACnC,MAAM;MAACC,IAAD;MAAOC;IAAP,IAAoBH,MAA1B;;IACA,QAAQE,IAAR;MACE,KAAK,QAAL;QACE,oBACE;UAAK,aAAU,QAAf;UAAwB,oBAAkBC,SAA1C;UAAqD,SAAS,EAAEC,sBAAA,CAAMC,MAAtE;UAA8E,GAAG,EAAEJ;QAAnF,gBACE,6BAAC,eAAD,EAAYD,MAAZ,CADF,CADF;;MAKF,KAAK,OAAL;QACE,oBACE;UAAK,aAAU,QAAf;UAAwB,oBAAkBG,SAA1C;UAAqD,SAAS,EAAEC,sBAAA,CAAMC,MAAtE;UAA8E,GAAG,EAAEJ;QAAnF,gBACE;UAAG,SAAS,EAAEG,sBAAA,CAAME;QAApB,GAA4BN,MAAM,CAACM,KAAnC,CADF,eAEE,6BAAC,mBAAD,eAAgBN,MAAhB;UAAwB,SAAS,EAAEI,sBAAA,CAAMG;QAAzC,GAFF,CADF;;MAMF,KAAK,OAAL;QACE,oBACE;UACE,aAAU,QADZ;UAEE,oBAAkBJ,SAFpB;UAGE,SAAS,E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,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,OAApB,EAA6B,QAA7B,CAAhB,EAAwDC,UADhD;IAEdvB,SAAS,EAAEkB,kBAAA,CAAUC,MAAV,CAAiBI;EAFd,CAAhB,CADO,CAFe;EAQxB5B,oBAAoB,EAAEuB,kBAAA,CAAUC;AARR,CAA1B;eAUe7B,a"}
@@ -37,6 +37,7 @@ declare class Filters extends React.Component<any, any, any> {
37
37
  onToggleSorts: PropTypes.Requireable<(...args: any[]) => any>;
38
38
  moreSortAriaLabel: PropTypes.Requireable<string>;
39
39
  moreFilterAriaLabel: PropTypes.Requireable<string>;
40
+ filterGroupAriaLabel: PropTypes.Requireable<string>;
40
41
  };
41
42
  static contextTypes: {
42
43
  skin: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBAsFC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAeE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBA2FC;CACF"}
@@ -86,7 +86,8 @@ class Filters extends _react.default.Component {
86
86
  sortTabLabel,
87
87
  filters,
88
88
  moreFilterAriaLabel,
89
- moreSortAriaLabel
89
+ moreSortAriaLabel,
90
+ filterGroupAriaLabel
90
91
  } = this.props;
91
92
  const {
92
93
  filter,
@@ -139,7 +140,8 @@ class Filters extends _react.default.Component {
139
140
  className: filtersActive ? _style.default.activeWrapperFilters : _style.default.wrapperFilters
140
141
  }, /*#__PURE__*/_react.default.createElement(_filtersWrapper.default, {
141
142
  className: _style.default.wrapper,
142
- filters: filters
143
+ filters: filters,
144
+ filterGroupAriaLabel: filterGroupAriaLabel
143
145
  }), /*#__PURE__*/_react.default.createElement("div", {
144
146
  "data-name": "cta",
145
147
  className: _style.default.CTAfilter,
@@ -178,7 +180,8 @@ Filters.propTypes = process.env.NODE_ENV !== "production" ? {
178
180
  onToggleFilters: _propTypes.default.func,
179
181
  onToggleSorts: _propTypes.default.func,
180
182
  moreSortAriaLabel: _propTypes.default.string,
181
- moreFilterAriaLabel: _propTypes.default.string
183
+ moreFilterAriaLabel: _propTypes.default.string,
184
+ filterGroupAriaLabel: _propTypes.default.string
182
185
  } : {};
183
186
  var _default = Filters;
184
187
  exports.default = _default;