@clickview/lite 0.55.3-rc.0 → 0.55.3-rc.1

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts/9139-a589d9d40b-lite.chunk.js","mappings":"oLACA,SAAgB,oBAAsB,QAAQ,iBAAmB,S,sGCQjE,IAAMA,EAAY,6BAEZC,EAAmB,IASnB,SAAUC,EAAoBC,G,UAC4B,G,GAAlC,OAA+B,CAAC,G,EAAE,E,o4BAAtDC,EAAG,KAAEC,EAAU,KAQvB,OACE,uBAAKD,IAAKA,EAAKE,UAAWH,EAAMG,WAC9B,qBAAGA,UAAS,UAAK,sBAA0B,YAAyB,QAArB,EAAAH,EAAMI,uBAAe,QAAI,SAAU,gBAACC,EAAA,EAAI,CAACR,UAAWA,EAAWS,OAAO,yBACrH,gBAACC,EAAA,EAAO,CACNC,OAAQP,EAAIQ,QACZC,KAAMR,EACNS,UAAWX,EAAMY,mBAZvB,W,MAGE,OAFmBC,SAASC,gBAAgBC,cAA0B,QAAX,EAAAd,EAAIQ,eAAO,eAAEO,wBAAwBC,QAE5EnB,CACtB,CAQ4CoB,GAAoBlB,EAAMY,kBAAoBZ,EAAMW,WAE1F,uBAAKR,UAAS,UAAK,mBAAuB,0CACxC,yBAAG,gBAACE,EAAA,EAAI,CAACR,UAAWA,EAAWS,OAAO,aACtC,qBAAGH,UAAU,oBAAmB,gBAACE,EAAA,EAAI,CAACR,UAAWA,EAAWS,OAAO,eAK7E,C,ovDC/BA,IAAMa,EAAwB,mBAExBtB,EAAY,yBAEZuB,EAAkB,0EAkBxB,SAASC,EAAerB,GACtB,SAASsB,IACP,IAAMC,EAAYH,EAAkB,mBAGpC,OAAKpB,EAAMwB,KAAKC,MAAQzB,EAAM0B,gBACrBH,EAAY,mCAEdA,EAAY,cACrB,CAEA,IAAMI,EAAU,WAWhB,OATA,aAAgB,WACd,GAAKA,EAAQlB,QAAb,CAGA,I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AAMsP,MAClB1B,YAAU,EACVU,gBAAiB,SAACiB,GAChB,MAAO,CACL7D,YAAa,UACbC,OAAQ,oBACRsD,KAAM,CAAEM,EAAK7L,GAAIwL,EAAA,UAAmBK,EAAK9N,OAE7C,EACAoM,eAAgB2B,EAAAC,EAChBzB,yBAA0B,CAAEzF,MAAOvI,EAAMuI,MAAOC,YAAaxI,EAAMwI,aACnEoG,cAAe,CAAEC,SAAU,YAKjC,+BACE,gBAACa,EAAA,EAAa,CACZC,aAAc3P,EAAMuI,MACpB8B,WAAYrK,EAAMqK,WAClBuF,cAAe5P,EAAM4P,cACrB/C,YAAa7M,EAAM6M,YACnBgD,aAAc7P,EAAM6P,aACpBC,aAAc9P,EAAM8P,aACpBC,gBAAiB,SAACC,EAAGC,GAAI,OAAKC,EAAA,aAA8BF,EAAG,OAAF,wBACxDC,GAAI,CACPlF,QAAS/K,EAAMgL,OAAOD,QACtBE,UAAWjL,EAAMgL,OAAOC,UACxBC,SAAUlL,EAAMgL,OAAOE,SACvBJ,QAAS9K,EAAM8K,QACfK,YAAanL,EAAMgL,OAAOI,MAC1B,EACFU,UAAW9L,EAAM8L,UACjBX,YAAanL,EAAMgL,OAAOI,IAC1B+E,SAAUnQ,EAAMmQ,YAK1B,C,mCC9VA,SAAgB,kBAAoB,QAAQ,cAAgB,QAAQ,YAAc,QAAQ,YAAc,QAAQ,QAAU,QAAQ,oBAAsB,QAAQ,SAAW,QAAQ,IAAM,QAAQ,MAAQ,QAAQ,OAAS,QAAQ,SAAW,Q","sources":["file:///app/packages/libs/shared/src/components/copyright-disclaimer/copyright-disclaimer.scss","file:///app/packages/libs/shared/src/components/copyright-disclaimer/CopyrightDisclaimer.tsx","file:///app/packages/libs/shared/src/components/curriculum-links/CurriculumLinks.tsx","file:///app/packages/libs/shared/src/components/curriculum-links/CurriculumLinksEmptyState.tsx","file:///app/packages/libs/shared/src/components/curriculum-links/partial-loading/PartialCurriculumLinks.tsx","file:///app/packages/libs/shared/src/components/curriculum-links/partial-loading/partial-curriculum-links.scss","file:///app/packages/libs/shared/src/enums/CurriculumType.ts","file:///app/packages/libs/shared/src/components/curriculum-links/CurriculumDropdown.tsx","file:///app/packages/libs/shared/src/components/curriculum-links/CurriculumLinksWithScrollbar.tsx","file:///app/packages/projects/lite/src/shared/components/play-page/PlayPage.tsx","file:///app/packages/libs/shared/src/components/curriculum-links/curriculum-links.scss"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"copyrightDisclaimer\":\"z8YoI\",\"overlayContainer\":\"eJDbJ\"};","import React from 'react';\nimport { Overlay } from 'react-bootstrap';\nimport { Placement } from 'react-bootstrap/esm/types';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { useHoverIntent } from 'libs/shared/hooks/UseHover';\n\nimport styles from './copyright-disclaimer.scss';\n\nconst namespace = 'shared.copyrightDisclaimer';\n\nconst CONTAINER_HEIGHT = 150; // px\n\ninterface CopyrightDisclaimerProps {\n placement: Placement;\n overflowPlacement?: Placement;\n className?: string;\n phraseClassName?: string;\n}\n\nexport function CopyrightDisclaimer(props: CopyrightDisclaimerProps) {\n const [ ref, isHovering ] = useHoverIntent<HTMLDivElement>({});\n\n function preventOverflow() {\n const spaceBelow = document.documentElement.clientHeight - ref.current?.getBoundingClientRect().bottom;\n\n return spaceBelow < CONTAINER_HEIGHT;\n }\n\n return (\n <div ref={ref} className={props.className}>\n <p className={`${styles.copyrightDisclaimer} ${props.phraseClassName ?? 'mb-1'}`}><Text namespace={namespace} phrase='copyrightDisclaimer' /></p>\n <Overlay\n target={ref.current}\n show={isHovering}\n placement={props.overflowPlacement && preventOverflow() ? props.overflowPlacement : props.placement}\n >\n <div className={`${styles.overlayContainer} mw-100 bg-white border rounded-3 p-2`}>\n <p><Text namespace={namespace} phrase='warning' /></p>\n <p className='fw-semibold mb-0'><Text namespace={namespace} phrase='sharing' /></p>\n </div>\n </Overlay>\n </div>\n );\n}","import React from 'react';\n\nimport { PartialCurriculumLinks } from 'libs/shared/components/curriculum-links/partial-loading/PartialCurriculumLinks';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { CurriculumType } from 'libs/shared/enums/CurriculumType';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { Curriculum, Presentation } from 'libs/shared/interfaces';\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\n\nimport { CurriculumLinksEmptyState } from './CurriculumLinksEmptyState';\n\nimport styles from './curriculum-links.scss';\n\nconst BRACKET_SEGMENT_REGEX = /(.*)\\s\\((.*)?\\)/i;\n\nconst namespace = 'shared.curriculumLinks';\n\nconst BASE_PILL_CLASS = 'text-nowrap font-size-normal rounded-pill py-1 px-2 my-0 d-inline-block';\n\ninterface CurriculumStructure {\n [CurriculumType.Subject]: Curriculum<CurriculumType.Subject>;\n [CurriculumType.Audience]: Curriculum<CurriculumType.Audience>;\n areasAndLeaves: Array<{\n [CurriculumType.Area]: Curriculum<CurriculumType.Area>[];\n [CurriculumType.Leaf]: Curriculum<CurriculumType.Leaf>[];\n }>;\n}\n\ninterface CurriculumLeafProps {\n leaf: Curriculum<CurriculumType.Leaf>;\n codeWidth: number;\n trySetMaxCodeWidth: React.Dispatch<React.SetStateAction<number>>;\n uiContainsCodes: boolean;\n}\n\nfunction CurriculumLeaf(props: CurriculumLeafProps): JSX.Element {\n function getCurriculumCodeClass(): string {\n const baseClass = BASE_PILL_CLASS + ' bg-white border';\n\n // If a leaf has no code but the rest of the UI has leaf nodes w/ codes, we show a special \"No code\" pill\n if (!props.leaf.name && props.uiContainsCodes)\n return baseClass + ' border-secondary text-secondary';\n\n return baseClass + ' border-dark';\n }\n\n const codeRef = React.useRef<HTMLDivElement>();\n\n React.useEffect(() => {\n if (!codeRef.current)\n return;\n\n const { width } = codeRef.current.getBoundingClientRect();\n\n props.trySetMaxCodeWidth(width);\n }, [codeRef.current]);\n\n return (\n <div className='d-flex'>\n {(() => {\n if (!props.leaf.description)\n return <p className='m-0' dangerouslySetInnerHTML={{ __html: props.leaf.name }} />;\n\n /**\n * If a leaf has no code but the rest of the UI has leaf nodes\n * with codes, we show a special \"No code\" pill. Example: https://imgur.com/3L1Ela3\n */\n if (!props.leaf.name && props.uiContainsCodes) {\n return (\n <>\n <div\n className='me-1 align-self-start'\n style={{ minWidth: props.codeWidth ? `${props.codeWidth}px` : 'auto' }}\n >\n <h5 ref={codeRef} className={getCurriculumCodeClass()}>\n <Text namespace={namespace} phrase='noCode' />\n </h5>\n </div>\n <p className='m-0 align-self-center' dangerouslySetInnerHTML={{ __html: props.leaf.description }} />\n </>\n );\n }\n\n /**\n * If a leaf has no code and the rest of the UI leaf nodes have no code, we just\n * display the description with a bullet point. Example: https://imgur.com/jzJvmWs\n */\n if (!props.leaf.name && !props.uiContainsCodes)\n return <p className='m-0' dangerouslySetInnerHTML={{ __html: props.leaf.description }} />;\n\n return (\n <>\n <div\n className='me-1 align-self-start'\n style={{ minWidth: props.codeWidth ? `${props.codeWidth}px` : 'auto' }}\n >\n <h5 ref={codeRef} className={getCurriculumCodeClass()}>{props.leaf.name}</h5>\n </div>\n <p className='m-0 align-self-center' dangerouslySetInnerHTML={{ __html: props.leaf.description }} />\n </>\n );\n })()}\n </div>\n );\n}\n\ninterface CurriculumSubjectProps {\n linkSet: CurriculumStructure;\n codeWidth: number;\n trySetMaxCodeWidth: React.Dispatch<React.SetStateAction<number>>;\n}\n\nfunction CurriculumSubject(props: CurriculumSubjectProps): JSX.Element {\n const areaAndLeafSets: { [areaText: string]: Curriculum<CurriculumType.Leaf>[]; } = {};\n\n let uiContainsCodes = false;\n\n props.linkSet.areasAndLeaves.forEach(areaAndLeafSet => {\n const areaText = areaAndLeafSet[CurriculumType.Area].map(ca => ca.name).join(' - ');\n\n if (areaAndLeafSets[areaText]) {\n areaAndLeafSet[CurriculumType.Leaf].forEach(leaf => {\n if (!areaAndLeafSets[areaText].find(l => l.name === leaf.name)) {\n areaAndLeafSets[areaText].push(leaf);\n\n // We need the info on if _any_ leaf node has a code in it. See why in the comments in `<CurriculumLeaf />`\n if (leaf.name)\n uiContainsCodes = true;\n }\n });\n\n return;\n }\n\n areaAndLeafSets[areaText] = areaAndLeafSet[CurriculumType.Leaf];\n });\n\n function getAudienceText(): string {\n const audienceSegment = props.linkSet[CurriculumType.Audience].name;\n const subjectSegment = props.linkSet[CurriculumType.Subject].name;\n\n /**\n * In some curriculums, such as the UK curriculum, the audience string may contain a year group\n * in brackets. For example, it may be \"Lower Key Stage 2 (Year 4)\".\n * This regex will pull that segment out if it exists.\n */\n const audienceBracketSegments = audienceSegment.match(BRACKET_SEGMENT_REGEX);\n\n if (audienceBracketSegments)\n return `${audienceBracketSegments[1]} • ${audienceBracketSegments[2]} • ${subjectSegment}`;\n\n return `${audienceSegment} • ${subjectSegment}`;\n }\n\n function getLeafStyleClass(leaf: Curriculum<CurriculumType.Leaf>): string {\n const className = 'mb-2';\n\n if (!leaf.name && !uiContainsCodes)\n return className + ' ms-4 ' + styles.leafDescriptionOnly;\n\n return className;\n }\n\n return (\n <>\n <h3 className={`${BASE_PILL_CLASS} text-white bg-dark-blue fw-normal me-1 mb-2`}>\n {getAudienceText()}\n </h3>\n\n <div className={`me-2 ${styles.curriculumSubject}`}>\n {Object.keys(areaAndLeafSets).map((areaText, i) => {\n return (\n <div key={i} className={styles.areaLeafSet} >\n {areaText && <h4 className='mb-1 font-size-normal'>{areaText}</h4>}\n <ul className='list-unstyled'>\n {areaAndLeafSets[areaText].map(leaf => (\n <li key={leaf.id} className={getLeafStyleClass(leaf)}>\n <CurriculumLeaf\n leaf={leaf}\n codeWidth={props.codeWidth}\n trySetMaxCodeWidth={props.trySetMaxCodeWidth}\n uiContainsCodes={uiContainsCodes}\n />\n </li>\n ))}\n </ul>\n </div>\n );\n })}\n </div>\n </>\n );\n}\n\ninterface CurriculumLinksSet {\n [subjectAndAudienceIdKey: string]: CurriculumStructure\n}\n\ninterface CurriculumLinksProps {\n curriculumLinks: Curriculum[][];\n emptyStateUrl?: string;\n checkAllCurriculums?: () => Promise<Presentation[]>;\n onChangeCurriculum?: (id: string) => void;\n hasNonEmptyCurriculums: boolean;\n}\n\nexport function CurriculumLinks(props: CurriculumLinksProps): JSX.Element {\n const [ codeWidth, setCodeWidth ] = React.useState(0);\n const [ showOtherCurriculums, setShowOtherCurriculums ] = React.useState(false);\n const [ loadingOther, setLoadingOther ] = React.useState(false);\n const [ curriculumTags, setCurriculumTags ] = React.useState<Presentation[]>([]);\n\n React.useEffect(() => {\n if (props.checkAllCurriculums && props.curriculumLinks && !props.curriculumLinks?.length) {\n setLoadingOther(true);\n // only fetch other curriculums when this curriculum is displayed\n props.checkAllCurriculums().then(data => {\n if (data.length) {\n setShowOtherCurriculums(true);\n }\n\n setCurriculumTags(data);\n }).finally(() => setLoadingOther(false));\n }\n\n if (props.curriculumLinks?.length && showOtherCurriculums) {\n setShowOtherCurriculums(false);\n }\n }, [props.curriculumLinks?.length]);\n\n function trySetMaxCodeWidth(width: number): void {\n /**\n * The width of the curriculum code column should be identical for each leaf node, meaning\n * the leaf description text will be perfectly vertically aligned all the way down.\n * See here for example: https://imgur.com/MbganZf\n * \n * This is achieved by us setting the state for the maximum code width, and forcing all\n * smaller codes to abide by that max width.\n * \n * This value is used in the `<CurriculumLeaf />` component.\n */\n setCodeWidth(currentVal => {\n if (currentVal >= width)\n return currentVal;\n\n return width;\n });\n }\n\n /**\n * Here, we're taking the structure of links from the backend, and restructuring it in a way\n * that resembles the structure of our UI more closely. The general idea is:\n * \n * CurriculumAudience - CurriculumSubject\n * CurriculumAreas\n * CurriculumLeaves\n */\n const curriculumLinkSets = React.useMemo(() => {\n const newSet: CurriculumLinksSet = {};\n\n props.curriculumLinks?.forEach(linkSet => {\n let subject: Curriculum<CurriculumType.Subject> = null;\n let audience: Curriculum<CurriculumType.Audience> = null;\n const areas: Curriculum<CurriculumType.Area>[] = [];\n const leaves: Curriculum<CurriculumType.Leaf>[] = [];\n \n linkSet.forEach(curriculumObj => {\n switch (curriculumObj.type) {\n case CurriculumType.Subject:\n subject = curriculumObj as Curriculum<CurriculumType.Subject>;\n break;\n case CurriculumType.Audience:\n audience = curriculumObj as Curriculum<CurriculumType.Audience>;\n break;\n case CurriculumType.Area:\n areas.push(curriculumObj as Curriculum<CurriculumType.Area>);\n break;\n case CurriculumType.Leaf:\n leaves.push(curriculumObj as Curriculum<CurriculumType.Leaf>);\n break;\n default:\n break;\n }\n });\n \n const key = `${subject.id}:${audience.id}`;\n \n if (newSet[key]) {\n newSet[key].areasAndLeaves.push({\n [CurriculumType.Area]: areas,\n [CurriculumType.Leaf]: leaves\n });\n \n return;\n }\n \n newSet[key] = {\n [CurriculumType.Subject]: subject,\n [CurriculumType.Audience]: audience,\n areasAndLeaves: [{\n [CurriculumType.Area]: areas,\n [CurriculumType.Leaf]: leaves\n }]\n };\n });\n\n return newSet;\n }, [props.curriculumLinks]);\n\n if (loadingOther) {\n return <PartialCurriculumLinks />;\n }\n \n if (!props.curriculumLinks?.length && !props.hasNonEmptyCurriculums) {\n // only if all other curriculums don't have links we render the empty state\n if (props.emptyStateUrl && !showOtherCurriculums && !loadingOther)\n return <CurriculumLinksEmptyState emptyStateUrl={props.emptyStateUrl} />;\n }\n\n if (showOtherCurriculums) {\n return (\n <div>\n <div className='mb-3'>\n <Text namespace={namespace} phrase='currentEmpty' />\n </div>\n <div className='mb-3'>\n <Text namespace={namespace} phrase='currentEmptyInfo' />\n </div>\n <ul className='list-unstyled mb-0'>\n {curriculumTags.map(t => (\n <li\n key={t.id}\n className={`p-1 pe-2 rounded-pill d-inline-flex align-items-center cursor-pointer ${styles.tag} me-2`}\n onClick={() => props.onChangeCurriculum(t.id.toString())}\n >\n <div className={`bg-white ${styles.cover} rounded-circle`}>\n <img\n src={ImageHelper.createUrl(t.cover.url, { size: ImageSize.Small })}\n alt={t.name}\n className='rounded-circle'\n />\n </div>\n {t.name}\n </li>\n ))}\n </ul>\n </div>\n );\n }\n\n return (\n <ul className='list-unstyled m-0'>\n {Object.keys(curriculumLinkSets).map((linkSetKey, i) => (\n <li key={`linkset-${i}`} className={styles.curriculumSet}>\n <CurriculumSubject\n linkSet={curriculumLinkSets[linkSetKey]}\n trySetMaxCodeWidth={trySetMaxCodeWidth}\n codeWidth={codeWidth}\n />\n </li>\n ))}\n </ul>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'shared.curriculumLinks';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CurriculumLinksEmptyStateProps {\n emptyStateUrl: string;\n}\n\nexport function CurriculumLinksEmptyState(props: CurriculumLinksEmptyStateProps): JSX.Element {\n return (\n <EmptyState className='pt-3'>\n <EmptyState.Image src={props.emptyStateUrl} altText={getPhrase('emptyInfo')} size='small'/>\n <EmptyState.Heading>\n <Text namespace={namespace} phrase='emptyHeading' />\n </EmptyState.Heading>\n <EmptyState.Info>\n <Text namespace={namespace} phrase='emptyInfo' />\n </EmptyState.Info>\n </EmptyState>\n );\n}","import React from 'react';\n\nimport styles from './partial-curriculum-links.scss';\n\nconst PartialCurriculumLinkSection = () => (\n <>\n <div className={`partial-loading-background rounded-pill py-1 px-2 d-inline-block me-1 mb-2 ${styles.audience}`} />\n <div>\n <div className={`partial-loading-background mb-1 ${styles.area}`} />\n\n <div className='mb-2 d-flex'>\n <div className={`me-1 align-self-start ${styles.code}`}>\n <div className={`partial-loading-background rounded-pill py-1 px-2 d-inline-block w-100 h-100`} />\n </div>\n \n <div className={`partial-loading-background ${styles.description}`} />\n </div>\n </div>\n </>\n);\n\nexport function PartialCurriculumLinks(): JSX.Element {\n return (\n <div>\n <div className='mb-3'>\n <PartialCurriculumLinkSection />\n </div>\n\n <div className='mb-3'>\n <PartialCurriculumLinkSection />\n </div>\n\n <div>\n <PartialCurriculumLinkSection />\n </div>\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"audience\":\"vDcrq\",\"area\":\"GXhoW\",\"code\":\"goKaS\",\"description\":\"vFew6\"};","export enum CurriculumType {\n Subject = 'CurriculumSubject',\n Audience = 'CurriculumAudience',\n Area = 'CurriculumArea',\n Leaf = 'CurriculumLeaf'\n}","import React from 'react';\n\nimport { Presentation } from 'libs/shared/interfaces';\n\nconst MIN_CURRICULUMS = 2;\n\ninterface CurriculumDropdownProps {\n availableCurriculums: Presentation[];\n onChangeCurriculum: (id: string) => void;\n selectedCurriculum?: Presentation;\n className?: string;\n}\n\nexport function CurriculumDropdown(props: CurriculumDropdownProps): JSX.Element {\n // No need to show a dropdown if they don't have enough curriculums\n if (props.availableCurriculums?.length < MIN_CURRICULUMS || !props.selectedCurriculum)\n return <></>;\n\n return (\n <select\n className={`mb-3 form-select ${props.className}`}\n onChange={e => props.onChangeCurriculum(e.target.value)}\n value={props.selectedCurriculum.id}\n >\n {props.availableCurriculums.map(curriculum => {\n return (\n <option\n key={curriculum.id}\n id={curriculum.id}\n value={curriculum.id}\n >\n {curriculum.name}\n </option>\n );\n })}\n </select>\n );\n}","import React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { CurriculumData, Presentation } from 'libs/shared/interfaces';\n\nimport { PartialCurriculumLinks } from './partial-loading/PartialCurriculumLinks';\nimport { CurriculumDropdown } from './CurriculumDropdown';\nimport { CurriculumLinks } from './CurriculumLinks';\n\nimport styles from './curriculum-links.scss';\n\nconst namespace = 'shared.curriculumLinks';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CurriculumLinksWithScrollbarProps {\n curriculums: CurriculumData;\n emptyStateUrl: string;\n height?: number;\n onClickClose?: () => void;\n checkAllCurriculums?: () => Promise<Presentation[]>;\n}\n\nexport function CurriculumLinksWithScrollbar(props: CurriculumLinksWithScrollbarProps): JSX.Element {\n const {\n hasLoaded,\n activeCurriculum: currentCurriculum,\n availableCurriculums,\n curriculumLinks,\n updateCurriculum,\n nonEmptyCurriculums\n } = props.curriculums;\n\n const [ showPartialLoading, setShowPartialLoading ] = React.useState(!hasLoaded);\n const [ selectedCurriculum, setSelectedCurriculum ] = React.useState<Presentation>();\n\n const alerts = useAlerts();\n\n React.useEffect(() => {\n if (!hasLoaded)\n return;\n\n if (!selectedCurriculum)\n setSelectedCurriculum(currentCurriculum ?? ArrayHelper.first(availableCurriculums));\n \n if (currentCurriculum)\n setShowPartialLoading(false);\n }, [ currentCurriculum?.id, hasLoaded ]);\n\n function onChangeCurriculum(curriculumId: string): void {\n const newCurriculum = availableCurriculums.find(c => c.id.toString() === curriculumId);\n if (!newCurriculum?.id)\n return;\n\n if (selectedCurriculum?.id?.toString() === newCurriculum?.id?.toString())\n return;\n\n setSelectedCurriculum(newCurriculum);\n setShowPartialLoading(true);\n\n const onError = () => {\n // If the request to change curriculum fails, we reset the select state and alert the user\n setSelectedCurriculum(selectedCurriculum);\n setShowPartialLoading(false);\n alerts.error(getPhrase('updateFailed'));\n };\n\n updateCurriculum(newCurriculum, null, onError);\n }\n\n const canClose = typeof props.onClickClose === 'function';\n\n return (\n <div className='rounded border mb-3 position-relative'>\n <Scrollbars autoHeight autoHeightMax={props.height}>\n <div className='p-3'>\n <h2 className='h6 me-2 h-100'>\n <Text namespace={namespace} phrase='heading' />\n </h2>\n\n <CurriculumDropdown\n availableCurriculums={availableCurriculums}\n onChangeCurriculum={onChangeCurriculum}\n selectedCurriculum={selectedCurriculum}\n className={styles.dropdown}\n />\n\n {showPartialLoading\n ? <PartialCurriculumLinks />\n : (\n <CurriculumLinks\n curriculumLinks={curriculumLinks}\n emptyStateUrl={props.emptyStateUrl}\n checkAllCurriculums={props.checkAllCurriculums}\n onChangeCurriculum={onChangeCurriculum}\n hasNonEmptyCurriculums={!!nonEmptyCurriculums.length}\n />\n )}\n </div>\n </Scrollbars>\n\n {canClose && (\n <button\n type='button'\n className={`btn-close ${styles.closeButton}`}\n aria-label='Close'\n onClick={props.onClickClose}\n />\n )}\n </div>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { SignUpDescriptors, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { CopyrightDisclaimer } from 'libs/shared/components/copyright-disclaimer/CopyrightDisclaimer';\nimport { CurriculumLinksWithScrollbar } from 'libs/shared/components/curriculum-links/CurriculumLinksWithScrollbar';\nimport { LanguageNamespaceContext } from 'libs/shared/components/text/Text';\nimport { VideoAtAGlance } from 'libs/shared/components/video-at-a-glance/VideoAtAGlance';\nimport { hasGlanceData } from 'libs/shared/components/video-at-a-glance/VideoAtAGlanceUtils';\nimport { VideoDetailsWithScrollbar } from 'libs/shared/components/video-details/VideoDetails';\nimport { VideoDetailsPartial } from 'libs/shared/components/video-details/VideoDetailsPartial';\nimport { FixedWidget } from 'libs/shared/components/widgets/fixed-widget';\nimport { ClipWidgetItem, ClipWidgetItemProps } from 'libs/shared/components/widgets/items/clip-widget-item/ClipWidgetItem';\nimport { InteractiveWidgetItem, InteractiveWidgetItemProps } from 'libs/shared/components/widgets/items/interactive-widget-item/InteractiveWidgetItem';\nimport { ResourceWidgetItem, ResourceWidgetItemProps } from 'libs/shared/components/widgets/items/resource-widget-item/ResourceWidgetItem';\nimport { MINIMUM_GLANCE_HEIGHT } from 'libs/shared/constants/MinimumGlanceHeight';\nimport { SeoConstants } from 'libs/shared/constants/SeoConstants';\nimport { GlobalPlayerConsumer } from 'libs/shared/context/player-context/components/GlobalPlayerConsumer';\nimport { usePlayerContext } from 'libs/shared/context/player-context/PlayerContext';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { CanFavouriteFunc, Clip, CurrentUser, CurriculumData, FavouriteFunc, Interactive, InteractiveMetadata, PointOfInterest, Presentation, PresentationAudience, Theme, Video, YearGroup } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { ArchivedBanner } from 'shared/components/play-page/ArchivedBanner';\nimport { PlayPageTitleAndActions } from 'shared/components/play-page/components/title-and-actions/PlayPageTitleAndActions';\nimport { RestrictionBanner } from 'shared/components/play-page/RestrictionBanner';\nimport { PlayerPlaceholder } from 'shared/components/player-placeholder/PlayerPlaceholder';\nimport { RelatedVideos } from 'shared/components/related-videos/RelatedVideos';\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { getAppLinks, getResources } from './PlayPageUtils';\n\nconst namespace = 'shared.playPage';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ntype DetailsViewType = {\n view: 'v@g' | 'details' | 'curriculumLinks' | 'loading';\n referrer: 'v@g' | 'details' | 'curriculumLinks';\n};\n\ninterface PlayPageProps {\n video: Video;\n interactives: InteractiveMetadata[];\n clips: Clip[];\n yearGroups: YearGroup[];\n imageCdnUrl: string;\n relatedVideos: RelatedVideosHash;\n audiences: PresentationAudience[];\n setFavourite?: FavouriteFunc;\n canFavourite?: CanFavouriteFunc;\n glanceTheme?: Theme;\n glanceLoaded: boolean;\n currentUser: CurrentUser;\n pointsOfInterest?: PointOfInterest[];\n playNext: boolean;\n shareId?: string;\n curriculums: CurriculumData;\n featureAccess: VideoFeaturesHash;\n params?: PlayViewQueryParams;\n canManageVideoAccess: boolean;\n tableOfContentsId: string;\n checkAllCurriculum?: () => Promise<Presentation[]>\n isPlugin: boolean;\n}\n\nexport function PlayPage(props: PlayPageProps): JSX.Element {\n const playerContext = usePlayerContext();\n\n const { hasPermissions } = usePermissions();\n const { canConsume } = VideoHelper.getCanBeConsumed(props.video);\n\n const { imageCdnUrl } = props;\n\n const isArchived = VideoHelper.isVideoTypeArchived(props.video);\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\n\n const resourcesRef = React.useRef<HTMLDivElement>(null);\n const interactivesRef = React.useRef<HTMLDivElement>(null);\n\n useTableOfContentsScroll([\n resourcesRef.current,\n interactivesRef.current\n ], props.tableOfContentsId);\n\n /**\n * Need to use a ref because if we use state, onExitImmersiveReader will have a stale\n * reference of the state. This is because the state is changed in onLaunchImmersiveReader\n * which is passed in at the same time as onExitImmersiveReader\n */\n const shouldPlayOnExitImmersiveReader = React.useRef(false);\n\n const hasGlance = hasGlanceData(props.video, props.glanceTheme) && props.featureAccess.canViewGlance;\n\n const [ detailsView, setDetailsView ] = React.useState<DetailsViewType>({\n view: 'loading',\n referrer: null\n });\n\n React.useEffect(() => {\n if (!props.glanceLoaded)\n return;\n\n setDetailsView({\n view: props.glanceTheme ? 'v@g' : 'details',\n referrer: null\n });\n }, [ props.glanceLoaded, props.glanceTheme ]);\n\n const appLinkFns = getAppLinks();\n\n function onLaunchImmersiveReader(): void {\n shouldPlayOnExitImmersiveReader.current = !playerContext?.playerRef?.current?.isPaused();\n playerContext?.playerRef?.current?.pause();\n }\n\n function onExitImmersiveReader(): void {\n if (!shouldPlayOnExitImmersiveReader.current)\n return;\n\n playerContext?.playerRef?.current?.play();\n }\n\n const resourcesWidget = getResources(props.video, hasStudentExperience);\n\n const showPlayerPlaceholder = playerContext.mode === 'picture-in-picture' || props.featureAccess.canViewPublicLayout;\n\n const hasCurriculumLinks = !!(props.featureAccess.canViewCurriculumLinks &&\n props.curriculums.customerHasCurriculumLinks);\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n\n <RestrictionBanner\n restrictions={props.video._restrictions}\n yearGroups={props.yearGroups}\n objectId={props.video.id}\n objectTypeId={MasterType.Video}\n canManageVideoAccess={props.canManageVideoAccess}\n />\n \n {isArchived && <ArchivedBanner typeId={props.video.typeId} hasStudentExperience={hasStudentExperience}/>}\n \n <section className={`mb-2 ${SeoConstants.GLOBAL_PLAYER_SELECTOR}`}>\n {canConsume &&\n <GlobalPlayerConsumer\n key={props.video.id}\n objectId={props.video.id}\n objectTypeId={props.video.typeId}\n shareId={props.shareId}\n context={props.params?.context}\n contextId={props.params?.contextId}\n playNext={props.params?.playNext}\n moviesAndTv={props.params?.mtv}\n startTime={props.params?.t ?? props.params?.startTime}\n endTime={props.params?.endTime}\n mode='default'\n location='play-page'\n />\n }\n <div className={showPlayerPlaceholder ? '' : 'd-none'}>\n <PlayerPlaceholder\n video={props.video}\n appLink={{\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n }}\n type={playerContext.mode === 'picture-in-picture' ? 'pip' : 'public'}\n />\n </div>\n </section>\n\n <PlayPageTitleAndActions\n media={props.video}\n yearGroups={props.yearGroups}\n audiences={props.audiences}\n getSeriesAppLink={series => appLinkFns.getSeriesAppLink(series, props.params.mtv)}\n featureAccess={props.featureAccess}\n shareId={props.shareId}\n />\n\n {/* \n * Toggling between display 'block' and 'none' is *deliberate* done here to facilitate exposure of our content to bots for SEO.\n * The markup of all 3 components should be available in the DOM from the first render. If you're going to refactor,\n * please don't neglect this usecase - Mike\n */}\n <section className={`${detailsView.view === 'v@g' ? 'd-block' : 'd-none'}`}>\n <VideoAtAGlance\n theme={props.glanceTheme}\n video={props.video}\n pointsOfInterest={props.pointsOfInterest}\n onClickShowDescription={() => setDetailsView({ view: 'details', referrer: 'v@g' })}\n onClickShowCurriculumLinks={hasCurriculumLinks && (() => setDetailsView({ view: 'curriculumLinks', referrer: 'v@g' }))}\n setStartTime={(time: number) => playerContext.playerRef.current?.currentTime(time)}\n getTagAppLink={appLinkFns.getTagAppLink}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n />\n </section>\n\n <section className={`${detailsView.view === 'details' ? 'd-block' : 'd-none'}`}>\n <VideoDetailsWithScrollbar\n video={props.video}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n hideTags={hasGlance}\n onClickClose={hasGlance && (() => setDetailsView({ view: 'v@g', referrer: 'details' }))}\n onClickShowCurriculumLinks={hasCurriculumLinks && (() => setDetailsView({ view: 'curriculumLinks', referrer: 'details' }))}\n getTagAppLink={appLinkFns.getTagAppLink}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n />\n </section>\n\n {detailsView.view === 'curriculumLinks' && (\n <section >\n <CurriculumLinksWithScrollbar\n height={MINIMUM_GLANCE_HEIGHT}\n curriculums={props.curriculums}\n onClickClose={(() => setDetailsView({ view: detailsView.referrer, referrer: 'curriculumLinks' }))}\n emptyStateUrl={ImageUrls.EmptyStates.CURRICULUM_LINKS}\n checkAllCurriculums={props.checkAllCurriculum}\n />\n </section>\n )}\n\n <section className={`${detailsView.view === 'loading' ? 'd-block' : 'd-none'}`}>\n <VideoDetailsPartial />\n </section>\n\n {VideoHelper.isBroadcast(props.video) && <CopyrightDisclaimer placement='bottom-end' className='d-flex justify-content-end mt-n2' />}\n\n {!!resourcesWidget?.length && (\n <section className='pb-3' id={PlayPageAnchor.Resources} ref={resourcesRef}>\n <FixedWidget<ResourceWidgetItemProps>\n name={getPhrase('resources', { count: resourcesWidget.length })}\n contents={WidgetContents.PlayPageResources}\n collection={resourcesWidget}\n prefetched\n childComponent={ResourceWidgetItem}\n extraChildComponentProps={{\n imageCdnUrl,\n imageErrorFallbackUrl: ImageUrls.Fallbacks.RESOURCE_THUMBNAIL,\n actionBehaviour: props.featureAccess.canViewResourceItems ? 'normal' : 'public',\n location: 'play-page',\n titlePosition: 'above',\n hideTypeBadge: true\n }}\n getChildAppLink={appLinkFns.getResourceAppLink(\n props.video?.id,\n props.shareId,\n props.featureAccess.canViewResourceItems\n )}\n analyticsOptions={(() => {\n if (props.featureAccess.canViewResourceItems)\n return {};\n\n return {\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n };\n })()}\n analyticsData={{ widgetId: 'resources' }}\n />\n </section>\n )}\n\n {props.featureAccess.canViewInteractives && !!props.interactives?.length && (\n <section className='pb-3' id={PlayPageAnchor.Interactives} ref={interactivesRef}>\n <FixedWidget<InteractiveWidgetItemProps>\n name={getPhrase('interactives', { count: props.interactives.length })}\n contents={WidgetContents.Interactives}\n collection={props.interactives}\n prefetched\n getChildAppLink={(interactive: Interactive) => {\n return {\n application: AppChannels.INTERACTIVES,\n action: Actions.Interactives.VIEW_INTERACTIVE,\n args: [ interactive.id, TextHelper.slugify(interactive.name) ]\n };\n }}\n childComponent={InteractiveWidgetItem}\n extraChildComponentProps={{\n video: props.video,\n questionsAppLink: {\n application: AppChannels.INTERACTIVES,\n action: Actions.Interactives.PREVIEW_QUESTIONS\n },\n imageCdnUrl: props.imageCdnUrl\n }}\n analyticsData={{ widgetId: 'interactives' }}\n />\n </section>\n )}\n\n {props.featureAccess.canViewClips && !!props.clips?.length && (\n <section className='pb-3'>\n <FixedWidget<ClipWidgetItemProps>\n name={getPhrase('clips', { count: props.clips.length })}\n contents={WidgetContents.Clips}\n collection={props.clips}\n prefetched\n getChildAppLink={(clip: Clip) => {\n return {\n application: AppChannels.CLIPS,\n action: Actions.Clips.PLAY_CLIP,\n args: [ clip.id, TextHelper.slugify(clip.name) ]\n };\n }}\n childComponent={ClipWidgetItem}\n extraChildComponentProps={{ video: props.video, imageCdnUrl: props.imageCdnUrl }}\n analyticsData={{ widgetId: 'clips' }}\n />\n </section>\n )}\n\n <section>\n <RelatedVideos\n currentVideo={props.video}\n yearGroups={props.yearGroups}\n relatedVideos={props.relatedVideos}\n currentUser={props.currentUser}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.params.context,\n contextId: props.params.contextId,\n playNext: props.params.playNext,\n shareId: props.shareId,\n moviesAndTv: props.params.mtv\n })}\n audiences={props.audiences}\n moviesAndTv={props.params.mtv}\n isPlugin={props.isPlugin}\n />\n </section>\n </LanguageNamespaceContext.Provider>\n );\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"curriculumSubject\":\"GvGYH\",\"curriculumSet\":\"d7RK0\",\"areaLeafSet\":\"XRTAe\",\"closeButton\":\"N3l5Q\",\"heading\":\"hAxR4\",\"leafDescriptionOnly\":\"h66ke\",\"dropdown\":\"CsG6G\",\"tag\":\"rdLqY\",\"cover\":\"etwaD\",\"active\":\"aDLMe\",\"selected\":\"BMrSd\"};"],"names":["namespace","CONTAINER_HEIGHT","CopyrightDisclaimer","props","ref","isHovering","className","phraseClassName","Text","phrase","Overlay","target","current","show","placement","overflowPlacement","document","documentElement","clientHeight","getBoundingClientRect","bottom","preventOverflow","BRACKET_SEGMENT_REGEX","BASE_PILL_CLASS","CurriculumLeaf","getCurriculumCodeClass","baseClass","leaf","name","uiContainsCodes","codeRef","width","trySetMaxCodeWidth","description","style","minWidth","codeWidth","dangerouslySetInnerHTML","__html","CurriculumSubject","audienceSegment","subjectSegment","audienceBracketSegments","areaAndLeafSets","getLeafStyleClass","linkSet","areasAndLeaves","forEach","areaAndLeafSet","areaText","map","ca","join","find","l","push","match","Object","keys","i","key","id","CurriculumLinks","setCodeWidth","showOtherCurriculums","setShowOtherCurriculums","loadingOther","setLoadingOther","curriculumTags","setCurriculumTags","currentVal","checkAllCurriculums","curriculumLinks","length","then","data","curriculumLinkSets","newSet","subject","audience","areas","leaves","curriculumObj","type","hasNonEmptyCurriculums","emptyStateUrl","t","onClick","onChangeCurriculum","toString","src","cover","url","size","alt","linkSetKey","getPhrase","CurriculumLinksEmptyState","altText","PartialCurriculumLinkSection","PartialCurriculumLinks","CurriculumType","MIN_CURRICULUMS","CurriculumDropdown","availableCurriculums","selectedCurriculum","onChange","e","value","curriculum","LanguageService","CurriculumLinksWithScrollbar","curriculums","hasLoaded","currentCurriculum","activeCurriculum","updateCurriculum","nonEmptyCurriculums","showPartialLoading","setShowPartialLoading","setSelectedCurriculum","alerts","curriculumId","newCurriculum","c","error","ArrayHelper","canClose","onClickClose","autoHeight","autoHeightMax","height","PlayPage","playerContext","hasPermissions","usePermissions","canConsume","VideoHelper","video","imageCdnUrl","isArchived","hasStudentExperience","PermissionName","resourcesRef","interactivesRef","useTableOfContentsScroll","tableOfContentsId","shouldPlayOnExitImmersiveReader","hasGlance","glanceTheme","featureAccess","canViewGlance","view","referrer","detailsView","setDetailsView","glanceLoaded","appLinkFns","resourcesWidget","showPlayerPlaceholder","mode","canViewPublicLayout","hasCurriculumLinks","canViewCurriculumLinks","customerHasCurriculumLinks","RestrictionBanner","restrictions","_restrictions","yearGroups","objectId","objectTypeId","MasterType","canManageVideoAccess","ArchivedBanner","typeId","SeoConstants","GlobalPlayerConsumer","shareId","context","params","contextId","playNext","moviesAndTv","mtv","startTime","endTime","location","PlayerPlaceholder","appLink","application","action","PlayPageTitleAndActions","media","audiences","getSeriesAppLink","series","VideoAtAGlance","theme","pointsOfInterest","onClickShowDescription","onClickShowCurriculumLinks","setStartTime","time","playerRef","currentTime","getTagAppLink","suppressInteractivity","VideoDetails","currentUser","onLaunchImmersiveReader","isPaused","pause","onExitImmersiveReader","play","hideTags","ImageUrls","checkAllCurriculum","VideoDetailsPartial","PlayPageAnchor","count","contents","WidgetContents","collection","prefetched","childComponent","ResourceWidgetItem","R","extraChildComponentProps","imageErrorFallbackUrl","actionBehaviour","canViewResourceItems","titlePosition","hideTypeBadge","getChildAppLink","getResourceAppLink","analyticsOptions","workflowPhase","descriptor","SignUp","analyticsData","widgetId","canViewInteractives","interactives","interactive","args","TextHelper","InteractiveWidgetItem","questionsAppLink","canViewClips","clips","clip","ClipWidgetItem","C","RelatedVideos","currentVideo","relatedVideos","setFavourite","canFavourite","getVideoAppLink","v","opts","VideoAppLinkHelper","isPlugin"],"sourceRoot":""}