@clickview/lite 0.50.0-rc.4 → 0.50.0-rc.6
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/scripts/{1402-d327ed0365-lite.chunk.js → 1402-8c3babb6af-lite.chunk.js} +2 -2
- package/dist/scripts/1402-8c3babb6af-lite.chunk.js.map +1 -0
- package/dist/scripts/{1437-0db2164033-lite.chunk.js → 1437-2931819506-lite.chunk.js} +2 -2
- package/dist/scripts/{1437-0db2164033-lite.chunk.js.map → 1437-2931819506-lite.chunk.js.map} +1 -1
- package/dist/scripts/{1518-9961f6d99b-lite.chunk.js → 1518-e6c8ab0c89-lite.chunk.js} +2 -2
- package/dist/scripts/1518-e6c8ab0c89-lite.chunk.js.map +1 -0
- package/dist/scripts/{1820-006bcd8691-lite.chunk.js → 1820-818cf5a35d-lite.chunk.js} +2 -2
- package/dist/scripts/{1820-006bcd8691-lite.chunk.js.map → 1820-818cf5a35d-lite.chunk.js.map} +1 -1
- package/dist/scripts/{1895-933141db03-lite.chunk.js → 1895-a799be78c3-lite.chunk.js} +3 -3
- package/dist/scripts/{1895-933141db03-lite.chunk.js.map → 1895-a799be78c3-lite.chunk.js.map} +1 -1
- package/dist/scripts/{2446-c6b50a79cd-lite.chunk.js → 2446-acc94130ed-lite.chunk.js} +3 -3
- package/dist/scripts/{2446-c6b50a79cd-lite.chunk.js.map → 2446-acc94130ed-lite.chunk.js.map} +1 -1
- package/dist/scripts/{2703-430c5a5fc1-lite.chunk.js → 2703-6ae830c2e6-lite.chunk.js} +2 -2
- package/dist/scripts/2703-6ae830c2e6-lite.chunk.js.map +1 -0
- package/dist/scripts/{2724-9b1a944cfb-lite.chunk.js → 2724-ee3a51e0c9-lite.chunk.js} +2 -2
- package/dist/scripts/{2724-9b1a944cfb-lite.chunk.js.map → 2724-ee3a51e0c9-lite.chunk.js.map} +1 -1
- package/dist/scripts/{3070-4e82411f0c-lite.chunk.js → 3070-07721de8f8-lite.chunk.js} +2 -2
- package/dist/scripts/3070-07721de8f8-lite.chunk.js.map +1 -0
- package/dist/scripts/{5242-04c52713f2-lite.chunk.js → 5242-76b32478bc-lite.chunk.js} +2 -2
- package/dist/scripts/5242-76b32478bc-lite.chunk.js.map +1 -0
- package/dist/scripts/{537-92893a696e-lite.chunk.js → 537-850ad2ee25-lite.chunk.js} +3 -3
- package/dist/scripts/{537-92893a696e-lite.chunk.js.map → 537-850ad2ee25-lite.chunk.js.map} +1 -1
- package/dist/scripts/{5936-59acb26157-lite.chunk.js → 5936-7ad136f2a3-lite.chunk.js} +2 -2
- package/dist/scripts/5936-7ad136f2a3-lite.chunk.js.map +1 -0
- package/dist/scripts/6181-7a4fc8e1e1-lite.chunk.js +2 -0
- package/dist/scripts/6181-7a4fc8e1e1-lite.chunk.js.map +1 -0
- package/dist/scripts/{6263-0be2ae1ab4-lite.chunk.js → 6263-a60b811d93-lite.chunk.js} +2 -2
- package/dist/scripts/6263-a60b811d93-lite.chunk.js.map +1 -0
- package/dist/scripts/{6309-79092eb273-lite.chunk.js → 6309-dd3a8e7f21-lite.chunk.js} +3 -3
- package/dist/scripts/{6309-79092eb273-lite.chunk.js.map → 6309-dd3a8e7f21-lite.chunk.js.map} +1 -1
- package/dist/scripts/{6489-51de20f6f6-lite.chunk.js → 6489-335e4d9396-lite.chunk.js} +3 -3
- package/dist/scripts/{6489-51de20f6f6-lite.chunk.js.map → 6489-335e4d9396-lite.chunk.js.map} +1 -1
- package/dist/scripts/6531-835c743f1b-lite.chunk.js +2 -0
- package/dist/scripts/6531-835c743f1b-lite.chunk.js.map +1 -0
- package/dist/scripts/6741-e0ed9fd6f0-lite.chunk.js +3 -0
- package/dist/scripts/6741-e0ed9fd6f0-lite.chunk.js.map +1 -0
- package/dist/scripts/{6846-5ae3efe823-lite.chunk.js → 6846-08b00decd8-lite.chunk.js} +2 -2
- package/dist/scripts/{6846-5ae3efe823-lite.chunk.js.map → 6846-08b00decd8-lite.chunk.js.map} +1 -1
- package/dist/scripts/{7187-814cd6f6db-lite.chunk.js → 7187-93d4aac9eb-lite.chunk.js} +2 -2
- package/dist/scripts/{7187-814cd6f6db-lite.chunk.js.map → 7187-93d4aac9eb-lite.chunk.js.map} +1 -1
- package/dist/scripts/8055-08b92f8ed7-lite.chunk.js +3 -0
- package/dist/scripts/8055-08b92f8ed7-lite.chunk.js.map +1 -0
- package/dist/scripts/{8085-ed82fb07da-lite.chunk.js → 8085-cde67e66df-lite.chunk.js} +2 -2
- package/dist/scripts/8085-cde67e66df-lite.chunk.js.map +1 -0
- package/dist/scripts/8139-f0229a0806-lite.chunk.js +3 -0
- package/dist/scripts/8139-f0229a0806-lite.chunk.js.map +1 -0
- package/dist/scripts/{8354-a104955138-lite.chunk.js → 8354-411c0c4a3a-lite.chunk.js} +2 -2
- package/dist/scripts/8354-411c0c4a3a-lite.chunk.js.map +1 -0
- package/dist/scripts/{841-85a91a6576-lite.chunk.js → 841-a60ac16a8c-lite.chunk.js} +3 -3
- package/dist/scripts/{841-85a91a6576-lite.chunk.js.map → 841-a60ac16a8c-lite.chunk.js.map} +1 -1
- package/dist/scripts/{8987-07d38d2bab-lite.chunk.js → 8987-9fb9a632e7-lite.chunk.js} +2 -2
- package/dist/scripts/8987-9fb9a632e7-lite.chunk.js.map +1 -0
- package/dist/scripts/{9068-1c0aece2e1-lite.chunk.js → 9068-562c30f718-lite.chunk.js} +2 -2
- package/dist/scripts/9068-562c30f718-lite.chunk.js.map +1 -0
- package/dist/scripts/{9839-5347f31f8b-lite.chunk.js → 9839-d50dedfab8-lite.chunk.js} +3 -3
- package/dist/scripts/9839-d50dedfab8-lite.chunk.js.map +1 -0
- package/dist/scripts/{bundle-90f71581a8.min.js → bundle-098294f9a6.min.js} +3 -3
- package/dist/scripts/bundle-098294f9a6.min.js.map +1 -0
- package/package.json +1 -1
- package/dist/scripts/1402-d327ed0365-lite.chunk.js.map +0 -1
- package/dist/scripts/1518-9961f6d99b-lite.chunk.js.map +0 -1
- package/dist/scripts/2703-430c5a5fc1-lite.chunk.js.map +0 -1
- package/dist/scripts/3070-4e82411f0c-lite.chunk.js.map +0 -1
- package/dist/scripts/5242-04c52713f2-lite.chunk.js.map +0 -1
- package/dist/scripts/5936-59acb26157-lite.chunk.js.map +0 -1
- package/dist/scripts/6181-4944b5c6a2-lite.chunk.js +0 -2
- package/dist/scripts/6181-4944b5c6a2-lite.chunk.js.map +0 -1
- package/dist/scripts/6263-0be2ae1ab4-lite.chunk.js.map +0 -1
- package/dist/scripts/6531-d77ba2c5ce-lite.chunk.js +0 -2
- package/dist/scripts/6531-d77ba2c5ce-lite.chunk.js.map +0 -1
- package/dist/scripts/6741-6222c7b762-lite.chunk.js +0 -3
- package/dist/scripts/6741-6222c7b762-lite.chunk.js.map +0 -1
- package/dist/scripts/8055-9c259a30c4-lite.chunk.js +0 -3
- package/dist/scripts/8055-9c259a30c4-lite.chunk.js.map +0 -1
- package/dist/scripts/8085-ed82fb07da-lite.chunk.js.map +0 -1
- package/dist/scripts/8139-ec264689fd-lite.chunk.js +0 -3
- package/dist/scripts/8139-ec264689fd-lite.chunk.js.map +0 -1
- package/dist/scripts/8354-a104955138-lite.chunk.js.map +0 -1
- package/dist/scripts/8987-07d38d2bab-lite.chunk.js.map +0 -1
- package/dist/scripts/9068-1c0aece2e1-lite.chunk.js.map +0 -1
- package/dist/scripts/9839-5347f31f8b-lite.chunk.js.map +0 -1
- package/dist/scripts/bundle-90f71581a8.min.js.map +0 -1
- /package/dist/scripts/{1895-933141db03-lite.chunk.js.LICENSE.txt → 1895-a799be78c3-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2446-c6b50a79cd-lite.chunk.js.LICENSE.txt → 2446-acc94130ed-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{537-92893a696e-lite.chunk.js.LICENSE.txt → 537-850ad2ee25-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6309-79092eb273-lite.chunk.js.LICENSE.txt → 6309-dd3a8e7f21-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6489-51de20f6f6-lite.chunk.js.LICENSE.txt → 6489-335e4d9396-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6741-6222c7b762-lite.chunk.js.LICENSE.txt → 6741-e0ed9fd6f0-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8055-9c259a30c4-lite.chunk.js.LICENSE.txt → 8055-08b92f8ed7-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8139-ec264689fd-lite.chunk.js.LICENSE.txt → 8139-f0229a0806-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{841-85a91a6576-lite.chunk.js.LICENSE.txt → 841-a60ac16a8c-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9839-5347f31f8b-lite.chunk.js.LICENSE.txt → 9839-d50dedfab8-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-90f71581a8.min.js.LICENSE.txt → bundle-098294f9a6.min.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripts/1402-d327ed0365-lite.chunk.js","mappings":"+LACA,SAAgB,UAAY,QAAQ,QAAU,S,sGCmBxC,SAAUA,EAAqBC,GACnC,I,IAAmC,G,GAAX,U,EAAW,E,o4BAA3BC,EAAG,KAAEC,EAAM,KAYnB,OAVA,aAAgB,W,MACTF,EAAMG,eAGND,IAAUF,EAAMI,aAGN,QAAf,EAAAJ,EAAMK,iBAAS,gBAAGL,EAAMM,YAC1B,GAAG,CAAEJ,EAAQF,EAAMI,aAGjB,uBAAKG,UAAS,0BAAqB,aAAoBN,IAAKA,GACzDD,EAAMI,WACH,gBAACI,EAAA,EAAO,CAACC,GAAG,OAAOC,UAAU,SAASC,KAAK,SAASJ,UAAW,YAE/D,gBAACK,EAAA,EAAY,CACXC,QAAS,iBACTN,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,KAAI,SAAAsD,GAAC,OAAIA,EAAEf,EAAE,KAEuB,G,EAApC,WAAiC,I,EAAG,E,unBAA5DS,EAAO,KAAE4K,EAAU,KAE3B,aAAgB,WACd,IAAKf,aAAQ,EAARA,EAAU1K,SAAW6J,EAAYU,aAAtC,CAGA,IAAMmB,EAA6B,GAEnChB,EAASvK,SAAQ,SAAAC,GACVkL,EAAeK,QAAQC,IAAIxL,KAC9BsL,EAAiBxL,KAAKE,GACtBkL,EAAeK,QAAQE,IAAIzL,GAE/B,IAEKsL,EAAiB1L,QAGtByL,GAAW,SAAAK,G,MACHC,EAAc,GAAH,O,yWAAA,CACZD,GAAC,CACJ,qBAA+BJ,EAAkB5J,EAAQkK,mBAM3D,OAHoB,QAAhB,EAAAnC,EAAY3I,YAAI,eAAE+I,kBACpB8B,EAAY7L,KAAK,uBAA0CwL,EAAkB,KAAM5J,EAAQkK,kBAEtFD,CACT,GAxBQ,CAyBV,GAAG,CAAErB,aAAQ,EAARA,EAAU1K,OAAQ6J,EAAYU,eAEnC,qBAAwB1J,EAC1B,C","sources":["file:///app/packages/libs/shared/src/components/infinite-scroll-footer/infinite-scroll-footer.scss","file:///app/packages/libs/shared/src/components/infinite-scroll-footer/InfiniteScrollFooter.tsx","file:///app/packages/libs/shared/src/components/video-list/partial-loading/partial-video-list.scss","file:///app/packages/libs/shared/src/components/video-list/partial-loading/PartialVideoList.tsx","file:///app/packages/libs/shared/src/errors/handlers/HttpErrorHandlers.ts","file:///app/packages/libs/shared/src/hooks/UseBatchFetch.ts","file:///app/packages/libs/shared/src/hooks/UseInfiniteScroll.ts","file:///app/packages/libs/shared/src/hooks/UseInfiniteList.ts","file:///app/packages/projects/lite/src/apps/watch-history/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/views/watch-history/empty-state/WatchHistoryEmptyState.tsx","file:///app/packages/projects/lite/src/apps/watch-history/views/watch-history/partial-loading/partial-watch-history.scss","file:///app/packages/projects/lite/src/apps/watch-history/views/watch-history/partial-loading/PartialWatchHistory.tsx","file:///app/packages/projects/lite/src/apps/watch-history/views/watch-history/WatchHistoryView.tsx","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts","file:///app/packages/projects/lite/src/shared/hooks/useVideoMixin.ts"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"container\":\"VwD1b\",\"spinner\":\"eJ85e\"};","import * as React from 'react';\nimport { Spinner } from 'react-bootstrap';\nimport { useInView } from 'react-intersection-observer';\n\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './infinite-scroll-footer.scss';\n\ninterface InfiniteScrollFooterProps {\n isFetching: boolean;\n fetchNext?: (nextCursor: string) => void;\n nextCursor?: string;\n fetchOnScroll?: boolean;\n}\n\nInfiniteScrollFooter.defaultProps = {\n fetchOnScroll: false\n};\n\nexport function InfiniteScrollFooter(props: InfiniteScrollFooterProps): React.ReactElement {\n const [ ref, inView ] = useInView();\n\n React.useEffect(() => {\n if (!props.fetchOnScroll)\n return;\n\n if (!inView || props.isFetching)\n return;\n\n props.fetchNext?.(props.nextCursor);\n }, [ inView, props.isFetching ]);\n\n return (\n <div className={`p-3 text-center ${styles.container}`} ref={ref}>\n {props.isFetching\n ? <Spinner as='span' animation='border' role='status' className={styles.spinner} />\n : (\n <SvgContainer\n svgName={cvSvgLibrary.ChevronDown}\n className='svg-container cursor-pointer'\n size={SvgContainerSize.Large}\n onClick={() => props.fetchNext?.(props.nextCursor)}\n />\n )\n }\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"partialOptions\":\"Gufgq\",\"partialName\":\"SicQQ\",\"partialDescription\":\"dPGMq\",\"partialThumbnail\":\"vZrnb\",\"partialDragHandle\":\"iq73R\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nimport styles from './partial-video-list.scss';\n\ninterface PartialVideoListProps {\n withReordering?: boolean;\n numVideos?: number;\n allowBulkActions?: boolean;\n}\n\nPartialVideoList.defaultProps = {\n numVideos: 15\n};\n\nexport function PartialVideoList(props: PartialVideoListProps): JSX.Element {\n return (\n <div className='mx-2'>\n {Array(props.numVideos).fill(null).map((_, i) => (\n <div className='d-flex' key={i}>\n {props.allowBulkActions && <div className='form-check pe-3 pe-sm-2 mx-0 mx-md-2' />}\n <PartialVideoItem {...props} />\n </div>\n ))}\n </div>\n );\n}\n\nexport function PartialVideoItem(props: PartialVideoListProps): JSX.Element {\n const breakpoints = useBreakpoints();\n\n const size = VideoListHelper.getSize(breakpoints, 'md');\n const isSmall = size === 'sm';\n\n const withDragHandle = props.withReordering && !breakpoints.xs;\n\n return (\n <Row className={`${isSmall ? '' : 'py-2'} flex-grow-1`}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-1` : 'mb-1 pe-3 pe-md-2'}`}>\n <Row>\n {!!withDragHandle && (\n <div className='d-flex align-items-center justify-content-center col-2'>\n <div className={`partial-loading-background ${styles.partialDragHandle}`} />\n </div>\n )}\n <Col xs={VideoListHelper.getThumbnailColSize(withDragHandle)}>\n <div className={`partial-loading-background ${isSmall ? 'rounded' : 'rounded-3'} ${styles.partialThumbnail}`} />\n </Col>\n </Row>\n </Col>\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n <div className={`partial-loading-background mb-1 ${styles.partialName}`} />\n <div className={`partial-loading-background ${styles.partialDescription}`} />\n </Col>\n </Row>\n );\n}\n\n","import { BaseError } from 'libs/common/backbone/core/BaseError';\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Xhr } from 'libs/common/backbone/interfaces';\nimport { Core } from 'libs/common/core';\n\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { PrivateResourceError } from 'libs/shared/errors/general/private-resource/PrivateResourceError';\nimport { RegionLockedResourceError } from 'libs/shared/errors/general/region-locked-resource/RegionLockedResourceError';\nimport { UnspecifiedError } from 'libs/shared/errors/general/unspecified-error/UnspecifiedError';\nimport { VideoTypes } from 'libs/shared/interfaces';\n\nexport interface HttpErrorMap {\n notFound?: new () => BaseError;\n forbidden?: {\n rating?: new (description: string) => BaseError;\n yearLevel?: new (description: string) => BaseError;\n region?: new () => BaseError;\n privacy?: new (video?: VideoTypes) => BaseError;\n };\n badRequest?: new () => BaseError;\n}\n\nexport type IgnoreHttpErrorMap = {\n [key in keyof HttpErrorMap]: boolean;\n};\n\nconst defaultErrors: HttpErrorMap = {\n notFound: NotFoundError,\n forbidden: {\n rating: PrivateResourceError,\n yearLevel: PrivateResourceError,\n region: RegionLockedResourceError,\n privacy: PrivateResourceError\n },\n badRequest: UnspecifiedError\n};\n\nexport function handleHttpError(\n info: HttpStatus | Xhr,\n customErrorMap: HttpErrorMap = {},\n /**\n * Prevent certain errors in the errorMap from being thrown\n * so that you may implement your own handler\n */\n ignoreMap: IgnoreHttpErrorMap = {}\n): void {\n if (!info)\n return;\n\n let statusCode: HttpStatus;\n\n if (typeof(info) === 'number') {\n statusCode = info;\n } else {\n statusCode = info.status;\n }\n\n const errorMap = {\n ...defaultErrors,\n ...customErrorMap\n };\n\n if (!statusCode)\n return;\n\n if (!Core.ErrorHelper.isStatusCodeError(statusCode))\n return;\n\n if (statusCode === HttpStatus.NotFound) {\n if (!ignoreMap.notFound)\n Core.ErrorHelper.throw(new errorMap.notFound());\n return;\n }\n\n if (statusCode === HttpStatus.Forbidden) {\n /**\n * TODO: Work out how to go about handling all forbidden errors, such as region locking, year levels,\n * ratings, and privacy.\n */\n if (!ignoreMap.forbidden)\n Core.ErrorHelper.throw(new errorMap.forbidden.privacy());\n return;\n }\n\n if (!ignoreMap.badRequest)\n Core.ErrorHelper.throw(new errorMap.badRequest());\n}\n\nexport function handleXhrError(xhr: Xhr, customErrorMap?: HttpErrorMap): void {\n handleHttpError(xhr.status, customErrorMap);\n}","import React from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { Flight } from 'libs/common/flight';\nimport { ApplicationState, HashObject } from 'libs/common/react/interfaces';\n\nimport { BaseObject } from 'libs/shared/interfaces';\n\nexport interface UseBatchFetchResult<T extends BaseObject> {\n items: { [key: string]: T} | null;\n isFetching: boolean;\n}\n\n/**\n * Used to fetch multiple items by id with Flight. Will fetch 25 items at a time firing off multiple\n * requests if there are more than 25 items.\n * This will return items as null until we have all our items. Items will be returned as an object with\n * their ids as they key for easy mapping\n * \n * @param itemIds \n * @param getRequest \n */\nexport function useBatchFetch<T extends BaseObject>(\n itemIds: string[],\n getRequest: (ids: string[]) => Flight.Request\n): UseBatchFetchResult<T> {\n const [ idBatches, setIdBatches ] = React.useState<string[][]>([]);\n\n React.useEffect(() => {\n if (!itemIds?.length)\n return;\n\n const newBatches = [...idBatches];\n newBatches.push([]);\n\n itemIds.forEach(id => {\n if (newBatches.find(batch => batch.find(_id => _id === id)))\n return;\n\n newBatches[newBatches.length - 1].push(id);\n });\n\n setIdBatches(newBatches.filter(batch => batch.length));\n }, [itemIds ? itemIds.join(',') : null]);\n\n const dispatch = useDispatch();\n\n const state = useSelector((state: ApplicationState) => state);\n\n React.useEffect(() => {\n idBatches.forEach(idBatch => {\n const request = getRequest(idBatch);\n const response = Flight.getResponse<T[]>(state, request.key);\n\n if (response.shouldFetch)\n Flight.fetch(dispatch, request);\n });\n }, [idBatches?.length]);\n\n if (!idBatches?.length)\n return { items: null, isFetching: false };\n \n const items: { [key: string]: T} = {};\n\n /* Used locally to only return our items if we've fetched all of them */\n const responses: HashObject<Flight.Response<T[]>> = {};\n \n idBatches.forEach((idBatch, i) => {\n const request = getRequest(idBatch);\n const response = Flight.getResponse<T[]>(state, request.key);\n responses[i] = response;\n\n if (response.data)\n response.data.forEach(v => items[v.id] = v);\n });\n\n return {\n items: Object.keys(responses).some(k => !!responses[k].data) ? items : null,\n isFetching: !!Object.keys(responses).some(k => responses[k].isFetching)\n };\n}","import { useEffect } from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\n\nconst SCROLL_TOLERANCE = 400; // value in px\n\ninterface UseInfiniteScrollOptions {\n fetchNextPage: () => void;\n hasMore: boolean;\n isFetching: boolean;\n scrollContainer?: HTMLElement;\n}\n\nexport function useInfiniteScroll(options: UseInfiniteScrollOptions): void {\n const handleScroll = (): void => {\n if (options.isFetching)\n return;\n\n if (!options.scrollContainer) {\n const currentScrollHeight = window.innerHeight + document.documentElement.scrollTop;\n \n const totalHeight = document.documentElement.scrollHeight - SCROLL_TOLERANCE;\n \n if (currentScrollHeight < totalHeight)\n return;\n } else {\n const { scrollContainer } = options;\n const currentScrollHeight = scrollContainer.getBoundingClientRect().height + scrollContainer.scrollTop;\n \n const totalHeight = scrollContainer.scrollHeight - SCROLL_TOLERANCE;\n \n if (currentScrollHeight < totalHeight)\n return;\n }\n\n options.fetchNextPage();\n };\n\n useEffect(() => {\n const onScroll = FunctionHelper.throttle(handleScroll, 200);\n\n const scrollContainer = options.scrollContainer || window;\n\n if (options.hasMore)\n scrollContainer.addEventListener('scroll', onScroll);\n\n return () => scrollContainer.removeEventListener('scroll', onScroll);\n }, [ options.hasMore, options.fetchNextPage, options.scrollContainer ]);\n}","import { useEffect, useState } from 'react';\n\nimport { HttpStatus, HttpStatusClass } from 'libs/common/backbone/enums/HttpStatus';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Flight } from 'libs/common/flight';\n\nimport { BaseObject, BasePaginatedCollection } from 'libs/shared/interfaces';\n\nimport { useInfiniteScroll } from './UseInfiniteScroll';\nimport { useSelectAllPages } from './UseSelectAllPages';\n\nexport interface UseInfiniteListResult<T extends BaseObject> {\n items: T[];\n hasMore: boolean;\n isFetching: boolean;\n nextCursor: string;\n totalItems?: number;\n hasFirstPageCompleted: boolean;\n}\n\n/**\n * Hook to extract an infinite list from the application state,\n * save it locally in state and only update when new data\n * is fetched.\n * \n * @param getRequest - callback function to get the request for each page.\n * Can be false if the request requires data that hasn't yet been fetched - e.g. user id.\n * \n * @param fetchNext - callback function to fetch a page.\n * Can be false if the request requires data that hasn't yet been fetched - e.g. user id.\n */\nexport function useInfiniteList<TObject = BaseObject, TResponse = BasePaginatedCollection<TObject>>(\n getRequest: ((cursor?: string) => Flight.Request) | false,\n fetchNext: ((cursor?: string) => void) | false,\n onError?: (pageNumber: number, statusCode: HttpStatus) => void,\n getItems?: (responseData: TResponse) => TObject[],\n getCursor?: (responseData: TResponse) => string,\n scrollContainer?: HTMLElement\n): UseInfiniteListResult<TObject> {\n const [ pagesFetched, setPagesFetched ] = useState(0);\n\n const fetchNextFn = fetchNext as (cursor?: string) => void;\n\n function getKey(cursor?: string): string {\n if (!getRequest)\n return null;\n\n const request = getRequest(cursor);\n\n if (!request)\n return null;\n\n return request.key;\n }\n\n const response = useSelectAllPages<TObject, TResponse>(\n getKey,\n getItems,\n getCursor\n );\n\n function fetchNextPage(): void {\n if (!fetchNext || !getRequest || !response)\n return;\n\n setPagesFetched(currentVal => currentVal + 1);\n return fetchNextFn(response.nextCursor);\n }\n\n useInfiniteScroll({\n fetchNextPage,\n hasMore: !!response?.nextCursor,\n isFetching: response?.isFetching,\n scrollContainer\n });\n\n useEffect(() => {\n if (!response)\n return;\n\n if (response.shouldInitialFetch && fetchNext) {\n fetchNextFn();\n setPagesFetched(currentVal => currentVal + 1);\n }\n }, [ response?.shouldInitialFetch, fetchNext ]);\n\n useEffect(() => {\n if (!response?.statusCode || !FunctionHelper.isFunction(onError))\n return;\n\n const httpStatusClass: HttpStatusClass = +(response.statusCode?.toString()?.substr(0, 1));\n\n if (httpStatusClass !== HttpStatusClass.ClientError && httpStatusClass !== HttpStatusClass.ServerError)\n return;\n\n onError(pagesFetched, response.statusCode);\n }, [response?.statusCode]);\n\n return {\n items: response?.items,\n hasMore: !!response?.nextCursor,\n nextCursor: response?.nextCursor,\n isFetching: response?.isFetching,\n totalItems: response?.totalItems,\n hasFirstPageCompleted: response?.hasFirstPageCompleted\n };\n}","\nimport { Xhr } from 'libs/common/backbone/interfaces';\nimport { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { VideoHistoryCollection } from 'libs/shared/interfaces';\n\nexport const VideoHistoryRequests = {\n userVideoHistory(\n cursor?: string,\n success?: (data: HashObject) => void,\n error?: (Xhr: Xhr) => void,\n always?: () => void\n ): Flight.Request {\n let key = 'video:history';\n let url = `{gateway}/v1/users/me/watch-history`;\n\n if (cursor) {\n key += `:${cursor}`;\n url += `?cursor=${cursor}`;\n }\n\n return {\n key,\n url,\n formatData: (historyCollection: VideoHistoryCollection) => {\n return {\n data: historyCollection.data.map(historyData => {\n // Convert last watched times from UTC to local time\n const lastTimeWatchedLocal = DateHelper.format(historyData.lastTimeWatched);\n const lastDateWatchedLocal = DateHelper.format(lastTimeWatchedLocal, 'YYYY-MM-DD');\n\n return {\n ...historyData,\n lastTimeWatched: lastTimeWatchedLocal,\n lastDateWatched: lastDateWatchedLocal\n };\n }),\n pagination: historyCollection.pagination\n };\n },\n success,\n error,\n always\n };\n },\n\n videoHistory(\n ids: string[],\n namespace?: string,\n success?: (data: HashObject) => void,\n error?: (Xhr: Xhr) => void,\n always?: () => void\n ): Flight.Request {\n const params = ids.sort().map(i => `videoId=${i}`);\n\n return {\n key: `video:history:videos:${params.join('&')}`,\n url: `{gateway}/v1/videos/history?${params.join('&')}`,\n normalizeOptions: {\n namespace\n },\n formatData: (historyCollection: HashObject[]) => {\n if (!historyCollection?.length)\n return historyCollection;\n\n /**\n * Data is formatted to enable it to be merged with the existing video object in the store\n * Where we need to merge more history properties with the video object, map them below.\n */\n return historyCollection.map((watchHistory: HashObject) => ({\n id: watchHistory.videoId,\n lastProgressPoint: watchHistory.lastProgressPoint\n }));\n },\n success,\n error,\n always\n };\n }\n};","import * as React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CanFavouriteFunc, FavouriteFunc, PresentationAudience, VideoHistory, VideoTypes, YearGroup } from 'libs/shared/interfaces';\n\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\n\nconst namespace = 'watchHistory.watchHistoryVideoList';\n\nfunction formatDate(date: string): string {\n const diff = DateHelper.timeSince(new Date(date), 'day');\n\n if (diff === 0)\n return LanguageService.getPhrase(namespace, 'today');\n\n if (diff === 1)\n return LanguageService.getPhrase(namespace, 'yesterday');\n\n return DateHelper.format(date, 'Do MMMM');\n}\n\ninterface WatchHistoryVideoListProps {\n videoHistory: VideoHistory[];\n videos: VideoTypes[];\n yearGroups: YearGroup[];\n setFavourite: FavouriteFunc;\n canFavourite: CanFavouriteFunc;\n presentationAudiences?: PresentationAudience[];\n imageCdnUrl?: string;\n isPlugin: boolean;\n}\n\nexport function WatchHistoryVideoList(props: WatchHistoryVideoListProps): JSX.Element {\n const { hasPermissions } = usePermissions();\n\n const historyGroups = ArrayHelper.groupBy(props.videoHistory, 'lastDateWatched');\n\n const videoGroups: { [index: string]: VideoTypes[] } = {};\n\n const sortedDates = Object.keys(historyGroups).sort().reverse();\n\n // Map video history to video objects and mixin lastProgressPoint\n sortedDates.forEach(date => {\n videoGroups[date] = historyGroups[date].map(history => {\n const video = props.videos.find(v => v.id.toString() === history.videoId.toString());\n\n if (!video)\n return null;\n\n return {\n ...video,\n lastProgressPoint: history.lastProgressPoint\n };\n }).filter(Boolean);\n });\n\n const sortedDatesGroupCount = sortedDates.reduce((dateCounts: HashObject, currentDate: string) => {\n const dateTotal = videoGroups[currentDate].length;\n const runningTotal = dateTotal + (dateCounts.runningTotal ?? 0);\n\n return {\n ...dateCounts,\n runningTotal,\n [currentDate]: runningTotal - dateTotal\n };\n }, {});\n\n return (\n <>\n {sortedDates.map(date => {\n // TODO: Fix bug where watch history endpoint returns workspace videos that cannot be fetched/displayed.\n // This is caused by 1 user sharing their workspace video with another user.\n if (!videoGroups[date].length)\n return <React.Fragment key={date}></React.Fragment>;\n\n return (\n <div key={date} className='pb-3'>\n <h2 className='h4'>{formatDate(date)}</h2>\n <VideoList\n videos={videoGroups[date]}\n yearGroups={props.yearGroups}\n getVideoAppLink={VideoAppLinkHelper.getAppLink}\n getSubTextAppLink={video => SeriesAppLinkHelper.getSeriesAppLink(video.series)}\n hasPermissions={hasPermissions}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n startingPositionIndex={sortedDatesGroupCount[date]}\n presentationAudiences={props.presentationAudiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n imageCdnUrl={props.imageCdnUrl}\n isPlugin={props.isPlugin}\n getClassroomGuideAppLink={VideoAppLinkHelper.getClassroomGuideAppLink}\n getInteractiveGuidanceAppLink={VideoAppLinkHelper.getInteractiveGuidanceAppLink}\n getResourceGuidanceAppLink={VideoAppLinkHelper.getResourceGuidanceAppLink}\n />\n </div>\n );\n })}\n </>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, SignUpDescriptors, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\n\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\n\nconst namespace = 'watchHistory.watchHistoryEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport function WatchHistoryEmptyState(): JSX.Element {\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={ImageUrls.EmptyStates.WATCH_HISTORY} altText={getPhrase('info')} />\n\n <EmptyState.Heading><Text phrase='heading' /></EmptyState.Heading>\n <EmptyState.Info><Text phrase='info' /></EmptyState.Info>\n\n <EmptyState.Cta\n text={LanguageService.getPhrase(namespace, 'cta')}\n appLink={{\n application: AppChannels.DASHBOARD,\n action: Actions.Dashboard.HOME\n }}\n />\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}\n\nexport function WatchHistoryPublicEmptyState(): JSX.Element {\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={ImageUrls.EmptyStates.WATCH_HISTORY_PUBLIC} altText={getPhrase('publicInfo')}/>\n <EmptyState.Heading><Text phrase='publicHeading' /></EmptyState.Heading>\n <EmptyState.Info><Text phrase='publicInfo' /></EmptyState.Info>\n <EmptyState.Cta\n text={LanguageService.getPhrase(namespace, 'publicCta')}\n appLink={{\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n }}\n analyticsData={{}}\n analyticsOptions={{\n actionType: UserAction.Click,\n location: LocationContext.WatchHistoryLanding,\n entity: EntityType.AppLink,\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n }}\n />\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"partialDate\":\"vq4eE\"};","import React from 'react';\n\nimport { PartialVideoList } from 'libs/shared/components/video-list/partial-loading/PartialVideoList';\n\nimport styles from './partial-watch-history.scss';\n\nexport function PartialWatchHistory(): JSX.Element {\n return (\n <>\n <div className='mb-3'>\n <div className={`${styles.partialDate} mb-2 partial-loading-background`} />\n <PartialVideoList numVideos={2} />\n </div>\n\n <div className='mb-3'>\n <div className={`${styles.partialDate} mb-2 partial-loading-background`} />\n <PartialVideoList numVideos={3} />\n </div>\n\n <div className='mb-3'>\n <div className={`${styles.partialDate} mb-2 partial-loading-background`} />\n <PartialVideoList numVideos={2} />\n </div>\n\n <div className='mb-3'>\n <div className={`${styles.partialDate} mb-2 partial-loading-background`} />\n <PartialVideoList numVideos={5} />\n </div>\n </>\n );\n}","import * as React from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { InfiniteScrollFooter } from 'libs/shared/components/infinite-scroll-footer/InfiniteScrollFooter';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { LocalPermissionName } from 'libs/shared/enums/PermissionName';\nimport { handleHttpError } from 'libs/shared/errors/handlers/HttpErrorHandlers';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useBatchFetch } from 'libs/shared/hooks/UseBatchFetch';\nimport { useInfiniteList } from 'libs/shared/hooks/UseInfiniteList';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Config, CurrentUser, VideoHistory, YearGroup } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { usePluginHelper } from 'shared/hooks/use-plugin-helper/usePluginHelper';\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\n\nimport { WatchHistoryVideoList } from 'apps/watch-history/components/watch-history-video-list/WatchHistoryVideoList';\nimport { VideoHistoryRequests } from 'apps/watch-history/flight-requests/VideoHistoryRequests';\n\nimport { WatchHistoryEmptyState, WatchHistoryPublicEmptyState } from './empty-state/WatchHistoryEmptyState';\nimport { PartialWatchHistory } from './partial-loading/PartialWatchHistory';\n\nconst namespace = 'watchHistory.watchHistory';\n\nexport function WatchHistoryView(): JSX.Element {\n useSetPageMetadata({ title: LanguageService.getPhrase(namespace, 'pageTitle') });\n const dispatch = useDispatch();\n const alerts = useAlerts();\n const { hasLocalPermissions } = usePermissions();\n\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.VideoThumbnail);\n const { isPlugin } = usePluginHelper();\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const getUserVideoHistoryRequest = (cursor?: string) => {\n return VideoHistoryRequests.userVideoHistory(cursor);\n };\n\n const fetchNext = (cursor?: string) => {\n return Flight.getFetch(dispatch)(getUserVideoHistoryRequest(cursor));\n };\n\n const shouldFetch = !hasLocalPermissions(LocalPermissionName.ViewWatchHistoryLanding) && currentUser.hasCompleted;\n\n const {\n items: videoHistory,\n hasMore,\n isFetching\n } = useInfiniteList<VideoHistory>(shouldFetch ? getUserVideoHistoryRequest : false, fetchNext, onError);\n\n function onError(pageNumber: number, httpStatus: HttpStatus): void {\n if (pageNumber === 1)\n return handleHttpError(httpStatus);\n\n alerts.error(LanguageService.getPhrase(namespace, 'error'));\n }\n\n const videoIds = videoHistory?.map(v => v.videoId) ?? [];\n\n const videosFetchResult = useBatchFetch(videoIds, (ids: string[]) => {\n return VideoRequests.watchHistoryVideos(ids);\n });\n\n const videosMap = videosFetchResult.items ?? {};\n\n const videos = Object.keys(videosMap).map(id => videosMap[id]);\n\n useVideoMixin(videos.filter(VideoHelper.isVideo));\n \n const audiences = usePresentationAudiences();\n\n if (hasLocalPermissions(LocalPermissionName.ViewWatchHistoryLanding))\n return <WatchHistoryPublicEmptyState />;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <div className='px-3'>\n <h1 className='h2'><Text phrase='heading' /></h1>\n {(() => {\n if (!videoHistory)\n return <PartialWatchHistory />;\n\n if (!videoHistory.length)\n return <WatchHistoryEmptyState />;\n\n if (!videos.length)\n return <PartialWatchHistory />;\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <WatchHistoryVideoList\n videoHistory={videoHistory}\n videos={videos}\n presentationAudiences={audiences.data}\n yearGroups={yearGroups.data}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n imageCdnUrl={config.data?.imageCdnUrl}\n isPlugin={isPlugin}\n />\n {(hasMore || isFetching) && <InfiniteScrollFooter isFetching={isFetching} fetchNext={fetchNext} />}\n </VideoActionsContext.Provider>\n );\n })()}\n </div>\n </LanguageNamespaceContext.Provider>\n );\n}","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation, 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 { Flight } from 'libs/common/flight';\n\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { CurrentUser, Video, VideoCollection } from 'libs/shared/interfaces';\n\ninterface VideoMixinOptions {\n /**\n * If the videos that are having new data mixed into are sitting on an explicit Flight namespace,\n * providing that namespace here is required\n */\n flightNamespace?: string;\n}\n\nexport function useVideoMixin(videos: VideoCollection | Video[], options: VideoMixinOptions = {}): void {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const hydratedVideos = React.useRef<Set<string>>(new Set<string>());\n\n const videoIds = videos && (Array.isArray(videos)\n ? videos.filter(Boolean).map(v => v.id)\n : videos.data.filter(Boolean).map(v => v.id));\n\n const [ request, setRequest ] = React.useState<Flight.Request[]>([]);\n\n React.useEffect(() => {\n if (!videoIds?.length || !currentUser.hasCompleted)\n return;\n\n const unhydratedVideos: string[] = [];\n\n videoIds.forEach(id => {\n if (!hydratedVideos.current.has(id)) {\n unhydratedVideos.push(id);\n hydratedVideos.current.add(id);\n }\n });\n \n if (!unhydratedVideos.length)\n return;\n\n setRequest(r => {\n const newRequests = [\n ...r,\n VideoRequests.videoMixinAssocs(unhydratedVideos, options.flightNamespace)\n ];\n\n if (currentUser.data?.isAuthenticated)\n newRequests.push(ClassificationRequests.hasCurriculumLinks(unhydratedVideos, null, options.flightNamespace));\n\n return newRequests;\n });\n }, [ videoIds?.length, currentUser.hasCompleted ]);\n\n Flight.useBasicFetchAll(request);\n}"],"names":["InfiniteScrollFooter","props","ref","inView","fetchOnScroll","isFetching","fetchNext","nextCursor","className","Spinner","as","animation","role","SvgContainer","svgName","size","S","onClick","defaultProps","PartialVideoList","Array","numVideos","fill","map","_","i","key","allowBulkActions","PartialVideoItem","breakpoints","useBreakpoints","isSmall","VideoListHelper","withDragHandle","withReordering","xs","Row","Col","defaultErrors","notFound","forbidden","rating","yearLevel","region","privacy","badRequest","handleHttpError","info","customErrorMap","ignoreMap","statusCode","status","errorMap","useBatchFetch","itemIds","getRequest","idBatches","setIdBatches","length","newBatches","push","forEach","id","find","batch","_id","filter","join","dispatch","state","idBatch","request","shouldFetch","items","responses","response","data","v","Object","keys","some","k","SCROLL_TOLERANCE","useInfiniteList","onError","getItems","getCursor","scrollContainer","options","handleScroll","useState","pagesFetched","setPagesFetched","fetchNextFn","cursor","fetchNextPage","currentVal","hasMore","getBoundingClientRect","height","scrollTop","scrollHeight","window","innerHeight","document","documentElement","useEffect","onScroll","FunctionHelper","addEventListener","removeEventListener","shouldInitialFetch","httpStatusClass","toString","substr","HttpStatus","totalItems","hasFirstPageCompleted","VideoHistoryRequests","userVideoHistory","success","error","always","url","formatData","historyCollection","historyData","lastTimeWatchedLocal","lastTimeWatched","lastDateWatchedLocal","lastDateWatched","pagination","videoHistory","ids","namespace","params","sort","normalizeOptions","watchHistory","videoId","lastProgressPoint","WatchHistoryVideoList","hasPermissions","usePermissions","historyGroups","ArrayHelper","videoGroups","sortedDates","reverse","date","history","video","videos","Boolean","sortedDatesGroupCount","reduce","dateCounts","currentDate","dateTotal","runningTotal","diff","DateHelper","Date","LanguageService","formatDate","VideoList","yearGroups","getVideoAppLink","VideoAppLinkHelper","getSubTextAppLink","SeriesAppLinkHelper","series","setFavourite","canFavourite","startingPositionIndex","presentationAudiences","getPreviewQuestionsAppLink","interactive","InteractiveHelper","imageCdnUrl","isPlugin","getClassroomGuideAppLink","getInteractiveGuidanceAppLink","getResourceGuidanceAppLink","getPhrase","WatchHistoryEmptyState","value","EmptyState","src","ImageUrls","altText","Text","phrase","text","appLink","application","action","WatchHistoryPublicEmptyState","analyticsData","analyticsOptions","actionType","location","entity","workflowPhase","descriptor","SignUp","PartialWatchHistory","WatchHistoryView","useSetPageMetadata","title","alerts","hasLocalPermissions","useLiteFavourites","u","usePluginHelper","currentUser","UserRequests","videoActions","useVideoActions","isAuthenticated","CustomerRequests","customerId","config","ConfigRequests","getUserVideoHistoryRequest","hasCompleted","pageNumber","httpStatus","videoIds","videosMap","VideoRequests","useVideoMixin","VideoHelper","audiences","usePresentationAudiences","VideoActionsContext","redirectOnError","activePresentation","getFallbackPresentation","presentation","hydratedVideos","Set","isArray","setRequest","unhydratedVideos","current","has","add","r","newRequests","flightNamespace"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripts/1518-9961f6d99b-lite.chunk.js","mappings":"oLACA,SAAgB,QAAU,SCW1B,IACMA,EAAYC,EAAA,mBADA,uBAclB,SAASC,EAAQC,GACf,OACE,uBAAKC,UAAS,eAAU,YACtB,gBAACC,EAAA,EAAO,CACNC,QAASH,EAAMG,QACfC,cAAeJ,EAAMI,cACrBC,iBAAgB,+BAAOL,EAAMK,kBAAgB,CAAEC,WAAY,eAC3DL,UAAS,+BAA0BD,EAAMG,QAAU,sBAAwB,KAE3E,qBAAGF,UAAU,yDAAyDJ,EAAU,aAIxF,CAEM,SAAUU,EAAaP,GAC3B,IAAMQ,IAAmBR,EAAMS,YAE/B,OAAKT,EAAMU,MAASV,EAAMS,YAIxB,uBAAKR,UAAU,yBACb,uBAAKA,UAAU,oCACVD,EAAMU,MACP,uBAAKT,UAAW,SACd,gBAACC,EAAA,EAAO,CACNC,QAASH,EAAMG,QACfE,iBAAkBL,EAAMK,iBACxBD,cAAeJ,EAAMI,cACrBH,UAAS,+BAA0BD,EAAMG,QAAU,sBAAwB,IAC3EQ,QAASX,EAAMW,SAEf,sBAAIV,UAAU,6BACXD,EAAMU,UAKZV,EAAMG,UAAYK,KAAoBR,EAAMY,iBAAmB,gBAACb,EAAO,iBAAKC,KAGhFQ,GACC,uBAAKP,UAAU,kDACb,qBAAGA,UAAS,iDAA4C,gBACtD,4BAAOD,EAAMS,gBAEZT,EAAMG,WAAaH,EAAMY,iBAAmB,gBAACb,EAAO,iBAAKC,MA5B3D,gCAiCX,C,kDCvEM,SAAUa,EAAoBb,GAClC,OA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oC,UACR,CAAEuK,cAAgB,OAAmB,QAAX,EAAAxO,EAAM6B,aAAK,eAAEoD,eAAiB,KAE1D,CAAEhE,OAAQ,SAQdjB,EAAMyO,qBACL,uBAAKxO,UAAWoO,EAAS,GAAH,OD5D+L,QC4DtK,YAAIrO,EAAM0O,uBAAqB,UD5DgH,QC4DpF,YAAI1O,EAAM2O,2BAGpH3O,EAAM0F,2BACN,uBACEkJ,KAAK,SACLjO,QAASX,EAAMW,QACfV,UAAS,UDnE2J,QCmE1H,YAAIoO,EAAS,EAAc,KAIzE,uBACEO,KAAK,SACL3O,UAAS,WArCTA,EDpCsO,QCwCxOA,GADEoO,EACW,IAAJ,OAAQ,EAAW,YAAIrO,EAAM6O,qBAEzB,IAAJ,OAAQ,EAAY,YAAI7O,EAAM8O,uBA+BL,YDzE0C,QCyEzB,YAAI9O,EAAMC,WAAa,IACxEU,QAASX,EAAMW,SAEdX,EAAMoH,WACL,wBAAMnH,UAAS,oBD7E6E,UC6EzCD,EAAMoH,WAE3D,gBAAC2H,EAAA,EAAY,CACXC,QAAST,EACThC,KAAMwC,EAAAE,EAAA,OACNhP,UAAS,uCDlF2H,YCuF9I,G,kBCxFA,IAAY2N,E,iBAAZ,SAAYA,GACV,iBACA,aACD,CAHD,CAAYA,IAAAA,EAAc,I,kBCA1B,IAAYsB,E,iBAAZ,SAAYA,GACV,kBACA,2BACA,kBACA,sBACA,wBACA,8BACA,gBACA,0CACA,2CACA,wBACA,oBACA,uCACA,6BACA,wBACA,oBACA,iCAEA,mCACA,qBACA,6CACD,CArBD,CAAYA,IAAAA,EAAc,I,kBCA1B,IAAYC,E,iBAAZ,SAAYA,GACV,cACA,cACA,sBACA,kBACA,cACA,kBACA,6BACD,CARD,CAAYA,IAAAA,EAAiB,I,mCCC7B,SAAgB,sBAAwB,QAAQ,qBAAuB,QAAQ,YAAc,QAAQ,aAAe,Q","sources":["file:///app/packages/libs/shared/src/components/widgets/curated-widgets/components/header/widget-header.scss","file:///app/packages/libs/shared/src/components/widgets/curated-widgets/components/header/WidgetHeader.tsx","file:///app/packages/libs/shared/src/components/widgets/curated-widgets/components/header/partial-loading/PartialWidgetHeader.tsx","file:///app/packages/libs/shared/src/components/widgets/fixed-widget/FixedWidget.tsx","file:///app/packages/libs/shared/src/components/widgets/fixed-widget/FixedWidgetReducer.tsx","file:///app/packages/libs/shared/src/components/widgets/fixed-widget/FixedWidgetUtils.ts","file:///app/packages/libs/shared/src/components/widgets/fixed-widget/PartialFixedWidget.tsx","file:///app/packages/libs/shared/src/utils/DragHelper.ts","file:///app/packages/libs/shared/src/components/widgets/sliding-list/SlidingListContainer.tsx","file:///app/packages/libs/shared/src/components/widgets/widget-button/widget-button.scss","file:///app/packages/libs/shared/src/components/widgets/widget-button/WidgetButton.tsx","file:///app/packages/libs/shared/src/enums/CssMeasurement.ts","file:///app/packages/libs/shared/src/enums/WidgetContents.ts","file:///app/packages/libs/shared/src/enums/WidgetInteraction.ts","file:///app/packages/libs/shared/src/components/widgets/fixed-widget/fixed-widget.scss"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"seeMore\":\"yv0FS\"};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\n\nimport styles from './widget-header.scss';\n\nconst namespace = 'shared.widgetHeader';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface WidgetHeaderProps {\n name: string;\n description: string;\n\n appLink?: Core.AppLink;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n showSeeMoreLink?: boolean;\n onClick?: () => void;\n}\n\nfunction SeeMore(props: WidgetHeaderProps) {\n return (\n <div className={`ms-3 ${styles.seeMore}`}>\n <AppLink\n appLink={props.appLink}\n analyticsData={props.analyticsData }\n analyticsOptions={{ ...props.analyticsOptions, descriptor: ClickDescriptor.SeeMore }}\n className={`text-decoration-none ${props.appLink ? 'curated-widget-link' : ''}`}\n >\n <p className='hover-text-underline text-dark curated-widget-heading'>{getPhrase('seeMore')}</p>\n </AppLink>\n </div>\n );\n}\n\nexport function WidgetHeader(props: WidgetHeaderProps): JSX.Element {\n const hasDescription = !!props.description;\n\n if (!props.name && !props.description)\n return <></>;\n\n return (\n <div className='curated-widget-header'>\n <div className='d-flex justify-content-between'>\n {!!props.name && (\n <div className={styles.title}>\n <AppLink\n appLink={props.appLink}\n analyticsOptions={props.analyticsOptions}\n analyticsData={props.analyticsData}\n className={`text-decoration-none ${props.appLink ? 'curated-widget-link' : ''}`}\n onClick={props.onClick}\n >\n <h2 className='h4 curated-widget-heading'>\n {props.name}\n </h2>\n </AppLink>\n </div>\n )}\n {!!props.appLink && !hasDescription && !!props.showSeeMoreLink && <SeeMore {...props}/>}\n </div>\n \n {hasDescription && (\n <div className='d-flex justify-content-between align-items-end'>\n <p className={`description curated-widget-description ${styles.description}`}>\n <span>{props.description}</span>\n </p>\n {!!props.appLink && !!props.showSeeMoreLink && <SeeMore {...props}/> }\n </div>\n )}\n </div>\n );\n}","import React from 'react';\n\ninterface PartialWidgetHeaderProps {\n hideHeading?: boolean;\n hideDescription?: boolean;\n}\n\nexport function PartialWidgetHeader(props: PartialWidgetHeaderProps): JSX.Element {\n if (props.hideDescription && props.hideHeading)\n return <></>;\n\n return (\n <div className='curated-widget-header'>\n {!props.hideHeading && (\n <div className='partial-loading-background curated-widget-heading' style={{ height: '1.5rem', width: '12rem' }} />\n )}\n\n {!props.hideDescription && (\n <div className='partial-loading-background curated-widget-description' style={{ height: '1.434375rem', width: '16rem' }} />\n )}\n </div>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { UserAgentHelper } from 'libs/common/backbone/utils/UserAgentHelper';\nimport { Core } from 'libs/common/core';\nimport { Flight } from 'libs/common/flight';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { AnalyticsOptions, HashObject } from 'libs/analytics/interfaces';\n\nimport { WidgetHeader } from 'libs/shared/components/widgets/curated-widgets/components/header/WidgetHeader';\nimport { FixedWidgetItemProps } from 'libs/shared/components/widgets/items/FixedWidgetItemProps';\nimport { SlidingListContainer } from 'libs/shared/components/widgets/sliding-list/SlidingListContainer';\nimport { WidgetButton, WidgetButtonDirection } from 'libs/shared/components/widgets/widget-button/WidgetButton';\nimport { CssMeasurement } from 'libs/shared/enums/CssMeasurement';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { WidgetInteraction } from 'libs/shared/enums/WidgetInteraction';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { useHover } from 'libs/shared/hooks/UseHover';\nimport { useLazyLoad } from 'libs/shared/hooks/UseLazyLoad';\nimport { WidgetContext, WidgetType } from 'libs/shared/interfaces';\nimport { WidgetHelper } from 'libs/shared/utils/WidgetHelper';\n\nimport { FixedWidgetReducer, initialWidgetState, lazyWidgetInit } from './FixedWidgetReducer';\nimport { FixedWidgetControls, formatData, getCollectionAppLink, getOnTouchEnd, getOnTouchStart, getShouldPreload, hideBackButton, hideNextButton, useControlsRef, useFetchData } from './FixedWidgetUtils';\nimport { PartialFixedWidget } from './PartialFixedWidget';\n\nimport styles from './fixed-widget.scss';\n\nconst namespace = 'shared.fixedWidget';\n\n// Max number of widget items whenever `props.limitTotalItems` is `true`\nexport const WIDGET_ITEM_LIMIT = 12;\n\ninterface BaseFixedWidgetProps<TChildProps extends FixedWidgetItemProps> {\n id?: string;\n name?: string;\n description?: string;\n\n type: WidgetType;\n contents: WidgetContents;\n thumbnailSize?: ImageSize;\n minimumItemCount?: number;\n limitTotalItems?: boolean;\n setData?: (data: any) => any[] | null;\n\n childComponent: (props: FixedWidgetItemProps) => JSX.Element;\n extraChildComponentProps: Omit<TChildProps, keyof FixedWidgetItemProps>;\n partialComponent?: React.ElementType;\n getChildAppLink?: (item?: any) => Core.AppLink;\n appLink?: Core.AppLink;\n onClick?: () => void;\n\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n\n getWidgetItemAnalyticsData?: (data: any) => HashObject;\n\n onNext?: () => void;\n onPrevious?: () => void;\n controlsRef?: React.MutableRefObject<FixedWidgetControls>;\n touchBehavior?: 'drag' | 'scroll';\n\n leftWidgetButtonClassName?: string;\n rightWidgetButtonClassName?: string;\n\n hideName?: boolean;\n hideBleedingContent?: boolean;\n hideExtendedClickableArea?: boolean;\n hideButtons?: boolean;\n}\n\ntype FixedWidgetWithFetchProps<TChildProps extends FixedWidgetItemProps> = BaseFixedWidgetProps<TChildProps> & {\n lazyLoad: true;\n collection?: never;\n fetch: (...args: any) => Flight.Response<any>;\n prefetched?: false;\n};\n\ntype FixedWidgetWithCollectionProps<TChildProps extends FixedWidgetItemProps> = BaseFixedWidgetProps<TChildProps> & {\n collection: any;\n lazyLoad?: false;\n fetch?: never;\n prefetched: true;\n};\n\nexport type FixedWidgetProps<TChildProps extends FixedWidgetItemProps> =\n FixedWidgetWithCollectionProps<TChildProps> |\n FixedWidgetWithFetchProps<TChildProps>;\n\nFixedWidget.defaultProps = {\n type: WidgetType.Row,\n minimumItemCount: 0,\n extraChildComponentProps: {},\n touchBehavior: 'scroll'\n};\n\nexport function FixedWidget<TChildProps extends FixedWidgetItemProps>(\n props: FixedWidgetProps<TChildProps>\n): JSX.Element {\n const { analyticsData = {}, getWidgetItemAnalyticsData = () => {} } = props;\n\n const [ initialTouchX, setInitialTouchX ] = React.useState(null);\n const [ containerWidth, setContainerWidth ] = React.useState(null);\n const [ percentageDragged, setPercentageDragged ] = React.useState(0);\n\n const [ state, dispatch ] = React.useReducer(FixedWidgetReducer, initialWidgetState, lazyWidgetInit);\n\n const containerRef = React.useRef(null);\n const [ buttonsRef, isHovering ] = useHover<HTMLDivElement>();\n\n const [ isHoveringOnFarLeft, setIsHoveringOnFarLeft ] = React.useState(false);\n const [ isHoveringOnFarRight, setIsHoveringOnFarRight ] = React.useState(false);\n\n useControlsRef(props.controlsRef, dispatch);\n\n const { ref, inView: shouldFetch } = useLazyLoad({ prevent: !props.lazyLoad });\n\n const response = useFetchData(props, dispatch, shouldFetch);\n\n function getWidgetCollection(limit: number): any[] {\n const responseData = props.prefetched ? props.collection : response.data;\n\n if (!responseData)\n return [];\n\n const formattedResponse = FunctionHelper.isFunction(props.setData) ? props.setData(responseData) : responseData;\n return formattedResponse?.slice(0, limit) ?? [];\n }\n\n const widgetItems = getWidgetCollection(props.limitTotalItems ? WIDGET_ITEM_LIMIT : Infinity);\n\n function hasMoreItems(): boolean {\n if (!props.limitTotalItems)\n return false;\n\n const unlimitedItems = getWidgetCollection(Infinity);\n\n return unlimitedItems.length > widgetItems.length;\n }\n\n const hasReachedEnd = state.offset === widgetItems.length;\n\n const breakpoints = useBreakpoints();\n\n React.useEffect(() => {\n dispatch({\n type: WidgetInteraction.Resize,\n payload: { breakpoints }\n });\n }, [breakpoints]);\n\n React.useEffect(() => {\n if (!props.prefetched)\n return;\n\n let type = props.type;\n\n // The ResourcesTile widget type is deprecated. We render the Row type instead in this case\n if (type === WidgetType.ResourcesTile)\n type = WidgetType.Row;\n\n // If the prefetched collection changes, re-initialize the widget state.\n dispatch({\n type: WidgetInteraction.Init,\n payload: {\n breakpoints,\n type,\n contents: props.contents,\n totalItems: widgetItems.length\n }\n });\n }, [ props.collection?.length, props.prefetched ]);\n\n function onSetIsHovering(hovering: boolean, index: number): void {\n if (widgetItems.length === state.viewableItems) {\n setIsHoveringOnFarLeft(hovering);\n setIsHoveringOnFarRight(hovering);\n return;\n }\n\n // This callback will hide the far left button if the user is hovering on the far left widget item.\n // Same goes for the far right button & widget item.\n if (index + 1 === widgetItems.length) {\n setIsHoveringOnFarRight(hovering);\n return;\n }\n\n if (index === 0) {\n setIsHoveringOnFarLeft(hovering);\n return;\n }\n\n if ((index + 1 - (state.offset % state.viewableItems)) % state.viewableItems === 0) {\n setIsHoveringOnFarRight(hovering);\n return;\n }\n\n if ((index - (state.offset % state.viewableItems)) % state.viewableItems === 0) {\n setIsHoveringOnFarLeft(hovering);\n return;\n }\n }\n\n function shouldScroll(): boolean {\n if (props.touchBehavior !== 'scroll')\n return false;\n\n return UserAgentHelper.isTabletOrMobile();\n }\n\n const widgetContext: WidgetContext = {\n type: state.type,\n collectionSize: widgetItems.length,\n contents: props.contents\n };\n\n const data = formatData(props, response?.data || props.collection);\n\n if (response?.hasError)\n return <></>;\n\n if (!props.prefetched && !response?.data) {\n const PartialComponent = props.partialComponent || PartialFixedWidget;\n\n return (\n <div ref={ref}>\n <PartialComponent />\n </div>\n );\n }\n\n if (!widgetItems.length || widgetItems.length < props.minimumItemCount)\n return <></>;\n\n const WidgetItemComponent = props.childComponent;\n\n const getSliderAnalyticsData = (type: WidgetInteraction) => ({\n id: data?.id,\n name: data?.name,\n direction: type === WidgetInteraction.Next ? 'right' : 'left',\n ...props.analyticsData\n });\n\n const showSeeMoreButton = (() => {\n // Only show if there is an applink and we've reached the end of the widget\n if (!props.appLink || !hasReachedEnd)\n return false;\n\n // Also only show if we've exceeded the widget limit, if one has been set\n return hasMoreItems();\n })();\n\n const hideButtons = shouldScroll() || props.hideButtons;\n const hideBackGradient = state.offset === state.viewableItems;\n const hideNextGradient = widgetItems.length <= state.offset;\n const hasMoreThanViewable = state.viewableItems < widgetItems.length;\n\n return (\n <div className='mx-n4 mb-n3'>\n <div className={shouldScroll() ? 'pb-3 overflow-hidden' : 'px-4 pb-3 overflow-hidden'}>\n {!props.hideName &&\n <div className={shouldScroll() ? 'px-4' : ''}>\n <WidgetHeader\n name={data.name}\n description={data.description}\n appLink={getCollectionAppLink(props.appLink, data)}\n onClick={props.onClick}\n analyticsData={{ id: data?.id, name: data?.name, ...props.analyticsData }}\n analyticsOptions={WidgetHelper.getSliderHeadingAnalyticsOptions()}\n showSeeMoreLink={hasMoreThanViewable}\n />\n </div>\n }\n <div\n ref={buttonsRef}\n className={`position-relative mx-n1 ${shouldScroll() ? `${styles.mobileScroll} px-4` : ''} ${props.hideBleedingContent ? 'overflow-hidden-x' : ''}`}\n >\n {!hideButtons && (\n <>\n {(!props.hideBleedingContent && !isHoveringOnFarLeft && !hideBackGradient) && (\n <div className={styles.leftOverflowGradient} />\n )}\n <WidgetButton\n direction={WidgetButtonDirection.Left}\n onClick={() => {\n dispatch({ type: WidgetInteraction.Previous });\n AnalyticsHelper.logUserAction(\n getSliderAnalyticsData(WidgetInteraction.Previous),\n WidgetHelper.getSliderAnalyticsOptions()\n );\n\n FunctionHelper.isFunction(props.onPrevious) && props.onPrevious();\n }}\n hide={!!props.hideButtons || hideBackButton(\n isHoveringOnFarLeft,\n isHovering,\n state.offset,\n state.viewableItems,\n widgetItems.length\n )}\n contents={props.contents}\n className={props.leftWidgetButtonClassName}\n hideExtendedClickableArea={props.hideExtendedClickableArea}\n state={state}\n />\n </>\n )}\n \n <SlidingListContainer\n position={state.position}\n positionType={CssMeasurement.Percentage}\n onTouchMove={props.touchBehavior === 'drag' && getOnTouchStart(\n state,\n containerRef,\n containerWidth,\n setContainerWidth,\n initialTouchX,\n setInitialTouchX,\n setPercentageDragged\n )}\n onTouchEnd={props.touchBehavior === 'drag' && getOnTouchEnd(\n containerRef,\n setInitialTouchX,\n percentageDragged,\n setPercentageDragged,\n dispatch,\n props.onNext,\n props.onPrevious\n )}\n ref={containerRef}\n percentageDragged={percentageDragged}\n >\n {widgetItems.map((widgetItem: any, index: number) => {\n return (\n <WidgetItemComponent\n key={`${widgetItem.id}:${index}`}\n data={widgetItem}\n collectionAppLink={props.appLink}\n getAppLink={props.getChildAppLink ? () => props.getChildAppLink(widgetItem) : () => null}\n context={widgetContext}\n preloadImage={getShouldPreload(state, widgetItems)(widgetItem)}\n thumbnailSize={props.thumbnailSize || ImageSize.Medium}\n analyticsData={{\n widgetId: data.id,\n widgetName: data.name,\n itemIndex: index,\n ...analyticsData,\n ...getWidgetItemAnalyticsData(widgetItem)\n }}\n analyticsOptions={{ ...props.analyticsOptions, ...WidgetHelper.getSliderItemAnalyticsOptions() }}\n onHover={(hovering: boolean) => {\n if (shouldScroll())\n return;\n\n /**\n * For some reason this needs to be called after a set timeout, otherwise\n * the `useHover` listener on the `buttonsRef` element will not detect it's hover\n * event. A delay of 200ms is used for when `hovering` is false so that the effects of\n * setting `isHoveringOnFarX` aren't applied until the CSS transform transition has\n * completed.\n */\n window.setTimeout(() => {\n onSetIsHovering(hovering, index);\n }, hovering ? 0 : 200);\n }}\n {...props.extraChildComponentProps}\n />\n );\n })}\n {shouldScroll() && <div className='ps-4'></div>}\n </SlidingListContainer>\n\n {!hideButtons && (\n <>\n <WidgetButton\n direction={WidgetButtonDirection.Right}\n onClick={() => {\n if (showSeeMoreButton) {\n Core.AppLinkHelper.trigger(getCollectionAppLink(props.appLink, data));\n return;\n }\n\n dispatch({ type: WidgetInteraction.Next });\n AnalyticsHelper.logUserAction(\n getSliderAnalyticsData(WidgetInteraction.Next),\n WidgetHelper.getSliderAnalyticsOptions()\n );\n\n FunctionHelper.isFunction(props.onNext) && props.onNext();\n }}\n hide={!!props.hideButtons || hideNextButton(\n isHoveringOnFarRight,\n isHovering,\n state.offset,\n state.viewableItems,\n widgetItems.length,\n showSeeMoreButton\n )}\n contents={props.contents}\n hoverText={showSeeMoreButton && LanguageService.getPhrase(namespace, 'seeMore')}\n className={props.rightWidgetButtonClassName}\n hideExtendedClickableArea={props.hideExtendedClickableArea}\n state={state}\n />\n {(!props.hideBleedingContent && !isHoveringOnFarRight && !hideNextGradient) && (\n <div className={styles.rightOverflowGradient} />\n )}\n </>\n )}\n </div>\n </div>\n </div>\n );\n}","import { ReducerActions } from 'libs/common/react/interfaces';\n\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { WidgetInteraction } from 'libs/shared/enums/WidgetInteraction';\nimport { Breakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { WidgetType } from 'libs/shared/interfaces';\n\nimport { getComputeFunction } from './FixedWidgetUtils';\n\nexport interface FixedWidgetPayload {\n breakpoints?: Breakpoints;\n contents?: WidgetContents;\n type?: WidgetType;\n offset?: number;\n totalItems?: number;\n}\n\nexport interface FixedWidgetState {\n // Current position within the widget collection\n offset: number;\n // Number of items viewable in slider for the current breakpoint/viewport size\n viewableItems: number;\n // Relative position of slider in the window. Used for an inline translate3d().\n position: number;\n // Type of widget being managed. May change on `Resize`.\n type: WidgetType;\n // What object type the widget uses :vomit: (this needs to be phased out of this god forsaken component)\n contents: WidgetContents;\n // Total number of items in the widget\n totalItems: number;\n}\n\nexport const initialWidgetState: FixedWidgetState = {\n offset: 0,\n viewableItems: 4,\n position: 0,\n totalItems: 0,\n contents: null,\n type: WidgetType.Row\n};\n\nconst computeNextPosition = (prevState: FixedWidgetState) => {\n const { viewableItems, offset, position, totalItems } = prevState;\n\n const remainingCount = totalItems - offset;\n\n /**\n * If the remaining items are evening divisible by the items in view, or,\n * we have more items that can be displayed in the view, move the slider a full 100%.\n */\n if (remainingCount % viewableItems === 0 || remainingCount > viewableItems)\n return {\n position: position - 100,\n offset: offset + viewableItems\n };\n\n /**\n * Where there are less items than we can show in a full slide, \n * calculate the % movement required to only show those items.\n */\n if (remainingCount < viewableItems)\n return {\n position: position - (remainingCount / viewableItems * 100),\n offset: offset + remainingCount\n };\n\n /**\n * Default back to the current state as a fallback\n */\n return {\n position: position,\n offset: offset\n };\n};\n\nconst computePreviousPosition = (prevState: FixedWidgetState) => {\n const { viewableItems, offset, position } = prevState;\n\n const remainingCount = offset - viewableItems;\n\n if (remainingCount % viewableItems === 0 || remainingCount > viewableItems)\n return {\n position: position + 100,\n offset: offset - viewableItems\n };\n\n if (remainingCount < viewableItems)\n return {\n position: position + (remainingCount / viewableItems * 100),\n offset: offset - remainingCount\n };\n\n return {\n position: position,\n offset: offset\n };\n};\n\nexport function FixedWidgetReducer(\n prevState: FixedWidgetState,\n action: ReducerActions<WidgetInteraction, FixedWidgetPayload>\n): FixedWidgetState {\n const { type, payload = {} } = action;\n\n switch (type) {\n case WidgetInteraction.Next: {\n return {\n ...prevState,\n ...computeNextPosition(prevState)\n };\n }\n\n case WidgetInteraction.Previous: {\n return {\n ...prevState,\n ...computePreviousPosition(prevState)\n };\n }\n\n case WidgetInteraction.JumpToIndex: {\n return {\n ...prevState,\n offset: payload.offset,\n position: (payload.offset - 1) * -100\n };\n }\n\n case WidgetInteraction.Resize: {\n const computeViewableItems = getComputeFunction(prevState.contents);\n const initialSeen = computeViewableItems(payload.breakpoints, prevState.type, prevState.totalItems);\n\n return {\n ...prevState,\n position: 0,\n offset: initialSeen,\n viewableItems: initialSeen\n };\n }\n\n case WidgetInteraction.Init: {\n const computeViewableItems = getComputeFunction(payload.contents);\n const initialSeen = computeViewableItems(payload.breakpoints, payload.type, payload.totalItems);\n\n return lazyWidgetInit({\n ...prevState,\n offset: initialSeen,\n viewableItems: initialSeen,\n type: payload.type,\n contents: payload.contents,\n totalItems: payload.totalItems,\n position: 0\n });\n }\n\n case WidgetInteraction.Update: {\n return {\n ...prevState,\n totalItems: payload.totalItems\n };\n }\n\n default:\n return prevState;\n }\n}\n\nexport function lazyWidgetInit(newState: FixedWidgetState): FixedWidgetState {\n return { ...initialWidgetState, ...newState };\n}","import * as React from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Core } from 'libs/common/core';\nimport { Flight } from 'libs/common/flight';\nimport { ReducerActions } from 'libs/common/react/interfaces';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { FixedWidgetItemProps } from 'libs/shared/components/widgets/items/FixedWidgetItemProps';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { WidgetInteraction } from 'libs/shared/enums/WidgetInteraction';\nimport { Breakpoints, useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { BaseObject, WidgetType } from 'libs/shared/interfaces';\n\nimport { FixedWidgetProps, WIDGET_ITEM_LIMIT } from './FixedWidget';\nimport { FixedWidgetPayload, FixedWidgetState } from './FixedWidgetReducer';\n\nexport interface WidgetData {\n id?: string;\n name?: string;\n description?: string;\n}\n\nexport function useFetchData<T extends FixedWidgetItemProps = FixedWidgetItemProps>(\n props: FixedWidgetProps<T>,\n dispatch: React.Dispatch<ReducerActions<WidgetInteraction, FixedWidgetPayload>>,\n shouldFetch: boolean\n): Flight.Response<any> {\n let data = props.collection;\n let res: Flight.Response<any>;\n\n if ((!data || ObjectHelper.isEmpty(data)) && !props.prefetched) {\n res = props.fetch(shouldFetch);\n data = res.data;\n }\n\n /**\n * Once we have the widget data, lazily update our state with the new collection\n */\n const collection = (FunctionHelper.isFunction(props.setData) && data) ? props.setData(data) : data;\n let collectionToDisplay = collection;\n\n const breakpoints = useBreakpoints();\n\n React.useEffect(() => {\n if (!data || ObjectHelper.isEmpty(data))\n return;\n\n if (props.limitTotalItems)\n collectionToDisplay = collection.length > WIDGET_ITEM_LIMIT ? collection.slice(0, WIDGET_ITEM_LIMIT) : collection;\n\n let type = props.type;\n\n // The ResourcesTile widget type is deprecated. We render the Row type instead in this case\n if (type === WidgetType.ResourcesTile)\n type = WidgetType.Row;\n\n dispatch({\n type: WidgetInteraction.Init,\n payload: {\n totalItems: collectionToDisplay.length,\n breakpoints,\n type,\n contents: props.contents\n }\n });\n }, [collection?.length]);\n\n return res;\n}\n\n/**\n * This function wrapper determines which widget item images should be pre-fetched by the LazyImage component.\n * It does this by looking at which images are going to be shown after the users clicks on the \"Next\"\n * widget button.\n */\nexport function getShouldPreload(state: FixedWidgetState, collection: any[]): (widgetItem: any) => boolean {\n const { offset, viewableItems } = state;\n\n // The index of the latest item that has been fetched\n const maxLoadedIndex = offset;\n\n /**\n * The indicesToPreload is an array of indices of widget items that should be prefetched by the\n * LazyImage component\n */\n const indicesToPreload: number[] = [];\n for (let i = 0; i < maxLoadedIndex + viewableItems; i++) {\n indicesToPreload.push(i);\n }\n\n /**\n * A widget item calls this function to determine whether or not its image can be pre-fetched.\n * This is determined by whether or not its index has been deemed valid to be pre-fetched\n * by the scope above\n */\n return function shouldPreload(widgetItem: any): boolean {\n const index = collection.indexOf(widgetItem);\n\n return indicesToPreload.includes(index);\n };\n}\n\nexport function getCollectionAppLink(appLink: Core.AppLink, data: WidgetData): Core.AppLink {\n if (!appLink)\n return;\n\n return {\n ...appLink,\n args: appLink.args || [ data.id, TextHelper.slugify(data.name) ]\n };\n}\n\n/**\n * Allow explicit name and description props to override the fetched\n * data properties.\n * \n * @param props \n * @param data \n */\nexport function formatData<T extends FixedWidgetItemProps = FixedWidgetItemProps>(\n props: FixedWidgetProps<T>,\n data: BaseObject\n): WidgetData {\n const { name, description } = props;\n\n const overrideProps: WidgetData = {};\n\n if (Array.isArray(data))\n return { name, description };\n\n if (props.name) overrideProps.name = name;\n if (props.description) overrideProps.description = description;\n\n return { ...data, ...overrideProps };\n}\n\n/**\n * The functions below are used by the reducer to compute the number of widget items\n * displayed on the screen based on the media query, widget type, and total number of items.\n */\ntype ComputeFunction = (breakpoints: Breakpoints, type: WidgetType, itemCount: number) => number;\n\n/**\n * TODO:\n * This and the `WidgetType` enum need to be replaced entirely as this is no longer maintainable.\n * Each widget type + template combination should define it's own item count per\n * breakpoint and pass it in as props.\n */\nexport function getComputeFunction(contents: WidgetContents): ComputeFunction {\n switch (contents) {\n case WidgetContents.Playlists:\n return computeViewablePlaylists;\n\n case WidgetContents.Videos:\n return computeViewableVideos;\n\n case WidgetContents.RecentActivities:\n return computeViewableRecentActivities;\n\n case WidgetContents.FeedVideos:\n return computeViewableFeedVideos;\n\n case WidgetContents.Subjects:\n return computeViewableSubjects;\n\n case WidgetContents.InteractivesV2:\n return computeViewableInteractivesV2;\n\n case WidgetContents.Interactives:\n return computeViewableInteractives;\n\n case WidgetContents.ClipsV2:\n return computeViewableClipsV2;\n\n case WidgetContents.Clips:\n return computeViewableClips;\n\n case WidgetContents.PlayPageResources:\n return computeViewablePlayPageResources;\n\n case WidgetContents.PlayPageResourcesV2:\n return computeViewablePlayPageResourcesV2;\n\n case WidgetContents.DashboardResources:\n return computeViewableVideos;\n\n case WidgetContents.Libraries:\n case WidgetContents.Folders:\n return computeViewableLibraries;\n\n case WidgetContents.Ratings:\n return computeViewableRatings;\n \n case WidgetContents.SpecialEvents:\n return computeViewableSpecialEvents;\n\n case WidgetContents.Companies:\n return computeViewableCompanies;\n\n case WidgetContents.SmallSeries:\n return computeViewableSmallSeries;\n\n case WidgetContents.Series:\n default:\n return computeViewableSeries;\n }\n}\n\nfunction computeViewablePlaylists(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 5;\n\n if (breakpoints.xs)\n maxItems = 2;\n else if (breakpoints.sm)\n maxItems = 3;\n else if (breakpoints.md)\n maxItems = 4;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableCompanies(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 8;\n\n if (breakpoints.xs || breakpoints.sm)\n maxItems = 4;\n else if (breakpoints.md)\n maxItems = 6;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableLibraries(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 3;\n\n if (breakpoints.xs || breakpoints.sm)\n maxItems = 1;\n else if (breakpoints.md)\n maxItems = 2;\n else if (breakpoints.lg)\n maxItems = 3;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableVideos(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems = 4;\n\n if (breakpoints.xs)\n maxItems = 1;\n\n if (breakpoints.sm)\n maxItems = 2;\n\n if (breakpoints.md || breakpoints.lg)\n maxItems = 3;\n\n if (type === WidgetType.LargeRow && maxItems > 3)\n maxItems = 3;\n \n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableRecentActivities(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems = 4;\n\n if (breakpoints.xs)\n maxItems = 2;\n\n if (breakpoints.sm)\n maxItems = 3;\n \n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\n// eslint-disable-next-line\nfunction computeViewableFeedVideos(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n return 1;\n}\n\nfunction computeViewableSubjects(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n if (type === WidgetType.LargeRow) {\n let maxItems: number = 5;\n\n if (breakpoints.xs)\n maxItems = 2;\n else if (breakpoints.sm)\n maxItems = 3;\n else if (breakpoints.md)\n maxItems = 4;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n }\n\n let maxItems: number = 6;\n\n if (breakpoints.xs)\n maxItems = 2;\n else if (breakpoints.sm)\n maxItems = 3;\n else if (breakpoints.md)\n maxItems = 4;\n else if (breakpoints.lg)\n maxItems = 5;\n else if (breakpoints.xl || breakpoints.xxl)\n maxItems = 6;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableInteractives(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 4;\n\n if (breakpoints.md)\n maxItems = 3;\n\n if (breakpoints.sm)\n maxItems = 2;\n\n if (breakpoints.xs)\n maxItems = 1;\n\n if (itemCount < Math.ceil(maxItems))\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableClips(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 4;\n\n if (breakpoints.md)\n maxItems = 3;\n\n if (breakpoints.sm)\n maxItems = 2;\n\n if (breakpoints.xs)\n maxItems = 1;\n\n if (itemCount < Math.ceil(maxItems))\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableInteractivesV2(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 3;\n \n if (breakpoints.xs)\n maxItems = 2;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableClipsV2(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 3;\n\n if (breakpoints.xs)\n maxItems = 2;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewablePlayPageResources(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 4;\n \n if (breakpoints.sm)\n maxItems = 3;\n\n if (breakpoints.xs)\n maxItems = 2;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewablePlayPageResourcesV2(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 3;\n\n if (breakpoints.xs)\n maxItems = 2;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableSeries(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 4;\n\n if (breakpoints.xs)\n maxItems = 2;\n else if (breakpoints.sm)\n maxItems = 3;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableSmallSeries(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n let maxItems: number = 6;\n\n if (breakpoints.xs)\n maxItems = 2;\n else if (breakpoints.sm)\n maxItems = 3;\n else if (breakpoints.md)\n maxItems = 4;\n\n else if (breakpoints.lg)\n maxItems = 5;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableRatings(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n if (itemCount < 4)\n return itemCount;\n\n let maxItems: number = 5;\n\n if (breakpoints.xs || breakpoints.sm)\n maxItems = 3;\n\n if (breakpoints.md || breakpoints.lg)\n maxItems = 4;\n\n if (itemCount === 4 && (breakpoints.xs || breakpoints.sm)) {\n maxItems = 3;\n }\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\nfunction computeViewableSpecialEvents(breakpoints: Breakpoints, type: WidgetType, itemCount: number): number {\n if (itemCount < 6)\n return itemCount;\n\n let maxItems: number = 6;\n\n if (breakpoints.xs)\n maxItems = 2;\n\n if (breakpoints.sm)\n maxItems = 3;\n\n if (breakpoints.md)\n maxItems = 4;\n\n if (breakpoints.lg)\n maxItems = 5;\n\n if (breakpoints.xl || breakpoints.xxl)\n maxItems = 6;\n\n if (itemCount < maxItems)\n maxItems = itemCount;\n\n return maxItems;\n}\n\n/**\n * Touch event handlers\n */\nexport function getOnTouchStart(\n widgetState: FixedWidgetState,\n containerRef: React.MutableRefObject<HTMLDivElement>,\n containerWidth: number,\n setContainerWidth: React.Dispatch<number>,\n initialTouchX: number,\n setInitialTouchX: React.Dispatch<number>,\n setPercentageDragged: React.Dispatch<number>\n): (event: React.TouchEvent<HTMLDivElement>) => void {\n return function(event: React.TouchEvent<HTMLDivElement>): void {\n const firstTouch = event.touches.item(0);\n const touchX = firstTouch.clientX;\n\n /**\n * Runs only on the very first touch event.\n * \n * Sets the initial x-coordinate as a reference point to calculate how far the user has dragged before\n * they release their finder\n */\n if (!initialTouchX) {\n containerRef.current.style.transition = '';\n\n setContainerWidth(containerRef.current.getBoundingClientRect().width);\n setInitialTouchX(touchX);\n }\n\n const pixelsDragged = initialTouchX - touchX;\n\n // Calculate how far the user has moved their finger as a percentage of the widget's container element\n let currentPercentageDragged = ((pixelsDragged / containerWidth) * 100);\n\n /**\n * These 2 if statements prevent the user from dragging the widget beyond its limits.\n * One if statement handles if they have dragged to the left, and the other is for dragging to the right.\n * \n * The same logic is used to hide the widget buttons (see the `hide` prop passed to `<WidgetButton />`)\n */\n if (currentPercentageDragged < 0 && (widgetState.offset === widgetState.viewableItems))\n currentPercentageDragged = 0;\n\n else if (currentPercentageDragged > 0 && (widgetState.offset === widgetState.totalItems))\n currentPercentageDragged = 0;\n\n setPercentageDragged(currentPercentageDragged);\n };\n}\n\nconst DRAG_TOLERANCE = 7.5; // % of container width using to trigger a transition.\n\nexport function getOnTouchEnd(\n containerRef: React.MutableRefObject<HTMLDivElement>,\n setInitialTouchX: React.Dispatch<number>,\n percentageDragged: number,\n setPercentageDragged: React.Dispatch<number>,\n dispatch: React.Dispatch<ReducerActions<WidgetInteraction, FixedWidgetPayload>>,\n onNext: () => void,\n onPrevious: () => void\n): () => void {\n return function(): void {\n containerRef.current.style.transition = 'transform .4s ease-in-out';\n setInitialTouchX(null);\n\n /**\n * Only trigger a Next/Previous widget event if the user has dragged beyond DRAG_TOLERANCE% either way of the\n * container's width. This means if the user only drags left/right a tiny little bit, the widget\n * will simply slide back into its original place.\n */\n if (Math.abs(percentageDragged) >= DRAG_TOLERANCE) {\n const reducerAction = percentageDragged > 0 ? WidgetInteraction.Next : WidgetInteraction.Previous;\n\n dispatch({\n type: reducerAction\n });\n\n if (percentageDragged > 0 && onNext) {\n onNext();\n } else if (percentageDragged < 0 && onPrevious) {\n onPrevious();\n }\n }\n\n setPercentageDragged(0);\n };\n}\n\nexport function hideBackButton(\n isHoveringOnFarLeft: boolean,\n isHoveringOnWidget: boolean,\n widgetOffset: number,\n maxViewableItems: number,\n widgetCollectionSize: number\n): boolean {\n // When hovering on the very far left widget item, hide the back button\n if (isHoveringOnFarLeft)\n return true;\n\n // if the collection size is smaller than the max viewable items, hide the back button\n if (widgetCollectionSize <= maxViewableItems)\n return true;\n\n // When hovering on the entire widget area, hide the back button if the widget is in the far left position\n if (isHoveringOnWidget)\n return widgetOffset === maxViewableItems;\n\n return true;\n}\n\nexport function hideNextButton(\n isHoveringOnFarRight: boolean,\n isHoveringOnWidget: boolean,\n widgetOffset: number,\n maxViewableItems: number,\n widgetCollectionSize: number,\n showSeeMoreButton: boolean\n): boolean {\n // When hovering on the very far right widget item, hide the next button\n if (isHoveringOnFarRight)\n return true;\n\n // if the collection size is smaller than the max viewable items, hide the next button\n if (widgetCollectionSize <= maxViewableItems)\n return true;\n\n // Always show the next button if the widget is in the far left position\n if (widgetOffset === maxViewableItems)\n return false;\n\n // When the user is hovering over the entire widget area...\n if (isHoveringOnWidget) {\n // If we want to show the \"See more\" button, don't hide the next button\n if (showSeeMoreButton)\n return false;\n\n // Only show the next button if there are still more items to show\n return widgetCollectionSize <= widgetOffset;\n }\n\n return true;\n}\n\nexport interface FixedWidgetControls {\n jumpToIndex: (index: number) => void;\n}\n\n/**\n * If a component consuming FixedWidget needs to dispatch events to FixedWidget,\n * it can pass in a `controlsRef` prop, which will receive the API defined\n * below. This API can be extended as needed.\n * See FeedVideoCollection.tsx for an example\n */\nexport function useControlsRef(\n ref: React.MutableRefObject<FixedWidgetControls>,\n dispatch: React.Dispatch<ReducerActions<WidgetInteraction, FixedWidgetPayload>>\n): void {\n React.useEffect(() => {\n if (!ref || ref.current)\n return;\n\n ref.current = {\n jumpToIndex: (index: number) => dispatch({\n type: WidgetInteraction.JumpToIndex,\n payload: {\n offset: index + 1\n }\n })\n };\n }, [ref?.current]);\n}","import * as React from 'react';\n\nimport { HashObject } from 'libs/common/react/interfaces/HashObject';\n\nimport { PartialWidgetHeader } from 'libs/shared/components/widgets/curated-widgets/components/header/partial-loading/PartialWidgetHeader';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nimport styles from './fixed-widget.scss';\n\nfunction useGetSize(size?: 'sm' | 'lg'): HashObject {\n const breakpoints = useBreakpoints();\n\n if (breakpoints.xs)\n return {\n itemCount: 1,\n colSize: 12\n };\n\n if (breakpoints.sm)\n return {\n itemCount: 2,\n colSize: 6\n };\n\n if (breakpoints.md || breakpoints.lg)\n return {\n itemCount: 3,\n colSize: 4\n };\n\n return {\n itemCount: size === 'sm' ? 4 : 3,\n colSize: size === 'sm' ? 3 : 4\n };\n}\n\nexport interface PartialFixedWidgetItemProps {\n colSize: number;\n}\n\nconst PartialLoadingItem = ({ colSize }: PartialFixedWidgetItemProps) => (\n <div className={`col-${colSize} px-1`}>\n <div className={`${styles.partialItem} partial-loading-background rounded-3`} />\n </div>\n);\n\nexport interface PartialFixedWidgetProps {\n hideDescription?: boolean;\n hideHeading?: boolean;\n size?: 'sm' | 'lg';\n childComponent?: (props: PartialFixedWidgetItemProps) => JSX.Element;\n}\n\nPartialFixedWidget.defaultProps = {\n size: 'sm',\n childComponent: PartialLoadingItem\n};\n\nexport function PartialFixedWidget(props: PartialFixedWidgetProps): JSX.Element {\n const { itemCount, colSize } = useGetSize(props.size);\n\n const ChildComponent = props.childComponent;\n\n const items = [];\n for (let i = 0; i < itemCount; i++) {\n items.push(<ChildComponent key={i} colSize={colSize} />);\n }\n\n return (\n <div className='widget'>\n <PartialWidgetHeader hideHeading={props.hideHeading} hideDescription={props.hideDescription} />\n <div className='row g-0 mx-n1'>\n {items}\n </div>\n </div>\n );\n}","import { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\n\nconst blankImage = new Image();\nblankImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=';\n\nexport const DragHelper = {\n // This removes the image that appears when you drag a draggable HTML element\n hideDragImage(event: React.DragEvent<HTMLElement>): void {\n if (!event.dataTransfer.setDragImage || !FunctionHelper.isFunction(event.dataTransfer.setDragImage))\n return;\n\n event.dataTransfer.setDragImage(blankImage, 0, 0);\n }\n};","import * as React from 'react';\n\nimport { UserAgentHelper } from 'libs/common/backbone/utils/UserAgentHelper';\nimport { HashObject } from 'libs/common/react/interfaces/HashObject';\n\nimport { CssMeasurement } from 'libs/shared/enums/CssMeasurement';\nimport { DragHelper } from 'libs/shared/utils/DragHelper';\n\nconst isTouchScreen = UserAgentHelper.isTouchScreen();\n\nconst getPositionStyling = (xPosition: number, measurement: CssMeasurement, dragPercentage?: number) => {\n // Used in situations where a touch screen user is dragging the `<FixedWidget />`\n if (measurement === CssMeasurement.Percentage && dragPercentage)\n xPosition = xPosition - dragPercentage;\n\n return {\n transform: `translate3d(${xPosition}${measurement}, 0px, 0px)`,\n transition: 'transform .4s ease-in-out'\n };\n};\n\ninterface SlidingListContainerProps extends React.PropsWithChildren<unknown> {\n position: number;\n positionType: CssMeasurement;\n\n onDrag?: (event: React.DragEvent<HTMLDivElement>) => void;\n onDragEnd?: () => void;\n\n onTouchMove?: (event: React.TouchEvent<HTMLDivElement>) => void;\n onTouchEnd?: () => void;\n\n percentageDragged?: number;\n}\n\nexport const SlidingListContainer = React.forwardRef((\n props: SlidingListContainerProps,\n ref: React.MutableRefObject<HTMLDivElement>\n): JSX.Element => {\n const { children, positionType, onDrag, onDragEnd, onTouchMove, onTouchEnd, percentageDragged, position = 0 } = props;\n\n function getEventListeners(): HashObject {\n const listenerProps: HashObject = {};\n\n if (onDrag && onDragEnd) {\n listenerProps.draggable = true;\n listenerProps.onDragEnd = onDragEnd;\n listenerProps.onDragStart = DragHelper.hideDragImage;\n listenerProps.onDragOver = onDrag;\n }\n\n if (onTouchMove && onTouchEnd && isTouchScreen) {\n listenerProps.onTouchMoveCapture = onTouchMove;\n listenerProps.onTouchEndCapture = onTouchEnd;\n }\n\n return listenerProps;\n }\n\n return (\n <div\n className='d-flex flex-nowrap position-relative w-100'\n style={getPositionStyling(position, positionType, percentageDragged)}\n ref={ref}\n {...getEventListeners()}\n >\n {children}\n </div>\n );\n});","// extracted by mini-css-extract-plugin\nexport default {\"buttonContainer\":\"_ejId\",\"left\":\"VSAPU\",\"right\":\"kgeXh\",\"button\":\"gAsE9\",\"hoverText\":\"APA36\",\"buttonHover\":\"cqD75\",\"chevron\":\"Ev4hr\",\"extendedClickableArea\":\"AtsWP\",\"gradientRight\":\"ZuAif\",\"gradientLeft\":\"Pt3nx\",\"topPos\":\"BVcIS\"};","import * as React from 'react';\n\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { FixedWidgetState } from 'libs/shared/components/widgets/fixed-widget';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './widget-button.scss';\n\nexport enum WidgetButtonDirection {\n Left,\n Right\n}\n\ninterface WidgetButtonProps {\n onClick: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n direction: WidgetButtonDirection;\n hide: boolean;\n contents?: WidgetContents;\n useGradientBackdrop?: boolean;\n className?: string;\n hoverText?: string;\n hideExtendedClickableArea?: boolean;\n state?: FixedWidgetState;\n\n leftButtonClassName?: string;\n rightButtonClassName?: string;\n leftGradientClassName?: string;\n rightGradientClassName?: string;\n}\n\nexport const WidgetButton = React.memo(function(props: WidgetButtonProps): JSX.Element {\n const isLeft = props.direction === WidgetButtonDirection.Left;\n\n const arrowSvg = isLeft ? cvSvgLibrary.ChevronLeft : cvSvgLibrary.ChevronRight;\n\n function getPositionClass(): string {\n let className = styles.topPos;\n \n // Left / Right\n if (isLeft)\n className += ` ${styles.left} ${props.leftButtonClassName}`;\n else\n className += ` ${styles.right} ${props.rightButtonClassName}`;\n \n return className;\n }\n\n function getStyle(): React.CSSProperties {\n if (props.state?.contents === 'videos')\n return { paddingBottom: (56.25 / props.state?.viewableItems) + '%' };\n\n return { height: '100%' };\n }\n\n if (props.hide)\n return <></>;\n\n return (\n <div className={styles.buttonContainer} style={getStyle()}>\n {props.useGradientBackdrop &&\n <div className={isLeft ? `${styles.gradientLeft} ${props.leftGradientClassName}` : `${styles.gradientRight} ${props.rightGradientClassName}`} />\n }\n\n {!props.hideExtendedClickableArea && (\n <div\n role='button'\n onClick={props.onClick}\n className={`${styles.extendedClickableArea} ${isLeft ? styles.left : styles.right}`}\n />\n )}\n\n <div\n role='button'\n className={`${getPositionClass()} ${styles.button} ${props.className || ''}`}\n onClick={props.onClick}\n >\n {props.hoverText && (\n <span className={`ps-3 pe-2 ${styles.hoverText}`}>{props.hoverText}</span>\n )}\n <SvgContainer\n svgName={arrowSvg}\n size={SvgContainerSize.Medium}\n className={`svg-container d-inline-block ${styles.chevron}`}\n />\n </div>\n </div>\n );\n});","export enum CssMeasurement {\n Percentage = '%',\n Pixels = 'px'\n}","export enum WidgetContents {\n Videos = 'videos',\n FeedVideos = 'feed videos',\n Series = 'series',\n Subjects = 'subjects',\n Playlists = 'playlists',\n Interactives = 'interactives',\n Clips = 'clips',\n PlayPageResources = 'play page resources',\n DashboardResources = 'dashboard resources',\n Libraries = 'Libraries',\n Folders = 'Folders',\n RecentActivities = 'recent activities',\n SmallSeries = 'small series',\n Companies = 'companies',\n Ratings = 'ratings',\n SpecialEvents = 'special events',\n\n InteractivesV2 = 'interactives v2',\n ClipsV2 = 'clips v2',\n PlayPageResourcesV2 = 'playpage resources v2'\n}","export enum WidgetInteraction {\n Init = 'init',\n Next = 'next',\n Previous = 'previous',\n Resize = 'resize',\n Drag = 'drag',\n Update = 'update',\n JumpToIndex = 'jump-to-index'\n}","// extracted by mini-css-extract-plugin\nexport default {\"rightOverflowGradient\":\"tAbzW\",\"leftOverflowGradient\":\"JXtNs\",\"partialItem\":\"iNH_I\",\"mobileScroll\":\"bDcOS\"};"],"names":["getPhrase","LanguageService","SeeMore","props","className","AppLink","appLink","analyticsData","analyticsOptions","descriptor","WidgetHeader","hasDescription","description","name","onClick","showSeeMoreLink","PartialWidgetHeader","hideDescription","hideHeading","style","height","width","namespace","WIDGET_ITEM_LIMIT","FixedWidget","getWidgetItemAnalyticsData","initialTouchX","setInitialTouchX","containerWidth","setContainerWidth","percentageDragged","setPercentageDragged","state","dispatch","containerRef","buttonsRef","isHovering","isHoveringOnFarLeft","setIsHoveringOnFarLeft","isHoveringOnFarRight","setIsHoveringOnFarRight","controlsRef","prevent","lazyLoad","ref","shouldFetch","inView","response","getWidgetCollection","limit","responseData","prefetched","collection","data","formattedResponse","setData","slice","widgetItems","limitTotalItems","Infinity","hasReachedEnd","offset","length","breakpoints","shouldScroll","touchBehavior","type","payload","contents","totalItems","widgetContext","collectionSize","hasError","PartialComponent","partialComponent","minimumItemCount","WidgetItemComponent","childComponent","getSliderAnalyticsData","id","direction","showSeeMoreButton","hideButtons","hideBackGradient","viewableItems","hideNextGradient","hasMoreThanViewable","hideName","hideBleedingContent","W","onPrevious","hide","leftWidgetButtonClassName","hideExtendedClickableArea","position","positionType","C","onTouchMove","onTouchEnd","onNext","map","widgetItem","index","key","collectionAppLink","getAppLink","getChildAppLink","context","preloadImage","thumbnailSize","widgetId","widgetName","itemIndex","onHover","hovering","window","setTimeout","onSetIsHovering","extraChildComponentProps","hoverText","rightWidgetButtonClassName","defaultProps","initialWidgetState","computeNextPosition","prevState","remainingCount","computePreviousPosition","FixedWidgetReducer","action","initialSeen","computeViewableItems","lazyWidgetInit","newState","useFetchData","res","fetch","collectionToDisplay","getShouldPreload","maxLoadedIndex","indicesToPreload","i","push","indexOf","includes","getCollectionAppLink","args","formatData","overrideProps","Array","isArray","getComputeFunction","computeViewablePlaylists","computeViewableVideos","computeViewableRecentActivities","computeViewableFeedVideos","computeViewableSubjects","computeViewableInteractivesV2","computeViewableInteractives","computeViewableClipsV2","computeViewableClips","computeViewablePlayPageResources","computeViewablePlayPageResourcesV2","computeViewableLibraries","computeViewableRatings","computeViewableSpecialEvents","computeViewableCompanies","computeViewableSmallSeries","computeViewableSeries","itemCount","maxItems","xs","sm","md","lg","xl","xxl","Math","ceil","getOnTouchStart","widgetState","event","touchX","touches","item","clientX","current","transition","getBoundingClientRect","currentPercentageDragged","DRAG_TOLERANCE","getOnTouchEnd","abs","reducerAction","hideBackButton","isHoveringOnWidget","widgetOffset","maxViewableItems","widgetCollectionSize","hideNextButton","useControlsRef","jumpToIndex","PartialFixedWidget","size","colSize","ChildComponent","items","blankImage","Image","src","DragHelper","dataTransfer","setDragImage","FunctionHelper","isTouchScreen","UserAgentHelper","SlidingListContainer","listenerProps","xPosition","measurement","dragPercentage","children","onDrag","onDragEnd","CssMeasurement","transform","draggable","onDragStart","onDragOver","onTouchMoveCapture","onTouchEndCapture","WidgetButtonDirection","WidgetButton","isLeft","Left","arrowSvg","paddingBottom","useGradientBackdrop","leftGradientClassName","rightGradientClassName","role","leftButtonClassName","rightButtonClassName","SvgContainer","svgName","S","WidgetContents","WidgetInteraction"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripts/2703-430c5a5fc1-lite.chunk.js","mappings":"mJAGaA,EAAe,CAC1BC,uBAAsB,SAACC,EAA+BC,GACpD,OAAIA,GACK,IAAAC,cAAaF,EAAWC,GAE1BD,CACT,E,8FCRF,SAAgB,IAAM,QAAQ,QAAU,SCSxC,IAAMG,EAAY,qCAOZ,SAAUC,EAAcC,GAC5B,OACE,gBAACC,EAAA,EAAO,CAACC,MAAOC,EAAA,YAA0BL,EAAW,WAAYM,kBAAiB,kBAAa,WAAkBC,UAAQ,GACvH,uBAAKC,UAAS,8CAAyC,MAAU,YAAIN,EAAMM,YACzE,gBAACC,EAAA,EAAY,CAACC,QAAS,cACrBR,EAAMS,UAAYN,EAAA,YAA0BL,EAAW,eAIjE,C,6DCzBA,SAAgB,SAAW,QAAQ,MAAQ,QAAQ,KAAO,QAAQ,QAAU,QAAQ,UAAY,QAAQ,UAAY,QAAQ,MAAQ,SCyB9H,SAAUY,EAAoBV,G,UAYlC,OACE,gBAACW,EAAA,EAAO,CACNC,QAAyB,QAAhB,EAAAZ,EAAMa,kBAAU,uBACzBP,UAAS,8EAAoF,QAAX,EAAAN,EAAMc,aAAK,eAAEC,OAAM,0CAAkCf,EAAMM,WAC7IU,cAAehB,EAAMgB,cACrBC,iBAAkBjB,EAAMiB,kBAExB,uBAAKX,UAAS,4BAAuB,aACnC,uBAAKA,UAAS,UAAgB,QAAX,EAAAN,EAAMc,aAAK,eAAEI,WAAU,iBAAS,QAAY,sDAC5DlB,EAAMmB,MAAQnB,EAAMmB,MAAQ,sCAE/B,uBAAKb,UAAS,UAtBpB,WACE,OAAQN,EAAMoB,KAAKC,MACjB,IAAK,QACH,OAAO,YACT,IAAK,MACH,OAAO,UACT,IAAK,QACH,OAAO,YAEb,CAayBC,GAAc,YAAI,OAA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gD,EAAU,KAE3B,aAAgB,WACd,IAAKL,aAAQ,EAARA,EAAU3L,SAAWwL,EAAYS,aAAtC,CAGA,IAAMC,EAA6B,GAEnCP,EAAS3D,SAAQ,SAAA/B,GACVwF,EAAeU,QAAQC,IAAInG,KAC9BiG,EAAiBG,KAAKpG,GACtBwF,EAAeU,QAAQG,IAAIrG,GAE/B,IAEKiG,EAAiBlM,QAGtBgM,GAAW,SAAAO,G,MACHC,EAAc,GAAH,O,yWAAA,CACZD,GAAC,CACJ,qBAA+BL,EAAkB1D,EAAQiE,mBAM3D,OAHoB,QAAhB,EAAAjB,EAAYO,YAAI,eAAEW,kBACpBF,EAAYH,KAAK,uBAA0CH,EAAkB,KAAM1D,EAAQiE,kBAEtFD,CACT,GAxBQ,CAyBV,GAAG,CAAEb,aAAQ,EAARA,EAAU3L,OAAQwL,EAAYS,eAEnC,qBAAwBjD,EAC1B,C","sources":["file:///app/packages/libs/common/src/react/utils/PortalHelper.ts","file:///app/packages/libs/shared/src/apps/calendar/components/coming-soon-tag/coming-soon-tag.scss","file:///app/packages/libs/shared/src/apps/calendar/components/coming-soon-tag/ComingSoonTag.tsx","file:///app/packages/libs/shared/src/apps/calendar/components/generic-calendar-date/generic-calendar-date.scss","file:///app/packages/libs/shared/src/apps/calendar/components/generic-calendar-date/GenericCalendarDate.tsx","file:///app/packages/libs/shared/src/components/back-button/BackButton.tsx","file:///app/packages/libs/shared/src/components/banner-header/banner-header.scss","file:///app/packages/libs/shared/src/components/banner-header/BannerHeader.tsx","file:///app/packages/libs/shared/src/components/breadcrumbs/Breadcrumbs.tsx","file:///app/packages/libs/shared/src/components/infinite-scroll-footer/infinite-scroll-footer.scss","file:///app/packages/libs/shared/src/components/infinite-scroll-footer/InfiniteScrollFooter.tsx","file:///app/packages/libs/shared/src/components/video-list/partial-loading/partial-video-list.scss","file:///app/packages/libs/shared/src/components/video-list/partial-loading/PartialVideoList.tsx","file:///app/packages/libs/shared/src/components/video-sort-select/VideoSortSelect.tsx","file:///app/packages/libs/shared/src/errors/handlers/HttpErrorHandlers.ts","file:///app/packages/libs/shared/src/hooks/UseHandleObjectError.ts","file:///app/packages/libs/shared/src/hooks/UseInfiniteScroll.ts","file:///app/packages/libs/shared/src/hooks/UseInfiniteList.ts","file:///app/packages/libs/shared/src/utils/PartialLoadingHelper.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';\nimport { createPortal } from 'react-dom';\n\nexport const PortalHelper = {\n renderInPortalIfExists(component: React.ReactElement, portalContainer: Element | null): React.ReactElement {\n if (portalContainer)\n return createPortal(component, portalContainer);\n\n return component;\n }\n};","// extracted by mini-css-extract-plugin\nexport default {\"tag\":\"XRj8d\",\"tooltip\":\"X6mLk\"};","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { SvgContainer } from 'libs/shared/components/svg-container/SvgContainer';\nimport { Tooltip } from 'libs/shared/components/tooltip/Tooltip';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './coming-soon-tag.scss';\n\nconst namespace = 'specialEventCalendar.comingSoonTag';\n\ninterface ComingSoonProps {\n className?: string;\n onlyIcon?: boolean;\n}\n\nexport function ComingSoonTag(props: ComingSoonProps): JSX.Element {\n return (\n <Tooltip title={LanguageService.getPhrase(namespace, 'tooltip')} spanHackClassName={`d-block ${styles.tooltip}`} spanHack>\n <div className={`d-flex text-dark align-items-center ${styles.tag} ${props.className}`}>\n <SvgContainer svgName={cvSvgLibrary.Timer} />\n {!props.onlyIcon && LanguageService.getPhrase(namespace, 'comingSoon')}\n </div>\n </Tooltip>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"dateItem\":\"I3SBm\",\"label\":\"PRORs\",\"body\":\"RfiM_\",\"bodyDay\":\"ZOVny\",\"bodyRange\":\"vYhXN\",\"bodyMonth\":\"mYslO\",\"month\":\"EPkkQ\"};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces';\n\nimport { CalendarTheme } from 'libs/shared/apps/calendar/interfaces/CalendarTheme';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\n\nimport styles from './generic-calendar-date.scss';\n\nexport interface GenericCalendarDateProps {\n label?: string;\n body: {\n type: 'month' | 'range' | 'day';\n text: string;\n };\n month?: string;\n getAppLink?: () => Core.AppLink;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n className?: string;\n theme?: CalendarTheme;\n}\n\nexport function GenericCalendarDate(props: GenericCalendarDateProps): JSX.Element {\n function getBodyClass(): string {\n switch (props.body.type) {\n case 'range':\n return styles.bodyRange;\n case 'day':\n return styles.bodyDay;\n case 'month':\n return styles.bodyMonth;\n }\n }\n\n return (\n <AppLink\n appLink={props.getAppLink?.()}\n className={`text-decoration-none text-center bg-white text-dark border border-3 ${props.theme?.border} rounded-3 d-block fw-semibold ${props.className}`}\n analyticsData={props.analyticsData}\n analyticsOptions={props.analyticsOptions}\n >\n <div className={`position-relative ${styles.dateItem}`}>\n <div className={`${props.theme?.background} py-1 ${styles.label} d-flex align-items-center justify-content-center`}>\n {props.label ? props.label : <> </>}\n </div>\n <div className={`${getBodyClass()} ${styles.body} my-2`}>\n {props.body.text}\n </div>\n <div className={`mb-0 ${styles.month}`}>\n {props.month}\n </div>\n </div>\n </AppLink>\n );\n}","import * as React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nconst namespace = 'shared.backButton';\n\ninterface BackButtonProps {\n appLink: Core.AppLink;\n backToName?: string;\n color?: 'black' | 'white';\n extraClasses?: string;\n /**\n * Whether or not the button text has a text shadow. Defaults to true\n */\n textShadow?: boolean;\n}\n\nBackButton.defaultProps = {\n color: 'black',\n extraClasses: ''\n};\n\nexport function BackButton(props: BackButtonProps): React.ReactElement {\n const { backToName, appLink, color, extraClasses, textShadow } = {\n textShadow: true,\n ...props\n };\n\n const backPhrase = backToName\n ? LanguageService.getPhrase(namespace, 'backTo', { backToName })\n : LanguageService.getPhrase(namespace, 'back');\n\n const colorClass = color === 'black' ? '' : 'text-white';\n const textShadowClass = textShadow ? 'text-shadow' : '';\n\n return (\n <AppLink\n appLink={appLink}\n className={`d-inline-flex align-items-center h5 mb-0 ${extraClasses} ${colorClass} ${textShadowClass}`}\n >\n <SvgContainer svgName={cvSvgLibrary.ChevronLeft} size={SvgContainerSize.Medium} />\n <span className='ms-1'>{backPhrase}</span>\n </AppLink>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"bannerContent\":\"sSCTB\",\"actionsContainer\":\"Z5WI2\",\"bannerContentWithLogo\":\"rgs7Q\",\"container\":\"M51HJ\",\"logoContainer\":\"vkeJk\",\"logoContainerLeft\":\"M3U9B\",\"logoHeading\":\"EtRwC\",\"specialEventContainer\":\"rOxDc\",\"headingLarge\":\"_8pnV\",\"heading\":\"JXVBH\"};","import * as React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\nimport { PortalHelper } from 'libs/common/react/utils/PortalHelper';\n\nimport { ComingSoonTag } from 'libs/shared/apps/calendar/components/coming-soon-tag/ComingSoonTag';\nimport { GenericCalendarDate } from 'libs/shared/apps/calendar/components/generic-calendar-date/GenericCalendarDate';\nimport { CalendarTheme } from 'libs/shared/apps/calendar/interfaces/CalendarTheme';\nimport { ActionOptions, Actions } from 'libs/shared/components/actions/Actions';\nimport { BackButton } from 'libs/shared/components/back-button/BackButton';\nimport { LazyImage } from 'libs/shared/components/lazy-image/LazyImage';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { ImageMinDimensions } from 'libs/shared/constants/ImageSizes';\nimport { BannerPortalContext } from 'libs/shared/context/BannerPortalContext';\nimport { ImageSize, ImageType, ResizeType } from 'libs/shared/enums/Images';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { Banner, CalendarEvent, Logo } from 'libs/shared/interfaces';\nimport { ImageHelper, ImageOptions } from 'libs/shared/utils/ImageHelper';\n\nimport styles from './banner-header.scss';\n\nconst RATIO = `${ImageMinDimensions[ImageType.Banners].width}:${ImageMinDimensions[ImageType.Banners].height}`;\nconst DEFAULT_WIDTH = 1200; // This is ImageSize.Large for a Banner.\nconst LARGE_SCREEN_WIDTH = 1920;\n\nfunction useGetImageWidth(): number {\n const breakpoints = useBreakpoints();\n\n if (breakpoints.xxl)\n return LARGE_SCREEN_WIDTH;\n\n return DEFAULT_WIDTH;\n}\n\nfunction getSizeClass(heading: string): string {\n if (heading.length < 160)\n return 'h1';\n\n return styles.headingLarge;\n}\n\ninterface BannerHeaderProps {\n heading: string;\n banner?: Banner;\n bannerClassName?: string;\n imageCdnUrl?: string;\n logo?: Logo;\n actions?: ActionOptions[];\n specialEvent?: CalendarEvent;\n backButtonAppLink?: Core.AppLink;\n backButtonText?: string;\n backButtonClasses?: string;\n sortComponent?: JSX.Element;\n blockColourClass?: string;\n actionsDropdownClassName?: string;\n detailsComponent?: () => React.ReactElement;\n imageOptions?: ImageOptions;\n showComingSoon?: boolean;\n alignLogoLeft?: boolean;\n calendarTheme?: CalendarTheme;\n}\n\nconst namespace = 'shared.bannerHeader';\n\nexport const BannerHeader = React.memo(function(props: React.PropsWithChildren<BannerHeaderProps>): React.ReactElement {\n const { heading, banner, imageCdnUrl, actions, sortComponent, blockColourClass, specialEvent } = props;\n\n const portalContainerContext = React.useContext(BannerPortalContext);\n\n const imageWidth = useGetImageWidth();\n\n const specialEventIsToday = React.useMemo(() => {\n if (!specialEvent || props.showComingSoon)\n return false;\n\n const today = DateHelper.format(new Date(), 'YYYY-MM-DD');\n\n if (!specialEvent.endDate)\n return specialEvent.startDate === today;\n\n return specialEvent.startDate <= today && specialEvent.endDate >= today;\n }, [specialEvent]);\n\n const imageOptions = props.imageOptions || {\n width: imageWidth,\n ratio: RATIO,\n resizeType: ResizeType.Cover\n };\n\n const url = !!banner && !!imageCdnUrl && ImageHelper.createBannerUrl(banner, {\n fallbackBaseUrl: imageCdnUrl,\n fallbackCategoryName: heading,\n type: ImageType.Banners\n }, imageOptions);\n\n const containerProps: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> = {\n className: `banner banner-header ${props.bannerClassName}`,\n style: url ? { backgroundImage: `url('${url}')` } : {}\n };\n\n if (!banner && blockColourClass) {\n delete containerProps.style;\n containerProps.className += ` ${blockColourClass}`;\n }\n\n const DetailsComponent = props.detailsComponent;\n\n return PortalHelper.renderInPortalIfExists(\n // \"banner\" is used in playlists in Online. banner-header is used by all other projects\n <header {...containerProps}>\n <div className={`container ${styles.container} position-relative inner-banner`}>\n {props.backButtonAppLink && (\n <div className='pt-3'>\n <BackButton\n appLink={props.backButtonAppLink}\n backToName={props.backButtonText}\n extraClasses={props.backButtonClasses}\n color='white'\n />\n </div>\n )}\n \n <div className={`${props.alignLogoLeft ? 'position-absolute top-50 start-0 translate-middle-y w-100 ps-4' : `${styles.bannerContent} px-2 ${props.logo?.url ? styles.bannerContentWithLogo : ''}`}`}>\n {!!specialEvent && (\n <div className={`position-relative ${styles.specialEventContainer}`}>\n <GenericCalendarDate\n body={{\n type: specialEvent.endDate ? 'range' : 'day',\n text: specialEvent.endDate\n ? `${DateHelper.format(specialEvent.startDate, 'DD')}-${DateHelper.format(specialEvent.endDate, 'DD')}`\n : DateHelper.format(specialEvent.startDate, 'DD')\n }}\n month={DateHelper.format(specialEvent.startDate, 'MMMM')}\n theme={props.calendarTheme}\n />\n </div>\n )}\n <div>\n {specialEventIsToday && (\n <div className='rounded-pill py-1 px-2 my-1 me-1 fw-semibold bg-light-blue lh-1 d-inline-block'>\n <Text namespace={namespace} phrase='onToday' />\n </div>\n )}\n {props.showComingSoon && (\n <ComingSoonTag className='pe-2 fw-semibold mb-1 rounded-pill justify-content-start text-nowrap' />\n )}\n <div className='d-flex align-items-center'>\n {props.alignLogoLeft &&\n <div className={`${styles.logoContainerLeft} d-none d-md-block partial-loading-background rounded-circle overflow-hidden me-3`}>\n {props.logo?.url &&\n <LazyImage src={ImageHelper.createUrl(props.logo?.url, { size: ImageSize.Small })} />}\n </div>\n }\n <h1 className={`text-white text-shadow pe-3 ${styles.heading} ${getSizeClass(heading)} ${props.alignLogoLeft ? 'w-50' : ''}`}>\n {heading}\n {DetailsComponent && <DetailsComponent />}\n </h1>\n </div>\n </div>\n {!!actions && (\n <div className={styles.actionsContainer}>\n <Actions\n actions={actions}\n sortComponent={sortComponent}\n actionsDropdownClassName={props.actionsDropdownClassName}\n />\n </div>\n )}\n </div>\n {!props.alignLogoLeft && !!props.logo?.url &&\n <div className={styles.logoContainer}>\n <img\n src={ImageHelper.createUrl(props.logo.url, { size: ImageSize.Small })}\n className='rounded-circle'\n />\n </div>\n }\n </div>\n </header>,\n portalContainerContext?.container\n );\n}, (prevProps, nextProps): boolean => (\n prevProps.actions === nextProps.actions\n && prevProps.heading === nextProps.heading\n && prevProps.logo?.url === nextProps.logo?.url\n));\n\nexport function PartialBannerHeader(): JSX.Element {\n const portalContainerContext = React.useContext(BannerPortalContext);\n\n return PortalHelper.renderInPortalIfExists(\n <div className={`partial-banner partial-loading-background ${styles.banner}`} />,\n portalContainerContext?.container\n );\n}","import * as React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { PartialLoadingHelper } from 'libs/shared/utils/PartialLoadingHelper';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport { SvgContainer, SvgContainerSize } from '../svg-container/SvgContainer';\n\nexport interface Breadcrumb {\n name: string;\n appLink?: Core.AppLink;\n active?: boolean;\n}\n\ninterface BreadcrumbItemProps {\n breadcrumb: Breadcrumb;\n withBackIcon?: boolean;\n}\n\nexport const BreadcrumbItem = ({ breadcrumb: { name, appLink, active }, withBackIcon }: BreadcrumbItemProps) => (\n <li className={`breadcrumb-item${active ? ' active' : ''}`}>\n {active\n ? <strong>{name}</strong>\n : <AppLink appLink={appLink}>\n {withBackIcon && <SvgContainer svgName={cvSvgLibrary.ChevronLeft} size={SvgContainerSize.Small} />}\n <span className={withBackIcon ? 'ms-2' : ''}>{name}</span>\n </AppLink>\n }\n </li>\n);\n\ninterface BreadcrumbsProps {\n breadcrumbs: Breadcrumb[];\n}\n\nexport const Breadcrumbs = ({ breadcrumbs }: BreadcrumbsProps) => {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n\n const length = breadcrumbs?.length;\n\n if (!length || (isMobile && length < 2))\n return <></>;\n\n if (isMobile)\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n <BreadcrumbItem breadcrumb={breadcrumbs[length - 2]} withBackIcon />\n </ol>\n </nav>\n );\n\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n {breadcrumbs.map((b, idx) => <BreadcrumbItem key={idx} breadcrumb={b} />)}\n </ol>\n </nav>\n );\n};\n\nexport const PartialBreadcrumbs = React.memo(function({ numItems = 3 }: { numItems?: number; }) {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n\n if (isMobile) {\n return (\n <div className='partial-loading-background' style={{ height: '1.3125rem', width: '6rem' }} />\n );\n }\n\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n {PartialLoadingHelper.getPartialLoadingItems({ numItems }).map(({ width }, idx) => (\n <li key={idx} className='breadcrumb-item'>\n <span className='d-inline-block partial-loading-background' style={{ width }} dangerouslySetInnerHTML={{ __html: ' ' }} />\n </li>\n ))}\n </ol>\n </nav>\n );\n});","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"VwD1b\",\"spinner\":\"eJ85e\"};","import * as React from 'react';\nimport { Spinner } from 'react-bootstrap';\nimport { useInView } from 'react-intersection-observer';\n\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './infinite-scroll-footer.scss';\n\ninterface InfiniteScrollFooterProps {\n isFetching: boolean;\n fetchNext?: (nextCursor: string) => void;\n nextCursor?: string;\n fetchOnScroll?: boolean;\n}\n\nInfiniteScrollFooter.defaultProps = {\n fetchOnScroll: false\n};\n\nexport function InfiniteScrollFooter(props: InfiniteScrollFooterProps): React.ReactElement {\n const [ ref, inView ] = useInView();\n\n React.useEffect(() => {\n if (!props.fetchOnScroll)\n return;\n\n if (!inView || props.isFetching)\n return;\n\n props.fetchNext?.(props.nextCursor);\n }, [ inView, props.isFetching ]);\n\n return (\n <div className={`p-3 text-center ${styles.container}`} ref={ref}>\n {props.isFetching\n ? <Spinner as='span' animation='border' role='status' className={styles.spinner} />\n : (\n <SvgContainer\n svgName={cvSvgLibrary.ChevronDown}\n className='svg-container cursor-pointer'\n size={SvgContainerSize.Large}\n onClick={() => props.fetchNext?.(props.nextCursor)}\n />\n )\n }\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"partialOptions\":\"Gufgq\",\"partialName\":\"SicQQ\",\"partialDescription\":\"dPGMq\",\"partialThumbnail\":\"vZrnb\",\"partialDragHandle\":\"iq73R\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nimport styles from './partial-video-list.scss';\n\ninterface PartialVideoListProps {\n withReordering?: boolean;\n numVideos?: number;\n allowBulkActions?: boolean;\n}\n\nPartialVideoList.defaultProps = {\n numVideos: 15\n};\n\nexport function PartialVideoList(props: PartialVideoListProps): JSX.Element {\n return (\n <div className='mx-2'>\n {Array(props.numVideos).fill(null).map((_, i) => (\n <div className='d-flex' key={i}>\n {props.allowBulkActions && <div className='form-check pe-3 pe-sm-2 mx-0 mx-md-2' />}\n <PartialVideoItem {...props} />\n </div>\n ))}\n </div>\n );\n}\n\nexport function PartialVideoItem(props: PartialVideoListProps): JSX.Element {\n const breakpoints = useBreakpoints();\n\n const size = VideoListHelper.getSize(breakpoints, 'md');\n const isSmall = size === 'sm';\n\n const withDragHandle = props.withReordering && !breakpoints.xs;\n\n return (\n <Row className={`${isSmall ? '' : 'py-2'} flex-grow-1`}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-1` : 'mb-1 pe-3 pe-md-2'}`}>\n <Row>\n {!!withDragHandle && (\n <div className='d-flex align-items-center justify-content-center col-2'>\n <div className={`partial-loading-background ${styles.partialDragHandle}`} />\n </div>\n )}\n <Col xs={VideoListHelper.getThumbnailColSize(withDragHandle)}>\n <div className={`partial-loading-background ${isSmall ? 'rounded' : 'rounded-3'} ${styles.partialThumbnail}`} />\n </Col>\n </Row>\n </Col>\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n <div className={`partial-loading-background mb-1 ${styles.partialName}`} />\n <div className={`partial-loading-background ${styles.partialDescription}`} />\n </Col>\n </Row>\n );\n}\n\n","import * as React from 'react';\nimport { ButtonProps } from 'react-bootstrap';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Core } from 'libs/common/core';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { VideoSortType } from 'libs/shared/enums/VideoSortType';\n\nconst namespace = 'shared.videoSortSelect';\n\ntype SortTypes = {[sort: string]: { name: string }};\n\nconst getSortTypes: () => SortTypes = FunctionHelper.memoize(() => {\n return {\n [VideoSortType.RecentlyAdded]: {\n name: LanguageService.getPhrase(namespace, 'recentlyAdded')\n },\n [VideoSortType.AtoZ]: {\n name: LanguageService.getPhrase(namespace, 'atoz')\n },\n [VideoSortType.ZtoA]: {\n name: LanguageService.getPhrase(namespace, 'ztoa')\n },\n [VideoSortType.Newest]: {\n name: LanguageService.getPhrase(namespace, 'newest')\n },\n [VideoSortType.Oldest]: {\n name: LanguageService.getPhrase(namespace, 'oldest')\n },\n [VideoSortType.Series]: {\n name: LanguageService.getPhrase(namespace, 'series')\n }\n };\n});\n\ninterface VideoSortSelectProps {\n type: VideoSortType;\n getSortAppLink: (sort: string) => Core.AppLink;\n variant?: ButtonProps['variant'];\n sortTypes?: SortTypes;\n analyticsOptions: AnalyticsOptions;\n}\n\nVideoSortSelect.defaultProps = {\n variant: 'light'\n};\n\nexport function VideoSortSelect(props: VideoSortSelectProps): JSX.Element {\n const sortTypes = props.sortTypes || getSortTypes();\n\n return (\n <div className='dropdown'>\n <a className={`btn btn-${props.variant} ms-2 dropdown-toggle`} type='button' id='sort-select' data-bs-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>\n {sortTypes[props.type].name}\n </a>\n <div className='dropdown-menu dropdown-menu-end' aria-labelledby='sort-select'>\n {Object.keys(sortTypes).map(k => {\n let className = 'dropdown-item';\n\n if (k === props.type)\n className += ' active';\n\n return (\n <AppLink\n key={k}\n className={className}\n appLink={props.getSortAppLink(k)}\n analyticsData={{\n sort: sortTypes[k].name\n }}\n analyticsOptions={props.analyticsOptions}\n >\n {sortTypes[k].name}\n </AppLink>\n );\n })}\n </div>\n </div>\n );\n}","import { BaseError } from 'libs/common/backbone/core/BaseError';\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Xhr } from 'libs/common/backbone/interfaces';\nimport { Core } from 'libs/common/core';\n\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { PrivateResourceError } from 'libs/shared/errors/general/private-resource/PrivateResourceError';\nimport { RegionLockedResourceError } from 'libs/shared/errors/general/region-locked-resource/RegionLockedResourceError';\nimport { UnspecifiedError } from 'libs/shared/errors/general/unspecified-error/UnspecifiedError';\nimport { VideoTypes } from 'libs/shared/interfaces';\n\nexport interface HttpErrorMap {\n notFound?: new () => BaseError;\n forbidden?: {\n rating?: new (description: string) => BaseError;\n yearLevel?: new (description: string) => BaseError;\n region?: new () => BaseError;\n privacy?: new (video?: VideoTypes) => BaseError;\n };\n badRequest?: new () => BaseError;\n}\n\nexport type IgnoreHttpErrorMap = {\n [key in keyof HttpErrorMap]: boolean;\n};\n\nconst defaultErrors: HttpErrorMap = {\n notFound: NotFoundError,\n forbidden: {\n rating: PrivateResourceError,\n yearLevel: PrivateResourceError,\n region: RegionLockedResourceError,\n privacy: PrivateResourceError\n },\n badRequest: UnspecifiedError\n};\n\nexport function handleHttpError(\n info: HttpStatus | Xhr,\n customErrorMap: HttpErrorMap = {},\n /**\n * Prevent certain errors in the errorMap from being thrown\n * so that you may implement your own handler\n */\n ignoreMap: IgnoreHttpErrorMap = {}\n): void {\n if (!info)\n return;\n\n let statusCode: HttpStatus;\n\n if (typeof(info) === 'number') {\n statusCode = info;\n } else {\n statusCode = info.status;\n }\n\n const errorMap = {\n ...defaultErrors,\n ...customErrorMap\n };\n\n if (!statusCode)\n return;\n\n if (!Core.ErrorHelper.isStatusCodeError(statusCode))\n return;\n\n if (statusCode === HttpStatus.NotFound) {\n if (!ignoreMap.notFound)\n Core.ErrorHelper.throw(new errorMap.notFound());\n return;\n }\n\n if (statusCode === HttpStatus.Forbidden) {\n /**\n * TODO: Work out how to go about handling all forbidden errors, such as region locking, year levels,\n * ratings, and privacy.\n */\n if (!ignoreMap.forbidden)\n Core.ErrorHelper.throw(new errorMap.forbidden.privacy());\n return;\n }\n\n if (!ignoreMap.badRequest)\n Core.ErrorHelper.throw(new errorMap.badRequest());\n}\n\nexport function handleXhrError(xhr: Xhr, customErrorMap?: HttpErrorMap): void {\n handleHttpError(xhr.status, customErrorMap);\n}","import { useEffect } from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { handleHttpError, HttpErrorMap, IgnoreHttpErrorMap } from 'libs/shared/errors/handlers/HttpErrorHandlers';\n\nfunction generateCacheKey(flightObjs: Array<Flight.Response<any>>): string {\n return flightObjs.map(obj => obj.statusCode).join(':');\n}\n\n// TODO: Change this to just `useHandleHttpError` and only accept a status code.\nexport function useHandleObjectError(\n _flightObjs: Flight.Response<any> | Array<Flight.Response<any>>,\n customErrors?: HttpErrorMap,\n ignoreErrors?: IgnoreHttpErrorMap\n): void {\n const flightObjs = Array.isArray(_flightObjs) ? _flightObjs : [_flightObjs];\n\n useEffect(() => {\n flightObjs.forEach(obj => {\n handleHttpError(obj.statusCode, customErrors, ignoreErrors);\n });\n }, [ generateCacheKey(flightObjs), customErrors, ignoreErrors ]);\n}","import { 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}","const DEFAULT_PARTIAL_LOADING_OPTIONS: PartialLoadingOptions = {\n numItems: 5,\n minWidth: 50, // px\n maxWidth: 100 // px\n};\n\nexport interface PartialLoadingOptions {\n numItems?: number;\n minWidth?: number;\n maxWidth?: number;\n}\n\ninterface PartialLoadingItem {\n width: string;\n}\n\nexport const PartialLoadingHelper = {\n getPartialLoadingItems(options: PartialLoadingOptions = {}): PartialLoadingItem[] {\n const opts = {\n ...DEFAULT_PARTIAL_LOADING_OPTIONS,\n ...options\n };\n\n const getRandomFilterWidth = () => Math.max(Math.floor(Math.random() * opts.maxWidth), opts.minWidth);\n\n return [...Array(opts.numItems)].map(() => ({ width: `${getRandomFilterWidth()}px` }));\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 { Flight } from 'libs/common/flight';\n\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { CurrentUser, Video, VideoCollection } from 'libs/shared/interfaces';\n\ninterface VideoMixinOptions {\n /**\n * If the videos that are having new data mixed into are sitting on an explicit Flight namespace,\n * providing that namespace here is required\n */\n flightNamespace?: string;\n}\n\nexport function useVideoMixin(videos: VideoCollection | Video[], options: VideoMixinOptions = {}): void {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const hydratedVideos = React.useRef<Set<string>>(new Set<string>());\n\n const videoIds = videos && (Array.isArray(videos)\n ? videos.filter(Boolean).map(v => v.id)\n : videos.data.filter(Boolean).map(v => v.id));\n\n const [ request, setRequest ] = React.useState<Flight.Request[]>([]);\n\n React.useEffect(() => {\n if (!videoIds?.length || !currentUser.hasCompleted)\n return;\n\n const unhydratedVideos: string[] = [];\n\n videoIds.forEach(id => {\n if (!hydratedVideos.current.has(id)) {\n unhydratedVideos.push(id);\n hydratedVideos.current.add(id);\n }\n });\n \n if (!unhydratedVideos.length)\n return;\n\n setRequest(r => {\n const newRequests = [\n ...r,\n VideoRequests.videoMixinAssocs(unhydratedVideos, options.flightNamespace)\n ];\n\n if (currentUser.data?.isAuthenticated)\n newRequests.push(ClassificationRequests.hasCurriculumLinks(unhydratedVideos, null, options.flightNamespace));\n\n return newRequests;\n });\n }, [ videoIds?.length, currentUser.hasCompleted ]);\n\n Flight.useBasicFetchAll(request);\n}"],"names":["PortalHelper","renderInPortalIfExists","component","portalContainer","createPortal","namespace","ComingSoonTag","props","Tooltip","title","LanguageService","spanHackClassName","spanHack","className","SvgContainer","svgName","onlyIcon","GenericCalendarDate","AppLink","appLink","getAppLink","theme","border","analyticsData","analyticsOptions","background","label","body","type","getBodyClass","text","month","BackButton","textShadow","backToName","color","extraClasses","backPhrase","colorClass","textShadowClass","size","S","defaultProps","RATIO","width","height","getSizeClass","heading","length","BannerHeader","banner","imageCdnUrl","actions","sortComponent","blockColourClass","specialEvent","portalContainerContext","BannerPortalContext","imageWidth","useBreakpoints","xxl","specialEventIsToday","showComingSoon","today","DateHelper","Date","endDate","startDate","imageOptions","ratio","resizeType","url","ImageHelper","fallbackBaseUrl","fallbackCategoryName","containerProps","bannerClassName","style","backgroundImage","DetailsComponent","detailsComponent","backButtonAppLink","backButtonText","backButtonClasses","alignLogoLeft","logo","calendarTheme","Text","phrase","LazyImage","src","Actions","actionsDropdownClassName","container","prevProps","nextProps","PartialBannerHeader","BreadcrumbItem","breadcrumb","name","active","withBackIcon","Breadcrumbs","breadcrumbs","isMobile","map","b","idx","key","PartialBreadcrumbs","numItems","dangerouslySetInnerHTML","__html","InfiniteScrollFooter","ref","inView","fetchOnScroll","isFetching","fetchNext","nextCursor","Spinner","as","animation","role","onClick","PartialVideoList","Array","numVideos","fill","_","i","allowBulkActions","PartialVideoItem","breakpoints","isSmall","VideoListHelper","withDragHandle","withReordering","xs","Row","Col","getSortTypes","VideoSortSelect","sortTypes","variant","id","Object","keys","k","getSortAppLink","sort","defaultErrors","notFound","forbidden","rating","yearLevel","region","privacy","badRequest","handleHttpError","info","customErrorMap","ignoreMap","statusCode","status","errorMap","generateCacheKey","flightObjs","obj","join","useHandleObjectError","_flightObjs","customErrors","ignoreErrors","isArray","useEffect","forEach","SCROLL_TOLERANCE","useInfiniteList","getRequest","onError","getItems","getCursor","scrollContainer","options","handleScroll","useState","pagesFetched","setPagesFetched","fetchNextFn","response","cursor","request","fetchNextPage","currentVal","hasMore","getBoundingClientRect","scrollTop","scrollHeight","window","innerHeight","document","documentElement","onScroll","FunctionHelper","addEventListener","removeEventListener","shouldInitialFetch","httpStatusClass","toString","substr","HttpStatus","items","totalItems","hasFirstPageCompleted","DEFAULT_PARTIAL_LOADING_OPTIONS","minWidth","maxWidth","PartialLoadingHelper","getPartialLoadingItems","opts","Math","max","floor","random","usePresentationAudiences","redirectOnError","activePresentation","getFallbackPresentation","presentation","useVideoMixin","videos","currentUser","hydratedVideos","Set","videoIds","filter","Boolean","v","data","setRequest","hasCompleted","unhydratedVideos","current","has","push","add","r","newRequests","flightNamespace","isAuthenticated"],"sourceRoot":""}
|