@clickview/lite 0.74.0-rc.1 → 0.74.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/css/{3816-lite-f459e281d1.chunk.css → 7577-lite-efcdc36bde.chunk.css} +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{2126-4a3a267af7-lite.chunk.js → 2126-d77b244321-lite.chunk.js} +2 -2
- package/dist/scripts/{2126-4a3a267af7-lite.chunk.js.map → 2126-d77b244321-lite.chunk.js.map} +1 -1
- package/dist/scripts/2258-6851fce9d7-lite.chunk.js +3 -0
- package/dist/scripts/2258-6851fce9d7-lite.chunk.js.map +1 -0
- package/dist/scripts/{2541-9104968024-lite.chunk.js → 2541-d2d0da16cf-lite.chunk.js} +1 -1
- package/dist/scripts/{2541-9104968024-lite.chunk.js.map → 2541-d2d0da16cf-lite.chunk.js.map} +1 -1
- package/dist/scripts/3677-aadf9fd2cc-lite.chunk.js +2 -0
- package/dist/scripts/3677-aadf9fd2cc-lite.chunk.js.map +1 -0
- package/dist/scripts/3978-0e2106b5aa-lite.chunk.js +2 -0
- package/dist/scripts/3978-0e2106b5aa-lite.chunk.js.map +1 -0
- package/dist/scripts/4400-7381394a2e-lite.chunk.js +2 -0
- package/dist/scripts/4400-7381394a2e-lite.chunk.js.map +1 -0
- package/dist/scripts/5135-9fa172bfc3-lite.chunk.js +2 -0
- package/dist/scripts/5135-9fa172bfc3-lite.chunk.js.map +1 -0
- package/dist/scripts/{5434-671d92b4e3-lite.chunk.js → 5434-20de24cb39-lite.chunk.js} +1 -1
- package/dist/scripts/{5434-671d92b4e3-lite.chunk.js.map → 5434-20de24cb39-lite.chunk.js.map} +1 -1
- package/dist/scripts/{5780-eb7c4d1db7-lite.chunk.js → 5780-3ee0f5d974-lite.chunk.js} +2 -2
- package/dist/scripts/5780-3ee0f5d974-lite.chunk.js.map +1 -0
- package/dist/scripts/5870-057fef9e27-lite.chunk.js +3 -0
- package/dist/scripts/5870-057fef9e27-lite.chunk.js.map +1 -0
- package/dist/scripts/618-33ead82bb3-lite.chunk.js +2 -0
- package/dist/scripts/618-33ead82bb3-lite.chunk.js.map +1 -0
- package/dist/scripts/{6282-62e8305b89-lite.chunk.js → 6282-2e7901a54a-lite.chunk.js} +1 -1
- package/dist/scripts/{6282-62e8305b89-lite.chunk.js.map → 6282-2e7901a54a-lite.chunk.js.map} +1 -1
- package/dist/scripts/6379-1fac9e5c3c-lite.chunk.js +2 -0
- package/dist/scripts/6379-1fac9e5c3c-lite.chunk.js.map +1 -0
- package/dist/scripts/647-cf8ade72c6-lite.chunk.js +2 -0
- package/dist/scripts/647-cf8ade72c6-lite.chunk.js.map +1 -0
- package/dist/scripts/{6741-969accd2bc-lite.chunk.js → 6741-9ccafc6ff5-lite.chunk.js} +3 -3
- package/dist/scripts/{6741-969accd2bc-lite.chunk.js.map → 6741-9ccafc6ff5-lite.chunk.js.map} +1 -1
- package/dist/scripts/{690-aeaed228cb-lite.chunk.js → 690-e3a972ec48-lite.chunk.js} +1 -1
- package/dist/scripts/{690-aeaed228cb-lite.chunk.js.map → 690-e3a972ec48-lite.chunk.js.map} +1 -1
- package/dist/scripts/6909-0cc76e0fcc-lite.chunk.js +2 -0
- package/dist/scripts/6909-0cc76e0fcc-lite.chunk.js.map +1 -0
- package/dist/scripts/{6948-3eab72b8e2-lite.chunk.js → 6948-9121ca4b39-lite.chunk.js} +3 -3
- package/dist/scripts/{6948-3eab72b8e2-lite.chunk.js.map → 6948-9121ca4b39-lite.chunk.js.map} +1 -1
- package/dist/scripts/7234-4fdc8f5ae3-lite.chunk.js +2 -0
- package/dist/scripts/7234-4fdc8f5ae3-lite.chunk.js.map +1 -0
- package/dist/scripts/7577-a930db95e5-lite.chunk.js +2 -0
- package/dist/scripts/7577-a930db95e5-lite.chunk.js.map +1 -0
- package/dist/scripts/7742-8a303defe5-lite.chunk.js +2 -0
- package/dist/scripts/7742-8a303defe5-lite.chunk.js.map +1 -0
- package/dist/scripts/{8-f1d9aa4678-lite.chunk.js → 8-9f5e438ed9-lite.chunk.js} +2 -2
- package/dist/scripts/{8-f1d9aa4678-lite.chunk.js.map → 8-9f5e438ed9-lite.chunk.js.map} +1 -1
- package/dist/scripts/{8280-2e8afc8fa9-lite.chunk.js → 8280-6d9466991b-lite.chunk.js} +1 -1
- package/dist/scripts/{8280-2e8afc8fa9-lite.chunk.js.map → 8280-6d9466991b-lite.chunk.js.map} +1 -1
- package/dist/scripts/8451-9ab30b6e35-lite.chunk.js +2 -0
- package/dist/scripts/8451-9ab30b6e35-lite.chunk.js.map +1 -0
- package/dist/scripts/9241-c523dc7aac-lite.chunk.js +2 -0
- package/dist/scripts/9241-c523dc7aac-lite.chunk.js.map +1 -0
- package/dist/scripts/9345-df0cbb196f-lite.chunk.js +3 -0
- package/dist/scripts/9345-df0cbb196f-lite.chunk.js.map +1 -0
- package/dist/scripts/9630-6bcd453382-lite.chunk.js +2 -0
- package/dist/scripts/9630-6bcd453382-lite.chunk.js.map +1 -0
- package/dist/scripts/{9649-29507ab972-lite.chunk.js → 9649-fc995e7732-lite.chunk.js} +1 -1
- package/dist/scripts/{9649-29507ab972-lite.chunk.js.map → 9649-fc995e7732-lite.chunk.js.map} +1 -1
- package/dist/scripts/9767-a23d603cc5-lite.chunk.js +2 -0
- package/dist/scripts/9767-a23d603cc5-lite.chunk.js.map +1 -0
- package/dist/scripts/{9963-f2ce3a321f-lite.chunk.js → 9963-8c527743bb-lite.chunk.js} +1 -1
- package/dist/scripts/{9963-f2ce3a321f-lite.chunk.js.map → 9963-8c527743bb-lite.chunk.js.map} +1 -1
- package/dist/scripts/{bundle-5b65703152.min.js → bundle-6a0c1aecd5.min.js} +3 -3
- package/dist/scripts/{bundle-5b65703152.min.js.map → bundle-6a0c1aecd5.min.js.map} +1 -1
- package/package.json +1 -1
- package/dist/scripts/1362-56810ef4c8-lite.chunk.js +0 -3
- package/dist/scripts/1362-56810ef4c8-lite.chunk.js.map +0 -1
- package/dist/scripts/3677-4904f30c6a-lite.chunk.js +0 -2
- package/dist/scripts/3677-4904f30c6a-lite.chunk.js.map +0 -1
- package/dist/scripts/3816-15829f9da8-lite.chunk.js +0 -2
- package/dist/scripts/3816-15829f9da8-lite.chunk.js.map +0 -1
- package/dist/scripts/3978-a551dd2648-lite.chunk.js +0 -2
- package/dist/scripts/3978-a551dd2648-lite.chunk.js.map +0 -1
- package/dist/scripts/4400-755a158a52-lite.chunk.js +0 -2
- package/dist/scripts/4400-755a158a52-lite.chunk.js.map +0 -1
- package/dist/scripts/5135-166ec46620-lite.chunk.js +0 -2
- package/dist/scripts/5135-166ec46620-lite.chunk.js.map +0 -1
- package/dist/scripts/5780-eb7c4d1db7-lite.chunk.js.map +0 -1
- package/dist/scripts/5870-eae3bb745c-lite.chunk.js +0 -3
- package/dist/scripts/5870-eae3bb745c-lite.chunk.js.map +0 -1
- package/dist/scripts/618-996d8b560b-lite.chunk.js +0 -2
- package/dist/scripts/618-996d8b560b-lite.chunk.js.map +0 -1
- package/dist/scripts/6379-3414d6c295-lite.chunk.js +0 -2
- package/dist/scripts/6379-3414d6c295-lite.chunk.js.map +0 -1
- package/dist/scripts/647-6a592af19b-lite.chunk.js +0 -2
- package/dist/scripts/647-6a592af19b-lite.chunk.js.map +0 -1
- package/dist/scripts/6909-6805b6a0d9-lite.chunk.js +0 -2
- package/dist/scripts/6909-6805b6a0d9-lite.chunk.js.map +0 -1
- package/dist/scripts/7234-bcddfe2112-lite.chunk.js +0 -2
- package/dist/scripts/7234-bcddfe2112-lite.chunk.js.map +0 -1
- package/dist/scripts/7742-9e79cc452b-lite.chunk.js +0 -2
- package/dist/scripts/7742-9e79cc452b-lite.chunk.js.map +0 -1
- package/dist/scripts/8451-0103210a8f-lite.chunk.js +0 -2
- package/dist/scripts/8451-0103210a8f-lite.chunk.js.map +0 -1
- package/dist/scripts/9241-2386134dd3-lite.chunk.js +0 -2
- package/dist/scripts/9241-2386134dd3-lite.chunk.js.map +0 -1
- package/dist/scripts/9345-0a7f58bb53-lite.chunk.js +0 -3
- package/dist/scripts/9345-0a7f58bb53-lite.chunk.js.map +0 -1
- package/dist/scripts/9630-ca2a850260-lite.chunk.js +0 -2
- package/dist/scripts/9630-ca2a850260-lite.chunk.js.map +0 -1
- package/dist/scripts/9767-1b583ceb6c-lite.chunk.js +0 -2
- package/dist/scripts/9767-1b583ceb6c-lite.chunk.js.map +0 -1
- /package/dist/css/{1362-lite-7aa2f8a851.chunk.css → 2258-lite-7aa2f8a851.chunk.css} +0 -0
- /package/dist/scripts/{1362-56810ef4c8-lite.chunk.js.LICENSE.txt → 2258-6851fce9d7-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5870-eae3bb745c-lite.chunk.js.LICENSE.txt → 5870-057fef9e27-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6741-969accd2bc-lite.chunk.js.LICENSE.txt → 6741-9ccafc6ff5-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6948-3eab72b8e2-lite.chunk.js.LICENSE.txt → 6948-9121ca4b39-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9345-0a7f58bb53-lite.chunk.js.LICENSE.txt → 9345-df0cbb196f-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-5b65703152.min.js.LICENSE.txt → bundle-6a0c1aecd5.min.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts/8451-9ab30b6e35-lite.chunk.js","mappings":"g2DAOMA,EAAa,GAiBb,SAAUC,EACdC,EACAC,GAEA,IAEMC,EAFS,UAA0BF,EAASF,GAE1BK,KAAI,SAAAC,GAAK,OAAIH,EAAW,SAAiBG,GAAO,IAElEC,EAAY,qBAA6BH,GAEzCI,EAAW,YAAoBD,EAAUE,MACzCC,EAAQH,EAAUE,KAAKE,OACzBH,EAASI,QAAO,SAACC,EAAKC,GAAI,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T,SAAsBvL,GACpB,OAAOW,EAAWkK,EAAgB7K,GAAOL,KAAI,SAAAyL,GAAC,OAAIA,EAAE/K,EAAE,IACxD,EAKF,C","sources":["file:///app/packages/libs/shared/src/hooks/UseBatchFetch.ts","file:///app/packages/libs/shared/src/hooks/useBreadcrumbs.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/views/classification-update/partial-loading/partial-classification-update.scss","file:///app/packages/projects/lite/src/apps/content-updates/views/classification-update/partial-loading/PartialClassificationUpdate.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/classification-update/ClassificationUpdateViewCallbacks.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/classification-update/ClassificationUpdateView.tsx","file:///app/packages/projects/lite/src/shared/hooks/useCommonVideoProps.ts","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts","file:///app/packages/projects/lite/src/shared/hooks/useVideoMixin.ts"],"sourcesContent":["import React from 'react';\n\nimport { Flight } from 'libs/common/flight';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { BaseObject } from 'libs/shared/interfaces';\n\nconst CHUNK_SIZE = 50;\n\nexport interface UseBatchFetchResult<T extends BaseObject> {\n itemsArr: T[];\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 chunks = ArrayHelper.chunk<string>(itemIds, CHUNK_SIZE);\n\n const requests = chunks.map(chunk => getRequest(ArrayHelper.uniq(chunk)));\n\n const responses = Flight.useBasicFetchAll<T[]>(requests);\n\n const itemsArr = ArrayHelper.flatten(responses.data);\n const items = responses.data.length\n ? itemsArr.reduce((acc, item) => ({ ...acc, [item.id]: item }), {})\n : null;\n\n return {\n itemsArr,\n items,\n isFetching: responses.isFetching\n };\n}\n\n/**\n * When you need the useBatchFetch() behavior, but your list of objects to hydrate\n * will grow, such as on a scrolling page. useGrowingBatchFetch() will use local state\n * to determine what we've already built a request for and what items are new\n * as to not re-fetch items - Sha\n */\nexport function useGrowingBatchFetch<T>(\n objs: T[],\n getRequest: (items: T[]) => Flight.Request,\n _getKey?: (obj: T) => string\n) {\n const { fetchItems, ...data } = useGrowingBatchFetchFunc({ getRequest, _getKey });\n\n React.useEffect(() => {\n if (!objs.length)\n return;\n\n fetchItems(objs);\n }, [objs?.length]);\n\n return data;\n}\n\ninterface UseGrowingBatchFetchFuncOptions<T> {\n getRequest: (items: T[]) => Flight.Request;\n _getKey?: (obj: T) => string;\n}\n\n/**\n * When you need the useGrowingBatchFetch() behaviour, but need to trigger the\n * fetch manually and update the objects - Nish \n */\nexport function useGrowingBatchFetchFunc<T>(options: UseGrowingBatchFetchFuncOptions<T>) {\n const getKey = options._getKey ?? ((obj: any) => {\n if (typeof obj === 'object')\n return obj.id;\n\n return obj;\n });\n\n const fetchedItems = React.useRef<Set<string>>(new Set<string>());\n const [ requests, setRequests ] = React.useState<Flight.Request[]>([]);\n\n function fetchItems(objs: T[]) {\n if (!objs?.length)\n return;\n\n const unfetchedItems: T[] = [];\n \n objs.forEach(obj => {\n const key = getKey(obj);\n\n if (fetchedItems.current.has(key))\n return;\n\n unfetchedItems.push(obj);\n fetchedItems.current.add(key);\n });\n \n if (!unfetchedItems.length)\n return;\n \n setRequests(r => ([ ...r, ...ArrayHelper.chunk<T>(unfetchedItems, CHUNK_SIZE).map(options.getRequest) ]));\n }\n\n const responses = Flight.useBasicFetchAll<T[]>(requests);\n const itemsArr = ArrayHelper.flatten(responses.data);\n const items = responses.data.length\n ? itemsArr.reduce((acc, item) => ({ ...acc, [getKey(item)]: item }), {})\n : null;\n\n return {\n hasFirstRequestCompleted: !!responses.responses?.[0]?.hasCompleted,\n itemsArr,\n items,\n isFetching: responses.isFetching,\n fetchItems\n };\n}","import React from 'react';\n\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { BreadcrumbService } from 'libs/shared/services/BreadcrumbService';\n\nexport function useBreadcrumbs(current: Breadcrumb): Breadcrumb[] {\n const [ match, useBuilder ] = React.useMemo(() => BreadcrumbService.getBuilder(), []);\n\n const breadcrumbs = useBuilder(match);\n\n if (!breadcrumbs || !current)\n return breadcrumbs;\n\n return [ ...breadcrumbs, { ...current, active: true }];\n}\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.BellFilled : 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 ? 'following' : 'follow'} />\n }\n </IconButton>\n )}\n </div>\n );\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"partialBanner\":\"DKukI\"};","import React from 'react';\n\nimport { PartialBreadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { PartialVideoList } from 'libs/shared/components/video-list/partial-loading/PartialVideoList';\n\nimport styles from './partial-classification-update.scss';\n\nexport function PartialClassificationUpdate(): JSX.Element {\n return (\n <div className='bg-white px-3'>\n <div className={`partial-loading-background mb-2 ${styles.partialBanner} rounded`} />\n\n <div className='mb-1'>\n <PartialBreadcrumbs />\n </div>\n\n <PartialVideoList />\n </div>\n );\n}","\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, ToggleDescriptor, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { PreferenceRequests } from 'libs/shared/flight-requests/PreferenceRequests';\nimport { Alerts } from 'libs/shared/hooks/UseAlerts';\nimport { CurrentUser } from 'libs/shared/interfaces';\n\nconst namespace = 'contentUpdates.classificationUpdate';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface ClassificationViewCallbackManager {\n dispatch: React.Dispatch<Flight.RequestAction>;\n alerts: Alerts;\n setShowFollowSpinner: React.Dispatch<React.SetStateAction<boolean>>;\n currentUser: CurrentUser;\n}\n\nexport function getClassificationCallbacks(\n options: ClassificationViewCallbackManager\n) {\n const { dispatch, alerts, setShowFollowSpinner } = options;\n\n function onFollow(classificationId: string, classificationName: string, follow: boolean): void {\n setShowFollowSpinner(true);\n\n const onSuccess = () => {\n setShowFollowSpinner(false);\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(follow ? 'followed' : 'unfollowed', { name: classificationName, escapeText: true }));\n };\n\n const onError = () => {\n setShowFollowSpinner(false);\n alerts.error(LanguageService.getPhrase(namespace, '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 return {\n onFollow\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 { LocationContext } from 'libs/analytics/interfaces';\n\nimport { ContentUpdateRequests } from 'libs/shared/apps/content-updates/flight-requests/ContentUpdateRequests';\nimport { ClassificationVideosGrouping, ContentUpdateAppLinks } from 'libs/shared/apps/content-updates/interfaces';\nimport { Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { PreferenceRequests } from 'libs/shared/flight-requests/PreferenceRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useBreadcrumbs } from 'libs/shared/hooks/useBreadcrumbs';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Classification, CurrentUser } from 'libs/shared/interfaces';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { SeoHelper } from 'shared/utils/SeoHelper';\n\nimport { ClassificationBanner } from 'apps/content-updates/components';\n\nimport { PartialClassificationUpdate } from './partial-loading/PartialClassificationUpdate';\nimport { getClassificationCallbacks } from './ClassificationUpdateViewCallbacks';\n\nconst namespace = 'contentUpdates.classificationUpdate';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface ClassificationUpdateViewProps {\n classificationId: string;\n appLinks: ContentUpdateAppLinks;\n presentationSlug?: string;\n}\n\nexport function ClassificationUpdateView(props: ClassificationUpdateViewProps): JSX.Element {\n const { classificationId } = props;\n\n const dispatch = useDispatch();\n const alerts = useAlerts();\n \n const { commonVideoProps } = useCommonVideoProps({ locationContext: LocationContext.VideoThumbnail });\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const [ showFollowSpinner, setShowFollowSpinner ] = React.useState(false);\n\n const callbacks = getClassificationCallbacks({\n dispatch,\n alerts,\n setShowFollowSpinner,\n currentUser: currentUser?.data\n });\n\n const date = new Date();\n // Retrieve the past 1 year from today\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 { hasPermissions } = usePermissions();\n const canFollowSubjects = hasPermissions(PermissionName.FollowSubjects);\n\n const classification = Flight.useBasicFetch<Classification>(\n ContentUpdateRequests.getClassification(classificationId)\n );\n\n const contentUpdates = Flight.useBasicFetch<ClassificationVideosGrouping>(currentUser.data &&\n ContentUpdateRequests.getClassificationUpdates(classificationId, from, to));\n\n const subjectPreferences = Flight.useBasicFetch<Classification[]>(canFollowSubjects &&\n PreferenceRequests.mySubjectPreferences());\n\n const audiences = usePresentationAudiences();\n\n const breadcrumbs = useBreadcrumbs({ name: classification.data?.name });\n\n useSetPageMetadata(PageMetadataHelper.getDefaultMetadata({\n title: classification.data?.name,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink({\n customAppLink: props.appLinks?.getClassificationUpdateAppLink(classification.data)\n }),\n allowIndexing: SeoHelper.allowIndexing()\n }));\n\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n\n useVideoMixin(contentUpdates.data?.videos ?? []);\n\n const hasLoadedPreferences = subjectPreferences.hasCompleted || !canFollowSubjects;\n\n const dataLoaded = (\n contentUpdates.data && classification.data &&\n hasLoadedPreferences && currentUser.data\n );\n\n if (!dataLoaded)\n return <PartialClassificationUpdate />;\n\n const preferredSubjectIds = subjectPreferences.data?.map(subject => subject.id) ?? [];\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <div className='bg-white px-3'>\n <ClassificationBanner\n classification={classification.data}\n backgroundUrl={classification.data.banner?.url ?? ''}\n getClassificationAppLink={props.appLinks.getClassificationAppLink}\n followed={!!preferredSubjectIds.find(id => id.toString() === classification.data.id.toString())}\n follow={callbacks.onFollow}\n showFollowSpinner={showFollowSpinner}\n canFollow={canFollowSubjects}\n />\n <Breadcrumbs breadcrumbs={breadcrumbs} />\n\n\n <VideoList\n videos={contentUpdates.data.videos}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n hasPermissions={hasPermissions}\n presentationAudiences={audiences.data}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n commonVideoProps={commonVideoProps}\n />\n </div>\n </VideoActionsContext.Provider>\n );\n}","import { Core } from 'libs/common/backbone/index';\nimport { Flight } from 'libs/common/react/index';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Config, CurrentUser, VideoTypes, YearGroup } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\n\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\n\nimport { usePluginHelper } from './use-plugin-helper/usePluginHelper';\nimport { useLiteFavourites } from './useLiteFavourites';\n\ninterface UseCommonVideoPropsResult {\n hasCommonVideoPropsCompleted: boolean;\n commonVideoProps: CommonVideoProps;\n}\n\ninterface UseCommonVideoPropsOptions {\n locationContext: LocationContext,\n mtv?: boolean;\n flightNamespace?: string;\n sharedPlaylist?: boolean;\n}\n\nexport function useCommonVideoProps(options: UseCommonVideoPropsOptions): UseCommonVideoPropsResult {\n const { locationContext, mtv, flightNamespace, sharedPlaylist } = options || {};\n\n const { isPlugin, params } = usePluginHelper();\n const { setFavourite, canFavourite } = useLiteFavourites(locationContext, flightNamespace);\n const { hasTopicDirectories, isLoadingSettings } = useSettings(null);\n const { hasPermissions, isLoaded: hasLoadedPermissions } = usePermissions();\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\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 function getSubTextAppLink(video: VideoTypes): Core.AppLink {\n if (!('series' in video))\n return null;\n\n /**\n * We do not allow navigating to series on shared playlists when the user is not signed in\n * because most series are customer created and will be empty for public users\n * \n * We do not have to do this for shared series, because all the series links are self referencing\n * - Sha\n */\n if (sharedPlaylist && !currentUser.data?.isAuthenticated)\n return null;\n \n return SeriesAppLinkHelper.getSeriesAppLink(video.series, { mtv });\n }\n\n const hasCommonVideoPropsCompleted = (\n !isLoadingSettings &&\n hasLoadedPermissions &&\n config.hasCompleted &&\n currentUser.hasCompleted &&\n (!currentUser.data?.isAuthenticated || yearGroups.hasCompleted)\n );\n\n return {\n hasCommonVideoPropsCompleted,\n commonVideoProps: {\n subTextType: 'series',\n getSubTextAppLink,\n isPlugin,\n isPluginPopup: !!params?.popup,\n canFavourite,\n setFavourite,\n imageCdnUrl: config.data?.imageCdnUrl,\n yearGroups: yearGroups.data,\n getClassroomGuideAppLink: VideoAppLinkHelper.getClassroomGuideAppLink,\n getInteractiveGuidanceAppLink: VideoAppLinkHelper.getInteractiveGuidanceAppLink,\n getResourceGuidanceAppLink: VideoAppLinkHelper.getResourceGuidanceAppLink,\n showNewVideoIndicator: hasTopicDirectories,\n companyLogoFallbackUrl: null,\n hasStudentExperience\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, getFallbackPresentation } = usePresentation({ redirectOnError: true });\n\n const presentation = activePresentation || getFallbackPresentation();\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!presentation &&\n AudienceRequests.presentationAudiences(presentation.id)\n );\n\n return audiences;\n};","import { Flight } from 'libs/common/react/index';\n\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useGrowingBatchFetch, useGrowingBatchFetchFunc } from 'libs/shared/hooks/UseBatchFetch';\nimport { Clip, ClipCollection, Video, VideoCollection } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ntype Types = Video[] | VideoCollection | Clip[] | ClipCollection;\n\nfunction getValidObjects(objects: Types): (Video | Clip)[] {\n if (!objects)\n return [];\n\n if (Array.isArray(objects))\n return objects.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n if ('data' in objects)\n return objects.data.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n return [];\n}\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(objects: Types, options: VideoMixinOptions = {}) {\n const videoIds = getValidObjects(objects).map(v => v.id);\n\n useGrowingBatchFetch(\n videoIds,\n ids => VideoRequests.videoMixinAssocs(ids, options.flightNamespace),\n null\n );\n}\n\nexport function useVideoMixinFunc(options: VideoMixinOptions = {}) {\n function getRequest(ids: string[]): Flight.Request {\n return VideoRequests.videoMixinAssocs(ids, options.flightNamespace);\n }\n \n function fetchObjects(items: Types) {\n return fetchItems(getValidObjects(items).map(v => v.id));\n }\n\n const { fetchItems } = useGrowingBatchFetchFunc({ getRequest });\n\n return { fetchObjects };\n}"],"names":["CHUNK_SIZE","useBatchFetch","itemIds","getRequest","requests","map","chunk","responses","itemsArr","data","items","length","reduce","acc","item","id","isFetching","useGrowingBatchFetch","objs","_getKey","useGrowingBatchFetchFunc","fetchItems","options","getKey","obj","fetchedItems","Set","setRequests","hasFirstRequestCompleted","hasCompleted","unfetchedItems","forEach","key","current","has","push","add","r","useBreadcrumbs","match","breadcrumbs","useBuilder","active","ClassificationBanner","props","classification","backgroundUrl","followed","follow","showFollowSpinner","activeAudiences","SharedViewModelKeys","undefined","storage","className","style","backgroundImage","appLink","getClassificationAppLink","name","canFollow","IconButton","svgName","onClick","Spinner","as","animation","role","size","namespace","phrase","PartialClassificationUpdate","PartialVideoList","getPhrase","LanguageService","ClassificationUpdateView","classificationId","dispatch","alerts","commonVideoProps","useCommonVideoProps","locationContext","currentUser","UserRequests","callbacks","setShowFollowSpinner","onFollow","classificationName","onSuccess","AnalyticsHelper","location","workflowPhase","descriptor","actionType","entity","success","escapeText","onError","error","request","PreferenceRequests","getClassificationCallbacks","date","Date","from","DateHelper","to","hasPermissions","usePermissions","canFollowSubjects","PermissionName","ContentUpdateRequests","contentUpdates","subjectPreferences","audiences","usePresentationAudiences","useSetPageMetadata","PageMetadataHelper","title","phraseContext","phraseHandler","titlePhrase","descriptionPhrase","canonicalLink","SeoHelper","customAppLink","appLinks","getClassificationUpdateAppLink","allowIndexing","videoActions","useVideoActions","useVideoMixin","videos","hasLoadedPreferences","preferredSubjectIds","subject","VideoActionsContext","value","banner","url","find","toString","Breadcrumbs","VideoList","getVideoAppLink","presentationAudiences","getPreviewQuestionsAppLink","interactive","InteractiveHelper","mtv","flightNamespace","sharedPlaylist","isPlugin","params","u","setFavourite","canFavourite","hasTopicDirectories","isLoadingSettings","hasLoadedPermissions","isLoaded","hasStudentExperience","config","yearGroups","isAuthenticated","customerId","hasCommonVideoPropsCompleted","subTextType","getSubTextAppLink","video","series","isPluginPopup","popup","imageCdnUrl","getClassroomGuideAppLink","getInteractiveGuidanceAppLink","getResourceGuidanceAppLink","showNewVideoIndicator","companyLogoFallbackUrl","redirectOnError","activePresentation","getFallbackPresentation","presentation","getValidObjects","objects","Array","isArray","filter","o","videoIds","v","ids","useVideoMixinFunc","fetchObjects"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9241],{45781:(e,t,n)=>{n.d(t,{z:()=>p});var a=n(32735),r=n(39202),i=n(23481),o=n(65858),l=n(38502),c=n(83345),s=n(38129);const u={pillTab:"bMJM0"};var f="discover.header";function p(e){var t,n,p,d,m,v;if(!e.type)return a.createElement(a.Fragment,null);if(e.type===s.Yv.Learner||e.hasStudentExperience)return a.createElement("div",{className:"py-3"},a.createElement("h1",{className:"h2 mb-0"},a.createElement(c.x,{namespace:f,phrase:"heading"})));var y=[{name:i.T.getPhrase(f,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:i.T.getPhrase(f,"forYou"),url:r.C$.getHref(null===(n=e.appLinks)||void 0===n?void 0:n.forYou)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}},{name:i.T.getPhrase(f,"whatsNew"),appLink:null===(p=e.appLinks)||void 0===p?void 0:p.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:i.T.getPhrase(f,"whatsNew"),url:r.C$.getHref(null===(d=e.appLinks)||void 0===d?void 0:d.whatsNew)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}}];return e.showCalendar&&y.push({name:i.T.getPhrase(f,"calendar"),appLink:null===(m=e.appLinks)||void 0===m?void 0:m.calendar,active:"calendar"===e.active,analyticsData:{name:i.T.getPhrase(f,"calendar"),url:r.C$.getHref(null===(v=e.appLinks)||void 0===v?void 0:v.calendar)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}}),a.createElement("div",{className:"py-3 text-center mx-n3"},a.createElement(l.r,{tabs:y,className:u.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>f});var a=n(32735),r=n(49985),i=n(15611),o=n(18559),l=n(11607),c=n(83914),s=n(22771);function u(e){return a.createElement(a.Fragment,null,!!e.tab.svgName&&a.createElement("div",{className:e.tab.name?"pe-1":""},a.createElement(c.x,{svgName:e.tab.svgName})),e.tab.name,"number"==typeof e.tab.count&&a.createElement("div",{className:"ps-2"},a.createElement(o.C,{type:o.g.Count,data:e.tab.count})))}function f(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:"",ref:e.containerRef},a.createElement("ul",{className:"\n list-unstyled d-inline-block m-0 ".concat(s.Z.pillTabSelector,"\n ").concat(e.borderRadius?s.Z.radiusSmall:"","\n ").concat(e.listClassName,"\n ")},e.tabs.map((function(e,t){return a.createElement("li",{className:"\n p-0 ".concat(s.Z.tab," ").concat(e.active?"btn btn-dark":"btn btn-outline-dark","\n ").concat(e.name?s.Z.minWidth:""," ").concat(e.className,"\n "),key:t},e.appLink?a.createElement(i.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"\n cursor-pointer d-flex align-items-center justify-content-center\n text-decoration-none text-reset px-2 text-nowrap ".concat(s.Z.tabLink,"\n ")},a.createElement(u,{tab:e})):a.createElement(l.L,{className:"\n cursor-pointer d-flex align-items-center justify-content-center\n text-decoration-none text-reset px-2 text-nowrap ".concat(s.Z.tabLink,"\n "),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&r.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},a.createElement(u,{tab:e})))}))))}f.defaultProps={borderRadius:"lg"}},39902:(e,t,n)=>{n.d(t,{FN:()=>m,SW:()=>v,fh:()=>d});var a=n(32735),r=n(20354),i=n(75896);function o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},p=50;function d(e,t){var n=i.m.chunk(e,p).map((function(e){return t(i.m.uniq(e))})),a=r.a.useBasicFetchAll(n),o=i.m.flatten(a.data),l=a.data.length?o.reduce((function(e,t){return Object.assign(Object.assign({},e),u({},t.id,t))}),{}):null;return{itemsArr:o,items:l,isFetching:a.isFetching}}function m(e,t,n){var r=v({getRequest:t,_getKey:n}),i=r.fetchItems,o=f(r,["fetchItems"]);return a.useEffect((function(){e.length&&i(e)}),[null==e?void 0:e.length]),o}function v(e){var t,n,c,f,d,m=null!==(t=e._getKey)&&void 0!==t?t:function(e){return"object"===s(e)?e.id:e},v=a.useRef(new Set),y=(f=a.useState([]),d=2,function(e){if(Array.isArray(e))return e}(f)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(f,d)||l(f,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=y[0],h=y[1],g=r.a.useBasicFetchAll(b),w=i.m.flatten(g.data),S=g.data.length?w.reduce((function(e,t){return Object.assign(Object.assign({},e),u({},m(t),t))}),{}):null;return{hasFirstRequestCompleted:!!(null===(c=null===(n=g.responses)||void 0===n?void 0:n[0])||void 0===c?void 0:c.hasCompleted),itemsArr:w,items:S,isFetching:g.isFetching,fetchItems:function(t){if(null==t?void 0:t.length){var n=[];t.forEach((function(e){var t=m(e);v.current.has(t)||(n.push(e),v.current.add(t))})),n.length&&h((function(t){return[].concat(o(t),o(i.m.chunk(n,p).map(e.getRequest)))}))}}}}},30709:(e,t,n)=>{n.d(t,{a:()=>v});var a=n(32735),r=n(15611),i=n(83345),o=n(80247),l=n(57900),c=n(2948),s=n(91693),u=n(38143),f=n(35223);const p={banner:"B7jhq"};function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}var m="contentUpdates.classificationBanner";function v(e){var t,n,v=e.classification,y=e.backgroundUrl,b=e.followed,h=e.follow,g=e.showFollowSpinner,w=(t=(0,c.D)(u.g.AUDIENCE_FILTER,void 0,{storage:l.Z1.SessionStorage}),n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return a.createElement("div",{className:"banner mb-2 d-flex justify-content-between align-items-center rounded ".concat(p.banner),style:{backgroundImage:"url('".concat(y,"')")}},a.createElement(r.F,{className:"text-white text-shadow",appLink:e.getClassificationAppLink(v,w)},a.createElement("h2",{className:"h3 mb-0"},v.name)),e.canFollow&&a.createElement(s.h,{className:"btn follow-btn ".concat(b?"btn-outline-dark":"btn-dark"),svgName:b?f.vn.BellFilled:f.vn.Bell,onClick:function(){return h(v.id,v.name,!b)}},g?a.createElement(o.Z,{as:"span",animation:"border",role:"status",size:"sm"}):a.createElement(i.x,{namespace:m,phrase:b?"following":"follow"})))}},79241:(e,t,n)=>{n.r(t),n.d(t,{ContentUpdatesView:()=>H});var a=n(32735),r=n(70680),i=n(23481),o=n(20354),l=n(110),c=n(49985),s=n(65858),u=n(54644),f=n(45781),p=n(15611),d=n(83345),m=n(51365),v=n(16714),y=n(61699),b=n(69883),h=n(39902),g=n(22902),w=n(79612),S=n(38129),E=n(76753),k=n(14070),L=n(97291),C=n(10671),A=n(58321),N=n(86698),O=n(44110),j=n(85369),P=n(97816),T=n(33192),F=n(75100),x=n(54610),U=n(67453),I=n(10741),M=n(30709),V="contentUpdates.contentUpdatesView";function D(e){var t=e.classification,n=e.videos,r=e.showMore,i=e.followed,o=(0,g.T)().hasPermissions;if(!t)return a.createElement(a.Fragment,null);var l=U.j.createBannerUrl(t.banner,{fallbackBaseUrl:e.commonVideoProps.imageCdnUrl,fallbackCategoryName:t.name,type:x.__.Banners},{size:x.h2.Medium,resizeType:x.Nq.Cover});return a.createElement("div",{className:"mb-3"},a.createElement(M.a,{classification:t,backgroundUrl:l,getClassificationAppLink:e.appLinks.getClassificationAppLink,followed:i,follow:e.follow,canFollow:e.canFollow,showFollowSpinner:e.showFollowSpinner}),a.createElement(F.E4,{videos:n,getVideoAppLink:e.appLinks.getVideoAppLink,presentationAudiences:e.audiences,hasPermissions:o,getPreviewQuestionsAppLink:function(e){return I.j.getPreviewQuestionsAppLink(e)},commonVideoProps:e.commonVideoProps}),r&&a.createElement("div",{className:"show-more"},a.createElement(p.F,{className:"info-link",appLink:e.appLinks.getClassificationUpdateAppLink(t)},a.createElement(d.x,{namespace:V,phrase:"showMore",options:{classificationName:t.name}}))))}var R=n(1860);const B={partialBanner:"bxaA6"};function _(){return a.createElement(a.Fragment,null,Array(4).fill(null).map((function(e,t){return a.createElement("div",{key:t,className:"mb-3"},a.createElement("div",{className:"partial-loading-background mb-2 ".concat(B.partialBanner)}),a.createElement(R.S,null))})))}function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function Z(e,t,n){return(t=function(e){var t=function(e){if("object"!=Y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Y(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}var W=5,z="contentUpdates.contentUpdatesView",q=i.T.encloseNamespace(z);function H(e){var t,n,i,F,x,U,I=(x=a.useState({}),U=2,function(e){if(Array.isArray(e))return e}(x)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(x,U)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}(x,U)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),M=I[0],V=I[1],R=(0,r.I0)(),B=(0,b.Z)(),Y=(0,g.T)().hasPermissions,H=Y(v.C.FollowSubjects),$=new Date,J=l.O.format(l.O.endOf(l.O.subtract($,1,"year"),"day"),"YYYY-MM-DD"),K=l.O.format(l.O.endOf($,"day"),"YYYY-MM-DD"),Q=(0,N.y)({redirectOnError:!0}).activePresentation;(0,w.M)(E.CG.getDefaultMetadata({title:null==Q?void 0:Q.name,phraseContext:{phraseHandler:q,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:T.f.getCanonicalLink(),allowIndexing:T.f.allowIndexing(),hrefLang:T.f.getStaticRouteHrefLang(null==Q?void 0:Q.learningLevel,(function(){return{application:L.O.CONTENT_UPDATES,action:k.e.ContentUpdates.CONTENT_UPDATES}}))}));var X=u.v.getContentUpdates(null==Q?void 0:Q.id,J,K),ee=o.a.useBasicFetch(Q&&X),te=o.a.useBasicFetch(H&&y.o.mySubjectPreferences()),ne=(0,O.i)(),ae=[],re=[];ee.data&&ee.data.forEach((function(e){ae.push(e.id),re=re.concat(e.videos)}));var ie=(0,h.fh)(ae,(function(e){return u.v.getClassifications(e)})).items,oe=(0,C._)({location:C.i.VideoItem});(0,P.V)(re,{flightNamespace:null===(t=X.normalizeOptions)||void 0===t?void 0:t.namespace});var le=(0,A.U)({locationContext:s.LZ.VideoThumbnail,flightNamespace:null===(n=X.normalizeOptions)||void 0===n?void 0:n.namespace}),ce=le.commonVideoProps,se=le.hasCommonVideoPropsCompleted;function ue(e,t,n){V((function(t){return Object.assign(Object.assign({},t),Z({},e,!0))}));var a=function(){var a;V((function(t){return Object.assign(Object.assign({},t),Z({},e,!1))})),c.k.logUserAction({id:e,name:t},{location:s.LZ.ContentUpdatesClassificationBanner,workflowPhase:s.eu.Complete,descriptor:n?s.DL.On:s.DL.Off,actionType:s.Vw.Follow,entity:s.py.Classification}),B.success(q(n?"followed":"unfollowed",{classification:null===(a=ie[e])||void 0===a?void 0:a.name,escapeText:!0}))},r=function(){V((function(t){return Object.assign(Object.assign({},t),Z({},e,!1))})),B.error(q("error"))},i=n?y.o.followSubjects([e],a,r):y.o.unfollowSubjects([e],a,r);o.a.fetch(R,i)}var fe=(0,j.N)(),pe=fe.showCalendar,de=fe.isLoading,me=!(!ee.hasCompleted||!ne.hasCompleted||H&&!te.hasCompleted||!ie||de||!se),ve=function(e,t){return e&&t?e.map((function(e){return{showMore:e.videos.length>W,classification:t[e.id],videos:e.videos.slice(0,W).map((function(e){return e.classification=t[e.id],e})).filter((function(e){return e}))}})).filter((function(e){return e.classification})):null}(ee.data,ie),ye=null!==(F=null===(i=te.data)||void 0===i?void 0:i.map((function(e){return e.id})))&&void 0!==F?F:[],be=Y(v.C.ManageSubjectPreferences),he=Y(v.C.ManageVideoAccess);return a.createElement(m.M.Provider,{value:oe},a.createElement("div",{className:"bg-white px-3"},!de&&a.createElement(f.z,{type:S.Yv.Staff,appLinks:{forYou:e.appLinks.dashboardAppLink,whatsNew:e.appLinks.whatsNewAppLink,calendar:e.appLinks.calendarAppLink},showCalendar:pe,active:"whatsNew"}),a.createElement("h1",null,a.createElement(d.x,{namespace:z,phrase:"heading"})),(be||he)&&a.createElement("p",null,be&&a.createElement(a.Fragment,null,a.createElement(d.x,{namespace:z,phrase:"onlyRelevant"})," ",a.createElement(p.F,{className:"info-link",appLink:{application:L.O.SETTINGS,action:k.e.Settings.TOPIC_PREFERENCES}},a.createElement(d.x,{namespace:z,phrase:"updatePreferences"}))),he&&a.createElement("span",{className:"d-block"},a.createElement(p.F,{className:"info-link",appLink:{application:L.O.SETTINGS,action:k.e.Settings.CONTENT_REVIEW}},a.createElement(d.x,{namespace:z,phrase:"contentReview"})))),me?a.createElement(a.Fragment,null,ve.map((function(t,n){var r,i;return a.createElement(D,{key:n,classification:t.classification,videos:t.videos,showMore:t.showMore,appLinks:e.appLinks,followed:ye.includes(null===(r=t.classification)||void 0===r?void 0:r.id),follow:ue,showFollowSpinner:M[null===(i=t.classification)||void 0===i?void 0:i.id],canFollow:H,audiences:ne.data,commonVideoProps:ce})}))):a.createElement(_,null)))}},58321:(e,t,n)=>{n.d(t,{U:()=>m});var a=n(20354),r=n(16714),i=n(39151),o=n(1666),l=n(31949),c=n(22902),s=n(37802),u=n(22490),f=n(82431),p=n(46390),d=n(27638);function m(e){var t,n,m,v=e||{},y=v.locationContext,b=v.mtv,h=v.flightNamespace,g=v.sharedPlaylist,w=(0,p.G)(),S=w.isPlugin,E=w.params,k=(0,d.u)(y,h),L=k.setFavourite,C=k.canFavourite,A=(0,s.r)(null),N=A.hasTopicDirectories,O=A.isLoadingSettings,j=(0,c.T)(),P=j.hasPermissions,T=j.isLoaded,F=P(r.C.StudentExperience),x=a.a.useBasicFetch(i.L.config()),U=a.a.useBasicFetch(l.N.currentUser()),I=a.a.useBasicFetch((null===(t=U.data)||void 0===t?void 0:t.isAuthenticated)&&o.h.yearGroups(U.data.customerId));return{hasCommonVideoPropsCompleted:!O&&T&&x.hasCompleted&&U.hasCompleted&&(!(null===(n=U.data)||void 0===n?void 0:n.isAuthenticated)||I.hasCompleted),commonVideoProps:{subTextType:"series",getSubTextAppLink:function(e){var t;return"series"in e?g&&!(null===(t=U.data)||void 0===t?void 0:t.isAuthenticated)?null:f.j.getSeriesAppLink(e.series,{mtv:b}):null},isPlugin:S,isPluginPopup:!!(null==E?void 0:E.popup),canFavourite:C,setFavourite:L,imageCdnUrl:null===(m=x.data)||void 0===m?void 0:m.imageCdnUrl,yearGroups:I.data,getClassroomGuideAppLink:u.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:u.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:u.W.getResourceGuidanceAppLink,showNewVideoIndicator:N,companyLogoFallbackUrl:null,hasStudentExperience:F}}}},44110:(e,t,n)=>{n.d(t,{i:()=>o});var a=n(20354),r=n(89454),i=n(86698),o=function(){var e=(0,i.y)({redirectOnError:!0}),t=e.activePresentation,n=e.getFallbackPresentation,o=t||n();return a.a.useBasicFetch(!!o&&r.O.presentationAudiences(o.id))}},85369:(e,t,n)=>{n.d(t,{N:()=>b});var a=n(32735),r=n(35242),i=n(20354),o=n(27022),l=n(72639),c=n(31949),s=n(37802),u=n(87114),f=n(86698);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function v(e,t,n){return(t=function(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=v(v(v(v(v(v({},o.t.AU,[l.p.Level_1]),o.t.US,[l.p.Level_1]),o.t.UK,[l.p.Level_1]),o.t.SCOT,[l.p.Level_1]),o.t.NZ,[]),o.t.GLOBAL,[]);function b(){var e,t=(0,s.r)(null),n=t.hasSpecialEventCalendar,o=t.isLoadingSettings,l=(0,f.y)({redirectOnError:!0}).activePresentation,p=i.a.useBasicFetch(c.N.currentUser()),m=y[null===(e=p.data)||void 0===e?void 0:e.contentRegion],v=u.i.getMappedPresentationLevel(null==l?void 0:l.learningLevel),b=!(null==m?void 0:m.find((function(e){return e.toString()===(null==v?void 0:v.toString())}))),h=!o&&!n,g=d(a.useState(!h&&!b),2),w=g[0],S=g[1],E=d(a.useState(o||!(null==l?void 0:l.id)),2),k=E[0],L=E[1];return a.useEffect((function(){h||b?S(!1):k||S(!0),L(o||!(null==l?void 0:l.id))}),[n,null==l?void 0:l.id,k]),r.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:w,isLoading:k}}},97816:(e,t,n)=>{n.d(t,{V:()=>l,l:()=>c});var a=n(1575),r=n(39902),i=n(31908);function o(e){return e?Array.isArray(e)?e.filter((function(e){return!!e&&(i.M.isVideo(e)||i.M.isClip(e))})):"data"in e?e.data.filter((function(e){return!!e&&(i.M.isVideo(e)||i.M.isClip(e))})):[]:[]}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=o(e).map((function(e){return e.id}));(0,r.FN)(n,(function(e){return a.R.videoMixinAssocs(e,t.flightNamespace)}),null)}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,r.SW)({getRequest:function(t){return a.R.videoMixinAssocs(t,e.flightNamespace)}}).fetchItems;return{fetchObjects:function(e){return t(o(e).map((function(e){return e.id})))}}}},22771:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",tab:"RvNxr",minWidth:"GHSz9",radiusSmall:"VhJJa",tabLink:"WFyvo"}}}]);
|
|
2
|
+
//# sourceMappingURL=9241-c523dc7aac-lite.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts/9241-c523dc7aac-lite.chunk.js","mappings":"qNACA,SAAgB,QAAU,SCa1B,IAAMA,EAAY,kBAgBZ,SAAUC,EAAeC,G,gBAC7B,IAAKA,EAAMC,KACT,OAAO,iCAET,GAAID,EAAMC,OAAS,cAA6BD,EAAME,qBACpD,OACE,uBAAKC,UAAU,QACb,sBAAIA,UAAU,WACZ,gBAACC,EAAA,EAAI,CAACN,UAAWA,EAAWO,OAAO,cAM3C,IAAMC,EAAO,CAAC,CACZC,KAAMC,EAAA,YAA0BV,EAAW,UAC3CW,QAAuB,QAAd,EAAAT,EAAMU,gBAAQ,eAAEC,OACzBC,OAAyB,WAAjBZ,EAAMY,OACdC,cAAe,CACbN,KAAMC,EAAA,YAA0BV,EAAW,UAC3CgB,IAAK,aA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AMA,IAAM,YAAoBA,IAAM,WAAmBA,GAAG,IAEnF,GARE,EASX,CAUM,SAAU/E,EAAc6E,GAA+C,IAA/BvL,EAAA,uDAA6B,CAAC,EACpE0L,EAAWJ,EAAgBC,GAASlN,KAAI,SAAA8J,GAAC,OAAIA,EAAE1I,EAAE,KAEvD,QACEiM,GACA,SAAAnF,GAAG,OAAI,qBAA+BA,EAAKvG,EAAQ2G,gBAAgB,GACnE,KAEJ,CAEM,SAAUgF,IAAiD,IAA/B3L,EAAA,uDAA6B,CAAC,EAStDD,GAAe,QAAyB,CAAEhB,WARlD,SAAoBwH,GAClB,OAAO,qBAA+BA,EAAKvG,EAAQ2G,gBACrD,IAMQ5G,WAER,MAAO,CAAE6L,aANT,SAAsBxM,GACpB,OAAOW,EAAWuL,EAAgBlM,GAAOf,KAAI,SAAA8J,GAAC,OAAIA,EAAE1I,EAAE,IACxD,EAKF,C,mCCnDA,SAAgB,gBAAkB,QAAQ,IAAM,QAAQ,SAAW,QAAQ,YAAc,QAAQ,QAAU,Q","sources":["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/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/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/PartialContentUpdates.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/content-updates/ContentUpdatesView.tsx","file:///app/packages/projects/lite/src/shared/hooks/useCommonVideoProps.ts","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"],"sourcesContent":["// 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 mx-n3'>\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 { SvgContainer } from '../svg-container/SvgContainer';\n\nimport styles from './pill-tab-selector.scss';\n\ninterface TabContentsProps {\n tab: PillTab;\n}\n\nfunction TabContents(props: TabContentsProps): JSX.Element {\n return (\n <>\n {!!props.tab.svgName && (\n <div className={props.tab.name ? 'pe-1' : ''}>\n <SvgContainer svgName={props.tab.svgName} />\n </div>\n )}\n\n {props.tab.name}\n\n {typeof (props.tab.count) === 'number' && (\n <div className='ps-2'>\n <Badge type={BadgeType.Count} data={props.tab.count} />\n </div>\n )}\n </>\n );\n}\n\nexport interface PillTab {\n name: string;\n active: boolean;\n svgName?: string;\n\n className?: string;\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 containerRef?: (el: HTMLElement) => void;\n listClassName?: string;\n className?: string;\n borderRadius?: 'sm' | 'lg'\n}\n\nPillTabSelector.defaultProps = {\n borderRadius: 'lg'\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 ?? ''} ref={props.containerRef}>\n <ul className={`\n list-unstyled d-inline-block m-0 ${styles.pillTabSelector}\n ${props.borderRadius ? styles.radiusSmall : ''}\n ${props.listClassName}\n `}>\n {props.tabs.map((tab, index) => {\n return (\n <li\n className={`\n p-0 ${styles.tab} ${tab.active ? 'btn btn-dark' : 'btn btn-outline-dark'}\n ${tab.name ? styles.minWidth : ''} ${tab.className}\n `}\n key={index}\n >\n {tab.appLink ? (\n <AppLink\n appLink={tab.appLink}\n analyticsData={tab.analyticsData}\n analyticsOptions={tab.analyticsOptions}\n className={`\n cursor-pointer d-flex align-items-center justify-content-center\n text-decoration-none text-reset px-2 text-nowrap ${styles.tabLink}\n `}\n >\n <TabContents tab={tab} />\n </AppLink>\n ) : (\n <DivButton\n className={`\n cursor-pointer d-flex align-items-center justify-content-center\n text-decoration-none text-reset px-2 text-nowrap ${styles.tabLink}\n `}\n onClick={() => onSelectTab(tab)}\n >\n <TabContents tab={tab} />\n </DivButton>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n );\n}\n","import React from 'react';\n\nimport { Flight } from 'libs/common/flight';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { BaseObject } from 'libs/shared/interfaces';\n\nconst CHUNK_SIZE = 50;\n\nexport interface UseBatchFetchResult<T extends BaseObject> {\n itemsArr: T[];\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 chunks = ArrayHelper.chunk<string>(itemIds, CHUNK_SIZE);\n\n const requests = chunks.map(chunk => getRequest(ArrayHelper.uniq(chunk)));\n\n const responses = Flight.useBasicFetchAll<T[]>(requests);\n\n const itemsArr = ArrayHelper.flatten(responses.data);\n const items = responses.data.length\n ? itemsArr.reduce((acc, item) => ({ ...acc, [item.id]: item }), {})\n : null;\n\n return {\n itemsArr,\n items,\n isFetching: responses.isFetching\n };\n}\n\n/**\n * When you need the useBatchFetch() behavior, but your list of objects to hydrate\n * will grow, such as on a scrolling page. useGrowingBatchFetch() will use local state\n * to determine what we've already built a request for and what items are new\n * as to not re-fetch items - Sha\n */\nexport function useGrowingBatchFetch<T>(\n objs: T[],\n getRequest: (items: T[]) => Flight.Request,\n _getKey?: (obj: T) => string\n) {\n const { fetchItems, ...data } = useGrowingBatchFetchFunc({ getRequest, _getKey });\n\n React.useEffect(() => {\n if (!objs.length)\n return;\n\n fetchItems(objs);\n }, [objs?.length]);\n\n return data;\n}\n\ninterface UseGrowingBatchFetchFuncOptions<T> {\n getRequest: (items: T[]) => Flight.Request;\n _getKey?: (obj: T) => string;\n}\n\n/**\n * When you need the useGrowingBatchFetch() behaviour, but need to trigger the\n * fetch manually and update the objects - Nish \n */\nexport function useGrowingBatchFetchFunc<T>(options: UseGrowingBatchFetchFuncOptions<T>) {\n const getKey = options._getKey ?? ((obj: any) => {\n if (typeof obj === 'object')\n return obj.id;\n\n return obj;\n });\n\n const fetchedItems = React.useRef<Set<string>>(new Set<string>());\n const [ requests, setRequests ] = React.useState<Flight.Request[]>([]);\n\n function fetchItems(objs: T[]) {\n if (!objs?.length)\n return;\n\n const unfetchedItems: T[] = [];\n \n objs.forEach(obj => {\n const key = getKey(obj);\n\n if (fetchedItems.current.has(key))\n return;\n\n unfetchedItems.push(obj);\n fetchedItems.current.add(key);\n });\n \n if (!unfetchedItems.length)\n return;\n \n setRequests(r => ([ ...r, ...ArrayHelper.chunk<T>(unfetchedItems, CHUNK_SIZE).map(options.getRequest) ]));\n }\n\n const responses = Flight.useBasicFetchAll<T[]>(requests);\n const itemsArr = ArrayHelper.flatten(responses.data);\n const items = responses.data.length\n ? itemsArr.reduce((acc, item) => ({ ...acc, [getKey(item)]: item }), {})\n : null;\n\n return {\n hasFirstRequestCompleted: !!responses.responses?.[0]?.hasCompleted,\n itemsArr,\n items,\n isFetching: responses.isFetching,\n fetchItems\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.BellFilled : 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 ? 'following' : 'follow'} />\n }\n </IconButton>\n )}\n </div>\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 { Classification, PresentationAudience } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\n\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\n\nimport { ClassificationBanner } from 'apps/content-updates/components';\n\nconst namespace = 'contentUpdates.contentUpdatesView';\n\ninterface ClassificationProps {\n classification: Classification;\n videos: VideoWithClassification[];\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 audiences: PresentationAudience[];\n commonVideoProps: CommonVideoProps;\n}\n\nexport function ContentUpdateClassification(props: ClassificationProps): JSX.Element {\n const { classification, videos, showMore, followed } = props;\n\n const { hasPermissions } = usePermissions();\n\n if (!classification)\n return <></>;\n \n const url = ImageHelper.createBannerUrl(classification.banner, {\n fallbackBaseUrl: props.commonVideoProps.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 getVideoAppLink={props.appLinks.getVideoAppLink}\n presentationAudiences={props.audiences}\n hasPermissions={hasPermissions}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n commonVideoProps={props.commonVideoProps}\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 PartialContentUpdates(): 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 { PreferenceRequests } from 'libs/shared/flight-requests/PreferenceRequests';\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, DashboardUserType, Video } 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 { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\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 { PartialContentUpdates } from './partial-loading/PartialContentUpdates';\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 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 { 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 { commonVideoProps, hasCommonVideoPropsCompleted } = useCommonVideoProps({\n locationContext: LocationContext.VideoThumbnail,\n flightNamespace: 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 audiences.hasCompleted &&\n (!canFollowSubjects || subjectPreferences.hasCompleted) &&\n classifications &&\n !isLoading &&\n hasCommonVideoPropsCompleted\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 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 audiences={audiences.data}\n commonVideoProps={commonVideoProps}\n />\n ))}\n </>\n ) : (\n <PartialContentUpdates />\n )}\n </div>\n </VideoActionsContext.Provider>\n );\n}\n","import { Core } from 'libs/common/backbone/index';\nimport { Flight } from 'libs/common/react/index';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Config, CurrentUser, VideoTypes, YearGroup } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\n\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\n\nimport { usePluginHelper } from './use-plugin-helper/usePluginHelper';\nimport { useLiteFavourites } from './useLiteFavourites';\n\ninterface UseCommonVideoPropsResult {\n hasCommonVideoPropsCompleted: boolean;\n commonVideoProps: CommonVideoProps;\n}\n\ninterface UseCommonVideoPropsOptions {\n locationContext: LocationContext,\n mtv?: boolean;\n flightNamespace?: string;\n sharedPlaylist?: boolean;\n}\n\nexport function useCommonVideoProps(options: UseCommonVideoPropsOptions): UseCommonVideoPropsResult {\n const { locationContext, mtv, flightNamespace, sharedPlaylist } = options || {};\n\n const { isPlugin, params } = usePluginHelper();\n const { setFavourite, canFavourite } = useLiteFavourites(locationContext, flightNamespace);\n const { hasTopicDirectories, isLoadingSettings } = useSettings(null);\n const { hasPermissions, isLoaded: hasLoadedPermissions } = usePermissions();\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\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 function getSubTextAppLink(video: VideoTypes): Core.AppLink {\n if (!('series' in video))\n return null;\n\n /**\n * We do not allow navigating to series on shared playlists when the user is not signed in\n * because most series are customer created and will be empty for public users\n * \n * We do not have to do this for shared series, because all the series links are self referencing\n * - Sha\n */\n if (sharedPlaylist && !currentUser.data?.isAuthenticated)\n return null;\n \n return SeriesAppLinkHelper.getSeriesAppLink(video.series, { mtv });\n }\n\n const hasCommonVideoPropsCompleted = (\n !isLoadingSettings &&\n hasLoadedPermissions &&\n config.hasCompleted &&\n currentUser.hasCompleted &&\n (!currentUser.data?.isAuthenticated || yearGroups.hasCompleted)\n );\n\n return {\n hasCommonVideoPropsCompleted,\n commonVideoProps: {\n subTextType: 'series',\n getSubTextAppLink,\n isPlugin,\n isPluginPopup: !!params?.popup,\n canFavourite,\n setFavourite,\n imageCdnUrl: config.data?.imageCdnUrl,\n yearGroups: yearGroups.data,\n getClassroomGuideAppLink: VideoAppLinkHelper.getClassroomGuideAppLink,\n getInteractiveGuidanceAppLink: VideoAppLinkHelper.getInteractiveGuidanceAppLink,\n getResourceGuidanceAppLink: VideoAppLinkHelper.getResourceGuidanceAppLink,\n showNewVideoIndicator: hasTopicDirectories,\n companyLogoFallbackUrl: null,\n hasStudentExperience\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, getFallbackPresentation } = usePresentation({ redirectOnError: true });\n\n const presentation = activePresentation || getFallbackPresentation();\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!presentation &&\n AudienceRequests.presentationAudiences(presentation.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 { Flight } from 'libs/common/react/index';\n\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useGrowingBatchFetch, useGrowingBatchFetchFunc } from 'libs/shared/hooks/UseBatchFetch';\nimport { Clip, ClipCollection, Video, VideoCollection } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ntype Types = Video[] | VideoCollection | Clip[] | ClipCollection;\n\nfunction getValidObjects(objects: Types): (Video | Clip)[] {\n if (!objects)\n return [];\n\n if (Array.isArray(objects))\n return objects.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n if ('data' in objects)\n return objects.data.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n return [];\n}\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(objects: Types, options: VideoMixinOptions = {}) {\n const videoIds = getValidObjects(objects).map(v => v.id);\n\n useGrowingBatchFetch(\n videoIds,\n ids => VideoRequests.videoMixinAssocs(ids, options.flightNamespace),\n null\n );\n}\n\nexport function useVideoMixinFunc(options: VideoMixinOptions = {}) {\n function getRequest(ids: string[]): Flight.Request {\n return VideoRequests.videoMixinAssocs(ids, options.flightNamespace);\n }\n \n function fetchObjects(items: Types) {\n return fetchItems(getValidObjects(items).map(v => v.id));\n }\n\n const { fetchItems } = useGrowingBatchFetchFunc({ getRequest });\n\n return { fetchObjects };\n}","// extracted by mini-css-extract-plugin\nexport default {\"pillTabSelector\":\"Hdi6o\",\"tab\":\"RvNxr\",\"minWidth\":\"GHSz9\",\"radiusSmall\":\"VhJJa\",\"tabLink\":\"WFyvo\"};"],"names":["namespace","DiscoverHeader","props","type","hasStudentExperience","className","Text","phrase","tabs","name","LanguageService","appLink","appLinks","forYou","active","analyticsData","url","analyticsOptions","actionType","entity","location","whatsNew","showCalendar","push","calendar","PillTabSelector","TabContents","tab","svgName","count","data","ref","containerRef","borderRadius","listClassName","map","index","key","onClick","onSelect","onSelectTab","defaultProps","CHUNK_SIZE","useBatchFetch","itemIds","getRequest","requests","chunk","responses","itemsArr","items","length","reduce","acc","item","id","isFetching","useGrowingBatchFetch","objs","_getKey","useGrowingBatchFetchFunc","fetchItems","options","getKey","obj","fetchedItems","Set","setRequests","hasFirstRequestCompleted","hasCompleted","unfetchedItems","forEach","current","has","add","r","ClassificationBanner","classification","backgroundUrl","followed","follow","showFollowSpinner","activeAudiences","SharedViewModelKeys","undefined","storage","style","backgroundImage","getClassificationAppLink","canFollow","IconButton","Spinner","as","animation","role","size","ContentUpdateClassification","videos","showMore","hasPermissions","usePermissions","ImageHelper","banner","fallbackBaseUrl","commonVideoProps","imageCdnUrl","fallbackCategoryName","resizeType","VideoList","getVideoAppLink","presentationAudiences","audiences","getPreviewQuestionsAppLink","interactive","InteractiveHelper","AppLink","getClassificationUpdateAppLink","classificationName","PartialContentUpdates","Array","fill","s","i","PartialVideoList","INITIAL_VIDEO_COUNT","getPhrase","ContentUpdatesView","followSpinners","setFollowSpinners","dispatch","alerts","canFollowSubjects","PermissionName","date","Date","from","DateHelper","to","activePresentation","usePresentation","redirectOnError","useSetPageMetadata","PageMetadataHelper","title","phraseContext","phraseHandler","titlePhrase","descriptionPhrase","canonicalLink","SeoHelper","allowIndexing","hrefLang","learningLevel","application","action","contentUpdatesRequest","ContentUpdateRequests","contentUpdates","subjectPreferences","PreferenceRequests","usePresentationAudiences","classificationIds","c","concat","classifications","ids","videoActions","useVideoActions","useVideoMixin","flightNamespace","normalizeOptions","useCommonVideoProps","locationContext","hasCommonVideoPropsCompleted","onFollow","classificationId","currentState","onSuccess","AnalyticsHelper","workflowPhase","descriptor","success","escapeText","onError","error","request","useShowCalendar","isLoading","dataLoaded","mappedUpdates","slice","m","filter","v","preferredSubjectIds","subject","managePreferences","manageVideoAccess","VideoActionsContext","value","dashboardAppLink","whatsNewAppLink","calendarAppLink","includes","mtv","sharedPlaylist","isPlugin","params","u","setFavourite","canFavourite","hasTopicDirectories","isLoadingSettings","hasLoadedPermissions","isLoaded","config","currentUser","yearGroups","isAuthenticated","customerId","subTextType","getSubTextAppLink","video","series","isPluginPopup","popup","getClassroomGuideAppLink","getInteractiveGuidanceAppLink","getResourceGuidanceAppLink","showNewVideoIndicator","companyLogoFallbackUrl","getFallbackPresentation","presentation","ALLOWED_LEARNING_LEVELS_BY_REGION","hasSpecialEventCalendar","allowedLearningLevels","contentRegion","learningLevelCantAccess","find","l","toString","noSetting","setShowCalendar","setIsLoading","getValidObjects","objects","isArray","o","videoIds","useVideoMixinFunc","fetchObjects"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 9345-df0cbb196f-lite.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9345],{94644:(t,e,r)=>{r.d(e,{r:()=>l});var n=r(50242),o=r(81886),i=r(67058),a=r(14553),c=r(49267),u=r(49075),s={notFound:i.d,forbidden:{rating:a.q,yearLevel:a.q,region:c.a,privacy:a.q},badRequest:u._,internalServerError:u._};function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var i;i="number"==typeof t?t:t.status;var a=Object.assign(Object.assign({},s),e);i&&o.Q.Ry.isStatusCodeError(i)&&(i!==n.o.InternalServer?i!==n.o.NotFound?i!==n.o.Forbidden?r.badRequest||o.Q.Ry.throw(new a.badRequest):r.forbidden||o.Q.Ry.throw(new a.forbidden.privacy):r.notFound||o.Q.Ry.throw(new a.notFound):r.internalServerError||o.Q.Ry.throw(new u._))}}},39902:(t,e,r)=>{r.d(e,{FN:()=>m,SW:()=>v,fh:()=>h});var n=r(32735),o=r(20354),i=r(75896);function a(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function l(t,e,r){return(e=function(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var f=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},d=50;function h(t,e){var r=i.m.chunk(t,d).map((function(t){return e(i.m.uniq(t))})),n=o.a.useBasicFetchAll(r),a=i.m.flatten(n.data),c=n.data.length?a.reduce((function(t,e){return Object.assign(Object.assign({},t),l({},e.id,e))}),{}):null;return{itemsArr:a,items:c,isFetching:n.isFetching}}function m(t,e,r){var o=v({getRequest:e,_getKey:r}),i=o.fetchItems,a=f(o,["fetchItems"]);return n.useEffect((function(){t.length&&i(t)}),[null==t?void 0:t.length]),a}function v(t){var e,r,u,f,h,m=null!==(e=t._getKey)&&void 0!==e?e:function(t){return"object"===s(t)?t.id:t},v=n.useRef(new Set),p=(f=n.useState([]),h=2,function(t){if(Array.isArray(t))return t}(f)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(f,h)||c(f,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=p[0],g=p[1],b=o.a.useBasicFetchAll(y),w=i.m.flatten(b.data),E=b.data.length?w.reduce((function(t,e){return Object.assign(Object.assign({},t),l({},m(e),e))}),{}):null;return{hasFirstRequestCompleted:!!(null===(u=null===(r=b.responses)||void 0===r?void 0:r[0])||void 0===u?void 0:u.hasCompleted),itemsArr:w,items:E,isFetching:b.isFetching,fetchItems:function(e){if(null==e?void 0:e.length){var r=[];e.forEach((function(t){var e=m(t);v.current.has(e)||(r.push(t),v.current.add(e))})),r.length&&g((function(e){return[].concat(a(e),a(i.m.chunk(r,d).map(t.getRequest)))}))}}}}},60115:(t,e,r)=>{r.d(e,{K:()=>s});var n=r(32735),o=r(50242),i=r(91967),a=400,c=r(45719);function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e,r,s,l,f){var d,h,m,v,p=(d=(0,n.useState)(0),h=2,function(t){if(Array.isArray(t))return t}(d)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(d,h)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(d,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=p[0],g=p[1],b=e,w=(0,c.P)((function(e){if(!t)return null;var r=t(e);return r?r.key:null}),s,l);return m={fetchNextPage:function(){if(e&&t&&w)return g((function(t){return t+1})),b(w.nextCursor)},hasMore:!!(null==w?void 0:w.nextCursor),isFetching:null==w?void 0:w.isFetching,scrollContainer:f},v=function(){if(!m.isFetching){if(m.scrollContainer){var t=m.scrollContainer;if(t.getBoundingClientRect().height+t.scrollTop<t.scrollHeight-a)return}else if(window.innerHeight+document.documentElement.scrollTop<document.documentElement.scrollHeight-a)return;m.fetchNextPage()}},(0,n.useEffect)((function(){var t=i.q.throttle(v,200),e=m.scrollContainer||window;return m.hasMore&&e.addEventListener("scroll",t),function(){return e.removeEventListener("scroll",t)}}),[m.hasMore,m.fetchNextPage,m.scrollContainer]),(0,n.useEffect)((function(){w&&w.shouldInitialFetch&&e&&(b(),g((function(t){return t+1})))}),[null==w?void 0:w.shouldInitialFetch,e]),(0,n.useEffect)((function(){var t,e;if((null==w?void 0:w.statusCode)&&i.q.isFunction(r)){var n=+(null===(e=null===(t=w.statusCode)||void 0===t?void 0:t.toString())||void 0===e?void 0:e.substr(0,1));n!==o.k.ClientError&&n!==o.k.ServerError||r(y,w.statusCode)}}),[null==w?void 0:w.statusCode]),{items:null==w?void 0:w.items,hasMore:!!(null==w?void 0:w.nextCursor),nextCursor:null==w?void 0:w.nextCursor,isFetching:null==w?void 0:w.isFetching,totalItems:null==w?void 0:w.totalItems,hasFirstPageCompleted:null==w?void 0:w.hasFirstPageCompleted}}},87821:(t,e,r)=>{r.d(e,{p:()=>a});var n=r(99940),o=r(110);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var a={userVideoHistory:function(t,e,r,n){var i="video:history",a="{gateway}/v1/users/me/watch-history";return t&&(i+=":".concat(t),a+="?cursor=".concat(t)),{key:i,url:a,formatData:function(t){return{data:t.data.map((function(t){var e=o.O.format(t.lastTimeWatched),r=o.O.format(e,"YYYY-MM-DD");return Object.assign(Object.assign({},t),{lastTimeWatched:e,lastDateWatched:r})})),pagination:t.pagination}},success:e,error:r,always:n}},videoHistory:function(t,e,r,n,o){var i=t.sort().map((function(t){return"videoId=".concat(t)}));return{key:"video:history:videos:".concat(i.join("&")),url:"{gateway}/v1/videos/history?".concat(i.join("&")),normalizeOptions:{namespace:e},formatData:function(t){return(null==t?void 0:t.length)?t.map((function(t){return{id:t.videoId,lastProgressPoint:t.lastProgressPoint}})):t},success:r,error:n,always:o}},removeFromHistory:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{url:"{gateway}/v1/users/me/videos/".concat(t,"/watch-history"),key:"remove:video:history:".concat(t),type:n.k.DELETE,invalidationKeys:["video:history"].concat((e=r,function(t){if(Array.isArray(t))return i(t)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}}}},79345:(t,e,r)=>{r.r(e),r.d(e,{WatchHistoryView:()=>z});var n=r(32735),o=r(23481),i=r(20354),a=r(49985),c=r(65858),u=r(87801),s=r(83345),l=r(51365),f=r(16714),d=r(69883),h=r(22902),m=r(79612),v=r(58321),p=r(44110),y=r(75896),g=r(110),b=r(75100),w=r(10741),E=r(22490);function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}var P="watchHistory.watchHistoryVideoList";function A(t){var e=(0,h.T)().hasPermissions,r=y.m.groupBy(t.videoHistory,"lastDateWatched"),i={},a=Object.keys(r).sort().reverse();a.forEach((function(e){i[e]=r[e].map((function(e){var r=t.videos.find((function(t){return t.id.toString()===e.videoId.toString()}));return r?Object.assign(Object.assign({},r),{lastProgressPoint:e.lastProgressPoint}):null})).filter(Boolean)}));var c=a.reduce((function(t,e){var r,n,o,a,c=i[e].length,u=c+(null!==(r=t.runningTotal)&&void 0!==r?r:0);return Object.assign(Object.assign({},t),(n={runningTotal:u},a=u-c,(o=function(t){var e=function(t){if("object"!=S(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==S(e)?e:e+""}(o=e))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a,n))}),{});return n.createElement(n.Fragment,null,a.map((function(r){return i[r].length?n.createElement("div",{key:r,className:"pb-3"},n.createElement("h2",{className:"h4"},function(t){var e=g.O.timeSince(new Date(t),"day");return 0===e?o.T.getPhrase(P,"today"):1===e?o.T.getPhrase(P,"yesterday"):g.O.format(t,"Do MMMM")}(r)),n.createElement(b.E4,{videos:i[r],getVideoAppLink:E.W.getAppLink,hasPermissions:e,startingPositionIndex:c[r],presentationAudiences:t.presentationAudiences,getPreviewQuestionsAppLink:function(t){return w.j.getPreviewQuestionsAppLink(t)},commonVideoProps:t.commonVideoProps})):n.createElement(n.Fragment,{key:r})})))}var x=r(87821),O=r(94644),L=r(31949),F=r(1575),j=r(39902),k=r(60115),C=r(97816),I="watchHistory.hooks",T=r(35223),N=r(10671);function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var V="watchHistory.hooks",_=r(97958),D=r(99742),M=r(14070),R=r(97291),G="watchHistory.watchHistoryEmptyState",W=o.T.encloseNamespace(G);function U(t){var e=t.hasDiscover;return n.createElement(s.D.Provider,{value:G},n.createElement(_.u,null,n.createElement(_.u.Image,{src:D.W.EmptyStates.WATCH_HISTORY,altText:W("info")}),n.createElement(_.u.Heading,null,n.createElement(s.x,{phrase:"heading"})),n.createElement(_.u.Info,null,n.createElement(s.x,{phrase:"info"})),e&&n.createElement(_.u.Cta,{text:o.T.getPhrase(G,"cta"),appLink:{application:R.O.DASHBOARD,action:M.e.Dashboard.HOME}})))}function q(){return n.createElement(s.D.Provider,{value:G},n.createElement(_.u,null,n.createElement(_.u.Image,{src:D.W.EmptyStates.WATCH_HISTORY_PUBLIC,altText:W("publicInfo")}),n.createElement(_.u.Heading,null,n.createElement(s.x,{phrase:"publicHeading"})),n.createElement(_.u.Info,null,n.createElement(s.x,{phrase:"publicInfo"})),n.createElement(_.u.Cta,{text:o.T.getPhrase(G,"publicCta"),appLink:{application:R.O.SIGN_UP,action:M.e.SignUp.SIGN_UP},analyticsData:{},analyticsOptions:{actionType:c.Vw.Click,location:c.LZ.WatchHistoryLanding,entity:c.py.AppLink,workflowPhase:c.eu.Start,descriptor:c.Yu.SignUp}})))}var B=r(1860);const Y={partialDate:"vq4eE"};function Q(){return n.createElement(n.Fragment,null,n.createElement("div",{className:"mb-3"},n.createElement("div",{className:"".concat(Y.partialDate," mb-2 partial-loading-background")}),n.createElement(B.S,{numVideos:2})),n.createElement("div",{className:"mb-3"},n.createElement("div",{className:"".concat(Y.partialDate," mb-2 partial-loading-background")}),n.createElement(B.S,{numVideos:3})),n.createElement("div",{className:"mb-3"},n.createElement("div",{className:"".concat(Y.partialDate," mb-2 partial-loading-background")}),n.createElement(B.S,{numVideos:2})),n.createElement("div",{className:"mb-3"},n.createElement("div",{className:"".concat(Y.partialDate," mb-2 partial-loading-background")}),n.createElement(B.S,{numVideos:5})))}function K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function Z(){Z=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new k(n||[]);return o(a,"_invoke",{value:O(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",h="suspendedYield",m="executing",v="completed",p={};function y(){}function g(){}function b(){}var w={};s(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(C([])));S&&S!==r&&n.call(S,a)&&(w=S);var P=b.prototype=y.prototype=Object.create(w);function A(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==K(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=d;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===p)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?v:h,s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=v,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,p;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,p):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function F(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(F,this),this.reset(!0)}function C(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(K(e)+" is not iterable")}return g.prototype=b,o(P,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(x.prototype),s(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(P),s(P,u,"Generator"),s(P,a,(function(){return this})),s(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=C,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),p}},e}var $=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function c(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}u((n=n.apply(t,e||[])).next())}))},X="watchHistory.watchHistory";function z(){(0,m.M)({title:o.T.getPhrase(X,"pageTitle")});var t=i.a.useGetFetchAsync(),e=(0,h.T)(),r=e.hasPermissions,y=e.hasLocalPermissions,g=(0,d.Z)(),b=(0,v.U)({locationContext:c.LZ.VideoThumbnail}).commonVideoProps,w=function(){var e=(0,N._)({location:N.i.VideoItem});return Object.assign(Object.assign({},e),{getVideoActions:function(r,n){var i,u={label:o.T.getPhrase(V,"removeFromWatchHistory"),button:!1,svgName:T.vn.Delete,className:"text-danger",onClick:function(){!function(e){$(this,void 0,void 0,Z().mark((function r(){return Z().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,t(x.p.removeFromHistory(e.id));case 3:g.success(o.T.getPhrase(X,"removeFromHistorySuccess")),a.k.logUserAction({id:e.id,name:e.name},{entity:c.py.Video,actionType:c.Vw.Click,descriptor:c.XX.RemoveFromWatchHistory,location:c.LZ.VideoListItem}),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),g.error(o.T.getPhrase(X,"removeFromHistoryError",{name:e.name}));case 10:case"end":return r.stop()}}),r,null,[[0,7]])})))}(r)},group:"delete"};return[].concat(function(t){if(Array.isArray(t))return H(t)}(i=e.getVideoActions(r,n))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return H(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?H(t,e):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[u])}})}(),E=function(){var t,e=i.a.useGetFetch(),r=(0,d.Z)(),n=(0,h.T)().hasLocalPermissions,a=i.a.useBasicFetch(L.N.currentUser());function c(t){return x.p.userVideoHistory(t)}function u(t){return e(c(t))}var s=!n(f.E.ViewWatchHistoryLanding)&&a.hasCompleted,l=(0,k.K)(!!s&&c,u,(function(t,e){if(1===t)return(0,O.r)(e);r.error(o.T.getPhrase(I,"error"))})),m=l.items,v=l.hasMore,p=l.isFetching,y=null!==(t=null==m?void 0:m.map((function(t){return t.object})))&&void 0!==t?t:[],g=(0,j.FN)(y.map((function(t){return t.id})),F.R.watchHistoryVideos);return(0,C.V)(y),{videoHistory:m,videos:y,fetchNext:u,isFetching:p,hasMore:v,hasFetchedFirstPage:g.hasFirstRequestCompleted}}(),S=E.videoHistory,P=E.videos,_=E.fetchNext,D=E.hasMore,M=E.hasFetchedFirstPage,R=E.isFetching,G=(0,p.i)();return y(f.E.ViewWatchHistoryLanding)?n.createElement(q,null):n.createElement(s.D.Provider,{value:X},n.createElement("div",{className:"px-3"},n.createElement("h1",{className:"h2"},n.createElement(s.x,{phrase:"heading"})),M?P.length?n.createElement(l.M.Provider,{value:w},n.createElement(A,{videoHistory:S,videos:P,presentationAudiences:G.data,commonVideoProps:b}),(D||R)&&n.createElement(u._,{isFetching:R,fetchNext:_})):n.createElement(U,{hasDiscover:r(f.C.ViewDiscover)}):n.createElement(Q,null)))}},58321:(t,e,r)=>{r.d(e,{U:()=>m});var n=r(20354),o=r(16714),i=r(39151),a=r(1666),c=r(31949),u=r(22902),s=r(37802),l=r(22490),f=r(82431),d=r(46390),h=r(27638);function m(t){var e,r,m,v=t||{},p=v.locationContext,y=v.mtv,g=v.flightNamespace,b=v.sharedPlaylist,w=(0,d.G)(),E=w.isPlugin,S=w.params,P=(0,h.u)(p,g),A=P.setFavourite,x=P.canFavourite,O=(0,s.r)(null),L=O.hasTopicDirectories,F=O.isLoadingSettings,j=(0,u.T)(),k=j.hasPermissions,C=j.isLoaded,I=k(o.C.StudentExperience),T=n.a.useBasicFetch(i.L.config()),N=n.a.useBasicFetch(c.N.currentUser()),H=n.a.useBasicFetch((null===(e=N.data)||void 0===e?void 0:e.isAuthenticated)&&a.h.yearGroups(N.data.customerId));return{hasCommonVideoPropsCompleted:!F&&C&&T.hasCompleted&&N.hasCompleted&&(!(null===(r=N.data)||void 0===r?void 0:r.isAuthenticated)||H.hasCompleted),commonVideoProps:{subTextType:"series",getSubTextAppLink:function(t){var e;return"series"in t?b&&!(null===(e=N.data)||void 0===e?void 0:e.isAuthenticated)?null:f.j.getSeriesAppLink(t.series,{mtv:y}):null},isPlugin:E,isPluginPopup:!!(null==S?void 0:S.popup),canFavourite:x,setFavourite:A,imageCdnUrl:null===(m=T.data)||void 0===m?void 0:m.imageCdnUrl,yearGroups:H.data,getClassroomGuideAppLink:l.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:l.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:l.W.getResourceGuidanceAppLink,showNewVideoIndicator:L,companyLogoFallbackUrl:null,hasStudentExperience:I}}}},44110:(t,e,r)=>{r.d(e,{i:()=>a});var n=r(20354),o=r(89454),i=r(86698),a=function(){var t=(0,i.y)({redirectOnError:!0}),e=t.activePresentation,r=t.getFallbackPresentation,a=e||r();return n.a.useBasicFetch(!!a&&o.O.presentationAudiences(a.id))}},97816:(t,e,r)=>{r.d(e,{V:()=>c,l:()=>u});var n=r(1575),o=r(39902),i=r(31908);function a(t){return t?Array.isArray(t)?t.filter((function(t){return!!t&&(i.M.isVideo(t)||i.M.isClip(t))})):"data"in t?t.data.filter((function(t){return!!t&&(i.M.isVideo(t)||i.M.isClip(t))})):[]:[]}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a(t).map((function(t){return t.id}));(0,o.FN)(r,(function(t){return n.R.videoMixinAssocs(t,e.flightNamespace)}),null)}function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,o.SW)({getRequest:function(e){return n.R.videoMixinAssocs(e,t.flightNamespace)}}).fetchItems;return{fetchObjects:function(t){return e(a(t).map((function(t){return t.id})))}}}}}]);
|
|
3
|
+
//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AAA,uDAA6B,CAAC,EAStDD,GAAe,QAAyB,CAAElB,WARlD,SAAoByF,GAClB,OAAO,qBAA+BA,EAAKtE,EAAQ4L,gBACrD,IAMQ7L,WAER,MAAO,CAAEmO,aANT,SAAsB9O,GACpB,OAAOW,EAAW4N,EAAgBvO,GAAOL,KAAI,SAAAoH,GAAC,OAAIA,EAAE1G,EAAE,IACxD,EAKF","sources":["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/flight-requests/VideoHistoryRequests.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/hooks/useWatchHistory.ts","file:///app/packages/projects/lite/src/apps/watch-history/hooks/useWatchHistoryVideoActions.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/useCommonVideoProps.ts","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts","file:///app/packages/projects/lite/src/shared/hooks/useVideoMixin.ts"],"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 internalServerError?: 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 internalServerError: 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.InternalServer) {\n if (!ignoreMap.internalServerError)\n Core.ErrorHelper.throw(new UnspecifiedError());\n return;\n }\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';\n\nimport { Flight } from 'libs/common/flight';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { BaseObject } from 'libs/shared/interfaces';\n\nconst CHUNK_SIZE = 50;\n\nexport interface UseBatchFetchResult<T extends BaseObject> {\n itemsArr: T[];\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 chunks = ArrayHelper.chunk<string>(itemIds, CHUNK_SIZE);\n\n const requests = chunks.map(chunk => getRequest(ArrayHelper.uniq(chunk)));\n\n const responses = Flight.useBasicFetchAll<T[]>(requests);\n\n const itemsArr = ArrayHelper.flatten(responses.data);\n const items = responses.data.length\n ? itemsArr.reduce((acc, item) => ({ ...acc, [item.id]: item }), {})\n : null;\n\n return {\n itemsArr,\n items,\n isFetching: responses.isFetching\n };\n}\n\n/**\n * When you need the useBatchFetch() behavior, but your list of objects to hydrate\n * will grow, such as on a scrolling page. useGrowingBatchFetch() will use local state\n * to determine what we've already built a request for and what items are new\n * as to not re-fetch items - Sha\n */\nexport function useGrowingBatchFetch<T>(\n objs: T[],\n getRequest: (items: T[]) => Flight.Request,\n _getKey?: (obj: T) => string\n) {\n const { fetchItems, ...data } = useGrowingBatchFetchFunc({ getRequest, _getKey });\n\n React.useEffect(() => {\n if (!objs.length)\n return;\n\n fetchItems(objs);\n }, [objs?.length]);\n\n return data;\n}\n\ninterface UseGrowingBatchFetchFuncOptions<T> {\n getRequest: (items: T[]) => Flight.Request;\n _getKey?: (obj: T) => string;\n}\n\n/**\n * When you need the useGrowingBatchFetch() behaviour, but need to trigger the\n * fetch manually and update the objects - Nish \n */\nexport function useGrowingBatchFetchFunc<T>(options: UseGrowingBatchFetchFuncOptions<T>) {\n const getKey = options._getKey ?? ((obj: any) => {\n if (typeof obj === 'object')\n return obj.id;\n\n return obj;\n });\n\n const fetchedItems = React.useRef<Set<string>>(new Set<string>());\n const [ requests, setRequests ] = React.useState<Flight.Request[]>([]);\n\n function fetchItems(objs: T[]) {\n if (!objs?.length)\n return;\n\n const unfetchedItems: T[] = [];\n \n objs.forEach(obj => {\n const key = getKey(obj);\n\n if (fetchedItems.current.has(key))\n return;\n\n unfetchedItems.push(obj);\n fetchedItems.current.add(key);\n });\n \n if (!unfetchedItems.length)\n return;\n \n setRequests(r => ([ ...r, ...ArrayHelper.chunk<T>(unfetchedItems, CHUNK_SIZE).map(options.getRequest) ]));\n }\n\n const responses = Flight.useBasicFetchAll<T[]>(requests);\n const itemsArr = ArrayHelper.flatten(responses.data);\n const items = responses.data.length\n ? itemsArr.reduce((acc, item) => ({ ...acc, [getKey(item)]: item }), {})\n : null;\n\n return {\n hasFirstRequestCompleted: !!responses.responses?.[0]?.hasCompleted,\n itemsArr,\n items,\n isFetching: responses.isFetching,\n fetchItems\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}","\nimport { HttpVerbs } from 'libs/common/backbone/enums/HttpVerbs';\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\n removeFromHistory(videoId: string, invalidationKeys: string[] = []): Flight.Request {\n return {\n url: `{gateway}/v1/users/me/videos/${videoId}/watch-history`,\n key: `remove:video:history:${videoId}`,\n type: HttpVerbs.DELETE,\n invalidationKeys: [\n 'video:history',\n ...invalidationKeys\n ]\n };\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 { PresentationAudience, VideoHistory, VideoTypes } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\n\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\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 presentationAudiences?: PresentationAudience[];\n commonVideoProps: CommonVideoProps;\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 getVideoAppLink={VideoAppLinkHelper.getAppLink}\n hasPermissions={hasPermissions}\n startingPositionIndex={sortedDatesGroupCount[date]}\n presentationAudiences={props.presentationAudiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n commonVideoProps={props.commonVideoProps}\n />\n </div>\n );\n })}\n </>\n );\n}","import { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/react/index';\n\nimport { LocalPermissionName } from 'libs/shared/enums/PermissionName';\nimport { handleHttpError } from 'libs/shared/errors/handlers/HttpErrorHandlers';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useGrowingBatchFetch } from 'libs/shared/hooks/UseBatchFetch';\nimport { useInfiniteList } from 'libs/shared/hooks/UseInfiniteList';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CurrentUser, VideoHistory } from 'libs/shared/interfaces';\n\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\n\nimport { VideoHistoryRequests } from '../flight-requests/VideoHistoryRequests';\n\nconst namespace = 'watchHistory.hooks';\n\nexport function useWatchHistory() {\n const fetch = Flight.useGetFetch();\n const alerts = useAlerts();\n const { hasLocalPermissions } = usePermissions();\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n function getUserVideoHistoryRequest(cursor?: string) {\n return VideoHistoryRequests.userVideoHistory(cursor);\n }\n\n function fetchNext(cursor?: string) {\n return fetch(getUserVideoHistoryRequest(cursor));\n }\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 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 const videos = videoHistory?.map(v => v.object) ?? [];\n \n // Hydrate the videos\n const hydratedVideos = useGrowingBatchFetch(videos.map(v => v.id), VideoRequests.watchHistoryVideos);\n\n useVideoMixin(videos);\n\n return {\n videoHistory,\n videos,\n fetchNext,\n isFetching,\n hasMore,\n hasFetchedFirstPage: hydratedVideos.hasFirstRequestCompleted\n };\n}","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { VideoActionsOptions } from 'libs/shared/context/VideoActionsContext';\nimport { Video, VideoTypes } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\n\nconst namespace = 'watchHistory.hooks';\n\nexport function useWatchHistoryViewActions(removeFromVideoHistory: (v: Video) => void) {\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n\n const getVideoActions = (video: VideoTypes, options?: VideoActionsOptions) => {\n const removeFromWatchHistoryAction = {\n label: LanguageService.getPhrase(namespace, 'removeFromWatchHistory'),\n button: false,\n svgName: cvSvgLibrary.Delete,\n className: 'text-danger',\n onClick: () => {\n removeFromVideoHistory(video);\n },\n // Event logging for this action is handled by the `removeFromVideoHistory` callback\n group: 'delete'\n };\n\n return [ ...videoActions.getVideoActions(video, options), removeFromWatchHistoryAction ];\n };\n\n return {\n ...videoActions,\n getVideoActions\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\ninterface WatchHistoryEmptyStateProps {\n hasDiscover: boolean;\n}\n\nexport function WatchHistoryEmptyState({ hasDiscover }: WatchHistoryEmptyStateProps): 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 {hasDiscover &&\n <EmptyState.Cta\n text={LanguageService.getPhrase(namespace, 'cta')}\n appLink={{\n application: AppChannels.DASHBOARD,\n action: Actions.Dashboard.HOME\n }}\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';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, UserAction, VideoActionDescriptor } 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, PermissionName } from 'libs/shared/enums/PermissionName';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Video } from 'libs/shared/interfaces';\n\nimport { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\n\nimport { WatchHistoryVideoList } from 'apps/watch-history/components/watch-history-video-list/WatchHistoryVideoList';\nimport { VideoHistoryRequests } from 'apps/watch-history/flight-requests/VideoHistoryRequests';\nimport { useWatchHistory } from 'apps/watch-history/hooks/useWatchHistory';\nimport { useWatchHistoryViewActions } from 'apps/watch-history/hooks/useWatchHistoryVideoActions';\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 fetchAsync = Flight.useGetFetchAsync();\n const { hasPermissions, hasLocalPermissions } = usePermissions();\n const alerts = useAlerts();\n\n const { commonVideoProps } = useCommonVideoProps({ locationContext: LocationContext.VideoThumbnail });\n const videoActions = useWatchHistoryViewActions(removeFromVideoHistory);\n\n const {\n videoHistory,\n videos,\n fetchNext,\n hasMore,\n hasFetchedFirstPage,\n isFetching\n } = useWatchHistory();\n\n async function removeFromVideoHistory(video: Video): Promise<void> {\n try {\n await fetchAsync<void>(VideoHistoryRequests.removeFromHistory(video.id));\n\n alerts.success(LanguageService.getPhrase(namespace, 'removeFromHistorySuccess'));\n\n AnalyticsHelper.logUserAction({\n id: video.id,\n name: video.name\n }, {\n entity: EntityType.Video,\n actionType: UserAction.Click,\n descriptor: VideoActionDescriptor.RemoveFromWatchHistory,\n location: LocationContext.VideoListItem\n });\n } catch {\n alerts.error(LanguageService.getPhrase(namespace, 'removeFromHistoryError', { name: video.name }));\n }\n }\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 (!hasFetchedFirstPage)\n return <PartialWatchHistory />;\n\n if (!videos.length)\n return <WatchHistoryEmptyState hasDiscover={hasPermissions(PermissionName.ViewDiscover)} />;\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <WatchHistoryVideoList\n videoHistory={videoHistory}\n videos={videos}\n presentationAudiences={audiences.data}\n commonVideoProps={commonVideoProps}\n />\n {(hasMore || isFetching) && <InfiniteScrollFooter isFetching={isFetching} fetchNext={fetchNext} />}\n </VideoActionsContext.Provider>\n );\n })()}\n </div>\n </LanguageNamespaceContext.Provider>\n );\n}","import { Core } from 'libs/common/backbone/index';\nimport { Flight } from 'libs/common/react/index';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Config, CurrentUser, VideoTypes, YearGroup } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\n\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\n\nimport { usePluginHelper } from './use-plugin-helper/usePluginHelper';\nimport { useLiteFavourites } from './useLiteFavourites';\n\ninterface UseCommonVideoPropsResult {\n hasCommonVideoPropsCompleted: boolean;\n commonVideoProps: CommonVideoProps;\n}\n\ninterface UseCommonVideoPropsOptions {\n locationContext: LocationContext,\n mtv?: boolean;\n flightNamespace?: string;\n sharedPlaylist?: boolean;\n}\n\nexport function useCommonVideoProps(options: UseCommonVideoPropsOptions): UseCommonVideoPropsResult {\n const { locationContext, mtv, flightNamespace, sharedPlaylist } = options || {};\n\n const { isPlugin, params } = usePluginHelper();\n const { setFavourite, canFavourite } = useLiteFavourites(locationContext, flightNamespace);\n const { hasTopicDirectories, isLoadingSettings } = useSettings(null);\n const { hasPermissions, isLoaded: hasLoadedPermissions } = usePermissions();\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\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 function getSubTextAppLink(video: VideoTypes): Core.AppLink {\n if (!('series' in video))\n return null;\n\n /**\n * We do not allow navigating to series on shared playlists when the user is not signed in\n * because most series are customer created and will be empty for public users\n * \n * We do not have to do this for shared series, because all the series links are self referencing\n * - Sha\n */\n if (sharedPlaylist && !currentUser.data?.isAuthenticated)\n return null;\n \n return SeriesAppLinkHelper.getSeriesAppLink(video.series, { mtv });\n }\n\n const hasCommonVideoPropsCompleted = (\n !isLoadingSettings &&\n hasLoadedPermissions &&\n config.hasCompleted &&\n currentUser.hasCompleted &&\n (!currentUser.data?.isAuthenticated || yearGroups.hasCompleted)\n );\n\n return {\n hasCommonVideoPropsCompleted,\n commonVideoProps: {\n subTextType: 'series',\n getSubTextAppLink,\n isPlugin,\n isPluginPopup: !!params?.popup,\n canFavourite,\n setFavourite,\n imageCdnUrl: config.data?.imageCdnUrl,\n yearGroups: yearGroups.data,\n getClassroomGuideAppLink: VideoAppLinkHelper.getClassroomGuideAppLink,\n getInteractiveGuidanceAppLink: VideoAppLinkHelper.getInteractiveGuidanceAppLink,\n getResourceGuidanceAppLink: VideoAppLinkHelper.getResourceGuidanceAppLink,\n showNewVideoIndicator: hasTopicDirectories,\n companyLogoFallbackUrl: null,\n hasStudentExperience\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, getFallbackPresentation } = usePresentation({ redirectOnError: true });\n\n const presentation = activePresentation || getFallbackPresentation();\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!presentation &&\n AudienceRequests.presentationAudiences(presentation.id)\n );\n\n return audiences;\n};","import { Flight } from 'libs/common/react/index';\n\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useGrowingBatchFetch, useGrowingBatchFetchFunc } from 'libs/shared/hooks/UseBatchFetch';\nimport { Clip, ClipCollection, Video, VideoCollection } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ntype Types = Video[] | VideoCollection | Clip[] | ClipCollection;\n\nfunction getValidObjects(objects: Types): (Video | Clip)[] {\n if (!objects)\n return [];\n\n if (Array.isArray(objects))\n return objects.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n if ('data' in objects)\n return objects.data.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n return [];\n}\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(objects: Types, options: VideoMixinOptions = {}) {\n const videoIds = getValidObjects(objects).map(v => v.id);\n\n useGrowingBatchFetch(\n videoIds,\n ids => VideoRequests.videoMixinAssocs(ids, options.flightNamespace),\n null\n );\n}\n\nexport function useVideoMixinFunc(options: VideoMixinOptions = {}) {\n function getRequest(ids: string[]): Flight.Request {\n return VideoRequests.videoMixinAssocs(ids, options.flightNamespace);\n }\n \n function fetchObjects(items: Types) {\n return fetchItems(getValidObjects(items).map(v => v.id));\n }\n\n const { fetchItems } = useGrowingBatchFetchFunc({ getRequest });\n\n return { fetchObjects };\n}"],"names":["defaultErrors","notFound","forbidden","rating","yearLevel","region","privacy","badRequest","internalServerError","handleHttpError","info","customErrorMap","ignoreMap","statusCode","status","errorMap","CHUNK_SIZE","useBatchFetch","itemIds","getRequest","requests","map","chunk","responses","itemsArr","data","items","length","reduce","acc","item","id","isFetching","useGrowingBatchFetch","objs","_getKey","useGrowingBatchFetchFunc","fetchItems","options","getKey","obj","fetchedItems","Set","setRequests","hasFirstRequestCompleted","hasCompleted","unfetchedItems","forEach","key","current","has","push","add","r","SCROLL_TOLERANCE","useInfiniteList","fetchNext","onError","getItems","getCursor","scrollContainer","handleScroll","useState","pagesFetched","setPagesFetched","fetchNextFn","response","cursor","request","fetchNextPage","currentVal","nextCursor","hasMore","getBoundingClientRect","height","scrollTop","scrollHeight","window","innerHeight","document","documentElement","useEffect","onScroll","FunctionHelper","addEventListener","removeEventListener","shouldInitialFetch","httpStatusClass","toString","substr","HttpStatus","totalItems","hasFirstPageCompleted","VideoHistoryRequests","userVideoHistory","success","error","always","url","formatData","historyCollection","historyData","lastTimeWatchedLocal","lastTimeWatched","lastDateWatchedLocal","lastDateWatched","pagination","videoHistory","ids","namespace","params","sort","i","join","normalizeOptions","watchHistory","videoId","lastProgressPoint","removeFromHistory","invalidationKeys","type","WatchHistoryVideoList","props","hasPermissions","usePermissions","historyGroups","ArrayHelper","videoGroups","sortedDates","Object","keys","reverse","date","history","video","videos","find","v","filter","Boolean","sortedDatesGroupCount","dateCounts","currentDate","dateTotal","runningTotal","className","diff","DateHelper","Date","LanguageService","formatDate","VideoList","getVideoAppLink","VideoAppLinkHelper","startingPositionIndex","presentationAudiences","getPreviewQuestionsAppLink","interactive","InteractiveHelper","commonVideoProps","getPhrase","WatchHistoryEmptyState","hasDiscover","value","EmptyState","src","ImageUrls","altText","Text","phrase","text","appLink","application","action","WatchHistoryPublicEmptyState","analyticsData","analyticsOptions","actionType","location","entity","workflowPhase","descriptor","SignUp","PartialWatchHistory","PartialVideoList","numVideos","WatchHistoryView","useSetPageMetadata","title","fetchAsync","hasLocalPermissions","alerts","useCommonVideoProps","locationContext","videoActions","useVideoActions","getVideoActions","removeFromWatchHistoryAction","label","button","svgName","onClick","AnalyticsHelper","name","removeFromVideoHistory","group","useWatchHistoryViewActions","fetch","currentUser","UserRequests","getUserVideoHistoryRequest","shouldFetch","pageNumber","httpStatus","object","hydratedVideos","VideoRequests","useVideoMixin","hasFetchedFirstPage","useWatchHistory","audiences","usePresentationAudiences","VideoActionsContext","InfiniteScrollFooter","PermissionName","mtv","flightNamespace","sharedPlaylist","isPlugin","u","setFavourite","canFavourite","hasTopicDirectories","isLoadingSettings","hasLoadedPermissions","isLoaded","hasStudentExperience","config","yearGroups","isAuthenticated","customerId","hasCommonVideoPropsCompleted","subTextType","getSubTextAppLink","series","isPluginPopup","popup","imageCdnUrl","getClassroomGuideAppLink","getInteractiveGuidanceAppLink","getResourceGuidanceAppLink","showNewVideoIndicator","companyLogoFallbackUrl","redirectOnError","activePresentation","getFallbackPresentation","presentation","getValidObjects","objects","Array","isArray","o","videoIds","useVideoMixinFunc","fetchObjects"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9630],{94644:(e,t,n)=>{n.d(t,{r:()=>l});var r=n(50242),i=n(81886),a=n(67058),o=n(14553),u=n(49267),s=n(49075),c={notFound:a.d,forbidden:{rating:o.q,yearLevel:o.q,region:u.a,privacy:o.q},badRequest:s._,internalServerError:s._};function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var a;a="number"==typeof e?e:e.status;var o=Object.assign(Object.assign({},c),t);a&&i.Q.Ry.isStatusCodeError(a)&&(a!==r.o.InternalServer?a!==r.o.NotFound?a!==r.o.Forbidden?n.badRequest||i.Q.Ry.throw(new o.badRequest):n.forbidden||i.Q.Ry.throw(new o.forbidden.privacy):n.notFound||i.Q.Ry.throw(new o.notFound):n.internalServerError||i.Q.Ry.throw(new s._))}}},39902:(e,t,n)=>{n.d(t,{FN:()=>v,SW:()=>h,fh:()=>p});var r=n(32735),i=n(20354),a=n(75896);function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t,n){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},f=50;function p(e,t){var n=a.m.chunk(e,f).map((function(e){return t(a.m.uniq(e))})),r=i.a.useBasicFetchAll(n),o=a.m.flatten(r.data),u=r.data.length?o.reduce((function(e,t){return Object.assign(Object.assign({},e),l({},t.id,t))}),{}):null;return{itemsArr:o,items:u,isFetching:r.isFetching}}function v(e,t,n){var i=h({getRequest:t,_getKey:n}),a=i.fetchItems,o=d(i,["fetchItems"]);return r.useEffect((function(){e.length&&a(e)}),[null==e?void 0:e.length]),o}function h(e){var t,n,s,d,p,v=null!==(t=e._getKey)&&void 0!==t?t:function(e){return"object"===c(e)?e.id:e},h=r.useRef(new Set),m=(d=r.useState([]),p=2,function(e){if(Array.isArray(e))return e}(d)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,u=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}(d,p)||u(d,p)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=m[0],b=m[1],g=i.a.useBasicFetchAll(y),w=a.m.flatten(g.data),A=g.data.length?w.reduce((function(e,t){return Object.assign(Object.assign({},e),l({},v(t),t))}),{}):null;return{hasFirstRequestCompleted:!!(null===(s=null===(n=g.responses)||void 0===n?void 0:n[0])||void 0===s?void 0:s.hasCompleted),itemsArr:w,items:A,isFetching:g.isFetching,fetchItems:function(t){if(null==t?void 0:t.length){var n=[];t.forEach((function(e){var t=v(e);h.current.has(t)||(n.push(e),h.current.add(t))})),n.length&&b((function(t){return[].concat(o(t),o(a.m.chunk(n,f).map(e.getRequest)))}))}}}}},91286:(e,t,n)=>{n.d(t,{v:()=>o});var r=n(32735),i=n(94644);function a(e){return e.map((function(e){return e.statusCode})).join(":")}function o(e,t,n){var o=Array.isArray(e)?e:[e];(0,r.useEffect)((function(){o.forEach((function(e){(0,i.r)(e.statusCode,t,n)}))}),[a(o),t,n])}},63719:(e,t,n)=>{n.d(t,{h:()=>u});var r=n(32735),i=n(77316);function a(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t,n,u=(t=r.useMemo((function(){return i.p.getBuilder()}),[]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,u=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}(t,n)||a(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],c=(0,u[1])(s);return c&&e?[].concat(function(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(c),[Object.assign(Object.assign({},e),{active:!0})]):c}},10094:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(97395),i=n(78417),a={chaptersAndSubtitles:function(e,t){var n={query:"subtitles[customer],chapters",permissionFilterOption:i.r.StripMetadata,contentRegion:t};return{url:r._.urlBuilder("{gateway}/v1/objects/".concat(e),n),publicUrl:r._.urlBuilder("/api/objects/".concat(e,"/subtitles"),n),key:"videos:".concat(e,":subtitles:chapters:").concat(i.r.StripMetadata),formatData:function(e){return{subtitles:e.subtitles.data,chapters:e.chapters.data}}}},subtitleVtt:function(e,t){return{url:"{player}/srt-to-vtt?url=".concat(e),publicUrl:"/api/player/srt-to-vtt?url=".concat(e),key:"subtitle:".concat(e),formatData:function(e){return Object.assign(Object.assign({},t),{vtt:e})}}}}},58321:(e,t,n)=>{n.d(t,{U:()=>v});var r=n(20354),i=n(16714),a=n(39151),o=n(1666),u=n(31949),s=n(22902),c=n(37802),l=n(22490),d=n(82431),f=n(46390),p=n(27638);function v(e){var t,n,v,h=e||{},m=h.locationContext,y=h.mtv,b=h.flightNamespace,g=h.sharedPlaylist,w=(0,f.G)(),A=w.isPlugin,S=w.params,C=(0,p.u)(m,b),V=C.setFavourite,P=C.canFavourite,F=(0,c.r)(null),I=F.hasTopicDirectories,j=F.isLoadingSettings,O=(0,s.T)(),R=O.hasPermissions,k=O.isLoaded,L=R(i.C.StudentExperience),B=r.a.useBasicFetch(a.L.config()),x=r.a.useBasicFetch(u.N.currentUser()),E=r.a.useBasicFetch((null===(t=x.data)||void 0===t?void 0:t.isAuthenticated)&&o.h.yearGroups(x.data.customerId));return{hasCommonVideoPropsCompleted:!j&&k&&B.hasCompleted&&x.hasCompleted&&(!(null===(n=x.data)||void 0===n?void 0:n.isAuthenticated)||E.hasCompleted),commonVideoProps:{subTextType:"series",getSubTextAppLink:function(e){var t;return"series"in e?g&&!(null===(t=x.data)||void 0===t?void 0:t.isAuthenticated)?null:d.j.getSeriesAppLink(e.series,{mtv:y}):null},isPlugin:A,isPluginPopup:!!(null==S?void 0:S.popup),canFavourite:P,setFavourite:V,imageCdnUrl:null===(v=B.data)||void 0===v?void 0:v.imageCdnUrl,yearGroups:E.data,getClassroomGuideAppLink:l.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:l.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:l.W.getResourceGuidanceAppLink,showNewVideoIndicator:I,companyLogoFallbackUrl:null,hasStudentExperience:L}}}},35014:(e,t,n)=>{n.d(t,{I:()=>f});var r=n(20354),i=n(55171),a=n(16714),o=n(12754),u=n(31949),s=n(22902),c=n(15311),l=n(37802),d=n(11387);function f(e){var t=(0,s.T)(),n=t.hasPermissions,f=t.hasLocalPermissions,p=(0,c.r)().hasProduct,v=r.a.useBasicFetch(u.N.currentUser()),h=(0,l.r)(null).hasPlayPageTranscript,m=p(o.x.Primary);return{canViewGlance:n(a.C.ViewVideoGlance),canViewResources:!0,canViewInteractives:m&&n(a.C.ViewVideoInteractives),canViewClips:m&&n(a.C.ViewVideoClips),canViewCurriculumLinks:n(a.C.ViewCurriculums),canUseActions:f(a.E.UseVideoActions),canViewPublicLayout:!f(a.E.WatchVideos)&&d.C.hasRegionPrefix(),canViewResourceItems:f(a.E.ViewVideoResourceItems),canNavigate:m,canViewTranscript:function(e){var t;return(null===(t=v.data)||void 0===t?void 0:t.isAuthenticated)?h:!!e&&i.e.PublicTranscriptVideoIds.includes(e)}(e)}}},97816:(e,t,n)=>{n.d(t,{V:()=>u,l:()=>s});var r=n(1575),i=n(39902),a=n(31908);function o(e){return e?Array.isArray(e)?e.filter((function(e){return!!e&&(a.M.isVideo(e)||a.M.isClip(e))})):"data"in e?e.data.filter((function(e){return!!e&&(a.M.isVideo(e)||a.M.isClip(e))})):[]:[]}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=o(e).map((function(e){return e.id}));(0,i.FN)(n,(function(e){return r.R.videoMixinAssocs(e,t.flightNamespace)}),null)}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,i.SW)({getRequest:function(t){return r.R.videoMixinAssocs(t,e.flightNamespace)}}).fetchItems;return{fetchObjects:function(e){return t(o(e).map((function(e){return e.id})))}}}},69630:(e,t,n)=>{n.r(t),n.d(t,{PlayView:()=>K});var r=n(32735),i=n(50242),a=n(81886),o=n(23481),u=n(20354),s=n(28400),c=n(65858),l=n(78417),d=n(16714),f=n(67058),p=n(61990),v=n(33803),h=n(89454),m=n(43012),y=n(39151),b=n(20768),g=n(98064),w=n(31949),A=n(1575),S=n(63719),C=n(26304),V=n(91286),P=n(22902),F=n(79612),I=n(37802),j=n(76753),O=n(14070),R=n(97291),k=n(10094),L=n(58321),B=n(82817),x=n(7179),E=n(49948),T=n(36873),M=n(86698),U=n(35014),q=n(97816),N=n(33192),G=n(22490),_=n(91442),D=n(54301),W=n(87026),Q=o.T.encloseNamespace("shared.play"),H={notFound:p.l,forbidden:{privacy:v.G}};function K(e){var t,n,o,p,v,K,$,Y,Z=e.queryParams,z=Z.context,J=Z.contextId,X=Z.playNext,ee=Z.mtv,te=(0,L.U)({locationContext:c.LZ.PlayPage,mtv:ee}),ne=te.commonVideoProps,re=te.hasCommonVideoPropsCompleted,ie=(0,P.T)().hasPermissions,ae=(0,M.y)().activePresentation,oe=(0,I.r)(null),ue=oe.hasPlayPageTranscript,se=oe.hasNewSearch,ce=(0,U.I)(),le=u.a.useBasicFetch(g.D.streamableLearning()),de=u.a.useBasicFetch(w.N.currentUser()),fe=u.a.useBasicFetch(A.R.video(e.id)),pe=u.a.useBasicFetch(ce.canViewClips&&m.e.videoClips(e.id)),ve=u.a.useBasicFetch(ce.canViewInteractives&&b.b.videoInteractives(e.id)),he=u.a.useBasicFetch(ae&&h.O.audiencesByPresentationId(ae.id)),me=(0,D.l)(e.id),ye=u.a.useBasicFetch(me&&(null===(t=de.data)||void 0===t?void 0:t.contentRegion)&&k.F.chaptersAndSubtitles(e.id,de.data.contentRegion)),be=(null==ye?void 0:ye.data)||{},ge=be.subtitles,we=be.chapters,Ae=null==ge?void 0:ge.filter((function(e){return!e.customer})),Se=Ae&&Ae.length>0?Ae.map((function(e){return k.F.subtitleVtt(e.url,e)})):[],Ce=u.a.useBasicFetchAll(Se),Ve=(null==Ae?void 0:Ae.filter((function(e){return Ce.data.find((function(t){return t.id===e.id}))})))||[],Pe=u.a.useBasicFetch(y.L.config()),Fe=(0,_.a)(),Ie=u.a.useBasicFetch(fe.statusCode===i.o.Forbidden&&A.R.video(e.id,l.r.StripMetadata)),je=(0,B.M)(e.id),Oe=(0,T.k)({video:fe.data,context:z,contextId:J,moviesAndTv:ee,currentUser:de.data}),Re=(0,E.l)(e.id,!0),ke=u.a.useBasicFetch(A.R.regionAlternatives(e.id)),Le=(0,S.h)({name:null===(n=fe.data)||void 0===n?void 0:n.name});return(0,F.M)(j.CG.getVideoMetadata({content:fe.data,regionAlternatives:ke.data,phraseContext:{phraseHandler:Q,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:N.f.getCanonicalLink({stripPresentationSlug:!0,customAppLink:G.W.getAppLink(fe.data)}),allowIndexing:N.f.allowIndexing(),hrefLang:N.f.getContentHrefLang(ke.data,(function(e,t){return{application:R.O.VIDEOS,action:O.e.Videos.PLAY_VIDEO,args:[e,s.m.slugify(t)]}}))})),(0,V.v)(fe,H,{forbidden:!0}),(0,q.V)(null!==(o=Oe.videos)&&void 0!==o?o:[]),(0,x.P)({id:e.id,app:"videos"}),(0,C.b)(Ie),r.useEffect((function(){var e;fe.data&&le.data&&(null===(e=fe.data.libraries)||void 0===e?void 0:e.data.find((function(e){return e.id===le.data.objectId})))&&a.Q.Ry.throw(new f.d)}),[fe.hasCompleted,le.hasCompleted]),fe.data&&de.hasCompleted&&Re.hasCompleted&&re?r.createElement(W.j,{video:fe.data,clips:null===(p=pe.data)||void 0===p?void 0:p.data,interactives:null===(v=ve.data)||void 0===v?void 0:v.data,curriculums:je,relatedVideos:Oe,currentUser:de.data,pointsOfInterest:Re.items,playNext:X,featureAccess:ce,audiences:he.data,params:e.queryParams,canManageVideoAccess:ie(d.C.ManageVideoAccess),shouldShowSideTableOfContents:Fe,tableOfContentsId:null===(K=e.queryParams)||void 0===K?void 0:K.tocId,breadcrumbs:Le,commonVideoProps:ne,hasTheatreMode:ue,shouldShowTranscript:me&&(null===($=Ce.data)||void 0===$?void 0:$.length)>0,vttSubtitles:Ce.data||[],subtitles:Ve,chapters:we,isBot:N.f.isBot(),playerApiUrl:null===(Y=Pe.data)||void 0===Y?void 0:Y.playerApiUrl,hasNewSearch:se}):r.createElement(r.Fragment,null)}K.defaultProps={queryParams:{}}},54301:(e,t,n)=>{n.d(t,{l:()=>o});var r=n(20354),i=n(1575),a=n(35014);function o(e,t){var n,o,u=(0,a.I)(e).canViewTranscript,s=r.a.useBasicFetch(t?i.R.sharedVideo(e,t):i.R.video(e));return u&&!!(null===(o=null===(n=s.data)||void 0===n?void 0:n._isClickViewCurated)||void 0===o?void 0:o.value)}}}]);
|
|
2
|
+
//# sourceMappingURL=9630-6bcd453382-lite.chunk.js.map
|