@coorpacademy/components 11.2.12 → 11.2.13-alpha.2
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.
- package/es/atom/lottie-wrapper/index.d.ts.map +1 -1
- package/es/atom/lottie-wrapper/index.js +12 -32
- package/es/atom/lottie-wrapper/index.js.map +1 -1
- package/es/atom/lottie-wrapper/prop-types.d.ts +0 -4
- package/es/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
- package/es/atom/lottie-wrapper/prop-types.js +0 -2
- package/es/atom/lottie-wrapper/prop-types.js.map +1 -1
- package/es/atom/lottie-wrapper/style.css +0 -5
- package/es/molecule/questions/drop-down/index.js +2 -1
- package/es/molecule/questions/drop-down/index.js.map +1 -1
- package/es/molecule/questions/free-text/index.d.ts.map +1 -1
- package/es/molecule/questions/free-text/index.js +2 -1
- package/es/molecule/questions/free-text/index.js.map +1 -1
- package/es/molecule/questions/qcm/index.js +2 -1
- package/es/molecule/questions/qcm/index.js.map +1 -1
- package/es/molecule/questions/qcm-drag/index.js +2 -1
- package/es/molecule/questions/qcm-drag/index.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.js +2 -1
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/molecule/questions/question-range/index.js +2 -1
- package/es/molecule/questions/question-range/index.js.map +1 -1
- package/es/molecule/questions/template/index.js +2 -1
- package/es/molecule/questions/template/index.js.map +1 -1
- package/es/molecule/review-card-congrats/prop-types.d.ts +0 -2
- package/es/molecule/review-card-congrats/prop-types.d.ts.map +1 -1
- package/es/organism/review-congrats/prop-types.d.ts +0 -6
- package/es/organism/review-congrats/prop-types.d.ts.map +1 -1
- package/es/template/app-player/popin-end/summary.js +0 -1
- package/es/template/app-player/popin-end/summary.js.map +1 -1
- package/es/template/app-review/index.d.ts +0 -6
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +0 -6
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +0 -6
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/atom/lottie-wrapper/index.d.ts.map +1 -1
- package/lib/atom/lottie-wrapper/index.js +12 -33
- package/lib/atom/lottie-wrapper/index.js.map +1 -1
- package/lib/atom/lottie-wrapper/prop-types.d.ts +0 -4
- package/lib/atom/lottie-wrapper/prop-types.d.ts.map +1 -1
- package/lib/atom/lottie-wrapper/prop-types.js +0 -2
- package/lib/atom/lottie-wrapper/prop-types.js.map +1 -1
- package/lib/atom/lottie-wrapper/style.css +0 -5
- package/lib/molecule/questions/drop-down/index.js +2 -1
- package/lib/molecule/questions/drop-down/index.js.map +1 -1
- package/lib/molecule/questions/free-text/index.d.ts.map +1 -1
- package/lib/molecule/questions/free-text/index.js +2 -1
- package/lib/molecule/questions/free-text/index.js.map +1 -1
- package/lib/molecule/questions/qcm/index.js +2 -1
- package/lib/molecule/questions/qcm/index.js.map +1 -1
- package/lib/molecule/questions/qcm-drag/index.js +2 -1
- package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.js +2 -1
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/molecule/questions/question-range/index.js +2 -1
- package/lib/molecule/questions/question-range/index.js.map +1 -1
- package/lib/molecule/questions/template/index.js +2 -1
- package/lib/molecule/questions/template/index.js.map +1 -1
- package/lib/molecule/review-card-congrats/prop-types.d.ts +0 -2
- package/lib/molecule/review-card-congrats/prop-types.d.ts.map +1 -1
- package/lib/organism/review-congrats/prop-types.d.ts +0 -6
- package/lib/organism/review-congrats/prop-types.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/summary.js +0 -1
- package/lib/template/app-player/popin-end/summary.js.map +1 -1
- package/lib/template/app-review/index.d.ts +0 -6
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +0 -6
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +0 -6
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.js","names":["React","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","Provider","Button","Link","Discussion","Loader","Card","Feedback","CardsList","PopinHeader","AtomLottieWrapper","style","Header","props","SimpleAction","color","prefix","title","button","buttonTitle","linkProps","simpleWrapper","simpleTexts","simplePrefix","simpleTitle","innerHTML","__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","mode","primary","commentView","discussionWrapper","footerView","feedbackView","failed","summaryWrapper","BackgroundScorm","organismPlayerResultContainerScorm","animationContainer","className","undefined","animationSrc","loop","autoplay","rendererSettings","hideOnTransparent","animationClassName","ie11ImageBackup","animationControl","lottie","ie11Backup","background","largeCircle","mediumCircle","smallCircle","content","href","func","isRequired"],"sources":["../../../../src/template/app-player/popin-end/summary.js"],"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 PopinHeader from '../popin-header';\nimport AtomLottieWrapper from '../../../atom/lottie-wrapper';\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, style.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, style.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, style.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, mode} = props;\n const {skin} = context;\n const primary = getOr('#f0f', 'common.primary', skin);\n const commentView =\n mode !== 'scorm' && comment && header ? (\n <div className={style.discussionWrapper}>\n <CommentSection {...comment} />\n </div>\n ) : null;\n const footerView =\n mode !== 'scorm' && footer && header ? <Footer {...footer} color={primary} /> : null;\n const feedbackView = feedback ? <Feedback {...feedback} mode={mode} /> : null;\n\n return (\n <BackgroundScorm mode={mode} failed={header.failed}>\n <div className={mode !== 'scorm' ? style.summaryWrapper : null}>\n <Header {...header} mode={mode} />\n {feedbackView}\n <Action {...action} color={primary} />\n <Cards {...recommendation} />\n {commentView}\n {footerView}\n </div>\n </BackgroundScorm>\n );\n};\n\nconst BackgroundScorm = props => {\n const {mode = 'default', children, failed} = props;\n if (mode === 'scorm')\n return (\n <div className={style.organismPlayerResultContainerScorm}>\n {failed === false ? (\n <div className={style.animationContainer}>\n <AtomLottieWrapper\n {...{\n 'aria-label': 'aria lottie',\n 'data-name': 'default-lottie',\n className: undefined,\n animationSrc:\n 'https://static-staging.coorpacademy.com/animations/review/confetti.json',\n loop: undefined,\n autoplay: true,\n rendererSettings: {\n hideOnTransparent: false,\n animationClassName: ''\n },\n ie11ImageBackup:\n 'https://static-staging.coorpacademy.com/animations/review/conffeti_congrats.svg',\n animationControl: undefined\n }}\n loop={false}\n animationControl={'play'}\n autoplay\n data-name=\"lottie-wrapper\"\n className={style.lottie}\n backupImageClassName={style.ie11Backup}\n />\n </div>\n ) : null}\n <div className={style.background}>\n <div className={style.largeCircle} />\n <div className={style.mediumCircle} />\n <div className={style.smallCircle} />\n </div>\n <div className={style.content}>{children}</div>\n </div>\n );\n return children;\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: Link.propTypes.href,\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 mode: PropTypes.oneOf(['scorm', 'default'])\n};\n\nexport default Summary;\n"],"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,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,iBAAP,MAA8B,8BAA9B;AACA,OAAOC,KAAP,MAAkB,eAAlB;;AAEA,MAAMC,MAAM,GAAGC,KAAK,iBAAI,oBAAC,WAAD,EAAiBA,KAAjB,CAAxB;;AAEA,MAAMC,YAAY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,EAA+ByE;EADf,CAAhB,CARU;EAWlBlC,cAAc,EAAE1F,SAAS,CAACkC,KAAV,CAAgBvB,SAAS,CAACqB,SAA1B,CAXE;EAYlB6D,QAAQ,EAAE7F,SAAS,CAACkC,KAAV,CAAgBxB,QAAQ,CAACsB,SAAzB,CAZQ;EAalB8D,IAAI,EAAE9F,SAAS,CAAC2D,KAAV,CAAgB,CAAC,OAAD,EAAU,SAAV,CAAhB;AAbY,CAApB;AAgBA,eAAe6B,OAAf"}
|
|
1
|
+
{"version":3,"file":"summary.js","names":["React","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","Provider","Button","Link","Discussion","Loader","Card","Feedback","CardsList","PopinHeader","AtomLottieWrapper","style","Header","props","SimpleAction","color","prefix","title","button","buttonTitle","linkProps","simpleWrapper","simpleTexts","simplePrefix","simpleTitle","innerHTML","__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","mode","primary","commentView","discussionWrapper","footerView","feedbackView","failed","summaryWrapper","BackgroundScorm","organismPlayerResultContainerScorm","animationContainer","className","undefined","animationSrc","loop","autoplay","rendererSettings","hideOnTransparent","animationClassName","animationControl","lottie","ie11Backup","background","largeCircle","mediumCircle","smallCircle","content","href","func","isRequired"],"sources":["../../../../src/template/app-player/popin-end/summary.js"],"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 PopinHeader from '../popin-header';\nimport AtomLottieWrapper from '../../../atom/lottie-wrapper';\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, style.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, style.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, style.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, mode} = props;\n const {skin} = context;\n const primary = getOr('#f0f', 'common.primary', skin);\n const commentView =\n mode !== 'scorm' && comment && header ? (\n <div className={style.discussionWrapper}>\n <CommentSection {...comment} />\n </div>\n ) : null;\n const footerView =\n mode !== 'scorm' && footer && header ? <Footer {...footer} color={primary} /> : null;\n const feedbackView = feedback ? <Feedback {...feedback} mode={mode} /> : null;\n\n return (\n <BackgroundScorm mode={mode} failed={header.failed}>\n <div className={mode !== 'scorm' ? style.summaryWrapper : null}>\n <Header {...header} mode={mode} />\n {feedbackView}\n <Action {...action} color={primary} />\n <Cards {...recommendation} />\n {commentView}\n {footerView}\n </div>\n </BackgroundScorm>\n );\n};\n\nconst BackgroundScorm = props => {\n const {mode = 'default', children, failed} = props;\n if (mode === 'scorm')\n return (\n <div className={style.organismPlayerResultContainerScorm}>\n {failed === false ? (\n <div className={style.animationContainer}>\n <AtomLottieWrapper\n {...{\n 'aria-label': 'aria lottie',\n 'data-name': 'default-lottie',\n className: undefined,\n animationSrc:\n 'https://static-staging.coorpacademy.com/animations/review/confetti.json',\n loop: undefined,\n autoplay: true,\n rendererSettings: {\n hideOnTransparent: false,\n animationClassName: ''\n },\n animationControl: undefined\n }}\n loop={false}\n animationControl={'play'}\n autoplay\n data-name=\"lottie-wrapper\"\n className={style.lottie}\n backupImageClassName={style.ie11Backup}\n />\n </div>\n ) : null}\n <div className={style.background}>\n <div className={style.largeCircle} />\n <div className={style.mediumCircle} />\n <div className={style.smallCircle} />\n </div>\n <div className={style.content}>{children}</div>\n </div>\n );\n return children;\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: Link.propTypes.href,\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 mode: PropTypes.oneOf(['scorm', 'default'])\n};\n\nexport default Summary;\n"],"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,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,iBAAP,MAA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QlB4D,MAAM,EAAE5F,SAAS,CAACkC,KAAV,CAAgB;IACtBsB,IAAI,EAAExD,SAAS,CAAC2D,KAAV,CAAgB,MAAKR,OAAL,CAAhB,EAA+BwE;EADf,CAAhB,CARU;EAWlBjC,cAAc,EAAE1F,SAAS,CAACkC,KAAV,CAAgBvB,SAAS,CAACqB,SAA1B,CAXE;EAYlB6D,QAAQ,EAAE7F,SAAS,CAACkC,KAAV,CAAgBxB,QAAQ,CAACsB,SAAzB,CAZQ;EAalB8D,IAAI,EAAE9F,SAAS,CAAC2D,KAAV,CAAgB,CAAC,OAAD,EAAU,SAAV,CAAhB;AAbY,CAApB;AAgBA,eAAe6B,OAAf"}
|
|
@@ -435,8 +435,6 @@ declare const AppReview: {
|
|
|
435
435
|
height: import("prop-types").Requireable<number>;
|
|
436
436
|
width: import("prop-types").Requireable<number>;
|
|
437
437
|
className: import("prop-types").Requireable<string>;
|
|
438
|
-
ie11ImageBackup: import("prop-types").Validator<string>;
|
|
439
|
-
backupImageClassName: import("prop-types").Requireable<string>;
|
|
440
438
|
autoplay: import("prop-types").Requireable<boolean>;
|
|
441
439
|
animationControl: import("prop-types").Requireable<string>;
|
|
442
440
|
}>>;
|
|
@@ -456,8 +454,6 @@ declare const AppReview: {
|
|
|
456
454
|
height: import("prop-types").Requireable<number>;
|
|
457
455
|
width: import("prop-types").Requireable<number>;
|
|
458
456
|
className: import("prop-types").Requireable<string>;
|
|
459
|
-
ie11ImageBackup: import("prop-types").Validator<string>;
|
|
460
|
-
backupImageClassName: import("prop-types").Requireable<string>;
|
|
461
457
|
autoplay: import("prop-types").Requireable<boolean>;
|
|
462
458
|
animationControl: import("prop-types").Requireable<string>;
|
|
463
459
|
}>>;
|
|
@@ -484,8 +480,6 @@ declare const AppReview: {
|
|
|
484
480
|
height: import("prop-types").Requireable<number>;
|
|
485
481
|
width: import("prop-types").Requireable<number>;
|
|
486
482
|
className: import("prop-types").Requireable<string>;
|
|
487
|
-
ie11ImageBackup: import("prop-types").Validator<string>;
|
|
488
|
-
backupImageClassName: import("prop-types").Requireable<string>;
|
|
489
483
|
autoplay: import("prop-types").Requireable<boolean>;
|
|
490
484
|
animationControl: import("prop-types").Requireable<string>;
|
|
491
485
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAEvD,QAAA,MAAM,SAAS;2BAAwB,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAEvD,QAAA,MAAM,SAAS;2BAAwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpD,CAAC;AAIF,eAAe,SAAS,CAAC"}
|
|
@@ -434,8 +434,6 @@ declare const propTypes: {
|
|
|
434
434
|
height: PropTypes.Requireable<number>;
|
|
435
435
|
width: PropTypes.Requireable<number>;
|
|
436
436
|
className: PropTypes.Requireable<string>;
|
|
437
|
-
ie11ImageBackup: PropTypes.Validator<string>;
|
|
438
|
-
backupImageClassName: PropTypes.Requireable<string>;
|
|
439
437
|
autoplay: PropTypes.Requireable<boolean>;
|
|
440
438
|
animationControl: PropTypes.Requireable<string>;
|
|
441
439
|
}>>;
|
|
@@ -455,8 +453,6 @@ declare const propTypes: {
|
|
|
455
453
|
height: PropTypes.Requireable<number>;
|
|
456
454
|
width: PropTypes.Requireable<number>;
|
|
457
455
|
className: PropTypes.Requireable<string>;
|
|
458
|
-
ie11ImageBackup: PropTypes.Validator<string>;
|
|
459
|
-
backupImageClassName: PropTypes.Requireable<string>;
|
|
460
456
|
autoplay: PropTypes.Requireable<boolean>;
|
|
461
457
|
animationControl: PropTypes.Requireable<string>;
|
|
462
458
|
}>>;
|
|
@@ -483,8 +479,6 @@ declare const propTypes: {
|
|
|
483
479
|
height: PropTypes.Requireable<number>;
|
|
484
480
|
width: PropTypes.Requireable<number>;
|
|
485
481
|
className: PropTypes.Requireable<string>;
|
|
486
|
-
ie11ImageBackup: PropTypes.Validator<string>;
|
|
487
|
-
backupImageClassName: PropTypes.Requireable<string>;
|
|
488
482
|
autoplay: PropTypes.Requireable<boolean>;
|
|
489
483
|
animationControl: PropTypes.Requireable<string>;
|
|
490
484
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/player/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAgC,EAC9B,mBAAmB,EACpB,MAAM,8CAA8C,CAAC;AAGtD,OAA8B,EAAC,WAAW,EAAC,MAAM,uCAAuC,CAAC;AAEzF,OA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ACxB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B,CAAC"}
|
|
@@ -439,8 +439,6 @@ declare const propTypes: {
|
|
|
439
439
|
height: PropTypes.Requireable<number>;
|
|
440
440
|
width: PropTypes.Requireable<number>;
|
|
441
441
|
className: PropTypes.Requireable<string>;
|
|
442
|
-
ie11ImageBackup: PropTypes.Validator<string>;
|
|
443
|
-
backupImageClassName: PropTypes.Requireable<string>;
|
|
444
442
|
autoplay: PropTypes.Requireable<boolean>;
|
|
445
443
|
animationControl: PropTypes.Requireable<string>;
|
|
446
444
|
}>>;
|
|
@@ -460,8 +458,6 @@ declare const propTypes: {
|
|
|
460
458
|
height: PropTypes.Requireable<number>;
|
|
461
459
|
width: PropTypes.Requireable<number>;
|
|
462
460
|
className: PropTypes.Requireable<string>;
|
|
463
|
-
ie11ImageBackup: PropTypes.Validator<string>;
|
|
464
|
-
backupImageClassName: PropTypes.Requireable<string>;
|
|
465
461
|
autoplay: PropTypes.Requireable<boolean>;
|
|
466
462
|
animationControl: PropTypes.Requireable<string>;
|
|
467
463
|
}>>;
|
|
@@ -488,8 +484,6 @@ declare const propTypes: {
|
|
|
488
484
|
height: PropTypes.Requireable<number>;
|
|
489
485
|
width: PropTypes.Requireable<number>;
|
|
490
486
|
className: PropTypes.Requireable<string>;
|
|
491
|
-
ie11ImageBackup: PropTypes.Validator<string>;
|
|
492
|
-
backupImageClassName: PropTypes.Requireable<string>;
|
|
493
487
|
autoplay: PropTypes.Requireable<boolean>;
|
|
494
488
|
animationControl: PropTypes.Requireable<string>;
|
|
495
489
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,iBAAiB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/index.js"],"names":[],"mappings":"AAUO,iMAmCN;;AAED,wDAiHC"}
|
|
@@ -9,10 +9,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
9
9
|
|
|
10
10
|
var _lottieWeb = _interopRequireDefault(require("lottie-web"));
|
|
11
11
|
|
|
12
|
-
var _get = _interopRequireDefault(require("lodash/fp/get"));
|
|
13
|
-
|
|
14
|
-
var _has = _interopRequireDefault(require("lodash/fp/has"));
|
|
15
|
-
|
|
16
12
|
var _includes = _interopRequireDefault(require("lodash/fp/includes"));
|
|
17
13
|
|
|
18
14
|
var _keys = _interopRequireDefault(require("lodash/fp/keys"));
|
|
@@ -33,15 +29,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
33
29
|
|
|
34
30
|
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); }
|
|
35
31
|
|
|
36
|
-
const isIE11 = () => {
|
|
37
|
-
if (typeof window === 'undefined') return;
|
|
38
|
-
const userAgent = (0, _get.default)('navigator.userAgent', window);
|
|
39
|
-
const hasMsCrypto = (0, _has.default)('msCrypto', window);
|
|
40
|
-
const hasRevision = (0, _includes.default)('rv:', userAgent);
|
|
41
|
-
const hasTrident = (0, _includes.default)('Trident/', userAgent);
|
|
42
|
-
return hasMsCrypto || hasRevision && hasTrident;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
32
|
const fetchAndLoadAnimation = async (_lottie, _fetch, animationSrc, containerRef, loop, animationClassnames, hideOnTransparent, autoplay) => {
|
|
46
33
|
const animationUrl = new URL(animationSrc).toString();
|
|
47
34
|
const fetchResult = await _fetch(animationUrl, {
|
|
@@ -82,8 +69,6 @@ const LottieWrapper = props => {
|
|
|
82
69
|
rendererSettings = {},
|
|
83
70
|
width,
|
|
84
71
|
height,
|
|
85
|
-
ie11ImageBackup,
|
|
86
|
-
backupImageClassName,
|
|
87
72
|
autoplay = true,
|
|
88
73
|
animationControl
|
|
89
74
|
} = props;
|
|
@@ -95,18 +80,14 @@ const LottieWrapper = props => {
|
|
|
95
80
|
|
|
96
81
|
const [animationItem, setAnimationItem] = (0, _react.useState)(null);
|
|
97
82
|
const [isAnimationVisible, setIsAnimationVisible] = (0, _react.useState)(autoplay);
|
|
98
|
-
|
|
99
|
-
const _isIE11 = (0, _react.useMemo)(() => isIE11(), []);
|
|
100
|
-
|
|
101
83
|
const wrapperClassName = (0, _react.useMemo)(() => (0, _classnames.default)(className, _style.default.lottieContainer), [className]);
|
|
102
84
|
const lottieAnimationClassName = (0, _react.useMemo)(() => (0, _classnames.default)(animationClassName, _style.default.animation), [animationClassName]);
|
|
103
|
-
const ie11BackupImageClassName = (0, _react.useMemo)(() => (0, _classnames.default)(backupImageClassName, _style.default.backupImage), [backupImageClassName]);
|
|
104
85
|
(0, _react.useEffect)(() => {
|
|
105
86
|
// enzyme does not handle well the state update after an async useEffect in tests
|
|
106
87
|
// to remove when the migration towards @testing-library/react is done
|
|
107
88
|
|
|
108
89
|
/* istanbul ignore next */
|
|
109
|
-
if ((0, _includes.default)(animationControl, (0, _keys.default)((0, _omit.default)('loading', _propTypes.ANIMATION_CONTROL))) && !autoplay) {
|
|
90
|
+
if (containerRef.current && (0, _includes.default)(animationControl, (0, _keys.default)((0, _omit.default)('loading', _propTypes.ANIMATION_CONTROL))) && !autoplay) {
|
|
110
91
|
setIsAnimationVisible(true);
|
|
111
92
|
if (animationItem) animationItem[animationControl]();
|
|
112
93
|
if (animationControl === _propTypes.ANIMATION_CONTROL.stop) setIsAnimationVisible(false);
|
|
@@ -114,24 +95,26 @@ const LottieWrapper = props => {
|
|
|
114
95
|
}, [animationControl, animationItem, autoplay]);
|
|
115
96
|
(0, _react.useEffect)(() => {
|
|
116
97
|
const loadAnimation = async () => {
|
|
117
|
-
|
|
98
|
+
/* istanbul ignore else */
|
|
99
|
+
if (!animationItem) {
|
|
118
100
|
/* istanbul ignore else */
|
|
119
101
|
if (typeof window !== 'undefined') {
|
|
120
102
|
window.lottie = _lottieWeb.default;
|
|
121
103
|
}
|
|
122
104
|
|
|
123
105
|
const animation = await fetchAndLoadAnimation(_lottieWeb.default, _isomorphicUnfetch.default, animationSrc, containerRef, loop, lottieAnimationClassName, hideOnTransparent, autoplay);
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
setAnimationItem(animation);
|
|
106
|
+
containerRef.current && setAnimationItem(animation);
|
|
127
107
|
}
|
|
128
108
|
};
|
|
129
109
|
|
|
130
110
|
loadAnimation();
|
|
131
|
-
return () =>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
111
|
+
return () => {
|
|
112
|
+
containerRef.current = false;
|
|
113
|
+
return animationItem &&
|
|
114
|
+
/* istanbul ignore next */
|
|
115
|
+
_lottieWeb.default.destroy(animationItem.name);
|
|
116
|
+
};
|
|
117
|
+
}, [lottieAnimationClassName, containerRef, hideOnTransparent, loop, animationSrc, animationItem, autoplay]);
|
|
135
118
|
const accessibilityProps = ariaLabel ? {
|
|
136
119
|
'aria-label': ariaLabel,
|
|
137
120
|
role: 'img'
|
|
@@ -153,11 +136,7 @@ const LottieWrapper = props => {
|
|
|
153
136
|
opacity: isAnimationVisible ? 1 : 0,
|
|
154
137
|
transition: 'opacity 0.25s ease-in'
|
|
155
138
|
})
|
|
156
|
-
})
|
|
157
|
-
src: ie11ImageBackup,
|
|
158
|
-
className: ie11BackupImageClassName,
|
|
159
|
-
"data-name": "ie11-backup-image"
|
|
160
|
-
}) : null);
|
|
139
|
+
}));
|
|
161
140
|
};
|
|
162
141
|
|
|
163
142
|
LottieWrapper.propTypes = process.env.NODE_ENV !== "production" ? _propTypes.default : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["isIE11","window","userAgent","get","hasMsCrypto","has","hasRevision","includes","hasTrident","fetchAndLoadAnimation","_lottie","_fetch","animationSrc","containerRef","loop","animationClassnames","hideOnTransparent","autoplay","animationUrl","URL","toString","fetchResult","headers","animationData","json","animation","loadAnimation","container","current","renderer","rendererSettings","className","preserveAspectRatio","LottieWrapper","props","dataName","ariaLabel","width","height","ie11ImageBackup","backupImageClassName","animationControl","animationClassName","useRef","animationItem","setAnimationItem","useState","isAnimationVisible","setIsAnimationVisible","_isIE11","useMemo","wrapperClassName","classnames","style","lottieContainer","lottieAnimationClassName","ie11BackupImageClassName","backupImage","useEffect","keys","omit","ANIMATION_CONTROL","stop","lottie","unfetch","destroy","name","accessibilityProps","role","maxWidth","maxHeight","opacity","transition","propTypes"],"sources":["../../../src/atom/lottie-wrapper/index.js"],"sourcesContent":["import React, {useMemo, useRef, useEffect, useState} from 'react';\nimport classnames from 'classnames';\nimport lottie from 'lottie-web';\nimport get from 'lodash/fp/get';\nimport has from 'lodash/fp/has';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport omit from 'lodash/fp/omit';\nimport unfetch from 'isomorphic-unfetch';\nimport style from './style.css';\nimport propTypes, {ANIMATION_CONTROL} from './prop-types';\n\nconst isIE11 = () => {\n if (typeof window === 'undefined') return;\n const userAgent = get('navigator.userAgent', window);\n const hasMsCrypto = has('msCrypto', window);\n const hasRevision = includes('rv:', userAgent);\n const hasTrident = includes('Trident/', userAgent);\n\n return hasMsCrypto || (hasRevision && hasTrident);\n};\n\nexport const fetchAndLoadAnimation = async (\n _lottie,\n _fetch,\n animationSrc,\n containerRef,\n loop,\n animationClassnames,\n hideOnTransparent,\n autoplay\n) => {\n const animationUrl = new URL(animationSrc).toString();\n const fetchResult = await _fetch(animationUrl, {\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n 'Content-Type': 'application/json'\n }\n });\n\n const animationData = await fetchResult.json();\n\n const animation =\n _lottie.loadAnimation &&\n _lottie.loadAnimation({\n container: containerRef.current, // the dom element that will contain the animation\n renderer: 'svg',\n autoplay,\n loop,\n animationData,\n rendererSettings: {\n className: animationClassnames,\n hideOnTransparent,\n preserveAspectRatio: 'xMidYMid meet' // same options as a preserveAspectRatio prop\n }\n });\n return animation;\n};\n\nconst LottieWrapper = props => {\n const {\n className,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n animationSrc,\n loop = false,\n rendererSettings = {},\n width,\n height,\n ie11ImageBackup,\n backupImageClassName,\n autoplay = true,\n animationControl\n } = props;\n\n const {className: animationClassName, hideOnTransparent = true} = rendererSettings;\n\n const containerRef = useRef(null);\n\n // lottie's animation instance\n const [animationItem, setAnimationItem] = useState(null);\n\n const [isAnimationVisible, setIsAnimationVisible] = useState(autoplay);\n\n const _isIE11 = useMemo(() => isIE11(), []);\n\n const wrapperClassName = useMemo(() => classnames(className, style.lottieContainer), [className]);\n\n const lottieAnimationClassName = useMemo(\n () => classnames(animationClassName, style.animation),\n [animationClassName]\n );\n\n const ie11BackupImageClassName = useMemo(\n () => classnames(backupImageClassName, style.backupImage),\n [backupImageClassName]\n );\n\n useEffect(() => {\n // enzyme does not handle well the state update after an async useEffect in tests\n // to remove when the migration towards @testing-library/react is done\n /* istanbul ignore next */\n if (includes(animationControl, keys(omit('loading', ANIMATION_CONTROL))) && !autoplay) {\n setIsAnimationVisible(true);\n if (animationItem) animationItem[animationControl]();\n if (animationControl === ANIMATION_CONTROL.stop) setIsAnimationVisible(false);\n }\n }, [animationControl, animationItem, autoplay]);\n\n useEffect(() => {\n const loadAnimation = async () => {\n if (!_isIE11 && !animationItem) {\n /* istanbul ignore else */\n if (typeof window !== 'undefined') {\n window.lottie = lottie;\n }\n const animation = await fetchAndLoadAnimation(\n lottie,\n unfetch,\n animationSrc,\n containerRef,\n loop,\n lottieAnimationClassName,\n hideOnTransparent,\n autoplay\n );\n\n /* istanbul ignore next */\n setAnimationItem(animation);\n }\n };\n\n loadAnimation();\n return () => animationItem && /* istanbul ignore next */ lottie.destroy(animationItem.name);\n }, [\n lottieAnimationClassName,\n containerRef,\n hideOnTransparent,\n loop,\n animationSrc,\n _isIE11,\n animationItem,\n autoplay\n ]);\n\n const accessibilityProps = ariaLabel\n ? {\n 'aria-label': ariaLabel,\n role: 'img'\n }\n : {\n 'aria-hidden': 'true',\n role: 'presentation'\n };\n\n return (\n <div\n {...accessibilityProps}\n ref={containerRef}\n data-name={dataName}\n className={wrapperClassName}\n style={{\n ...(width && {\n width: `${width}px`,\n maxWidth: `${width}px`\n }),\n ...(height && {\n height: `${height}px`,\n maxHeight: `${height}px`\n }),\n opacity: isAnimationVisible ? 1 : 0,\n transition: 'opacity 0.25s ease-in'\n }}\n >\n {_isIE11 ? (\n <img\n src={ie11ImageBackup}\n className={ie11BackupImageClassName}\n data-name=\"ie11-backup-image\"\n />\n ) : null}\n </div>\n );\n};\n\nLottieWrapper.propTypes = propTypes;\n\nexport default LottieWrapper;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAG,MAAM;EACnB,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;EACnC,MAAMC,SAAS,GAAG,IAAAC,YAAA,EAAI,qBAAJ,EAA2BF,MAA3B,CAAlB;EACA,MAAMG,WAAW,GAAG,IAAAC,YAAA,EAAI,UAAJ,EAAgBJ,MAAhB,CAApB;EACA,MAAMK,WAAW,GAAG,IAAAC,iBAAA,EAAS,KAAT,EAAgBL,SAAhB,CAApB;EACA,MAAMM,UAAU,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,EAAExB,kBAAkB,GAAG,CAAH,GAAO,CAT/B;MAUHyB,UAAU,EAAE;IAVT;EALP,IAkBGvB,OAAO,gBACN;IACE,GAAG,EAAEV,eADP;IAEE,SAAS,EAAEiB,wBAFb;IAGE,aAAU;EAHZ,EADM,GAMJ,IAxBN,CADF;AA4BD,CA5HD;;AA8HAvB,aAAa,CAACwC,SAAd,2CAA0BA,kBAA1B;eAEexC,a"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["fetchAndLoadAnimation","_lottie","_fetch","animationSrc","containerRef","loop","animationClassnames","hideOnTransparent","autoplay","animationUrl","URL","toString","fetchResult","headers","animationData","json","animation","loadAnimation","container","current","renderer","rendererSettings","className","preserveAspectRatio","LottieWrapper","props","dataName","ariaLabel","width","height","animationControl","animationClassName","useRef","animationItem","setAnimationItem","useState","isAnimationVisible","setIsAnimationVisible","wrapperClassName","useMemo","classnames","style","lottieContainer","lottieAnimationClassName","useEffect","includes","keys","omit","ANIMATION_CONTROL","stop","window","lottie","unfetch","destroy","name","accessibilityProps","role","maxWidth","maxHeight","opacity","transition","propTypes"],"sources":["../../../src/atom/lottie-wrapper/index.js"],"sourcesContent":["import React, {useMemo, useRef, useEffect, useState} from 'react';\nimport classnames from 'classnames';\nimport lottie from 'lottie-web';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport omit from 'lodash/fp/omit';\nimport unfetch from 'isomorphic-unfetch';\nimport style from './style.css';\nimport propTypes, {ANIMATION_CONTROL} from './prop-types';\n\nexport const fetchAndLoadAnimation = async (\n _lottie,\n _fetch,\n animationSrc,\n containerRef,\n loop,\n animationClassnames,\n hideOnTransparent,\n autoplay\n) => {\n const animationUrl = new URL(animationSrc).toString();\n const fetchResult = await _fetch(animationUrl, {\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n 'Content-Type': 'application/json'\n }\n });\n\n const animationData = await fetchResult.json();\n\n const animation =\n _lottie.loadAnimation &&\n _lottie.loadAnimation({\n container: containerRef.current, // the dom element that will contain the animation\n renderer: 'svg',\n autoplay,\n loop,\n animationData,\n rendererSettings: {\n className: animationClassnames,\n hideOnTransparent,\n preserveAspectRatio: 'xMidYMid meet' // same options as a preserveAspectRatio prop\n }\n });\n return animation;\n};\n\nconst LottieWrapper = props => {\n const {\n className,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n animationSrc,\n loop = false,\n rendererSettings = {},\n width,\n height,\n autoplay = true,\n animationControl\n } = props;\n\n const {className: animationClassName, hideOnTransparent = true} = rendererSettings;\n\n const containerRef = useRef(null);\n\n // lottie's animation instance\n const [animationItem, setAnimationItem] = useState(null);\n\n const [isAnimationVisible, setIsAnimationVisible] = useState(autoplay);\n\n const wrapperClassName = useMemo(() => classnames(className, style.lottieContainer), [className]);\n\n const lottieAnimationClassName = useMemo(\n () => classnames(animationClassName, style.animation),\n [animationClassName]\n );\n\n useEffect(() => {\n // enzyme does not handle well the state update after an async useEffect in tests\n // to remove when the migration towards @testing-library/react is done\n /* istanbul ignore next */\n if (\n containerRef.current &&\n includes(animationControl, keys(omit('loading', ANIMATION_CONTROL))) &&\n !autoplay\n ) {\n setIsAnimationVisible(true);\n if (animationItem) animationItem[animationControl]();\n if (animationControl === ANIMATION_CONTROL.stop) setIsAnimationVisible(false);\n }\n }, [animationControl, animationItem, autoplay]);\n\n useEffect(() => {\n const loadAnimation = async () => {\n /* istanbul ignore else */\n if (!animationItem) {\n /* istanbul ignore else */\n if (typeof window !== 'undefined') {\n window.lottie = lottie;\n }\n const animation = await fetchAndLoadAnimation(\n lottie,\n unfetch,\n animationSrc,\n containerRef,\n loop,\n lottieAnimationClassName,\n hideOnTransparent,\n autoplay\n );\n\n containerRef.current && setAnimationItem(animation);\n }\n };\n\n loadAnimation();\n return () => {\n containerRef.current = false;\n return animationItem && /* istanbul ignore next */ lottie.destroy(animationItem.name);\n };\n }, [\n lottieAnimationClassName,\n containerRef,\n hideOnTransparent,\n loop,\n animationSrc,\n animationItem,\n autoplay\n ]);\n\n const accessibilityProps = ariaLabel\n ? {\n 'aria-label': ariaLabel,\n role: 'img'\n }\n : {\n 'aria-hidden': 'true',\n role: 'presentation'\n };\n\n return (\n <div\n {...accessibilityProps}\n ref={containerRef}\n data-name={dataName}\n className={wrapperClassName}\n style={{\n ...(width && {\n width: `${width}px`,\n maxWidth: `${width}px`\n }),\n ...(height && {\n height: `${height}px`,\n maxHeight: `${height}px`\n }),\n opacity: isAnimationVisible ? 1 : 0,\n transition: 'opacity 0.25s ease-in'\n }}\n />\n );\n};\n\nLottieWrapper.propTypes = propTypes;\n\nexport default LottieWrapper;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,qBAAqB,GAAG,OACnCC,OADmC,EAEnCC,MAFmC,EAGnCC,YAHmC,EAInCC,YAJmC,EAKnCC,IALmC,EAMnCC,mBANmC,EAOnCC,iBAPmC,EAQnCC,QARmC,KAShC;EACH,MAAMC,YAAY,GAAG,IAAIC,GAAJ,CAAQP,YAAR,EAAsBQ,QAAtB,EAArB;EACA,MAAMC,WAAW,GAAG,MAAMV,MAAM,CAACO,YAAD,EAAe;IAC7CI,OAAO,EAAE;MACP,oBAAoB,gBADb;MAEP,gBAAgB;IAFT;EADoC,CAAf,CAAhC;EAOA,MAAMC,aAAa,GAAG,MAAMF,WAAW,CAACG,IAAZ,EAA5B;;EAEA,MAAMC,SAAS,GACbf,OAAO,CAACgB,aAAR,IACAhB,OAAO,CAACgB,aAAR,CAAsB;IACpBC,SAAS,EAAEd,YAAY,CAACe,OADJ;IACa;IACjCC,QAAQ,EAAE,KAFU;IAGpBZ,QAHoB;IAIpBH,IAJoB;IAKpBS,aALoB;IAMpBO,gBAAgB,EAAE;MAChBC,SAAS,EAAEhB,mBADK;MAEhBC,iBAFgB;MAGhBgB,mBAAmB,EAAE,eAHL,CAGqB;;IAHrB;EANE,CAAtB,CAFF;;EAcA,OAAOP,SAAP;AACD,CAnCM;;;;A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,KAAM;IAFR,CADV,EAKCC,MAAM,IAAI;MACZA,MAAM,EAAG,GAAEA,MAAO,IADN;MAEZ6B,SAAS,EAAG,GAAE7B,MAAO;IAFT,CALX;MASH8B,OAAO,EAAEvB,kBAAkB,GAAG,CAAH,GAAO,CAT/B;MAUHwB,UAAU,EAAE;IAVT;EALP,GADF;AAoBD,CAjHD;;AAmHApC,aAAa,CAACqC,SAAd,2CAA0BA,kBAA1B;eAEerC,a"}
|
|
@@ -11,8 +11,6 @@ export declare type LottieAnimationProps = {
|
|
|
11
11
|
height?: number;
|
|
12
12
|
width?: number;
|
|
13
13
|
className?: string;
|
|
14
|
-
ie11ImageBackup: string;
|
|
15
|
-
backupImageClassName?: string;
|
|
16
14
|
autoplay?: boolean;
|
|
17
15
|
animationControl?: 'play' | 'pause' | 'stop' | 'loading';
|
|
18
16
|
};
|
|
@@ -34,8 +32,6 @@ declare const propTypes: {
|
|
|
34
32
|
height: PropTypes.Requireable<number>;
|
|
35
33
|
width: PropTypes.Requireable<number>;
|
|
36
34
|
className: PropTypes.Requireable<string>;
|
|
37
|
-
ie11ImageBackup: PropTypes.Validator<string>;
|
|
38
|
-
backupImageClassName: PropTypes.Requireable<string>;
|
|
39
35
|
autoplay: PropTypes.Requireable<boolean>;
|
|
40
36
|
animationControl: PropTypes.Requireable<string>;
|
|
41
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,oBAAY,oBAAoB,GAAG;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE;QACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,oBAAY,oBAAoB,GAAG;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE;QACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;CAK7B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;CAcd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -28,8 +28,6 @@ const propTypes = {
|
|
|
28
28
|
height: _propTypes.default.number,
|
|
29
29
|
width: _propTypes.default.number,
|
|
30
30
|
className: _propTypes.default.string,
|
|
31
|
-
ie11ImageBackup: _propTypes.default.string.isRequired,
|
|
32
|
-
backupImageClassName: _propTypes.default.string,
|
|
33
31
|
autoplay: _propTypes.default.bool,
|
|
34
32
|
animationControl: _propTypes.default.oneOf((0, _keys.default)(ANIMATION_CONTROL))
|
|
35
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["ANIMATION_CONTROL","play","pause","stop","loading","propTypes","PropTypes","string","animationSrc","isRequired","loop","bool","rendererSettings","shape","hideOnTransparent","className","height","number","width","
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["ANIMATION_CONTROL","play","pause","stop","loading","propTypes","PropTypes","string","animationSrc","isRequired","loop","bool","rendererSettings","shape","hideOnTransparent","className","height","number","width","autoplay","animationControl","oneOf","keys"],"sources":["../../../src/atom/lottie-wrapper/prop-types.ts"],"sourcesContent":["import keys from 'lodash/fp/keys';\nimport PropTypes from 'prop-types';\n\nexport type LottieAnimationProps = {\n 'aria-label'?: string;\n 'data-name'?: string;\n animationSrc: string;\n loop?: boolean;\n rendererSettings?: {\n hideOnTransparent?: boolean;\n className?: string;\n };\n height?: number;\n width?: number;\n className?: string;\n autoplay?: boolean;\n animationControl?: 'play' | 'pause' | 'stop' | 'loading';\n};\n\nexport const ANIMATION_CONTROL = {\n play: 'play',\n pause: 'pause',\n stop: 'stop',\n loading: 'loading'\n};\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n animationSrc: PropTypes.string.isRequired,\n loop: PropTypes.bool,\n rendererSettings: PropTypes.shape({\n hideOnTransparent: PropTypes.bool,\n className: PropTypes.string\n }),\n height: PropTypes.number,\n width: PropTypes.number,\n className: PropTypes.string,\n autoplay: PropTypes.bool,\n animationControl: PropTypes.oneOf(keys(ANIMATION_CONTROL))\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA;;AACA;;;;AAkBO,MAAMA,iBAAiB,GAAG;EAC/BC,IAAI,EAAE,MADyB;EAE/BC,KAAK,EAAE,OAFwB;EAG/BC,IAAI,EAAE,MAHyB;EAI/BC,OAAO,EAAE;AAJsB,CAA1B;;AAOP,MAAMC,SAAS,GAAG;EAChB,cAAcC,kBAAA,CAAUC,MADR;EAEhB,aAAaD,kBAAA,CAAUC,MAFP;EAGhBC,YAAY,EAAEF,kBAAA,CAAUC,MAAV,CAAiBE,UAHf;EAIhBC,IAAI,EAAEJ,kBAAA,CAAUK,IAJA;EAKhBC,gBAAgB,EAAEN,kBAAA,CAAUO,KAAV,CAAgB;IAChCC,iBAAiB,EAAER,kBAAA,CAAUK,IADG;IAEhCI,SAAS,EAAET,kBAAA,CAAUC;EAFW,CAAhB,CALF;EAShBS,MAAM,EAAEV,kBAAA,CAAUW,MATF;EAUhBC,KAAK,EAAEZ,kBAAA,CAAUW,MAVD;EAWhBF,SAAS,EAAET,kBAAA,CAAUC,MAXL;EAYhBY,QAAQ,EAAEb,kBAAA,CAAUK,IAZJ;EAahBS,gBAAgB,EAAEd,kBAAA,CAAUe,KAAV,CAAgB,IAAAC,aAAA,EAAKtB,iBAAL,CAAhB;AAbF,CAAlB;eAgBeK,S"}
|
|
@@ -30,7 +30,8 @@ const DropDown = props => {
|
|
|
30
30
|
const defaultTheme = !currentSelection || currentSelection.validOption === false ? 'invalid' : 'question';
|
|
31
31
|
const theme = propsTheme || defaultTheme;
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
-
className: _style.default.wrapper
|
|
33
|
+
className: _style.default.wrapper,
|
|
34
|
+
role: "group"
|
|
34
35
|
}, /*#__PURE__*/_react.default.createElement(_select.default, {
|
|
35
36
|
"aria-label": ariaLabel,
|
|
36
37
|
theme: theme,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DropDown","props","options","onChange","theme","propsTheme","ariaLabel","currentSelection","defaultTheme","validOption","style","wrapper","propTypes","Select","PropTypes","arrayOf","shape","SelectOptionPropTypes","string"],"sources":["../../../../src/molecule/questions/drop-down/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {find} from 'lodash/fp';\nimport Select, {SelectOptionPropTypes} from '../../../atom/select';\nimport style from './style.css';\n\nconst DropDown = props => {\n const {options, onChange, theme: propsTheme, 'aria-label': ariaLabel} = props;\n\n const currentSelection = find('selected', options);\n const defaultTheme =\n !currentSelection || currentSelection.validOption === false ? 'invalid' : 'question';\n\n const theme = propsTheme || defaultTheme;\n\n return (\n <div className={style.wrapper}>\n <Select aria-label={ariaLabel} theme={theme} options={options} onChange={onChange} />\n </div>\n );\n};\n\nDropDown.propTypes = {\n onChange: Select.propTypes.onChange,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n theme: Select.propTypes.theme,\n 'aria-label': PropTypes.string\n};\n\nexport default DropDown;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,OAAD;IAAUC,QAAV;IAAoBC,KAAK,EAAEC,UAA3B;IAAuC,cAAcC;EAArD,IAAkEL,KAAxE;EAEA,MAAMM,gBAAgB,GAAG,oBAAK,UAAL,EAAiBL,OAAjB,CAAzB;EACA,MAAMM,YAAY,GAChB,CAACD,gBAAD,IAAqBA,gBAAgB,CAACE,WAAjB,KAAiC,KAAtD,GAA8D,SAA9D,GAA0E,UAD5E;EAGA,MAAML,KAAK,GAAGC,UAAU,IAAIG,YAA5B;EAEA,oBACE;IAAK,SAAS,EAAEE,cAAA,CAAMC;
|
|
1
|
+
{"version":3,"file":"index.js","names":["DropDown","props","options","onChange","theme","propsTheme","ariaLabel","currentSelection","defaultTheme","validOption","style","wrapper","propTypes","Select","PropTypes","arrayOf","shape","SelectOptionPropTypes","string"],"sources":["../../../../src/molecule/questions/drop-down/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {find} from 'lodash/fp';\nimport Select, {SelectOptionPropTypes} from '../../../atom/select';\nimport style from './style.css';\n\nconst DropDown = props => {\n const {options, onChange, theme: propsTheme, 'aria-label': ariaLabel} = props;\n\n const currentSelection = find('selected', options);\n const defaultTheme =\n !currentSelection || currentSelection.validOption === false ? 'invalid' : 'question';\n\n const theme = propsTheme || defaultTheme;\n\n return (\n <div className={style.wrapper} role=\"group\">\n <Select aria-label={ariaLabel} theme={theme} options={options} onChange={onChange} />\n </div>\n );\n};\n\nDropDown.propTypes = {\n onChange: Select.propTypes.onChange,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n theme: Select.propTypes.theme,\n 'aria-label': PropTypes.string\n};\n\nexport default DropDown;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,OAAD;IAAUC,QAAV;IAAoBC,KAAK,EAAEC,UAA3B;IAAuC,cAAcC;EAArD,IAAkEL,KAAxE;EAEA,MAAMM,gBAAgB,GAAG,oBAAK,UAAL,EAAiBL,OAAjB,CAAzB;EACA,MAAMM,YAAY,GAChB,CAACD,gBAAD,IAAqBA,gBAAgB,CAACE,WAAjB,KAAiC,KAAtD,GAA8D,SAA9D,GAA0E,UAD5E;EAGA,MAAML,KAAK,GAAGC,UAAU,IAAIG,YAA5B;EAEA,oBACE;IAAK,SAAS,EAAEE,cAAA,CAAMC,OAAtB;IAA+B,IAAI,EAAC;EAApC,gBACE,6BAAC,eAAD;IAAQ,cAAYL,SAApB;IAA+B,KAAK,EAAEF,KAAtC;IAA6C,OAAO,EAAEF,OAAtD;IAA+D,QAAQ,EAAEC;EAAzE,EADF,CADF;AAKD,CAdD;;AAgBAH,QAAQ,CAACY,SAAT,2CAAqB;EACnBT,QAAQ,EAAEU,eAAA,CAAOD,SAAP,CAAiBT,QADR;EAEnBD,OAAO,EAAEY,kBAAA,CAAUC,OAAV,CAAkBD,kBAAA,CAAUE,KAAV,CAAgBC,6BAAhB,CAAlB,CAFU;EAGnBb,KAAK,EAAES,eAAA,CAAOD,SAAP,CAAiBR,KAHL;EAInB,cAAcU,kBAAA,CAAUI;AAJL,CAArB;eAOelB,Q"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/free-text/index.js"],"names":[],"mappings":";AAOA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/free-text/index.js"],"names":[],"mappings":";AAOA,uEAmDC"}
|
|
@@ -46,7 +46,8 @@ const FreeText = (props, legacyContext) => {
|
|
|
46
46
|
onMouseLeave: handleMouseLeave,
|
|
47
47
|
style: _extends({}, value && {
|
|
48
48
|
boxShadow: hovered ? 'none' : `0 4px 16px ${shadowBoxPrimaryColor}`
|
|
49
|
-
})
|
|
49
|
+
}),
|
|
50
|
+
role: "group"
|
|
50
51
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
51
52
|
"data-name": "free-text-input",
|
|
52
53
|
type: "text",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["FreeText","props","legacyContext","skin","GetSkinFromContext","placeholder","value","onChange","ariaLabel","hovered","setHovered","useState","handleChange","useCallback","e","target","primarySkinColor","handleMouseOver","handleMouseLeave","shadowBoxPrimaryColor","useMemo","convert","style","wrapper","boxShadow","freeText","color","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","func"],"sources":["../../../../src/molecule/questions/free-text/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, getOr} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport style from './style.css';\n\nconst FreeText = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const {placeholder = '', value = '', onChange = noop, 'aria-label': ariaLabel} = props;\n const [hovered, setHovered] = useState(false);\n\n const handleChange = useCallback(e => onChange(e.target.value), [onChange]);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const shadowBoxPrimaryColor = useMemo(\n () => convert(`color(${primarySkinColor} a(12%))`),\n [primarySkinColor]\n );\n\n return (\n <div\n data-name=\"freeText\"\n className={style.wrapper}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n style={{\n ...(value && {\n boxShadow: hovered ? 'none' : `0 4px 16px ${shadowBoxPrimaryColor}`\n })\n }}\n >\n <input\n data-name=\"free-text-input\"\n type=\"text\"\n aria-label={ariaLabel || value || placeholder}\n className={style.freeText}\n placeholder={placeholder}\n value={value}\n onInput={handleChange}\n onChange={noop}\n style={{\n boxShadow: `0 4px 16px ${shadowBoxPrimaryColor}`,\n ...(value && {\n boxShadow: `0 4px 16px ${\n hovered ? convert(`color(${primarySkinColor} a(20%))`) : shadowBoxPrimaryColor\n }`\n }),\n color: primarySkinColor\n }}\n />\n </div>\n );\n};\n\nFreeText.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nFreeText.propTypes = {\n placeholder: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func,\n 'aria-label': PropTypes.string\n};\n\nexport default FreeText;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACzC,MAAMC,IAAI,GAAG,IAAAC,4BAAA,EAAmBF,aAAnB,CAAb;EACA,MAAM;IAACG,WAAW,GAAG,EAAf;IAAmBC,KAAK,GAAG,EAA3B;IAA+BC,QAAQ,iBAAvC;IAAgD,cAAcC;EAA9D,IAA2EP,KAAjF;EACA,MAAM,CAACQ,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EAEA,MAAMC,YAAY,GAAG,IAAAC,kBAAA,EAAYC,CAAC,IAAIP,QAAQ,CAACO,CAAC,CAACC,MAAF,CAAST,KAAV,CAAzB,EAA2C,CAACC,QAAD,CAA3C,CAArB;EACA,MAAMS,gBAAgB,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCb,IAAnC,CAAzB;EAEA,MAAMc,eAAe,GAAG,IAAAJ,kBAAA,EAAY,MAAMH,UAAU,CAAC,IAAD,CAA5B,EAAoC,CAACA,UAAD,CAApC,CAAxB;EAEA,MAAMQ,gBAAgB,GAAG,IAAAL,kBAAA,EAAY,MAAMH,UAAU,CAAC,KAAD,CAA5B,EAAqC,CAACA,UAAD,CAArC,CAAzB;EAEA,MAAMS,qBAAqB,GAAG,IAAAC,cAAA,EAC5B,MAAM,IAAAC,yBAAA,EAAS,SAAQL,gBAAiB,UAAlC,CADsB,EAE5B,CAACA,gBAAD,CAF4B,CAA9B;EAKA,oBACE;IACE,aAAU,UADZ;IAEE,SAAS,EAAEM,cAAA,CAAMC,OAFnB;IAGE,WAAW,EAAEN,eAHf;IAIE,YAAY,EAAEC,gBAJhB;IAKE,KAAK,eACCZ,KAAK,IAAI;MACXkB,SAAS,EAAEf,OAAO,GAAG,MAAH,GAAa,cAAaU,qBAAsB;IADvD,CADV;
|
|
1
|
+
{"version":3,"file":"index.js","names":["FreeText","props","legacyContext","skin","GetSkinFromContext","placeholder","value","onChange","ariaLabel","hovered","setHovered","useState","handleChange","useCallback","e","target","primarySkinColor","handleMouseOver","handleMouseLeave","shadowBoxPrimaryColor","useMemo","convert","style","wrapper","boxShadow","freeText","color","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","func"],"sources":["../../../../src/molecule/questions/free-text/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, getOr} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport style from './style.css';\n\nconst FreeText = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const {placeholder = '', value = '', onChange = noop, 'aria-label': ariaLabel} = props;\n const [hovered, setHovered] = useState(false);\n\n const handleChange = useCallback(e => onChange(e.target.value), [onChange]);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const shadowBoxPrimaryColor = useMemo(\n () => convert(`color(${primarySkinColor} a(12%))`),\n [primarySkinColor]\n );\n\n return (\n <div\n data-name=\"freeText\"\n className={style.wrapper}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n style={{\n ...(value && {\n boxShadow: hovered ? 'none' : `0 4px 16px ${shadowBoxPrimaryColor}`\n })\n }}\n role=\"group\"\n >\n <input\n data-name=\"free-text-input\"\n type=\"text\"\n aria-label={ariaLabel || value || placeholder}\n className={style.freeText}\n placeholder={placeholder}\n value={value}\n onInput={handleChange}\n onChange={noop}\n style={{\n boxShadow: `0 4px 16px ${shadowBoxPrimaryColor}`,\n ...(value && {\n boxShadow: `0 4px 16px ${\n hovered ? convert(`color(${primarySkinColor} a(20%))`) : shadowBoxPrimaryColor\n }`\n }),\n color: primarySkinColor\n }}\n />\n </div>\n );\n};\n\nFreeText.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nFreeText.propTypes = {\n placeholder: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func,\n 'aria-label': PropTypes.string\n};\n\nexport default FreeText;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACzC,MAAMC,IAAI,GAAG,IAAAC,4BAAA,EAAmBF,aAAnB,CAAb;EACA,MAAM;IAACG,WAAW,GAAG,EAAf;IAAmBC,KAAK,GAAG,EAA3B;IAA+BC,QAAQ,iBAAvC;IAAgD,cAAcC;EAA9D,IAA2EP,KAAjF;EACA,MAAM,CAACQ,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EAEA,MAAMC,YAAY,GAAG,IAAAC,kBAAA,EAAYC,CAAC,IAAIP,QAAQ,CAACO,CAAC,CAACC,MAAF,C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AAQ,CAAC2B,YAAT,GAAwB;EACtBxB,IAAI,EAAEyB,iBAAA,CAASC,iBAAT,CAA2B1B;AADX,CAAxB;AAIAH,QAAQ,CAAC8B,SAAT,2CAAqB;EACnBzB,WAAW,EAAE0B,kBAAA,CAAUC,MADJ;EAEnB1B,KAAK,EAAEyB,kBAAA,CAAUC,MAFE;EAGnBzB,QAAQ,EAAEwB,kBAAA,CAAUE,IAHD;EAInB,cAAcF,kBAAA,CAAUC;AAJL,CAArB;eAOehC,Q"}
|
|
@@ -74,7 +74,8 @@ const QCM = (props, legacyContext) => {
|
|
|
74
74
|
}), [answers, longestAnswer, primarySkinColor]);
|
|
75
75
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
76
76
|
"data-name": "qcm",
|
|
77
|
-
className: _style.default.wrapper
|
|
77
|
+
className: _style.default.wrapper,
|
|
78
|
+
role: "group"
|
|
78
79
|
}, answersViews);
|
|
79
80
|
};
|
|
80
81
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["QCM","props","legacyContext","answers","longestAnswer","maxBy","title","length","skin","GetSkinFromContext","primarySkinColor","getOr","answersViews","useMemo","map","answer","key","onClick","selected","ariaLabel","longAnswerClass","style","selectedAnswerClass","selectedAnswer","unselectedAnswer","classnames","innerHTML","boxShadow","getShadowBoxColorFromPrimary","backgroundColor","background","answerText","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport maxBy from 'lodash/fp/maxBy';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCM = (props, legacyContext) => {\n const {answers} = props;\n const longestAnswer = maxBy(({title}) => title.length, answers);\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = useMemo(\n () =>\n answers.map((answer, key) => {\n const {onClick, title, selected, 'aria-label': ariaLabel} = answer;\n const longAnswerClass = longestAnswer.title === title ? style.longestAnswer : style.answer;\n const selectedAnswerClass = selected ? style.selectedAnswer : style.unselectedAnswer;\n\n return (\n <div\n data-name=\"answer\"\n aria-label={ariaLabel || title}\n className={classnames(longAnswerClass, style.innerHTML, selectedAnswerClass)}\n onClick={onClick}\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n data-selected={selected}\n key={key}\n >\n <div\n data-name=\"answer-background\"\n style={{backgroundColor: selected ? primarySkinColor : '#F4F4F5' /* cm_grey_75 */}}\n className={style.background}\n />\n <span\n data-name=\"answer-label\"\n className={style.answerText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n );\n }),\n [answers, longestAnswer, primarySkinColor]\n );\n\n return (\n <div data-name=\"qcm\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCM.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCM.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n )\n};\n\nexport default QCM;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,GAAG,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACpC,MAAM;IAACC;EAAD,IAAYF,KAAlB;EACA,MAAMG,aAAa,GAAG,IAAAC,cAAA,EAAM,CAAC;IAACC;EAAD,CAAD,KAAaA,KAAK,CAACC,MAAzB,EAAiCJ,OAAjC,CAAtB;EACA,MAAMK,IAAI,GAAG,IAAAC,4BAAA,E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BAAzB,CAnCmB,CAArB;EAsCA,oBACE;IAAK,aAAU,KAAf;IAAqB,SAAS,EAAEW,cAAA,CAAMY;
|
|
1
|
+
{"version":3,"file":"index.js","names":["QCM","props","legacyContext","answers","longestAnswer","maxBy","title","length","skin","GetSkinFromContext","primarySkinColor","getOr","answersViews","useMemo","map","answer","key","onClick","selected","ariaLabel","longAnswerClass","style","selectedAnswerClass","selectedAnswer","unselectedAnswer","classnames","innerHTML","boxShadow","getShadowBoxColorFromPrimary","backgroundColor","background","answerText","__html","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport maxBy from 'lodash/fp/maxBy';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCM = (props, legacyContext) => {\n const {answers} = props;\n const longestAnswer = maxBy(({title}) => title.length, answers);\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = useMemo(\n () =>\n answers.map((answer, key) => {\n const {onClick, title, selected, 'aria-label': ariaLabel} = answer;\n const longAnswerClass = longestAnswer.title === title ? style.longestAnswer : style.answer;\n const selectedAnswerClass = selected ? style.selectedAnswer : style.unselectedAnswer;\n\n return (\n <div\n data-name=\"answer\"\n aria-label={ariaLabel || title}\n className={classnames(longAnswerClass, style.innerHTML, selectedAnswerClass)}\n onClick={onClick}\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n data-selected={selected}\n key={key}\n >\n <div\n data-name=\"answer-background\"\n style={{backgroundColor: selected ? primarySkinColor : '#F4F4F5' /* cm_grey_75 */}}\n className={style.background}\n />\n <span\n data-name=\"answer-label\"\n className={style.answerText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n );\n }),\n [answers, longestAnswer, primarySkinColor]\n );\n\n return (\n <div data-name=\"qcm\" className={style.wrapper} role=\"group\">\n {answersViews}\n </div>\n );\n};\n\nQCM.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCM.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n )\n};\n\nexport default QCM;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,GAAG,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACpC,MAAM;IAACC;EAAD,IAAYF,KAAlB;EACA,MAAMG,aAAa,GAAG,IAAAC,cAAA,EAAM,CAAC;IAACC;EAAD,CAAD,KAAaA,KAAK,CAACC,MAAzB,EAAiCJ,OAAjC,CAAtB;EACA,MAAMK,IAAI,GAAG,IAAAC,4BAAA,EAAmBP,aAAnB,CAAb;EACA,MAAMQ,gBAAgB,GAAG,IAAAC,cAAA,EAAM,SAAN,EAAiB,gBAAjB,EAAmCH,IAAnC,CAAzB;EAEA,MAAMI,YAAY,GAAG,IAAAC,cAAA,EACnB,MACEV,OAAO,CAACW,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;IAC3B,MAAM;MAACC,OAAD;MAAUX,KAAV;MAAiBY,QAAjB;MAA2B,cAAcC;IAAzC,IAAsDJ,MAA5D;IACA,MAAMK,eAAe,GAAGhB,aAAa,CAACE,KAAd,KAAwBA,KAAxB,GAAgCe,cAAA,CAAMjB,aAAtC,GAAsDiB,cAAA,CAAMN,MAApF;IACA,MAAMO,mBAAmB,GAAGJ,QAAQ,GAAGG,cAAA,CAAME,cAAT,GAA0BF,cAAA,CAAMG,gBAAp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UG;EAJV,CAAhB,CADO;AADK,CAAhB;eAWezC,G"}
|
|
@@ -141,7 +141,8 @@ const QcmDrag = ({
|
|
|
141
141
|
const skin = (0, _provider.GetSkinFromContext)(legacyContext);
|
|
142
142
|
const primarySkinColor = (0, _getOr2.default)('#00B0FF', 'common.primary', skin);
|
|
143
143
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
144
|
-
className: _style.default.wrapper
|
|
144
|
+
className: _style.default.wrapper,
|
|
145
|
+
role: "group"
|
|
145
146
|
}, /*#__PURE__*/_react.default.createElement(SelectedAnswerSections, {
|
|
146
147
|
answers: answers,
|
|
147
148
|
help: help,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["AnswersPropTypes","PropTypes","arrayOf","shape","onClick","func","order","number","selected","bool","title","string","help","EmptyView","style","emptySpan","propTypes","Choices","answers","answersViews","map","answer","key","classnames","invisibleAnswer","unselected","innerHTML","__html","choices","SelectedAnswerSections","backgroundColor","selectedAnswers","selectedAnswersViews","boxShadow","getShadowBoxColorFromPrimary","background","content","selectedAnswerText","length","emptyAnswers","QcmDrag","legacyContext","skin","GetSkinFromContext","primarySkinColor","wrapper","contextTypes","Provider","childContextTypes"],"sources":["../../../../src/molecule/questions/qcm-drag/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {pipe, filter, orderBy, getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst AnswersPropTypes = PropTypes.arrayOf(\n PropTypes.shape({\n onClick: PropTypes.func,\n order: PropTypes.number,\n selected: PropTypes.bool,\n title: PropTypes.string,\n help: PropTypes.string\n })\n);\n\nconst EmptyView = ({help}) => <span className={style.emptySpan}>{help}</span>;\n\nEmptyView.propTypes = {\n help: PropTypes.string\n};\n\nconst Choices = ({answers}) => {\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected} = answer;\n return (\n <div\n className={classnames(selected ? style.invisibleAnswer : style.unselected, style.innerHTML)}\n data-name=\"answer\"\n onClick={onClick}\n key={key}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n );\n });\n\n return <div className={style.choices}>{answersViews}</div>;\n};\n\nChoices.propTypes = {\n answers: AnswersPropTypes\n};\n\nconst SelectedAnswerSections = ({answers, help, backgroundColor}) => {\n const selectedAnswers = pipe(filter('selected'), orderBy('order', 'asc'))(answers);\n const selectedAnswersViews = selectedAnswers.map((answer, key) => {\n const {onClick, title} = answer;\n return (\n <div\n data-selected=\"true\"\n onClick={onClick}\n key={key}\n data-name=\"selectedAnswer\"\n className={style.selected}\n style={{\n boxShadow: `0px 4px 16px ${getShadowBoxColorFromPrimary(backgroundColor)}`\n }}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor\n }}\n className={style.background}\n />\n <div className={style.content}>\n <span\n data-name=\"answerContent\"\n className={classnames(style.selectedAnswerText, style.innerHTML)}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n );\n });\n\n if (selectedAnswersViews.length > 0) {\n return <div className={style.selectedAnswers}>{selectedAnswersViews}</div>;\n } else {\n return (\n <div className={style.emptyAnswers}>\n <EmptyView help={help} />\n </div>\n );\n }\n};\n\nSelectedAnswerSections.propTypes = {\n answers: AnswersPropTypes,\n help: EmptyView.propTypes.help,\n backgroundColor: PropTypes.string\n};\n\nconst QcmDrag = ({answers, help}, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n return (\n <div className={style.wrapper}>\n <SelectedAnswerSections answers={answers} help={help} backgroundColor={primarySkinColor} />\n <div data-name=\"qcm-drag-answers\" className={style.answers}>\n <Choices answers={answers} />\n </div>\n </div>\n );\n};\n\nQcmDrag.propTypes = {\n answers: AnswersPropTypes,\n help: SelectedAnswerSections.propTypes.help\n};\n\nQcmDrag.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default QcmDrag;\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAN,2CAAyBC,kBAAA,CAAUC,OAAV,CACvBD,kBAAA,CAAUE,KAAV,CAAgB;EACdC,OAAO,EAAEH,kBAAA,CAAUI,IADL;EAEdC,KAAK,EAAEL,kBAAA,CAAUM,MAFH;EAGdC,QAAQ,EAAEP,kBAAA,CAAUQ,IAHN;EAIdC,KAAK,EAAET,kBAAA,CAAUU,MAJH;EAKdC,IAAI,EAAEX,kBAAA,CAAUU;AALF,CAAhB,CADuB,CAAzB;;AAUA,MAAME,SAAS,GAAG,CAAC;EAACD;AAAD,CAAD,kBAAY;EAAM,SAAS,EAAEE,cAAA,CAAMC;AAAvB,GAAmCH,IAAnC,CAA9B;;AAEAC,SAAS,CAACG,SAAV,2CAAsB;EACpBJ,IAAI,EAAEX,kBAAA,CAAUU;AADI,CAAtB;;AAIA,MAAMM,OAAO,GAAG,CAAC;EAACC;AAAD,CAAD,KAAe;EAC7B,MAAMC,YAAY,GAAGD,OAAO,CAACE,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;IAChD,MAAM;MAAClB,OAAD;MAAUM,KAAV;MAAiBF;IAAjB,IAA6Ba,MAAnC;IACA,oBACE;MACE,SAAS,EAAE,IAAAE,mBAAA,EAAWf,QAAQ,GAAGM,cAAA,CAAMU,eAAT,GAA2BV,cAAA,CAAMW,UAApD,EAAgEX,cAAA,CAAMY,SAAtE,CADb;MAEE,aAAU,QAFZ;MAGE,OAAO,EAAEtB,OAHX;MAIE,GAAG,EAAEkB,GAJP,CAKE;MALF;MAME,uBAAuB,EAAE;QAACK,MAAM,EAAEjB;MAAT;IAN3B,EADF;EAUD,CAZoB,CAArB;EAcA,oBAAO;IAAK,SAAS,EAAEI,cAAA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AAxC,CAAP;EACD,CAFD,MAEO;IACL,oBACE;MAAK,SAAS,EAAElB,cAAA,CAAMyB;IAAtB,gBACE,6BAAC,SAAD;MAAW,IAAI,EAAE3B;IAAjB,EADF,CADF;EAKD;AACF,CA5CD;;AA8CAiB,sBAAsB,CAACb,SAAvB,2CAAmC;EACjCE,OAAO,EAAElB,gBADwB;EAEjCY,IAAI,EAAEC,SAAS,CAACG,SAAV,CAAoBJ,IAFO;EAGjCkB,eAAe,EAAE7B,kBAAA,CAAUU;AAHM,CAAnC;;AAMA,MAAM6B,OAAO,GAAG,CAAC;EAACtB,OAAD;EAAUN;AAAV,CAAD,EAAkB6B,aAAlB,KAAoC;EAClD,MAAMC,IAAI,GAAG,IAAAC,4BAAA,EAAmBF,aAAnB,CAAb;EACA,MAAMG,gBAAgB,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCF,IAAnC,CAAzB;EAEA,oBACE;IAAK,SAAS,EAAE5B,cAAA,CAAM+B;
|
|
1
|
+
{"version":3,"file":"index.js","names":["AnswersPropTypes","PropTypes","arrayOf","shape","onClick","func","order","number","selected","bool","title","string","help","EmptyView","style","emptySpan","propTypes","Choices","answers","answersViews","map","answer","key","classnames","invisibleAnswer","unselected","innerHTML","__html","choices","SelectedAnswerSections","backgroundColor","selectedAnswers","selectedAnswersViews","boxShadow","getShadowBoxColorFromPrimary","background","content","selectedAnswerText","length","emptyAnswers","QcmDrag","legacyContext","skin","GetSkinFromContext","primarySkinColor","wrapper","contextTypes","Provider","childContextTypes"],"sources":["../../../../src/molecule/questions/qcm-drag/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {pipe, filter, orderBy, getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst AnswersPropTypes = PropTypes.arrayOf(\n PropTypes.shape({\n onClick: PropTypes.func,\n order: PropTypes.number,\n selected: PropTypes.bool,\n title: PropTypes.string,\n help: PropTypes.string\n })\n);\n\nconst EmptyView = ({help}) => <span className={style.emptySpan}>{help}</span>;\n\nEmptyView.propTypes = {\n help: PropTypes.string\n};\n\nconst Choices = ({answers}) => {\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected} = answer;\n return (\n <div\n className={classnames(selected ? style.invisibleAnswer : style.unselected, style.innerHTML)}\n data-name=\"answer\"\n onClick={onClick}\n key={key}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n );\n });\n\n return <div className={style.choices}>{answersViews}</div>;\n};\n\nChoices.propTypes = {\n answers: AnswersPropTypes\n};\n\nconst SelectedAnswerSections = ({answers, help, backgroundColor}) => {\n const selectedAnswers = pipe(filter('selected'), orderBy('order', 'asc'))(answers);\n const selectedAnswersViews = selectedAnswers.map((answer, key) => {\n const {onClick, title} = answer;\n return (\n <div\n data-selected=\"true\"\n onClick={onClick}\n key={key}\n data-name=\"selectedAnswer\"\n className={style.selected}\n style={{\n boxShadow: `0px 4px 16px ${getShadowBoxColorFromPrimary(backgroundColor)}`\n }}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor\n }}\n className={style.background}\n />\n <div className={style.content}>\n <span\n data-name=\"answerContent\"\n className={classnames(style.selectedAnswerText, style.innerHTML)}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n );\n });\n\n if (selectedAnswersViews.length > 0) {\n return <div className={style.selectedAnswers}>{selectedAnswersViews}</div>;\n } else {\n return (\n <div className={style.emptyAnswers}>\n <EmptyView help={help} />\n </div>\n );\n }\n};\n\nSelectedAnswerSections.propTypes = {\n answers: AnswersPropTypes,\n help: EmptyView.propTypes.help,\n backgroundColor: PropTypes.string\n};\n\nconst QcmDrag = ({answers, help}, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n return (\n <div className={style.wrapper} role=\"group\">\n <SelectedAnswerSections answers={answers} help={help} backgroundColor={primarySkinColor} />\n <div data-name=\"qcm-drag-answers\" className={style.answers}>\n <Choices answers={answers} />\n </div>\n </div>\n );\n};\n\nQcmDrag.propTypes = {\n answers: AnswersPropTypes,\n help: SelectedAnswerSections.propTypes.help\n};\n\nQcmDrag.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default QcmDrag;\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAN,2CAAyBC,kBAAA,CAAUC,OAAV,CACvBD,kBAAA,CAAUE,KAAV,CAAgB;EACdC,OAAO,EAAEH,kBAAA,CAAUI,IADL;EAEdC,KAAK,EAAEL,kBAAA,CAAUM,MAFH;EAGdC,QAAQ,EAAEP,kBAAA,CAAUQ,IAHN;EAIdC,KAAK,EAAET,kBAAA,CAAUU,MAJH;EAKdC,IAAI,EAAEX,kBAAA,CAAUU;AALF,CAAhB,CADuB,CAAzB;;AAUA,MAAME,SAAS,GAAG,CAAC;EAACD;AAAD,CAAD,kBAAY;EAAM,SAAS,EAAEE,cAAA,CAAMC;AAAvB,GAAmCH,IAAnC,CAA9B;;AAEAC,SAAS,CAACG,SAAV,2CAAsB;EACpBJ,IAAI,EAAEX,kBAAA,CAAUU;AADI,CAAtB;;AAIA,MAAMM,OAAO,GAAG,CAAC;EAACC;AAAD,CAAD,KAAe;EAC7B,MAAMC,YAAY,GAAGD,OAAO,CAACE,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;IAChD,MAAM;MAAClB,OAAD;MAAUM,KAAV;MAAiBF;IAAjB,IAA6Ba,MAAnC;IACA,oBACE;MACE,SAAS,EAAE,IAAAE,mBAAA,EAAWf,QAAQ,GAAGM,cAAA,CAAMU,eAAT,GAA2BV,cAAA,CAAMW,UAApD,EAAgEX,cAAA,CAAMY,SAAtE,CADb;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