@coorpacademy/components 10.29.8 → 10.30.0

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 (68) hide show
  1. package/es/atom/button-link/index.d.ts +1 -0
  2. package/es/atom/button-link/index.d.ts.map +1 -1
  3. package/es/atom/button-link/index.js +4 -0
  4. package/es/atom/button-link/index.js.map +1 -1
  5. package/es/molecule/brand-form-group/index.d.ts +1 -0
  6. package/es/molecule/review-correction-popin/index.js +4 -2
  7. package/es/molecule/review-correction-popin/index.js.map +1 -1
  8. package/es/organism/brand-form/index.d.ts +1 -0
  9. package/es/organism/list-items/index.d.ts +1 -0
  10. package/es/organism/mooc-header/index.d.ts.map +1 -1
  11. package/es/organism/mooc-header/index.js +28 -14
  12. package/es/organism/mooc-header/index.js.map +1 -1
  13. package/es/organism/mooc-header/style.css +26 -12
  14. package/es/organism/review-congrats/index.d.ts.map +1 -1
  15. package/es/organism/review-congrats/index.js +5 -3
  16. package/es/organism/review-congrats/index.js.map +1 -1
  17. package/es/organism/review-header/index.js +1 -1
  18. package/es/organism/review-header/index.js.map +1 -1
  19. package/es/organism/review-slide/index.d.ts.map +1 -1
  20. package/es/organism/review-slide/index.js +5 -3
  21. package/es/organism/review-slide/index.js.map +1 -1
  22. package/es/organism/setup-header/index.d.ts +4 -0
  23. package/es/organism/wizard-contents/index.d.ts +1 -0
  24. package/es/template/app-review/player/index.js +2 -2
  25. package/es/template/app-review/player/index.js.map +1 -1
  26. package/es/template/back-office/brand-create/index.d.ts +4 -0
  27. package/es/template/back-office/brand-create/index.d.ts.map +1 -1
  28. package/es/template/back-office/brand-list/index.d.ts +4 -0
  29. package/es/template/back-office/brand-list/index.d.ts.map +1 -1
  30. package/es/template/back-office/brand-update/index.d.ts +7 -0
  31. package/es/template/back-office/dashboard-preview/index.d.ts +4 -0
  32. package/es/template/back-office/layout/index.d.ts +4 -0
  33. package/es/template/back-office/layout/index.d.ts.map +1 -1
  34. package/lib/atom/button-link/index.d.ts +1 -0
  35. package/lib/atom/button-link/index.d.ts.map +1 -1
  36. package/lib/atom/button-link/index.js +4 -0
  37. package/lib/atom/button-link/index.js.map +1 -1
  38. package/lib/molecule/brand-form-group/index.d.ts +1 -0
  39. package/lib/molecule/review-correction-popin/index.js +4 -2
  40. package/lib/molecule/review-correction-popin/index.js.map +1 -1
  41. package/lib/organism/brand-form/index.d.ts +1 -0
  42. package/lib/organism/list-items/index.d.ts +1 -0
  43. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  44. package/lib/organism/mooc-header/index.js +27 -13
  45. package/lib/organism/mooc-header/index.js.map +1 -1
  46. package/lib/organism/mooc-header/style.css +26 -12
  47. package/lib/organism/review-congrats/index.d.ts.map +1 -1
  48. package/lib/organism/review-congrats/index.js +5 -3
  49. package/lib/organism/review-congrats/index.js.map +1 -1
  50. package/lib/organism/review-header/index.js +1 -1
  51. package/lib/organism/review-header/index.js.map +1 -1
  52. package/lib/organism/review-slide/index.d.ts.map +1 -1
  53. package/lib/organism/review-slide/index.js +5 -3
  54. package/lib/organism/review-slide/index.js.map +1 -1
  55. package/lib/organism/setup-header/index.d.ts +4 -0
  56. package/lib/organism/wizard-contents/index.d.ts +1 -0
  57. package/lib/template/app-review/player/index.js +2 -2
  58. package/lib/template/app-review/player/index.js.map +1 -1
  59. package/lib/template/back-office/brand-create/index.d.ts +4 -0
  60. package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
  61. package/lib/template/back-office/brand-list/index.d.ts +4 -0
  62. package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
  63. package/lib/template/back-office/brand-update/index.d.ts +7 -0
  64. package/lib/template/back-office/dashboard-preview/index.d.ts +4 -0
  65. package/lib/template/back-office/layout/index.d.ts +4 -0
  66. package/lib/template/back-office/layout/index.d.ts.map +1 -1
  67. package/package.json +3 -3
  68. package/locales/.mtslconfig.json +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","classnames","getOr","ButtonLinkIconOnly","ReviewHeaderSteps","style","propTypes","ReviewHeader","props","context","steps","mode","skillName","ariaLabel","closeButtonAriaLabel","onQuitClick","hiddenSteps","skin","primarySkinColor","buttonProps","icon","onClick","size","className","review","stepsWrapper","stepsWrapperAnimation","headerWrapper","titlesWrapper","title","color","iconButtonWrapper"],"sources":["../../../src/organism/review-header/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport getOr from 'lodash/fp/getOr';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport ReviewHeaderSteps from '../../molecule/review-header-steps';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst ReviewHeader = (props, context) => {\n const {\n steps,\n mode,\n skillName,\n 'aria-label': ariaLabel,\n closeButtonAriaLabel,\n onQuitClick,\n hiddenSteps\n } = props;\n const {skin} = context;\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const buttonProps = {\n icon: 'close',\n 'data-name': 'review-header-close-button',\n 'aria-label': closeButtonAriaLabel,\n onClick: onQuitClick,\n size: 'responsive',\n className: style.review\n };\n\n const stepsWrapper = classnames(\n style.stepsWrapper,\n hiddenSteps ? style.stepsWrapperAnimation : null\n );\n\n return (\n <div className={style.headerWrapper} data-name=\"review-header\" aria-label={ariaLabel}>\n <div className={style.titlesWrapper}>\n <div className={style.title} title={mode} aria-label={mode} data-name=\"review-header-mode\">\n {mode}\n </div>\n <div\n className={style.skillName}\n style={{\n color: primarySkinColor\n }}\n title={skillName}\n aria-label={skillName}\n data-name=\"review-header-skill-name\"\n >\n {skillName}\n </div>\n </div>\n\n <div className={stepsWrapper}>\n <ReviewHeaderSteps steps={steps} key={'review-header-steps'} />\n </div>\n\n <div className={style.iconButtonWrapper} data-name=\"review-header-close-button-wrapper\">\n <ButtonLinkIconOnly {...buttonProps} />\n </div>\n </div>\n );\n};\n\nReviewHeader.propTypes = propTypes;\n\nexport default ReviewHeader;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,UAA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F,CADF,eAkBE;IAAK,SAAS,EAAEa;EAAhB,gBACE,oBAAC,iBAAD;IAAmB,KAAK,EAAEf,KAA1B;IAAiC,GAAG,EAAE;EAAtC,EADF,CAlBF,eAsBE;IAAK,SAAS,EAAEL,KAAK,CAAC0B,iBAAtB;IAAyC,aAAU;EAAnD,gBACE,oBAAC,kBAAD,EAAwBZ,WAAxB,CADF,CAtBF,CADF;AA4BD,CAvDD;;AAyDAZ,YAAY,CAACD,SAAb,2CAAyBA,SAAzB;AAEA,eAAeC,YAAf"}
1
+ {"version":3,"file":"index.js","names":["React","classnames","getOr","ButtonLinkIconOnly","ReviewHeaderSteps","style","propTypes","ReviewHeader","props","context","steps","mode","skillName","ariaLabel","closeButtonAriaLabel","onQuitClick","hiddenSteps","skin","primarySkinColor","buttonProps","icon","onClick","size","className","review","stepsWrapper","stepsWrapperAnimation","headerWrapper","titlesWrapper","title","color","iconButtonWrapper"],"sources":["../../../src/organism/review-header/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport getOr from 'lodash/fp/getOr';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport ReviewHeaderSteps from '../../molecule/review-header-steps';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst ReviewHeader = (props, context) => {\n const {\n steps,\n mode,\n skillName,\n 'aria-label': ariaLabel,\n closeButtonAriaLabel,\n onQuitClick,\n hiddenSteps\n } = props;\n const {skin} = context;\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const buttonProps = {\n icon: 'close',\n 'data-name': 'review-header-close-button',\n 'aria-label': closeButtonAriaLabel,\n onClick: onQuitClick,\n size: 'responsive',\n className: style.review\n };\n\n const stepsWrapper = classnames(\n style.stepsWrapper,\n hiddenSteps ? style.stepsWrapperAnimation : null\n );\n\n return (\n <div className={style.headerWrapper} data-name=\"review-header\" aria-label={ariaLabel}>\n <div className={style.titlesWrapper}>\n <div className={style.title} title={mode} aria-label={mode} data-name=\"review-header-mode\">\n {mode}\n </div>\n <div\n className={style.skillName}\n style={{\n color: primarySkinColor\n }}\n title={skillName}\n aria-label={skillName}\n data-name=\"review-header-skill-name\"\n >\n {skillName}\n </div>\n </div>\n\n <div className={stepsWrapper}>\n <ReviewHeaderSteps steps={steps} key={'review-header-steps'} />\n </div>\n\n <div className={style.iconButtonWrapper} data-testid=\"review-header-close-button-wrapper\">\n <ButtonLinkIconOnly {...buttonProps} />\n </div>\n </div>\n );\n};\n\nReviewHeader.propTypes = propTypes;\n\nexport default ReviewHeader;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,iBAAP,MAA8B,oCAA9B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,SAAtB;;AAEA,MAAMC,YAAY,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACvC,MAAM;IACJC,KADI;IAEJC,IAFI;IAGJC,SAHI;IAIJ,cAAcC,SAJV;IAKJC,oBALI;IAMJC,WANI;IAOJC;EAPI,IAQFR,KARJ;EASA,MAAM;IAACS;EAAD,IAASR,OAAf;EACA,MAAMS,gBAAgB,GAAGhB,KAAK,CAAC,SAAD,EAAY,gBAAZ,EAA8Be,IAA9B,CAA9B;EAEA,MAAME,WAAW,GAAG;IAClBC,IAAI,EAAE,OADY;IAElB,aAAa,4BAFK;IAGlB,cAAcN,oBAHI;IAIlBO,OAAO,EAAEN,WAJS;IAKlBO,IAAI,EAAE,YALY;IAMlBC,SAAS,EAAElB,KAAK,CAACmB;EANC,CAApB;EASA,MAAMC,YAAY,GAAGxB,UAAU,CAC7BI,KAAK,CAACoB,YADuB,EAE7BT,WAAW,GAAGX,KAAK,CAACqB,qBAAT,GAAiC,IAFf,CAA/B;EAKA,oBACE;IAAK,SAAS,EAAErB,KAAK,CAACsB,aAAtB;IAAqC,aAAU,eAA/C;IAA+D,cAAYd;EAA3E,gBACE;IAAK,SAAS,EAAER,KAAK,CAACuB;EAAtB,gBACE;IAAK,SAAS,EAAEvB,KAAK,CAACwB,KAAtB;IAA6B,KAAK,EAAElB,IAApC;IAA0C,cAAYA,IAAtD;IAA4D,aAAU;EAAtE,GACGA,IADH,CADF,eAIE;IACE,SAAS,EAAEN,KAAK,CAACO,SADnB;IAEE,KAAK,EAAE;MACLkB,KAAK,EAAEZ;IADF,CAFT;IAKE,KAAK,EAAEN,SALT;IAME,cAAYA,SANd;IAOE,aAAU;EAPZ,GASGA,SATH,CAJF,CADF,eAkBE;IAAK,SAAS,EAAEa;EAAhB,gBACE,oBAAC,iBAAD;IAAmB,KAAK,EAAEf,KAA1B;IAAiC,GAAG,EAAE;EAAtC,EADF,CAlBF,eAsBE;IAAK,SAAS,EAAEL,KAAK,CAAC0B,iBAAtB;IAAyC,eAAY;EAArD,gBACE,oBAAC,kBAAD,EAAwBZ,WAAxB,CADF,CAtBF,CADF;AA4BD,CAvDD;;AAyDAZ,YAAY,CAACD,SAAb,2CAAyBA,SAAzB;AAEA,eAAeC,YAAf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/index.js"],"names":[],"mappings":";AA4HA,sDA8CC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/index.js"],"names":[],"mappings":";AA8HA,sDA8CC"}
@@ -95,12 +95,14 @@ const QuestionContainer = props => {
95
95
  if (!answerUI || !questionText) return null;
96
96
  return /*#__PURE__*/React.createElement("div", {
97
97
  key: "content-container",
98
+ "data-testid": "content-container",
98
99
  className: classnames(style.slideContentContainer, disableContent ? style.disabledSlideContent : null)
99
100
  }, /*#__PURE__*/React.createElement("div", {
100
101
  key: "from-course",
101
102
  className: style.questionOrigin
102
103
  }, questionOrigin), /*#__PURE__*/React.createElement("div", {
103
104
  key: "title",
105
+ "data-testid": "slide-question",
104
106
  className: style.question // eslint-disable-next-line react/no-danger
105
107
  ,
106
108
  dangerouslySetInnerHTML: {
@@ -144,13 +146,13 @@ const ReviewSlide = props => {
144
146
  animateCorrectionPopin
145
147
  } = slide;
146
148
  return /*#__PURE__*/React.createElement("div", {
147
- "data-name": `slide-container`,
149
+ "data-testid": "review-slide",
148
150
  className: style.slide
149
151
  }, loading ? /*#__PURE__*/React.createElement(Loader, {
150
152
  className: style.loader,
151
153
  theme: "default",
152
154
  "aria-label": loadingAriaLabel
153
- }) : [/*#__PURE__*/React.createElement(QuestionContainer, {
155
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(QuestionContainer, {
154
156
  questionOrigin: parentContentTitle,
155
157
  questionText: questionText,
156
158
  answerUI: answerUI,
@@ -167,7 +169,7 @@ const ReviewSlide = props => {
167
169
  showCorrectionPopin: showCorrectionPopin,
168
170
  animateCorrectionPopin: animateCorrectionPopin,
169
171
  key: "correction-popin"
170
- })]);
172
+ })));
171
173
  };
172
174
 
173
175
  ReviewSlide.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","get","getOr","Answer","ButtonLink","Loader","ReviewCorrectionPopin","GetSkinFromContext","propTypes","style","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","klf","information","label","message","next","onClick","_correctionPopinProps","type","resultLabel","correctionPopinWrapper","popinAnimation","string","bool","ValidateButton","validateButton","primarySkinColor","disabled","validateButtonProps","className","customStyle","backgroundColor","validateButtonWrapper","QuestionContainer","props","answerUI","questionText","questionOrigin","disableContent","slideContentContainer","disabledSlideContent","question","__html","help","answerContainer","shape","slide","ReviewSlide","skin","loading","loadingAriaLabel","parentContentTitle","disabledContent","loader"],"sources":["../../../src/organism/review-slide/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport Answer from '../../molecule/answer';\nimport ButtonLink from '../../atom/button-link';\nimport Loader from '../../atom/loader';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin';\nimport {GetSkinFromContext} from '../../atom/provider';\nimport propTypes from './prop-types';\nimport style from './style.css';\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}) => {\n if (!showCorrectionPopin) return null;\n\n const klf = getOr({}, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n return (\n <div\n className={classnames(\n style.correctionPopinWrapper,\n animateCorrectionPopin ? style.popinAnimation : null\n )}\n >\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </div>\n );\n};\n\nCorrectionPopin.propTypes = {\n slideIndex: PropTypes.string,\n showCorrectionPopin: PropTypes.bool,\n animateCorrectionPopin: PropTypes.bool,\n correctionPopinProps: propTypes.correctionPopinProps\n};\n\nconst ValidateButton = ({slideIndex, validateButton, primarySkinColor}) => {\n const {label, onClick, disabled} = validateButton;\n const validateButtonProps = {\n type: 'primary',\n label,\n 'aria-label': label,\n 'data-name': `slide-validate-button-${slideIndex}`,\n onClick,\n disabled,\n className: style.validateButton,\n customStyle: {\n backgroundColor: primarySkinColor\n }\n };\n\n return (\n <div key=\"button-wrapper\" className={style.validateButtonWrapper}>\n <ButtonLink {...validateButtonProps} />\n </div>\n );\n};\n\nValidateButton.propTypes = {\n slideIndex: PropTypes.string,\n validateButton: propTypes.validateButton,\n primarySkinColor: PropTypes.string\n};\n\nconst QuestionContainer = props => {\n const {answerUI, questionText, questionOrigin, disableContent} = props;\n if (!answerUI || !questionText) return null;\n\n return (\n <div\n key=\"content-container\"\n className={classnames(\n style.slideContentContainer,\n disableContent ? style.disabledSlideContent : null\n )}\n >\n <div key=\"from-course\" className={style.questionOrigin}>\n {questionOrigin}\n </div>\n <div\n key=\"title\"\n className={style.question}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: questionText}}\n />\n <div key=\"help\" className={style.help}>\n {get('help', answerUI)}\n </div>\n <div key=\"answer-container\" className={style.answerContainer}>\n <Answer {...answerUI} key=\"answer\" />\n </div>\n </div>\n );\n};\n\nQuestionContainer.propTypes = {\n answerUI: PropTypes.shape(propTypes.slide.answerUI),\n questionText: PropTypes.string,\n questionOrigin: PropTypes.string,\n disableContent: PropTypes.bool\n};\n\nconst ReviewSlide = props => {\n const {slide, validateButton, correctionPopinProps, slideIndex = '0'} = props;\n\n const skin = GetSkinFromContext();\n const primarySkinColor = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const {\n loading,\n loadingAriaLabel,\n parentContentTitle,\n questionText,\n disabledContent,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n return (\n <div data-name={`slide-container`} className={style.slide}>\n {loading ? (\n <Loader className={style.loader} theme=\"default\" aria-label={loadingAriaLabel} />\n ) : (\n [\n <QuestionContainer\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n disableContent={disabledContent}\n key=\"question-container\"\n />,\n <ValidateButton\n slideIndex={slideIndex}\n validateButton={validateButton}\n primarySkinColor={primarySkinColor}\n key=\"validate-button\"\n />,\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n ]\n )}\n </div>\n );\n};\n\nReviewSlide.propTypes = propTypes;\n\nexport default ReviewSlide;\n"],"mappings":";;AAA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,GAAG7C,kBAAkB,EAA/B;EACA,MAAMuB,gBAAgB,GAAGhC,OAAO,CAAC,MAAMI,KAAK,CAAC,SAAD,EAAY,gBAAZ,EAA8BkD,IAA9B,CAAZ,EAAiD,CAACA,IAAD,CAAjD,CAAhC;EACA,MAAM;IACJC,OADI;IAEJC,gBAFI;IAGJC,kBAHI;IAIJf,YAJI;IAKJgB,eALI;IAMJjB,QANI;IAOJ1B,mBAPI;IAQJC;EARI,IASFoC,KATJ;EAWA,oBACE;IAAK,aAAY,iBAAjB;IAAmC,SAAS,EAAEzC,KAAK,CAACyC;EAApD,GACGG,OAAO,gBACN,oBAAC,MAAD;IAAQ,SAAS,EAAE5C,KAAK,CAACgD,MAAzB;IAAiC,KAAK,EAAC,SAAvC;IAAiD,cAAYH;EAA7D,EADM,GAGN,cACE,oBAAC,iBAAD;IACE,cAAc,EAAEC,kBADlB;IAEE,YAAY,EAAEf,YAFhB;IAGE,QAAQ,EAAED,QAHZ;IAIE,cAAc,EAAEiB,eAJlB;IAKE,GAAG,EAAC;EALN,EADF,eAQE,oBAAC,cAAD;IACE,UAAU,EAAE5C,UADd;IAEE,cAAc,EAAEiB,cAFlB;IAGE,gBAAgB,EAAEC,gBAHpB;IAIE,GAAG,EAAC;EAJN,EARF,eAcE,oBAAC,eAAD;IACE,oBAAoB,EAAEnB,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EAdF,CAJJ,CADF;AA8BD,CA9CD;;AAgDAqC,WAAW,CAAC3C,SAAZ,2CAAwBA,SAAxB;AAEA,eAAe2C,WAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","get","getOr","Answer","ButtonLink","Loader","ReviewCorrectionPopin","GetSkinFromContext","propTypes","style","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","klf","information","label","message","next","onClick","_correctionPopinProps","type","resultLabel","correctionPopinWrapper","popinAnimation","string","bool","ValidateButton","validateButton","primarySkinColor","disabled","validateButtonProps","className","customStyle","backgroundColor","validateButtonWrapper","QuestionContainer","props","answerUI","questionText","questionOrigin","disableContent","slideContentContainer","disabledSlideContent","question","__html","help","answerContainer","shape","slide","ReviewSlide","skin","loading","loadingAriaLabel","parentContentTitle","disabledContent","loader"],"sources":["../../../src/organism/review-slide/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport Answer from '../../molecule/answer';\nimport ButtonLink from '../../atom/button-link';\nimport Loader from '../../atom/loader';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin';\nimport {GetSkinFromContext} from '../../atom/provider';\nimport propTypes from './prop-types';\nimport style from './style.css';\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}) => {\n if (!showCorrectionPopin) return null;\n\n const klf = getOr({}, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n return (\n <div\n className={classnames(\n style.correctionPopinWrapper,\n animateCorrectionPopin ? style.popinAnimation : null\n )}\n >\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </div>\n );\n};\n\nCorrectionPopin.propTypes = {\n slideIndex: PropTypes.string,\n showCorrectionPopin: PropTypes.bool,\n animateCorrectionPopin: PropTypes.bool,\n correctionPopinProps: propTypes.correctionPopinProps\n};\n\nconst ValidateButton = ({slideIndex, validateButton, primarySkinColor}) => {\n const {label, onClick, disabled} = validateButton;\n const validateButtonProps = {\n type: 'primary',\n label,\n 'aria-label': label,\n 'data-name': `slide-validate-button-${slideIndex}`,\n onClick,\n disabled,\n className: style.validateButton,\n customStyle: {\n backgroundColor: primarySkinColor\n }\n };\n\n return (\n <div key=\"button-wrapper\" className={style.validateButtonWrapper}>\n <ButtonLink {...validateButtonProps} />\n </div>\n );\n};\n\nValidateButton.propTypes = {\n slideIndex: PropTypes.string,\n validateButton: propTypes.validateButton,\n primarySkinColor: PropTypes.string\n};\n\nconst QuestionContainer = props => {\n const {answerUI, questionText, questionOrigin, disableContent} = props;\n if (!answerUI || !questionText) return null;\n\n return (\n <div\n key=\"content-container\"\n data-testid=\"content-container\"\n className={classnames(\n style.slideContentContainer,\n disableContent ? style.disabledSlideContent : null\n )}\n >\n <div key=\"from-course\" className={style.questionOrigin}>\n {questionOrigin}\n </div>\n <div\n key=\"title\"\n data-testid=\"slide-question\"\n className={style.question}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: questionText}}\n />\n <div key=\"help\" className={style.help}>\n {get('help', answerUI)}\n </div>\n <div key=\"answer-container\" className={style.answerContainer}>\n <Answer {...answerUI} key=\"answer\" />\n </div>\n </div>\n );\n};\n\nQuestionContainer.propTypes = {\n answerUI: PropTypes.shape(propTypes.slide.answerUI),\n questionText: PropTypes.string,\n questionOrigin: PropTypes.string,\n disableContent: PropTypes.bool\n};\n\nconst ReviewSlide = props => {\n const {slide, validateButton, correctionPopinProps, slideIndex = '0'} = props;\n\n const skin = GetSkinFromContext();\n const primarySkinColor = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const {\n loading,\n loadingAriaLabel,\n parentContentTitle,\n questionText,\n disabledContent,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n return (\n <div data-testid=\"review-slide\" className={style.slide}>\n {loading ? (\n <Loader className={style.loader} theme=\"default\" aria-label={loadingAriaLabel} />\n ) : (\n <>\n <QuestionContainer\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n disableContent={disabledContent}\n key=\"question-container\"\n />\n <ValidateButton\n slideIndex={slideIndex}\n validateButton={validateButton}\n primarySkinColor={primarySkinColor}\n key=\"validate-button\"\n />\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n </>\n )}\n </div>\n );\n};\n\nReviewSlide.propTypes = propTypes;\n\nexport default ReviewSlide;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,MAAP,MAAmB,uBAAnB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,qBAAP,MAAkC,wCAAlC;AACA,SAAQC,kBAAR,QAAiC,qBAAjC;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,eAAe,GAAG,CAAC;EACvBC,oBADuB;EAEvBC,UAFuB;EAGvBC,mBAHuB;EAIvBC;AAJuB,CAAD,KAKlB;EACJ,IAAI,CAACD,mBAAL,EAA0B,OAAO,IAAP;EAE1B,MAAME,GAAG,GAAGb,KAAK,CAAC,EAAD,EAAK,KAAL,EAAYS,oBAAZ,CAAjB;EACA,MAAMK,WAAW,GAAGd,KAAK,CAAC;IAACe,KAAK,EAAE,EAAR;IAAYC,OAAO,EAAE;EAArB,CAAD,EAA2B,aAA3B,EAA0CP,oBAA1C,CAAzB;EACA,MAAMQ,IAAI,GAAGlB,GAAG,CAAC,MAAD,EAASU,oBAAT,CAAhB;EACA,MAAMS,OAAO,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AEnB,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EAdF,CAJJ,CADF;AA8BD,CA9CD;;AAgDAqC,WAAW,CAAC3C,SAAZ,2CAAwBA,SAAxB;AAEA,eAAe2C,WAAf"}
@@ -8,6 +8,7 @@ declare namespace SetupHeader {
8
8
  label: PropTypes.Requireable<string>;
9
9
  'aria-label': PropTypes.Requireable<string>;
10
10
  'data-name': PropTypes.Requireable<string>;
11
+ 'data-testid': PropTypes.Requireable<string>;
11
12
  icon: PropTypes.Requireable<PropTypes.InferProps<{
12
13
  position: PropTypes.Requireable<string>;
13
14
  type: PropTypes.Requireable<string>;
@@ -27,6 +28,7 @@ declare namespace SetupHeader {
27
28
  label: PropTypes.Requireable<string>;
28
29
  'aria-label': PropTypes.Requireable<string>;
29
30
  'data-name': PropTypes.Requireable<string>;
31
+ 'data-testid': PropTypes.Requireable<string>;
30
32
  icon: PropTypes.Requireable<PropTypes.InferProps<{
31
33
  position: PropTypes.Requireable<string>;
32
34
  type: PropTypes.Requireable<string>;
@@ -46,6 +48,7 @@ declare namespace SetupHeader {
46
48
  label: PropTypes.Requireable<string>;
47
49
  'aria-label': PropTypes.Requireable<string>;
48
50
  'data-name': PropTypes.Requireable<string>;
51
+ 'data-testid': PropTypes.Requireable<string>;
49
52
  icon: PropTypes.Requireable<PropTypes.InferProps<{
50
53
  position: PropTypes.Requireable<string>;
51
54
  type: PropTypes.Requireable<string>;
@@ -65,6 +68,7 @@ declare namespace SetupHeader {
65
68
  label: PropTypes.Requireable<string>;
66
69
  'aria-label': PropTypes.Requireable<string>;
67
70
  'data-name': PropTypes.Requireable<string>;
71
+ 'data-testid': PropTypes.Requireable<string>;
68
72
  icon: PropTypes.Requireable<PropTypes.InferProps<{
69
73
  position: PropTypes.Requireable<string>;
70
74
  type: PropTypes.Requireable<string>;
@@ -412,6 +412,7 @@ declare namespace WizardContents {
412
412
  label: PropTypes.Requireable<string>;
413
413
  'aria-label': PropTypes.Requireable<string>;
414
414
  'data-name': PropTypes.Requireable<string>;
415
+ 'data-testid': PropTypes.Requireable<string>;
415
416
  icon: PropTypes.Requireable<PropTypes.InferProps<{
416
417
  position: PropTypes.Requireable<string>;
417
418
  type: PropTypes.Requireable<string>;
@@ -30,10 +30,10 @@ const PlayerReview = ({
30
30
  className: classnames(style.reviewHeaderContainer, congrats && style.reviewHeaderContainerCongrats)
31
31
  }, /*#__PURE__*/React.createElement(ReviewHeader, header)), /*#__PURE__*/React.createElement(StackedSlides, stack), isNil(congrats) ? null : /*#__PURE__*/React.createElement("div", {
32
32
  className: style.congrats,
33
- "data-name": "congrats-container"
33
+ "data-testid": "congrats-container"
34
34
  }, /*#__PURE__*/React.createElement(ReviewCongrats, congrats)), isNil(quitPopin) ? null : /*#__PURE__*/React.createElement("div", {
35
35
  className: style.quitPopin,
36
- "data-name": "popin-container"
36
+ "data-testid": "quit-popin-container"
37
37
  }, /*#__PURE__*/React.createElement(CMPopin, quitPopin)));
38
38
  };
39
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","isNil","classnames","ReviewBackground","ReviewCongrats","ReviewHeader","StackedSlides","CMPopin","style","propTypes","PlayerReview","header","stack","reviewBackgroundAriaLabel","congrats","quitPopin","playerReviewContainer","playerBackground","reviewHeaderContainer","reviewHeaderContainerCongrats"],"sources":["../../../../src/template/app-review/player/index.js"],"sourcesContent":["import React from 'react';\nimport isNil from 'lodash/fp/isNil';\nimport classnames from 'classnames';\nimport ReviewBackground from '../../../atom/review-background';\nimport ReviewCongrats from '../../../organism/review-congrats';\nimport ReviewHeader from '../../../organism/review-header';\nimport StackedSlides from '../../../organism/review-stacked-slides';\nimport CMPopin from '../../../molecule/cm-popin';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst PlayerReview = ({header, stack, reviewBackgroundAriaLabel, congrats, quitPopin}) => {\n return (\n <div\n key=\"review-player-container\"\n data-name=\"review-player-container\"\n className={style.playerReviewContainer}\n >\n <div key=\"player-background-container\" className={style.playerBackground}>\n <ReviewBackground aria-label={reviewBackgroundAriaLabel} />\n </div>\n <div\n key=\"review-header-wrapper\"\n className={classnames(\n style.reviewHeaderContainer,\n congrats && style.reviewHeaderContainerCongrats\n )}\n >\n <ReviewHeader {...header} />\n </div>\n <StackedSlides {...stack} />\n {isNil(congrats) ? null : (\n <div className={style.congrats} data-name=\"congrats-container\">\n <ReviewCongrats {...congrats} />\n </div>\n )}\n\n {isNil(quitPopin) ? null : (\n <div className={style.quitPopin} data-name=\"popin-container\">\n <CMPopin {...quitPopin} />\n </div>\n )}\n </div>\n );\n};\n\nPlayerReview.propTypes = propTypes;\n\nexport default PlayerReview;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,gBAAP,MAA6B,iCAA7B;AACA,OAAOC,cAAP,MAA2B,mCAA3B;AACA,OAAOC,YAAP,MAAyB,iCAAzB;AACA,OAAOC,aAAP,MAA0B,yCAA1B;AACA,OAAOC,OAAP,MAAoB,4BAApB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;;AAEA,MAAMC,YAAY,GAAG,CAAC;EAACC,MAAD;EAASC,KAAT;EAAgBC,yBAAhB;EAA2CC,QAA3C;EAAqDC;AAArD,CAAD,KAAqE;EACxF,oBACE;IACE,GAAG,EAAC,yBADN;IAEE,aAAU,yBAFZ;IAGE,SAAS,EAAEP,KAAK,CAACQ;EAHnB,gBAKE;IAAK,GAAG,EAAC,6BAAT;IAAuC,SAAS,EAAER,KAAK,CAACS;EAAxD,gBACE,oBAAC,gBAAD;IAAkB,cAAYJ;EAA9B,EADF,CALF,eAQE;IACE,GAAG,EAAC,uBADN;IAEE,SAAS,EAAEX,UAAU,CACnBM,KAAK,CAACU,qBADa,EAEnBJ,QAAQ,IAAIN,KAAK,CAACW,6BAFC;EAFvB,gBAOE,oBAAC,YAAD,EAAkBR,MAAlB,CAPF,CARF,eAiBE,oBAAC,aAAD,EAAmBC,KAAnB,CAjBF,EAkBGX,KAAK,CAACa,QAAD,CAAL,GAAkB,IAAlB,gBACC;IAAK,SAAS,EAAEN,KAAK,CAACM,QAAtB;IAAgC,aAAU;EAA1C,gBACE,oBAAC,cAAD,EAAoBA,QAApB,CADF,CAnBJ,EAwBGb,KAAK,CAACc,SAAD,CAAL,GAAmB,IAAnB,gBACC;IAAK,SAAS,EAAEP,KAAK,CAACO,SAAtB;IAAiC,aAAU;EAA3C,gBACE,oBAAC,OAAD,EAAaA,SAAb,CADF,CAzBJ,CADF;AAgCD,CAjCD;;AAmCAL,YAAY,CAACD,SAAb,2CAAyBA,SAAzB;AAEA,eAAeC,YAAf"}
1
+ {"version":3,"file":"index.js","names":["React","isNil","classnames","ReviewBackground","ReviewCongrats","ReviewHeader","StackedSlides","CMPopin","style","propTypes","PlayerReview","header","stack","reviewBackgroundAriaLabel","congrats","quitPopin","playerReviewContainer","playerBackground","reviewHeaderContainer","reviewHeaderContainerCongrats"],"sources":["../../../../src/template/app-review/player/index.js"],"sourcesContent":["import React from 'react';\nimport isNil from 'lodash/fp/isNil';\nimport classnames from 'classnames';\nimport ReviewBackground from '../../../atom/review-background';\nimport ReviewCongrats from '../../../organism/review-congrats';\nimport ReviewHeader from '../../../organism/review-header';\nimport StackedSlides from '../../../organism/review-stacked-slides';\nimport CMPopin from '../../../molecule/cm-popin';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst PlayerReview = ({header, stack, reviewBackgroundAriaLabel, congrats, quitPopin}) => {\n return (\n <div\n key=\"review-player-container\"\n data-name=\"review-player-container\"\n className={style.playerReviewContainer}\n >\n <div key=\"player-background-container\" className={style.playerBackground}>\n <ReviewBackground aria-label={reviewBackgroundAriaLabel} />\n </div>\n <div\n key=\"review-header-wrapper\"\n className={classnames(\n style.reviewHeaderContainer,\n congrats && style.reviewHeaderContainerCongrats\n )}\n >\n <ReviewHeader {...header} />\n </div>\n <StackedSlides {...stack} />\n {isNil(congrats) ? null : (\n <div className={style.congrats} data-testid=\"congrats-container\">\n <ReviewCongrats {...congrats} />\n </div>\n )}\n\n {isNil(quitPopin) ? null : (\n <div className={style.quitPopin} data-testid=\"quit-popin-container\">\n <CMPopin {...quitPopin} />\n </div>\n )}\n </div>\n );\n};\n\nPlayerReview.propTypes = propTypes;\n\nexport default PlayerReview;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,gBAAP,MAA6B,iCAA7B;AACA,OAAOC,cAAP,MAA2B,mCAA3B;AACA,OAAOC,YAAP,MAAyB,iCAAzB;AACA,OAAOC,aAAP,MAA0B,yCAA1B;AACA,OAAOC,OAAP,MAAoB,4BAApB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;;AAEA,MAAMC,YAAY,GAAG,CAAC;EAACC,MAAD;EAASC,KAAT;EAAgBC,yBAAhB;EAA2CC,QAA3C;EAAqDC;AAArD,CAAD,KAAqE;EACxF,oBACE;IACE,GAAG,EAAC,yBADN;IAEE,aAAU,yBAFZ;IAGE,SAAS,EAAEP,KAAK,CAACQ;EAHnB,gBAKE;IAAK,GAAG,EAAC,6BAAT;IAAuC,SAAS,EAAER,KAAK,CAACS;EAAxD,gBACE,oBAAC,gBAAD;IAAkB,cAAYJ;EAA9B,EADF,CALF,eAQE;IACE,GAAG,EAAC,uBADN;IAEE,SAAS,EAAEX,UAAU,CACnBM,KAAK,CAACU,qBADa,EAEnBJ,QAAQ,IAAIN,KAAK,CAACW,6BAFC;EAFvB,gBAOE,oBAAC,YAAD,EAAkBR,MAAlB,CAPF,CARF,eAiBE,oBAAC,aAAD,EAAmBC,KAAnB,CAjBF,EAkBGX,KAAK,CAACa,QAAD,CAAL,GAAkB,IAAlB,gBACC;IAAK,SAAS,EAAEN,KAAK,CAACM,QAAtB;IAAgC,eAAY;EAA5C,gBACE,oBAAC,cAAD,EAAoBA,QAApB,CADF,CAnBJ,EAwBGb,KAAK,CAACc,SAAD,CAAL,GAAmB,IAAnB,gBACC;IAAK,SAAS,EAAEP,KAAK,CAACO,SAAtB;IAAiC,eAAY;EAA7C,gBACE,oBAAC,OAAD,EAAaA,SAAb,CADF,CAzBJ,CADF;AAgCD,CAjCD;;AAmCAL,YAAY,CAACD,SAAb,2CAAyBA,SAAzB;AAEA,eAAeC,YAAf"}
@@ -9,6 +9,7 @@ declare const BrandCreate: {
9
9
  label: PropTypes.Requireable<string>;
10
10
  'aria-label': PropTypes.Requireable<string>;
11
11
  'data-name': PropTypes.Requireable<string>;
12
+ 'data-testid': PropTypes.Requireable<string>;
12
13
  icon: PropTypes.Requireable<PropTypes.InferProps<{
13
14
  position: PropTypes.Requireable<string>;
14
15
  type: PropTypes.Requireable<string>;
@@ -28,6 +29,7 @@ declare const BrandCreate: {
28
29
  label: PropTypes.Requireable<string>;
29
30
  'aria-label': PropTypes.Requireable<string>;
30
31
  'data-name': PropTypes.Requireable<string>;
32
+ 'data-testid': PropTypes.Requireable<string>;
31
33
  icon: PropTypes.Requireable<PropTypes.InferProps<{
32
34
  position: PropTypes.Requireable<string>;
33
35
  type: PropTypes.Requireable<string>;
@@ -47,6 +49,7 @@ declare const BrandCreate: {
47
49
  label: PropTypes.Requireable<string>;
48
50
  'aria-label': PropTypes.Requireable<string>;
49
51
  'data-name': PropTypes.Requireable<string>;
52
+ 'data-testid': PropTypes.Requireable<string>;
50
53
  icon: PropTypes.Requireable<PropTypes.InferProps<{
51
54
  position: PropTypes.Requireable<string>;
52
55
  type: PropTypes.Requireable<string>;
@@ -66,6 +69,7 @@ declare const BrandCreate: {
66
69
  label: PropTypes.Requireable<string>;
67
70
  'aria-label': PropTypes.Requireable<string>;
68
71
  'data-name': PropTypes.Requireable<string>;
72
+ 'data-testid': PropTypes.Requireable<string>;
69
73
  icon: PropTypes.Requireable<PropTypes.InferProps<{
70
74
  position: PropTypes.Requireable<string>;
71
75
  type: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-create/index.js"],"names":[],"mappings":";AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-create/index.js"],"names":[],"mappings":";AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBG"}
@@ -9,6 +9,7 @@ declare const BrandList: {
9
9
  label: PropTypes.Requireable<string>;
10
10
  'aria-label': PropTypes.Requireable<string>;
11
11
  'data-name': PropTypes.Requireable<string>;
12
+ 'data-testid': PropTypes.Requireable<string>;
12
13
  icon: PropTypes.Requireable<PropTypes.InferProps<{
13
14
  position: PropTypes.Requireable<string>;
14
15
  type: PropTypes.Requireable<string>;
@@ -28,6 +29,7 @@ declare const BrandList: {
28
29
  label: PropTypes.Requireable<string>;
29
30
  'aria-label': PropTypes.Requireable<string>;
30
31
  'data-name': PropTypes.Requireable<string>;
32
+ 'data-testid': PropTypes.Requireable<string>;
31
33
  icon: PropTypes.Requireable<PropTypes.InferProps<{
32
34
  position: PropTypes.Requireable<string>;
33
35
  type: PropTypes.Requireable<string>;
@@ -47,6 +49,7 @@ declare const BrandList: {
47
49
  label: PropTypes.Requireable<string>;
48
50
  'aria-label': PropTypes.Requireable<string>;
49
51
  'data-name': PropTypes.Requireable<string>;
52
+ 'data-testid': PropTypes.Requireable<string>;
50
53
  icon: PropTypes.Requireable<PropTypes.InferProps<{
51
54
  position: PropTypes.Requireable<string>;
52
55
  type: PropTypes.Requireable<string>;
@@ -66,6 +69,7 @@ declare const BrandList: {
66
69
  label: PropTypes.Requireable<string>;
67
70
  'aria-label': PropTypes.Requireable<string>;
68
71
  'data-name': PropTypes.Requireable<string>;
72
+ 'data-testid': PropTypes.Requireable<string>;
69
73
  icon: PropTypes.Requireable<PropTypes.InferProps<{
70
74
  position: PropTypes.Requireable<string>;
71
75
  type: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-list/index.js"],"names":[],"mappings":";AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-list/index.js"],"names":[],"mappings":";AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCG"}
@@ -24,6 +24,7 @@ declare namespace BrandUpdate {
24
24
  label: PropTypes.Requireable<string>;
25
25
  'aria-label': PropTypes.Requireable<string>;
26
26
  'data-name': PropTypes.Requireable<string>;
27
+ 'data-testid': PropTypes.Requireable<string>;
27
28
  icon: PropTypes.Requireable<PropTypes.InferProps<{
28
29
  position: PropTypes.Requireable<string>;
29
30
  type: PropTypes.Requireable<string>;
@@ -43,6 +44,7 @@ declare namespace BrandUpdate {
43
44
  label: PropTypes.Requireable<string>;
44
45
  'aria-label': PropTypes.Requireable<string>;
45
46
  'data-name': PropTypes.Requireable<string>;
47
+ 'data-testid': PropTypes.Requireable<string>;
46
48
  icon: PropTypes.Requireable<PropTypes.InferProps<{
47
49
  position: PropTypes.Requireable<string>;
48
50
  type: PropTypes.Requireable<string>;
@@ -62,6 +64,7 @@ declare namespace BrandUpdate {
62
64
  label: PropTypes.Requireable<string>;
63
65
  'aria-label': PropTypes.Requireable<string>;
64
66
  'data-name': PropTypes.Requireable<string>;
67
+ 'data-testid': PropTypes.Requireable<string>;
65
68
  icon: PropTypes.Requireable<PropTypes.InferProps<{
66
69
  position: PropTypes.Requireable<string>;
67
70
  type: PropTypes.Requireable<string>;
@@ -81,6 +84,7 @@ declare namespace BrandUpdate {
81
84
  label: PropTypes.Requireable<string>;
82
85
  'aria-label': PropTypes.Requireable<string>;
83
86
  'data-name': PropTypes.Requireable<string>;
87
+ 'data-testid': PropTypes.Requireable<string>;
84
88
  icon: PropTypes.Requireable<PropTypes.InferProps<{
85
89
  position: PropTypes.Requireable<string>;
86
90
  type: PropTypes.Requireable<string>;
@@ -493,6 +497,7 @@ declare namespace BrandUpdate {
493
497
  label: PropTypes.Requireable<string>;
494
498
  'aria-label': PropTypes.Requireable<string>;
495
499
  'data-name': PropTypes.Requireable<string>;
500
+ 'data-testid': PropTypes.Requireable<string>;
496
501
  icon: PropTypes.Requireable<PropTypes.InferProps<{
497
502
  position: PropTypes.Requireable<string>;
498
503
  type: PropTypes.Requireable<string>;
@@ -1113,6 +1118,7 @@ declare namespace BrandUpdate {
1113
1118
  label: PropTypes.Requireable<string>;
1114
1119
  'aria-label': PropTypes.Requireable<string>;
1115
1120
  'data-name': PropTypes.Requireable<string>;
1121
+ 'data-testid': PropTypes.Requireable<string>;
1116
1122
  icon: PropTypes.Requireable<PropTypes.InferProps<{
1117
1123
  position: PropTypes.Requireable<string>;
1118
1124
  type: PropTypes.Requireable<string>;
@@ -1390,6 +1396,7 @@ declare namespace BrandUpdate {
1390
1396
  label: PropTypes.Requireable<string>;
1391
1397
  'aria-label': PropTypes.Requireable<string>;
1392
1398
  'data-name': PropTypes.Requireable<string>;
1399
+ 'data-testid': PropTypes.Requireable<string>;
1393
1400
  icon: PropTypes.Requireable<PropTypes.InferProps<{
1394
1401
  position: PropTypes.Requireable<string>;
1395
1402
  type: PropTypes.Requireable<string>;
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  label: PropTypes.Requireable<string>;
9
9
  'aria-label': PropTypes.Requireable<string>;
10
10
  'data-name': PropTypes.Requireable<string>;
11
+ 'data-testid': PropTypes.Requireable<string>;
11
12
  icon: PropTypes.Requireable<PropTypes.InferProps<{
12
13
  position: PropTypes.Requireable<string>;
13
14
  type: PropTypes.Requireable<string>;
@@ -27,6 +28,7 @@ declare const _default: {
27
28
  label: PropTypes.Requireable<string>;
28
29
  'aria-label': PropTypes.Requireable<string>;
29
30
  'data-name': PropTypes.Requireable<string>;
31
+ 'data-testid': PropTypes.Requireable<string>;
30
32
  icon: PropTypes.Requireable<PropTypes.InferProps<{
31
33
  position: PropTypes.Requireable<string>;
32
34
  type: PropTypes.Requireable<string>;
@@ -46,6 +48,7 @@ declare const _default: {
46
48
  label: PropTypes.Requireable<string>;
47
49
  'aria-label': PropTypes.Requireable<string>;
48
50
  'data-name': PropTypes.Requireable<string>;
51
+ 'data-testid': PropTypes.Requireable<string>;
49
52
  icon: PropTypes.Requireable<PropTypes.InferProps<{
50
53
  position: PropTypes.Requireable<string>;
51
54
  type: PropTypes.Requireable<string>;
@@ -65,6 +68,7 @@ declare const _default: {
65
68
  label: PropTypes.Requireable<string>;
66
69
  'aria-label': PropTypes.Requireable<string>;
67
70
  'data-name': PropTypes.Requireable<string>;
71
+ 'data-testid': PropTypes.Requireable<string>;
68
72
  icon: PropTypes.Requireable<PropTypes.InferProps<{
69
73
  position: PropTypes.Requireable<string>;
70
74
  type: PropTypes.Requireable<string>;
@@ -9,6 +9,7 @@ declare function createLayout(Template: any): {
9
9
  label: PropTypes.Requireable<string>;
10
10
  'aria-label': PropTypes.Requireable<string>;
11
11
  'data-name': PropTypes.Requireable<string>;
12
+ 'data-testid': PropTypes.Requireable<string>;
12
13
  icon: PropTypes.Requireable<PropTypes.InferProps<{
13
14
  position: PropTypes.Requireable<string>;
14
15
  type: PropTypes.Requireable<string>;
@@ -28,6 +29,7 @@ declare function createLayout(Template: any): {
28
29
  label: PropTypes.Requireable<string>;
29
30
  'aria-label': PropTypes.Requireable<string>;
30
31
  'data-name': PropTypes.Requireable<string>;
32
+ 'data-testid': PropTypes.Requireable<string>;
31
33
  icon: PropTypes.Requireable<PropTypes.InferProps<{
32
34
  position: PropTypes.Requireable<string>;
33
35
  type: PropTypes.Requireable<string>;
@@ -47,6 +49,7 @@ declare function createLayout(Template: any): {
47
49
  label: PropTypes.Requireable<string>;
48
50
  'aria-label': PropTypes.Requireable<string>;
49
51
  'data-name': PropTypes.Requireable<string>;
52
+ 'data-testid': PropTypes.Requireable<string>;
50
53
  icon: PropTypes.Requireable<PropTypes.InferProps<{
51
54
  position: PropTypes.Requireable<string>;
52
55
  type: PropTypes.Requireable<string>;
@@ -66,6 +69,7 @@ declare function createLayout(Template: any): {
66
69
  label: PropTypes.Requireable<string>;
67
70
  'aria-label': PropTypes.Requireable<string>;
68
71
  'data-name': PropTypes.Requireable<string>;
72
+ 'data-testid': PropTypes.Requireable<string>;
69
73
  icon: PropTypes.Requireable<PropTypes.InferProps<{
70
74
  position: PropTypes.Requireable<string>;
71
75
  type: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/layout/index.js"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/layout/index.js"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBC"}
@@ -6,6 +6,7 @@ declare namespace ButtonLink {
6
6
  label: PropTypes.Requireable<string>;
7
7
  'aria-label': PropTypes.Requireable<string>;
8
8
  'data-name': PropTypes.Requireable<string>;
9
+ 'data-testid': PropTypes.Requireable<string>;
9
10
  icon: PropTypes.Requireable<PropTypes.InferProps<{
10
11
  position: PropTypes.Requireable<string>;
11
12
  type: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.js"],"names":[],"mappings":";AA6BA,qDAwDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.js"],"names":[],"mappings":";AA6BA,qDA2DC"}
@@ -62,6 +62,7 @@ const ButtonLink = props => {
62
62
  disabled,
63
63
  icon = {},
64
64
  'data-name': dataName,
65
+ 'data-testid': dataTestId = 'button-link',
65
66
  'aria-label': ariaLabel,
66
67
  link,
67
68
  onClick = _noop2.default,
@@ -77,6 +78,7 @@ const ButtonLink = props => {
77
78
  style: customStyle,
78
79
  className: styleButton,
79
80
  "data-name": dataName,
81
+ "data-testid": dataTestId,
80
82
  "aria-label": ariaLabel || label,
81
83
  title: ariaLabel || label
82
84
  }), contentView);
@@ -87,6 +89,7 @@ const ButtonLink = props => {
87
89
  "aria-label": ariaLabel || label,
88
90
  title: ariaLabel || label,
89
91
  "data-name": dataName,
92
+ "data-testid": dataTestId,
90
93
  style: customStyle,
91
94
  className: styleButton,
92
95
  onClick: handleOnClick
@@ -98,6 +101,7 @@ ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? {
98
101
  label: _propTypes.default.string,
99
102
  'aria-label': _propTypes.default.string,
100
103
  'data-name': _propTypes.default.string,
104
+ 'data-testid': _propTypes.default.string,
101
105
  icon: _propTypes.default.shape({
102
106
  position: _propTypes.default.oneOf(['right', 'left']),
103
107
  type: _propTypes.default.oneOf((0, _keys2.default)(_buttonIcons.ICONS))
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getButtonContent","icon","label","type","position","Icon","ICONS","style","buttonContent","ButtonLink","props","disabled","dataName","ariaLabel","link","onClick","className","customStyle","contentView","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","handleOnClick","useCallback","propTypes","PropTypes","oneOf","string","shape","func","href","download","bool","target"],"sources":["../../../src/atom/button-link/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport style from './style.css';\n\nconst getButtonContent = (icon, label) => {\n const {type, position} = icon;\n const Icon = getOr(null, type, ICONS);\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = props => {\n const {\n type,\n label,\n disabled,\n icon = {},\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n className,\n customStyle\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n if (link) {\n return (\n <Link\n {...link}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n type=\"button\"\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n data-name={dataName}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport default ButtonLink;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAOC,KAAP,KAAiB;EACxC,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAmBH,IAAzB;EACA,MAAMI,IAAI,GAAG,qBAAM,IAAN,EAAYF,IAAZ,EAAkBG,kBAAlB,CAAb;;EAEA,IAAI,CAACD,IAAL,EAAW;IACT,oBACE;MAAK,SAAS,EAAEE,cAAA,CAAMC;IAAtB,gBACE;MAAM,SAAS,EAAED,cAAA,CAAML;IAAvB,GAA+BA,KAA/B,CADF,CADF;EAKD;;EAED,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMC;EAAtB,GACGJ,QAAQ,KAAK,MAAb,gBAAsB,6BAAC,IAAD;IAAM,SAAS,EAAEG,cAAA,CAAMN;EAAvB,EAAtB,GAAwD,IAD3D,eAEE;IAAM,SAAS,EAAEM,cAAA,CAAML;EAAvB,GAA+BA,KAA/B,CAFF,EAGGE,QAAQ,KAAK,OAAb,gBAAuB,6BAAC,IAAD;IAAM,SAAS,EAAEG,cAAA,CAAMN;EAAvB,EAAvB,GAAyD,IAH5D,CADF;AAOD,CAnBD;;AAqBA,MAAMQ,UAAU,GAAGC,KAAK,IAAI;EAC1B,MAAM;IACJP,IADI;IAEJD,KAFI;IAGJS,QAHI;IAIJV,IAAI,GAAG,EAJH;IAKJ,aAAaW,QALT;IAMJ,c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AAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADe;EAErB7B,KAAK,EAAE4B,kBAAA,CAAUE,MAFI;EAGrB,cAAcF,kBAAA,CAAUE,MAHH;EAIrB,aAAaF,kBAAA,CAAUE,MAJF;EAKrB/B,IAAI,EAAE6B,kBAAA,CAAUG,KAAV,CAAgB;IACpB7B,QAAQ,EAAE0B,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpB5B,IAAI,EAAE2B,kBAAA,CAAUC,KAAV,CAAgB,oBAAKzB,kBAAL,CAAhB;EAFc,CAAhB,CALe;EASrBS,OAAO,EAAEe,kBAAA,CAAUI,IATE;EAUrBpB,IAAI,EAAEgB,kBAAA,CAAUG,KAAV,CAAgB;IACpBE,IAAI,EAAEL,kBAAA,CAAUE,MADI;IAEpBI,QAAQ,EAAEN,kBAAA,CAAUO,IAFA;IAGpBC,MAAM,EAAER,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAVe;EAerBpB,QAAQ,EAAEmB,kBAAA,CAAUO,IAfC;EAgBrBrB,SAAS,EAAEc,kBAAA,CAAUE,MAhBA;EAiBrBf,WAAW,EAAEa,kBAAA,CAAUG,KAAV,CAAgB,EAAhB;AAjBQ,CAAvB;eAoBexB,U"}
1
+ {"version":3,"file":"index.js","names":["getButtonContent","icon","label","type","position","Icon","ICONS","style","buttonContent","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","className","customStyle","contentView","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","handleOnClick","useCallback","propTypes","PropTypes","oneOf","string","shape","func","href","download","bool","target"],"sources":["../../../src/atom/button-link/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport style from './style.css';\n\nconst getButtonContent = (icon, label) => {\n const {type, position} = icon;\n const Icon = getOr(null, type, ICONS);\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = props => {\n const {\n type,\n label,\n disabled,\n icon = {},\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n className,\n customStyle\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n if (link) {\n return (\n <Link\n {...link}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n type=\"button\"\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport default ButtonLink;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAOC,KAAP,KAAiB;EACxC,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAmBH,IAAzB;EACA,MAAMI,IAAI,GAAG,qBAAM,IAAN,EAAYF,IAAZ,EAAkBG,kBAAlB,CAAb;;EAEA,IAAI,CAACD,IAAL,EAAW;IACT,oBACE;MAAK,SAAS,EAAEE,cAAA,CAAMC;IAAtB,gBACE;MAAM,SAAS,EAAED,cAAA,CAAML;IAAvB,GAA+BA,KAA/B,CADF,CADF;EAKD;;EAED,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMC;EAAtB,GACGJ,QAAQ,KAAK,MAAb,gBAAsB,6BAAC,IAAD;IAAM,SAAS,EAAEG,cAAA,CAAMN;EAAvB,EAAtB,GAAwD,IAD3D,eAEE;IAAM,SAAS,EAAEM,cAAA,CAAML;EAAvB,GAA+BA,KAA/B,CAFF,EAGGE,QAAQ,KAAK,OAAb,gBAAuB,6BAAC,IAAD;IAAM,SAAS,EAAEG,cAAA,CAAMN;EAAvB,EAAvB,GAAyD,IAH5D,CADF;AAOD,CAnBD;;AAqBA,MAAMQ,UAAU,GAAGC,KAAK,IAAI;EAC1B,MAAM;IACJP,IADI;IAEJD,KAFI;IAGJS,QAHI;IAIJV,IAAI,GAAG,EAJH;IAKJ,aAAaW,QALT;IAMJ,eAAeC,UAAU,GAAG,aANxB;IAOJ,cAAcC,SAPV;IAQJC,IARI;IASJC,OAAO,iBATH;IAUJC,SAVI;IAWJC;EAXI,IAYFR,KAZJ;EAaA,MAAMS,WAAW,GAAGnB,gBAAgB,CAACC,IAAD,EAAOC,K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AErB9B,KAAK,EAAE6B,kBAAA,CAAUE,MAFI;EAGrB,cAAcF,kBAAA,CAAUE,MAHH;EAIrB,aAAaF,kBAAA,CAAUE,MAJF;EAKrB,eAAeF,kBAAA,CAAUE,MALJ;EAMrBhC,IAAI,EAAE8B,kBAAA,CAAUG,KAAV,CAAgB;IACpB9B,QAAQ,EAAE2B,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpB7B,IAAI,EAAE4B,kBAAA,CAAUC,KAAV,CAAgB,oBAAK1B,kBAAL,CAAhB;EAFc,CAAhB,CANe;EAUrBU,OAAO,EAAEe,kBAAA,CAAUI,IAVE;EAWrBpB,IAAI,EAAEgB,kBAAA,CAAUG,KAAV,CAAgB;IACpBE,IAAI,EAAEL,kBAAA,CAAUE,MADI;IAEpBI,QAAQ,EAAEN,kBAAA,CAAUO,IAFA;IAGpBC,MAAM,EAAER,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAXe;EAgBrBrB,QAAQ,EAAEoB,kBAAA,CAAUO,IAhBC;EAiBrBrB,SAAS,EAAEc,kBAAA,CAAUE,MAjBA;EAkBrBf,WAAW,EAAEa,kBAAA,CAAUG,KAAV,CAAgB,EAAhB;AAlBQ,CAAvB;eAqBezB,U"}
@@ -365,6 +365,7 @@ declare namespace BrandFormGroup {
365
365
  label: PropTypes.Requireable<string>;
366
366
  'aria-label': PropTypes.Requireable<string>;
367
367
  'data-name': PropTypes.Requireable<string>;
368
+ 'data-testid': PropTypes.Requireable<string>;
368
369
  icon: PropTypes.Requireable<PropTypes.InferProps<{
369
370
  position: PropTypes.Requireable<string>;
370
371
  type: PropTypes.Requireable<string>;
@@ -65,7 +65,8 @@ const ReviewCorrectionPopin = props => {
65
65
  };
66
66
  const Icon = ICONS[type];
67
67
  return /*#__PURE__*/_react.default.createElement("div", {
68
- className: _style.default.wrapper
68
+ className: _style.default.wrapper,
69
+ "data-testid": "review-correction-popin"
69
70
  }, /*#__PURE__*/_react.default.createElement("div", {
70
71
  className: (0, _classnames.default)(_style.default.popin, type === 'right' ? _style.default.right : _style.default.wrong)
71
72
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -99,7 +100,8 @@ const ReviewCorrectionPopin = props => {
99
100
  }))), /*#__PURE__*/_react.default.createElement("div", {
100
101
  className: type === 'right' ? _style.default.actions : _style.default.actionsWrong
101
102
  }, cta, /*#__PURE__*/_react.default.createElement("div", {
102
- className: _style.default.nextQuestionContainer
103
+ className: _style.default.nextQuestionContainer,
104
+ "data-testid": "next-question-button-container"
103
105
  }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, nextQuestionButtonProps, {
104
106
  className: _style.default.nextQuestionButton
105
107
  }))))));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["buildKlfButton","klf","klfButtonProps","icon","position","type","style","klfContainer","klfButtonContainer","klfButton","toolTip","tooltipText","__html","tooltip","ReviewCorrectionPopin","props","information","resultLabel","next","nextQuestionButtonProps","cta","ICONS","right","RightIcon","wrong","WrongIcon","Icon","wrapper","classnames","popin","correctionSection","iconCircle","iconRight","iconWrong","feedbackSection","labelContainer","label","message","actions","actionsWrong","nextQuestionContainer","nextQuestionButton","propTypes"],"sources":["../../../src/molecule/review-correction-popin/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst buildKlfButton = klf => {\n const klfButtonProps = {\n ...klf,\n icon: {\n position: 'left',\n type: 'key'\n },\n type: 'primary'\n };\n\n return (\n <div className={style.klfContainer}>\n <div className={style.klfButtonContainer}>\n <ButtonLink {...klfButtonProps} className={style.klfButton} />\n </div>\n <div className={style.toolTip}>\n <span\n className={style.tooltipText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: klf.tooltip}}\n />\n </div>\n </div>\n );\n};\n\nconst ReviewCorrectionPopin = props => {\n const {information, resultLabel, type, klf, next} = props;\n\n const nextQuestionButtonProps = {\n ...next,\n type: 'primary'\n };\n\n const cta = type === 'wrong' ? buildKlfButton(klf) : null;\n\n const ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n };\n const Icon = ICONS[type];\n\n return (\n <div className={style.wrapper}>\n <div className={classnames(style.popin, type === 'right' ? style.right : style.wrong)}>\n <div className={style.correctionSection}>\n <div className={style.iconCircle}>\n <Icon className={type === 'right' ? style.iconRight : style.iconWrong} />\n </div>\n <div className={style.resultLabel} aria-label=\"result\">\n <span aria-label={resultLabel}>{resultLabel}</span>\n </div>\n </div>\n <div className={style.feedbackSection}>\n <div className={style.information} aria-label=\"answer-information\">\n <div className={style.labelContainer}>\n <span className={style.label} aria-label={information.label}>\n {information.label}\n </span>\n </div>\n <span\n className={style.message}\n aria-label={information.message}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: information.message}}\n />\n </div>\n </div>\n <div className={type === 'right' ? style.actions : style.actionsWrong}>\n {cta}\n <div className={style.nextQuestionContainer}>\n <ButtonLink {...nextQuestionButtonProps} className={style.nextQuestionButton} />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nReviewCorrectionPopin.propTypes = propTypes;\n\nexport default ReviewCorrectionPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;AACA;;AACA;;;;;;AAEA,MAAMA,cAAc,GAAGC,GAAG,IAAI;EAC5B,MAAMC,cAAc,gBACfD,GADe;IAElBE,IAAI,EAAE;MACJC,QAAQ,EAAE,MADN;MAEJC,IAAI,EAAE;IAFF,CAFY;IAMlBA,IAAI,EAAE;EANY,EAApB;;EASA,oBACE;IAAK,SAAS,EAAEC,cAAA,CAAMC;EAAtB,gBACE;IAAK,SAAS,EAAED,cAAA,C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AmC,cAAW;EAA9C,gBACE;IAAM,cAAYA;EAAlB,GAAgCA,WAAhC,CADF,CAJF,CADF,eASE;IAAK,SAAS,EAAEX,cAAA,CAAM4B;EAAtB,gBACE;IAAK,SAAS,EAAE5B,cAAA,CAAMU,WAAtB;IAAmC,cAAW;EAA9C,gBACE;IAAK,SAAS,EAAEV,cAAA,CAAM6B;EAAtB,gBACE;IAAM,SAAS,EAAE7B,cAAA,CAAM8B,KAAvB;IAA8B,cAAYpB,WAAW,CAACoB;EAAtD,GACGpB,WAAW,CAACoB,KADf,CADF,CADF,eAME;IACE,SAAS,EAAE9B,cAAA,CAAM+B,OADnB;IAEE,cAAYrB,WAAW,CAACqB,OAF1B,CAGE;IAHF;IAIE,uBAAuB,EAAE;MAACzB,MAAM,EAAEI,WAAW,CAACqB;IAArB;EAJ3B,EANF,CADF,CATF,eAwBE;IAAK,SAAS,EAAEhC,IAAI,KAAK,OAAT,GAAmBC,cAAA,CAAMgC,OAAzB,GAAmChC,cAAA,CAAMiC;EAAzD,GACGnB,GADH,eAEE;IAAK,SAAS,EAAEd,cAAA,CAAMkC;EAAtB,gBACE,6BAAC,mBAAD,eAAgBrB,uBAAhB;IAAyC,SAAS,EAAEb,cAAA,CAAMmC;EAA1D,GADF,CAFF,CAxBF,CADF,CADF;AAmCD,CAnDD;;AAqDA3B,qBAAqB,CAAC4B,SAAtB,2CAAkCA,kBAAlC;eAEe5B,qB"}
1
+ {"version":3,"file":"index.js","names":["buildKlfButton","klf","klfButtonProps","icon","position","type","style","klfContainer","klfButtonContainer","klfButton","toolTip","tooltipText","__html","tooltip","ReviewCorrectionPopin","props","information","resultLabel","next","nextQuestionButtonProps","cta","ICONS","right","RightIcon","wrong","WrongIcon","Icon","wrapper","classnames","popin","correctionSection","iconCircle","iconRight","iconWrong","feedbackSection","labelContainer","label","message","actions","actionsWrong","nextQuestionContainer","nextQuestionButton","propTypes"],"sources":["../../../src/molecule/review-correction-popin/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst buildKlfButton = klf => {\n const klfButtonProps = {\n ...klf,\n icon: {\n position: 'left',\n type: 'key'\n },\n type: 'primary'\n };\n\n return (\n <div className={style.klfContainer}>\n <div className={style.klfButtonContainer}>\n <ButtonLink {...klfButtonProps} className={style.klfButton} />\n </div>\n <div className={style.toolTip}>\n <span\n className={style.tooltipText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: klf.tooltip}}\n />\n </div>\n </div>\n );\n};\n\nconst ReviewCorrectionPopin = props => {\n const {information, resultLabel, type, klf, next} = props;\n\n const nextQuestionButtonProps = {\n ...next,\n type: 'primary'\n };\n\n const cta = type === 'wrong' ? buildKlfButton(klf) : null;\n\n const ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n };\n const Icon = ICONS[type];\n\n return (\n <div className={style.wrapper} data-testid=\"review-correction-popin\">\n <div className={classnames(style.popin, type === 'right' ? style.right : style.wrong)}>\n <div className={style.correctionSection}>\n <div className={style.iconCircle}>\n <Icon className={type === 'right' ? style.iconRight : style.iconWrong} />\n </div>\n <div className={style.resultLabel} aria-label=\"result\">\n <span aria-label={resultLabel}>{resultLabel}</span>\n </div>\n </div>\n <div className={style.feedbackSection}>\n <div className={style.information} aria-label=\"answer-information\">\n <div className={style.labelContainer}>\n <span className={style.label} aria-label={information.label}>\n {information.label}\n </span>\n </div>\n <span\n className={style.message}\n aria-label={information.message}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: information.message}}\n />\n </div>\n </div>\n <div className={type === 'right' ? style.actions : style.actionsWrong}>\n {cta}\n <div className={style.nextQuestionContainer} data-testid=\"next-question-button-container\">\n <ButtonLink {...nextQuestionButtonProps} className={style.nextQuestionButton} />\n </div>\n </div>\n </div>\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AAmCD,CAnDD;;AAqDA3B,qBAAqB,CAAC4B,SAAtB,2CAAkCA,kBAAlC;eAEe5B,qB"}
@@ -395,6 +395,7 @@ declare namespace BrandForm {
395
395
  label: PropTypes.Requireable<string>;
396
396
  'aria-label': PropTypes.Requireable<string>;
397
397
  'data-name': PropTypes.Requireable<string>;
398
+ 'data-testid': PropTypes.Requireable<string>;
398
399
  icon: PropTypes.Requireable<PropTypes.InferProps<{
399
400
  position: PropTypes.Requireable<string>;
400
401
  type: PropTypes.Requireable<string>;
@@ -13,6 +13,7 @@ declare namespace ListItems {
13
13
  label: PropTypes.Requireable<string>;
14
14
  'aria-label': PropTypes.Requireable<string>;
15
15
  'data-name': PropTypes.Requireable<string>;
16
+ 'data-testid': PropTypes.Requireable<string>;
16
17
  icon: PropTypes.Requireable<PropTypes.InferProps<{
17
18
  position: PropTypes.Requireable<string>;
18
19
  type: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAsBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyFE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAmBC;IAjBC;;;;MAIC;IA6CH,6BAIC;IAED,yBAMC;IA3BD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA+BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAKC;IAED,0BAKC;IAlFD,2EASC;IAGC,kBAAsB;IAwExB,6BAwYC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAwBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyFE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAmBC;IAjBC;;;;MAIC;IA6CH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IArFD,2EASC;IAGC,kBAAsB;IA2ExB,6BAmZC;CACF"}