@coorpacademy/components 11.18.4-alpha.4 → 11.18.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.
- package/es/atom/picture-background/index.d.ts +1 -0
- package/es/atom/picture-background/index.js +10 -5
- package/es/atom/picture-background/index.js.map +1 -1
- package/es/molecule/answer/index.js +15 -12
- package/es/molecule/answer/index.js.map +1 -1
- package/es/molecule/answer/prop-types.d.ts +2 -0
- package/es/molecule/answer/prop-types.d.ts.map +1 -1
- package/es/molecule/answer/prop-types.js +1 -0
- package/es/molecule/answer/prop-types.js.map +1 -1
- package/es/molecule/card/index.d.ts.map +1 -1
- package/es/molecule/card/index.js +9 -10
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/style.css +5 -41
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +9 -45
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +0 -29
- package/es/molecule/cm-popin/types.d.ts +1 -31
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.js +3 -13
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/molecule/questions/qcm-drag/index.js +1 -2
- package/es/molecule/questions/qcm-drag/index.js.map +1 -1
- package/es/organism/review-slide/index.js +1 -0
- package/es/organism/review-slide/index.js.map +1 -1
- package/es/organism/review-slide/prop-types.d.ts +2 -0
- package/es/organism/review-slide/prop-types.d.ts.map +1 -1
- package/es/organism/review-stacked-slides/prop-types.d.ts +5 -0
- package/es/organism/review-stacked-slides/prop-types.d.ts.map +1 -1
- package/es/template/app-player/loading/index.d.ts +1 -19
- package/es/template/app-player/player/index.d.ts +2 -38
- package/es/template/app-player/player/slides/index.d.ts +5 -20
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/player/slides/index.js +5 -2
- package/es/template/app-player/player/slides/index.js.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +1 -19
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +1 -19
- package/es/template/app-review/index.d.ts +6 -19
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +6 -19
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +6 -19
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +1 -19
- package/es/template/common/dashboard/index.d.ts +1 -89
- package/es/template/common/dashboard/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.js +2 -4
- package/es/template/common/dashboard/index.js.map +1 -1
- package/es/template/common/search-page/index.d.ts +0 -70
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +3 -8
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/common/search-page/style.css +0 -5
- package/es/template/external-course/index.d.ts +1 -19
- package/es/variables/colors.css +1 -1
- package/lib/atom/picture-background/index.d.ts +1 -0
- package/lib/atom/picture-background/index.js +10 -5
- package/lib/atom/picture-background/index.js.map +1 -1
- package/lib/molecule/answer/index.js +15 -12
- package/lib/molecule/answer/index.js.map +1 -1
- package/lib/molecule/answer/prop-types.d.ts +2 -0
- package/lib/molecule/answer/prop-types.d.ts.map +1 -1
- package/lib/molecule/answer/prop-types.js +1 -0
- package/lib/molecule/answer/prop-types.js.map +1 -1
- package/lib/molecule/card/index.d.ts.map +1 -1
- package/lib/molecule/card/index.js +7 -9
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/style.css +5 -41
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +8 -47
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +0 -29
- package/lib/molecule/cm-popin/types.d.ts +1 -31
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.js +3 -15
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/molecule/questions/qcm-drag/index.js +1 -2
- package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
- package/lib/organism/review-slide/index.js +1 -0
- package/lib/organism/review-slide/index.js.map +1 -1
- package/lib/organism/review-slide/prop-types.d.ts +2 -0
- package/lib/organism/review-slide/prop-types.d.ts.map +1 -1
- package/lib/organism/review-stacked-slides/prop-types.d.ts +5 -0
- package/lib/organism/review-stacked-slides/prop-types.d.ts.map +1 -1
- package/lib/template/app-player/loading/index.d.ts +1 -19
- package/lib/template/app-player/player/index.d.ts +2 -38
- package/lib/template/app-player/player/slides/index.d.ts +5 -20
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/player/slides/index.js +5 -2
- package/lib/template/app-player/player/slides/index.js.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +1 -19
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +1 -19
- package/lib/template/app-review/index.d.ts +6 -19
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +6 -19
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +6 -19
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +1 -19
- package/lib/template/common/dashboard/index.d.ts +1 -89
- package/lib/template/common/dashboard/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.js +2 -4
- package/lib/template/common/dashboard/index.js.map +1 -1
- package/lib/template/common/search-page/index.d.ts +0 -70
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +3 -9
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/common/search-page/style.css +0 -5
- package/lib/template/external-course/index.d.ts +1 -19
- package/lib/variables/colors.css +1 -1
- package/package.json +2 -2
- package/es/atom/title/types.d.ts +0 -9
- package/es/atom/title/types.d.ts.map +0 -1
- package/es/atom/title/types.js +0 -2
- package/es/atom/title/types.js.map +0 -1
- package/lib/atom/title/types.d.ts +0 -9
- package/lib/atom/title/types.d.ts.map +0 -1
- package/lib/atom/title/types.js +0 -2
- package/lib/atom/title/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","klf","getOr","information","label","message","next","get","onClick","_correctionPopinProps","type","resultLabel","classnames","style","correctionPopinWrapper","popinAnimation","propTypes","PropTypes","string","bool","ValidateButton","validateButton","primarySkinColor","ariaLabel","disabled","validateButtonProps","className","customStyle","backgroundColor","useEffect","keyDownHandler","event","key","preventDefault","document","addEventListener","removeEventListener","validateButtonWrapper","QuestionContainer","props","answerUI","questionText","questionOrigin","disableContent","slideContentContainer","disabledSlideContent","question","__html","help","answerContainer","shape","slide","ReviewSlide","legacyContext","skin","GetSkinFromContext","translate","GetTranslateFromContext","validateariaLabel","useMemo","loading","loadingAriaLabel","parentContentTitle","disabledContent","loader","contextTypes","Provider","childContextTypes"],"sources":["../../../src/organism/review-slide/index.js"],"sourcesContent":["import React, {useMemo, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport Answer from '../../molecule/answer';\nimport ButtonLink from '../../atom/button-link';\nimport Loader from '../../atom/loader';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin';\nimport Provider, {GetSkinFromContext, GetTranslateFromContext} from '../../atom/provider';\nimport propTypes from './prop-types';\nimport style from './style.css';\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}) => {\n if (!showCorrectionPopin) return null;\n\n const klf = getOr({}, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n return (\n <div\n className={classnames(\n style.correctionPopinWrapper,\n animateCorrectionPopin ? style.popinAnimation : null\n )}\n >\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </div>\n );\n};\n\nCorrectionPopin.propTypes = {\n slideIndex: PropTypes.string,\n showCorrectionPopin: PropTypes.bool,\n animateCorrectionPopin: PropTypes.bool,\n correctionPopinProps: propTypes.correctionPopinProps\n};\n\nconst ValidateButton = ({slideIndex, validateButton, primarySkinColor, ariaLabel}) => {\n const {label, onClick, disabled} = validateButton;\n const validateButtonProps = {\n type: 'primary',\n label,\n 'aria-label': ariaLabel,\n 'data-name': `slide-validate-button-${slideIndex}`,\n onClick,\n disabled,\n className: style.validateButton,\n customStyle: {\n backgroundColor: primarySkinColor\n }\n };\n\n /* istanbul ignore next */\n useEffect(() => {\n const keyDownHandler = event => {\n if (event.key === 'Enter' || (event.key === ' ' && disabled)) {\n event.preventDefault();\n }\n };\n document.addEventListener('keydown', keyDownHandler);\n return () => {\n document.removeEventListener('keydown', keyDownHandler);\n };\n }, [disabled]);\n\n return (\n <div key=\"button-wrapper\" className={style.validateButtonWrapper}>\n <ButtonLink {...validateButtonProps} />\n </div>\n );\n};\n\nValidateButton.propTypes = {\n slideIndex: PropTypes.string,\n validateButton: propTypes.validateButton,\n primarySkinColor: PropTypes.string,\n ariaLabel: PropTypes.string\n};\n\nconst QuestionContainer = props => {\n const {answerUI, questionText, questionOrigin, disableContent} = props;\n if (!answerUI || !questionText) return null;\n\n return (\n <div\n key=\"content-container\"\n data-testid=\"content-container\"\n className={classnames(\n style.slideContentContainer,\n disableContent ? style.disabledSlideContent : null\n )}\n >\n <div key=\"from-course\" className={style.questionOrigin}>\n {questionOrigin}\n </div>\n <div\n key=\"title\"\n data-testid=\"slide-question\"\n className={style.question}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: questionText}}\n />\n <div\n key=\"help\"\n className={style.help}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: get('help', answerUI)}}\n />\n <div key=\"answer-container\" className={style.answerContainer}>\n <Answer {...answerUI} key=\"answer\" />\n </div>\n </div>\n );\n};\n\nQuestionContainer.propTypes = {\n answerUI: PropTypes.shape(propTypes.slide.answerUI),\n questionText: PropTypes.string,\n questionOrigin: PropTypes.string,\n disableContent: PropTypes.bool\n};\n\nconst ReviewSlide = (props, legacyContext) => {\n const {slide, validateButton, correctionPopinProps, slideIndex = '0'} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const translate = GetTranslateFromContext(legacyContext);\n\n const validateariaLabel = translate('validate_aria_label');\n const primarySkinColor = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const {\n loading,\n loadingAriaLabel,\n parentContentTitle,\n questionText,\n disabledContent,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n return (\n <div data-testid=\"review-slide\" className={style.slide}>\n {loading ? (\n <Loader className={style.loader} theme=\"default\" aria-label={loadingAriaLabel} />\n ) : (\n <>\n <QuestionContainer\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n disableContent={disabledContent}\n key=\"question-container\"\n />\n <ValidateButton\n slideIndex={slideIndex}\n validateButton={validateButton}\n primarySkinColor={primarySkinColor}\n key=\"validate-button\"\n ariaLabel={validateariaLabel}\n />\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n </>\n )}\n </div>\n );\n};\n\nReviewSlide.propTypes = propTypes;\n\nReviewSlide.contextTypes = {\n skin: Provider.childContextT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IAEE,cAAc,EAAEuB,cAFlB;IAGE,gBAAgB,EAAEC,gBAHpB;IAIE,GAAG,EAAC,iBAJN;IAKE,SAAS,EAAEoC;EALb,EARF,eAeE,6BAAC,eAAD;IACE,oBAAoB,EAAE7D,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EAfF,CAJJ,CADF;AA+BD,CAlDD;;AAoDAoD,WAAW,CAACpC,SAAZ,2CAAwBA,mBAAxB;AAEAoC,WAAW,CAACa,YAAZ,GAA2B;EACzBX,IAAI,EAAEY,iBAAA,CAASC,iBAAT,CAA2Bb,IADR;EAEzBE,SAAS,EAAEU,iBAAA,CAASC,iBAAT,CAA2BX;AAFb,CAA3B;eAKeJ,W"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","klf","getOr","information","label","message","next","get","onClick","_correctionPopinProps","type","resultLabel","classnames","style","correctionPopinWrapper","popinAnimation","propTypes","PropTypes","string","bool","ValidateButton","validateButton","primarySkinColor","ariaLabel","disabled","validateButtonProps","className","customStyle","backgroundColor","useEffect","keyDownHandler","event","key","preventDefault","document","addEventListener","removeEventListener","validateButtonWrapper","QuestionContainer","props","answerUI","questionText","questionOrigin","disableContent","slideContentContainer","disabledSlideContent","question","__html","help","answerContainer","shape","slide","ReviewSlide","legacyContext","skin","GetSkinFromContext","translate","GetTranslateFromContext","validateariaLabel","useMemo","loading","loadingAriaLabel","parentContentTitle","disabledContent","loader","contextTypes","Provider","childContextTypes"],"sources":["../../../src/organism/review-slide/index.js"],"sourcesContent":["import React, {useMemo, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport Answer from '../../molecule/answer';\nimport ButtonLink from '../../atom/button-link';\nimport Loader from '../../atom/loader';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin';\nimport Provider, {GetSkinFromContext, GetTranslateFromContext} from '../../atom/provider';\nimport propTypes from './prop-types';\nimport style from './style.css';\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}) => {\n if (!showCorrectionPopin) return null;\n\n const klf = getOr({}, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n return (\n <div\n className={classnames(\n style.correctionPopinWrapper,\n animateCorrectionPopin ? style.popinAnimation : null\n )}\n >\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </div>\n );\n};\n\nCorrectionPopin.propTypes = {\n slideIndex: PropTypes.string,\n showCorrectionPopin: PropTypes.bool,\n animateCorrectionPopin: PropTypes.bool,\n correctionPopinProps: propTypes.correctionPopinProps\n};\n\nconst ValidateButton = ({slideIndex, validateButton, primarySkinColor, ariaLabel}) => {\n const {label, onClick, disabled} = validateButton;\n const validateButtonProps = {\n type: 'primary',\n label,\n 'aria-label': ariaLabel,\n 'data-name': `slide-validate-button-${slideIndex}`,\n onClick,\n disabled,\n className: style.validateButton,\n customStyle: {\n backgroundColor: primarySkinColor\n }\n };\n\n /* istanbul ignore next */\n useEffect(() => {\n const keyDownHandler = event => {\n if (event.key === 'Enter' || (event.key === ' ' && disabled)) {\n event.preventDefault();\n }\n };\n document.addEventListener('keydown', keyDownHandler);\n return () => {\n document.removeEventListener('keydown', keyDownHandler);\n };\n }, [disabled]);\n\n return (\n <div key=\"button-wrapper\" className={style.validateButtonWrapper}>\n <ButtonLink {...validateButtonProps} />\n </div>\n );\n};\n\nValidateButton.propTypes = {\n slideIndex: PropTypes.string,\n validateButton: propTypes.validateButton,\n primarySkinColor: PropTypes.string,\n ariaLabel: PropTypes.string\n};\n\nconst QuestionContainer = props => {\n const {answerUI, questionText, questionOrigin, disableContent} = props;\n if (!answerUI || !questionText) return null;\n\n return (\n <div\n key=\"content-container\"\n data-testid=\"content-container\"\n className={classnames(\n style.slideContentContainer,\n disableContent ? style.disabledSlideContent : null\n )}\n >\n <div key=\"from-course\" className={style.questionOrigin}>\n {questionOrigin}\n </div>\n <div\n key=\"title\"\n data-testid=\"slide-question\"\n className={style.question}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: questionText}}\n />\n <div\n key=\"help\"\n className={style.help}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: get('help', answerUI)}}\n />\n <div key=\"answer-container\" className={style.answerContainer}>\n <Answer {...answerUI} question={questionText} key=\"answer\" />\n </div>\n </div>\n );\n};\n\nQuestionContainer.propTypes = {\n answerUI: PropTypes.shape(propTypes.slide.answerUI),\n questionText: PropTypes.string,\n questionOrigin: PropTypes.string,\n disableContent: PropTypes.bool\n};\n\nconst ReviewSlide = (props, legacyContext) => {\n const {slide, validateButton, correctionPopinProps, slideIndex = '0'} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const translate = GetTranslateFromContext(legacyContext);\n\n const validateariaLabel = translate('validate_aria_label');\n const primarySkinColor = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const {\n loading,\n loadingAriaLabel,\n parentContentTitle,\n questionText,\n disabledContent,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n return (\n <div data-testid=\"review-slide\" className={style.slide}>\n {loading ? (\n <Loader className={style.loader} theme=\"default\" aria-label={loadingAriaLabel} />\n ) : (\n <>\n <QuestionContainer\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n disableContent={disabledContent}\n key=\"question-container\"\n />\n <ValidateButton\n slideIndex={slideIndex}\n validateButton={validateButton}\n primarySkinColor={primarySkinColor}\n key=\"validate-button\"\n ariaLabel={validateariaLabel}\n />\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n </>\n )}\n </div>\n );\n};\n\nReviewSlide.propTypes = propTypes;\n\nReviewSlide.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nexport default ReviewSlide;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,eAAe,GAAG,CAAC;EACvBC,oBADuB;EAEvBC,UAFuB;EAGvBC,mBAHuB;EAIvBC;AAJuB,CAAD,KAKlB;EACJ,IAAI,CAACD,mBAAL,EAA0B,OAAO,IAAP;EAE1B,MAAME,GAAG,GAAG,IAAAC,cAAA,EAAM,EAAN,EAAU,KAAV,EAAiBL,oBAAjB,CAAZ;EACA,MAAMM,WAAW,GAAG,IAAAD,cAAA,EAAM;IAACE,KAAK,EAAE,EAAR;IAAYC,OAAO,EAAE;EAArB,CAAN,EAAgC,aAAhC,EAA+CR,oBAA/C,CAApB;EACA,MAAMS,IAAI,GAAG,IAAAC,YAAA,EAAI,MAAJ,EAAYV,oBAAZ,CAAb;EACA,MAAMW,OAAO,GAAG,IAAAD,YAAA,EAAI,CAAC,MAAD,EAAS,SAAT,CAAJ,EAAyBV,oBAAzB,CAAhB;EAEA,MAAMY,qBAAqB,GAAG;IAC5BH,IAAI,EAAE;MACJE,OADI;MAEJJ,KAAK,EAAEE,IAAI,IAAIA,IAAI,CAACF,KAFhB;MAGJ,aAAc,wBAAuBN,UAAW,EAH5C;MAIJ,cAAcQ,IAAI,IAAIA,IAAI,CAAC,YAAD;IAJtB,CADsB;IAO5BL,GAP4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sC;EAAjD,GACGS,OAAO,gBACN,6BAAC,eAAD;IAAQ,SAAS,EAAE/C,cAAA,CAAMmD,MAAzB;IAAiC,KAAK,EAAC,SAAvC;IAAiD,cAAYH;EAA7D,EADM,gBAGN,yEACE,6BAAC,iBAAD;IACE,cAAc,EAAEC,kBADlB;IAEE,YAAY,EAAErB,YAFhB;IAGE,QAAQ,EAAED,QAHZ;IAIE,cAAc,EAAEuB,eAJlB;IAKE,GAAG,EAAC;EALN,EADF,eAQE,6BAAC,cAAD;IACE,UAAU,EAAEjE,UADd;IAEE,cAAc,EAAEuB,cAFlB;IAGE,gBAAgB,EAAEC,gBAHpB;IAIE,GAAG,EAAC,iBAJN;IAKE,SAAS,EAAEoC;EALb,EARF,eAeE,6BAAC,eAAD;IACE,oBAAoB,EAAE7D,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EAfF,CAJJ,CADF;AA+BD,CAlDD;;AAoDAoD,WAAW,CAACpC,SAAZ,2CAAwBA,mBAAxB;AAEAoC,WAAW,CAACa,YAAZ,GAA2B;EACzBX,IAAI,EAAEY,iBAAA,CAASC,iBAAT,CAA2Bb,IADR;EAEzBE,SAAS,EAAEU,iBAAA,CAASC,iBAAT,CAA2BX;AAFb,CAA3B;eAKeJ,W"}
|
|
@@ -35,6 +35,7 @@ export declare const SlidePropsTypes: PropTypes.Requireable<PropTypes.InferProps
|
|
|
35
35
|
}> | null | undefined)[]>;
|
|
36
36
|
}>>>;
|
|
37
37
|
help: PropTypes.Requireable<string>;
|
|
38
|
+
question: PropTypes.Requireable<string>;
|
|
38
39
|
media: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
39
40
|
type: PropTypes.Validator<string>;
|
|
40
41
|
id: PropTypes.Requireable<string>;
|
|
@@ -113,6 +114,7 @@ declare const propTypes: {
|
|
|
113
114
|
}> | null | undefined)[]>;
|
|
114
115
|
}>>>;
|
|
115
116
|
help: PropTypes.Requireable<string>;
|
|
117
|
+
question: PropTypes.Requireable<string>;
|
|
116
118
|
media: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
117
119
|
type: PropTypes.Validator<string>;
|
|
118
120
|
id: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sCAAsC,CAAC;AACpE,OAAuC,EACrC,0BAA0B,EAC3B,MAAM,mDAAmD,CAAC;AAC3D,OAAwB,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAC,qBAAqB,EAAC,MAAM,4CAA4C,CAAC;AAEjF,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sCAAsC,CAAC;AACpE,OAAuC,EACrC,0BAA0B,EAC3B,MAAM,mDAAmD,CAAC;AAC3D,OAAwB,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAC,qBAAqB,EAAC,MAAM,4CAA4C,CAAC;AAEjF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAY1B,CAAC;AAEH,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBd,CAAC;AAEF,eAAe,S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C"}
|
|
@@ -56,6 +56,7 @@ declare const propTypes: {
|
|
|
56
56
|
}> | null | undefined)[]>;
|
|
57
57
|
}>>>;
|
|
58
58
|
help: PropTypes.Requireable<string>;
|
|
59
|
+
question: PropTypes.Requireable<string>;
|
|
59
60
|
media: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
60
61
|
type: PropTypes.Validator<string>;
|
|
61
62
|
id: PropTypes.Requireable<string>;
|
|
@@ -132,6 +133,7 @@ declare const propTypes: {
|
|
|
132
133
|
}> | null | undefined)[]>;
|
|
133
134
|
}>>>;
|
|
134
135
|
help: PropTypes.Requireable<string>;
|
|
136
|
+
question: PropTypes.Requireable<string>;
|
|
135
137
|
media: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
136
138
|
type: PropTypes.Validator<string>;
|
|
137
139
|
id: PropTypes.Requireable<string>;
|
|
@@ -208,6 +210,7 @@ declare const propTypes: {
|
|
|
208
210
|
}> | null | undefined)[]>;
|
|
209
211
|
}>>>;
|
|
210
212
|
help: PropTypes.Requireable<string>;
|
|
213
|
+
question: PropTypes.Requireable<string>;
|
|
211
214
|
media: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
212
215
|
type: PropTypes.Validator<string>;
|
|
213
216
|
id: PropTypes.Requireable<string>;
|
|
@@ -284,6 +287,7 @@ declare const propTypes: {
|
|
|
284
287
|
}> | null | undefined)[]>;
|
|
285
288
|
}>>>;
|
|
286
289
|
help: PropTypes.Requireable<string>;
|
|
290
|
+
question: PropTypes.Requireable<string>;
|
|
287
291
|
media: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
288
292
|
type: PropTypes.Validator<string>;
|
|
289
293
|
id: PropTypes.Requireable<string>;
|
|
@@ -360,6 +364,7 @@ declare const propTypes: {
|
|
|
360
364
|
}> | null | undefined)[]>;
|
|
361
365
|
}>>>;
|
|
362
366
|
help: PropTypes.Requireable<string>;
|
|
367
|
+
question: PropTypes.Requireable<string>;
|
|
363
368
|
media: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
364
369
|
type: PropTypes.Validator<string>;
|
|
365
370
|
id: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/review-stacked-slides/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,0BAA0B,EAAC,MAAM,mDAAmD,CAAC;AAE7F,OAA6B,EAC3B,gBAAgB,EAChB,UAAU,EAEX,MAAM,4BAA4B,CAAC;AAEpC,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/review-stacked-slides/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,0BAA0B,EAAC,MAAM,mDAAmD,CAAC;AAE7F,OAA6B,EAC3B,gBAAgB,EAChB,UAAU,EAEX,MAAM,4BAA4B,CAAC;AAEpC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,gBAAgB,GAAG;IAC7B,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACnD,oBAAoB,CAAC,EAAE,0BAA0B,CAAC;IAClD,MAAM,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAAC,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -7,18 +7,7 @@ declare namespace PlayerLoading {
|
|
|
7
7
|
const popinError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
8
8
|
content: PropTypes.Requireable<string>;
|
|
9
9
|
mode: PropTypes.Requireable<string>;
|
|
10
|
-
header: PropTypes.Requireable<
|
|
11
|
-
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
|
-
title: PropTypes.Requireable<string>;
|
|
13
|
-
subtitle: PropTypes.Requireable<string>;
|
|
14
|
-
type: PropTypes.Requireable<string>;
|
|
15
|
-
'data-name': PropTypes.Requireable<string>;
|
|
16
|
-
titleSize: PropTypes.Requireable<string>;
|
|
17
|
-
subtitleSize: PropTypes.Requireable<string>;
|
|
18
|
-
}>>;
|
|
19
|
-
headerIcon: PropTypes.Requireable<string>;
|
|
20
|
-
backgroundImage: PropTypes.Requireable<string>;
|
|
21
|
-
}>>;
|
|
10
|
+
header: PropTypes.Requireable<string>;
|
|
22
11
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
23
12
|
label: PropTypes.Requireable<string>;
|
|
24
13
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -66,13 +55,6 @@ declare namespace PlayerLoading {
|
|
|
66
55
|
'data-name': PropTypes.Requireable<string>;
|
|
67
56
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
68
57
|
}> | null | undefined)[]>;
|
|
69
|
-
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
70
|
-
type: PropTypes.Requireable<string>;
|
|
71
|
-
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
72
|
-
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
73
|
-
loading: PropTypes.Requireable<boolean>;
|
|
74
|
-
}>>;
|
|
75
|
-
}>>;
|
|
76
58
|
}>>;
|
|
77
59
|
}
|
|
78
60
|
}
|
|
@@ -58,18 +58,7 @@ declare namespace SlidePlayer {
|
|
|
58
58
|
popinError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
59
59
|
content: PropTypes.Requireable<string>;
|
|
60
60
|
mode: PropTypes.Requireable<string>;
|
|
61
|
-
header: PropTypes.Requireable<
|
|
62
|
-
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
63
|
-
title: PropTypes.Requireable<string>;
|
|
64
|
-
subtitle: PropTypes.Requireable<string>;
|
|
65
|
-
type: PropTypes.Requireable<string>;
|
|
66
|
-
'data-name': PropTypes.Requireable<string>;
|
|
67
|
-
titleSize: PropTypes.Requireable<string>;
|
|
68
|
-
subtitleSize: PropTypes.Requireable<string>;
|
|
69
|
-
}>>;
|
|
70
|
-
headerIcon: PropTypes.Requireable<string>;
|
|
71
|
-
backgroundImage: PropTypes.Requireable<string>;
|
|
72
|
-
}>>;
|
|
61
|
+
header: PropTypes.Requireable<string>;
|
|
73
62
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
74
63
|
label: PropTypes.Requireable<string>;
|
|
75
64
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -117,30 +106,12 @@ declare namespace SlidePlayer {
|
|
|
117
106
|
'data-name': PropTypes.Requireable<string>;
|
|
118
107
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
119
108
|
}> | null | undefined)[]>;
|
|
120
|
-
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
121
|
-
type: PropTypes.Requireable<string>;
|
|
122
|
-
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
123
|
-
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
124
|
-
loading: PropTypes.Requireable<boolean>;
|
|
125
|
-
}>>;
|
|
126
|
-
}>>;
|
|
127
109
|
}>>;
|
|
128
110
|
}>>;
|
|
129
111
|
const popin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
130
112
|
content: PropTypes.Requireable<string>;
|
|
131
113
|
mode: PropTypes.Requireable<string>;
|
|
132
|
-
header: PropTypes.Requireable<
|
|
133
|
-
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
134
|
-
title: PropTypes.Requireable<string>;
|
|
135
|
-
subtitle: PropTypes.Requireable<string>;
|
|
136
|
-
type: PropTypes.Requireable<string>;
|
|
137
|
-
'data-name': PropTypes.Requireable<string>;
|
|
138
|
-
titleSize: PropTypes.Requireable<string>;
|
|
139
|
-
subtitleSize: PropTypes.Requireable<string>;
|
|
140
|
-
}>>;
|
|
141
|
-
headerIcon: PropTypes.Requireable<string>;
|
|
142
|
-
backgroundImage: PropTypes.Requireable<string>;
|
|
143
|
-
}>>;
|
|
114
|
+
header: PropTypes.Requireable<string>;
|
|
144
115
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
145
116
|
label: PropTypes.Requireable<string>;
|
|
146
117
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -188,13 +159,6 @@ declare namespace SlidePlayer {
|
|
|
188
159
|
'data-name': PropTypes.Requireable<string>;
|
|
189
160
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
190
161
|
}> | null | undefined)[]>;
|
|
191
|
-
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
192
|
-
type: PropTypes.Requireable<string>;
|
|
193
|
-
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
194
|
-
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
195
|
-
loading: PropTypes.Requireable<boolean>;
|
|
196
|
-
}>>;
|
|
197
|
-
}>>;
|
|
198
162
|
}>>;
|
|
199
163
|
}
|
|
200
164
|
}
|
|
@@ -64,18 +64,7 @@ declare namespace SlidesPlayer {
|
|
|
64
64
|
export const popinError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
65
65
|
content: PropTypes.Requireable<string>;
|
|
66
66
|
mode: PropTypes.Requireable<string>;
|
|
67
|
-
header: PropTypes.Requireable<
|
|
68
|
-
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
69
|
-
title: PropTypes.Requireable<string>;
|
|
70
|
-
subtitle: PropTypes.Requireable<string>;
|
|
71
|
-
type: PropTypes.Requireable<string>;
|
|
72
|
-
'data-name': PropTypes.Requireable<string>;
|
|
73
|
-
titleSize: PropTypes.Requireable<string>;
|
|
74
|
-
subtitleSize: PropTypes.Requireable<string>;
|
|
75
|
-
}>>;
|
|
76
|
-
headerIcon: PropTypes.Requireable<string>;
|
|
77
|
-
backgroundImage: PropTypes.Requireable<string>;
|
|
78
|
-
}>>;
|
|
67
|
+
header: PropTypes.Requireable<string>;
|
|
79
68
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
80
69
|
label: PropTypes.Requireable<string>;
|
|
81
70
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -123,13 +112,6 @@ declare namespace SlidesPlayer {
|
|
|
123
112
|
'data-name': PropTypes.Requireable<string>;
|
|
124
113
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
125
114
|
}> | null | undefined)[]>;
|
|
126
|
-
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
127
|
-
type: PropTypes.Requireable<string>;
|
|
128
|
-
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
129
|
-
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
130
|
-
loading: PropTypes.Requireable<boolean>;
|
|
131
|
-
}>>;
|
|
132
|
-
}>>;
|
|
133
115
|
}>>;
|
|
134
116
|
}
|
|
135
117
|
}
|
|
@@ -183,9 +165,10 @@ declare namespace Step {
|
|
|
183
165
|
export { propTypes_2 as propTypes };
|
|
184
166
|
}
|
|
185
167
|
import { SrcPropType } from "../../../../util/proptypes";
|
|
186
|
-
declare function AnswerContent({ answerType, help }: {
|
|
168
|
+
declare function AnswerContent({ answerType, help, question }: {
|
|
187
169
|
answerType: any;
|
|
188
170
|
help: any;
|
|
171
|
+
question: any;
|
|
189
172
|
}): JSX.Element;
|
|
190
173
|
declare namespace AnswerContent {
|
|
191
174
|
export namespace propTypes_3 {
|
|
@@ -210,6 +193,7 @@ declare namespace AnswerContent {
|
|
|
210
193
|
}> | null | undefined)[]>;
|
|
211
194
|
}>>>;
|
|
212
195
|
help: PropTypes.Requireable<string>;
|
|
196
|
+
question: PropTypes.Requireable<string>;
|
|
213
197
|
media: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
214
198
|
type: PropTypes.Validator<string>;
|
|
215
199
|
id: PropTypes.Requireable<string>;
|
|
@@ -254,6 +238,7 @@ declare namespace AnswerContent {
|
|
|
254
238
|
}> | null | undefined>>;
|
|
255
239
|
}>>;
|
|
256
240
|
const help: PropTypes.Requireable<string>;
|
|
241
|
+
const question: PropTypes.Requireable<string>;
|
|
257
242
|
}
|
|
258
243
|
export { propTypes_3 as propTypes };
|
|
259
244
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AA+aA,qEAkBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1ID;;uBAyBC;;;;;;;;;;;;;;;;;;;;;;;;;AArPD;;;gBAaC;;;;;;;;;;;;;AAyDD;;;;gBAEC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlHD,oEAQC;;;;;;;;;AAgND;;gBAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/GD,qEAaC"}
|
|
@@ -220,14 +220,17 @@ ReviewLesson.contextTypes = {
|
|
|
220
220
|
|
|
221
221
|
const AnswerContent = ({
|
|
222
222
|
answerType,
|
|
223
|
-
help
|
|
223
|
+
help,
|
|
224
|
+
question
|
|
224
225
|
}) => /*#__PURE__*/_react.default.createElement(_answer.default, _extends({}, answerType, {
|
|
226
|
+
question: question,
|
|
225
227
|
help: help
|
|
226
228
|
}));
|
|
227
229
|
|
|
228
230
|
AnswerContent.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
229
231
|
answerType: _propTypes.default.shape(_answer.default.propTypes),
|
|
230
|
-
help: _propTypes.default.string
|
|
232
|
+
help: _propTypes.default.string,
|
|
233
|
+
question: _propTypes.default.string
|
|
231
234
|
} : {};
|
|
232
235
|
|
|
233
236
|
const MediaContent = (props, context) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["MediaView","media","style","contextMedia","propTypes","Picture","src","ClueContent","props","context","text","starsDiff","onClickSeeClue","clueWrapper","PropTypes","string","number","func","Bar","total","color","current","_current","stepWidth","stepBar","backgroundColor","width","isRequired","ColorPropType","Step","step","stepCount","stepWrapper","shape","NewMedia","translate","onClick","guideWrapper","newMedia","contextTypes","Provider","childContextTypes","ReviewLesson","reviewLesson","AnswerContent","answerType","help","Answer","MediaContent","resources","starsToWin","count","Math","abs","resourcesWrapper","stars","ResourceBrowser","ContextImage","images","map","url","_id","arrayOf","ContextVideo","videos","videoId","childProps","VideoPlayer","CONTEXT_MEDIA","img","pdf","PDF","audio","Audio","video","ContextMedia","ContentType","type","classnames","contextWrapper","contextPdfWrapper","contextAudioWrapper","oneOfType","oneOf","ContextContent","slideContext","descriptionParagraphs","paragraphs","paragraph","index","contextDescription","innerHTML","__html","title","description","CONTENT_TYPE","answer","clue","Help","helpView","ValidateButton","cta","disabled","useEffect","keyDownHandler","event","key","preventDefault","document","addEventListener","removeEventListener","ctaWrapper","Cta","ContentLayout","typeClue","selectedTab","model","question","noPaddingRessources","contentWrapperNoPadding","contentWrapper","contextTitle","skin","LoadingLayout","popinError","loading","CMPopin","LoadedLayout","ErrorMessage","errorMsg","error","Content","bool","SlidesPlayer","header","buttons","showNewMedia","showReviewLesson","stepColor","mediaButton","wrapper","contentProgression","TYPE","Footer","Header","backgroundUrl","SrcPropType"],"sources":["../../../../../src/template/app-player/player/slides/index.js"],"sourcesContent":["import React, {useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n compact,\n find,\n get,\n getOr,\n keys,\n omit,\n identity,\n max,\n pipe,\n split,\n isEmpty\n} from 'lodash/fp';\nimport {ColorPropType, SrcPropType} from '../../../../util/proptypes';\nimport Cta from '../../../../atom/cta';\nimport Picture from '../../../../atom/picture';\nimport Provider from '../../../../atom/provider';\nimport Clue from '../../../../atom/clue';\nimport Answer from '../../../../molecule/answer';\nimport Loader from '../../../../atom/loader';\nimport Swapper from '../../../../hoc/swapper';\nimport VideoPlayer from '../../../../molecule/video-player';\nimport PDF from '../../../../molecule/pdf';\nimport Audio from '../../../../molecule/audio';\nimport ResourceBrowser from '../../../../organism/resource-browser';\nimport CMPopin from '../../../../molecule/cm-popin';\nimport Footer from './footer';\nimport Header from './header';\nimport style from './style.css';\n\nconst MediaView = ({media}) => {\n return (\n <div className={style.contextMedia}>\n <Picture src={media} />\n </div>\n );\n};\n\nMediaView.propTypes = {\n media: Picture.propTypes.src\n};\n\n/*\n * Content types\n */\n\nconst ClueContent = (props, context) => {\n const {text, starsDiff, onClickSeeClue} = props;\n\n return (\n <div className={style.clueWrapper}>\n <Clue text={text} starsDiff={starsDiff} onClick={onClickSeeClue} />\n </div>\n );\n};\n\nClueContent.propTypes = {\n text: PropTypes.string,\n starsDiff: PropTypes.number,\n onClickSeeClue: PropTypes.func\n};\n\nconst Bar = ({total, color, current}) => {\n const _current = max([current, 0]);\n\n if (!total) {\n return null;\n }\n\n const stepWidth = (_current / total) * 100;\n\n return (\n <div\n className={style.stepBar}\n style={{\n backgroundColor: color,\n width: `${stepWidth}%`\n }}\n />\n );\n};\n\nBar.propTypes = {\n current: PropTypes.number.isRequired,\n total: PropTypes.number,\n color: ColorPropType\n};\n\nconst Step = ({step, color}) => {\n return (\n <div data-name=\"step\">\n <div data-name=\"counter\" className={style.stepCount}>\n <span style={{color}}>{step.current}</span>/{step.total}\n </div>\n <div className={style.stepWrapper}>\n <Swapper {...step} color={color} current={step.current - 1}>\n <Bar {...step} color={color} />\n </Swapper>\n </div>\n </div>\n );\n};\n\nStep.propTypes = {\n step: PropTypes.shape({\n current: Bar.propTypes.current,\n total: Bar.propTypes.total\n }),\n color: ColorPropType\n};\n\nconst NewMedia = (props, context) => {\n const {translate} = context;\n const {onClick, step} = props;\n const current = get('current', step);\n return (\n <div\n className={`${style.guideWrapper} ${style.newMedia}`}\n onClick={onClick}\n data-name=\"newMedia\"\n >\n <span>{translate(step === null || current === 1 ? 'See lesson' : 'New media')}</span>\n </div>\n );\n};\n\nNewMedia.propTypes = {\n onClick: PropTypes.func,\n step: Step.propTypes.step\n};\n\nNewMedia.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst ReviewLesson = (props, context) => {\n const {translate} = context;\n const {onClick} = props;\n\n return (\n <div\n className={`${style.guideWrapper} ${style.reviewLesson}`}\n onClick={onClick}\n data-name=\"reviewLesson\"\n >\n <span>{translate('Review lesson')}</span>\n </div>\n );\n};\n\nReviewLesson.propTypes = {\n onClick: PropTypes.func\n};\n\nReviewLesson.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst AnswerContent = ({answerType, help}) => <Answer {...answerType} help={help} />;\n\nAnswerContent.propTypes = {\n answerType: PropTypes.shape(Answer.propTypes),\n help: PropTypes.string\n};\n\nconst MediaContent = (props, context) => {\n const {resources, starsDiff} = props;\n const {translate} = context;\n const starsToWin = translate('media_stars_to_win', {\n count: Math.abs(starsDiff)\n });\n\n return (\n <div className={style.resourcesWrapper}>\n <ResourceBrowser resources={resources} />\n <div className={style.stars}>{starsToWin}</div>\n </div>\n );\n};\n\nMediaContent.propTypes = {\n resources: ResourceBrowser.propTypes.resources,\n starsDiff: PropTypes.number\n};\n\nMediaContent.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst ContextImage = ({src}) => {\n const images = src.map(({url, _id}) => <MediaView key={_id} media={url} />);\n return <div>{images}</div>;\n};\n\nContextImage.propTypes = {\n src: PropTypes.arrayOf(\n PropTypes.shape({\n _id: PropTypes.string,\n url: PropTypes.string\n })\n )\n};\n\nconst ContextVideo = props => {\n const {src} = props;\n const videos = src.map(({videoId, ...childProps}) => (\n <VideoPlayer {...omit('id', childProps)} id={videoId} key={videoId} autoplay={false} />\n ));\n return <div>{videos}</div>;\n};\n\nContextVideo.propTypes = {\n src: PropTypes.arrayOf(PropTypes.shape(VideoPlayer.propTypes))\n};\n\nconst CONTEXT_MEDIA = {\n img: ContextImage,\n pdf: PDF,\n audio: Audio,\n video: ContextVideo\n};\n\nconst ContextMedia = ({media}) => {\n const ContentType = CONTEXT_MEDIA[media.type];\n return (\n <div\n data-name=\"contextMedia\"\n className={classnames(\n style.contextWrapper,\n media.type === 'pdf' ? style.contextPdfWrapper : null,\n media.type === 'audio' ? style.contextAudioWrapper : null\n )}\n >\n <ContentType {...media} />\n </div>\n );\n};\n\nContextMedia.propTypes = {\n media: PropTypes.oneOfType([\n PropTypes.shape({\n ...ContextImage.propTypes,\n type: PropTypes.oneOf(['img'])\n }),\n PropTypes.shape({\n ...PDF.propTypes,\n type: PropTypes.oneOf(['pdf'])\n }),\n PropTypes.shape({\n ...Audio.propTypes,\n type: PropTypes.oneOf(['audio'])\n }),\n PropTypes.shape({\n ...ContextVideo.propTypes,\n type: PropTypes.oneOf(['video'])\n })\n ])\n};\n\nconst ContextContent = ({slideContext}) => {\n const descriptionParagraphs = pipe(getOr('', 'description'), split('\\n'), compact)(slideContext);\n const paragraphs = descriptionParagraphs.map((paragraph, index) => (\n <p\n key={index}\n data-name=\"contextDescription\"\n className={classnames(style.contextDescription, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: paragraph}}\n />\n ));\n return (\n <div className={style.context}>\n {get('media.type', slideContext) ? <ContextMedia media={slideContext.media} /> : null}\n {paragraphs}\n </div>\n );\n};\n\nContextContent.propTypes = {\n slideContext: PropTypes.shape({\n title: PropTypes.string,\n description: PropTypes.string,\n media: PropTypes.shape(ContextMedia.propTypes)\n })\n};\n\nconst CONTENT_TYPE = {\n answer: AnswerContent,\n clue: ClueContent,\n context: ContextContent,\n media: MediaContent\n};\n\nconst Help = ({help}) => (\n <div\n className={classnames(style.helpView, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: help}}\n />\n);\n\nHelp.propTypes = {\n help: PropTypes.string\n};\n\nconst ValidateButton = ({cta = {}}) => {\n const {disabled} = cta;\n\n useEffect(() => {\n if (isEmpty(cta)) return;\n\n const keyDownHandler = event => {\n if (event.key === 'Enter' || (event.key === ' ' && disabled)) {\n event.preventDefault();\n }\n };\n document.addEventListener('keydown', keyDownHandler);\n return () => {\n document.removeEventListener('keydown', keyDownHandler);\n };\n }, [disabled, cta]);\n\n if (isEmpty(cta)) {\n return null;\n }\n return (\n <div className={style.ctaWrapper}>\n <Cta {...cta} className={style.cta} />\n </div>\n );\n};\n\nValidateButton.propTypes = {\n cta: PropTypes.shape(Cta.propTypes)\n};\n\nconst ContentLayout = (props, context) => {\n const {\n typeClue: selectedTab,\n answerType: {model: {type} = {}} = {},\n question,\n help,\n slideContext\n } = props;\n const ContentType = CONTENT_TYPE[selectedTab];\n const noPaddingRessources =\n ContentType === MediaContent ? `${style.contentWrapperNoPadding}` : `${style.contentWrapper}`;\n\n return (\n <div className={noPaddingRessources} style={{backgroundColor: 'white'}}>\n <div\n data-name=\"question\"\n className={classnames(\n selectedTab === 'context' ? style.contextTitle : style.question,\n style.innerHTML\n )}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{\n __html: selectedTab === 'context' ? slideContext.title : question\n }}\n />\n {help && selectedTab === 'answer' && type !== 'qcmDrag' ? <Help help={help} /> : null}\n <ContentType {...props} />\n <ValidateButton {...props} />\n </div>\n );\n};\n\nContentLayout.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nContentLayout.propTypes = {\n typeClue: PropTypes.oneOf(keys(CONTENT_TYPE)),\n question: PropTypes.string,\n ...ValidateButton.propTypes\n};\n\n/*\n * Loading\n */\n\nconst LoadingLayout = ({popinError}) => (\n <div className={style.loading}>{popinError ? <CMPopin {...popinError} /> : <Loader />}</div>\n);\n\nLoadingLayout.propTypes = {\n popinError: PropTypes.shape(CMPopin.propTypes)\n};\n\nconst LoadedLayout = ({question, step, ...props}) => {\n return question ? <ContentLayout {...props} question={question} /> : <LoadingLayout {...props} />;\n};\n\nLoadedLayout.propTypes = {\n ...ContentLayout.propTypes,\n question: ContentLayout.propTypes.question\n};\n\n/*\n * Errors\n */\n\nconst ErrorMessage = ({errorMsg}) => (\n <div className={style.contentWrapper}>\n <div className={style.error}>{errorMsg}</div>\n </div>\n);\n\nErrorMessage.propTypes = {\n errorMsg: PropTypes.string\n};\n\nconst Content = ({error, ...props}) =>\n error ? <ErrorMessage {...props} /> : <LoadedLayout {...props} />;\n\nContent.propTypes = {\n error: PropTypes.bool\n};\n\n/*\n * SlidesPlayer\n */\n\nconst SlidesPlayer = (props, context) => {\n const {header, step, buttons, showNewMedia = false, showReviewLesson = false} = props;\n const {skin} = context;\n const stepColor = get('common.primary', skin);\n const mediaButton = find({type: 'media'}, buttons) || {};\n const {onClick = identity} = mediaButton;\n return (\n <div className={style.wrapper} data-name=\"slidesPlayer\">\n {header ? <Header {...header} /> : null}\n <div className={style.contentProgression}>\n {step ? <Step step={step} color={stepColor} /> : null}\n {showNewMedia && !showReviewLesson ? <NewMedia onClick={onClick} step={step} /> : null}\n {showReviewLesson && !showNewMedia ? <ReviewLesson onClick={onClick} /> : null}\n <Content {...props} />\n </div>\n <Footer buttons={buttons} />\n </div>\n );\n};\n\nSlidesPlayer.TYPE = CONTENT_TYPE;\n\nSlidesPlayer.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nSlidesPlayer.propTypes = {\n cta: ValidateButton.propTypes.cta,\n step: Step.propTypes.step,\n buttons: Footer.propTypes.buttons,\n header: PropTypes.shape(Header.propTypes),\n showNewMedia: PropTypes.bool,\n showReviewLesson: PropTypes.bool,\n backgroundUrl: SrcPropType,\n popinError: PropTypes.shape(CMPopin.propTypes)\n};\n\nexport default SlidesPlayer;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAcA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,KAAa;EAC7B,oBACE;IAAK,SAAS,EAAEC,cAAA,CAAMC;EAAtB,gBACE,6BAAC,gBAAD;IAAS,GAAG,EAAEF;EAAd,EADF,CADF;AAKD,CAND;;AAQAD,SAAS,CAACI,SAAV,2CAAsB;EACpBH,KAAK,EAAEI,gBAAA,CAAQD,SAAR,CAAkBE;AADL,CAAtB;AAIA;AACA;AACA;;AAEA,MAAMC,WAAW,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACtC,MAAM;IAACC,IAAD;IAAOC,SAAP;IAAkBC;EAAlB,IAAoCJ,KAA1C;EAEA,oBACE;IAAK,SAAS,EAAEN,cAAA,CAAMW;EAAtB,gBACE,6BAAC,aAAD;IAAM,IAAI,EAAEH,IAAZ;IAAkB,SAAS,EAAEC,SAA7B;IAAw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,GAAoB/C,YAApB;AAEAsC,YAAY,CAAC9F,YAAb,GAA4B;EAC1BJ,SAAS,EAAEK,iBAAA,CAASC,iBAAT,CAA2BN,SADZ;EAE1BuF,IAAI,EAAElF,iBAAA,CAASC,iBAAT,CAA2BiF;AAFP,CAA5B;AAKAW,YAAY,CAACjI,SAAb,2CAAyB;EACvBiG,GAAG,EAAED,cAAc,CAAChG,SAAf,CAAyBiG,GADP;EAEvBvE,IAAI,EAAED,IAAI,CAACzB,SAAL,CAAe0B,IAFE;EAGvByG,OAAO,EAAEQ,eAAA,CAAO3I,SAAP,CAAiBmI,OAHH;EAIvBD,MAAM,EAAExH,kBAAA,CAAUmB,KAAV,CAAgB+G,eAAA,CAAO5I,SAAvB,CAJe;EAKvBoI,YAAY,EAAE1H,kBAAA,CAAUsH,IALD;EAMvBK,gBAAgB,EAAE3H,kBAAA,CAAUsH,IANL;EAOvBa,aAAa,EAAEC,sBAPQ;EAQvBtB,UAAU,EAAE9G,kBAAA,CAAUmB,KAAV,CAAgB6F,gBAAA,CAAQ1H,SAAxB;AARW,CAAzB;eAWeiI,Y"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["MediaView","media","style","contextMedia","propTypes","Picture","src","ClueContent","props","context","text","starsDiff","onClickSeeClue","clueWrapper","PropTypes","string","number","func","Bar","total","color","current","_current","stepWidth","stepBar","backgroundColor","width","isRequired","ColorPropType","Step","step","stepCount","stepWrapper","shape","NewMedia","translate","onClick","guideWrapper","newMedia","contextTypes","Provider","childContextTypes","ReviewLesson","reviewLesson","AnswerContent","answerType","help","question","Answer","MediaContent","resources","starsToWin","count","Math","abs","resourcesWrapper","stars","ResourceBrowser","ContextImage","images","map","url","_id","arrayOf","ContextVideo","videos","videoId","childProps","VideoPlayer","CONTEXT_MEDIA","img","pdf","PDF","audio","Audio","video","ContextMedia","ContentType","type","classnames","contextWrapper","contextPdfWrapper","contextAudioWrapper","oneOfType","oneOf","ContextContent","slideContext","descriptionParagraphs","paragraphs","paragraph","index","contextDescription","innerHTML","__html","title","description","CONTENT_TYPE","answer","clue","Help","helpView","ValidateButton","cta","disabled","useEffect","keyDownHandler","event","key","preventDefault","document","addEventListener","removeEventListener","ctaWrapper","Cta","ContentLayout","typeClue","selectedTab","model","noPaddingRessources","contentWrapperNoPadding","contentWrapper","contextTitle","skin","LoadingLayout","popinError","loading","CMPopin","LoadedLayout","ErrorMessage","errorMsg","error","Content","bool","SlidesPlayer","header","buttons","showNewMedia","showReviewLesson","stepColor","mediaButton","wrapper","contentProgression","TYPE","Footer","Header","backgroundUrl","SrcPropType"],"sources":["../../../../../src/template/app-player/player/slides/index.js"],"sourcesContent":["import React, {useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n compact,\n find,\n get,\n getOr,\n keys,\n omit,\n identity,\n max,\n pipe,\n split,\n isEmpty\n} from 'lodash/fp';\nimport {ColorPropType, SrcPropType} from '../../../../util/proptypes';\nimport Cta from '../../../../atom/cta';\nimport Picture from '../../../../atom/picture';\nimport Provider from '../../../../atom/provider';\nimport Clue from '../../../../atom/clue';\nimport Answer from '../../../../molecule/answer';\nimport Loader from '../../../../atom/loader';\nimport Swapper from '../../../../hoc/swapper';\nimport VideoPlayer from '../../../../molecule/video-player';\nimport PDF from '../../../../molecule/pdf';\nimport Audio from '../../../../molecule/audio';\nimport ResourceBrowser from '../../../../organism/resource-browser';\nimport CMPopin from '../../../../molecule/cm-popin';\nimport Footer from './footer';\nimport Header from './header';\nimport style from './style.css';\n\nconst MediaView = ({media}) => {\n return (\n <div className={style.contextMedia}>\n <Picture src={media} />\n </div>\n );\n};\n\nMediaView.propTypes = {\n media: Picture.propTypes.src\n};\n\n/*\n * Content types\n */\n\nconst ClueContent = (props, context) => {\n const {text, starsDiff, onClickSeeClue} = props;\n\n return (\n <div className={style.clueWrapper}>\n <Clue text={text} starsDiff={starsDiff} onClick={onClickSeeClue} />\n </div>\n );\n};\n\nClueContent.propTypes = {\n text: PropTypes.string,\n starsDiff: PropTypes.number,\n onClickSeeClue: PropTypes.func\n};\n\nconst Bar = ({total, color, current}) => {\n const _current = max([current, 0]);\n\n if (!total) {\n return null;\n }\n\n const stepWidth = (_current / total) * 100;\n\n return (\n <div\n className={style.stepBar}\n style={{\n backgroundColor: color,\n width: `${stepWidth}%`\n }}\n />\n );\n};\n\nBar.propTypes = {\n current: PropTypes.number.isRequired,\n total: PropTypes.number,\n color: ColorPropType\n};\n\nconst Step = ({step, color}) => {\n return (\n <div data-name=\"step\">\n <div data-name=\"counter\" className={style.stepCount}>\n <span style={{color}}>{step.current}</span>/{step.total}\n </div>\n <div className={style.stepWrapper}>\n <Swapper {...step} color={color} current={step.current - 1}>\n <Bar {...step} color={color} />\n </Swapper>\n </div>\n </div>\n );\n};\n\nStep.propTypes = {\n step: PropTypes.shape({\n current: Bar.propTypes.current,\n total: Bar.propTypes.total\n }),\n color: ColorPropType\n};\n\nconst NewMedia = (props, context) => {\n const {translate} = context;\n const {onClick, step} = props;\n const current = get('current', step);\n return (\n <div\n className={`${style.guideWrapper} ${style.newMedia}`}\n onClick={onClick}\n data-name=\"newMedia\"\n >\n <span>{translate(step === null || current === 1 ? 'See lesson' : 'New media')}</span>\n </div>\n );\n};\n\nNewMedia.propTypes = {\n onClick: PropTypes.func,\n step: Step.propTypes.step\n};\n\nNewMedia.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst ReviewLesson = (props, context) => {\n const {translate} = context;\n const {onClick} = props;\n\n return (\n <div\n className={`${style.guideWrapper} ${style.reviewLesson}`}\n onClick={onClick}\n data-name=\"reviewLesson\"\n >\n <span>{translate('Review lesson')}</span>\n </div>\n );\n};\n\nReviewLesson.propTypes = {\n onClick: PropTypes.func\n};\n\nReviewLesson.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst AnswerContent = ({answerType, help, question}) => (\n <Answer {...answerType} question={question} help={help} />\n);\n\nAnswerContent.propTypes = {\n answerType: PropTypes.shape(Answer.propTypes),\n help: PropTypes.string,\n question: PropTypes.string\n};\n\nconst MediaContent = (props, context) => {\n const {resources, starsDiff} = props;\n const {translate} = context;\n const starsToWin = translate('media_stars_to_win', {\n count: Math.abs(starsDiff)\n });\n\n return (\n <div className={style.resourcesWrapper}>\n <ResourceBrowser resources={resources} />\n <div className={style.stars}>{starsToWin}</div>\n </div>\n );\n};\n\nMediaContent.propTypes = {\n resources: ResourceBrowser.propTypes.resources,\n starsDiff: PropTypes.number\n};\n\nMediaContent.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst ContextImage = ({src}) => {\n const images = src.map(({url, _id}) => <MediaView key={_id} media={url} />);\n return <div>{images}</div>;\n};\n\nContextImage.propTypes = {\n src: PropTypes.arrayOf(\n PropTypes.shape({\n _id: PropTypes.string,\n url: PropTypes.string\n })\n )\n};\n\nconst ContextVideo = props => {\n const {src} = props;\n const videos = src.map(({videoId, ...childProps}) => (\n <VideoPlayer {...omit('id', childProps)} id={videoId} key={videoId} autoplay={false} />\n ));\n return <div>{videos}</div>;\n};\n\nContextVideo.propTypes = {\n src: PropTypes.arrayOf(PropTypes.shape(VideoPlayer.propTypes))\n};\n\nconst CONTEXT_MEDIA = {\n img: ContextImage,\n pdf: PDF,\n audio: Audio,\n video: ContextVideo\n};\n\nconst ContextMedia = ({media}) => {\n const ContentType = CONTEXT_MEDIA[media.type];\n return (\n <div\n data-name=\"contextMedia\"\n className={classnames(\n style.contextWrapper,\n media.type === 'pdf' ? style.contextPdfWrapper : null,\n media.type === 'audio' ? style.contextAudioWrapper : null\n )}\n >\n <ContentType {...media} />\n </div>\n );\n};\n\nContextMedia.propTypes = {\n media: PropTypes.oneOfType([\n PropTypes.shape({\n ...ContextImage.propTypes,\n type: PropTypes.oneOf(['img'])\n }),\n PropTypes.shape({\n ...PDF.propTypes,\n type: PropTypes.oneOf(['pdf'])\n }),\n PropTypes.shape({\n ...Audio.propTypes,\n type: PropTypes.oneOf(['audio'])\n }),\n PropTypes.shape({\n ...ContextVideo.propTypes,\n type: PropTypes.oneOf(['video'])\n })\n ])\n};\n\nconst ContextContent = ({slideContext}) => {\n const descriptionParagraphs = pipe(getOr('', 'description'), split('\\n'), compact)(slideContext);\n const paragraphs = descriptionParagraphs.map((paragraph, index) => (\n <p\n key={index}\n data-name=\"contextDescription\"\n className={classnames(style.contextDescription, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: paragraph}}\n />\n ));\n return (\n <div className={style.context}>\n {get('media.type', slideContext) ? <ContextMedia media={slideContext.media} /> : null}\n {paragraphs}\n </div>\n );\n};\n\nContextContent.propTypes = {\n slideContext: PropTypes.shape({\n title: PropTypes.string,\n description: PropTypes.string,\n media: PropTypes.shape(ContextMedia.propTypes)\n })\n};\n\nconst CONTENT_TYPE = {\n answer: AnswerContent,\n clue: ClueContent,\n context: ContextContent,\n media: MediaContent\n};\n\nconst Help = ({help}) => (\n <div\n className={classnames(style.helpView, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: help}}\n />\n);\n\nHelp.propTypes = {\n help: PropTypes.string\n};\n\nconst ValidateButton = ({cta = {}}) => {\n const {disabled} = cta;\n\n useEffect(() => {\n if (isEmpty(cta)) return;\n\n const keyDownHandler = event => {\n if (event.key === 'Enter' || (event.key === ' ' && disabled)) {\n event.preventDefault();\n }\n };\n document.addEventListener('keydown', keyDownHandler);\n return () => {\n document.removeEventListener('keydown', keyDownHandler);\n };\n }, [disabled, cta]);\n\n if (isEmpty(cta)) {\n return null;\n }\n return (\n <div className={style.ctaWrapper}>\n <Cta {...cta} className={style.cta} />\n </div>\n );\n};\n\nValidateButton.propTypes = {\n cta: PropTypes.shape(Cta.propTypes)\n};\n\nconst ContentLayout = (props, context) => {\n const {\n typeClue: selectedTab,\n answerType: {model: {type} = {}} = {},\n question,\n help,\n slideContext\n } = props;\n const ContentType = CONTENT_TYPE[selectedTab];\n const noPaddingRessources =\n ContentType === MediaContent ? `${style.contentWrapperNoPadding}` : `${style.contentWrapper}`;\n\n return (\n <div className={noPaddingRessources} style={{backgroundColor: 'white'}}>\n <div\n data-name=\"question\"\n className={classnames(\n selectedTab === 'context' ? style.contextTitle : style.question,\n style.innerHTML\n )}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{\n __html: selectedTab === 'context' ? slideContext.title : question\n }}\n />\n {help && selectedTab === 'answer' && type !== 'qcmDrag' ? <Help help={help} /> : null}\n <ContentType {...props} />\n <ValidateButton {...props} />\n </div>\n );\n};\n\nContentLayout.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nContentLayout.propTypes = {\n typeClue: PropTypes.oneOf(keys(CONTENT_TYPE)),\n question: PropTypes.string,\n ...ValidateButton.propTypes\n};\n\n/*\n * Loading\n */\n\nconst LoadingLayout = ({popinError}) => (\n <div className={style.loading}>{popinError ? <CMPopin {...popinError} /> : <Loader />}</div>\n);\n\nLoadingLayout.propTypes = {\n popinError: PropTypes.shape(CMPopin.propTypes)\n};\n\nconst LoadedLayout = ({question, step, ...props}) => {\n return question ? <ContentLayout {...props} question={question} /> : <LoadingLayout {...props} />;\n};\n\nLoadedLayout.propTypes = {\n ...ContentLayout.propTypes,\n question: ContentLayout.propTypes.question\n};\n\n/*\n * Errors\n */\n\nconst ErrorMessage = ({errorMsg}) => (\n <div className={style.contentWrapper}>\n <div className={style.error}>{errorMsg}</div>\n </div>\n);\n\nErrorMessage.propTypes = {\n errorMsg: PropTypes.string\n};\n\nconst Content = ({error, ...props}) =>\n error ? <ErrorMessage {...props} /> : <LoadedLayout {...props} />;\n\nContent.propTypes = {\n error: PropTypes.bool\n};\n\n/*\n * SlidesPlayer\n */\n\nconst SlidesPlayer = (props, context) => {\n const {header, step, buttons, showNewMedia = false, showReviewLesson = false} = props;\n const {skin} = context;\n const stepColor = get('common.primary', skin);\n const mediaButton = find({type: 'media'}, buttons) || {};\n const {onClick = identity} = mediaButton;\n return (\n <div className={style.wrapper} data-name=\"slidesPlayer\">\n {header ? <Header {...header} /> : null}\n <div className={style.contentProgression}>\n {step ? <Step step={step} color={stepColor} /> : null}\n {showNewMedia && !showReviewLesson ? <NewMedia onClick={onClick} step={step} /> : null}\n {showReviewLesson && !showNewMedia ? <ReviewLesson onClick={onClick} /> : null}\n <Content {...props} />\n </div>\n <Footer buttons={buttons} />\n </div>\n );\n};\n\nSlidesPlayer.TYPE = CONTENT_TYPE;\n\nSlidesPlayer.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nSlidesPlayer.propTypes = {\n cta: ValidateButton.propTypes.cta,\n step: Step.propTypes.step,\n buttons: Footer.propTypes.buttons,\n header: PropTypes.shape(Header.propTypes),\n showNewMedia: PropTypes.bool,\n showReviewLesson: PropTypes.bool,\n backgroundUrl: SrcPropType,\n popinError: PropTypes.shape(CMPopin.propTypes)\n};\n\nexport default SlidesPlayer;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAcA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,KAAa;EAC7B,oBACE;IAAK,SAAS,EAAEC,cAAA,CAAMC;EAAtB,gBACE,6BAAC,gBAAD;IAAS,GAAG,EAAEF;EAAd,EADF,CADF;AAKD,CAND;;AAQAD,SAAS,CAACI,SAAV,2CAAsB;EACpBH,KAAK,EAAEI,gBAAA,CAAQD,SAAR,CAAkBE;AADL,CAAtB;AAIA;AACA;AACA;;AAEA,MAAMC,WAAW,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACtC,MAAM;IAACC,IAAD;IAAOC,SAAP;IAAkBC;EAAlB,IAAoCJ,KAA1C;EAEA,oBACE;IAAK,SAAS,EAAEN,cAAA,CAAMW;EAAtB,gBACE,6BAAC,aAAD;IAAM,IAAI,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OAAD,EAAa5B,KAAb,CAJF,CAFF,eAQE,6BAAC,eAAD;IAAQ,OAAO,EAAE+H;EAAjB,EARF,CADF;AAYD,CAlBD;;AAoBAF,YAAY,CAACS,IAAb,GAAoB9C,YAApB;AAEAqC,YAAY,CAAC9F,YAAb,GAA4B;EAC1BJ,SAAS,EAAEK,iBAAA,CAASC,iBAAT,CAA2BN,SADZ;EAE1BuF,IAAI,EAAElF,iBAAA,CAASC,iBAAT,CAA2BiF;AAFP,CAA5B;AAKAW,YAAY,CAACjI,SAAb,2CAAyB;EACvBkG,GAAG,EAAED,cAAc,CAACjG,SAAf,CAAyBkG,GADP;EAEvBxE,IAAI,EAAED,IAAI,CAACzB,SAAL,CAAe0B,IAFE;EAGvByG,OAAO,EAAEQ,eAAA,CAAO3I,SAAP,CAAiBmI,OAHH;EAIvBD,MAAM,EAAExH,kBAAA,CAAUmB,KAAV,CAAgB+G,eAAA,CAAO5I,SAAvB,CAJe;EAKvBoI,YAAY,EAAE1H,kBAAA,CAAUsH,IALD;EAMvBK,gBAAgB,EAAE3H,kBAAA,CAAUsH,IANL;EAOvBa,aAAa,EAAEC,sBAPQ;EAQvBtB,UAAU,EAAE9G,kBAAA,CAAUmB,KAAV,CAAgB6F,gBAAA,CAAQ1H,SAAxB;AARW,CAAzB;eAWeiI,Y"}
|
|
@@ -92,18 +92,7 @@ declare class PopinCorrection extends React.Component<any, any, any> {
|
|
|
92
92
|
popinError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
93
93
|
content: PropTypes.Requireable<string>;
|
|
94
94
|
mode: PropTypes.Requireable<string>;
|
|
95
|
-
header: PropTypes.Requireable<
|
|
96
|
-
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
97
|
-
title: PropTypes.Requireable<string>;
|
|
98
|
-
subtitle: PropTypes.Requireable<string>;
|
|
99
|
-
type: PropTypes.Requireable<string>;
|
|
100
|
-
'data-name': PropTypes.Requireable<string>;
|
|
101
|
-
titleSize: PropTypes.Requireable<string>;
|
|
102
|
-
subtitleSize: PropTypes.Requireable<string>;
|
|
103
|
-
}>>;
|
|
104
|
-
headerIcon: PropTypes.Requireable<string>;
|
|
105
|
-
backgroundImage: PropTypes.Requireable<string>;
|
|
106
|
-
}>>;
|
|
95
|
+
header: PropTypes.Requireable<string>;
|
|
107
96
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
108
97
|
label: PropTypes.Requireable<string>;
|
|
109
98
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -151,13 +140,6 @@ declare class PopinCorrection extends React.Component<any, any, any> {
|
|
|
151
140
|
'data-name': PropTypes.Requireable<string>;
|
|
152
141
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
153
142
|
}> | null | undefined)[]>;
|
|
154
|
-
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
155
|
-
type: PropTypes.Requireable<string>;
|
|
156
|
-
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
157
|
-
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
158
|
-
loading: PropTypes.Requireable<boolean>;
|
|
159
|
-
}>>;
|
|
160
|
-
}>>;
|
|
161
143
|
}>>;
|
|
162
144
|
};
|
|
163
145
|
static contextTypes: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBAIC;IAFC;;MAA0B;IAkB5B,gCAEC;IAhBD,0BAEC;IAED,kBAQC;IALC,gCAIE;IAIF,aAAsB;IAGxB,sBAsEC;CACF"}
|
|
@@ -132,18 +132,7 @@ declare namespace PopinEnd {
|
|
|
132
132
|
const popinError: PropTypes.Requireable<PropTypes.InferProps<{
|
|
133
133
|
content: PropTypes.Requireable<string>;
|
|
134
134
|
mode: PropTypes.Requireable<string>;
|
|
135
|
-
header: PropTypes.Requireable<
|
|
136
|
-
title: PropTypes.Requireable<PropTypes.InferProps<{
|
|
137
|
-
title: PropTypes.Requireable<string>;
|
|
138
|
-
subtitle: PropTypes.Requireable<string>;
|
|
139
|
-
type: PropTypes.Requireable<string>;
|
|
140
|
-
'data-name': PropTypes.Requireable<string>;
|
|
141
|
-
titleSize: PropTypes.Requireable<string>;
|
|
142
|
-
subtitleSize: PropTypes.Requireable<string>;
|
|
143
|
-
}>>;
|
|
144
|
-
headerIcon: PropTypes.Requireable<string>;
|
|
145
|
-
backgroundImage: PropTypes.Requireable<string>;
|
|
146
|
-
}>>;
|
|
135
|
+
header: PropTypes.Requireable<string>;
|
|
147
136
|
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
148
137
|
label: PropTypes.Requireable<string>;
|
|
149
138
|
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -191,13 +180,6 @@ declare namespace PopinEnd {
|
|
|
191
180
|
'data-name': PropTypes.Requireable<string>;
|
|
192
181
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
193
182
|
}> | null | undefined)[]>;
|
|
194
|
-
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
195
|
-
type: PropTypes.Requireable<string>;
|
|
196
|
-
list: PropTypes.Requireable<PropTypes.InferProps<{
|
|
197
|
-
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
198
|
-
loading: PropTypes.Requireable<boolean>;
|
|
199
|
-
}>>;
|
|
200
|
-
}>>;
|
|
201
183
|
}>>;
|
|
202
184
|
}
|
|
203
185
|
}
|
|
@@ -73,6 +73,7 @@ declare const AppReview: {
|
|
|
73
73
|
}> | null | undefined)[]>;
|
|
74
74
|
}>>>;
|
|
75
75
|
help: import("prop-types").Requireable<string>;
|
|
76
|
+
question: import("prop-types").Requireable<string>;
|
|
76
77
|
media: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
77
78
|
type: import("prop-types").Validator<string>;
|
|
78
79
|
id: import("prop-types").Requireable<string>;
|
|
@@ -149,6 +150,7 @@ declare const AppReview: {
|
|
|
149
150
|
}> | null | undefined)[]>;
|
|
150
151
|
}>>>;
|
|
151
152
|
help: import("prop-types").Requireable<string>;
|
|
153
|
+
question: import("prop-types").Requireable<string>;
|
|
152
154
|
media: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
153
155
|
type: import("prop-types").Validator<string>;
|
|
154
156
|
id: import("prop-types").Requireable<string>;
|
|
@@ -225,6 +227,7 @@ declare const AppReview: {
|
|
|
225
227
|
}> | null | undefined)[]>;
|
|
226
228
|
}>>>;
|
|
227
229
|
help: import("prop-types").Requireable<string>;
|
|
230
|
+
question: import("prop-types").Requireable<string>;
|
|
228
231
|
media: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
229
232
|
type: import("prop-types").Validator<string>;
|
|
230
233
|
id: import("prop-types").Requireable<string>;
|
|
@@ -301,6 +304,7 @@ declare const AppReview: {
|
|
|
301
304
|
}> | null | undefined)[]>;
|
|
302
305
|
}>>>;
|
|
303
306
|
help: import("prop-types").Requireable<string>;
|
|
307
|
+
question: import("prop-types").Requireable<string>;
|
|
304
308
|
media: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
305
309
|
type: import("prop-types").Validator<string>;
|
|
306
310
|
id: import("prop-types").Requireable<string>;
|
|
@@ -377,6 +381,7 @@ declare const AppReview: {
|
|
|
377
381
|
}> | null | undefined)[]>;
|
|
378
382
|
}>>>;
|
|
379
383
|
help: import("prop-types").Requireable<string>;
|
|
384
|
+
question: import("prop-types").Requireable<string>;
|
|
380
385
|
media: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
381
386
|
type: import("prop-types").Validator<string>;
|
|
382
387
|
id: import("prop-types").Requireable<string>;
|
|
@@ -509,18 +514,7 @@ declare const AppReview: {
|
|
|
509
514
|
quitPopin: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
510
515
|
content: import("prop-types").Requireable<string>;
|
|
511
516
|
mode: import("prop-types").Requireable<string>;
|
|
512
|
-
header: import("prop-types").Requireable<
|
|
513
|
-
title: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
514
|
-
title: import("prop-types").Requireable<string>;
|
|
515
|
-
subtitle: import("prop-types").Requireable<string>;
|
|
516
|
-
type: import("prop-types").Requireable<string>;
|
|
517
|
-
'data-name': import("prop-types").Requireable<string>;
|
|
518
|
-
titleSize: import("prop-types").Requireable<string>;
|
|
519
|
-
subtitleSize: import("prop-types").Requireable<string>;
|
|
520
|
-
}>>;
|
|
521
|
-
headerIcon: import("prop-types").Requireable<string>;
|
|
522
|
-
backgroundImage: import("prop-types").Requireable<string>;
|
|
523
|
-
}>>;
|
|
517
|
+
header: import("prop-types").Requireable<string>;
|
|
524
518
|
firstButton: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
525
519
|
label: import("prop-types").Requireable<string>;
|
|
526
520
|
handleOnclick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
@@ -568,13 +562,6 @@ declare const AppReview: {
|
|
|
568
562
|
'data-name': import("prop-types").Requireable<string>;
|
|
569
563
|
requiredSelection: import("prop-types").Requireable<boolean>;
|
|
570
564
|
}> | null | undefined)[]>;
|
|
571
|
-
items: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
572
|
-
type: import("prop-types").Requireable<string>;
|
|
573
|
-
list: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
574
|
-
list: import("prop-types").Requireable<(import("prop-types").InferProps<any> | null | undefined)[]>;
|
|
575
|
-
loading: import("prop-types").Requireable<boolean>;
|
|
576
|
-
}>>;
|
|
577
|
-
}>>;
|
|
578
565
|
}>>;
|
|
579
566
|
}>>;
|
|
580
567
|
};
|