@coorpacademy/components 11.11.14 → 11.11.15-alpha.10

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 (42) hide show
  1. package/es/atom/input-switch/style.css +2 -1
  2. package/es/atom/select/style.css +1 -1
  3. package/es/molecule/cm-popin/index.d.ts.map +1 -1
  4. package/es/molecule/cm-popin/index.js +3 -2
  5. package/es/molecule/cm-popin/index.js.map +1 -1
  6. package/es/molecule/cm-popin/style.css +43 -37
  7. package/es/molecule/filters/filters-wapper.css +0 -1
  8. package/es/organism/mooc-header/index.d.ts +0 -1
  9. package/es/organism/mooc-header/index.d.ts.map +1 -1
  10. package/es/organism/mooc-header/index.js +2 -9
  11. package/es/organism/mooc-header/index.js.map +1 -1
  12. package/es/organism/mooc-header/style.css +23 -23
  13. package/es/organism/review-slide/index.d.ts.map +1 -1
  14. package/es/organism/review-slide/index.js +3 -18
  15. package/es/organism/review-slide/index.js.map +1 -1
  16. package/es/template/external-course/index.d.ts +52 -0
  17. package/es/template/external-course/index.d.ts.map +1 -1
  18. package/es/template/external-course/index.js +10 -3
  19. package/es/template/external-course/index.js.map +1 -1
  20. package/es/template/external-course/style.css +1 -1
  21. package/lib/atom/input-switch/style.css +2 -1
  22. package/lib/atom/select/style.css +1 -1
  23. package/lib/molecule/cm-popin/index.d.ts.map +1 -1
  24. package/lib/molecule/cm-popin/index.js +2 -1
  25. package/lib/molecule/cm-popin/index.js.map +1 -1
  26. package/lib/molecule/cm-popin/style.css +43 -37
  27. package/lib/molecule/filters/filters-wapper.css +0 -1
  28. package/lib/organism/mooc-header/index.d.ts +0 -1
  29. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  30. package/lib/organism/mooc-header/index.js +2 -9
  31. package/lib/organism/mooc-header/index.js.map +1 -1
  32. package/lib/organism/mooc-header/style.css +23 -23
  33. package/lib/organism/review-slide/index.d.ts.map +1 -1
  34. package/lib/organism/review-slide/index.js +3 -18
  35. package/lib/organism/review-slide/index.js.map +1 -1
  36. package/lib/template/external-course/index.d.ts +52 -0
  37. package/lib/template/external-course/index.d.ts.map +1 -1
  38. package/lib/template/external-course/index.js +10 -3
  39. package/lib/template/external-course/index.js.map +1 -1
  40. package/lib/template/external-course/style.css +1 -1
  41. package/package.json +2 -2
  42. package/locales/.mtslconfig.json +0 -1
@@ -38,22 +38,7 @@ const CorrectionPopin = ({
38
38
  information,
39
39
  type: correctionPopinProps.type,
40
40
  resultLabel: correctionPopinProps.resultLabel
41
- }; // there is an error of eslint here because this useEffect will be only there when the correctionPopin will be there
42
- // but that is on purpose to go to the next slide if you press enter when the correctionPopin is present
43
- // istanbul ignore next
44
- // eslint-disable-next-line react-hooks/rules-of-hooks
45
-
46
- useEffect(() => {
47
- const keyDownHandler = event => {
48
- if (event.key === 'Enter' || event.key === ' ') {
49
- event.preventDefault();
50
- onClick();
51
- document.removeEventListener('keydown', keyDownHandler);
52
- }
53
- };
54
-
55
- document.addEventListener('keydown', keyDownHandler);
56
- }, []);
41
+ };
57
42
  return /*#__PURE__*/React.createElement("div", {
58
43
  className: classnames(style.correctionPopinWrapper, animateCorrectionPopin ? style.popinAnimation : null)
59
44
  }, /*#__PURE__*/React.createElement(ReviewCorrectionPopin, _correctionPopinProps));
@@ -93,12 +78,12 @@ const ValidateButton = ({
93
78
 
94
79
  useEffect(() => {
95
80
  const keyDownHandler = event => {
96
- if (event.key === 'Enter' || event.key === ' ') {
81
+ if (event.key === 'Enter' || event.key === ' ' && disabled) {
97
82
  event.preventDefault();
98
83
  }
99
84
  };
100
85
 
101
- if (disabled) document.addEventListener('keydown', keyDownHandler);
86
+ document.addEventListener('keydown', keyDownHandler);
102
87
  return () => {
103
88
  document.removeEventListener('keydown', keyDownHandler);
104
89
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","useEffect","PropTypes","classnames","get","getOr","Answer","ButtonLink","Loader","ReviewCorrectionPopin","Provider","GetSkinFromContext","GetTranslateFromContext","propTypes","style","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","klf","information","label","message","next","onClick","_correctionPopinProps","type","resultLabel","keyDownHandler","event","key","preventDefault","document","removeEventListener","addEventListener","correctionPopinWrapper","popinAnimation","string","bool","ValidateButton","validateButton","primarySkinColor","ariaLabel","disabled","validateButtonProps","className","customStyle","backgroundColor","validateButtonWrapper","QuestionContainer","props","answerUI","questionText","questionOrigin","disableContent","slideContentContainer","disabledSlideContent","question","__html","help","answerContainer","shape","slide","ReviewSlide","legacyContext","skin","translate","validateariaLabel","loading","loadingAriaLabel","parentContentTitle","disabledContent","loader","contextTypes","childContextTypes"],"sources":["../../../src/organism/review-slide/index.js"],"sourcesContent":["import React, {useMemo, useEffect} 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 Provider, {GetSkinFromContext, GetTranslateFromContext} 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 // there is an error of eslint here because this useEffect will be only there when the correctionPopin will be there\n // but that is on purpose to go to the next slide if you press enter when the correctionPopin is present\n // istanbul ignore next\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n const keyDownHandler = event => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onClick();\n document.removeEventListener('keydown', keyDownHandler);\n }\n };\n document.addEventListener('keydown', keyDownHandler);\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, ariaLabel}) => {\n const {label, onClick, disabled} = validateButton;\n const validateButtonProps = {\n type: 'primary',\n label,\n 'aria-label': ariaLabel,\n 'data-name': `slide-validate-button-${slideIndex}`,\n onClick,\n disabled,\n className: style.validateButton,\n customStyle: {\n backgroundColor: primarySkinColor\n }\n };\n\n /* istanbul ignore next */\n useEffect(() => {\n const keyDownHandler = event => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n }\n };\n if (disabled) document.addEventListener('keydown', keyDownHandler);\n return () => {\n document.removeEventListener('keydown', keyDownHandler);\n };\n }, [disabled]);\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 ariaLabel: 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\n key=\"help\"\n className={style.help}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: get('help', answerUI)}}\n />\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, legacyContext) => {\n const {slide, validateButton, correctionPopinProps, slideIndex = '0'} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const translate = GetTranslateFromContext(legacyContext);\n\n const validateariaLabel = translate('validate_aria_label');\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 ariaLabel={validateariaLabel}\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\nReviewSlide.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nexport default 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Link","Loader","ReviewCorrectionPopin","Provider","GetSkinFromContext","GetTranslateFromContext","propTypes","style","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","klf","information","label","message","next","onClick","_correctionPopinProps","type","resultLabel","correctionPopinWrapper","popinAnimation","string","bool","ValidateButton","validateButton","primarySkinColor","ariaLabel","disabled","validateButtonProps","className","customStyle","backgroundColor","keyDownHandler","event","key","preventDefault","document","addEventListener","removeEventListener","validateButtonWrapper","QuestionContainer","props","answerUI","questionText","questionOrigin","disableContent","slideContentContainer","disabledSlideContent","question","__html","help","answerContainer","shape","slide","ReviewSlide","legacyContext","skin","translate","validateariaLabel","loading","loadingAriaLabel","parentContentTitle","disabledContent","loader","contextTypes","childContextTypes"],"sources":["../../../src/organism/review-slide/index.js"],"sourcesContent":["import React, {useMemo, useEffect} 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 Provider, {GetSkinFromContext, GetTranslateFromContext} 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, ariaLabel}) => {\n const {label, onClick, disabled} = validateButton;\n const validateButtonProps = {\n type: 'primary',\n label,\n 'aria-label': ariaLabel,\n 'data-name': `slide-validate-button-${slideIndex}`,\n onClick,\n disabled,\n className: style.validateButton,\n customStyle: {\n backgroundColor: primarySkinColor\n }\n };\n\n /* istanbul ignore next */\n useEffect(() => {\n const keyDownHandler = event => {\n if (event.key === 'Enter' || (event.key === ' ' && disabled)) {\n event.preventDefault();\n }\n };\n document.addEventListener('keydown', keyDownHandler);\n return () => {\n document.removeEventListener('keydown', keyDownHandler);\n };\n }, [disabled]);\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 ariaLabel: 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\n key=\"help\"\n className={style.help}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: get('help', answerUI)}}\n />\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, legacyContext) => {\n const {slide, validateButton, correctionPopinProps, slideIndex = '0'} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const translate = GetTranslateFromContext(legacyContext);\n\n const validateariaLabel = translate('validate_aria_label');\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 ariaLabel={validateariaLabel}\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\nReviewSlide.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nexport default ReviewSlide;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,SAAxB,QAAwC,OAAxC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBA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,oBAAC,cAAD;IACE,UAAU,EAAEvD,UADd;IAEE,cAAc,EAAEiB,cAFlB;IAGE,gBAAgB,EAAEC,gBAHpB;IAIE,GAAG,EAAC,iBAJN;IAKE,SAAS,EAAEiC;EALb,EARF,eAeE,oBAAC,eAAD;IACE,oBAAoB,EAAEpD,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EAfF,CAJJ,CADF;AA+BD,CAlDD;;AAoDA6C,WAAW,CAACnD,SAAZ,2CAAwBA,SAAxB;AAEAmD,WAAW,CAACU,YAAZ,GAA2B;EACzBR,IAAI,EAAExD,QAAQ,CAACiE,iBAAT,CAA2BT,IADR;EAEzBC,SAAS,EAAEzD,QAAQ,CAACiE,iBAAT,CAA2BR;AAFb,CAA3B;AAKA,eAAeH,WAAf"}
@@ -21,6 +21,58 @@ declare class ExternalCourse extends React.Component<any, any, any> {
21
21
  backgroundImageUrl: PropTypes.Requireable<string>;
22
22
  contentType: PropTypes.Requireable<string>;
23
23
  mode: PropTypes.Requireable<string>;
24
+ closePopin: PropTypes.Requireable<PropTypes.InferProps<{
25
+ content: PropTypes.Requireable<string>;
26
+ mode: PropTypes.Requireable<string>;
27
+ header: PropTypes.Requireable<string>;
28
+ firstButton: PropTypes.Requireable<PropTypes.InferProps<{
29
+ label: PropTypes.Requireable<string>;
30
+ handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
31
+ 'aria-label': PropTypes.Requireable<string>;
32
+ largeButton: PropTypes.Requireable<boolean>;
33
+ type: PropTypes.Requireable<string>;
34
+ customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
35
+ }>>;
36
+ secondButton: PropTypes.Requireable<PropTypes.InferProps<{
37
+ label: PropTypes.Requireable<string>;
38
+ handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
39
+ type: PropTypes.Requireable<string>;
40
+ 'aria-label': PropTypes.Requireable<string>;
41
+ largeButton: PropTypes.Requireable<boolean>;
42
+ customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
43
+ }>>;
44
+ thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
45
+ label: PropTypes.Requireable<string>;
46
+ handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
47
+ type: PropTypes.Requireable<string>;
48
+ 'aria-label': PropTypes.Requireable<string>;
49
+ largeButton: PropTypes.Requireable<boolean>;
50
+ customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
51
+ }>>;
52
+ onClose: PropTypes.Requireable<(...args: any[]) => any>;
53
+ icon: PropTypes.Requireable<string>;
54
+ backgroundImageUrl: PropTypes.Requireable<string>;
55
+ descriptionText: PropTypes.Requireable<string>;
56
+ cookieTitle: PropTypes.Requireable<string>;
57
+ descriptionBtnTxt: PropTypes.Requireable<string>;
58
+ listBtnSwicth: PropTypes.Requireable<(PropTypes.InferProps<{
59
+ title: PropTypes.Requireable<string>;
60
+ name: PropTypes.Requireable<string>;
61
+ id: PropTypes.Requireable<string>;
62
+ value: PropTypes.Requireable<boolean>;
63
+ disabled: PropTypes.Requireable<boolean>;
64
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
65
+ description: PropTypes.Requireable<string>;
66
+ 'aria-labelledby': PropTypes.Requireable<string>;
67
+ 'aria-label': PropTypes.Requireable<string>;
68
+ modified: PropTypes.Requireable<boolean>;
69
+ titlePosition: PropTypes.Requireable<string>;
70
+ theme: PropTypes.Requireable<string>;
71
+ details: PropTypes.Requireable<string>;
72
+ 'data-name': PropTypes.Requireable<string>;
73
+ requiredSelection: PropTypes.Requireable<boolean>;
74
+ }> | null | undefined)[]>;
75
+ }>>;
24
76
  };
25
77
  static contextTypes: {
26
78
  skin: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/external-course/index.js"],"names":[],"mappings":";AAmBA;IACE;;;;;;;;;;;;;;;;;;;;;MAqBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IA4Hqsd,wBAA8C;IAAA,sCAAyJ;IA1H94d,+CAKE;IAEF,sBA+GC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/external-course/index.js"],"names":[],"mappings":";AAoBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAmIu8c,wBAA8C;IAAA,sCAAyJ;IAjIhpd,+CAKE;IAEF,sBAsHC;CACF"}
@@ -4,6 +4,9 @@ import _identity from "lodash/fp/identity";
4
4
  import _keys from "lodash/fp/keys";
5
5
  import _getOr from "lodash/fp/getOr";
6
6
  import _get from "lodash/fp/get";
7
+
8
+ 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); }
9
+
7
10
  import React from 'react';
8
11
  import { NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon } from '@coorpacademy/nova-icons';
9
12
  import { convert } from 'css-color-function';
@@ -14,6 +17,7 @@ import Provider from '../../atom/provider';
14
17
  import Loader from '../../atom/loader';
15
18
  import Button from '../../atom/button';
16
19
  import ExternalContentViewer from '../../molecule/external-content-viewer';
20
+ import CmPopin from '../../molecule/cm-popin';
17
21
  import style from './style.css';
18
22
  const defaultWrapperStyle = {
19
23
  default: style.default,
@@ -46,7 +50,8 @@ class ExternalCourse extends React.Component {
46
50
  loading,
47
51
  backgroundImageUrl,
48
52
  contentType,
49
- mode = 'default'
53
+ mode = 'default',
54
+ closePopin
50
55
  } = this.props;
51
56
  const {
52
57
  skin
@@ -117,9 +122,10 @@ class ExternalCourse extends React.Component {
117
122
  }, warningButton, completeButton, _isNil(warning) ? null : /*#__PURE__*/React.createElement("div", {
118
123
  className: style.rightSection
119
124
  })) : null;
125
+ const popin = !_isNil(closePopin) ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CmPopin, closePopin)) : null;
120
126
  return /*#__PURE__*/React.createElement("div", {
121
127
  className: defaultWrapperStyle[mode]
122
- }, header, mainContentSlot, footer);
128
+ }, header, popin, mainContentSlot, footer);
123
129
  }
124
130
 
125
131
  }
@@ -147,7 +153,8 @@ ExternalCourse.propTypes = process.env.NODE_ENV !== "production" ? {
147
153
  loading: PropTypes.bool,
148
154
  backgroundImageUrl: PropTypes.string,
149
155
  contentType: PropTypes.string,
150
- mode: PropTypes.string
156
+ mode: PropTypes.string,
157
+ closePopin: PropTypes.shape(_extends({}, CmPopin.propTypes))
151
158
  } : {};
152
159
  export default ExternalCourse;
153
160
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","convert","classnames","PropTypes","EXTERNAL_CONTENT_ICONS","Provider","Loader","Button","ExternalContentViewer","style","defaultWrapperStyle","default","cockpit","defaultCockpit","mobile","ExternalCourse","Component","handleOnClick","field","e","stopPropagation","preventDefault","onClick","render","name","type","url","warning","complete","quit","loading","backgroundImageUrl","contentType","mode","props","skin","context","primary","IconType","icon","IconColor","color","mainContentSlot","loader","completeButton","disabled","label","backgroundColor","cursor","completeCta","warningButton","leftSection","iconLabel","link","iconQuestion","quitButton","quitCta","titleSection","title","oval","iconHeader","innerHTML","__html","header","rightSection","footer","contextTypes","childContextTypes","propTypes","string","oneOf","isRequired","shape","func","bool"],"sources":["../../../src/template/external-course/index.js"],"sourcesContent":["import React from 'react';\nimport {NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon} from '@coorpacademy/nova-icons';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, getOr, keys, identity, isNil, isEmpty} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport {EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport Loader from '../../atom/loader';\nimport Button from '../../atom/button';\nimport ExternalContentViewer from '../../molecule/external-content-viewer';\nimport style from './style.css';\n\nconst defaultWrapperStyle = {\n default: style.default,\n cockpit: style.defaultCockpit,\n mobile: style.default\n};\n\nclass ExternalCourse extends React.Component {\n static propTypes = {\n name: PropTypes.string,\n type: PropTypes.oneOf(keys(EXTERNAL_CONTENT_ICONS)),\n url: PropTypes.string.isRequired,\n quit: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n complete: PropTypes.shape({\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n }),\n warning: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n loading: PropTypes.bool,\n backgroundImageUrl: PropTypes.string,\n contentType: PropTypes.string,\n mode: PropTypes.string\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n handleOnClick = field => e => {\n e.stopPropagation();\n e.preventDefault();\n const onClick = get('onClick', field);\n return onClick && onClick(e);\n };\n\n render() {\n const {\n name,\n type,\n url,\n warning,\n complete,\n quit,\n loading,\n backgroundImageUrl,\n contentType,\n mode = 'default'\n } = this.props;\n const {skin} = this.context;\n const primary = getOr('#00B0FF', 'common.primary', skin);\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const IconColor = EXTERNAL_CONTENT_ICONS[type].color;\n\n const mainContentSlot = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : (\n <ExternalContentViewer\n url={url}\n mode={mode}\n backgroundImageUrl={backgroundImageUrl}\n contentType={contentType}\n />\n );\n\n const completeButton = !isNil(complete) ? (\n <Button\n type=\"button\"\n disabled={loading ? true : complete.disabled}\n onClick={loading ? identity : this.handleOnClick(complete)}\n submitValue={complete.label}\n style={{\n backgroundColor:\n complete.disabled || loading ? convert(`color(${primary} a(-50%))`) : primary,\n cursor: loading ? 'progress' : 'pointer'\n }}\n className={classnames(\n style.completeCta,\n complete.disabled || loading ? style.disabled : null,\n loading ? style.loading : null\n )}\n />\n ) : null;\n\n const warningButton = !isNil(warning) ? (\n <div className={style.leftSection}>\n <div\n onClick={this.handleOnClick(warning)}\n className={classnames(style.iconLabel, style.link)}\n >\n <QuestionIcon className={style.iconQuestion} width={24} height={24} />\n <span>{warning.label}</span>\n </div>\n </div>\n ) : null;\n\n const quitButton = !isNil(quit) ? (\n <div className={style.leftSection}>\n <span\n className={classnames(style.quitCta, loading ? style.loading : null)}\n onClick={loading ? identity : this.handleOnClick(quit)}\n >\n {quit.label}\n </span>\n </div>\n ) : null;\n\n const titleSection = !isNil(name) ? (\n <div className={classnames(style.iconLabel, style.title)}>\n <div className={style.oval} style={{backgroundColor: IconColor}}>\n <IconType className={style.iconHeader} />\n </div>\n <span\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: name}}\n />\n </div>\n ) : null;\n\n const header =\n !isNil(quit) || !isEmpty(name) ? (\n <div className={style.header}>\n {quitButton}\n {titleSection}\n {isNil(quit) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n const footer =\n !isNil(warning) || !isNil(complete) ? (\n <div className={style.footer}>\n {warningButton}\n {completeButton}\n {isNil(warning) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n return (\n <div className={defaultWrapperStyle[mode]}>\n {header}\n {mainContentSlot}\n {footer}\n </div>\n );\n }\n}\n\nexport default ExternalCourse;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAQC,+CAA+C,IAAIC,YAA3D,QAA8E,0BAA9E;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,sBAAR,QAAqC,6BAArC;AACA,O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cAAf"}
1
+ {"version":3,"file":"index.js","names":["React","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","convert","classnames","PropTypes","EXTERNAL_CONTENT_ICONS","Provider","Loader","Button","ExternalContentViewer","CmPopin","style","defaultWrapperStyle","default","cockpit","defaultCockpit","mobile","ExternalCourse","Component","handleOnClick","field","e","stopPropagation","preventDefault","onClick","render","name","type","url","warning","complete","quit","loading","backgroundImageUrl","contentType","mode","closePopin","props","skin","context","primary","IconType","icon","IconColor","color","mainContentSlot","loader","completeButton","disabled","label","backgroundColor","cursor","completeCta","warningButton","leftSection","iconLabel","link","iconQuestion","quitButton","quitCta","titleSection","title","oval","iconHeader","innerHTML","__html","header","rightSection","footer","popin","contextTypes","childContextTypes","propTypes","string","oneOf","isRequired","shape","func","bool"],"sources":["../../../src/template/external-course/index.js"],"sourcesContent":["import React from 'react';\nimport {NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon} from '@coorpacademy/nova-icons';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, getOr, keys, identity, isNil, isEmpty} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport {EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport Loader from '../../atom/loader';\nimport Button from '../../atom/button';\nimport ExternalContentViewer from '../../molecule/external-content-viewer';\nimport CmPopin from '../../molecule/cm-popin';\nimport style from './style.css';\n\nconst defaultWrapperStyle = {\n default: style.default,\n cockpit: style.defaultCockpit,\n mobile: style.default\n};\n\nclass ExternalCourse extends React.Component {\n static propTypes = {\n name: PropTypes.string,\n type: PropTypes.oneOf(keys(EXTERNAL_CONTENT_ICONS)),\n url: PropTypes.string.isRequired,\n quit: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n complete: PropTypes.shape({\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n }),\n warning: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n loading: PropTypes.bool,\n backgroundImageUrl: PropTypes.string,\n contentType: PropTypes.string,\n mode: PropTypes.string,\n closePopin: PropTypes.shape({...CmPopin.propTypes})\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n handleOnClick = field => e => {\n e.stopPropagation();\n e.preventDefault();\n const onClick = get('onClick', field);\n return onClick && onClick(e);\n };\n\n render() {\n const {\n name,\n type,\n url,\n warning,\n complete,\n quit,\n loading,\n backgroundImageUrl,\n contentType,\n mode = 'default',\n closePopin\n } = this.props;\n const {skin} = this.context;\n const primary = getOr('#00B0FF', 'common.primary', skin);\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const IconColor = EXTERNAL_CONTENT_ICONS[type].color;\n\n const mainContentSlot = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : (\n <ExternalContentViewer\n url={url}\n mode={mode}\n backgroundImageUrl={backgroundImageUrl}\n contentType={contentType}\n />\n );\n const completeButton = !isNil(complete) ? (\n <Button\n type=\"button\"\n disabled={loading ? true : complete.disabled}\n onClick={loading ? identity : this.handleOnClick(complete)}\n submitValue={complete.label}\n style={{\n backgroundColor:\n complete.disabled || loading ? convert(`color(${primary} a(-50%))`) : primary,\n cursor: loading ? 'progress' : 'pointer'\n }}\n className={classnames(\n style.completeCta,\n complete.disabled || loading ? style.disabled : null,\n loading ? style.loading : null\n )}\n />\n ) : null;\n\n const warningButton = !isNil(warning) ? (\n <div className={style.leftSection}>\n <div\n onClick={this.handleOnClick(warning)}\n className={classnames(style.iconLabel, style.link)}\n >\n <QuestionIcon className={style.iconQuestion} width={24} height={24} />\n <span>{warning.label}</span>\n </div>\n </div>\n ) : null;\n\n const quitButton = !isNil(quit) ? (\n <div className={style.leftSection}>\n <span\n className={classnames(style.quitCta, loading ? style.loading : null)}\n onClick={loading ? identity : this.handleOnClick(quit)}\n >\n {quit.label}\n </span>\n </div>\n ) : null;\n\n const titleSection = !isNil(name) ? (\n <div className={classnames(style.iconLabel, style.title)}>\n <div className={style.oval} style={{backgroundColor: IconColor}}>\n <IconType className={style.iconHeader} />\n </div>\n <span\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: name}}\n />\n </div>\n ) : null;\n\n const header =\n !isNil(quit) || !isEmpty(name) ? (\n <div className={style.header}>\n {quitButton}\n {titleSection}\n {isNil(quit) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n const footer =\n !isNil(warning) || !isNil(complete) ? (\n <div className={style.footer}>\n {warningButton}\n {completeButton}\n {isNil(warning) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n const popin = !isNil(closePopin) ? (\n <div>\n <CmPopin {...closePopin} />\n </div>\n ) : null;\n\n return (\n <div className={defaultWrapperStyle[mode]}>\n {header}\n {popin}\n {mainContentSlot}\n {footer}\n </div>\n );\n }\n}\n\nexport default ExternalCourse;\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAQC,+CAA+C,IAAIC,YAA3D,QAA8E,0BAA9E;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,sBAAR,QAAqC,6BAArC;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,qBAAP,MAAkC,wCAAlC;AACA,OAAOC,OAAP,MAAoB,yBAApB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,mBAAmB,GAAG;EAC1BC,OAAO,EAAEF,KAAK,CAACE,OADW;EAE1BC,OAAO,EAAEH,KAAK,CAACI,cAFW;EAG1BC,MAAM,EAAEL,KAAK,CAACE;AAHY,CAA5B;;AAMA,MAAMI,cAAN,SAA6BlB,KAAK,CAACmB,SAAnC,CAA6C;EAAA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BhC,IAAI,EAAEhC,QAAQ,CAACiE,iBAAT,CAA2BjC;AADb,C;AAzBlBrB,c,CACGuD,S,2CAAY;EACjB9C,IAAI,EAAEtB,SAAS,CAACqE,MADC;EAEjB9C,IAAI,EAAEvB,SAAS,CAACsE,KAAV,CAAgB,MAAKrE,sBAAL,CAAhB,CAFW;EAGjBuB,GAAG,EAAExB,SAAS,CAACqE,MAAV,CAAiBE,UAHL;EAIjB5C,IAAI,EAAE3B,SAAS,CAACwE,KAAV,CAAgB;IACpB3B,KAAK,EAAE7C,SAAS,CAACqE,MAAV,CAAiBE,UADJ;IAEpBnD,OAAO,EAAEpB,SAAS,CAACyE;EAFC,CAAhB,CAJW;EAQjB/C,QAAQ,EAAE1B,SAAS,CAACwE,KAAV,CAAgB;IACxB3B,KAAK,EAAE7C,SAAS,CAACqE,MAAV,CAAiBE,UADA;IAExB3B,QAAQ,EAAE5C,SAAS,CAAC0E,IAFI;IAGxBtD,OAAO,EAAEpB,SAAS,CAACyE;EAHK,CAAhB,CARO;EAajBhD,OAAO,EAAEzB,SAAS,CAACwE,KAAV,CAAgB;IACvB3B,KAAK,EAAE7C,SAAS,CAACqE,MAAV,CAAiBE,UADD;IAEvBnD,OAAO,EAAEpB,SAAS,CAACyE;EAFI,CAAhB,CAbQ;EAiBjB7C,OAAO,EAAE5B,SAAS,CAAC0E,IAjBF;EAkBjB7C,kBAAkB,EAAE7B,SAAS,CAACqE,MAlBb;EAmBjBvC,WAAW,EAAE9B,SAAS,CAACqE,MAnBN;EAoBjBtC,IAAI,EAAE/B,SAAS,CAACqE,MApBC;EAqBjBrC,UAAU,EAAEhC,SAAS,CAACwE,KAAV,cAAoBlE,OAAO,CAAC8D,SAA5B;AArBK,C;AA4JrB,eAAevD,cAAf"}
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  .defaultCockpit{
27
- composes:default;
27
+ composes: default;
28
28
  height: 100%;
29
29
  }
30
30
 
@@ -4,6 +4,7 @@
4
4
  @value white from colors;
5
5
  @value light from colors;
6
6
  @value dark from colors;
7
+ @value positive from colors;
7
8
  @value cm_grey_200 from colors;
8
9
  @value black from colors;
9
10
  @value cm_primary_blue from colors;
@@ -78,7 +79,7 @@
78
79
  }
79
80
 
80
81
  .checkbox:checked ~ label {
81
- background: cm_primary_blue;
82
+ background: positive;
82
83
  }
83
84
 
84
85
  .default input:checked ~ label::after {
@@ -552,11 +552,11 @@ div.player:hover span.selectSpan {
552
552
  }
553
553
 
554
554
  .default .selectWrapper select.selectBox {
555
- max-width: 280px;
556
555
  width: inherit;
557
556
  border-radius: 8px;
558
557
  padding: 0;
559
558
  height: 100%;
559
+ width: 100%;
560
560
  top: 0;
561
561
  }
562
562
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAcA,kDAiLC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAeA,kDAkLC"}
@@ -40,7 +40,8 @@ const CMPopin = props => {
40
40
  const logo = {
41
41
  AlertDiamond: _novaIcons.NovaSolidInterfaceFeedbackInterfaceAlertDiamond,
42
42
  WindowUpload: _novaIcons.NovaSolidApplicationsWindowUpload3,
43
- MoonRocket: _novaIcons.NovaSolidSpaceMoonRocket
43
+ MoonRocket: _novaIcons.NovaSolidSpaceMoonRocket,
44
+ CheckCircle1: _novaIcons.NovaLineStatusCheckCircle1
44
45
  };
45
46
  const LogoComponent = logo[icon];
46
47
  const backgroundImageStyle = backgroundImageUrl ? {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","AlertDiamond","WindowUpload","MoonRocket","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","style","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth\n } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n return null;\n };\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAGJC,WAHI;IAIJC,YAJI;IAKJC,OALI;IAMJC,MANI;IAOJC,IAPI;IAQJC,kBARI;IASJC,eATI;IAUJC,WAVI;IAWJC,WAXI;IAYJC,iBAZI;IAaJC;EAbI,IAcFb,KAdJ;EAgBA,MAAMc,IAAI,GAAG;IACXC,YAAY,EAAZA,0DADW;IAEXC,YAAY,EAAZA,6CAFW;IAGXC,UAAU,EAAVA;EAHW,CAAb;EAKA,MAAMC,aAAa,GAAGJ,IAAI,CAACP,IAAD,CAA1B;EAEA,MAAMY,oBAAoB,GAAGX,kBAAkB,GAC3C;IACEY,eAAe,EAAG,OAAMZ,kBAAmB,GAD7C;IAEEa,cAAc,EAAE;EAFlB,CAD2C,GAK3C,IALJ;;EAMA,MAAMC,YAAY,GAAG,MAAM;IACzB,IAAIhB,MAAJ,EAAY,oBAAO;MAAK,SAAS,EAAEiB,cAAA,CAAMC,gBAAtB;MAAwC,GAAG,EAAElB;IAA7C,EAAP;IACZ,IAAIJ,IAAI,KAAK,QAAb,EACE,oBACE;MAAK,SAAS,EAA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FD,CAjLD;;AAmLAnE,OAAO,CAACoE,SAAR,2CAAoBA,cAApB;eAEepE,O"}
1
+ {"version":3,"file":"index.js","names":["CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","AlertDiamond","WindowUpload","MoonRocket","CheckCircle1","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","style","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket,\n NovaLineStatusCheckCircle1 as CheckCircle1\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth\n } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket,\n CheckCircle1\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n return null;\n };\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AAOA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAGJC,WAHI;IAIJC,YAJI;IAKJC,OALI;IAMJC,MANI;IAOJC,IAPI;IAQJC,kBARI;IASJC,eATI;IAUJC,WAVI;IAWJC,WAXI;IAYJC,iBAZI;IAaJC;EAbI,IAcFb,KAdJ;EAgBA,MAAMc,IAAI,GAAG;IACXC,YAAY,EAAZA,0DADW;IAEXC,YAAY,EAAZA,6CAFW;IAGXC,UAAU,EAAVA,mCAHW;IAIXC,YAAY,EAAZA;EAJW,CAAb;EAMA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AACqD,WAAZ,GAA0BvC,cAAA,CAAMuC,WAAhC,GAA8CvC,cAAA,CAAMwC;EAApE,gBACE,6BAAC,mBAAD;IACE,KAAK,EAAEtD,WAAW,CAACuD,KADrB;IAEE,OAAO,EAAEvD,WAAW,CAACwD,aAFvB;IAGE,aAAY,gBAAexD,WAAW,CAAC+B,IAAK,EAH9C;IAIE,cAAY/B,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAAC+B,IALpB;IAME,WAAW,EAAE/B,WAAW,CAACyD;EAN3B,EADF,CADU,GAWR,IApCN,CAzCF,CALF,CADF;AAwFD,CAlLD;;AAoLApE,OAAO,CAACqE,SAAR,2CAAoBA,cAApB;eAEerE,O"}
@@ -47,7 +47,7 @@
47
47
 
48
48
  .popin {
49
49
  overflow: auto;
50
- width: 500px;
50
+ width: 434px;
51
51
  flex-grow: 0;
52
52
  margin: 16px;
53
53
  padding: 16px 16px 20px 16px;
@@ -114,12 +114,12 @@
114
114
 
115
115
  .button {
116
116
  min-width: max-content;
117
- width: 160px;
117
+ width: 161px;
118
118
  padding: 8px;
119
119
  }
120
120
 
121
121
  .largeButton {
122
- width: 100%;
122
+ width: 75%;
123
123
  padding: 8px;
124
124
  }
125
125
 
@@ -150,6 +150,11 @@
150
150
  margin-top: 0px;
151
151
  }
152
152
 
153
+ .descriptionText, .content, .message {
154
+ margin-left: 32px;
155
+ margin-right: 32px;
156
+ }
157
+
153
158
  .cookieTitleContainer {
154
159
  align-items: center;
155
160
  display: flex;
@@ -278,10 +283,6 @@ a {
278
283
  }
279
284
 
280
285
  @media tablet {
281
- .popin {
282
- position: fixed;
283
- }
284
-
285
286
  .popin {
286
287
  width: 80%;
287
288
  }
@@ -289,18 +290,14 @@ a {
289
290
  .buttonContainer {
290
291
  display: flex;
291
292
  flex-wrap: wrap-reverse;
292
- margin: 48px 24px 32px 24px;
293
+ margin: 12px 24px 32px 24px;
293
294
  width: 85%;
294
295
  }
295
296
 
296
- .button {
297
+ .largeButton, .button , .titleContainer {
297
298
  width: 100%;
298
299
  }
299
300
 
300
- .titleContainer {
301
- width: 85%;
302
- }
303
-
304
301
  .popinCookie {
305
302
  position: fixed;
306
303
  bottom: 10px;
@@ -316,34 +313,44 @@ a {
316
313
  }
317
314
 
318
315
  .popinCookie .largeButton {
319
- padding: 8px 0px 0px 0px
316
+ padding: 8px 0px 0px 0px;
320
317
  }
321
318
  .popinCookie .message {
322
319
  padding: 24px 24px 0px 24px
323
320
  }
324
321
 
325
- @media mobile {
326
- .popin {
327
- position: fixed;
328
- }
329
-
330
- .popin {
331
- width: 80%;
332
- }
333
-
334
- .buttonContainer {
335
- display: flex;
336
- margin: 48px 24px 32px 24px;
337
- width: 85%;
338
- }
339
-
340
- .button {
341
- width: 100%;
342
- }
343
-
344
- .titleContainer {
345
- width: 85%;
346
- }
322
+ .descriptionText, .content, .message {
323
+ margin-left: 32px;
324
+ margin-right: 32px;
325
+ }
326
+ }
327
+
328
+ @media mobile {
329
+ .popin {
330
+ width: 350px;
331
+ }
332
+
333
+ .buttonContainer {
334
+ display: flex;
335
+ margin: 12px 16px 32px 16px;
336
+ width: 85%;
337
+ }
338
+
339
+ .button {
340
+ width: 100%;
341
+ }
342
+
343
+ .titleContainer {
344
+ width: 100%;
345
+ }
346
+
347
+ .content, .message, .descriptionText {
348
+ margin-left: 16px;
349
+ margin-right: 16px;
350
+ }
351
+ .largeButton {
352
+ margin-left: 32px;
353
+ margin-right: 32px;
347
354
  }
348
355
  }
349
356
 
@@ -355,7 +362,6 @@ button {
355
362
  }
356
363
 
357
364
  _:-ms-fullscreen,
358
- .descriptionText,
359
365
  .buttonContainer {
360
366
  width: 85%;
361
367
  }
@@ -39,7 +39,6 @@
39
39
  .title {
40
40
  color: dark;
41
41
  margin: 0;
42
- margin-bottom: 10px;
43
42
  display: block;
44
43
  font-family: "Gilroy";
45
44
  font-size: 15px;
@@ -86,7 +86,6 @@ declare class MoocHeader extends React.Component<any, any, any> {
86
86
  }>>;
87
87
  }>>;
88
88
  'settings-aria-label': PropTypes.Requireable<string>;
89
- 'close-settings-aria-label': PropTypes.Requireable<string>;
90
89
  'active-page-aria-label': PropTypes.Requireable<string>;
91
90
  settings: PropTypes.Requireable<(PropTypes.InferProps<{
92
91
  title: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAyBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAwBC;IAtBC;;;;;;MAMC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,6BAIE;IAEF,6BAIE;IAEF,6BAscC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAyBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA4FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAwBC;IAtBC;;;;;;MAMC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,6BAIE;IAEF,6BAIE;IAEF,6BAicC;CACF"}
@@ -225,7 +225,6 @@ class MoocHeader extends _react.default.Component {
225
225
  search,
226
226
  'search-reset-aria-label': searchResetAriaLabel,
227
227
  'settings-aria-label': settingsAriaLabel,
228
- 'close-settings-aria-label': closeSettingsAriaLabel,
229
228
  'active-page-aria-label': activePageAriaLabel
230
229
  } = this.props;
231
230
  const {
@@ -254,7 +253,6 @@ class MoocHeader extends _react.default.Component {
254
253
  let notificationsView = null;
255
254
  let searchFormView = null;
256
255
  const moreAriaLabel = translate('More');
257
- const closeLabel = translate('Close');
258
256
  const primaryColor = (0, _get2.default)('common.primary', skin);
259
257
  const mediumColor = (0, _get2.default)('common.medium', skin);
260
258
  const darkColor = (0, _get2.default)('common.dark', skin);
@@ -504,7 +502,7 @@ class MoocHeader extends _react.default.Component {
504
502
  selectProps.className = _style.default.languageSelect;
505
503
  settingView = /*#__PURE__*/_react.default.createElement("div", {
506
504
  "data-name": `setting-${settingName}`,
507
- className: _style.default.setting,
505
+ className: (0, _classnames.default)(_style.default.setting, _style.default.selectBoxes),
508
506
  key: settingName
509
507
  }, /*#__PURE__*/_react.default.createElement("span", {
510
508
  className: _style.default.label
@@ -554,11 +552,7 @@ class MoocHeader extends _react.default.Component {
554
552
  }, /*#__PURE__*/_react.default.createElement("div", {
555
553
  "data-name": "settings",
556
554
  className: _style.default.settingsGroup
557
- }, settingsElements), /*#__PURE__*/_react.default.createElement("div", {
558
- className: _style.default.closeSettings,
559
- onClick: this.handleSettingsToggle,
560
- "aria-label": closeSettingsAriaLabel
561
- }, closeLabel)));
555
+ }, settingsElements)));
562
556
  }
563
557
 
564
558
  if (search) {
@@ -720,7 +714,6 @@ MoocHeader.propTypes = process.env.NODE_ENV !== "production" ? {
720
714
  })
721
715
  }),
722
716
  'settings-aria-label': _propTypes.default.string,
723
- 'close-settings-aria-label': _propTypes.default.string,
724
717
  'active-page-aria-label': _propTypes.default.string,
725
718
  settings: _propTypes.default.arrayOf(_propTypes.default.shape({
726
719
  title: _propTypes.default.string,