@coorpacademy/components 10.4.2 → 10.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/es/atom/card-image-preview/index.js +35 -0
  2. package/es/atom/card-image-preview/index.js.map +1 -0
  3. package/es/atom/card-image-preview/style.css +34 -0
  4. package/es/atom/card-image-preview/test/fixtures/default.js +6 -0
  5. package/es/atom/card-image-preview/test/fixtures/default.js.map +1 -0
  6. package/es/atom/card-image-preview/test/fixtures/empty.js +4 -0
  7. package/es/atom/card-image-preview/test/fixtures/empty.js.map +1 -0
  8. package/es/atom/input-switch/style.css +4 -3
  9. package/es/atom/input-switch/test/fixtures/cm-right-disabled.js +6 -5
  10. package/es/atom/input-switch/test/fixtures/cm-right-disabled.js.map +1 -1
  11. package/es/molecule/card/test/fixtures.js +0 -2
  12. package/es/molecule/card/test/fixtures.js.map +1 -1
  13. package/es/molecule/select-multiple/style.css +1 -1
  14. package/es/organism/content-translation/style.css +2 -2
  15. package/es/organism/course-selection/index.js +9 -2
  16. package/es/organism/course-selection/index.js.map +1 -1
  17. package/es/organism/course-selection/style.css +2 -1
  18. package/es/organism/course-selection/test/fixtures/default.js +2 -2
  19. package/es/organism/course-selection/test/fixtures/default.js.map +1 -1
  20. package/es/organism/course-selection/test/fixtures/filtered.js +1 -1
  21. package/es/organism/course-selection/test/fixtures/filtered.js.map +1 -1
  22. package/es/organism/course-selection/test/fixtures/sorted-selected.js +1 -1
  23. package/es/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -1
  24. package/es/organism/course-selection/test/fixtures/switch-activated.js +1 -1
  25. package/es/organism/course-selection/test/fixtures/switch-activated.js.map +1 -1
  26. package/es/organism/course-selection/test/fixtures/unsorted-selected.js +1 -1
  27. package/es/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -1
  28. package/es/organism/mooc-footer/style.css +1 -1
  29. package/es/organism/setup-header/index.js +6 -17
  30. package/es/organism/setup-header/index.js.map +1 -1
  31. package/es/organism/setup-header/test/fixtures/default.js +4 -1
  32. package/es/organism/setup-header/test/fixtures/default.js.map +1 -1
  33. package/es/organism/wizard-contents/style.css +1 -1
  34. package/es/template/app-player/popin-end/summary.js +3 -2
  35. package/es/template/app-player/popin-end/summary.js.map +1 -1
  36. package/es/template/app-player/popin-end/test/fixtures/without-recommendation.js +13 -0
  37. package/es/template/app-player/popin-end/test/fixtures/without-recommendation.js.map +1 -0
  38. package/lib/atom/card-image-preview/index.js +47 -0
  39. package/lib/atom/card-image-preview/index.js.map +1 -0
  40. package/lib/atom/card-image-preview/style.css +34 -0
  41. package/lib/atom/card-image-preview/test/fixtures/default.js +11 -0
  42. package/lib/atom/card-image-preview/test/fixtures/default.js.map +1 -0
  43. package/lib/atom/card-image-preview/test/fixtures/empty.js +9 -0
  44. package/lib/atom/card-image-preview/test/fixtures/empty.js.map +1 -0
  45. package/lib/atom/input-switch/style.css +4 -3
  46. package/lib/atom/input-switch/test/fixtures/cm-right-disabled.js +6 -9
  47. package/lib/atom/input-switch/test/fixtures/cm-right-disabled.js.map +1 -1
  48. package/lib/molecule/card/test/fixtures.js +0 -3
  49. package/lib/molecule/card/test/fixtures.js.map +1 -1
  50. package/lib/molecule/select-multiple/style.css +1 -1
  51. package/lib/organism/content-translation/style.css +2 -2
  52. package/lib/organism/course-selection/index.js +9 -2
  53. package/lib/organism/course-selection/index.js.map +1 -1
  54. package/lib/organism/course-selection/style.css +2 -1
  55. package/lib/organism/course-selection/test/fixtures/default.js +2 -2
  56. package/lib/organism/course-selection/test/fixtures/default.js.map +1 -1
  57. package/lib/organism/course-selection/test/fixtures/filtered.js +1 -1
  58. package/lib/organism/course-selection/test/fixtures/filtered.js.map +1 -1
  59. package/lib/organism/course-selection/test/fixtures/sorted-selected.js +1 -1
  60. package/lib/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -1
  61. package/lib/organism/course-selection/test/fixtures/switch-activated.js +1 -1
  62. package/lib/organism/course-selection/test/fixtures/switch-activated.js.map +1 -1
  63. package/lib/organism/course-selection/test/fixtures/unsorted-selected.js +1 -1
  64. package/lib/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -1
  65. package/lib/organism/mooc-footer/style.css +1 -1
  66. package/lib/organism/setup-header/index.js +6 -17
  67. package/lib/organism/setup-header/index.js.map +1 -1
  68. package/lib/organism/setup-header/test/fixtures/default.js +4 -1
  69. package/lib/organism/setup-header/test/fixtures/default.js.map +1 -1
  70. package/lib/organism/wizard-contents/style.css +1 -1
  71. package/lib/template/app-player/popin-end/summary.js +4 -2
  72. package/lib/template/app-player/popin-end/summary.js.map +1 -1
  73. package/lib/template/app-player/popin-end/test/fixtures/without-recommendation.js +24 -0
  74. package/lib/template/app-player/popin-end/test/fixtures/without-recommendation.js.map +1 -0
  75. package/package.json +2 -2
  76. package/es/organism/playlist-translation/test/fixtures.js +0 -15
  77. package/es/organism/playlist-translation/test/fixtures.js.map +0 -1
  78. package/lib/organism/playlist-translation/test/fixtures.js +0 -25
  79. package/lib/organism/playlist-translation/test/fixtures.js.map +0 -1
@@ -1,3 +1,4 @@
1
+ import _isEmpty from "lodash/fp/isEmpty";
1
2
  import _keys from "lodash/fp/keys";
2
3
  import _getOr from "lodash/fp/getOr";
3
4
  import _get from "lodash/fp/get";
@@ -227,11 +228,11 @@ const Cards = props => {
227
228
  const {
228
229
  cards
229
230
  } = props;
230
- return _get('cards', props) === null ? /*#__PURE__*/React.createElement(CardsLoader, null) : (cards ? /*#__PURE__*/React.createElement("div", {
231
+ return _get('cards', props) === null ? /*#__PURE__*/React.createElement(CardsLoader, null) : (_isEmpty(cards) ? null : /*#__PURE__*/React.createElement("div", {
231
232
  className: style.cardsWrapper
232
233
  }, /*#__PURE__*/React.createElement(CardsList, _extends({}, props, {
233
234
  dataName: 'popin-end-recommendation'
234
- }))) : null) || null;
235
+ })))) || null;
235
236
  };
236
237
 
237
238
  Cards.propTypes = process.env.NODE_ENV !== "production" ? CardsList.propTypes : {};
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/template/app-player/popin-end/summary.js"],"names":["React","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","Provider","Button","Link","Discussion","Loader","Card","Feedback","CardsList","innerHTML","PopinHeader","style","Header","props","SimpleAction","color","prefix","title","button","buttonTitle","linkProps","simpleWrapper","simpleTexts","simplePrefix","simpleTitle","__html","backgroundColor","simpleButton","propTypes","string","shape","NextCourse","card","nextCourseWrapper","nextCourseTexts","nextCoursePrefix","nextCourseTitle","nextCourseCard","Subscribe","description","subscribeWrapper","subscribeTexts","subscribeDescription","subscribeTitle","subscribeButtonWrapper","subscribeButton","submitValue","actions","simple","subscribe","nextCourse","Action","type","actionProps","Type","oneOf","CardsLoader","loaderWrapper","CommentConfirmation","context","onClick","commentSectionTitle","confirmationLinkText","skin","dark","commentSection","commentSectionIconWrapper","commentSectionIcon","commentSectionTexts","commentSectionLink","node","children","contextTypes","childContextTypes","CommentSection","isSent","edition","confirmation","bool","Cards","cards","cardsWrapper","Footer","footer","Summary","header","recommendation","comment","action","feedback","primary","commentView","discussionWrapper","footerView","feedbackView","summaryWrapper","href","url","func","isRequired"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,2BAA2B,IAAIC,SAAvC,QAAuD,0BAAvD;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,IAAP,MAAiB,oBAAjB;AACA,OAAOC,UAAP,MAAuB,8BAAvB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,IAAP,MAAiB,wBAAjB;AACA,OAAOC,QAAP,MAAqB,4BAArB;AACA,OAAOC,SAAP,MAAsB,wCAAtB;AACA,SAAQC,SAAR,QAAwB,+BAAxB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,KAAP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D;;AAyBAT,OAAO,CAACZ,YAAR,GAAuB;AACrBT,EAAAA,IAAI,EAAE9D,QAAQ,CAACwE,iBAAT,CAA2BV;AADZ,CAAvB;AAIAqB,OAAO,CAACxD,SAAR,2CAAoB;AAClByD,EAAAA,MAAM,EAAExF,SAAS,CAACiC,KAAV,CAAgBpB,WAAW,CAACkB,SAA5B,CADU;AAElBuD,EAAAA,MAAM,EAAEtF,SAAS,CAACiC,KAAV,CAAgB;AACtBb,IAAAA,KAAK,EAAEpB,SAAS,CAACgC,MADK;AAEtBmE,IAAAA,IAAI,EAAEnG,SAAS,CAACoG,GAFM;AAGtBrC,IAAAA,OAAO,EAAE/D,SAAS,CAACqG;AAHG,GAAhB,CAFU;AAOlBX,EAAAA,OAAO,EAAE1F,SAAS,CAACiC,KAAV,CAAgB4C,cAAc,CAAC9C,SAA/B,CAPS;AAQlB4D,EAAAA,MAAM,EAAE3F,SAAS,CAACiC,KAAV,CAAgB;AACtBsB,IAAAA,IAAI,EAAEvD,SAAS,CAAC0D,KAAV,CAAgB,MAAKR,OAAL,CAAhB,EAA+BoD;AADf,GAAhB,CARU;AAWlBb,EAAAA,cAAc,EAAEzF,SAAS,CAACiC,KAAV,CAAgBtB,SAAS,CAACoB,SAA1B,CAXE;AAYlB6D,EAAAA,QAAQ,EAAE5F,SAAS,CAACiC,KAAV,CAAgBvB,QAAQ,CAACqB,SAAzB;AAZQ,CAApB;AAeA,eAAewD,OAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get, getOr, keys} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaSolidStatusCheckCircle2 as CheckIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Link from '../../../atom/link';\nimport Discussion from '../../../organism/discussion';\nimport Loader from '../../../atom/loader';\nimport Card from '../../../molecule/card';\nimport Feedback from '../../../molecule/feedback';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport {innerHTML} from '../../../atom/label/style.css';\nimport PopinHeader from '../popin-header';\nimport style from './summary.css';\n\nconst Header = props => <PopinHeader {...props} />;\n\nconst SimpleAction = ({color, prefix, title, button}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div data-name=\"simpleAction\" className={style.simpleWrapper}>\n <div className={style.simpleTexts}>\n <span data-name=\"simplePrefix\" className={style.simplePrefix}>\n {prefix}\n </span>\n <span\n data-name=\"simpleTitle\"\n className={classnames(style.simpleTitle, innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <Button\n {...linkProps}\n type=\"link\"\n style={{\n backgroundColor: color\n }}\n className={style.simpleButton}\n submitValue={buttonTitle}\n />\n </div>\n );\n};\nSimpleAction.propTypes = {\n color: PropTypes.string,\n prefix: PropTypes.string,\n title: PropTypes.string,\n button: PropTypes.shape(Button.propTypes)\n};\n\nconst NextCourse = ({title, prefix, card}) => (\n <div data-name=\"nextCourse\" className={style.nextCourseWrapper}>\n <div className={style.nextCourseTexts}>\n <div className={style.nextCoursePrefix}>{prefix}</div>\n <div\n className={classnames(style.nextCourseTitle, innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <div className={style.nextCourseCard}>\n <Card {...card} dataName={'popin-end-next-course'} />\n </div>\n </div>\n);\nNextCourse.propTypes = {\n title: PropTypes.string,\n prefix: PropTypes.string,\n card: PropTypes.shape(CardsList.propTypes)\n};\n\nconst Subscribe = ({title, description, button, card}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div className={style.subscribeWrapper}>\n <div className={style.subscribeTexts}>\n <div className={style.subscribeDescription}>{description}</div>\n <div\n className={classnames(style.subscribeTitle, innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div className={style.subscribeButtonWrapper}>\n <Button\n {...linkProps}\n type=\"link\"\n className={style.subscribeButton}\n submitValue={buttonTitle}\n />\n </div>\n </div>\n <div>\n <Card {...card} dataName={'popin-end-subscribe'} />\n </div>\n </div>\n );\n};\n\nSubscribe.propTypes = {\n ...Button.propTypes.propTypes,\n title: Button.propTypes.submitValue\n};\n\nconst actions = {\n simple: SimpleAction,\n subscribe: Subscribe,\n nextCourse: NextCourse\n};\n\nconst Action = props => {\n const {type, ...actionProps} = props;\n const Type = get(type, actions);\n\n return Type ? <Type {...actionProps} /> : null;\n};\n\nAction.propTypes = {\n type: PropTypes.oneOf(keys(actions))\n};\n\nconst CardsLoader = () => (\n <div className={style.loaderWrapper}>\n <Loader />\n </div>\n);\n\nconst CommentConfirmation = (props, context) => {\n const {onClick, commentSectionTitle, confirmationLinkText} = props;\n const {skin} = context;\n const dark = get('common.dark', skin);\n\n return (\n <div className={style.commentSection}>\n <div className={style.commentSectionIconWrapper}>\n <CheckIcon className={style.commentSectionIcon} color={dark} />\n </div>\n <div className={style.commentSectionTexts}>\n <p>{commentSectionTitle}</p>\n <Link onClick={onClick} className={style.commentSectionLink}>\n {confirmationLinkText}\n </Link>\n </div>\n </div>\n );\n};\n\nCommentConfirmation.propTypes = {\n commentSectionTitle: PropTypes.node,\n confirmationLinkText: Link.propTypes.children,\n onClick: Link.propTypes.onClick\n};\n\nCommentConfirmation.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nconst CommentSection = props => {\n const {isSent, edition, confirmation} = props;\n if (isSent) {\n const {onClick, commentSectionTitle, confirmationLinkText} = confirmation;\n return (\n <CommentConfirmation\n onClick={onClick}\n commentSectionTitle={commentSectionTitle}\n confirmationLinkText={confirmationLinkText}\n />\n );\n }\n\n return <Discussion {...edition} />;\n};\n\nCommentSection.propTypes = {\n isSent: PropTypes.bool,\n edition: PropTypes.shape(Discussion.propTypes),\n confirmation: PropTypes.shape(CommentConfirmation.propTypes)\n};\n\nconst Cards = props => {\n const {cards} = props;\n\n return get('cards', props) === null ? (\n <CardsLoader />\n ) : (\n (cards ? (\n <div className={style.cardsWrapper}>\n <CardsList {...props} dataName={'popin-end-recommendation'} />\n </div>\n ) : null) || null\n );\n};\n\nCards.propTypes = CardsList.propTypes;\n\nconst Footer = ({title, color, ...linkProps}) => (\n <Link\n {...linkProps}\n style={{\n color\n }}\n className={style.footer}\n data-name=\"nextLink\"\n data-popin=\"popinEnd\"\n data-next=\"home\"\n >\n {title}\n </Link>\n);\n\nFooter.propTypes = {\n ...Link.propTypes,\n title: Link.propTypes.children,\n color: PropTypes.string\n};\n\nconst Summary = (props, context) => {\n const {header, recommendation, comment, footer, action, feedback} = props;\n const {skin} = context;\n const primary = getOr('#f0f', 'common.primary', skin);\n const commentView =\n comment && header ? (\n <div className={style.discussionWrapper}>\n <CommentSection {...comment} />\n </div>\n ) : null;\n const footerView = footer && header ? <Footer {...footer} color={primary} /> : null;\n const feedbackView = feedback ? <Feedback {...feedback} /> : null;\n\n return (\n <div className={style.summaryWrapper}>\n <Header {...header} />\n {feedbackView}\n <Action {...action} color={primary} />\n <Cards {...recommendation} />\n {commentView}\n {footerView}\n </div>\n );\n};\n\nSummary.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSummary.propTypes = {\n header: PropTypes.shape(PopinHeader.propTypes),\n footer: PropTypes.shape({\n title: PropTypes.string,\n href: PropTypes.url,\n onClick: PropTypes.func\n }),\n comment: PropTypes.shape(CommentSection.propTypes),\n action: PropTypes.shape({\n type: PropTypes.oneOf(keys(actions)).isRequired\n }),\n recommendation: PropTypes.shape(CardsList.propTypes),\n feedback: PropTypes.shape(Feedback.propTypes)\n};\n\nexport default Summary;\n"],"file":"summary.js"}
1
+ {"version":3,"sources":["../../../../src/template/app-player/popin-end/summary.js"],"names":["React","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","Provider","Button","Link","Discussion","Loader","Card","Feedback","CardsList","innerHTML","PopinHeader","style","Header","props","SimpleAction","color","prefix","title","button","buttonTitle","linkProps","simpleWrapper","simpleTexts","simplePrefix","simpleTitle","__html","backgroundColor","simpleButton","propTypes","string","shape","NextCourse","card","nextCourseWrapper","nextCourseTexts","nextCoursePrefix","nextCourseTitle","nextCourseCard","Subscribe","description","subscribeWrapper","subscribeTexts","subscribeDescription","subscribeTitle","subscribeButtonWrapper","subscribeButton","submitValue","actions","simple","subscribe","nextCourse","Action","type","actionProps","Type","oneOf","CardsLoader","loaderWrapper","CommentConfirmation","context","onClick","commentSectionTitle","confirmationLinkText","skin","dark","commentSection","commentSectionIconWrapper","commentSectionIcon","commentSectionTexts","commentSectionLink","node","children","contextTypes","childContextTypes","CommentSection","isSent","edition","confirmation","bool","Cards","cards","cardsWrapper","Footer","footer","Summary","header","recommendation","comment","action","feedback","primary","commentView","discussionWrapper","footerView","feedbackView","summaryWrapper","href","url","func","isRequired"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,2BAA2B,IAAIC,SAAvC,QAAuD,0BAAvD;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,IAAP,MAAiB,oBAAjB;AACA,OAAOC,UAAP,MAAuB,8BAAvB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,IAAP,MAAiB,wBAAjB;AACA,OAAOC,QAAP,MAAqB,4BAArB;AACA,OAAOC,SAAP,MAAsB,wCAAtB;AACA,SAAQC,SAAR,QAAwB,+BAAxB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,KAAP,MAAkB,eAAlB;;AAEA,MAAMC,MAAM,GAAGC,KAAK,iBAAI,oBAAC,WAAD,EAAiBA,KAAjB,CAAxB;;AAEA,MAAMC,YAAY,GAAG,CAAC;AAACC,EAAAA,KAAD;AAAQC,EAAAA,MAAR;AAAgBC,EAAAA,KAAhB;AAAuBC,EAAAA;AAAvB,CAAD,KAAoC;AACvD,QAAM;AAACD,IAAAA,KAAK,EAA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AAEtF,SAAS,CAACiC,KAAV,CAAgB;AACtBb,IAAAA,KAAK,EAAEpB,SAAS,CAACgC,MADK;AAEtBmE,IAAAA,IAAI,EAAEnG,SAAS,CAACoG,GAFM;AAGtBrC,IAAAA,OAAO,EAAE/D,SAAS,CAACqG;AAHG,GAAhB,CAFU;AAOlBX,EAAAA,OAAO,EAAE1F,SAAS,CAACiC,KAAV,CAAgB4C,cAAc,CAAC9C,SAA/B,CAPS;AAQlB4D,EAAAA,MAAM,EAAE3F,SAAS,CAACiC,KAAV,CAAgB;AACtBsB,IAAAA,IAAI,EAAEvD,SAAS,CAAC0D,KAAV,CAAgB,MAAKR,OAAL,CAAhB,EAA+BoD;AADf,GAAhB,CARU;AAWlBb,EAAAA,cAAc,EAAEzF,SAAS,CAACiC,KAAV,CAAgBtB,SAAS,CAACoB,SAA1B,CAXE;AAYlB6D,EAAAA,QAAQ,EAAE5F,SAAS,CAACiC,KAAV,CAAgBvB,QAAQ,CAACqB,SAAzB;AAZQ,CAApB;AAeA,eAAewD,OAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get, getOr, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaSolidStatusCheckCircle2 as CheckIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Link from '../../../atom/link';\nimport Discussion from '../../../organism/discussion';\nimport Loader from '../../../atom/loader';\nimport Card from '../../../molecule/card';\nimport Feedback from '../../../molecule/feedback';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport {innerHTML} from '../../../atom/label/style.css';\nimport PopinHeader from '../popin-header';\nimport style from './summary.css';\n\nconst Header = props => <PopinHeader {...props} />;\n\nconst SimpleAction = ({color, prefix, title, button}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div data-name=\"simpleAction\" className={style.simpleWrapper}>\n <div className={style.simpleTexts}>\n <span data-name=\"simplePrefix\" className={style.simplePrefix}>\n {prefix}\n </span>\n <span\n data-name=\"simpleTitle\"\n className={classnames(style.simpleTitle, innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <Button\n {...linkProps}\n type=\"link\"\n style={{\n backgroundColor: color\n }}\n className={style.simpleButton}\n submitValue={buttonTitle}\n />\n </div>\n );\n};\nSimpleAction.propTypes = {\n color: PropTypes.string,\n prefix: PropTypes.string,\n title: PropTypes.string,\n button: PropTypes.shape(Button.propTypes)\n};\n\nconst NextCourse = ({title, prefix, card}) => (\n <div data-name=\"nextCourse\" className={style.nextCourseWrapper}>\n <div className={style.nextCourseTexts}>\n <div className={style.nextCoursePrefix}>{prefix}</div>\n <div\n className={classnames(style.nextCourseTitle, innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <div className={style.nextCourseCard}>\n <Card {...card} dataName={'popin-end-next-course'} />\n </div>\n </div>\n);\nNextCourse.propTypes = {\n title: PropTypes.string,\n prefix: PropTypes.string,\n card: PropTypes.shape(CardsList.propTypes)\n};\n\nconst Subscribe = ({title, description, button, card}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div className={style.subscribeWrapper}>\n <div className={style.subscribeTexts}>\n <div className={style.subscribeDescription}>{description}</div>\n <div\n className={classnames(style.subscribeTitle, innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div className={style.subscribeButtonWrapper}>\n <Button\n {...linkProps}\n type=\"link\"\n className={style.subscribeButton}\n submitValue={buttonTitle}\n />\n </div>\n </div>\n <div>\n <Card {...card} dataName={'popin-end-subscribe'} />\n </div>\n </div>\n );\n};\n\nSubscribe.propTypes = {\n ...Button.propTypes.propTypes,\n title: Button.propTypes.submitValue\n};\n\nconst actions = {\n simple: SimpleAction,\n subscribe: Subscribe,\n nextCourse: NextCourse\n};\n\nconst Action = props => {\n const {type, ...actionProps} = props;\n const Type = get(type, actions);\n\n return Type ? <Type {...actionProps} /> : null;\n};\n\nAction.propTypes = {\n type: PropTypes.oneOf(keys(actions))\n};\n\nconst CardsLoader = () => (\n <div className={style.loaderWrapper}>\n <Loader />\n </div>\n);\n\nconst CommentConfirmation = (props, context) => {\n const {onClick, commentSectionTitle, confirmationLinkText} = props;\n const {skin} = context;\n const dark = get('common.dark', skin);\n\n return (\n <div className={style.commentSection}>\n <div className={style.commentSectionIconWrapper}>\n <CheckIcon className={style.commentSectionIcon} color={dark} />\n </div>\n <div className={style.commentSectionTexts}>\n <p>{commentSectionTitle}</p>\n <Link onClick={onClick} className={style.commentSectionLink}>\n {confirmationLinkText}\n </Link>\n </div>\n </div>\n );\n};\n\nCommentConfirmation.propTypes = {\n commentSectionTitle: PropTypes.node,\n confirmationLinkText: Link.propTypes.children,\n onClick: Link.propTypes.onClick\n};\n\nCommentConfirmation.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nconst CommentSection = props => {\n const {isSent, edition, confirmation} = props;\n if (isSent) {\n const {onClick, commentSectionTitle, confirmationLinkText} = confirmation;\n return (\n <CommentConfirmation\n onClick={onClick}\n commentSectionTitle={commentSectionTitle}\n confirmationLinkText={confirmationLinkText}\n />\n );\n }\n\n return <Discussion {...edition} />;\n};\n\nCommentSection.propTypes = {\n isSent: PropTypes.bool,\n edition: PropTypes.shape(Discussion.propTypes),\n confirmation: PropTypes.shape(CommentConfirmation.propTypes)\n};\n\nconst Cards = props => {\n const {cards} = props;\n\n return get('cards', props) === null ? (\n <CardsLoader />\n ) : (\n (isEmpty(cards) ? null : (\n <div className={style.cardsWrapper}>\n <CardsList {...props} dataName={'popin-end-recommendation'} />\n </div>\n )) || null\n );\n};\n\nCards.propTypes = CardsList.propTypes;\n\nconst Footer = ({title, color, ...linkProps}) => (\n <Link\n {...linkProps}\n style={{\n color\n }}\n className={style.footer}\n data-name=\"nextLink\"\n data-popin=\"popinEnd\"\n data-next=\"home\"\n >\n {title}\n </Link>\n);\n\nFooter.propTypes = {\n ...Link.propTypes,\n title: Link.propTypes.children,\n color: PropTypes.string\n};\n\nconst Summary = (props, context) => {\n const {header, recommendation, comment, footer, action, feedback} = props;\n const {skin} = context;\n const primary = getOr('#f0f', 'common.primary', skin);\n const commentView =\n comment && header ? (\n <div className={style.discussionWrapper}>\n <CommentSection {...comment} />\n </div>\n ) : null;\n const footerView = footer && header ? <Footer {...footer} color={primary} /> : null;\n const feedbackView = feedback ? <Feedback {...feedback} /> : null;\n\n return (\n <div className={style.summaryWrapper}>\n <Header {...header} />\n {feedbackView}\n <Action {...action} color={primary} />\n <Cards {...recommendation} />\n {commentView}\n {footerView}\n </div>\n );\n};\n\nSummary.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSummary.propTypes = {\n header: PropTypes.shape(PopinHeader.propTypes),\n footer: PropTypes.shape({\n title: PropTypes.string,\n href: PropTypes.url,\n onClick: PropTypes.func\n }),\n comment: PropTypes.shape(CommentSection.propTypes),\n action: PropTypes.shape({\n type: PropTypes.oneOf(keys(actions)).isRequired\n }),\n recommendation: PropTypes.shape(CardsList.propTypes),\n feedback: PropTypes.shape(Feedback.propTypes)\n};\n\nexport default Summary;\n"],"file":"summary.js"}
@@ -0,0 +1,13 @@
1
+ import _defaultsDeep from "lodash/fp/defaultsDeep";
2
+ import correct from './correct';
3
+ export default _defaultsDeep(correct, {
4
+ props: {
5
+ summary: {
6
+ recommendation: {
7
+ title: 'You should try:',
8
+ cards: []
9
+ }
10
+ }
11
+ }
12
+ });
13
+ //# sourceMappingURL=without-recommendation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/template/app-player/popin-end/test/fixtures/without-recommendation.js"],"names":["correct","props","summary","recommendation","title","cards"],"mappings":";AACA,OAAOA,OAAP,MAAoB,WAApB;AAEA,eAAe,cAAaA,OAAb,EAAsB;AACnCC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE;AACPC,MAAAA,cAAc,EAAE;AACdC,QAAAA,KAAK,EAAE,iBADO;AAEdC,QAAAA,KAAK,EAAE;AAFO;AADT;AADJ;AAD4B,CAAtB,CAAf","sourcesContent":["import {defaultsDeep} from 'lodash/fp';\nimport correct from './correct';\n\nexport default defaultsDeep(correct, {\n props: {\n summary: {\n recommendation: {\n title: 'You should try:',\n cards: []\n }\n }\n }\n});\n"],"file":"without-recommendation.js"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _get2 = _interopRequireDefault(require("lodash/fp/get"));
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _novaIcons = require("@coorpacademy/nova-icons");
13
+
14
+ var _provider = _interopRequireDefault(require("../provider"));
15
+
16
+ var _style = _interopRequireDefault(require("./style.css"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ const CardImagePreview = ({
21
+ image
22
+ }, {
23
+ skin
24
+ }) => {
25
+ const whiteColor = (0, _get2.default)('common.white', skin);
26
+ const emptyIcon = !image ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyPictures, {
27
+ className: _style.default.emptyIcon,
28
+ color: whiteColor
29
+ }) : null;
30
+ return /*#__PURE__*/_react.default.createElement("div", {
31
+ className: _style.default.image,
32
+ style: {
33
+ backgroundImage: image ? `url('${image}')` : 'none'
34
+ },
35
+ "data-name": "card-image-preview"
36
+ }, emptyIcon);
37
+ };
38
+
39
+ CardImagePreview.contextTypes = {
40
+ skin: _provider.default.childContextTypes.skin
41
+ };
42
+ CardImagePreview.propTypes = process.env.NODE_ENV !== "production" ? {
43
+ image: _propTypes.default.string
44
+ } : {};
45
+ var _default = CardImagePreview;
46
+ exports.default = _default;
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/atom/card-image-preview/index.js"],"names":["CardImagePreview","image","skin","whiteColor","emptyIcon","style","backgroundImage","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AAEA;;;;AAEA,MAAMA,gBAAgB,GAAG,CAAC;AAACC,EAAAA;AAAD,CAAD,EAAU;AAACC,EAAAA;AAAD,CAAV,KAAqB;AAC5C,QAAMC,UAAU,GAAG,mBAAI,cAAJ,EAAoBD,IAApB,CAAnB;AACA,QAAME,SAAS,GAAG,CAACH,KAAD,gBAAS,6BAAC,8CAAD;AAAc,IAAA,SAAS,EAAEI,eAAMD,SAA/B;AAA0C,IAAA,KAAK,EAAED;AAAjD,IAAT,GAA2E,IAA7F;AAEA,sBACE;AACE,IAAA,SAAS,EAAEE,eAAMJ,KADnB;AAEE,IAAA,KAAK,EAAE;AACLK,MAAAA,eAAe,EAAEL,KAAK,GAAI,QAAOA,KAAM,IAAjB,GAAuB;AADxC,KAFT;AAKE,iBAAU;AALZ,KAOGG,SAPH,CADF;AAWD,CAfD;;AAiBAJ,gBAAgB,CAACO,YAAjB,GAAgC;AAC9BL,EAAAA,IAAI,EAAEM,kBAASC,iBAAT,CAA2BP;AADH,CAAhC;AAIAF,gBAAgB,CAACU,SAAjB,2CAA6B;AAC3BT,EAAAA,KAAK,EAAEU,mBAAUC;AADU,CAA7B;eAGeZ,gB","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyPictures as PicturesIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\n\nimport style from './style.css';\n\nconst CardImagePreview = ({image}, {skin}) => {\n const whiteColor = get('common.white', skin);\n const emptyIcon = !image ? <PicturesIcon className={style.emptyIcon} color={whiteColor} /> : null;\n\n return (\n <div\n className={style.image}\n style={{\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n data-name=\"card-image-preview\"\n >\n {emptyIcon}\n </div>\n );\n};\n\nCardImagePreview.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCardImagePreview.propTypes = {\n image: PropTypes.string\n};\nexport default CardImagePreview;\n"],"file":"index.js"}
@@ -0,0 +1,34 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value cm_orange_200 from colors;
3
+
4
+ @keyframes fadeIn {
5
+ 0% {
6
+ opacity: 0;
7
+ }
8
+
9
+ 100% {
10
+ opacity: 1;
11
+ }
12
+ }
13
+
14
+ .image {
15
+ box-sizing: border-box;
16
+ overflow: hidden;
17
+ width: 56px;
18
+ height: 56px;
19
+ position: relative;
20
+ animation: fadeIn 1s ease-out forwards;
21
+ border-radius: 7px;
22
+ background-position: 50%;
23
+ background-size: cover;
24
+ background-color: cm_orange_200;
25
+ }
26
+
27
+ .emptyIcon {
28
+ width: 33px;
29
+ height: 27px;
30
+ position: absolute;
31
+ top: 50%;
32
+ left: 50%;
33
+ transform: translate(-50%, -50%);
34
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _default = {
6
+ props: {
7
+ image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90'
8
+ }
9
+ };
10
+ exports.default = _default;
11
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/card-image-preview/test/fixtures/default.js"],"names":["props","image"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EACH;AAFG;AADM,C","sourcesContent":["export default {\n props: {\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90'\n }\n};\n"],"file":"default.js"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _default = {
6
+ props: {}
7
+ };
8
+ exports.default = _default;
9
+ //# sourceMappingURL=empty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/card-image-preview/test/fixtures/empty.js"],"names":["props"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AADM,C","sourcesContent":["export default {\n props: {}\n};\n"],"file":"empty.js"}
@@ -140,11 +140,12 @@
140
140
  }
141
141
 
142
142
  .coorpmanager .checkbox:disabled ~ label {
143
- background: light;
144
- border-color: light;
143
+ border-color: cm_grey_200;
145
144
  pointer-events: none;
145
+ background: cm_grey_200;
146
+ opacity: 0.4;
146
147
  }
147
148
 
148
149
  .coorpmanager .checkbox:disabled ~ label::after {
149
- background: medium;
150
+ background: white;
150
151
  }
@@ -2,19 +2,16 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
-
6
- var _checked = _interopRequireDefault(require("./checked"));
7
-
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
-
10
- function _extends() { _extends = Object.assign || 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); }
11
-
12
5
  var _default = {
13
- props: _extends(_extends({}, _checked.default.props), {}, {
6
+ props: {
7
+ type: 'switch',
8
+ title: 'Name',
9
+ value: false,
14
10
  disabled: true,
11
+ onChange: value => console.log(value),
15
12
  titlePosition: 'right',
16
13
  theme: 'coorpmanager'
17
- })
14
+ }
18
15
  };
19
16
  exports.default = _default;
20
17
  //# sourceMappingURL=cm-right-disabled.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/atom/input-switch/test/fixtures/cm-right-disabled.js"],"names":["props","checked","disabled","titlePosition","theme"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,wBACAC,iBAAQD,KADR;AAEHE,IAAAA,QAAQ,EAAE,IAFP;AAGHC,IAAAA,aAAa,EAAE,OAHZ;AAIHC,IAAAA,KAAK,EAAE;AAJJ;AADQ,C","sourcesContent":["import checked from './checked';\n\nexport default {\n props: {\n ...checked.props,\n disabled: true,\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n};\n"],"file":"cm-right-disabled.js"}
1
+ {"version":3,"sources":["../../../../../src/atom/input-switch/test/fixtures/cm-right-disabled.js"],"names":["props","type","title","value","disabled","onChange","console","log","titlePosition","theme"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,QADD;AAELC,IAAAA,KAAK,EAAE,MAFF;AAGLC,IAAAA,KAAK,EAAE,KAHF;AAILC,IAAAA,QAAQ,EAAE,IAJL;AAKLC,IAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CALd;AAMLK,IAAAA,aAAa,EAAE,OANV;AAOLC,IAAAA,KAAK,EAAE;AAPF;AADM,C","sourcesContent":["export default {\n props: {\n type: 'switch',\n title: 'Name',\n value: false,\n disabled: true,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n};\n"],"file":"cm-right-disabled.js"}
@@ -16,8 +16,6 @@ var _arabic = _interopRequireDefault(require("./fixtures/arabic"));
16
16
 
17
17
  var _article = _interopRequireDefault(require("./fixtures/article"));
18
18
 
19
- var _coorpmanager = _interopRequireDefault(require("./fixtures/coorpmanager"));
20
-
21
19
  var _default = _interopRequireDefault(require("./fixtures/default"));
22
20
 
23
21
  var _disabled = _interopRequireDefault(require("./fixtures/disabled"));
@@ -54,7 +52,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
54
52
  (0, _ava.default)('Molecule › MoleculeCard › Adaptiv › should be rendered', _renderComponent.default, _.default, _adaptiv.default);
55
53
  (0, _ava.default)('Molecule › MoleculeCard › Arabic › should be rendered', _renderComponent.default, _.default, _arabic.default);
56
54
  (0, _ava.default)('Molecule › MoleculeCard › Article › should be rendered', _renderComponent.default, _.default, _article.default);
57
- (0, _ava.default)('Molecule › MoleculeCard › Coorpmanager › should be rendered', _renderComponent.default, _.default, _coorpmanager.default);
58
55
  (0, _ava.default)('Molecule › MoleculeCard › Default › should be rendered', _renderComponent.default, _.default, _default.default);
59
56
  (0, _ava.default)('Molecule › MoleculeCard › Disabled › should be rendered', _renderComponent.default, _.default, _disabled.default);
60
57
  (0, _ava.default)('Molecule › MoleculeCard › Empty › should be rendered', _renderComponent.default, _.default, _empty.default);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["t","pass","MoleculeCard","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureCoorpmanager","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,uDAAL,EAA8DA,CAAC,IAAI;AACjEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAaC,SAArB,EAAgC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC9CL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,iDAAgDF,GAAI,mEAA7E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mEAAL,EAA0EG,wBAA1E,EAAgGN,SAAhG,EAA8GO,2BAA9G;AACA,kBAAK,wDAAL,EAA+DD,wBAA/D,EAAqFN,SAArF,EAAmGQ,gBAAnG;AACA,kBAAK,uDAAL,EAA8DF,wBAA9D,EAAoFN,SAApF,EAAkGS,eAAlG;AACA,kBAAK,wDAAL,EAA+DH,wBAA/D,EAAqFN,SAArF,EAAmGU,gBAAnG;AACA,kBAAK,6DAAL,EAAoEJ,wBAApE,EAA0FN,SAA1F,EAAwGW,qBAAxG;AACA,kBAAK,wDAAL,EAA+DL,wBAA/D,EAAqFN,SAArF,EAAmGY,gBAAnG;AACA,kBAAK,yDAAL,EAAgEN,wBAAhE,EAAsFN,SAAtF,EAAoGa,iBAApG;AACA,kBAAK,sDAAL,EAA6DP,wBAA7D,EAAmFN,SAAnF,EAAiGc,cAAjG;AACA,kBAAK,gEAAL,EAAuER,wBAAvE,EAA6FN,SAA7F,EAA2Ge,wBAA3G;AACA,kBAAK,yDAAL,EAAgET,wBAAhE,EAAsFN,SAAtF,EAAoGgB,iBAApG;AACA,kBAAK,mEAAL,EAA0EV,wBAA1E,EAAgGN,SAAhG,EAA8GiB,2BAA9G;AACA,kBAAK,wDAAL,EAA+DX,wBAA/D,EAAqFN,SAArF,EAAmGkB,gBAAnG;AACA,kBAAK,wDAAL,EAA+DZ,wBAA/D,EAAqFN,SAArF,EAAmGmB,gBAAnG;AACA,kBAAK,sDAAL,EAA6Db,wBAA7D,EAAmFN,SAAnF,EAAiGoB,cAAjG;AACA,kBAAK,gEAAL,EAAuEd,wBAAvE,EAA6FN,SAA7F,EAA2GqB,wBAA3G;AACA,kBAAK,+DAAL,EAAsEf,wBAAtE,EAA4FN,SAA5F,EAA0GsB,uBAA1G;AACA,kBAAK,sDAAL,EAA6DhB,wBAA7D,EAAmFN,SAAnF,EAAiGuB,cAAjG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCard from '..';\nimport fixtureAdaptivAndDisabled from './fixtures/adaptiv-and-disabled';\nimport fixtureAdaptiv from './fixtures/adaptiv';\nimport fixtureArabic from './fixtures/arabic';\nimport fixtureArticle from './fixtures/article';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureExternalContent from './fixtures/external-content';\nimport fixtureFavorite from './fixtures/favorite';\nimport fixtureFreerunAndDisabled from './fixtures/freerun-and-disabled';\nimport fixtureFreerun from './fixtures/freerun';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureSelectableFalse from './fixtures/selectable-false';\nimport fixtureSelectableTrue from './fixtures/selectable-true';\nimport fixtureVideo from './fixtures/video';\n\ntest('Molecule › MoleculeCard > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCard.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCard.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptivAndDisabled);\ntest('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);\ntest('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);\ntest('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);\ntest('Molecule › MoleculeCard › Coorpmanager › should be rendered', renderComponentMacro, MoleculeCard, fixtureCoorpmanager);\ntest('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);\ntest('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);\ntest('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);\ntest('Molecule › MoleculeCard › ExternalContent › should be rendered', renderComponentMacro, MoleculeCard, fixtureExternalContent);\ntest('Molecule › MoleculeCard › Favorite › should be rendered', renderComponentMacro, MoleculeCard, fixtureFavorite);\ntest('Molecule › MoleculeCard › FreerunAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerunAndDisabled);\ntest('Molecule › MoleculeCard › Freerun › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerun);\ntest('Molecule › MoleculeCard › Podcast › should be rendered', renderComponentMacro, MoleculeCard, fixturePodcast);\ntest('Molecule › MoleculeCard › Scorm › should be rendered', renderComponentMacro, MoleculeCard, fixtureScorm);\ntest('Molecule › MoleculeCard › SelectableFalse › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableFalse);\ntest('Molecule › MoleculeCard › SelectableTrue › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableTrue);\ntest('Molecule › MoleculeCard › Video › should be rendered', renderComponentMacro, MoleculeCard, fixtureVideo);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["t","pass","MoleculeCard","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,uDAAL,EAA8DA,CAAC,IAAI;AACjEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAaC,SAArB,EAAgC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC9CL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,iDAAgDF,GAAI,mEAA7E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mEAAL,EAA0EG,wBAA1E,EAAgGN,SAAhG,EAA8GO,2BAA9G;AACA,kBAAK,wDAAL,EAA+DD,wBAA/D,EAAqFN,SAArF,EAAmGQ,gBAAnG;AACA,kBAAK,uDAAL,EAA8DF,wBAA9D,EAAoFN,SAApF,EAAkGS,eAAlG;AACA,kBAAK,wDAAL,EAA+DH,wBAA/D,EAAqFN,SAArF,EAAmGU,gBAAnG;AACA,kBAAK,wDAAL,EAA+DJ,wBAA/D,EAAqFN,SAArF,EAAmGW,gBAAnG;AACA,kBAAK,yDAAL,EAAgEL,wBAAhE,EAAsFN,SAAtF,EAAoGY,iBAApG;AACA,kBAAK,sDAAL,EAA6DN,wBAA7D,EAAmFN,SAAnF,EAAiGa,cAAjG;AACA,kBAAK,gEAAL,EAAuEP,wBAAvE,EAA6FN,SAA7F,EAA2Gc,wBAA3G;AACA,kBAAK,yDAAL,EAAgER,wBAAhE,EAAsFN,SAAtF,EAAoGe,iBAApG;AACA,kBAAK,mEAAL,EAA0ET,wBAA1E,EAAgGN,SAAhG,EAA8GgB,2BAA9G;AACA,kBAAK,wDAAL,EAA+DV,wBAA/D,EAAqFN,SAArF,EAAmGiB,gBAAnG;AACA,kBAAK,wDAAL,EAA+DX,wBAA/D,EAAqFN,SAArF,EAAmGkB,gBAAnG;AACA,kBAAK,sDAAL,EAA6DZ,wBAA7D,EAAmFN,SAAnF,EAAiGmB,cAAjG;AACA,kBAAK,gEAAL,EAAuEb,wBAAvE,EAA6FN,SAA7F,EAA2GoB,wBAA3G;AACA,kBAAK,+DAAL,EAAsEd,wBAAtE,EAA4FN,SAA5F,EAA0GqB,uBAA1G;AACA,kBAAK,sDAAL,EAA6Df,wBAA7D,EAAmFN,SAAnF,EAAiGsB,cAAjG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCard from '..';\nimport fixtureAdaptivAndDisabled from './fixtures/adaptiv-and-disabled';\nimport fixtureAdaptiv from './fixtures/adaptiv';\nimport fixtureArabic from './fixtures/arabic';\nimport fixtureArticle from './fixtures/article';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureExternalContent from './fixtures/external-content';\nimport fixtureFavorite from './fixtures/favorite';\nimport fixtureFreerunAndDisabled from './fixtures/freerun-and-disabled';\nimport fixtureFreerun from './fixtures/freerun';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureSelectableFalse from './fixtures/selectable-false';\nimport fixtureSelectableTrue from './fixtures/selectable-true';\nimport fixtureVideo from './fixtures/video';\n\ntest('Molecule › MoleculeCard > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCard.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCard.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptivAndDisabled);\ntest('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);\ntest('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);\ntest('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);\ntest('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);\ntest('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);\ntest('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);\ntest('Molecule › MoleculeCard › ExternalContent › should be rendered', renderComponentMacro, MoleculeCard, fixtureExternalContent);\ntest('Molecule › MoleculeCard › Favorite › should be rendered', renderComponentMacro, MoleculeCard, fixtureFavorite);\ntest('Molecule › MoleculeCard › FreerunAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerunAndDisabled);\ntest('Molecule › MoleculeCard › Freerun › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerun);\ntest('Molecule › MoleculeCard › Podcast › should be rendered', renderComponentMacro, MoleculeCard, fixturePodcast);\ntest('Molecule › MoleculeCard › Scorm › should be rendered', renderComponentMacro, MoleculeCard, fixtureScorm);\ntest('Molecule › MoleculeCard › SelectableFalse › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableFalse);\ntest('Molecule › MoleculeCard › SelectableTrue › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableTrue);\ntest('Molecule › MoleculeCard › Video › should be rendered', renderComponentMacro, MoleculeCard, fixtureVideo);\n"],"file":"fixtures.js"}
@@ -236,7 +236,7 @@
236
236
  font-size: 14px;
237
237
  color: black;
238
238
  height: 44px;
239
- padding: 11px 85px 11px 16px;
239
+ padding: 11px 45px 11px 16px;
240
240
  background-color: cm_grey_100;
241
241
  overflow: visible;
242
242
  }
@@ -30,7 +30,7 @@
30
30
  flex-direction: column;
31
31
  padding: 24px 24px 24px 8px;
32
32
  width: 100%;
33
- align-items: end;
33
+ align-items: flex-end;
34
34
  margin-left: 240px;
35
35
  }
36
36
 
@@ -50,4 +50,4 @@
50
50
 
51
51
  .binButton:hover {
52
52
  color: cm_negative_200;
53
- }
53
+ }
@@ -3,6 +3,10 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
 
6
+ var _kebabCase2 = _interopRequireDefault(require("lodash/fp/kebabCase"));
7
+
8
+ var _get2 = _interopRequireDefault(require("lodash/fp/get"));
9
+
6
10
  var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
7
11
 
8
12
  var _react = _interopRequireDefault(require("react"));
@@ -33,10 +37,12 @@ const buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages, isLo
33
37
  }
34
38
 
35
39
  const items = courses.map((card, index) => {
40
+ const title = (0, _get2.default)('title', card);
41
+ const type = (0, _get2.default)('type', card);
36
42
  return /*#__PURE__*/_react.default.createElement("li", {
37
43
  className: _style.default.cards,
38
44
  key: `card-${index}`,
39
- "data-name": `course-${index}`
45
+ "data-name": `${type}-${(0, _kebabCase2.default)(title)}`
40
46
  }, /*#__PURE__*/_react.default.createElement(_card.default, card));
41
47
  });
42
48
  return /*#__PURE__*/_react.default.createElement("ul", {
@@ -66,7 +72,8 @@ const CourseSelection = props => {
66
72
  }))), /*#__PURE__*/_react.default.createElement("div", {
67
73
  className: _style.default.contentFilter
68
74
  }, /*#__PURE__*/_react.default.createElement(_selectMultiple.default, contentTypeFilter)), /*#__PURE__*/_react.default.createElement(_inputSwitch.default, switchButton)), /*#__PURE__*/_react.default.createElement("div", {
69
- className: _style.default.cardsContainer
75
+ className: _style.default.cardsContainer,
76
+ "data-name": 'courses-result'
70
77
  }, isLoading ? /*#__PURE__*/_react.default.createElement("div", {
71
78
  className: _style.default.loader
72
79
  }, /*#__PURE__*/_react.default.createElement(_loader.default, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/organism/course-selection/index.js"],"names":["buildResultView","courses","coursesSelectionAriaLabel","emptyMessages","isLoading","items","map","card","index","style","cards","CourseSelection","props","search","contentTypeFilter","switchButton","resultView","container","filters","contentFilter","cardsContainer","loader","propTypes","PropTypes","shape","Search","bool","SelectMultiple","arrayOf","Card","string","firstMessage","secondMessage","InputSwitch"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,eAAe,GAAG,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,EAAoDC,SAApD,KAAkE;AACxF,MAAI,CAACA,SAAD,IAAc,uBAAQH,OAAR,CAAlB,EAAoC;AAClC,wBAAO,6BAAC,0BAAD,EAAuBE,aAAvB,CAAP;AACD;;AAED,QAAME,KAAK,GAAGJ,OAAO,CAACK,GAAR,CAAY,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACzC,wBACE;AAAI,MAAA,SAAS,EAAEC,eAAMC,KAArB;AAA4B,MAAA,GAAG,EAAG,QAAOF,KAAM,EAA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AAES,mBAAUC,KAAV,CAAgBG,wBAAeJ,SAA/B,CAHO;AAI1BtB,EAAAA,OAAO,EAAEsB,mBAAUK,OAAV,CAAkBL,mBAAUC,KAAV,CAAgBK,cAAKP,SAArB,CAAlB,CAJiB;AAK1B,kCAAgCC,mBAAUO,MALhB;AAM1B3B,EAAAA,aAAa,EAAEoB,mBAAUC,KAAV,CAAgB;AAC7BO,IAAAA,YAAY,EAAER,mBAAUO,MADK;AAE7BE,IAAAA,aAAa,EAAET,mBAAUO;AAFI,GAAhB,CANW;AAU1Bf,EAAAA,YAAY,EAAEQ,mBAAUC,KAAV,CAAgBS,qBAAYV,SAA5B;AAVY,CAA5B;eAaeZ,e","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport EmptySearchResult from '../../atom/empty-search-result';\nimport Search from '../../atom/input-search';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport Card from '../../molecule/card';\nimport InputSwitch from '../../atom/input-switch';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages, isLoading) => {\n if (!isLoading && isEmpty(courses)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = courses.map((card, index) => {\n return (\n <li className={style.cards} key={`card-${index}`} data-name={`course-${index}`}>\n <Card {...card} />\n </li>\n );\n });\n\n return <ul aria-label={coursesSelectionAriaLabel}>{items}</ul>;\n};\n\nconst CourseSelection = props => {\n const {\n search,\n contentTypeFilter,\n courses,\n emptyMessages,\n isLoading = false,\n 'courses-selection-aria-label': coursesSelectionAriaLabel,\n switchButton\n } = props;\n\n const resultView = buildResultView(courses, coursesSelectionAriaLabel, emptyMessages, isLoading);\n\n return (\n <div className={style.container}>\n <div className={style.filters}>\n <div className={style.search}>\n <Search {...search} theme=\"coorpmanager\" />\n </div>\n <div className={style.contentFilter}>\n <SelectMultiple {...contentTypeFilter} />\n </div>\n <InputSwitch {...switchButton} />\n </div>\n <div className={style.cardsContainer}>\n {isLoading ? (\n <div className={style.loader}>\n <Loader theme=\"coorpmanager\" />\n </div>\n ) : (\n resultView\n )}\n </div>\n </div>\n );\n};\n\nCourseSelection.propTypes = {\n search: PropTypes.shape(Search.PropTypes),\n isLoading: PropTypes.bool,\n contentTypeFilter: PropTypes.shape(SelectMultiple.PropTypes),\n courses: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),\n 'courses-selection-aria-label': PropTypes.string,\n emptyMessages: PropTypes.shape({\n firstMessage: PropTypes.string,\n secondMessage: PropTypes.string\n }),\n switchButton: PropTypes.shape(InputSwitch.PropTypes)\n};\n\nexport default CourseSelection;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/organism/course-selection/index.js"],"names":["buildResultView","courses","coursesSelectionAriaLabel","emptyMessages","isLoading","items","map","card","index","title","type","style","cards","CourseSelection","props","search","contentTypeFilter","switchButton","resultView","container","filters","contentFilter","cardsContainer","loader","propTypes","PropTypes","shape","Search","bool","SelectMultiple","arrayOf","Card","string","firstMessage","secondMessage","InputSwitch"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,eAAe,GAAG,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,EAAoDC,SAApD,KAAkE;AACxF,MAAI,CAACA,SAAD,IAAc,uBAAQH,OAAR,CAAlB,EAAoC;AAClC,wBAAO,6BAAC,0BAAD,EAAuBE,aAAvB,CAAP;AACD;;AAED,QAAME,KAAK,GAAGJ,OAAO,CAACK,GAAR,CAAY,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACzC,UAAMC,KAAK,GAAG,mBAAI,OAAJ,EAAaF,IAAb,CAAd;AACA,UAAMG,IAAI,GAAG,mBAAI,MAAJ,EAAYH,IAAZ,CAAb;AACA,wBACE;AAAI,MAAA,SAAS,EAAEI,eAAMC,KAArB;AAA4B,MAAA,GAAG,EAAG,QAAOJ,K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AAAA,SAAS,EAAEqB,mBAAUG,IAFK;AAG1BZ,EAAAA,iBAAiB,EAAES,mBAAUC,KAAV,CAAgBG,wBAAeJ,SAA/B,CAHO;AAI1BxB,EAAAA,OAAO,EAAEwB,mBAAUK,OAAV,CAAkBL,mBAAUC,KAAV,CAAgBK,cAAKP,SAArB,CAAlB,CAJiB;AAK1B,kCAAgCC,mBAAUO,MALhB;AAM1B7B,EAAAA,aAAa,EAAEsB,mBAAUC,KAAV,CAAgB;AAC7BO,IAAAA,YAAY,EAAER,mBAAUO,MADK;AAE7BE,IAAAA,aAAa,EAAET,mBAAUO;AAFI,GAAhB,CANW;AAU1Bf,EAAAA,YAAY,EAAEQ,mBAAUC,KAAV,CAAgBS,qBAAYV,SAA5B;AAVY,CAA5B;eAaeZ,e","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, get, kebabCase} from 'lodash/fp';\nimport EmptySearchResult from '../../atom/empty-search-result';\nimport Search from '../../atom/input-search';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport Card from '../../molecule/card';\nimport InputSwitch from '../../atom/input-switch';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages, isLoading) => {\n if (!isLoading && isEmpty(courses)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = courses.map((card, index) => {\n const title = get('title', card);\n const type = get('type', card);\n return (\n <li className={style.cards} key={`card-${index}`} data-name={`${type}-${kebabCase(title)}`}>\n <Card {...card} />\n </li>\n );\n });\n\n return <ul aria-label={coursesSelectionAriaLabel}>{items}</ul>;\n};\n\nconst CourseSelection = props => {\n const {\n search,\n contentTypeFilter,\n courses,\n emptyMessages,\n isLoading = false,\n 'courses-selection-aria-label': coursesSelectionAriaLabel,\n switchButton\n } = props;\n\n const resultView = buildResultView(courses, coursesSelectionAriaLabel, emptyMessages, isLoading);\n\n return (\n <div className={style.container}>\n <div className={style.filters}>\n <div className={style.search}>\n <Search {...search} theme=\"coorpmanager\" />\n </div>\n <div className={style.contentFilter}>\n <SelectMultiple {...contentTypeFilter} />\n </div>\n <InputSwitch {...switchButton} />\n </div>\n <div className={style.cardsContainer} data-name={'courses-result'}>\n {isLoading ? (\n <div className={style.loader}>\n <Loader theme=\"coorpmanager\" />\n </div>\n ) : (\n resultView\n )}\n </div>\n </div>\n );\n};\n\nCourseSelection.propTypes = {\n search: PropTypes.shape(Search.PropTypes),\n isLoading: PropTypes.bool,\n contentTypeFilter: PropTypes.shape(SelectMultiple.PropTypes),\n courses: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),\n 'courses-selection-aria-label': PropTypes.string,\n emptyMessages: PropTypes.shape({\n firstMessage: PropTypes.string,\n secondMessage: PropTypes.string\n }),\n switchButton: PropTypes.shape(InputSwitch.PropTypes)\n};\n\nexport default CourseSelection;\n"],"file":"index.js"}
@@ -15,12 +15,13 @@
15
15
 
16
16
  .search {
17
17
  width: 41%;
18
- min-width: 309px;
18
+ margin-right: 16px;
19
19
  }
20
20
 
21
21
  .contentFilter {
22
22
  width: 24%;
23
23
  min-width: 181px;
24
+ margin-right: 16px;
24
25
  }
25
26
 
26
27
  .cardsContainer {
@@ -39,7 +39,7 @@ var _default = {
39
39
  options: [{
40
40
  name: 'Course',
41
41
  value: 'course',
42
- selected: true
42
+ selected: false
43
43
  }, {
44
44
  name: "5' learning",
45
45
  value: 'chapter',
@@ -47,7 +47,7 @@ var _default = {
47
47
  }, {
48
48
  name: 'Interactive slides',
49
49
  value: 'scorm',
50
- selected: false
50
+ selected: true
51
51
  }, {
52
52
  name: 'Video',
53
53
  value: 'video',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/default.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","isLoading","contentTypeFilter","type","theme","size","options","name","selected","multiple","courses","SelectedCard","progress","undefined","UnSelectedCard","Article","isSelected","Chaptercard","favorite","Scorm","ExternalContent","switchButton","titlePosition"],"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AZ,CAJP;AAKZ0B,MAAAA,aAAa,EAAE,OALH;AAMZlB,MAAAA,KAAK,EAAE;AANK;AA3ET;AADM,C","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\nimport Chaptercard from '../../../../molecule/card/test/fixtures/freerun';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n isLoading: false,\n contentTypeFilter: {\n type: 'selectMultiple',\n title: 'Content type',\n placeholder: 'Content type',\n description: 'This filters the courses',\n theme: 'coorpmanager',\n size: 'default',\n options: [\n {\n name: 'Course',\n value: 'course',\n selected: true\n },\n {\n name: \"5' learning\",\n value: 'chapter',\n selected: false\n },\n {\n name: 'Interactive slides',\n value: 'scorm',\n selected: false\n },\n {\n name: 'Video',\n value: 'video',\n selected: false\n }\n ],\n multiple: false\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n {...SelectedCard.props, theme: 'coorpmanager', progress: undefined},\n {...UnSelectedCard.props, theme: 'coorpmanager', progress: undefined},\n {...Article.props, isSelected: false, theme: 'coorpmanager', progress: undefined},\n {\n ...Chaptercard.props,\n theme: 'coorpmanager',\n progress: undefined,\n isSelected: false,\n favorite: false\n },\n {...Scorm.props, isSelected: true, theme: 'coorpmanager', progress: undefined},\n {\n ...UnSelectedCard.props,\n isSelected: false,\n title: 'Standard course',\n theme: 'coorpmanager',\n progress: undefined\n },\n {\n ...ExternalContent.props,\n isSelected: false,\n title: 'External course',\n theme: 'coorpmanager',\n progress: undefined\n },\n {\n ...Scorm.props,\n isSelected: false,\n title: 'Scorm course',\n theme: 'coorpmanager',\n progress: undefined\n }\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"default.js"}
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/default.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","isLoading","contentTypeFilter","type","theme","size","options","name","selected","multiple","courses","SelectedCard","progress","undefined","UnSelectedCard","Article","isSelected","Chaptercard","favorite","Scorm","ExternalContent","switchButton","titlePosition"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQLK,IAAAA,SAAS,EAAE,KARN;AASLC,IAAAA,iBAAiB,EAAE;AACjBC,MAAAA,IAAI,EAAE,gBADW;AAEjBT,MAAAA,KAAK,EAAE,cAFU;AAGjBC,MAAAA,WAAW,EAAE,cAHI;AAIjBE,MAAAA,WAAW,EAAE,0BAJI;AAKjBO,MAAAA,KAAK,EAAE,cALU;AAMjBC,MAAAA,IAAI,EAAE,SANW;AAOjBC,MAAAA,OAAO,EAAE,CACP;AACEC,QAAAA,IAAI,EAAE,QADR;AAEEX,QAAAA,KAAK,EAAE,QAFT;AAGEY,QAAAA,QAAQ,EAAE;AAHZ,OADO,EAMP;AACED,QAAAA,IAAI,EAAE,aADR;AAEEX,QAAAA,KAAK,EAAE,SAFT;AAGEY,QAAAA,QAAQ,EAAE;AAHZ,OANO,EAWP;AACED,QAAAA,IAAI,EAAE,oBADR;AAEEX,QAAAA,KAAK,EAAE,OAFT;AAGEY,QAAAA,QAAQ,EAAE;AAHZ,OAXO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AA,KAAK,EAAE,cA7BF;AA8BLU,MAAAA,KAAK,EAAE,cA9BF;AA+BLQ,MAAAA,QAAQ,EAAEC;AA/BL,OAzCJ;AA2ELQ,IAAAA,YAAY,EAAE;AACZlB,MAAAA,IAAI,EAAE,QADM;AAEZT,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZ0B,MAAAA,aAAa,EAAE,OALH;AAMZlB,MAAAA,KAAK,EAAE;AANK;AA3ET;AADM,C","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\nimport Chaptercard from '../../../../molecule/card/test/fixtures/freerun';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n isLoading: false,\n contentTypeFilter: {\n type: 'selectMultiple',\n title: 'Content type',\n placeholder: 'Content type',\n description: 'This filters the courses',\n theme: 'coorpmanager',\n size: 'default',\n options: [\n {\n name: 'Course',\n value: 'course',\n selected: false\n },\n {\n name: \"5' learning\",\n value: 'chapter',\n selected: false\n },\n {\n name: 'Interactive slides',\n value: 'scorm',\n selected: true\n },\n {\n name: 'Video',\n value: 'video',\n selected: false\n }\n ],\n multiple: false\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n {...SelectedCard.props, theme: 'coorpmanager', progress: undefined},\n {...UnSelectedCard.props, theme: 'coorpmanager', progress: undefined},\n {...Article.props, isSelected: false, theme: 'coorpmanager', progress: undefined},\n {\n ...Chaptercard.props,\n theme: 'coorpmanager',\n progress: undefined,\n isSelected: false,\n favorite: false\n },\n {...Scorm.props, isSelected: true, theme: 'coorpmanager', progress: undefined},\n {\n ...UnSelectedCard.props,\n isSelected: false,\n title: 'Standard course',\n theme: 'coorpmanager',\n progress: undefined\n },\n {\n ...ExternalContent.props,\n isSelected: false,\n title: 'External course',\n theme: 'coorpmanager',\n progress: undefined\n },\n {\n ...Scorm.props,\n isSelected: false,\n title: 'Scorm course',\n theme: 'coorpmanager',\n progress: undefined\n }\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"default.js"}
@@ -32,7 +32,7 @@ var _default = {
32
32
  })],
33
33
  switchButton: {
34
34
  type: 'switch',
35
- title: 'Show selected courses only',
35
+ title: 'Show selected only',
36
36
  value: false,
37
37
  onChange: value => console.log(value),
38
38
  titlePosition: 'right',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/filtered.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","courses","SelectedCard","Scorm","isSelected","UnSelectedCard","Article","switchButton","type","titlePosition","theme"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,MAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPC,wBAAaV,KADN,wBAEHW,eAAMX,KAFH;AAEUY,MAAAA,UAAU,EAAE;AAFtB,QAGPF,wBAAaV,KAHN,EAIPa,yBAAeb,KAJR,wBAKHc,iBAAQd,KALL;AAKYY,MAAAA,UAAU,EAAE;AALxB,OATJ;AAgBLG,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZd,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZa,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,KAAK,EAAE;AANK;AAhBT;AADM,C","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'from',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false}\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"filtered.js"}
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/filtered.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","courses","SelectedCard","Scorm","isSelected","UnSelectedCard","Article","switchButton","type","titlePosition","theme"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,MAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPC,wBAAaV,KADN,wBAEHW,eAAMX,KAFH;AAEUY,MAAAA,UAAU,EAAE;AAFtB,QAGPF,wBAAaV,KAHN,EAIPa,yBAAeb,KAJR,wBAKHc,iBAAQd,KALL;AAKYY,MAAAA,UAAU,EAAE;AALxB,OATJ;AAgBLG,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZd,MAAAA,KAAK,EAAE,oBAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZa,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,KAAK,EAAE;AANK;AAhBT;AADM,C","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'from',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false}\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"filtered.js"}
@@ -40,7 +40,7 @@ var _default = {
40
40
  })],
41
41
  switchButton: {
42
42
  type: 'switch',
43
- title: 'Show selected courses only',
43
+ title: 'Show selected only',
44
44
  value: false,
45
45
  onChange: value => console.log(value),
46
46
  titlePosition: 'right',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/sorted-selected.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","courses","SelectedCard","Scorm","isSelected","UnSelectedCard","Article","ExternalContent","switchButton","type","titlePosition","theme"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPC,wBAAaV,KADN,wBAEHW,eAAMX,KAFH;AAEUY,MAAAA,UAAU,EAAE;AAFtB,QAGPF,wBAAaV,KAHN,EAIPa,yBAAeb,KAJR,wBAKHc,iBAAQd,KALL;AAKYY,MAAAA,UAAU,EAAE;AALxB,8BAMHC,yBAAeb,KANZ;AAMmBY,MAAAA,UAAU,EAAE;AAN/B,8BAOHG,yBAAgBf,KAPb;AAOoBY,MAAAA,UAAU,EAAE;AAPhC,8BAQHD,eAAMX,KARH;AAQUY,MAAAA,UAAU,EAAE;AARtB,OATJ;AAmBLI,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZf,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZc,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,KAAK,EAAE;AANK;AAnBT;AADM,C","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n {...UnSelectedCard.props, isSelected: false},\n {...ExternalContent.props, isSelected: false},\n {...Scorm.props, isSelected: false}\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"sorted-selected.js"}
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/sorted-selected.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","courses","SelectedCard","Scorm","isSelected","UnSelectedCard","Article","ExternalContent","switchButton","type","titlePosition","theme"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPC,wBAAaV,KADN,wBAEHW,eAAMX,KAFH;AAEUY,MAAAA,UAAU,EAAE;AAFtB,QAGPF,wBAAaV,KAHN,EAIPa,yBAAeb,KAJR,wBAKHc,iBAAQd,KALL;AAKYY,MAAAA,UAAU,EAAE;AALxB,8BAMHC,yBAAeb,KANZ;AAMmBY,MAAAA,UAAU,EAAE;AAN/B,8BAOHG,yBAAgBf,KAPb;AAOoBY,MAAAA,UAAU,EAAE;AAPhC,8BAQHD,eAAMX,KARH;AAQUY,MAAAA,UAAU,EAAE;AARtB,OATJ;AAmBLI,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZf,MAAAA,KAAK,EAAE,oBAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZc,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,KAAK,EAAE;AANK;AAnBT;AADM,C","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n {...UnSelectedCard.props, isSelected: false},\n {...ExternalContent.props, isSelected: false},\n {...Scorm.props, isSelected: false}\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"sorted-selected.js"}
@@ -20,7 +20,7 @@ var _default = {
20
20
  courses: [_selectableTrue.default.props, _selectableTrue.default.props],
21
21
  switchButton: {
22
22
  type: 'switch',
23
- title: 'Show selected courses only',
23
+ title: 'Show selected only',
24
24
  value: true,
25
25
  onChange: value => console.log(value),
26
26
  titlePosition: 'right',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/switch-activated.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","courses","SelectedCard","switchButton","type","titlePosition","theme"],"mappings":";;;;;AAAA;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,wBAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CAACC,wBAAaV,KAAd,EAAqBU,wBAAaV,KAAlC,CATJ;AAULW,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZV,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,IAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZS,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,KAAK,EAAE;AANK;AAVT;AADM,C","sourcesContent":["import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'from mass maket to one',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [SelectedCard.props, SelectedCard.props],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: true,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"switch-activated.js"}
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/switch-activated.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","courses","SelectedCard","switchButton","type","titlePosition","theme"],"mappings":";;;;;AAAA;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,wBAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CAACC,wBAAaV,KAAd,EAAqBU,wBAAaV,KAAlC,CATJ;AAULW,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZV,MAAAA,KAAK,EAAE,oBAFK;AAGZE,MAAAA,KAAK,EAAE,IAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZS,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,KAAK,EAAE;AANK;AAVT;AADM,C","sourcesContent":["import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'from mass maket to one',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [SelectedCard.props, SelectedCard.props],\n switchButton: {\n type: 'switch',\n title: 'Show selected only',\n value: true,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"switch-activated.js"}
@@ -40,7 +40,7 @@ var _default = {
40
40
  })],
41
41
  switchButton: {
42
42
  type: 'switch',
43
- title: 'Show selected courses only',
43
+ title: 'Show selected only',
44
44
  value: false,
45
45
  onChange: value => console.log(value),
46
46
  titlePosition: 'right',