@clickview/lite 0.48.0-rc.2 → 0.48.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{1197-52bedf8583-lite.chunk.js → 1197-bc02ba8644-lite.chunk.js} +2 -2
- package/dist/scripts/1197-bc02ba8644-lite.chunk.js.map +1 -0
- package/dist/scripts/{1285-e93a3f21ba-lite.chunk.js → 1285-746158eef6-lite.chunk.js} +2 -2
- package/dist/scripts/{1285-e93a3f21ba-lite.chunk.js.map → 1285-746158eef6-lite.chunk.js.map} +1 -1
- package/dist/scripts/1628-3104bf944c-lite.chunk.js +2 -0
- package/dist/scripts/1628-3104bf944c-lite.chunk.js.map +1 -0
- package/dist/scripts/{170-f48bfc1128-lite.chunk.js → 170-bf0dd6b8ae-lite.chunk.js} +3 -3
- package/dist/scripts/170-bf0dd6b8ae-lite.chunk.js.map +1 -0
- package/dist/scripts/227-c82ab0d861-lite.chunk.js +2 -0
- package/dist/scripts/227-c82ab0d861-lite.chunk.js.map +1 -0
- package/dist/scripts/{2469-c504f7a87d-lite.chunk.js → 2469-34d8afaeb3-lite.chunk.js} +2 -2
- package/dist/scripts/{2469-c504f7a87d-lite.chunk.js.map → 2469-34d8afaeb3-lite.chunk.js.map} +1 -1
- package/dist/scripts/{2679-6c0646cc30-lite.chunk.js → 2679-269830f57c-lite.chunk.js} +2 -2
- package/dist/scripts/2679-269830f57c-lite.chunk.js.map +1 -0
- package/dist/scripts/{2734-a792d5393b-lite.chunk.js → 2734-9533718178-lite.chunk.js} +2 -2
- package/dist/scripts/2734-9533718178-lite.chunk.js.map +1 -0
- package/dist/scripts/{2851-e79b075ea9-lite.chunk.js → 2851-c0655d1a1d-lite.chunk.js} +2 -2
- package/dist/scripts/2851-c0655d1a1d-lite.chunk.js.map +1 -0
- package/dist/scripts/{3157-327cefda57-lite.chunk.js → 3157-730ff8b0ce-lite.chunk.js} +2 -2
- package/dist/scripts/3157-730ff8b0ce-lite.chunk.js.map +1 -0
- package/dist/scripts/{3158-7cff145fc4-lite.chunk.js → 3158-fbc814c471-lite.chunk.js} +2 -2
- package/dist/scripts/3158-fbc814c471-lite.chunk.js.map +1 -0
- package/dist/scripts/{5442-eecab1d715-lite.chunk.js → 5442-2326dc9418-lite.chunk.js} +2 -2
- package/dist/scripts/{5442-eecab1d715-lite.chunk.js.map → 5442-2326dc9418-lite.chunk.js.map} +1 -1
- package/dist/scripts/{5591-a4850980ea-lite.chunk.js → 5591-90c4fa0949-lite.chunk.js} +2 -2
- package/dist/scripts/5591-90c4fa0949-lite.chunk.js.map +1 -0
- package/dist/scripts/{5940-3ddc297b7a-lite.chunk.js → 5940-634de60f9b-lite.chunk.js} +2 -2
- package/dist/scripts/5940-634de60f9b-lite.chunk.js.map +1 -0
- package/dist/scripts/{6274-7d4c6ba241-lite.chunk.js → 6274-473fcd2e63-lite.chunk.js} +2 -2
- package/dist/scripts/{6274-7d4c6ba241-lite.chunk.js.map → 6274-473fcd2e63-lite.chunk.js.map} +1 -1
- package/dist/scripts/{7172-2d87ce76a3-lite.chunk.js → 7172-960e49b199-lite.chunk.js} +2 -2
- package/dist/scripts/7172-960e49b199-lite.chunk.js.map +1 -0
- package/dist/scripts/7180-79ada17b34-lite.chunk.js +2 -0
- package/dist/scripts/7180-79ada17b34-lite.chunk.js.map +1 -0
- package/dist/scripts/{7301-44362a7b42-lite.chunk.js → 7301-50cf0faef7-lite.chunk.js} +2 -2
- package/dist/scripts/{7301-44362a7b42-lite.chunk.js.map → 7301-50cf0faef7-lite.chunk.js.map} +1 -1
- package/dist/scripts/{7915-afd2304b08-lite.chunk.js → 7915-44db39c137-lite.chunk.js} +2 -2
- package/dist/scripts/7915-44db39c137-lite.chunk.js.map +1 -0
- package/dist/scripts/{8025-d7a573aca0-lite.chunk.js → 8025-24e45dc3b7-lite.chunk.js} +2 -2
- package/dist/scripts/8025-24e45dc3b7-lite.chunk.js.map +1 -0
- package/dist/scripts/{8258-6c86ad1fa4-lite.chunk.js → 8258-02d619de75-lite.chunk.js} +2 -2
- package/dist/scripts/{8258-6c86ad1fa4-lite.chunk.js.map → 8258-02d619de75-lite.chunk.js.map} +1 -1
- package/dist/scripts/8906-0821b0babe-lite.chunk.js +3 -0
- package/dist/scripts/8906-0821b0babe-lite.chunk.js.map +1 -0
- package/dist/scripts/{9212-d73ddd1ae6-lite.chunk.js → 9212-445b6499cb-lite.chunk.js} +2 -2
- package/dist/scripts/9212-445b6499cb-lite.chunk.js.map +1 -0
- package/dist/scripts/{9557-580fd7d743-lite.chunk.js → 9557-1ba0323e44-lite.chunk.js} +2 -2
- package/dist/scripts/{9557-580fd7d743-lite.chunk.js.map → 9557-1ba0323e44-lite.chunk.js.map} +1 -1
- package/dist/scripts/bundle-058c7cee3f.min.js +3 -0
- package/dist/scripts/bundle-058c7cee3f.min.js.map +1 -0
- package/package.json +1 -1
- package/dist/scripts/1197-52bedf8583-lite.chunk.js.map +0 -1
- package/dist/scripts/1628-58b55d05b5-lite.chunk.js +0 -2
- package/dist/scripts/1628-58b55d05b5-lite.chunk.js.map +0 -1
- package/dist/scripts/170-f48bfc1128-lite.chunk.js.map +0 -1
- package/dist/scripts/227-fb7b36b41a-lite.chunk.js +0 -2
- package/dist/scripts/227-fb7b36b41a-lite.chunk.js.map +0 -1
- package/dist/scripts/2679-6c0646cc30-lite.chunk.js.map +0 -1
- package/dist/scripts/2734-a792d5393b-lite.chunk.js.map +0 -1
- package/dist/scripts/2851-e79b075ea9-lite.chunk.js.map +0 -1
- package/dist/scripts/3157-327cefda57-lite.chunk.js.map +0 -1
- package/dist/scripts/3158-7cff145fc4-lite.chunk.js.map +0 -1
- package/dist/scripts/5591-a4850980ea-lite.chunk.js.map +0 -1
- package/dist/scripts/5940-3ddc297b7a-lite.chunk.js.map +0 -1
- package/dist/scripts/7172-2d87ce76a3-lite.chunk.js.map +0 -1
- package/dist/scripts/7180-b29d70e9d8-lite.chunk.js +0 -2
- package/dist/scripts/7180-b29d70e9d8-lite.chunk.js.map +0 -1
- package/dist/scripts/7915-afd2304b08-lite.chunk.js.map +0 -1
- package/dist/scripts/8025-d7a573aca0-lite.chunk.js.map +0 -1
- package/dist/scripts/8906-49532e8ec3-lite.chunk.js +0 -3
- package/dist/scripts/8906-49532e8ec3-lite.chunk.js.map +0 -1
- package/dist/scripts/9212-d73ddd1ae6-lite.chunk.js.map +0 -1
- package/dist/scripts/bundle-0fbdccea0d.min.js +0 -3
- package/dist/scripts/bundle-0fbdccea0d.min.js.map +0 -1
- /package/dist/scripts/{170-f48bfc1128-lite.chunk.js.LICENSE.txt → 170-bf0dd6b8ae-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8906-49532e8ec3-lite.chunk.js.LICENSE.txt → 8906-0821b0babe-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-0fbdccea0d.min.js.LICENSE.txt → bundle-058c7cee3f.min.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripts/2851-e79b075ea9-lite.chunk.js","mappings":"mJAUaA,EAAwB,CACnCC,kBAAiB,SAACC,EAAwBC,EAAcC,GAetD,MAAO,CACLC,IAfU,eAAqB,0CAA2C,CAC1EF,KAAAA,EACAC,GAAAA,EACAE,MAP8B,EAQ9BC,MAAO,sBAYPC,UATgB,eAAqB,+BAAD,OAAgCN,EAAc,oBAAoB,CACtGC,KAAAA,EACAC,GAAAA,EACAE,MAd8B,EAe9BC,MAAO,sBAMPE,IAAK,kBAQLC,iBAAkB,CAChBC,UAAW,kBAEbC,WAAY,SAACC,GACX,OAAOA,EAAeC,KAAI,SAAAC,GAExB,MAAO,CACLC,GAAID,EAAcE,iBAClBC,OAAQH,EAAcG,OAE1B,GACF,EAEJ,EAEAC,mBAAkB,SAACC,GAWjB,MAAO,CACLf,IAXU,eAAqB,0BAA2B,CAC1DW,GAAII,EACJb,MAA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AQjN,KAAK,GAAGgN,IAAaK,KAASD,IAAO,KAE7C,SAAKR,EAAW,CAClCC,IAAKA,KACFjO,EACHG,UAAW,IAAWA,EAAW+N,KAAsBG,IACvD,IAEJzL,EAAI8L,YAAc,MAClB,S","sources":["file:///app/packages/libs/shared/src/apps/content-updates/flight-requests/ContentUpdateRequests.ts","file:///app/packages/libs/shared/src/apps/discover/components/header/discover-header.scss","file:///app/packages/libs/shared/src/apps/discover/components/header/DiscoverHeader.tsx","file:///app/packages/libs/shared/src/components/pill-tab-selector/PillTabSelector.tsx","file:///app/packages/libs/shared/src/components/video-list/partial-loading/partial-video-list.scss","file:///app/packages/libs/shared/src/components/video-list/partial-loading/PartialVideoList.tsx","file:///app/packages/libs/shared/src/hooks/UseBatchFetch.ts","file:///app/packages/projects/lite/src/apps/content-updates/components/classification-banner/classification-banner.scss","file:///app/packages/projects/lite/src/apps/content-updates/components/classification-banner/ClassificationBanner.tsx","file:///app/packages/projects/lite/src/apps/content-updates/components/classification-update-breadcrumbs/ClassificationUpdateBreadcrumbs.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/content-updates/components/ContentUpdateClassification.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/content-updates/partial-loading/partial-content-updates.scss","file:///app/packages/projects/lite/src/apps/content-updates/views/content-updates/partial-loading/PartialContentUpdatesView.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/content-updates/ContentUpdatesView.tsx","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts","file:///app/packages/projects/lite/src/shared/hooks/useShowCalendar.ts","file:///app/packages/projects/lite/src/shared/hooks/useVideoMixin.ts","file:///app/packages/libs/shared/src/components/pill-tab-selector/pill-tab-selector.scss","file:///app/node_modules/react-bootstrap/esm/Row.js"],"sourcesContent":["import { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { Video } from 'libs/shared/interfaces';\n\n// Why 6 you ask? Well, we display 5, then we also display a link to \"see all updates for classification\"\n// if there are more than 5. By fetching 6, we can tell if there are more than 5 (api doesn't tell us).\nconst CONTENT_UPDATES_VIDEO_LIMIT = 6;\n\nexport const ContentUpdateRequests = {\n getContentUpdates(presentationId: string, from: string, to: string): Flight.PublicRequest {\n const url = UrlHelper.urlBuilder('/api/domain/v1/subjects/content-updates', {\n from,\n to,\n limit: CONTENT_UPDATES_VIDEO_LIMIT,\n query: '(videoCollection)'\n });\n\n const publicUrl = UrlHelper.urlBuilder(`/api/subjects/presentations/${presentationId}/content-updates`, {\n from,\n to,\n limit: CONTENT_UPDATES_VIDEO_LIMIT,\n query: '(videoCollection)'\n });\n\n return {\n url,\n publicUrl,\n key: 'content:updates',\n /**\n * The namespace here is required so that flight's normaliser doesn't override\n * fully fetched classification objects matching the IDs here.\n * \n * Without this, navigating from content updates to one of the topics in the content updates\n * list, then back to content updates will cause the page to break.\n */\n normalizeOptions: {\n namespace: 'contentupdates'\n },\n formatData: (contentUpdates: HashObject[]) => {\n return contentUpdates.map(contentUpdate => {\n // Change id field here to make normalization in Flight easier\n return {\n id: contentUpdate.classificationId,\n videos: contentUpdate.videos\n };\n });\n }\n };\n },\n\n getClassifications(ids: string[]): Flight.PublicRequest {\n const url = UrlHelper.urlBuilder('/api/domain/v1/subjects', {\n id: ids,\n query: 'banner'\n });\n\n const publicUrl = UrlHelper.urlBuilder('/api/subjects/classifications', {\n id: ids,\n query: 'banner'\n });\n\n return {\n url,\n publicUrl,\n key: `classifications:${ids.join(',')}`\n };\n },\n\n getClassification(id: string): Flight.PublicRequest {\n return {\n url: `/api/domain/v1/subjects/${id}?query=banner`,\n publicUrl: `/api/subjects/classifications/${id}?query=banner`,\n key: `classification:${id}`\n };\n },\n\n getClassificationUpdates(id: string, from: string, to: string): Flight.PublicRequest {\n const url = UrlHelper.urlBuilder(`/api/domain/v1/subjects/${id}/content-updates`, {\n from,\n to,\n query: '(videoCollection)'\n });\n\n const publicUrl = UrlHelper.urlBuilder(`/api/subjects/classifications/${id}/content-updates`, {\n from,\n to,\n query: '(videoCollection)'\n });\n\n return {\n url,\n publicUrl,\n key: `classification:update:${id}:${from}:${to}`\n };\n },\n\n getContentUpdateVideos(from: string, to: string): Flight.PublicRequest {\n return {\n url: UrlHelper.urlBuilder(`/api/domain/v1/subjects/content-updates/videos`, {\n from,\n to,\n query: '(videoCollection)'\n }),\n publicUrl: UrlHelper.urlBuilder(`/api/subjects/content-updates/videos`, {\n from,\n to,\n query: '(videoCollection)'\n }),\n key: `content:update:videos:${from}:${to}`\n };\n },\n\n /**\n * TODO: Delete thise and use the shared video requests\n */\n videos(ids: string[], success?: (data: Video[]) => void): Flight.Request {\n const url = `/api/domain/v1/videos?ids=${ids.join(',')}&with=(videoCollection)`;\n\n return {\n url,\n key: `videos:by:id:${ids.join(',')}`,\n success\n };\n }\n};","// extracted by mini-css-extract-plugin\nexport default {\"pillTab\":\"bMJM0\"};","import React from 'react';\n\nimport { AppLinkHelper } from 'libs/common/backbone/core';\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { PillTabSelector } from 'libs/shared/components/pill-tab-selector/PillTabSelector';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { DashboardUserType } from 'libs/shared/interfaces';\n\nimport styles from './discover-header.scss';\n\nconst namespace = 'discover.header';\n\nexport interface DiscoverHeaderAppLinks {\n forYou: Core.AppLink;\n whatsNew: Core.AppLink;\n calendar: Core.AppLink;\n}\n\ninterface DiscoverHeaderProps {\n type: DashboardUserType;\n hasStudentExperience?: boolean;\n appLinks?: DiscoverHeaderAppLinks;\n showCalendar: boolean;\n active: keyof DiscoverHeaderAppLinks;\n}\n\nexport function DiscoverHeader(props: DiscoverHeaderProps): JSX.Element {\n if (!props.type)\n return <></>;\n\n if (props.type === DashboardUserType.Learner || props.hasStudentExperience) {\n return (\n <div className='py-3'>\n <h1 className='h2 mb-0'>\n <Text namespace={namespace} phrase='heading' />\n </h1>\n </div>\n );\n }\n\n const tabs = [{\n name: LanguageService.getPhrase(namespace, 'forYou'),\n appLink: props.appLinks?.forYou,\n active: props.active === 'forYou',\n analyticsData: {\n name: LanguageService.getPhrase(namespace, 'forYou'),\n url: AppLinkHelper.getHref(props.appLinks?.forYou)\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n }\n }, {\n name: LanguageService.getPhrase(namespace, 'whatsNew'),\n appLink: props.appLinks?.whatsNew,\n active: props.active === 'whatsNew',\n analyticsData: {\n name: LanguageService.getPhrase(namespace, 'whatsNew'),\n url: AppLinkHelper.getHref(props.appLinks?.whatsNew)\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n }\n }];\n\n if (props.showCalendar) {\n tabs.push({\n name: LanguageService.getPhrase(namespace, 'calendar'),\n appLink: props.appLinks?.calendar,\n active: props.active === 'calendar',\n analyticsData: {\n name: LanguageService.getPhrase(namespace, 'calendar'),\n url: AppLinkHelper.getHref(props.appLinks?.calendar)\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n }\n });\n }\n\n return (\n <div className='py-3 text-center'>\n <PillTabSelector\n tabs={tabs}\n className={styles.pillTab}\n />\n </div>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { AnalyticsOptions } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\n\nimport styles from './pill-tab-selector.scss';\n\nexport interface PillTab {\n name: string;\n active: boolean;\n\n appLink?: Core.AppLink;\n onSelect?: () => void;\n\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n\n count?: number;\n}\n\ninterface PillTabSelectorProps {\n tabs: PillTab[];\n className?: string;\n}\n\nexport function PillTabSelector(props: PillTabSelectorProps): JSX.Element {\n function onSelectTab(tab: PillTab): void {\n if (tab.active || !tab.onSelect)\n return;\n\n tab.onSelect();\n\n if (tab.analyticsData && tab.analyticsOptions)\n AnalyticsHelper.logUserAction(tab.analyticsData, tab.analyticsOptions);\n }\n\n return (\n <nav className={props.className ?? ''}>\n <ul className={`list-unstyled d-inline-block m-0 ${styles.pillTabSelector}`}>\n {props.tabs.map(tab => {\n return (\n <li className={`p-0 ${tab.active ? 'btn btn-dark' : 'btn btn-outline-dark'}`} key={tab.name}>\n {tab.appLink ? (\n <AppLink\n appLink={tab.appLink}\n analyticsData={tab.analyticsData}\n analyticsOptions={tab.analyticsOptions}\n className={`cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ${styles.pillItem}`}\n >\n {tab.name}\n\n {typeof (tab.count) === 'number' && (\n <div className='ps-2'>\n <Badge type={BadgeType.Count} data={tab.count} />\n </div>\n )}\n </AppLink>\n ) : (\n <DivButton className={`${styles.pillItem} d-flex justify-content-center p-2`} onClick={() => onSelectTab(tab)}>\n {tab.name}\n\n {typeof (tab.count) === 'number' && (\n <div className='ps-2'>\n <Badge type={BadgeType.Count} data={tab.count} />\n </div>\n )}\n </DivButton>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n );\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"partialOptions\":\"Gufgq\",\"partialName\":\"SicQQ\",\"partialDescription\":\"dPGMq\",\"partialThumbnail\":\"vZrnb\",\"partialDragHandle\":\"iq73R\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nimport styles from './partial-video-list.scss';\n\ninterface PartialVideoListProps {\n withReordering?: boolean;\n numVideos?: number;\n allowBulkActions?: boolean;\n}\n\nPartialVideoList.defaultProps = {\n numVideos: 15\n};\n\nexport function PartialVideoList(props: PartialVideoListProps): JSX.Element {\n return (\n <div className='mx-2'>\n {Array(props.numVideos).fill(null).map((_, i) => (\n <div className='d-flex' key={i}>\n {props.allowBulkActions && <div className='form-check pe-3 pe-sm-2 mx-0 mx-md-2' />}\n <PartialVideoItem {...props} />\n </div>\n ))}\n </div>\n );\n}\n\nexport function PartialVideoItem(props: PartialVideoListProps): JSX.Element {\n const breakpoints = useBreakpoints();\n\n const size = VideoListHelper.getSize(breakpoints, 'md');\n const isSmall = size === 'sm';\n\n const withDragHandle = props.withReordering && !breakpoints.xs;\n\n return (\n <Row className={`${isSmall ? '' : 'py-2'} flex-grow-1`}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-1` : 'mb-1 pe-3 pe-md-2'}`}>\n <Row>\n {!!withDragHandle && (\n <div className='d-flex align-items-center justify-content-center col-2'>\n <div className={`partial-loading-background ${styles.partialDragHandle}`} />\n </div>\n )}\n <Col xs={VideoListHelper.getThumbnailColSize(withDragHandle)}>\n <div className={`partial-loading-background ${isSmall ? 'rounded' : 'rounded-3'} ${styles.partialThumbnail}`} />\n </Col>\n </Row>\n </Col>\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n <div className={`partial-loading-background mb-1 ${styles.partialName}`} />\n <div className={`partial-loading-background ${styles.partialDescription}`} />\n </Col>\n </Row>\n );\n}\n\n","import React from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { Flight } from 'libs/common/flight';\nimport { ApplicationState, HashObject } from 'libs/common/react/interfaces';\n\nimport { BaseObject } from 'libs/shared/interfaces';\n\nexport interface UseBatchFetchResult<T extends BaseObject> {\n items: { [key: string]: T} | null;\n isFetching: boolean;\n}\n\n/**\n * Used to fetch multiple items by id with Flight. Will fetch 25 items at a time firing off multiple\n * requests if there are more than 25 items.\n * This will return items as null until we have all our items. Items will be returned as an object with\n * their ids as they key for easy mapping\n * \n * @param itemIds \n * @param getRequest \n */\nexport function useBatchFetch<T extends BaseObject>(\n itemIds: string[],\n getRequest: (ids: string[]) => Flight.Request\n): UseBatchFetchResult<T> {\n const [ idBatches, setIdBatches ] = React.useState<string[][]>([]);\n\n React.useEffect(() => {\n if (!itemIds?.length)\n return;\n\n const newBatches = [...idBatches];\n newBatches.push([]);\n\n itemIds.forEach(id => {\n if (newBatches.find(batch => batch.find(_id => _id === id)))\n return;\n\n newBatches[newBatches.length - 1].push(id);\n });\n\n setIdBatches(newBatches.filter(batch => batch.length));\n }, [itemIds ? itemIds.join(',') : null]);\n\n const dispatch = useDispatch();\n\n const state = useSelector((state: ApplicationState) => state);\n\n React.useEffect(() => {\n idBatches.forEach(idBatch => {\n const request = getRequest(idBatch);\n const response = Flight.getResponse<T[]>(state, request.key);\n\n if (response.shouldFetch)\n Flight.fetch(dispatch, request);\n });\n }, [idBatches?.length]);\n\n if (!idBatches?.length)\n return { items: null, isFetching: false };\n \n const items: { [key: string]: T} = {};\n\n /* Used locally to only return our items if we've fetched all of them */\n const responses: HashObject<Flight.Response<T[]>> = {};\n \n idBatches.forEach((idBatch, i) => {\n const request = getRequest(idBatch);\n const response = Flight.getResponse<T[]>(state, request.key);\n responses[i] = response;\n\n if (response.data)\n response.data.forEach(v => items[v.id] = v);\n });\n\n return {\n items: Object.keys(responses).some(k => !!responses[k].data) ? items : null,\n isFetching: !!Object.keys(responses).some(k => responses[k].isFetching)\n };\n}","// extracted by mini-css-extract-plugin\nexport default {\"banner\":\"B7jhq\"};","import * as React from 'react';\nimport { Spinner } from 'react-bootstrap';\n\nimport { StorageType } from 'libs/common/backbone/utils/LocalStorageHelper';\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { IconButton } from 'libs/shared/components/icon-button/IconButton';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { SharedViewModelKeys } from 'libs/shared/constants/SharedViewModelKeys';\nimport { Classification, PresentationAudience } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './classification-banner.scss';\n\nconst namespace = 'contentUpdates.classificationBanner';\n\ninterface ClassificationBannerProps {\n classification: Classification;\n backgroundUrl: string;\n getClassificationAppLink: (classification: Classification, activeAudiences: PresentationAudience[]) => Core.AppLink;\n followed: boolean;\n follow: (classificationId: string, classificationName: string, follow: boolean) => void;\n showFollowSpinner: boolean;\n canFollow: boolean;\n}\n\nexport function ClassificationBanner(props: ClassificationBannerProps): JSX.Element {\n const { classification, backgroundUrl, followed, follow, showFollowSpinner } = props;\n\n const [activeAudiences] = useViewModel<PresentationAudience[]>(\n SharedViewModelKeys.AUDIENCE_FILTER,\n undefined,\n { storage: StorageType.SessionStorage }\n );\n\n return (\n <div\n className={`banner mb-2 d-flex justify-content-between align-items-center rounded ${styles.banner}`}\n style={{ backgroundImage: `url('${backgroundUrl}')` }}\n >\n <AppLink className='text-white text-shadow' appLink={props.getClassificationAppLink(classification, activeAudiences)}>\n <h2 className='h3 mb-0'>{classification.name}</h2>\n </AppLink>\n\n {props.canFollow && (\n <IconButton\n className={`btn follow-btn ${followed ? 'btn-outline-dark' : 'btn-dark'}`}\n svgName={followed ? cvSvgLibrary.Check : cvSvgLibrary.Bell}\n onClick={() => follow(classification.id, classification.name, !followed)}\n >\n {showFollowSpinner\n ? <Spinner as='span' animation='border' role='status' size='sm' />\n : <Text namespace={namespace} phrase={followed ? 'unfollow' : 'follow'} />\n }\n </IconButton>\n )}\n </div>\n );\n}\n","import * as React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { Classification } from 'libs/shared/interfaces';\n\nconst namespace = 'playlists.liteClassificationUpdateBreadcrumbs';\n\ninterface ClassificationUpdateBreadcrumbsProps {\n classification: Classification;\n contentUpdatesAppLink: Core.AppLink;\n dashboardAppLink: Core.AppLink;\n}\n\nexport function ClassificationUpdateBreadcrumbs(\n props: ClassificationUpdateBreadcrumbsProps\n): JSX.Element {\n const { classification } = props;\n\n return (\n <>\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb p-0 mb-0'>\n <li className='breadcrumb-item'>\n <AppLink appLink={props.dashboardAppLink}><Text namespace={namespace} phrase='dashboard' /></AppLink>\n </li>\n <li className='breadcrumb-item'>\n <AppLink appLink={props.contentUpdatesAppLink}><Text namespace={namespace} phrase='whatsNew' /></AppLink>\n </li>\n <li className='breadcrumb-item active' aria-current='page'>{classification.name}</li>\n </ol>\n </nav>\n </>\n );\n}","import * as React from 'react';\n\nimport { ContentUpdateAppLinks, VideoWithClassification } from 'libs/shared/apps/content-updates/interfaces';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { ImageSize, ImageType, ResizeType } from 'libs/shared/enums/Images';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CanFavouriteFunc, Classification, FavouriteFunc, PresentationAudience, YearGroup } from 'libs/shared/interfaces';\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\n\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\n\nimport { ClassificationBanner } from 'apps/content-updates/components';\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\n\nconst namespace = 'contentUpdates.contentUpdatesView';\n\ninterface ClassificationProps {\n classification: Classification;\n videos: VideoWithClassification[];\n yearGroups: YearGroup[];\n imageCdnUrl: string;\n showMore: boolean;\n appLinks: ContentUpdateAppLinks;\n followed: boolean;\n follow: (classificationId: string, classificationName: string, follow: boolean) => void;\n showFollowSpinner: boolean;\n canFollow: boolean;\n setFavourite: FavouriteFunc;\n canFavourite: CanFavouriteFunc;\n audiences: PresentationAudience[];\n}\n\nexport function ContentUpdateClassification(props: ClassificationProps): JSX.Element {\n const { classification, videos, imageCdnUrl, showMore, followed } = props;\n\n const { hasPermissions } = usePermissions();\n\n if (!classification)\n return <></>;\n \n const url = ImageHelper.createBannerUrl(classification.banner, {\n fallbackBaseUrl: imageCdnUrl,\n fallbackCategoryName: classification.name,\n type: ImageType.Banners\n }, { size: ImageSize.Medium, resizeType: ResizeType.Cover });\n\n return (\n <div className='mb-3'>\n <ClassificationBanner\n classification={classification}\n backgroundUrl={url}\n getClassificationAppLink={props.appLinks.getClassificationAppLink}\n followed={followed}\n follow={props.follow}\n canFollow={props.canFollow}\n showFollowSpinner={props.showFollowSpinner}\n />\n <VideoList\n videos={videos}\n yearGroups={props.yearGroups}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getSubTextAppLink={video => SeriesAppLinkHelper.getSeriesAppLink(video.series)}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n presentationAudiences={props.audiences}\n hasPermissions={hasPermissions}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n />\n {showMore &&\n <div className={'show-more'}>\n <AppLink className='info-link' appLink={props.appLinks.getClassificationUpdateAppLink(classification)}>\n <Text namespace={namespace} phrase='showMore' options={{\n classificationName: classification.name\n }} />\n </AppLink>\n </div>\n }\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"partialBanner\":\"bxaA6\"};","import React from 'react';\n\nimport { PartialVideoList } from 'libs/shared/components/video-list/partial-loading/PartialVideoList';\n\nimport styles from './partial-content-updates.scss';\n\nexport function PartialContentUpdatesView(): JSX.Element {\n return (\n <>\n {Array(4).fill(null).map((s, i) => (\n <div key={i} className='mb-3'>\n <div className={`partial-loading-background mb-2 ${styles.partialBanner}`} />\n <PartialVideoList />;\n </div>\n ))}\n </>\n );\n}","import * as React from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, ToggleDescriptor, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ContentUpdateRequests } from 'libs/shared/apps/content-updates/flight-requests/ContentUpdateRequests';\nimport { ClassificationVideosGrouping, ContentUpdate, ContentUpdateAppLinks } from 'libs/shared/apps/content-updates/interfaces';\nimport { DiscoverHeader } from 'libs/shared/apps/discover/components/header/DiscoverHeader';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { PreferenceRequests } from 'libs/shared/flight-requests/PreferenceRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useBatchFetch } from 'libs/shared/hooks/UseBatchFetch';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Classification, Config, CurrentUser, DashboardUserType, Video, YearGroup } from 'libs/shared/interfaces';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { usePresentation } from 'shared/hooks/usePresentation';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useShowCalendar } from 'shared/hooks/useShowCalendar';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\nimport { SeoHelper } from 'shared/utils/SeoHelper';\n\nimport { ContentUpdateClassification } from './components/ContentUpdateClassification';\nimport { PartialContentUpdatesView } from './partial-loading/PartialContentUpdatesView';\n\nconst INITIAL_VIDEO_COUNT = 5;\nconst namespace = 'contentUpdates.contentUpdatesView';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nfunction map(\n contentUpdates: ClassificationVideosGrouping[],\n classifications: {[key: string]: Classification}\n): ContentUpdate[] {\n if (!contentUpdates || !classifications)\n return null;\n\n return contentUpdates.map((c): ContentUpdate => {\n return {\n showMore: c.videos.length > INITIAL_VIDEO_COUNT,\n classification: classifications[c.id],\n videos: c.videos.slice(0, INITIAL_VIDEO_COUNT).map((m: any) => {\n m.classification = classifications[m.id];\n return m;\n }).filter(v => v)\n };\n }).filter(v => v.classification);\n}\n\ninterface FollowSpinnersMap {\n [classificationId: string]: boolean;\n}\n\ninterface ContentUpdatesViewProps {\n appLinks: ContentUpdateAppLinks;\n presentationSlug?: string;\n}\n\nexport function ContentUpdatesView(props: ContentUpdatesViewProps): JSX.Element {\n const [ followSpinners, setFollowSpinners ] = React.useState<FollowSpinnersMap>({});\n\n const dispatch = useDispatch();\n const alerts = useAlerts();\n\n\n const { hasPermissions } = usePermissions();\n const canFollowSubjects = hasPermissions(PermissionName.FollowSubjects);\n\n const date = new Date();\n const from = DateHelper.format(DateHelper.endOf(DateHelper.subtract(date, 1, 'year'), 'day'), 'YYYY-MM-DD');\n const to = DateHelper.format(DateHelper.endOf(date, 'day'), 'YYYY-MM-DD');\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n\n const { activePresentation } = usePresentation({ redirectOnError: true });\n\n useSetPageMetadata(PageMetadataHelper.getDefaultMetadata({\n title: activePresentation?.name,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink(),\n allowIndexing: SeoHelper.allowIndexing(),\n hrefLang: SeoHelper.getStaticRouteHrefLang(\n activePresentation?.learningLevel,\n () => ({ application: AppChannels.CONTENT_UPDATES, action: Actions.ContentUpdates.CONTENT_UPDATES })\n )\n }));\n\n const contentUpdatesRequest = ContentUpdateRequests.getContentUpdates(activePresentation?.id, from, to);\n const contentUpdates = Flight.useBasicFetch<ClassificationVideosGrouping[]>(\n activePresentation && contentUpdatesRequest\n );\n const subjectPreferences = Flight.useBasicFetch<Classification[]>(canFollowSubjects &&\n PreferenceRequests.mySubjectPreferences());\n\n const audiences = usePresentationAudiences();\n\n /* Map content update response into list of video ids and classification ids*/\n const classificationIds: string[] = [];\n let videos: Video[] = [];\n contentUpdates.data && contentUpdates.data.forEach(c => {\n classificationIds.push(c.id);\n videos = videos.concat(c.videos);\n });\n\n /* Batch fetch the videos and classifications by id */\n const { items: classifications } = useBatchFetch<Classification>(\n classificationIds,\n (ids: string[]) => ContentUpdateRequests.getClassifications(ids)\n );\n\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n \n useVideoMixin(videos, {\n flightNamespace: contentUpdatesRequest.normalizeOptions?.namespace\n });\n\n const { setFavourite, canFavourite } = useLiteFavourites(\n LocationContext.VideoThumbnail,\n contentUpdatesRequest.normalizeOptions?.namespace\n );\n\n /** Callbacks */\n function onFollow(classificationId: string, classificationName: string, follow: boolean): void {\n setFollowSpinners(currentState => ({\n ...currentState,\n [classificationId]: true\n }));\n\n const onSuccess = () => {\n setFollowSpinners(currentState => ({\n ...currentState,\n [classificationId]: false\n }));\n\n AnalyticsHelper.logUserAction({\n id: classificationId,\n name: classificationName\n }, {\n location: LocationContext.ContentUpdatesClassificationBanner,\n workflowPhase: WorkflowPhase.Complete,\n descriptor: follow ? ToggleDescriptor.On : ToggleDescriptor.Off,\n actionType: UserAction.Follow,\n entity: EntityType.Classification\n });\n\n alerts.success(getPhrase(\n follow ? 'followed' : 'unfollowed',\n { classification: classifications[classificationId]?.name, escapeText: true }\n ));\n };\n\n const onError = () => {\n setFollowSpinners(currentState => ({\n ...currentState,\n [classificationId]: false\n }));\n\n alerts.error(getPhrase('error'));\n };\n\n const request = follow ?\n PreferenceRequests.followSubjects([classificationId], onSuccess, onError) :\n PreferenceRequests.unfollowSubjects([classificationId], onSuccess, onError);\n\n Flight.fetch(dispatch, request);\n }\n\n const { showCalendar, isLoading } = useShowCalendar();\n\n const dataLoaded = !!(\n contentUpdates.hasCompleted &&\n config.hasCompleted &&\n audiences.hasCompleted &&\n (!canFollowSubjects || subjectPreferences.hasCompleted) &&\n classifications &&\n !isLoading\n );\n\n /* Build out array of content updates from our lists of videos and classifications */\n const mappedUpdates = map(contentUpdates.data, classifications);\n const preferredSubjectIds = subjectPreferences.data?.map(subject => subject.id) ?? [];\n\n const managePreferences = hasPermissions(PermissionName.ManageSubjectPreferences);\n const manageVideoAccess = hasPermissions(PermissionName.ManageVideoAccess);\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <div className='bg-white px-3'>\n {!isLoading && <DiscoverHeader\n type={DashboardUserType.Staff} // Students never see this page\n appLinks={{\n forYou: props.appLinks.dashboardAppLink,\n whatsNew: props.appLinks.whatsNewAppLink,\n calendar: props.appLinks.calendarAppLink\n }}\n showCalendar={showCalendar}\n active='whatsNew'\n />}\n <h1><Text namespace={namespace} phrase='heading' /></h1>\n {(managePreferences || manageVideoAccess) && (\n <p>\n {managePreferences &&\n <>\n <Text namespace={namespace} phrase='onlyRelevant' /> \n <AppLink\n className='info-link'\n appLink={{\n application: AppChannels.SETTINGS,\n action: Actions.Settings.TOPIC_PREFERENCES\n }}\n >\n <Text namespace={namespace} phrase='updatePreferences' />\n </AppLink>\n </>\n }\n {manageVideoAccess &&\n <span className='d-block'>\n <AppLink\n className='info-link'\n appLink={{\n application: AppChannels.SETTINGS,\n action: Actions.Settings.CONTENT_REVIEW\n }}\n >\n <Text namespace={namespace} phrase='contentReview' />\n </AppLink>\n </span>\n }\n </p>\n )}\n\n {dataLoaded ? (\n <>\n {mappedUpdates.map((c: ContentUpdate, key: number) => (\n <ContentUpdateClassification\n key={key}\n classification={c.classification}\n videos={c.videos}\n yearGroups={yearGroups.data}\n imageCdnUrl={config.data.imageCdnUrl}\n showMore={c.showMore}\n appLinks={props.appLinks}\n followed={preferredSubjectIds.includes(c.classification?.id)}\n follow={onFollow}\n showFollowSpinner={followSpinners[c.classification?.id]}\n canFollow={canFollowSubjects}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n audiences={audiences.data}\n />\n ))}\n </>\n ) : (\n <PartialContentUpdatesView />\n )}\n </div>\n </VideoActionsContext.Provider>\n );\n}\n","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation } = usePresentation({ redirectOnError: true });\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!activePresentation &&\n AudienceRequests.presentationAudiences(activePresentation.id)\n );\n\n return audiences;\n};","import React from 'react';\n\nimport { EnvironmentVariables } from 'libs/common/backbone/services/EnvironmentVariables';\nimport { Flight } from 'libs/common/react/index';\n\nimport { ContentRegion } from 'libs/shared/enums/ContentRegion';\nimport { PresentationLearningLevel } from 'libs/shared/enums/PresentationLearningLevel';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { CurrentUser } from 'libs/shared/interfaces';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nconst ALLOWED_LEARNING_LEVELS_BY_REGION: Record<ContentRegion, PresentationLearningLevel[]> = {\n [ContentRegion.AU]: [\n // AU Primary Calendar\n PresentationLearningLevel.Level_1\n ],\n [ContentRegion.US]: [\n // US Elementary Calendar\n PresentationLearningLevel.Level_1\n ],\n [ContentRegion.UK]: [\n // UK Primary Calendar\n PresentationLearningLevel.Level_1\n ],\n [ContentRegion.SCOT]: [\n // Scotland Primary Calendar\n PresentationLearningLevel.Level_1\n ],\n [ContentRegion.NZ]: [],\n [ContentRegion.GLOBAL]: []\n};\n\nexport function useShowCalendar() {\n const { hasSpecialEventCalendar, isLoadingSettings } = useSettings(null);\n\n const {\n activePresentation\n } = usePresentation({ redirectOnError: true });\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const allowedLearningLevels = ALLOWED_LEARNING_LEVELS_BY_REGION[currentUser.data?.contentRegion];\n const learningLevel = TopicsHelper.getMappedPresentationLevel(activePresentation?.learningLevel);\n const learningLevelCantAccess = !allowedLearningLevels?.find(l => {\n return l.toString() === (learningLevel as PresentationLearningLevel)?.toString();\n });\n\n const noSetting = !isLoadingSettings && !hasSpecialEventCalendar;\n\n const [ showCalendar, setShowCalendar ] = React.useState<boolean>(!noSetting && !learningLevelCantAccess);\n\n const [ isLoading, setIsLoading ] = React.useState(isLoadingSettings || !activePresentation?.id);\n\n React.useEffect(() => {\n if (noSetting || learningLevelCantAccess) {\n setShowCalendar(false);\n } else if (!isLoading) {\n setShowCalendar(true);\n }\n setIsLoading(isLoadingSettings || !activePresentation?.id);\n }, [ hasSpecialEventCalendar, activePresentation?.id, isLoading ]);\n\n if (EnvironmentVariables.isDevelopment)\n return { showCalendar: true, isLoading: false };\n\n return { showCalendar, isLoading };\n}","import React from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { CurrentUser, Video, VideoCollection } from 'libs/shared/interfaces';\n\ninterface VideoMixinOptions {\n /**\n * If the videos that are having new data mixed into are sitting on an explicit Flight namespace,\n * providing that namespace here is required\n */\n flightNamespace?: string;\n}\n\nexport function useVideoMixin(videos: VideoCollection | Video[], options: VideoMixinOptions = {}): void {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const hydratedVideos = React.useRef<Set<string>>(new Set<string>());\n\n const videoIds = videos && (Array.isArray(videos)\n ? videos.filter(Boolean).map(v => v.id)\n : videos.data.filter(Boolean).map(v => v.id));\n\n const [ request, setRequest ] = React.useState<Flight.Request[]>([]);\n\n React.useEffect(() => {\n if (!videoIds?.length || !currentUser.data?.isAuthenticated)\n return;\n\n const unhydratedVideos: string[] = [];\n\n videoIds.forEach(id => {\n if (!hydratedVideos.current.has(id)) {\n unhydratedVideos.push(id);\n hydratedVideos.current.add(id);\n }\n });\n \n if (!unhydratedVideos.length)\n return;\n\n setRequest(r => [\n ...r,\n ClassificationRequests.hasCurriculumLinks(unhydratedVideos, null, options.flightNamespace),\n VideoRequests.videoMixinAssocs(unhydratedVideos, options.flightNamespace)\n ]);\n }, [ videoIds?.length, currentUser.data?.isAuthenticated ]);\n\n Flight.useBasicFetchAll(request);\n}","// extracted by mini-css-extract-plugin\nexport default {\"pillTabSelector\":\"Hdi6o\",\"pillItem\":\"hUJx1\"};","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Row = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');\n const breakpoints = useBootstrapBreakpoints();\n const minBreakpoint = useBootstrapMinBreakpoint();\n const sizePrefix = `${decoratedBsPrefix}-cols`;\n const classes = [];\n breakpoints.forEach(brkPoint => {\n const propValue = props[brkPoint];\n delete props[brkPoint];\n let cols;\n if (propValue != null && typeof propValue === 'object') {\n ({\n cols\n } = propValue);\n } else {\n cols = propValue;\n }\n const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';\n if (cols != null) classes.push(`${sizePrefix}${infix}-${cols}`);\n });\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n ...props,\n className: classNames(className, decoratedBsPrefix, ...classes)\n });\n});\nRow.displayName = 'Row';\nexport default Row;"],"names":["ContentUpdateRequests","getContentUpdates","presentationId","from","to","url","limit","query","publicUrl","key","normalizeOptions","namespace","formatData","contentUpdates","map","contentUpdate","id","classificationId","videos","getClassifications","ids","join","getClassification","getClassificationUpdates","getContentUpdateVideos","success","DiscoverHeader","props","type","hasStudentExperience","className","Text","phrase","tabs","name","LanguageService","appLink","appLinks","forYou","active","analyticsData","analyticsOptions","actionType","entity","location","whatsNew","showCalendar","push","calendar","PillTabSelector","tab","count","data","onClick","onSelect","onSelectTab","PartialVideoList","Array","numVideos","fill","_","i","allowBulkActions","PartialVideoItem","breakpoints","useBreakpoints","isSmall","VideoListHelper","withDragHandle","withReordering","xs","Row","Col","defaultProps","useBatchFetch","itemIds","getRequest","idBatches","setIdBatches","length","newBatches","forEach","find","batch","_id","filter","dispatch","state","idBatch","request","shouldFetch","items","isFetching","responses","response","v","Object","keys","some","k","ClassificationBanner","classification","backgroundUrl","followed","follow","showFollowSpinner","activeAudiences","SharedViewModelKeys","undefined","storage","style","backgroundImage","getClassificationAppLink","canFollow","IconButton","svgName","Spinner","as","animation","role","size","ClassificationUpdateBreadcrumbs","dashboardAppLink","contentUpdatesAppLink","ContentUpdateClassification","imageCdnUrl","showMore","hasPermissions","usePermissions","ImageHelper","banner","fallbackBaseUrl","fallbackCategoryName","resizeType","VideoList","yearGroups","getVideoAppLink","getSubTextAppLink","video","SeriesAppLinkHelper","series","setFavourite","canFavourite","presentationAudiences","audiences","getPreviewQuestionsAppLink","interactive","InteractiveHelper","AppLink","getClassificationUpdateAppLink","options","classificationName","PartialContentUpdatesView","s","INITIAL_VIDEO_COUNT","getPhrase","ContentUpdatesView","followSpinners","setFollowSpinners","alerts","canFollowSubjects","PermissionName","date","Date","DateHelper","config","ConfigRequests","currentUser","UserRequests","isAuthenticated","CustomerRequests","customerId","activePresentation","usePresentation","redirectOnError","useSetPageMetadata","PageMetadataHelper","title","phraseContext","phraseHandler","titlePhrase","descriptionPhrase","canonicalLink","SeoHelper","allowIndexing","hrefLang","learningLevel","application","action","contentUpdatesRequest","subjectPreferences","PreferenceRequests","usePresentationAudiences","classificationIds","c","concat","classifications","videoActions","useVideoActions","useVideoMixin","flightNamespace","useLiteFavourites","u","onFollow","currentState","onSuccess","AnalyticsHelper","workflowPhase","descriptor","escapeText","onError","error","useShowCalendar","isLoading","dataLoaded","hasCompleted","mappedUpdates","slice","m","preferredSubjectIds","subject","managePreferences","manageVideoAccess","VideoActionsContext","value","whatsNewAppLink","calendarAppLink","includes","ALLOWED_LEARNING_LEVELS_BY_REGION","hasSpecialEventCalendar","isLoadingSettings","allowedLearningLevels","contentRegion","learningLevelCantAccess","l","toString","noSetting","setShowCalendar","setIsLoading","hydratedVideos","Set","videoIds","isArray","Boolean","setRequest","unhydratedVideos","current","has","add","r","bsPrefix","Component","ref","decoratedBsPrefix","minBreakpoint","sizePrefix","classes","brkPoint","propValue","cols","infix","displayName"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripts/3157-327cefda57-lite.chunk.js","mappings":"+LACA,SAAgB,UAAY,QAAQ,QAAU,S,0GCmBxC,SAAUA,EAAqBC,GACnC,I,IAAmC,G,GAAX,U,EAAW,E,k5BAA3BC,EAAG,KAAEC,EAAM,KAYnB,OAVA,aAAgB,W,MACTF,EAAMG,eAGND,IAAUF,EAAMI,aAGN,QAAf,EAAAJ,EAAMK,iBAAS,gBAAGL,EA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,EAAO,KAAEkK,EAAU,KAE3B,aAAgB,W,MACd,IAAKb,aAAQ,EAARA,EAAUlK,UAA2B,QAAhB,EAAAuJ,EAAYrI,YAAI,eAAEyI,iBAA5C,CAGA,IAAMqB,EAA6B,GAEnCd,EAAS/J,SAAQ,SAAAC,GACVwK,EAAeK,QAAQC,IAAI9K,KAC9B4K,EAAiB9K,KAAKE,GACtBwK,EAAeK,QAAQE,IAAI/K,GAE/B,IAEK4K,EAAiBhL,QAGtB+K,GAAW,SAAAK,GAAC,gB,yWAAA,CACPA,GAAC,CACJ,uBAA0CJ,EAAkB,KAAMlJ,EAAQuJ,iBAC1E,qBAA+BL,EAAkBlJ,EAAQuJ,kBAAgB,GAjBnE,CAmBV,GAAG,CAAEnB,aAAQ,EAARA,EAAUlK,OAAwB,QAAhB,EAAAuJ,EAAYrI,YAAI,eAAEyI,kBAEzC,qBAAwB9I,EAC1B,C,4FC9CA,MAAMnC,EAAmB,cAAiB,EACxC4M,WACAxO,YAEAE,GAAIuO,EAAY,SACbhP,GACFC,KACD,MAAMgP,GAAoB,QAAmBF,EAAU,OACjDnN,GAAc,UACdsN,GAAgB,UAChBC,EAAa,GAAGF,SAChBG,EAAU,GAehB,OAdAxN,EAAYgC,SAAQyL,IAClB,MAAMC,EAAYtP,EAAMqP,GAExB,IAAIE,SADGvP,EAAMqP,GAEI,MAAbC,GAA0C,iBAAdA,IAE5BC,QACED,GAEJC,EAAOD,EAET,MAAME,EAAQH,IAAaH,EAAgB,IAAIG,IAAa,GAChD,MAARE,GAAcH,EAAQzL,KAAK,GAAGwL,IAAaK,KAASD,IAAO,KAE7C,SAAKP,EAAW,CAClC/O,IAAKA,KACFD,EACHO,UAAW,IAAWA,EAAW0O,KAAsBG,IACvD,IAEJjN,EAAIsN,YAAc,MAClB,S","sources":["file:///app/packages/libs/shared/src/components/infinite-scroll-footer/infinite-scroll-footer.scss","file:///app/packages/libs/shared/src/components/infinite-scroll-footer/InfiniteScrollFooter.tsx","file:///app/packages/libs/shared/src/components/video-list/partial-loading/partial-video-list.scss","file:///app/packages/libs/shared/src/components/video-list/partial-loading/PartialVideoList.tsx","file:///app/packages/libs/shared/src/errors/handlers/HttpErrorHandlers.ts","file:///app/packages/libs/shared/src/hooks/UseBatchFetch.ts","file:///app/packages/libs/shared/src/hooks/UseInfiniteScroll.ts","file:///app/packages/libs/shared/src/hooks/UseInfiniteList.ts","file:///app/packages/projects/lite/src/apps/watch-history/components/watch-history-video-list/WatchHistoryVideoList.tsx","file:///app/packages/projects/lite/src/apps/watch-history/flight-requests/VideoHistoryRequests.ts","file:///app/packages/projects/lite/src/apps/watch-history/views/watch-history/empty-state/WatchHistoryEmptyState.tsx","file:///app/packages/projects/lite/src/apps/watch-history/views/watch-history/partial-loading/partial-watch-history.scss","file:///app/packages/projects/lite/src/apps/watch-history/views/watch-history/partial-loading/PartialWatchHistory.tsx","file:///app/packages/projects/lite/src/apps/watch-history/views/watch-history/WatchHistoryView.tsx","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts","file:///app/packages/projects/lite/src/shared/hooks/useVideoMixin.ts","file:///app/node_modules/react-bootstrap/esm/Row.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"container\":\"VwD1b\",\"spinner\":\"eJ85e\"};","import * as React from 'react';\nimport { Spinner } from 'react-bootstrap';\nimport { useInView } from 'react-intersection-observer';\n\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './infinite-scroll-footer.scss';\n\ninterface InfiniteScrollFooterProps {\n isFetching: boolean;\n fetchNext?: (nextCursor: string) => void;\n nextCursor?: string;\n fetchOnScroll?: boolean;\n}\n\nInfiniteScrollFooter.defaultProps = {\n fetchOnScroll: false\n};\n\nexport function InfiniteScrollFooter(props: InfiniteScrollFooterProps): React.ReactElement {\n const [ ref, inView ] = useInView();\n\n React.useEffect(() => {\n if (!props.fetchOnScroll)\n return;\n\n if (!inView || props.isFetching)\n return;\n\n props.fetchNext?.(props.nextCursor);\n }, [ inView, props.isFetching ]);\n\n return (\n <div className={`p-3 text-center ${styles.container}`} ref={ref}>\n {props.isFetching\n ? <Spinner as='span' animation='border' role='status' className={styles.spinner} />\n : (\n <SvgContainer\n svgName={cvSvgLibrary.ChevronDown}\n className='svg-container cursor-pointer'\n size={SvgContainerSize.Large}\n onClick={() => props.fetchNext?.(props.nextCursor)}\n />\n )\n }\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"partialOptions\":\"Gufgq\",\"partialName\":\"SicQQ\",\"partialDescription\":\"dPGMq\",\"partialThumbnail\":\"vZrnb\",\"partialDragHandle\":\"iq73R\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nimport styles from './partial-video-list.scss';\n\ninterface PartialVideoListProps {\n withReordering?: boolean;\n numVideos?: number;\n allowBulkActions?: boolean;\n}\n\nPartialVideoList.defaultProps = {\n numVideos: 15\n};\n\nexport function PartialVideoList(props: PartialVideoListProps): JSX.Element {\n return (\n <div className='mx-2'>\n {Array(props.numVideos).fill(null).map((_, i) => (\n <div className='d-flex' key={i}>\n {props.allowBulkActions && <div className='form-check pe-3 pe-sm-2 mx-0 mx-md-2' />}\n <PartialVideoItem {...props} />\n </div>\n ))}\n </div>\n );\n}\n\nexport function PartialVideoItem(props: PartialVideoListProps): JSX.Element {\n const breakpoints = useBreakpoints();\n\n const size = VideoListHelper.getSize(breakpoints, 'md');\n const isSmall = size === 'sm';\n\n const withDragHandle = props.withReordering && !breakpoints.xs;\n\n return (\n <Row className={`${isSmall ? '' : 'py-2'} flex-grow-1`}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-1` : 'mb-1 pe-3 pe-md-2'}`}>\n <Row>\n {!!withDragHandle && (\n <div className='d-flex align-items-center justify-content-center col-2'>\n <div className={`partial-loading-background ${styles.partialDragHandle}`} />\n </div>\n )}\n <Col xs={VideoListHelper.getThumbnailColSize(withDragHandle)}>\n <div className={`partial-loading-background ${isSmall ? 'rounded' : 'rounded-3'} ${styles.partialThumbnail}`} />\n </Col>\n </Row>\n </Col>\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n <div className={`partial-loading-background mb-1 ${styles.partialName}`} />\n <div className={`partial-loading-background ${styles.partialDescription}`} />\n </Col>\n </Row>\n );\n}\n\n","import { BaseError } from 'libs/common/backbone/core/BaseError';\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Xhr } from 'libs/common/backbone/interfaces';\nimport { Core } from 'libs/common/core';\n\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { PrivateResourceError } from 'libs/shared/errors/general/private-resource/PrivateResourceError';\nimport { RegionLockedResourceError } from 'libs/shared/errors/general/region-locked-resource/RegionLockedResourceError';\nimport { UnspecifiedError } from 'libs/shared/errors/general/unspecified-error/UnspecifiedError';\nimport { VideoTypes } from 'libs/shared/interfaces';\n\nexport interface HttpErrorMap {\n notFound?: new () => BaseError;\n forbidden?: {\n rating?: new (description: string) => BaseError;\n yearLevel?: new (description: string) => BaseError;\n region?: new () => BaseError;\n privacy?: new (video?: VideoTypes) => BaseError;\n };\n badRequest?: new () => BaseError;\n}\n\nexport type IgnoreHttpErrorMap = {\n [key in keyof HttpErrorMap]: boolean;\n};\n\nconst defaultErrors: HttpErrorMap = {\n notFound: NotFoundError,\n forbidden: {\n rating: PrivateResourceError,\n yearLevel: PrivateResourceError,\n region: RegionLockedResourceError,\n privacy: PrivateResourceError\n },\n badRequest: UnspecifiedError\n};\n\nexport function handleHttpError(\n info: HttpStatus | Xhr,\n customErrorMap: HttpErrorMap = {},\n /**\n * Prevent certain errors in the errorMap from being thrown\n * so that you may implement your own handler\n */\n ignoreMap: IgnoreHttpErrorMap = {}\n): void {\n if (!info)\n return;\n\n let statusCode: HttpStatus;\n\n if (typeof(info) === 'number') {\n statusCode = info;\n } else {\n statusCode = info.status;\n }\n\n const errorMap = {\n ...defaultErrors,\n ...customErrorMap\n };\n\n if (!statusCode)\n return;\n\n if (!Core.ErrorHelper.isStatusCodeError(statusCode))\n return;\n\n if (statusCode === HttpStatus.NotFound) {\n if (!ignoreMap.notFound)\n Core.ErrorHelper.throw(new errorMap.notFound());\n return;\n }\n\n if (statusCode === HttpStatus.Forbidden) {\n /**\n * TODO: Work out how to go about handling all forbidden errors, such as region locking, year levels,\n * ratings, and privacy.\n */\n if (!ignoreMap.forbidden)\n Core.ErrorHelper.throw(new errorMap.forbidden.privacy());\n return;\n }\n\n if (!ignoreMap.badRequest)\n Core.ErrorHelper.throw(new errorMap.badRequest());\n}\n\nexport function handleXhrError(xhr: Xhr, customErrorMap?: HttpErrorMap): void {\n handleHttpError(xhr.status, customErrorMap);\n}","import React from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { Flight } from 'libs/common/flight';\nimport { ApplicationState, HashObject } from 'libs/common/react/interfaces';\n\nimport { BaseObject } from 'libs/shared/interfaces';\n\nexport interface UseBatchFetchResult<T extends BaseObject> {\n items: { [key: string]: T} | null;\n isFetching: boolean;\n}\n\n/**\n * Used to fetch multiple items by id with Flight. Will fetch 25 items at a time firing off multiple\n * requests if there are more than 25 items.\n * This will return items as null until we have all our items. Items will be returned as an object with\n * their ids as they key for easy mapping\n * \n * @param itemIds \n * @param getRequest \n */\nexport function useBatchFetch<T extends BaseObject>(\n itemIds: string[],\n getRequest: (ids: string[]) => Flight.Request\n): UseBatchFetchResult<T> {\n const [ idBatches, setIdBatches ] = React.useState<string[][]>([]);\n\n React.useEffect(() => {\n if (!itemIds?.length)\n return;\n\n const newBatches = [...idBatches];\n newBatches.push([]);\n\n itemIds.forEach(id => {\n if (newBatches.find(batch => batch.find(_id => _id === id)))\n return;\n\n newBatches[newBatches.length - 1].push(id);\n });\n\n setIdBatches(newBatches.filter(batch => batch.length));\n }, [itemIds ? itemIds.join(',') : null]);\n\n const dispatch = useDispatch();\n\n const state = useSelector((state: ApplicationState) => state);\n\n React.useEffect(() => {\n idBatches.forEach(idBatch => {\n const request = getRequest(idBatch);\n const response = Flight.getResponse<T[]>(state, request.key);\n\n if (response.shouldFetch)\n Flight.fetch(dispatch, request);\n });\n }, [idBatches?.length]);\n\n if (!idBatches?.length)\n return { items: null, isFetching: false };\n \n const items: { [key: string]: T} = {};\n\n /* Used locally to only return our items if we've fetched all of them */\n const responses: HashObject<Flight.Response<T[]>> = {};\n \n idBatches.forEach((idBatch, i) => {\n const request = getRequest(idBatch);\n const response = Flight.getResponse<T[]>(state, request.key);\n responses[i] = response;\n\n if (response.data)\n response.data.forEach(v => items[v.id] = v);\n });\n\n return {\n items: Object.keys(responses).some(k => !!responses[k].data) ? items : null,\n isFetching: !!Object.keys(responses).some(k => responses[k].isFetching)\n };\n}","import { useEffect } from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\n\nconst SCROLL_TOLERANCE = 400; // value in px\n\ninterface UseInfiniteScrollOptions {\n fetchNextPage: () => void;\n hasMore: boolean;\n isFetching: boolean;\n scrollContainer?: HTMLElement;\n}\n\nexport function useInfiniteScroll(options: UseInfiniteScrollOptions): void {\n const handleScroll = (): void => {\n if (options.isFetching)\n return;\n\n if (!options.scrollContainer) {\n const currentScrollHeight = window.innerHeight + document.documentElement.scrollTop;\n \n const totalHeight = document.documentElement.scrollHeight - SCROLL_TOLERANCE;\n \n if (currentScrollHeight < totalHeight)\n return;\n } else {\n const { scrollContainer } = options;\n const currentScrollHeight = scrollContainer.getBoundingClientRect().height + scrollContainer.scrollTop;\n \n const totalHeight = scrollContainer.scrollHeight - SCROLL_TOLERANCE;\n \n if (currentScrollHeight < totalHeight)\n return;\n }\n\n options.fetchNextPage();\n };\n\n useEffect(() => {\n const onScroll = FunctionHelper.throttle(handleScroll, 200);\n\n const scrollContainer = options.scrollContainer || window;\n\n if (options.hasMore)\n scrollContainer.addEventListener('scroll', onScroll);\n\n return () => scrollContainer.removeEventListener('scroll', onScroll);\n }, [ options.hasMore, options.fetchNextPage, options.scrollContainer ]);\n}","import { useEffect, useState } from 'react';\n\nimport { HttpStatus, HttpStatusClass } from 'libs/common/backbone/enums/HttpStatus';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Flight } from 'libs/common/flight';\n\nimport { BaseObject, BasePaginatedCollection } from 'libs/shared/interfaces';\n\nimport { useInfiniteScroll } from './UseInfiniteScroll';\nimport { useSelectAllPages } from './UseSelectAllPages';\n\nexport interface UseInfiniteListResult<T extends BaseObject> {\n items: T[];\n hasMore: boolean;\n isFetching: boolean;\n nextCursor: string;\n totalItems?: number;\n hasFirstPageCompleted: boolean;\n}\n\n/**\n * Hook to extract an infinite list from the application state,\n * save it locally in state and only update when new data\n * is fetched.\n * \n * @param getRequest - callback function to get the request for each page.\n * Can be false if the request requires data that hasn't yet been fetched - e.g. user id.\n * \n * @param fetchNext - callback function to fetch a page.\n * Can be false if the request requires data that hasn't yet been fetched - e.g. user id.\n */\nexport function useInfiniteList<TObject = BaseObject, TResponse = BasePaginatedCollection<TObject>>(\n getRequest: ((cursor?: string) => Flight.Request) | false,\n fetchNext: ((cursor?: string) => void) | false,\n onError?: (pageNumber: number, statusCode: HttpStatus) => void,\n getItems?: (responseData: TResponse) => TObject[],\n getCursor?: (responseData: TResponse) => string,\n scrollContainer?: HTMLElement\n): UseInfiniteListResult<TObject> {\n const [ pagesFetched, setPagesFetched ] = useState(0);\n\n const fetchNextFn = fetchNext as (cursor?: string) => void;\n\n function getKey(cursor?: string): string {\n if (!getRequest)\n return null;\n\n const request = getRequest(cursor);\n\n if (!request)\n return null;\n\n return request.key;\n }\n\n const response = useSelectAllPages<TObject, TResponse>(\n getKey,\n getItems,\n getCursor\n );\n\n function fetchNextPage(): void {\n if (!fetchNext || !getRequest || !response)\n return;\n\n setPagesFetched(currentVal => currentVal + 1);\n return fetchNextFn(response.nextCursor);\n }\n\n useInfiniteScroll({\n fetchNextPage,\n hasMore: !!response?.nextCursor,\n isFetching: response?.isFetching,\n scrollContainer\n });\n\n useEffect(() => {\n if (!response)\n return;\n\n if (response.shouldInitialFetch && fetchNext) {\n fetchNextFn();\n setPagesFetched(currentVal => currentVal + 1);\n }\n }, [ response?.shouldInitialFetch, fetchNext ]);\n\n useEffect(() => {\n if (!response?.statusCode || !FunctionHelper.isFunction(onError))\n return;\n\n const httpStatusClass: HttpStatusClass = +(response.statusCode?.toString()?.substr(0, 1));\n\n if (httpStatusClass !== HttpStatusClass.ClientError && httpStatusClass !== HttpStatusClass.ServerError)\n return;\n\n onError(pagesFetched, response.statusCode);\n }, [response?.statusCode]);\n\n return {\n items: response?.items,\n hasMore: !!response?.nextCursor,\n nextCursor: response?.nextCursor,\n isFetching: response?.isFetching,\n totalItems: response?.totalItems,\n hasFirstPageCompleted: response?.hasFirstPageCompleted\n };\n}","import * as React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CanFavouriteFunc, FavouriteFunc, PresentationAudience, VideoHistory, VideoTypes, YearGroup } from 'libs/shared/interfaces';\n\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\n\nconst namespace = 'watchHistory.watchHistoryVideoList';\n\nfunction formatDate(date: string): string {\n const diff = DateHelper.timeSince(new Date(date), 'day');\n\n if (diff === 0)\n return LanguageService.getPhrase(namespace, 'today');\n\n if (diff === 1)\n return LanguageService.getPhrase(namespace, 'yesterday');\n\n return DateHelper.format(date, 'Do MMMM');\n}\n\ninterface WatchHistoryVideoListProps {\n videoHistory: VideoHistory[];\n videos: VideoTypes[];\n yearGroups: YearGroup[];\n setFavourite: FavouriteFunc;\n canFavourite: CanFavouriteFunc;\n presentationAudiences?: PresentationAudience[];\n}\n\nexport function WatchHistoryVideoList(props: WatchHistoryVideoListProps): JSX.Element {\n const { hasPermissions } = usePermissions();\n\n const historyGroups = ArrayHelper.groupBy(props.videoHistory, 'lastDateWatched');\n\n const videoGroups: { [index: string]: VideoTypes[] } = {};\n\n const sortedDates = Object.keys(historyGroups).sort().reverse();\n\n // Map video history to video objects and mixin lastProgressPoint\n sortedDates.forEach(date => {\n videoGroups[date] = historyGroups[date].map(history => {\n const video = props.videos.find(v => v.id.toString() === history.videoId.toString());\n\n if (!video)\n return null;\n\n return {\n ...video,\n lastProgressPoint: history.lastProgressPoint\n };\n }).filter(Boolean);\n });\n\n const sortedDatesGroupCount = sortedDates.reduce((dateCounts: HashObject, currentDate: string) => {\n const dateTotal = videoGroups[currentDate].length;\n const runningTotal = dateTotal + (dateCounts.runningTotal ?? 0);\n\n return {\n ...dateCounts,\n runningTotal,\n [currentDate]: runningTotal - dateTotal\n };\n }, {});\n\n return (\n <>\n {sortedDates.map(date => {\n // TODO: Fix bug where watch history endpoint returns workspace videos that cannot be fetched/displayed.\n // This is caused by 1 user sharing their workspace video with another user.\n if (!videoGroups[date].length)\n return <React.Fragment key={date}></React.Fragment>;\n\n return (\n <div key={date} className='pb-3'>\n <h2 className='h4'>{formatDate(date)}</h2>\n <VideoList\n videos={videoGroups[date]}\n yearGroups={props.yearGroups}\n getVideoAppLink={VideoAppLinkHelper.getAppLink}\n getSubTextAppLink={video => SeriesAppLinkHelper.getSeriesAppLink(video.series)}\n hasPermissions={hasPermissions}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n startingPositionIndex={sortedDatesGroupCount[date]}\n presentationAudiences={props.presentationAudiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n />\n </div>\n );\n })}\n </>\n );\n}","\nimport { Xhr } from 'libs/common/backbone/interfaces';\nimport { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { VideoHistoryCollection } from 'libs/shared/interfaces';\n\nexport const VideoHistoryRequests = {\n userVideoHistory(\n cursor?: string,\n success?: (data: HashObject) => void,\n error?: (Xhr: Xhr) => void,\n always?: () => void\n ): Flight.Request {\n let key = 'video:history';\n let url = `{gateway}/v1/users/me/watch-history`;\n\n if (cursor) {\n key += `:${cursor}`;\n url += `?cursor=${cursor}`;\n }\n\n return {\n key,\n url,\n formatData: (historyCollection: VideoHistoryCollection) => {\n return {\n data: historyCollection.data.map(historyData => {\n // Convert last watched times from UTC to local time\n const lastTimeWatchedLocal = DateHelper.format(historyData.lastTimeWatched);\n const lastDateWatchedLocal = DateHelper.format(lastTimeWatchedLocal, 'YYYY-MM-DD');\n\n return {\n ...historyData,\n lastTimeWatched: lastTimeWatchedLocal,\n lastDateWatched: lastDateWatchedLocal\n };\n }),\n pagination: historyCollection.pagination\n };\n },\n success,\n error,\n always\n };\n },\n\n videoHistory(\n ids: string[],\n namespace?: string,\n success?: (data: HashObject) => void,\n error?: (Xhr: Xhr) => void,\n always?: () => void\n ): Flight.Request {\n const params = ids.sort().map(i => `videoId=${i}`);\n\n return {\n key: `video:history:videos:${params.join('&')}`,\n url: `{gateway}/v1/videos/history?${params.join('&')}`,\n normalizeOptions: {\n namespace\n },\n formatData: (historyCollection: HashObject[]) => {\n if (!historyCollection?.length)\n return historyCollection;\n\n /**\n * Data is formatted to enable it to be merged with the existing video object in the store\n * Where we need to merge more history properties with the video object, map them below.\n */\n return historyCollection.map((watchHistory: HashObject) => ({\n id: watchHistory.videoId,\n lastProgressPoint: watchHistory.lastProgressPoint\n }));\n },\n success,\n error,\n always\n };\n }\n};","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, SignUpDescriptors, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\n\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\n\nconst namespace = 'watchHistory.watchHistoryEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport function WatchHistoryEmptyState(): JSX.Element {\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={ImageUrls.EmptyStates.WATCH_HISTORY} altText={getPhrase('info')} />\n\n <EmptyState.Heading><Text phrase='heading' /></EmptyState.Heading>\n <EmptyState.Info><Text phrase='info' /></EmptyState.Info>\n\n <EmptyState.Cta\n text={LanguageService.getPhrase(namespace, 'cta')}\n appLink={{\n application: AppChannels.DASHBOARD,\n action: Actions.Dashboard.HOME\n }}\n />\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}\n\nexport function WatchHistoryPublicEmptyState(): JSX.Element {\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={ImageUrls.EmptyStates.WATCH_HISTORY_PUBLIC} altText={getPhrase('publicInfo')}/>\n <EmptyState.Heading><Text phrase='publicHeading' /></EmptyState.Heading>\n <EmptyState.Info><Text phrase='publicInfo' /></EmptyState.Info>\n <EmptyState.Cta\n text={LanguageService.getPhrase(namespace, 'publicCta')}\n appLink={{\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n }}\n analyticsData={{}}\n analyticsOptions={{\n actionType: UserAction.Click,\n location: LocationContext.WatchHistoryLanding,\n entity: EntityType.AppLink,\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n }}\n />\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"partialDate\":\"vq4eE\"};","import React from 'react';\n\nimport { PartialVideoList } from 'libs/shared/components/video-list/partial-loading/PartialVideoList';\n\nimport styles from './partial-watch-history.scss';\n\nexport function PartialWatchHistory(): JSX.Element {\n return (\n <>\n <div className='mb-3'>\n <div className={`${styles.partialDate} mb-2 partial-loading-background`} />\n <PartialVideoList numVideos={2} />\n </div>\n\n <div className='mb-3'>\n <div className={`${styles.partialDate} mb-2 partial-loading-background`} />\n <PartialVideoList numVideos={3} />\n </div>\n\n <div className='mb-3'>\n <div className={`${styles.partialDate} mb-2 partial-loading-background`} />\n <PartialVideoList numVideos={2} />\n </div>\n\n <div className='mb-3'>\n <div className={`${styles.partialDate} mb-2 partial-loading-background`} />\n <PartialVideoList numVideos={5} />\n </div>\n </>\n );\n}","import * as React from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { InfiniteScrollFooter } from 'libs/shared/components/infinite-scroll-footer/InfiniteScrollFooter';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { LocalPermissionName } from 'libs/shared/enums/PermissionName';\nimport { handleHttpError } from 'libs/shared/errors/handlers/HttpErrorHandlers';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useBatchFetch } from 'libs/shared/hooks/UseBatchFetch';\nimport { useInfiniteList } from 'libs/shared/hooks/UseInfiniteList';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { CurrentUser, VideoHistory, YearGroup } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\n\nimport { WatchHistoryVideoList } from 'apps/watch-history/components/watch-history-video-list/WatchHistoryVideoList';\nimport { VideoHistoryRequests } from 'apps/watch-history/flight-requests/VideoHistoryRequests';\n\nimport { WatchHistoryEmptyState, WatchHistoryPublicEmptyState } from './empty-state/WatchHistoryEmptyState';\nimport { PartialWatchHistory } from './partial-loading/PartialWatchHistory';\n\nconst namespace = 'watchHistory.watchHistory';\n\nexport function WatchHistoryView(): JSX.Element {\n useSetPageMetadata({ title: LanguageService.getPhrase(namespace, 'pageTitle') });\n const dispatch = useDispatch();\n const alerts = useAlerts();\n const { hasLocalPermissions } = usePermissions();\n\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.VideoThumbnail);\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n\n const getUserVideoHistoryRequest = (cursor?: string) => {\n return VideoHistoryRequests.userVideoHistory(cursor);\n };\n\n const fetchNext = (cursor?: string) => {\n return Flight.getFetch(dispatch)(getUserVideoHistoryRequest(cursor));\n };\n\n const shouldFetch = !hasLocalPermissions(LocalPermissionName.ViewWatchHistoryLanding) && currentUser.hasCompleted;\n\n const {\n items: videoHistory,\n hasMore,\n isFetching\n } = useInfiniteList<VideoHistory>(shouldFetch ? getUserVideoHistoryRequest : false, fetchNext, onError);\n\n function onError(pageNumber: number, httpStatus: HttpStatus): void {\n if (pageNumber === 1)\n return handleHttpError(httpStatus);\n\n alerts.error(LanguageService.getPhrase(namespace, 'error'));\n }\n\n const videoIds = videoHistory?.map(v => v.videoId) ?? [];\n\n const videosFetchResult = useBatchFetch(videoIds, (ids: string[]) => {\n return VideoRequests.watchHistoryVideos(ids);\n });\n\n const videosMap = videosFetchResult.items ?? {};\n\n const videos = Object.keys(videosMap).map(id => videosMap[id]);\n\n useVideoMixin(videos.filter(VideoHelper.isVideo));\n \n const audiences = usePresentationAudiences();\n\n if (hasLocalPermissions(LocalPermissionName.ViewWatchHistoryLanding))\n return <WatchHistoryPublicEmptyState />;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <div className='px-3'>\n <h1 className='h2'><Text phrase='heading' /></h1>\n {(() => {\n if (!videoHistory)\n return <PartialWatchHistory />;\n\n if (!videoHistory.length)\n return <WatchHistoryEmptyState />;\n\n if (!videos.length)\n return <PartialWatchHistory />;\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <WatchHistoryVideoList\n videoHistory={videoHistory}\n videos={videos}\n presentationAudiences={audiences.data}\n yearGroups={yearGroups.data}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n />\n {(hasMore || isFetching) && <InfiniteScrollFooter isFetching={isFetching} fetchNext={fetchNext} />}\n </VideoActionsContext.Provider>\n );\n })()}\n </div>\n </LanguageNamespaceContext.Provider>\n );\n}","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation } = usePresentation({ redirectOnError: true });\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!activePresentation &&\n AudienceRequests.presentationAudiences(activePresentation.id)\n );\n\n return audiences;\n};","import React from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { CurrentUser, Video, VideoCollection } from 'libs/shared/interfaces';\n\ninterface VideoMixinOptions {\n /**\n * If the videos that are having new data mixed into are sitting on an explicit Flight namespace,\n * providing that namespace here is required\n */\n flightNamespace?: string;\n}\n\nexport function useVideoMixin(videos: VideoCollection | Video[], options: VideoMixinOptions = {}): void {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const hydratedVideos = React.useRef<Set<string>>(new Set<string>());\n\n const videoIds = videos && (Array.isArray(videos)\n ? videos.filter(Boolean).map(v => v.id)\n : videos.data.filter(Boolean).map(v => v.id));\n\n const [ request, setRequest ] = React.useState<Flight.Request[]>([]);\n\n React.useEffect(() => {\n if (!videoIds?.length || !currentUser.data?.isAuthenticated)\n return;\n\n const unhydratedVideos: string[] = [];\n\n videoIds.forEach(id => {\n if (!hydratedVideos.current.has(id)) {\n unhydratedVideos.push(id);\n hydratedVideos.current.add(id);\n }\n });\n \n if (!unhydratedVideos.length)\n return;\n\n setRequest(r => [\n ...r,\n ClassificationRequests.hasCurriculumLinks(unhydratedVideos, null, options.flightNamespace),\n VideoRequests.videoMixinAssocs(unhydratedVideos, options.flightNamespace)\n ]);\n }, [ videoIds?.length, currentUser.data?.isAuthenticated ]);\n\n Flight.useBasicFetchAll(request);\n}","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Row = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');\n const breakpoints = useBootstrapBreakpoints();\n const minBreakpoint = useBootstrapMinBreakpoint();\n const sizePrefix = `${decoratedBsPrefix}-cols`;\n const classes = [];\n breakpoints.forEach(brkPoint => {\n const propValue = props[brkPoint];\n delete props[brkPoint];\n let cols;\n if (propValue != null && typeof propValue === 'object') {\n ({\n cols\n } = propValue);\n } else {\n cols = propValue;\n }\n const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';\n if (cols != null) classes.push(`${sizePrefix}${infix}-${cols}`);\n });\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n ...props,\n className: classNames(className, decoratedBsPrefix, ...classes)\n });\n});\nRow.displayName = 'Row';\nexport default Row;"],"names":["InfiniteScrollFooter","props","ref","inView","fetchOnScroll","isFetching","fetchNext","nextCursor","className","Spinner","as","animation","role","SvgContainer","svgName","size","S","onClick","defaultProps","PartialVideoList","Array","numVideos","fill","map","_","i","key","allowBulkActions","PartialVideoItem","breakpoints","useBreakpoints","isSmall","VideoListHelper","withDragHandle","withReordering","xs","Row","Col","defaultErrors","notFound","forbidden","rating","yearLevel","region","privacy","badRequest","handleHttpError","info","customErrorMap","ignoreMap","statusCode","status","errorMap","useBatchFetch","itemIds","getRequest","idBatches","setIdBatches","length","newBatches","push","forEach","id","find","batch","_id","filter","join","dispatch","state","idBatch","request","shouldFetch","items","responses","response","data","v","Object","keys","some","k","SCROLL_TOLERANCE","useInfiniteList","onError","getItems","getCursor","scrollContainer","options","handleScroll","useState","pagesFetched","setPagesFetched","fetchNextFn","cursor","fetchNextPage","currentVal","hasMore","getBoundingClientRect","height","scrollTop","scrollHeight","window","innerHeight","document","documentElement","useEffect","onScroll","FunctionHelper","addEventListener","removeEventListener","shouldInitialFetch","httpStatusClass","toString","substr","HttpStatus","totalItems","hasFirstPageCompleted","namespace","WatchHistoryVideoList","hasPermissions","usePermissions","historyGroups","ArrayHelper","videoHistory","videoGroups","sortedDates","sort","reverse","date","history","video","videos","videoId","lastProgressPoint","Boolean","sortedDatesGroupCount","reduce","dateCounts","currentDate","dateTotal","runningTotal","diff","DateHelper","Date","LanguageService","formatDate","VideoList","yearGroups","getVideoAppLink","VideoAppLinkHelper","getSubTextAppLink","SeriesAppLinkHelper","series","setFavourite","canFavourite","startingPositionIndex","presentationAudiences","getPreviewQuestionsAppLink","interactive","InteractiveHelper","VideoHistoryRequests","userVideoHistory","success","error","always","url","formatData","historyCollection","historyData","lastTimeWatchedLocal","lastTimeWatched","lastDateWatchedLocal","lastDateWatched","pagination","ids","params","normalizeOptions","watchHistory","getPhrase","WatchHistoryEmptyState","value","EmptyState","src","ImageUrls","altText","Text","phrase","text","appLink","application","action","WatchHistoryPublicEmptyState","analyticsData","analyticsOptions","actionType","location","entity","workflowPhase","descriptor","SignUp","PartialWatchHistory","WatchHistoryView","useSetPageMetadata","title","alerts","hasLocalPermissions","useLiteFavourites","u","currentUser","UserRequests","videoActions","useVideoActions","isAuthenticated","CustomerRequests","customerId","getUserVideoHistoryRequest","hasCompleted","pageNumber","httpStatus","videoIds","videosMap","VideoRequests","useVideoMixin","VideoHelper","audiences","usePresentationAudiences","VideoActionsContext","activePresentation","redirectOnError","hydratedVideos","Set","isArray","setRequest","unhydratedVideos","current","has","add","r","flightNamespace","bsPrefix","Component","decoratedBsPrefix","minBreakpoint","sizePrefix","classes","brkPoint","propValue","cols","infix","displayName"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripts/3158-7cff145fc4-lite.chunk.js","mappings":"0ZA+BM,SAAUA,EAAmBC,G,oBACzBC,GAAe,SAAfA,WACR,GAAuC,IAAAC,GAAkB,qBAAjDC,EAAY,EAAZA,aAAcC,EAAY,EAAZA,aACdC,GAAmB,SAAnBA,eAEFC,EAAc,kBAAkC,mBAChDC,EAAS,kBAA6B,cACtCC,EAAO,kBAA2B,eAAwBR,EAAMS,SAAUT,EAAMU,UAChFC,EAAQ,qBAAuC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C,aAAcJ,EAAMI,aACpBE,YAAaN,EAAMM,YACnBe,UAAWrB,EAAMqB,UACjBoH,gBAAiB,SAACC,EAAGC,GAAI,OAAK,eAA8BD,EAAG,OAAF,wBACxDC,GAAI,CACP3H,QAAShB,EAAMiB,YAAYD,QAC3BE,UAAWlB,EAAMiB,YAAYC,UAC7BuE,SAAUzF,EAAMiB,YAAYwE,SAC5B/E,QAASV,EAAMU,QACfS,YAAanB,EAAMiB,YAAYG,MAC/B,EACFD,YAAanB,EAAMiB,YAAYG,OAKzC,C,wEC9Ya2H,EAA2B,WACtC,IAAQC,GAAuB,OAAgB,CAAEC,iBAAiB,IAA1DD,mBAOR,OALkB,oBACdA,GACF,0BAAuCA,EAAmBlI,IAI9D,C","sources":["file:///app/packages/projects/lite/src/apps/share/views/play-shared-clip/PlaySharedClipView.tsx","file:///app/packages/projects/lite/src/shared/components/play-clip/PlayClip.tsx","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts"],"sourcesContent":["import React from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { ThemeRequests } from 'libs/shared/flight-requests/ThemeRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useCannotConsumeError } from 'libs/shared/hooks/useCannotConsumeError';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useProducts } from 'libs/shared/hooks/UseProducts';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Clip, Config, CurrentUser, Theme, Video, YearGroup } from 'libs/shared/interfaces';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { PlayClip } from 'shared/components/play-clip/PlayClip';\nimport { useDeepLinks } from 'shared/hooks/useDeepLinks';\nimport { useFetchPointsOfInterest } from 'shared/hooks/useFetchPointsOfInterest';\nimport { useGetRelatedVideos } from 'shared/hooks/useGetRelatedVideos';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoFeatureAccess } from 'shared/hooks/useVideoFeatureAccess';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\n\nimport { ShareLinkViewProps } from 'apps/share/interfaces/ShareLinkViewProps';\n\nexport function PlaySharedClipView(props: ShareLinkViewProps): React.ReactElement {\n const { hasProduct } = useProducts();\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.VideoThumbnail);\n const { hasPermissions } = usePermissions();\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const clip = Flight.useBasicFetch<Clip>(ClipRequests.sharedClip(props.objectId, props.shareId));\n const video = Flight.useBasicFetch<Video>(!!clip.data?._parentVideo &&\n VideoRequests.video(clip.data._parentVideo.id));\n const relatedVideos = useGetRelatedVideos({\n video: video.data,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n moviesAndTv: props.queryParams.mtv,\n currentUser: currentUser.data\n });\n const audiences = usePresentationAudiences();\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n const pointsOfInterest = useFetchPointsOfInterest(props.objectId);\n const glanceTheme = Flight.useBasicFetch<Theme>(clip.data?.glance?.theme\n ? ThemeRequests.themeImages(clip.data.glance.theme, clip.data.glance.type) : null);\n\n const shouldFetchTheme = hasPermissions(PermissionName.ViewVideoGlance) &&\n clip.data?.glance?.theme;\n\n const featureAccess = useVideoFeatureAccess();\n\n useSetPageMetadata(PageMetadataHelper.getClipMetadata({ content: clip.data }));\n\n useVideoMixin(relatedVideos.videos ?? []);\n useCannotConsumeError(clip);\n useDeepLinks({ id: props.objectId, app: 'clips', shareId: props.shareId });\n\n const hasLoaded = (\n clip.data &&\n currentUser.hasCompleted &&\n config.hasCompleted &&\n pointsOfInterest.hasCompleted\n );\n\n if (!hasLoaded)\n return <></>;\n\n return (\n <PlayClip\n shareId={props.shareId}\n clip={clip.data}\n originalVideo={video.data}\n currentUser={currentUser.data}\n yearGroups={yearGroups.data}\n relatedVideos={relatedVideos}\n canFavourite={canFavourite}\n setFavourite={setFavourite}\n hasProduct={hasProduct}\n queryParams={props.queryParams}\n audiences={audiences.data}\n imageCdnUrl={config.data.imageCdnUrl}\n canManageVideoAccess={hasPermissions(PermissionName.ManageVideoAccess)}\n glanceTheme={glanceTheme.data}\n glanceLoaded={!shouldFetchTheme || glanceTheme.hasCompleted}\n pointsOfInterest={pointsOfInterest?.items}\n featureAccess={featureAccess}\n tableOfContentsId={props.queryParams?.scrollTo}\n />\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { SignUpDescriptors, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { Text } 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 { VideoList } from 'libs/shared/components/video-list/VideoList';\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 { GlobalPlayerConsumer } from 'libs/shared/context/player-context/components/GlobalPlayerConsumer';\nimport { usePlayerContext } from 'libs/shared/context/player-context/PlayerContext';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { HasProductFunc } from 'libs/shared/hooks/UseProducts';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { CanFavouriteFunc, Clip, CurrentUser, FavouriteFunc, Interactive, Link, PointOfInterest, PresentationAudience, Resource, 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/PlayPageTitleAndActions';\nimport { getResources } from 'shared/components/play-page/PlayPageUtils';\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 { VideoDetailsWithScrollbar } from 'shared/components/video-details/VideoDetails';\nimport { VideoDetailsPartial } from 'shared/components/video-details/VideoDetailsPartial';\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nconst getResourceAppLink = (videoId: string, shareId: string, canViewResource: boolean) =>\n (resource: Resource | Link) => {\n if (!canViewResource) {\n return {\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n };\n }\n\n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PREVIEW_PDF,\n args: [resource.id],\n params: {\n videoId: videoId,\n shareId: shareId\n }\n };\n };\n\nconst namespace = 'shared.playClip';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ntype DetailsViewType = {\n view: 'v@g' | 'details' | 'loading';\n referrer: 'v@g' | 'details';\n};\n\ninterface PlayClipProps {\n clip: Clip;\n originalVideo: Video;\n currentUser: CurrentUser;\n yearGroups: YearGroup[];\n relatedVideos: RelatedVideosHash;\n setFavourite: FavouriteFunc;\n canFavourite: CanFavouriteFunc;\n queryParams: PlayViewQueryParams;\n hasProduct: HasProductFunc;\n audiences: PresentationAudience[];\n imageCdnUrl: string;\n shareId?: string;\n canManageVideoAccess: boolean;\n pointsOfInterest?: PointOfInterest[];\n featureAccess: VideoFeaturesHash;\n glanceTheme?: Theme;\n glanceLoaded: boolean;\n tableOfContentsId: string;\n}\n\nexport function PlayClip(props: PlayClipProps): JSX.Element {\n const playerContext = usePlayerContext();\n\n const { hasPermissions } = usePermissions();\n const { canConsume } = VideoHelper.getCanBeConsumed(props.clip);\n \n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\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 const isArchived = VideoHelper.isVideoTypeArchived(props.clip);\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\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.clip, 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 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 function limitAccess(): boolean {\n if (!props.currentUser?.isAuthenticated)\n return true;\n\n if (!props.hasProduct(ProductId.Primary))\n return true;\n\n if (hasStudentExperience)\n return true;\n\n return false;\n }\n\n const canAccessOriginal = props.originalVideo && !limitAccess() && !!props.clip._canBeConsumed?.value;\n\n function getOriginalVideoAppLink(): Core.AppLink {\n if (!canAccessOriginal)\n return null;\n \n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [ props.originalVideo.id, TextHelper.slugify(props.originalVideo.name) ]\n };\n }\n\n const showPlayerPlaceholder = playerContext.mode === 'picture-in-picture' || props.featureAccess.canViewPublicLayout;\n\n const resourcesWidget = getResources(props.clip, hasStudentExperience);\n\n const otherClips = props.originalVideo?.clips?.data?.filter(c => c.id.toString() !== props.clip.id.toString()) ?? [];\n\n return (\n <div className='px-4'>\n <RestrictionBanner\n restrictions={props.clip._restrictions}\n yearGroups={props.yearGroups}\n objectId={props.clip.id}\n objectTypeId={MasterType.Clip}\n canManageVideoAccess={props.canManageVideoAccess}\n />\n\n {isArchived && (\n <ArchivedBanner\n typeId={props.clip.typeId}\n hasStudentExperience={hasStudentExperience}\n />\n )}\n\n <section className={`mb-2`}>\n {canConsume &&\n <GlobalPlayerConsumer\n key={props.clip.id}\n objectId={props.clip.id}\n objectTypeId={props.clip.typeId}\n shareId={props.shareId}\n context={props.queryParams?.context}\n contextId={props.queryParams?.contextId}\n moviesAndTv={props.queryParams?.mtv}\n playNext={props.queryParams?.playNext}\n startTime={props.queryParams?.t ?? props.queryParams?.startTime}\n mode='default'\n location='play-page'\n />\n }\n <div className={showPlayerPlaceholder ? '' : 'd-none'}>\n <PlayerPlaceholder\n video={props.clip}\n type='pip'\n />\n </div>\n </section>\n\n <PlayPageTitleAndActions\n media={props.clip}\n yearGroups={props.yearGroups}\n audiences={props.audiences}\n originalVideoAppLink={getOriginalVideoAppLink()}\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.clip}\n pointsOfInterest={props.pointsOfInterest}\n onClickShowDescription={() => setDetailsView({ view: 'details', referrer: 'v@g' })}\n setStartTime={(time: number) => playerContext.playerRef.current?.currentTime(time)}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n />\n </section>\n\n <section className={`${detailsView.view === 'details' ? 'd-block' : 'd-none'}`}>\n <VideoDetailsWithScrollbar\n video={props.clip}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n onClickClose={hasGlance && (() => setDetailsView({ view: 'v@g', referrer: 'details' }))}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n hideTags={hasGlance}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n />\n </section>\n\n <section className={`${detailsView.view === 'loading' ? 'd-block' : 'd-none'}`}>\n <VideoDetailsPartial />\n </section>\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: props.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={getResourceAppLink(\n props.clip?.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 {!!(otherClips?.length && !limitAccess()) && (\n <div className='pb-3'>\n <FixedWidget<ClipWidgetItemProps>\n name={getPhrase('otherClips', { count: otherClips.length })}\n contents={WidgetContents.Clips}\n collection={otherClips}\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.originalVideo, imageCdnUrl: props.imageCdnUrl }}\n analyticsData={{ widgetId: 'clips' }}\n />\n </div>\n )}\n\n {!!(props.clip.interactives?.data?.length && !limitAccess()) && (\n <div className='pb-3' id={PlayPageAnchor.Interactives} ref={interactivesRef}>\n <FixedWidget<InteractiveWidgetItemProps>\n name={getPhrase('interactives', { count: props.clip.interactives.data.length })}\n contents={WidgetContents.Interactives}\n collection={props.clip.interactives.data}\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.clip,\n questionsAppLink: {\n application: AppChannels.INTERACTIVES,\n action: Actions.Interactives.PREVIEW_QUESTIONS\n },\n imageCdnUrl: props.imageCdnUrl\n }}\n analyticsData={{ widgetId: 'interactives' }}\n />\n </div>\n )}\n\n {!!canAccessOriginal && (\n <section className='pb-2 pt-1'>\n <h2 className='h4 mb-0'><Text namespace={namespace} phrase='clippedFrom' /></h2>\n <VideoActionsContext.Provider value={videoActions}>\n <VideoList\n videos={[props.originalVideo]}\n yearGroups={props.yearGroups}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv\n })}\n hasPermissions={hasPermissions}\n presentationAudiences={props.audiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n />\n </VideoActionsContext.Provider>\n </section>\n )}\n\n <section>\n <RelatedVideos\n currentVideo={props.clip}\n yearGroups={props.yearGroups}\n relatedVideos={props.relatedVideos}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n currentUser={props.currentUser}\n audiences={props.audiences}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv\n })}\n moviesAndTv={props.queryParams.mtv}\n />\n </section>\n </div>\n );\n}","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation } = usePresentation({ redirectOnError: true });\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!activePresentation &&\n AudienceRequests.presentationAudiences(activePresentation.id)\n );\n\n return audiences;\n};"],"names":["PlaySharedClipView","props","hasProduct","u","setFavourite","canFavourite","hasPermissions","currentUser","config","clip","objectId","shareId","video","data","_parentVideo","id","relatedVideos","context","queryParams","contextId","moviesAndTv","mtv","audiences","yearGroups","isAuthenticated","customerId","pointsOfInterest","glanceTheme","glance","theme","type","shouldFetchTheme","featureAccess","content","videos","app","hasCompleted","originalVideo","imageCdnUrl","canManageVideoAccess","glanceLoaded","items","tableOfContentsId","scrollTo","getResourceAppLink","videoId","canViewResource","resource","application","action","args","params","namespace","getPhrase","PlayClip","playerContext","canConsume","videoActions","location","resourcesRef","interactivesRef","current","isArchived","hasStudentExperience","shouldPlayOnExitImmersiveReader","hasGlance","canViewGlance","view","referrer","detailsView","setDetailsView","limitAccess","canAccessOriginal","_canBeConsumed","value","showPlayerPlaceholder","mode","canViewPublicLayout","resourcesWidget","otherClips","clips","filter","c","toString","className","restrictions","_restrictions","objectTypeId","typeId","key","playNext","startTime","t","media","originalVideoAppLink","name","onClickShowDescription","setStartTime","time","playerRef","currentTime","getTagAppLink","tag","tagOrClassification","suppressInteractivity","onLaunchImmersiveReader","isPaused","pause","onExitImmersiveReader","play","onClickClose","hideTags","length","ref","count","contents","collection","prefetched","childComponent","R","extraChildComponentProps","imageErrorFallbackUrl","actionBehaviour","canViewResourceItems","titlePosition","hideTypeBadge","getChildAppLink","analyticsOptions","workflowPhase","descriptor","SignUp","analyticsData","widgetId","C","interactives","interactive","questionsAppLink","phrase","getVideoAppLink","v","opts","presentationAudiences","getPreviewQuestionsAppLink","currentVideo","usePresentationAudiences","activePresentation","redirectOnError"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripts/5591-a4850980ea-lite.chunk.js","mappings":"0MA0BMA,EAA8B,CAClCC,SAAU,IACVC,UAAW,CACTC,OAAQ,IACRC,UAAW,IACXC,OAAQ,IACRC,QAAS,KAEXC,WAAY,KAGR,SAAUC,EACdC,GAMkC,IALlCC,EAAA,uDAA+B,CAAC,EAKhCC,EAAA,uDAAgC,CAAC,EAEjC,GAAKF,EAAL,CAGA,IAAIG,EAGFA,EADmB,iBAAVH,EACIA,EAEAA,EAAKI,OAGpB,IAAMC,EAAW,OAAH,wBACTd,GACAU,GAGAE,GAGA,yBAAmCA,KAGpCA,IAAe,aAMfA,IAAe,cAUdD,EAAUJ,YACb,aAAuB,IAAIO,EAASP,YAN/BI,EAAUT,WACb,aAAuB,IAAIY,EAASZ,UAAUI,SAX3CK,EAAUV,UACb,aAAuB,IAAIa,EAASb,UAvBhC,CAuCV,C,6DChFA,SAASc,EAAiBC,GACxB,OAAOA,EAAWC,KAAI,SAAAC,GAAG,OAAIA,EAAIN,UAAU,IAAEO,KAAK,IACpD,CAGM,SAAUC,EACdC,EACAC,EACAC,GAEA,IAAMP,EAAaQ,MAAMC,QAAQJ,GAAeA,EAAc,CAACA,IAE/D,IAAAK,YAAU,WACRV,EAAWW,SAAQ,SAAAT,IACjB,OAAgBA,EAAIN,WAAYU,EAAcC,EAChD,GACF,GAAG,CAAER,EAAiBC,GAAaM,EAAcC,GACnD,C,qRCeM,SAAUK,EAAgBC,GAC9B,I,IAAMC,EAAkBD,EAAME,UAC5B,2BACA,qBAE0D,G,EAApB,YAAe,G,EAAK,E,k5BAApDC,EAAW,KAAEC,EAAc,KAE7BC,EAAa,wBAAgCL,EAAMM,aAEnDC,EAAoB,WAAc,kBAAM,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AAIe,YAAc,MAClB,S","sources":["file:///app/packages/libs/shared/src/errors/handlers/HttpErrorHandlers.ts","file:///app/packages/libs/shared/src/hooks/UseHandleObjectError.ts","file:///app/packages/projects/lite/src/apps/interactives/components/play-interactive/PlayInteractive.tsx","file:///app/packages/projects/lite/src/apps/interactives/components/preview-interactive/InteractiveAlertBanner.tsx","file:///app/packages/projects/lite/src/apps/interactives/components/preview-interactive/PreviewInteractive.tsx","file:///app/packages/projects/lite/src/apps/interactives/hooks/interactiveHooks.tsx","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts","file:///app/packages/projects/lite/src/shared/hooks/useShouldPreviewInteractive.ts","file:///app/node_modules/react-bootstrap/esm/Row.js"],"sourcesContent":["import { BaseError } from 'libs/common/backbone/core/BaseError';\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Xhr } from 'libs/common/backbone/interfaces';\nimport { Core } from 'libs/common/core';\n\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { PrivateResourceError } from 'libs/shared/errors/general/private-resource/PrivateResourceError';\nimport { RegionLockedResourceError } from 'libs/shared/errors/general/region-locked-resource/RegionLockedResourceError';\nimport { UnspecifiedError } from 'libs/shared/errors/general/unspecified-error/UnspecifiedError';\nimport { VideoTypes } from 'libs/shared/interfaces';\n\nexport interface HttpErrorMap {\n notFound?: new () => BaseError;\n forbidden?: {\n rating?: new (description: string) => BaseError;\n yearLevel?: new (description: string) => BaseError;\n region?: new () => BaseError;\n privacy?: new (video?: VideoTypes) => BaseError;\n };\n badRequest?: new () => BaseError;\n}\n\nexport type IgnoreHttpErrorMap = {\n [key in keyof HttpErrorMap]: boolean;\n};\n\nconst defaultErrors: HttpErrorMap = {\n notFound: NotFoundError,\n forbidden: {\n rating: PrivateResourceError,\n yearLevel: PrivateResourceError,\n region: RegionLockedResourceError,\n privacy: PrivateResourceError\n },\n badRequest: UnspecifiedError\n};\n\nexport function handleHttpError(\n info: HttpStatus | Xhr,\n customErrorMap: HttpErrorMap = {},\n /**\n * Prevent certain errors in the errorMap from being thrown\n * so that you may implement your own handler\n */\n ignoreMap: IgnoreHttpErrorMap = {}\n): void {\n if (!info)\n return;\n\n let statusCode: HttpStatus;\n\n if (typeof(info) === 'number') {\n statusCode = info;\n } else {\n statusCode = info.status;\n }\n\n const errorMap = {\n ...defaultErrors,\n ...customErrorMap\n };\n\n if (!statusCode)\n return;\n\n if (!Core.ErrorHelper.isStatusCodeError(statusCode))\n return;\n\n if (statusCode === HttpStatus.NotFound) {\n if (!ignoreMap.notFound)\n Core.ErrorHelper.throw(new errorMap.notFound());\n return;\n }\n\n if (statusCode === HttpStatus.Forbidden) {\n /**\n * TODO: Work out how to go about handling all forbidden errors, such as region locking, year levels,\n * ratings, and privacy.\n */\n if (!ignoreMap.forbidden)\n Core.ErrorHelper.throw(new errorMap.forbidden.privacy());\n return;\n }\n\n if (!ignoreMap.badRequest)\n Core.ErrorHelper.throw(new errorMap.badRequest());\n}\n\nexport function handleXhrError(xhr: Xhr, customErrorMap?: HttpErrorMap): void {\n handleHttpError(xhr.status, customErrorMap);\n}","import { useEffect } from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { handleHttpError, HttpErrorMap, IgnoreHttpErrorMap } from 'libs/shared/errors/handlers/HttpErrorHandlers';\n\nfunction generateCacheKey(flightObjs: Array<Flight.Response<any>>): string {\n return flightObjs.map(obj => obj.statusCode).join(':');\n}\n\n// TODO: Change this to just `useHandleHttpError` and only accept a status code.\nexport function useHandleObjectError(\n _flightObjs: Flight.Response<any> | Array<Flight.Response<any>>,\n customErrors?: HttpErrorMap,\n ignoreErrors?: IgnoreHttpErrorMap\n): void {\n const flightObjs = Array.isArray(_flightObjs) ? _flightObjs : [_flightObjs];\n\n useEffect(() => {\n flightObjs.forEach(obj => {\n handleHttpError(obj.statusCode, customErrors, ignoreErrors);\n });\n }, [ generateCacheKey(flightObjs), customErrors, ignoreErrors ]);\n}","import React from 'react';\nimport { createHtmlPortalNode, OutPortal } from 'react-reverse-portal';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { CheckMarkStatus } from 'libs/shared/components/check-mark-button/CheckMarkButton';\nimport { RestrictionPadlock } from 'libs/shared/components/video-list/components/restriction-padlock/RestrictionPadlock';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { Config, CurrentUser, InteractiveMetadata, PlayerViewKey, PresentationAudience, UnionShareObject, YearGroup } from 'libs/shared/interfaces';\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 { RelatedVideos } from 'shared/components/related-videos/RelatedVideos';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { LitePlayerView } from 'shared/views/lite-player/LitePlayerView';\n\ninterface PlayInteractiveProps {\n interactive: InteractiveMetadata;\n yearGroups: YearGroup[];\n currentUser: CurrentUser;\n config: Config;\n audiences: PresentationAudience[];\n queryParams: PlayViewQueryParams;\n viewKey: PlayerViewKey;\n startTime?: number;\n endTime?: number;\n\n // Share view only\n shareLink?: UnionShareObject;\n sharerInstanceRegion?: string;\n checkMarkStatus?: CheckMarkStatus;\n relatedVideos: RelatedVideosHash;\n}\n\nexport function PlayInteractive(props: PlayInteractiveProps): JSX.Element {\n const locationContext = props.shareLink ?\n LocationContext.PlaySharedInteractive :\n LocationContext.PlayInteractive;\n\n const [ showHeading, setShowHeading ] = React.useState(true);\n\n const isArchived = VideoHelper.isVideoTypeArchived(props.interactive);\n\n const summaryPortalNode = React.useMemo(() => createHtmlPortalNode(), []);\n\n const { setFavourite, canFavourite } = useLiteFavourites(locationContext);\n const { hasPermissions } = usePermissions();\n\n function onShowSummary(showing: boolean): void {\n setShowHeading(!showing);\n }\n\n return (\n <div className='px-3'>\n {isArchived && <ArchivedBanner typeId={props.interactive.typeId} hasStudentExperience />}\n\n <div className='mb-3'>\n <LitePlayerView\n config={props.config}\n video={props.interactive}\n currentUser={props.currentUser}\n shareLink={props.shareLink}\n viewKey={props.viewKey}\n startTime={props.startTime}\n onShowSummary={onShowSummary}\n summaryPortalNode={summaryPortalNode}\n />\n </div>\n {/* This wrapping div is here because react seems to not want to play nice\n with adding or removing a node just ahead of an OutPortal */}\n <div>\n {showHeading &&\n <h1 className='h3 d-flex'>\n {props.interactive.name}\n <RestrictionPadlock\n tooltipPlacement='right'\n className='ps-1'\n video={props.interactive}\n yearGroups={props.yearGroups}\n />\n </h1>\n }\n </div>\n <OutPortal node={summaryPortalNode}></OutPortal>\n\n {!hasPermissions(PermissionName.StudentExperience) && (\n <RelatedVideos\n currentVideo={props.interactive}\n yearGroups={props.yearGroups}\n currentUser={props.currentUser}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n relatedVideos={props.relatedVideos}\n audiences={props.audiences}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareLink?.id,\n moviesAndTv: props.queryParams.mtv\n })}\n moviesAndTv={props.queryParams.mtv}\n />\n )}\n </div>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { ToggleSwitch } from 'libs/shared/components/toggle-switch/ToggleSwitch';\nimport { Tooltip } from 'libs/shared/components/tooltip/Tooltip';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nconst namespace = 'interactives.previewInteractive';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface InteractiveAlertBannerProps {\n isPreviewPreventScrubbingEnabled: boolean;\n isPreviewingPreventScrubbing: boolean;\n toggleStudentMode: () => void;\n isArchived: boolean;\n}\n\nexport function InteractiveAlertBanner(props: InteractiveAlertBannerProps): JSX.Element {\n return (\n <div className='alert text-dark bg-light-blue px-2 rounded d-flex flex-column flex-lg-row justify-content-between mb-3 align-items-center' role='alert'>\n {!props.isArchived ? <Text phrase='alert' /> : (\n <div className='d-flex align-items-center'>\n <SvgContainer\n svgName={cvSvgLibrary.Archive}\n size={SvgContainerSize.Standard}\n className='me-2 svg-container'\n />\n \n <div className='w-100'>\n <p className='fw-semibold mb-0'>{getPhrase('archivedInfoTitle')}</p>\n <p className='mb-1'>{getPhrase('archivedInfo')}</p>\n </div>\n </div>\n )}\n {props.isPreviewPreventScrubbingEnabled && (\n <Tooltip\n title={getPhrase('previewPreventScrubbingExplain')}\n trigger='hover'\n spanHack\n >\n <div className='d-flex mt-1 mt-lg-0'>\n <div className='me-2'><Text phrase='previewPreventScrubbing'/></div>\n <ToggleSwitch on={props.isPreviewingPreventScrubbing} onClick={props.toggleStudentMode} />\n </div>\n </Tooltip>\n )}\n </div>\n );\n}","import * as React from 'react';\nimport { createHtmlPortalNode, OutPortal } from 'react-reverse-portal';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { Actions as ActionsComponent } from 'libs/shared/components/actions/Actions';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { RestrictionPadlock } from 'libs/shared/components/video-list/components/restriction-padlock/RestrictionPadlock';\nimport { FixedWidget } from 'libs/shared/components/widgets/fixed-widget';\nimport { InteractiveWidgetItem, InteractiveWidgetItemProps } from 'libs/shared/components/widgets/items/interactive-widget-item/InteractiveWidgetItem';\nimport { GlobalPlayerConsumer } from 'libs/shared/context/player-context/components/GlobalPlayerConsumer';\nimport { usePlayerContext } from 'libs/shared/context/player-context/PlayerContext';\nimport { CurationStatus } from 'libs/shared/enums/CurationStatus';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { Clip, Config, CurrentUser, Interactive, InteractiveMetadata, PresentationAudience, Video, YearGroup } from 'libs/shared/interfaces';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { RestrictionBanner } from 'shared/components/play-page/RestrictionBanner';\nimport { RelatedVideos } from 'shared/components/related-videos/RelatedVideos';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { InteractiveAlertBanner } from 'apps/interactives/components/preview-interactive/InteractiveAlertBanner';\nimport { usePreviewPreventInteractive } from 'apps/interactives/hooks/interactiveHooks';\n\nconst namespace = 'interactives.previewInteractive';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nfunction getSourceVideo(interactive: InteractiveMetadata): Clip | Video {\n return interactive._parentClip || interactive._parentVideo;\n}\n\ninterface PreviewInteractiveProps {\n interactive: InteractiveMetadata;\n yearGroups: YearGroup[];\n config: Config;\n currentUser: CurrentUser;\n queryParams: PlayViewQueryParams;\n audiences: PresentationAudience[];\n isPreviewPreventScrubbingEnabled: boolean;\n relatedVideos: RelatedVideosHash;\n canManageVideoAccess: boolean;\n\n // Share view only\n shareId?: string;\n}\n\nexport function PreviewInteractive(props: PreviewInteractiveProps): JSX.Element {\n const locationContext = props.shareId ? LocationContext.PreviewSharedInteractive : LocationContext.PreviewInteractive;\n\n const playerContext = usePlayerContext();\n\n const [ isPreviewingPreventScrubbing, setIsPreviewingPreventScrubbing ] = React.useState(false);\n\n const { canConsume } = VideoHelper.getCanBeConsumed(props.interactive);\n\n const questionListPortalNode = React.useMemo(() => createHtmlPortalNode(), []);\n \n const videoActions = useVideoActions({\n location: VideoActionsLocation.PlayPage,\n shareId: props.shareId\n });\n\n const { setFavourite, canFavourite } = useLiteFavourites(locationContext);\n\n usePreviewPreventInteractive(isPreviewingPreventScrubbing, togglePreviewPreventScrubbing);\n\n function togglePreviewPreventScrubbing() {\n playerContext.playerRef?.current?.togglePreviewPreventScrubbing?.();\n }\n\n function toggleStudentMode() {\n setIsPreviewingPreventScrubbing(!isPreviewingPreventScrubbing);\n }\n\n const sourceVideo = getSourceVideo(props.interactive);\n\n let otherInteractives: InteractiveMetadata[];\n let backToName: string;\n let backAppLink: Core.AppLink;\n\n if (VideoHelper.isClip(sourceVideo)) {\n otherInteractives = sourceVideo.interactives?.data?.filter(i => {\n return i.id.toString() !== props.interactive.id.toString();\n });\n backToName = sourceVideo.name;\n backAppLink = {\n application: AppChannels.CLIPS,\n action: Actions.Clips.PLAY_CLIP,\n args: [ sourceVideo.id, TextHelper.slugify(sourceVideo.name) ]\n };\n } else {\n otherInteractives = sourceVideo.interactives?.data?.filter(i => {\n return i.id.toString() !== props.interactive.id.toString();\n });\n backToName = sourceVideo.name;\n backAppLink = {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [ sourceVideo.id, TextHelper.slugify(sourceVideo.name) ]\n };\n }\n\n const isDraft = props.interactive.status === CurationStatus.Draft;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <div className='px-4'>\n\n <RestrictionBanner\n restrictions={props.interactive._restrictions}\n yearGroups={props.yearGroups}\n objectId={props.interactive.id}\n objectTypeId={MasterType.Interactive}\n canManageVideoAccess={props.canManageVideoAccess}\n />\n\n <InteractiveAlertBanner\n isPreviewPreventScrubbingEnabled={props.isPreviewPreventScrubbingEnabled}\n isPreviewingPreventScrubbing={isPreviewingPreventScrubbing}\n toggleStudentMode={toggleStudentMode}\n isArchived={VideoHelper.isVideoTypeArchived(props.interactive)}\n />\n\n <div className='mb-3'>\n {canConsume &&\n <GlobalPlayerConsumer\n key={props.interactive.id}\n objectId={props.interactive.id}\n objectTypeId={props.interactive.typeId}\n shareId={props.shareId}\n startTime={props.queryParams.t ?? props.queryParams.startTime}\n mode='default'\n location='play-page'\n />\n }\n </div>\n <div className='d-flex justify-content-between align-items-center'>\n <div className='inline-block w-100'>\n <div className='ms-2 float-end'>\n <ActionsComponent\n actions={videoActions.getVideoActions(props.interactive)}\n actionsDropdownClassName='btn btn-outline-dark'\n fetchMore={() => videoActions.fetchMoreActions(props.interactive)}\n />\n </div>\n\n <h1 className='h3 mb-2'>\n {isDraft && (\n <div className={`badge draft-badge me-2 align-bottom flex-shrink-0 h-auto lh-base`}>\n <Text phrase='draft' />\n </div>\n )}\n {props.interactive.name}\n <RestrictionPadlock\n tooltipPlacement='right'\n className='ps-1'\n video={props.interactive}\n yearGroups={props.yearGroups}\n />\n </h1>\n {VideoHelper.canViewOriginalVideo(props.interactive) &&\n <div className='mb-1 me-3 clamp-1'>\n <Text phrase='viewOriginal' /> <AppLink appLink={backAppLink} className='text-info'>{backToName}</AppLink>\n </div>\n }\n </div>\n </div>\n\n {props.interactive.description &&\n <p>{props.interactive.description}</p>\n }\n\n <div className='mb-3'>\n <OutPortal node={questionListPortalNode}></OutPortal>\n </div>\n\n {!!otherInteractives?.length && (\n <div className='pb-3'>\n <FixedWidget<InteractiveWidgetItemProps>\n name={getPhrase('otherInteractives', { count: otherInteractives.length })}\n contents={WidgetContents.Interactives}\n collection={otherInteractives}\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: sourceVideo,\n questionsAppLink: {\n application: AppChannels.INTERACTIVES,\n action: Actions.Interactives.PREVIEW_QUESTIONS\n },\n imageCdnUrl: props.config.imageCdnUrl\n }}\n analyticsData={{ widgetId: 'interactives' }}\n />\n </div>\n )}\n\n <RelatedVideos\n currentVideo={props.interactive}\n yearGroups={props.yearGroups}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n currentUser={props.currentUser}\n audiences={props.audiences}\n relatedVideos={props.relatedVideos}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv\n })}\n moviesAndTv={props.queryParams.mtv}\n />\n </div>\n </LanguageNamespaceContext.Provider>\n );\n}","import React from 'react';\n\nexport function usePreviewPreventInteractive(\n previewPreventInteractive: boolean,\n togglePreviewPreventInteractive: () => void\n): void {\n React.useEffect(() => {\n togglePreviewPreventInteractive();\n }, [previewPreventInteractive]);\n}","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation } = usePresentation({ redirectOnError: true });\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!activePresentation &&\n AudienceRequests.presentationAudiences(activePresentation.id)\n );\n\n return audiences;\n};","import { Flight } from 'libs/common/flight';\n\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useProducts } from 'libs/shared/hooks/UseProducts';\nimport { CurrentUser } from 'libs/shared/interfaces';\n\nexport function useShouldPreviewInteractive() {\n const { hasPermissions } = usePermissions();\n const { hasProduct } = useProducts();\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n return !hasPermissions(PermissionName.StudentExperience) &&\n hasProduct(ProductId.Primary) &&\n currentUser.data.isAuthenticated;\n}","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Row = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');\n const breakpoints = useBootstrapBreakpoints();\n const minBreakpoint = useBootstrapMinBreakpoint();\n const sizePrefix = `${decoratedBsPrefix}-cols`;\n const classes = [];\n breakpoints.forEach(brkPoint => {\n const propValue = props[brkPoint];\n delete props[brkPoint];\n let cols;\n if (propValue != null && typeof propValue === 'object') {\n ({\n cols\n } = propValue);\n } else {\n cols = propValue;\n }\n const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';\n if (cols != null) classes.push(`${sizePrefix}${infix}-${cols}`);\n });\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n ...props,\n className: classNames(className, decoratedBsPrefix, ...classes)\n });\n});\nRow.displayName = 'Row';\nexport default Row;"],"names":["defaultErrors","notFound","forbidden","rating","yearLevel","region","privacy","badRequest","handleHttpError","info","customErrorMap","ignoreMap","statusCode","status","errorMap","generateCacheKey","flightObjs","map","obj","join","useHandleObjectError","_flightObjs","customErrors","ignoreErrors","Array","isArray","useEffect","forEach","PlayInteractive","props","locationContext","shareLink","showHeading","setShowHeading","isArchived","interactive","summaryPortalNode","u","setFavourite","canFavourite","hasPermissions","className","typeId","hasStudentExperience","config","video","currentUser","viewKey","startTime","onShowSummary","showing","name","tooltipPlacement","yearGroups","node","currentVideo","relatedVideos","audiences","getVideoAppLink","v","opts","context","queryParams","contextId","playNext","shareId","id","moviesAndTv","mtv","getPhrase","LanguageService","InteractiveAlertBanner","role","SvgContainer","svgName","size","S","Text","phrase","isPreviewPreventScrubbingEnabled","Tooltip","title","trigger","spanHack","ToggleSwitch","on","isPreviewingPreventScrubbing","onClick","toggleStudentMode","PreviewInteractive","previewPreventInteractive","togglePreviewPreventInteractive","playerContext","setIsPreviewingPreventScrubbing","canConsume","VideoHelper","questionListPortalNode","videoActions","useVideoActions","location","useLiteFavourites","playerRef","current","togglePreviewPreventScrubbing","otherInteractives","backToName","backAppLink","sourceVideo","_parentClip","_parentVideo","interactives","data","filter","i","toString","application","action","args","TextHelper","isDraft","CurationStatus","value","RestrictionBanner","restrictions","_restrictions","objectId","objectTypeId","MasterType","canManageVideoAccess","GlobalPlayerConsumer","key","t","mode","Actions","actions","getVideoActions","actionsDropdownClassName","fetchMore","fetchMoreActions","RestrictionPadlock","AppLink","appLink","description","length","count","contents","WidgetContents","collection","prefetched","getChildAppLink","childComponent","InteractiveWidgetItem","extraChildComponentProps","questionsAppLink","imageCdnUrl","analyticsData","widgetId","RelatedVideos","VideoAppLinkHelper","usePresentationAudiences","activePresentation","redirectOnError","useShouldPreviewInteractive","hasProduct","isAuthenticated","Row","bsPrefix","as","Component","ref","decoratedBsPrefix","breakpoints","minBreakpoint","sizePrefix","classes","brkPoint","propValue","cols","infix","push","displayName"],"sourceRoot":""}
|