@coorpacademy/components 11.2.9 → 11.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/es/atom/clue/index.d.ts +1 -1
  2. package/es/atom/promo-code/index.d.ts +1 -1
  3. package/es/atom/provider/index.d.ts +1 -1
  4. package/es/atom/provider/index.js +1 -1
  5. package/es/atom/provider/index.js.map +1 -1
  6. package/es/atom/select/index.d.ts +16 -17
  7. package/es/atom/select/index.d.ts.map +1 -1
  8. package/es/atom/select/index.js +7 -6
  9. package/es/atom/select/index.js.map +1 -1
  10. package/es/atom/tab-content/index.d.ts +1 -1
  11. package/es/molecule/answer/index.d.ts.map +1 -1
  12. package/es/molecule/answer/index.js +9 -1
  13. package/es/molecule/answer/index.js.map +1 -1
  14. package/es/molecule/battle-request/index.d.ts +1 -1
  15. package/es/molecule/brand-create-form/index.d.ts +1 -1
  16. package/es/molecule/brand-form-group/index.d.ts +2 -2
  17. package/es/molecule/card-with-button/index.d.ts +1 -1
  18. package/es/molecule/cookie-banner/index.d.ts +1 -1
  19. package/es/molecule/dashboard/cards-list/index.d.ts +1 -1
  20. package/es/molecule/discipline-partners/index.d.ts +1 -1
  21. package/es/molecule/external-content-button/index.d.ts +1 -1
  22. package/es/molecule/filters/index.d.ts +1 -1
  23. package/es/molecule/forum/forum-comment/index.d.ts +1 -1
  24. package/es/molecule/forum/forum-post/index.d.ts +1 -1
  25. package/es/molecule/payment-form/index.d.ts +1 -1
  26. package/es/molecule/pdf/index.d.ts +1 -1
  27. package/es/molecule/product-card/index.d.ts +1 -1
  28. package/es/molecule/questions/drop-down/index.d.ts +6 -5
  29. package/es/molecule/questions/drop-down/index.js +5 -2
  30. package/es/molecule/questions/drop-down/index.js.map +1 -1
  31. package/es/molecule/questions/template/index.d.ts +3 -1
  32. package/es/molecule/scope-content/index.d.ts +1 -1
  33. package/es/molecule/setup-section/index.d.ts +1 -1
  34. package/es/molecule/setup-slide/index.d.ts +1 -1
  35. package/es/molecule/setup-slider/index.d.ts +1 -1
  36. package/es/molecule/subscription-freemium/index.d.ts +1 -1
  37. package/es/molecule/subscription-premium/index.d.ts +1 -1
  38. package/es/molecule/table/index.d.ts +1 -1
  39. package/es/molecule/unsubscribe/index.d.ts +1 -1
  40. package/es/organism/brand-analytics/index.d.ts +1 -1
  41. package/es/organism/brand-form/index.d.ts +2 -2
  42. package/es/organism/cart/index.d.ts +1 -1
  43. package/es/organism/mooc-header/index.d.ts +1 -1
  44. package/es/organism/mooc-header/index.js +1 -1
  45. package/es/organism/mooc-header/index.js.map +1 -1
  46. package/es/organism/settings/index.d.ts +1 -1
  47. package/es/organism/wizard-contents/index.d.ts +2 -2
  48. package/es/template/app-player/player/slides/index.d.ts +2 -2
  49. package/es/template/app-player/player/slides/index.js +1 -1
  50. package/es/template/app-player/player/slides/index.js.map +1 -1
  51. package/es/template/app-review/template-context.d.ts +1 -0
  52. package/es/template/app-review/template-context.d.ts.map +1 -1
  53. package/es/template/app-review/template-context.js +2 -1
  54. package/es/template/app-review/template-context.js.map +1 -1
  55. package/es/template/back-office/brand-update/index.d.ts +4 -4
  56. package/es/template/battle-requests/index.d.ts +1 -1
  57. package/es/template/common/authors/index.d.ts +1 -1
  58. package/es/template/common/search-page/index.d.ts +1 -1
  59. package/es/util/render-with-context.d.ts +1 -4
  60. package/es/util/render-with-context.d.ts.map +1 -1
  61. package/es/util/render-with-context.js +6 -6
  62. package/es/util/render-with-context.js.map +1 -1
  63. package/lib/atom/clue/index.d.ts +1 -1
  64. package/lib/atom/promo-code/index.d.ts +1 -1
  65. package/lib/atom/provider/index.d.ts +1 -1
  66. package/lib/atom/provider/index.js +1 -1
  67. package/lib/atom/provider/index.js.map +1 -1
  68. package/lib/atom/select/index.d.ts +16 -17
  69. package/lib/atom/select/index.d.ts.map +1 -1
  70. package/lib/atom/select/index.js +7 -6
  71. package/lib/atom/select/index.js.map +1 -1
  72. package/lib/atom/tab-content/index.d.ts +1 -1
  73. package/lib/molecule/answer/index.d.ts.map +1 -1
  74. package/lib/molecule/answer/index.js +10 -1
  75. package/lib/molecule/answer/index.js.map +1 -1
  76. package/lib/molecule/battle-request/index.d.ts +1 -1
  77. package/lib/molecule/brand-create-form/index.d.ts +1 -1
  78. package/lib/molecule/brand-form-group/index.d.ts +2 -2
  79. package/lib/molecule/card-with-button/index.d.ts +1 -1
  80. package/lib/molecule/cookie-banner/index.d.ts +1 -1
  81. package/lib/molecule/dashboard/cards-list/index.d.ts +1 -1
  82. package/lib/molecule/discipline-partners/index.d.ts +1 -1
  83. package/lib/molecule/external-content-button/index.d.ts +1 -1
  84. package/lib/molecule/filters/index.d.ts +1 -1
  85. package/lib/molecule/forum/forum-comment/index.d.ts +1 -1
  86. package/lib/molecule/forum/forum-post/index.d.ts +1 -1
  87. package/lib/molecule/payment-form/index.d.ts +1 -1
  88. package/lib/molecule/pdf/index.d.ts +1 -1
  89. package/lib/molecule/product-card/index.d.ts +1 -1
  90. package/lib/molecule/questions/drop-down/index.d.ts +6 -5
  91. package/lib/molecule/questions/drop-down/index.js +5 -2
  92. package/lib/molecule/questions/drop-down/index.js.map +1 -1
  93. package/lib/molecule/questions/template/index.d.ts +3 -1
  94. package/lib/molecule/scope-content/index.d.ts +1 -1
  95. package/lib/molecule/setup-section/index.d.ts +1 -1
  96. package/lib/molecule/setup-slide/index.d.ts +1 -1
  97. package/lib/molecule/setup-slider/index.d.ts +1 -1
  98. package/lib/molecule/subscription-freemium/index.d.ts +1 -1
  99. package/lib/molecule/subscription-premium/index.d.ts +1 -1
  100. package/lib/molecule/table/index.d.ts +1 -1
  101. package/lib/molecule/unsubscribe/index.d.ts +1 -1
  102. package/lib/organism/brand-analytics/index.d.ts +1 -1
  103. package/lib/organism/brand-form/index.d.ts +2 -2
  104. package/lib/organism/cart/index.d.ts +1 -1
  105. package/lib/organism/mooc-header/index.d.ts +1 -1
  106. package/lib/organism/mooc-header/index.js +1 -1
  107. package/lib/organism/mooc-header/index.js.map +1 -1
  108. package/lib/organism/settings/index.d.ts +1 -1
  109. package/lib/organism/wizard-contents/index.d.ts +2 -2
  110. package/lib/template/app-player/player/slides/index.d.ts +2 -2
  111. package/lib/template/app-player/player/slides/index.js +1 -1
  112. package/lib/template/app-player/player/slides/index.js.map +1 -1
  113. package/lib/template/app-review/template-context.d.ts +1 -0
  114. package/lib/template/app-review/template-context.d.ts.map +1 -1
  115. package/lib/template/app-review/template-context.js +2 -1
  116. package/lib/template/app-review/template-context.js.map +1 -1
  117. package/lib/template/back-office/brand-update/index.d.ts +4 -4
  118. package/lib/template/battle-requests/index.d.ts +1 -1
  119. package/lib/template/common/authors/index.d.ts +1 -1
  120. package/lib/template/common/search-page/index.d.ts +1 -1
  121. package/lib/util/render-with-context.d.ts +1 -4
  122. package/lib/util/render-with-context.d.ts.map +1 -1
  123. package/lib/util/render-with-context.js +6 -6
  124. package/lib/util/render-with-context.js.map +1 -1
  125. package/locales/en/global.json +1 -0
  126. package/package.json +2 -2
  127. package/locales/.mtslconfig.json +0 -1
@@ -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","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 from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {compact, find, get, getOr, keys, omit, identity, max, pipe, split} 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 if (!cta) {\n return null;\n }\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: CMPopin.propTypes\n};\n\nconst LoadedLayout = ({question, step, ...props}) =>\n question ? <ContentLayout {...props} question={question} /> : <LoadingLayout {...props} />;\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;;AAEA;;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;IAAwC,OAAO,EAAEC;EAAjD,EADF,CADF;AAKD,CARD;;AAUAL,WAAW,CAACH,SAAZ,2CAAwB;EACtBM,IAAI,EAAEI,kBAAA,CAAUC,MADM;EAEtBJ,SAAS,EAAEG,kBAAA,CAAUE,MAFC;EAGtBJ,cAAc,EAAEE,kBAAA,CAAUG;AAHJ,CAAxB;;AAMA,MAAMC,GAAG,GAAG,CAAC;EAACC,KAAD;EAAQC,KAAR;EAAeC;AAAf,CAAD,KAA6B;EACvC,MAAMC,QAAQ,GAAG,mBAAI,CAACD,OAAD,EAAU,CAA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,OAAnB;IAA4B,IAAI,EAAEN;EAAlC,EAApC,GAAiF,IAFpF,EAGGkG,gBAAgB,IAAI,CAACD,YAArB,gBAAoC,6BAAC,YAAD;IAAc,OAAO,EAAE3F;EAAvB,EAApC,GAAyE,IAH5E,eAIE,6BAAC,OAAD,EAAa5B,KAAb,CAJF,CAFF,eAQE,6BAAC,eAAD;IAAQ,OAAO,EAAEsH;EAAjB,EARF,CADF;AAYD,CAlBD;;AAoBAF,YAAY,CAACS,IAAb,GAAoBtC,YAApB;AAEA6B,YAAY,CAACrF,YAAb,GAA4B;EAC1BJ,SAAS,EAAEK,iBAAA,CAASC,iBAAT,CAA2BN,SADZ;EAE1B8E,IAAI,EAAEzE,iBAAA,CAASC,iBAAT,CAA2BwE;AAFP,CAA5B;AAKAW,YAAY,CAACxH,SAAb,2CAAyB;EACvBiG,GAAG,EAAED,cAAc,CAAChG,SAAf,CAAyBiG,GADP;EAEvBvE,IAAI,EAAED,IAAI,CAACzB,SAAL,CAAe0B,IAFE;EAGvBgG,OAAO,EAAEQ,eAAA,CAAOlI,SAAP,CAAiB0H,OAHH;EAIvBD,MAAM,EAAE/G,kBAAA,CAAUmB,KAAV,CAAgBsG,eAAA,CAAOnI,SAAvB,CAJe;EAKvB2H,YAAY,EAAEjH,kBAAA,CAAU6G,IALD;EAMvBK,gBAAgB,EAAElH,kBAAA,CAAU6G,IANL;EAOvBa,aAAa,EAAEC,sBAPQ;EAQvBtB,UAAU,EAAErG,kBAAA,CAAUmB,KAAV,CAAgBoF,gBAAA,CAAQjH,SAAxB;AARW,CAAzB;eAWewH,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","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","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 from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {compact, find, get, getOr, keys, omit, identity, max, pipe, split} 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 if (!cta) {\n return null;\n }\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 question ? <ContentLayout {...props} question={question} /> : <LoadingLayout {...props} />;\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;;AAEA;;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;IAAwC,OAAO,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6G,IANL;EAOvBa,aAAa,EAAEC,sBAPQ;EAQvBtB,UAAU,EAAErG,kBAAA,CAAUmB,KAAV,CAAgBoF,gBAAA,CAAQjH,SAAxB;AARW,CAAzB;eAWewH,Y"}
@@ -22,6 +22,7 @@ export declare type TemplateContextValues = {
22
22
  handleBlur?: HandleBlur;
23
23
  handleFocus?: HandleFocus;
24
24
  };
25
+ translate: (arg: string) => string;
25
26
  };
26
27
  declare type Props = {
27
28
  values: TemplateContextValues;
@@ -1 +1 @@
1
- {"version":3,"file":"template-context.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/template-context.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,SAAS,EAAa,MAAM,OAAO,CAAC;AAClE,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,KAAK,EAAoB,MAAM,8BAA8B,CAAC;AACtE,OAAqB,EAAC,KAAK,EAAC,MAAM,8BAA8B,CAAC;AACjE,OAAkC,EAAC,YAAY,EAAC,MAAM,6CAA6C,CAAC;AACpG,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,oBAAY,UAAU,GAAG,MAAM,IAAI,CAAC;AACpC,oBAAY,WAAW,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;AACrD,oBAAY,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC;AAE5C,oBAAY,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,KAAK,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,CAAC;CACH,CAAC;AAEF,aAAK,KAAK,GAAG;IAAC,MAAM,EAAE,qBAAqB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,CAAC;AAalE,QAAA,MAAM,kBAAkB,QAAO,qBAU9B,CAAC;AAEF,QAAA,MAAM,eAAe,yBAAwB,KAAK,gBAEjD,CAAC;AAEF,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,CAAC"}
1
+ {"version":3,"file":"template-context.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/template-context.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,SAAS,EAAa,MAAM,OAAO,CAAC;AAClE,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,KAAK,EAAoB,MAAM,8BAA8B,CAAC;AACtE,OAAqB,EAAC,KAAK,EAAC,MAAM,8BAA8B,CAAC;AACjE,OAAkC,EAAC,YAAY,EAAC,MAAM,6CAA6C,CAAC;AACpG,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,oBAAY,UAAU,GAAG,MAAM,IAAI,CAAC;AACpC,oBAAY,WAAW,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;AACrD,oBAAY,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC;AAE5C,oBAAY,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,KAAK,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,CAAC;IACF,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC,CAAC;AAEF,aAAK,KAAK,GAAG;IAAC,MAAM,EAAE,qBAAqB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,CAAC;AAclE,QAAA,MAAM,kBAAkB,QAAO,qBAU9B,CAAC;AAEF,QAAA,MAAM,eAAe,yBAAwB,KAAK,gBAEjD,CAAC;AAEF,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,CAAC"}
@@ -25,7 +25,8 @@ const Context = /*#__PURE__*/(0, _react.createContext)({
25
25
  headerHeight: 67,
26
26
  statusBarHeight: 42
27
27
  },
28
- store: {}
28
+ store: {},
29
+ translate: arg => arg
29
30
  });
30
31
 
31
32
  const useTemplateContext = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"template-context.js","names":["Context","createContext","theme","defaultTheme","brandTheme","defaultBrandTheme","translations","defaultMobileTranslations","display","headerHeight","statusBarHeight","store","useTemplateContext","context","useContext","Error","TemplateContext","values","children"],"sources":["../../../src/template/app-review/template-context.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext} from 'react';\nimport {Analytics} from '../../variables/analytics';\nimport {Brand, defaultBrandTheme} from '../../variables/brand.native';\nimport defaultTheme, {Theme} from '../../variables/theme.native';\nimport defaultMobileTranslations, {Translations} from '../../variables/default-mobile-translations';\nimport {Vibration} from '../../variables/vibration';\n\nexport type HandleBlur = () => void;\nexport type HandleFocus = (id: string) => () => void;\nexport type FocusedSelectId = string | null;\n\nexport type TemplateContextValues = {\n analytics?: Analytics;\n brandTheme: Brand;\n theme: Theme;\n translations: Translations;\n vibration?: Vibration;\n display: {\n headerHeight: number;\n statusBarHeight: number;\n };\n store: {\n focusedSelectId?: FocusedSelectId;\n handleBlur?: HandleBlur;\n handleFocus?: HandleFocus;\n };\n};\n\ntype Props = {values: TemplateContextValues; children: ReactNode};\n\nconst Context = createContext({\n theme: defaultTheme,\n brandTheme: defaultBrandTheme,\n translations: defaultMobileTranslations,\n display: {\n headerHeight: 67,\n statusBarHeight: 42\n },\n store: {}\n});\n\nconst useTemplateContext = (): TemplateContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error(\n `❌ [TemplateContext] useTemplateContext must be used within a provider <TemplateContext>`\n );\n }\n\n return context;\n};\n\nconst TemplateContext = ({values, children}: Props) => {\n return <Context.Provider value={values}>{children}</Context.Provider>;\n};\n\nexport {TemplateContext, useTemplateContext};\n"],"mappings":";;;;;AAAA;;AAEA;;AACA;;AACA;;;;;;;;AA0BA,MAAMA,OAAO,gBAAG,IAAAC,oBAAA,EAAc;EAC5BC,KAAK,EAAEC,cADqB;EAE5BC,UAAU,EAAEC,wBAFgB;EAG5BC,YAAY,EAAEC,kCAHc;EAI5BC,OAAO,EAAE;IACPC,YAAY,EAAE,EADP;IAEPC,eAAe,EAAE;EAFV,CAJmB;EAQ5BC,KAAK,EAAE;AARqB,CAAd,CAAhB;;AAWA,MAAMC,kBAAkB,GAAG,MAA6B;EACtD,MAAMC,OAAO,GAAG,IAAAC,iBAAA,EAAWd,OAAX,CAAhB;;EAEA,IAAI,CAACa,OAAL,EAAc;IACZ,MAAM,IAAIE,KAAJ,CACH,yFADG,CAAN;EAGD;;EAED,OAAOF,OAAP;AACD,CAVD;;;;AAYA,MAAMG,eAAe,GAAG,CAAC;EAACC,MAAD;EAASC;AAAT,CAAD,KAA+B;EACrD,oBAAO,6BAAC,OAAD,CAAS,QAAT;IAAkB,KAAK,EAAED;EAAzB,GAAkCC,QAAlC,CAAP;AACD,CAFD"}
1
+ {"version":3,"file":"template-context.js","names":["Context","createContext","theme","defaultTheme","brandTheme","defaultBrandTheme","translations","defaultMobileTranslations","display","headerHeight","statusBarHeight","store","translate","arg","useTemplateContext","context","useContext","Error","TemplateContext","values","children"],"sources":["../../../src/template/app-review/template-context.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext} from 'react';\nimport {Analytics} from '../../variables/analytics';\nimport {Brand, defaultBrandTheme} from '../../variables/brand.native';\nimport defaultTheme, {Theme} from '../../variables/theme.native';\nimport defaultMobileTranslations, {Translations} from '../../variables/default-mobile-translations';\nimport {Vibration} from '../../variables/vibration';\n\nexport type HandleBlur = () => void;\nexport type HandleFocus = (id: string) => () => void;\nexport type FocusedSelectId = string | null;\n\nexport type TemplateContextValues = {\n analytics?: Analytics;\n brandTheme: Brand;\n theme: Theme;\n translations: Translations;\n vibration?: Vibration;\n display: {\n headerHeight: number;\n statusBarHeight: number;\n };\n store: {\n focusedSelectId?: FocusedSelectId;\n handleBlur?: HandleBlur;\n handleFocus?: HandleFocus;\n };\n translate: (arg: string) => string;\n};\n\ntype Props = {values: TemplateContextValues; children: ReactNode};\n\nconst Context = createContext({\n theme: defaultTheme,\n brandTheme: defaultBrandTheme,\n translations: defaultMobileTranslations,\n display: {\n headerHeight: 67,\n statusBarHeight: 42\n },\n store: {},\n translate: (arg: string) => arg\n});\n\nconst useTemplateContext = (): TemplateContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error(\n `❌ [TemplateContext] useTemplateContext must be used within a provider <TemplateContext>`\n );\n }\n\n return context;\n};\n\nconst TemplateContext = ({values, children}: Props) => {\n return <Context.Provider value={values}>{children}</Context.Provider>;\n};\n\nexport {TemplateContext, useTemplateContext};\n"],"mappings":";;;;;AAAA;;AAEA;;AACA;;AACA;;;;;;;;AA2BA,MAAMA,OAAO,gBAAG,IAAAC,oBAAA,EAAc;EAC5BC,KAAK,EAAEC,cADqB;EAE5BC,UAAU,EAAEC,wBAFgB;EAG5BC,YAAY,EAAEC,kCAHc;EAI5BC,OAAO,EAAE;IACPC,YAAY,EAAE,EADP;IAEPC,eAAe,EAAE;EAFV,CAJmB;EAQ5BC,KAAK,EAAE,EARqB;EAS5BC,SAAS,EAAGC,GAAD,IAAiBA;AATA,CAAd,CAAhB;;AAYA,MAAMC,kBAAkB,GAAG,MAA6B;EACtD,MAAMC,OAAO,GAAG,IAAAC,iBAAA,EAAWhB,OAAX,CAAhB;;EAEA,IAAI,CAACe,OAAL,EAAc;IACZ,MAAM,IAAIE,KAAJ,CACH,yFADG,CAAN;EAGD;;EAED,OAAOF,OAAP;AACD,CAVD;;;;AAYA,MAAMG,eAAe,GAAG,CAAC;EAACC,MAAD;EAASC;AAAT,CAAD,KAA+B;EACrD,oBAAO,6BAAC,OAAD,CAAS,QAAT;IAAkB,KAAK,EAAED;EAAzB,GAAkCC,QAAlC,CAAP;AACD,CAFD"}
@@ -213,7 +213,6 @@ declare namespace BrandUpdate {
213
213
  type: PropTypes.Requireable<string>;
214
214
  size: PropTypes.Requireable<string>;
215
215
  title: PropTypes.Requireable<string>;
216
- moreAriaLabel: PropTypes.Requireable<string>;
217
216
  name: PropTypes.Requireable<string>;
218
217
  className: PropTypes.Requireable<string>;
219
218
  borderClassName: PropTypes.Requireable<string>;
@@ -231,6 +230,7 @@ declare namespace BrandUpdate {
231
230
  }> | null | undefined)[]>;
232
231
  modified: PropTypes.Requireable<boolean>;
233
232
  error: PropTypes.Requireable<boolean>;
233
+ 'aria-label': PropTypes.Requireable<string>;
234
234
  }> | PropTypes.InferProps<{
235
235
  type: PropTypes.Requireable<string>;
236
236
  title: PropTypes.Validator<string>;
@@ -317,7 +317,6 @@ declare namespace BrandUpdate {
317
317
  }> | PropTypes.InferProps<{
318
318
  type: PropTypes.Requireable<string>;
319
319
  title: PropTypes.Requireable<string>;
320
- moreAriaLabel: PropTypes.Requireable<string>;
321
320
  name: PropTypes.Requireable<string>;
322
321
  className: PropTypes.Requireable<string>;
323
322
  borderClassName: PropTypes.Requireable<string>;
@@ -335,6 +334,7 @@ declare namespace BrandUpdate {
335
334
  }> | null | undefined)[]>;
336
335
  modified: PropTypes.Requireable<boolean>;
337
336
  error: PropTypes.Requireable<boolean>;
337
+ 'aria-label': PropTypes.Requireable<string>;
338
338
  }> | PropTypes.InferProps<{
339
339
  type: PropTypes.Requireable<string>;
340
340
  title: PropTypes.Validator<string>;
@@ -836,7 +836,6 @@ declare namespace BrandUpdate {
836
836
  type: PropTypes.Requireable<string>;
837
837
  size: PropTypes.Requireable<string>;
838
838
  title: PropTypes.Requireable<string>;
839
- moreAriaLabel: PropTypes.Requireable<string>;
840
839
  name: PropTypes.Requireable<string>;
841
840
  className: PropTypes.Requireable<string>;
842
841
  borderClassName: PropTypes.Requireable<string>;
@@ -854,6 +853,7 @@ declare namespace BrandUpdate {
854
853
  }> | null | undefined)[]>;
855
854
  modified: PropTypes.Requireable<boolean>;
856
855
  error: PropTypes.Requireable<boolean>;
856
+ 'aria-label': PropTypes.Requireable<string>;
857
857
  }> | PropTypes.InferProps<{
858
858
  type: PropTypes.Requireable<string>;
859
859
  title: PropTypes.Validator<string>;
@@ -940,7 +940,6 @@ declare namespace BrandUpdate {
940
940
  }> | PropTypes.InferProps<{
941
941
  type: PropTypes.Requireable<string>;
942
942
  title: PropTypes.Requireable<string>;
943
- moreAriaLabel: PropTypes.Requireable<string>;
944
943
  name: PropTypes.Requireable<string>;
945
944
  className: PropTypes.Requireable<string>;
946
945
  borderClassName: PropTypes.Requireable<string>;
@@ -958,6 +957,7 @@ declare namespace BrandUpdate {
958
957
  }> | null | undefined)[]>;
959
958
  modified: PropTypes.Requireable<boolean>;
960
959
  error: PropTypes.Requireable<boolean>;
960
+ 'aria-label': PropTypes.Requireable<string>;
961
961
  }> | PropTypes.InferProps<{
962
962
  type: PropTypes.Requireable<string>;
963
963
  title: PropTypes.Validator<string>;
@@ -2,7 +2,7 @@ export default Battles;
2
2
  declare function Battles(props: any, context: any): JSX.Element;
3
3
  declare namespace Battles {
4
4
  namespace contextTypes {
5
- const translate: PropTypes.Validator<(...args: any[]) => any>;
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
6
  }
7
7
  namespace propTypes {
8
8
  const battles: PropTypes.Validator<(PropTypes.InferProps<{
@@ -19,7 +19,7 @@ declare class Authors extends React.Component<any, any, any> {
19
19
  }> | null | undefined)[]>;
20
20
  };
21
21
  static contextTypes: {
22
- translate: PropTypes.Validator<(...args: any[]) => any>;
22
+ translate: PropTypes.Requireable<(...args: any[]) => any>;
23
23
  skin: PropTypes.Requireable<PropTypes.InferProps<{
24
24
  common: PropTypes.Requireable<{
25
25
  [x: string]: any;
@@ -40,7 +40,6 @@ declare namespace SearchPage {
40
40
  }> | null | undefined)[]>;
41
41
  sorting: PropTypes.Requireable<PropTypes.InferProps<{
42
42
  title: PropTypes.Requireable<string>;
43
- moreAriaLabel: PropTypes.Requireable<string>;
44
43
  name: PropTypes.Requireable<string>;
45
44
  className: PropTypes.Requireable<string>;
46
45
  borderClassName: PropTypes.Requireable<string>;
@@ -58,6 +57,7 @@ declare namespace SearchPage {
58
57
  }> | null | undefined)[]>;
59
58
  modified: PropTypes.Requireable<boolean>;
60
59
  error: PropTypes.Requireable<boolean>;
60
+ 'aria-label': PropTypes.Requireable<string>;
61
61
  }>>;
62
62
  onSearch: PropTypes.Requireable<(...args: any[]) => any>;
63
63
  onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1,5 +1,2 @@
1
- export function renderWithContext(component: any, { context, ...renderOptions }: {
2
- [x: string]: any;
3
- context: any;
4
- }): import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
1
+ export function renderWithContext(component: any, options?: {}): import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
5
2
  //# sourceMappingURL=render-with-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render-with-context.d.ts","sourceRoot":"","sources":["../../src/util/render-with-context.js"],"names":[],"mappings":"AAMO;;;iIAkBN"}
1
+ {"version":3,"file":"render-with-context.d.ts","sourceRoot":"","sources":["../../src/util/render-with-context.js"],"names":[],"mappings":"AAMO,8LAmBN"}
@@ -22,13 +22,13 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
22
22
 
23
23
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
24
24
 
25
- const renderWithContext = (component, _ref) => {
26
- let {
27
- context
28
- } = _ref,
29
- renderOptions = _objectWithoutPropertiesLoose(_ref, _excluded);
25
+ const renderWithContext = (component, options = {}) => {
26
+ const {
27
+ context = {}
28
+ } = options,
29
+ renderOptions = _objectWithoutPropertiesLoose(options, _excluded); // uses mockTranslate as a default translate function
30
+
30
31
 
31
- // uses mockTranslate as a default translate function
32
32
  const {
33
33
  translate = _translate.mockTranslate
34
34
  } = context,
@@ -1 +1 @@
1
- {"version":3,"file":"render-with-context.js","names":["renderWithContext","component","context","renderOptions","translate","mockTranslate","rest","wrapper","children","propTypes","PropTypes","node","render"],"sources":["../../src/util/render-with-context.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {render} from '@testing-library/react';\nimport {mockTranslate} from '@coorpacademy/translate';\nimport Provider from '../atom/provider';\n\nexport const renderWithContext = (component, {context, ...renderOptions}) => {\n // uses mockTranslate as a default translate function\n const {translate = mockTranslate, ...rest} = context;\n\n const wrapper = ({children}) => (\n <Provider {...rest} translate={translate}>\n {children}\n </Provider>\n );\n\n wrapper.propTypes = {\n children: PropTypes.node\n };\n\n return render(component, {\n ...renderOptions,\n wrapper\n });\n};\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;AAEO,MAAMA,iBAAiB,GAAG,CAACC,SAAD,WAA4C;EAAA,IAAhC;IAACC;EAAD,CAAgC;EAAA,IAAnBC,aAAmB;;EAC3E;EACA,MAAM;IAACC,SAAS,GAAGC;EAAb,IAAuCH,OAA7C;EAAA,MAAqCI,IAArC,iCAA6CJ,OAA7C;;EAEA,MAAMK,OAAO,GAAG,CAAC;IAACC;EAAD,CAAD,kBACd,6BAAC,iBAAD,eAAcF,IAAd;IAAoB,SAAS,EAAEF;EAA/B,IACGI,QADH,CADF;;EAMAD,OAAO,CAACE,SAAR,2CAAoB;IAClBD,QAAQ,EAAEE,kBAAA,CAAUC;EADF,CAApB;EAIA,OAAO,IAAAC,cAAA,EAAOX,SAAP,eACFE,aADE;IAELI;EAFK,GAAP;AAID,CAlBM"}
1
+ {"version":3,"file":"render-with-context.js","names":["renderWithContext","component","options","context","renderOptions","translate","mockTranslate","rest","wrapper","children","propTypes","PropTypes","node","render"],"sources":["../../src/util/render-with-context.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {render} from '@testing-library/react';\nimport {mockTranslate} from '@coorpacademy/translate';\nimport Provider from '../atom/provider';\n\nexport const renderWithContext = (component, options = {}) => {\n const {context = {}, ...renderOptions} = options;\n // uses mockTranslate as a default translate function\n const {translate = mockTranslate, ...rest} = context;\n\n const wrapper = ({children}) => (\n <Provider {...rest} translate={translate}>\n {children}\n </Provider>\n );\n\n wrapper.propTypes = {\n children: PropTypes.node\n };\n\n return render(component, {\n ...renderOptions,\n wrapper\n });\n};\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;AAEO,MAAMA,iBAAiB,GAAG,CAACC,SAAD,EAAYC,OAAO,GAAG,EAAtB,KAA6B;EAC5D,MAAM;IAACC,OAAO,GAAG;EAAX,IAAmCD,OAAzC;EAAA,MAAwBE,aAAxB,iCAAyCF,OAAzC,aAD4D,CAE5D;;;EACA,MAAM;IAACG,SAAS,GAAGC;EAAb,IAAuCH,OAA7C;EAAA,MAAqCI,IAArC,iCAA6CJ,OAA7C;;EAEA,MAAMK,OAAO,GAAG,CAAC;IAACC;EAAD,CAAD,kBACd,6BAAC,iBAAD,eAAcF,IAAd;IAAoB,SAAS,EAAEF;EAA/B,IACGI,QADH,CADF;;EAMAD,OAAO,CAACE,SAAR,2CAAoB;IAClBD,QAAQ,EAAEE,kBAAA,CAAUC;EADF,CAApB;EAIA,OAAO,IAAAC,cAAA,EAAOZ,SAAP,eACFG,aADE;IAELI;EAFK,GAAP;AAID,CAnBM"}
@@ -20,6 +20,7 @@
20
20
  "Create a new cohort": "Create a new cohort",
21
21
  "Delete": "Delete",
22
22
  "Draft": "Draft",
23
+ "drop_down_icon": "Dropdown to open the list of available answers",
23
24
  "Edit": "Edit",
24
25
  "external_content_article": "DOCUMENTS",
25
26
  "external_content_scorm": "ANIMATED RESOURCES",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorpacademy/components",
3
- "version": "11.2.9",
3
+ "version": "11.2.10",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -159,5 +159,5 @@
159
159
  "last 2 versions",
160
160
  "IE 11"
161
161
  ],
162
- "gitHead": "f2709ae6ade2a4a7eba185c70e0657eb1bd719cd"
162
+ "gitHead": "a528f3c84e4a9d44cf332e5fc0fcff774b3cd714"
163
163
  }
@@ -1 +0,0 @@
1
- {"ignore_dirs":[]}