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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{8801-lite-d34200ab29.chunk.css → 7895-lite-bf9f19249f.chunk.css} +3 -1
  3. package/dist/css/{lite-app-17b86dd186.css → lite-app-633927f4ac.css} +1 -1
  4. package/dist/languages/en.json +1 -1
  5. package/dist/scripts/{1080-509aa6e738-lite.chunk.js → 1080-b455b78b6e-lite.chunk.js} +2 -2
  6. package/dist/scripts/{1080-509aa6e738-lite.chunk.js.map → 1080-b455b78b6e-lite.chunk.js.map} +1 -1
  7. package/dist/scripts/{3969-6d7c342d0c-lite.chunk.js → 3969-0873dcdef1-lite.chunk.js} +2 -2
  8. package/dist/scripts/{3969-6d7c342d0c-lite.chunk.js.map → 3969-0873dcdef1-lite.chunk.js.map} +1 -1
  9. package/dist/scripts/4013-686f8996fc-lite.chunk.js +3 -0
  10. package/dist/scripts/4013-686f8996fc-lite.chunk.js.map +1 -0
  11. package/dist/scripts/{6741-fe09fea334-lite.chunk.js → 6741-249d40956f-lite.chunk.js} +3 -3
  12. package/dist/scripts/{6741-fe09fea334-lite.chunk.js.map → 6741-249d40956f-lite.chunk.js.map} +1 -1
  13. package/dist/scripts/{1329-bdbbf6c7fd-lite.chunk.js → 7076-ef50a7d7dc-lite.chunk.js} +3 -3
  14. package/dist/scripts/7076-ef50a7d7dc-lite.chunk.js.map +1 -0
  15. package/dist/scripts/{7234-d15fe07f0e-lite.chunk.js → 7234-bef1f8243f-lite.chunk.js} +2 -2
  16. package/dist/scripts/{7234-d15fe07f0e-lite.chunk.js.map → 7234-bef1f8243f-lite.chunk.js.map} +1 -1
  17. package/dist/scripts/7895-2ee3fda80f-lite.chunk.js +2 -0
  18. package/dist/scripts/7895-2ee3fda80f-lite.chunk.js.map +1 -0
  19. package/dist/scripts/{9173-e45847aa35-lite.chunk.js → 9173-2fce1ae530-lite.chunk.js} +2 -2
  20. package/dist/scripts/{9173-e45847aa35-lite.chunk.js.map → 9173-2fce1ae530-lite.chunk.js.map} +1 -1
  21. package/dist/scripts/bundle-5063d4c36b.min.js +3 -0
  22. package/dist/scripts/bundle-5063d4c36b.min.js.map +1 -0
  23. package/package.json +1 -1
  24. package/dist/scripts/1329-bdbbf6c7fd-lite.chunk.js.map +0 -1
  25. package/dist/scripts/3999-317a4538c6-lite.chunk.js +0 -3
  26. package/dist/scripts/3999-317a4538c6-lite.chunk.js.map +0 -1
  27. package/dist/scripts/8801-3a7652eb35-lite.chunk.js +0 -2
  28. package/dist/scripts/8801-3a7652eb35-lite.chunk.js.map +0 -1
  29. package/dist/scripts/bundle-7f9a9b650d.min.js +0 -3
  30. package/dist/scripts/bundle-7f9a9b650d.min.js.map +0 -1
  31. /package/dist/css/{3999-lite-a3c7435ba4.chunk.css → 4013-lite-a3c7435ba4.chunk.css} +0 -0
  32. /package/dist/css/{1329-lite-458183b24f.chunk.css → 7076-lite-458183b24f.chunk.css} +0 -0
  33. /package/dist/scripts/{1329-bdbbf6c7fd-lite.chunk.js.LICENSE.txt → 4013-686f8996fc-lite.chunk.js.LICENSE.txt} +0 -0
  34. /package/dist/scripts/{3999-317a4538c6-lite.chunk.js.LICENSE.txt → 6741-249d40956f-lite.chunk.js.LICENSE.txt} +0 -0
  35. /package/dist/scripts/{6741-fe09fea334-lite.chunk.js.LICENSE.txt → 7076-ef50a7d7dc-lite.chunk.js.LICENSE.txt} +0 -0
  36. /package/dist/scripts/{bundle-7f9a9b650d.min.js.LICENSE.txt → bundle-5063d4c36b.min.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"scripts/3969-6d7c342d0c-lite.chunk.js","mappings":"+LACA,SAAgB,UAAY,QAAQ,QAAU,S,sGCmBxC,SAAUA,EAAqBC,GACnC,I,IAAmC,G,GAAX,U,EAAW,E,o4BAA3BC,EAAG,KAAEC,E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AAIA,EAAExD,EAAE,IAE+B,G,EAApC,WAAiC,I,EAAG,E,unBAA5D5B,EAAO,KAAEoa,EAAU,KAE3B,aAAgB,WACd,IAAKD,aAAQ,EAARA,EAAU1Q,SAAW7B,EAAYyJ,aAAtC,CAGA,IAAMgJ,EAA6B,GAEnCF,EAASnD,SAAQ,SAAApV,GACVoY,EAAeM,QAAQC,IAAI3Y,KAC9ByY,EAAiBlD,KAAKvV,GACtBoY,EAAeM,QAAQE,IAAI5Y,GAE/B,IAEKyY,EAAiB5Q,QAGtB2Q,GAAW,SAAA5D,G,MACHiE,EAAc,GAAH,O,yWAAA,CACZjE,GAAC,CACJ,qBAA+B6D,EAAkB7a,EAAQkb,mBAM3D,OAHoB,QAAhB,EAAA9S,EAAY/F,YAAI,eAAEkO,kBACpB0K,EAAYtD,KAAK,uBAA0CkD,EAAkB,KAAM7a,EAAQkb,kBAEtFD,CACT,GAxBQ,CAyBV,GAAG,CAAEN,aAAQ,EAARA,EAAU1Q,OAAQ7B,EAAYyJ,eAEnC,qBAAwBrR,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/widgets/widget-button/widget-button.scss","file:///app/packages/libs/shared/src/components/widgets/widget-button/WidgetButton.tsx","file:///app/packages/libs/shared/src/hooks/UseInfiniteScroll.ts","file:///app/packages/libs/shared/src/hooks/UseInfiniteList.ts","file:///app/packages/libs/shared/src/components/widgets/items/subject-widget-item/CompanyWidgetItem.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/CompanyResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/mixed-search-results.scss","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/exchange-video-group/ExchangeVideoGroup.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/FeaturedVideoResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/playlist-with-videos/playlist-with-videos.scss","file:///app/packages/libs/shared/src/apps/search/components/playlist-with-videos/PlaylistWithVideos.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/LargePlaylistResults.tsx","file:///app/packages/libs/shared/src/apps/search/components/series-with-videos/series-with-videos.scss","file:///app/packages/libs/shared/src/apps/search/components/series-with-videos/SeriesWithVideos.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/LargeSeriesResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/collection-video-list/CollectionVideoList.tsx","file:///app/packages/libs/shared/src/apps/search/components/collection-thumbnail/collection-thumbnail.scss","file:///app/packages/libs/shared/src/apps/search/components/collection-thumbnail/CollectionThumbnail.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/SmallPlaylistResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/SmallSeriesResults.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/SubjectResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/VideoResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/MixedSearchResults.tsx","file:///app/packages/libs/shared/src/apps/search/components/search-substitute/SearchSubstitute.tsx","file:///app/packages/libs/shared/src/apps/search/components/search-suggestions/SearchSuggestions.tsx","file:///app/packages/libs/shared/src/apps/search/flight-requests/SharedSearchRequests.ts","file:///app/packages/projects/lite/src/apps/search/hooks/useSearchTopics.ts","file:///app/packages/projects/lite/src/apps/search/hooks/useFetchSearchData.tsx","file:///app/packages/projects/lite/src/apps/search/hooks/useFetchSchoolLevels.ts","file:///app/packages/projects/lite/src/apps/search/hooks/useSearchCompanies.ts","file:///app/packages/projects/lite/src/apps/search/hooks/useGetSearchResults.tsx","file:///app/packages/projects/lite/src/apps/search/hooks/useGroupExchangeResults.ts","file:///app/packages/projects/lite/src/apps/search/views/search-results/empty-state/SearchResultsEmptyState.tsx","file:///app/packages/projects/lite/src/apps/search/views/search-results/SearchResultsView.tsx","file:///app/packages/projects/lite/src/apps/search/hooks/useGetTagsAndClassifications.tsx","file:///app/packages/projects/lite/src/apps/search/hooks/useSearchMask.tsx","file:///app/packages/projects/lite/src/shared/flight-requests/RatingRequests.ts","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 {\"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 { LanguageService } from 'libs/common/backbone/services/LanguageService';\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\nconst namespace = 'shared.widgetButton';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport enum WidgetButtonDirection {\n Left,\n Right\n}\n\ninterface WidgetButtonProps {\n onClick: (event: React.MouseEvent<HTMLButtonElement, 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 <button\n onClick={props.onClick}\n className={`${styles.extendedClickableArea} ${isLeft ? styles.left : styles.right}`}\n tabIndex={-1}\n />\n )}\n\n <button\n className={`${getPositionClass()} ${styles.button} ${props.className || ''}`}\n onClick={props.onClick}\n aria-label={isLeft ? getPhrase('previous') : getPhrase('next')}\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 </button>\n </div>\n );\n});","import { useEffect } from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\n\nconst SCROLL_TOLERANCE = 400; // value in px\n\ninterface UseInfiniteScrollOptions {\n fetchNextPage: () => void;\n hasMore: boolean;\n isFetching: boolean;\n scrollContainer?: HTMLElement;\n}\n\nexport function useInfiniteScroll(options: UseInfiniteScrollOptions): void {\n const handleScroll = (): void => {\n if (options.isFetching)\n return;\n\n if (!options.scrollContainer) {\n const currentScrollHeight = window.innerHeight + document.documentElement.scrollTop;\n \n const totalHeight = document.documentElement.scrollHeight - SCROLL_TOLERANCE;\n \n if (currentScrollHeight < totalHeight)\n return;\n } else {\n const { scrollContainer } = options;\n const currentScrollHeight = scrollContainer.getBoundingClientRect().height + scrollContainer.scrollTop;\n \n const totalHeight = scrollContainer.scrollHeight - SCROLL_TOLERANCE;\n \n if (currentScrollHeight < totalHeight)\n return;\n }\n\n options.fetchNextPage();\n };\n\n useEffect(() => {\n const onScroll = FunctionHelper.throttle(handleScroll, 200);\n\n const scrollContainer = options.scrollContainer || window;\n\n if (options.hasMore)\n scrollContainer.addEventListener('scroll', onScroll);\n\n return () => scrollContainer.removeEventListener('scroll', onScroll);\n }, [ options.hasMore, options.fetchNextPage, options.scrollContainer ]);\n}","import { useEffect, useState } from 'react';\n\nimport { HttpStatus, HttpStatusClass } from 'libs/common/backbone/enums/HttpStatus';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Flight } from 'libs/common/flight';\n\nimport { BaseObject, BasePaginatedCollection } from 'libs/shared/interfaces';\n\nimport { useInfiniteScroll } from './UseInfiniteScroll';\nimport { useSelectAllPages } from './UseSelectAllPages';\n\nexport interface UseInfiniteListResult<T extends BaseObject> {\n items: T[];\n hasMore: boolean;\n isFetching: boolean;\n nextCursor: string;\n totalItems?: number;\n hasFirstPageCompleted: boolean;\n}\n\n/**\n * Hook to extract an infinite list from the application state,\n * save it locally in state and only update when new data\n * is fetched.\n * \n * @param getRequest - callback function to get the request for each page.\n * Can be false if the request requires data that hasn't yet been fetched - e.g. user id.\n * \n * @param fetchNext - callback function to fetch a page.\n * Can be false if the request requires data that hasn't yet been fetched - e.g. user id.\n */\nexport function useInfiniteList<TObject = BaseObject, TResponse = BasePaginatedCollection<TObject>>(\n getRequest: ((cursor?: string) => Flight.Request) | false,\n fetchNext: ((cursor?: string) => void) | false,\n onError?: (pageNumber: number, statusCode: HttpStatus) => void,\n getItems?: (responseData: TResponse) => TObject[],\n getCursor?: (responseData: TResponse) => string,\n scrollContainer?: HTMLElement\n): UseInfiniteListResult<TObject> {\n const [ pagesFetched, setPagesFetched ] = useState(0);\n\n const fetchNextFn = fetchNext as (cursor?: string) => void;\n\n function getKey(cursor?: string): string {\n if (!getRequest)\n return null;\n\n const request = getRequest(cursor);\n\n if (!request)\n return null;\n\n return request.key;\n }\n\n const response = useSelectAllPages<TObject, TResponse>(\n getKey,\n getItems,\n getCursor\n );\n\n function fetchNextPage(): void {\n if (!fetchNext || !getRequest || !response)\n return;\n\n setPagesFetched(currentVal => currentVal + 1);\n return fetchNextFn(response.nextCursor);\n }\n\n useInfiniteScroll({\n fetchNextPage,\n hasMore: !!response?.nextCursor,\n isFetching: response?.isFetching,\n scrollContainer\n });\n\n useEffect(() => {\n if (!response)\n return;\n\n if (response.shouldInitialFetch && fetchNext) {\n fetchNextFn();\n setPagesFetched(currentVal => currentVal + 1);\n }\n }, [ response?.shouldInitialFetch, fetchNext ]);\n\n useEffect(() => {\n if (!response?.statusCode || !FunctionHelper.isFunction(onError))\n return;\n\n const httpStatusClass: HttpStatusClass = +(response.statusCode?.toString()?.substr(0, 1));\n\n if (httpStatusClass !== HttpStatusClass.ClientError && httpStatusClass !== HttpStatusClass.ServerError)\n return;\n\n onError(pagesFetched, response.statusCode);\n }, [response?.statusCode]);\n\n return {\n items: response?.items,\n hasMore: !!response?.nextCursor,\n nextCursor: response?.nextCursor,\n isFetching: response?.isFetching,\n totalItems: response?.totalItems,\n hasFirstPageCompleted: response?.hasFirstPageCompleted\n };\n}","import * as React from 'react';\n\nimport { ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { CoverPillWidgetContentWrapper, CoverPillWidgetItemProps } from 'libs/shared/components/widgets/items/subject-widget-item/CoverPill';\nimport { Company } from 'libs/shared/interfaces';\n\nexport function CompanyWidgetItem(props: CoverPillWidgetItemProps<Company>): JSX.Element {\n const analyticsData = {\n ...props.analyticsData,\n id: props.data?.id,\n name: props.data?.name\n };\n\n const analyticsOptions = {\n location: LocationContext.ClassificationListItem,\n ...props.analyticsOptions,\n actionType: UserAction.Click,\n entity: EntityType.Company,\n descriptor: ClickDescriptor.Cover\n };\n\n return (\n <CoverPillWidgetContentWrapper\n {...props}\n analyticsData={analyticsData}\n analyticsOptions={analyticsOptions}\n coverUrl={props.data.logo?.url}\n />\n );\n}","import React from 'react';\nimport { Col } from 'react-bootstrap';\n\nimport { CompanyWidgetItem } from 'libs/shared/components/widgets/items/subject-widget-item/CompanyWidgetItem';\nimport { Company } from 'libs/shared/interfaces';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nexport function CompanyResult(props: MixedSearchResultItemProps<Company>): JSX.Element {\n return (\n <Col as='li' sm={6} md={props.useLargeStyle ? 6 : 4} lg={props.useLargeStyle ? 4 : 3}>\n <div className={`position-relative px-1 mb-2`}>\n <CompanyWidgetItem\n data={props.item}\n getChildAppLink={props.appLinks.getCompanyAppLink}\n getChildAppLinkOptions={() => props.appLinks.getCompanyAppLinkOptions?.(props.item)}\n analyticsData={{\n itemIndex: props.itemIndex,\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: 0\n }}\n isLarge={props.useLargeStyle}\n />\n </div>\n </Col>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"videoList\":\"ZhLPS\"};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { ClickDescriptor, EntityType, HashObject, LocationContext, SearchSourceDescriptor, UserAction } from 'libs/analytics/interfaces';\n\nimport { SourceFilterOptions } from 'libs/shared/apps/search/interfaces';\nimport { ExchangeVideoGroup } from 'libs/shared/apps/search/interfaces/SearchResults';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoItem } from 'libs/shared/components/video-list/video-item/VideoItem';\n\nimport { MixedSearchResultItemProps } from './../MixedSearchResultItemProps';\n\nimport styles from '../../mixed-search-results.scss';\n\nconst namespace = 'search.exchangeVideoGroup';\n\nconst EXCHANGE_RESULT_DISPLAY_LIMIT = 3;\n\nexport function ExchangeVideoGroup(props: MixedSearchResultItemProps<ExchangeVideoGroup>): JSX.Element {\n const limit = props.item.showCount >= EXCHANGE_RESULT_DISPLAY_LIMIT\n ? EXCHANGE_RESULT_DISPLAY_LIMIT\n : props.item.showCount;\n\n function getContainerClassName(): string {\n if (props.pagePositionIndex === 0)\n return 'border-bottom pb-1 mb-3';\n\n return 'border-top border-bottom pt-3 mt-2 pb-1 mb-3';\n }\n\n const currentAppLink = Core.AppLinkHelper.getCurrentAppLink();\n const currentParams = (currentAppLink.params as HashObject) ?? {};\n let currentSource = currentParams?.source ?? [];\n\n if (currentSource && !Array.isArray(currentSource))\n currentSource = [currentSource];\n\n const searchAppLink = {\n ...currentAppLink,\n params: {\n ...currentParams,\n source: [ ...(currentSource), SourceFilterOptions.ExchangeArchive ]\n }\n };\n\n const analyticsData = {\n query: props.queryParams.query,\n itemIndex: props.itemIndex,\n pagePositionIndex: props.pagePositionIndex\n };\n const analyticsOptions = {\n entity: EntityType.SearchResults,\n location: LocationContext.ExchangeSearchGroupItem,\n actionType: UserAction.Click,\n descriptor: SearchSourceDescriptor.ExchangeArchive\n };\n\n return (\n <div className={getContainerClassName()}>\n <AppLink\n appLink={searchAppLink}\n analyticsData={analyticsData}\n analyticsOptions={analyticsOptions}\n >\n <h2 className='h4'>\n <Text namespace={namespace} phrase='heading' />\n </h2>\n </AppLink>\n <p>\n <Text namespace={namespace} phrase='message' />\n &nbsp;\n <AppLink\n appLink={props.appLinks.searchSettings}\n className='text-info'\n analyticsData={analyticsData}\n analyticsOptions={{\n ...analyticsOptions,\n descriptor: ClickDescriptor.Settings\n }}\n >\n <Text namespace={namespace} phrase='searchSettings' />\n </AppLink>\n .\n </p>\n\n <div className={`position-relative ${styles.videoList}`}>\n {props.item.videos.slice(0, limit).map((v, i) => {\n return (\n <VideoItem\n key={i}\n video={v}\n yearGroups={props.yearGroups}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getSubTextAppLink={props.appLinks.getSubTextAppLink}\n presentationAudiences={props.audiences}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n analyticsData= {{\n search: {\n query: props.queryParams.query,\n score: v._score,\n maxScore: v._maxScore,\n featured: v._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n getClassroomGuideAppLink={props.appLinks.getClassroomGuideAppLink}\n getResourceGuidanceAppLink={props.appLinks.getResourceGuidanceAppLink}\n getInteractiveGuidanceAppLink={props.appLinks.getInteractiveGuidanceAppLink}\n isPlugin={props.isPlugin}\n />\n );\n })}\n </div>\n <div className='text-center py-2'>\n <AppLink\n className='text-secondary'\n appLink={searchAppLink}\n analyticsData={analyticsData}\n analyticsOptions={analyticsOptions}\n >\n <Text namespace={namespace} phrase='seeMore' />\n </AppLink>\n </div>\n </div>\n );\n}","import React from 'react';\n\nimport { HeroVideo } from 'libs/shared/apps/subjects/components/hero-video/HeroVideo';\nimport { Video } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nexport function FeaturedVideoResult(props: MixedSearchResultItemProps<Video>): JSX.Element {\n return (\n <div className='pb-3'>\n <HeroVideo\n video={props.item}\n presentationAudiences={props.audiences}\n getVideoAppLink={(v, opts) => props.appLinks.getVideoAppLink(v, opts)}\n subTextAppLink={props.appLinks.getSubTextAppLink(props.item)}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n analyticsData={{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n hideInteractiveBadge\n yearGroups={props.yearGroups}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n showVideoGuidance={VideoHelper.showVideoGuidance(props.hasPermissions)}\n imageCdnUrl={props.imageCdnUrl}\n isPlugin={props.isPlugin}\n getInteractiveGuidanceAppLink={props.appLinks.getInteractiveGuidanceAppLink}\n getResourceGuidanceAppLink={props.appLinks.getResourceGuidanceAppLink}\n getClassroomGuideAppLink={props.appLinks.getClassroomGuideAppLink}\n />\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"videoList\":\"eEZEe\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { PlaylistItem } from 'libs/shared/apps/playlists/components/playlist-list';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoItem } from 'libs/shared/components/video-list/video-item/VideoItem';\nimport { VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { BG_COLOUR_CLASS_NAMES } from 'libs/shared/constants/ColourClassNames';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { CurrentUser, Playlist, PresentationAudience, Video, YearGroup } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\n\nimport styles from './playlist-with-videos.scss';\n\nconst namespace = 'search.playlistWithVideos';\n\nfunction useGetMaxVideos(): number {\n const breakpoints = useBreakpoints();\n\n if (breakpoints.xl || breakpoints.xxl)\n return 3;\n \n return 2;\n}\n\ninterface PlaylistWithVideoProps {\n playlist: Playlist;\n yearGroups: YearGroup[];\n playlistAppLink: Core.AppLink;\n presentationAudiences: PresentationAudience[];\n preloadImage: boolean;\n analyticsData: HashObject;\n imageCdnUrl: string;\n currentUser: CurrentUser;\n getSubTextAppLink: (video: Video) => Core.AppLink;\n getVideoAppLink: (video: Video, opts: GetVideoAppLinkOptions) => Core.AppLink;\n companyLogoFallbackUrl?: string;\n subTextType?: VideoSubTextType;\n hasPermissions: HasPermissionsFunc;\n isPlugin: boolean;\n}\n\nexport function PlaylistWithVideos(props: PlaylistWithVideoProps): JSX.Element {\n const maxVideos = useGetMaxVideos();\n\n const videos = props.playlist.videos.data.slice(0, maxVideos);\n\n const playlistAnalyticsOption: AnalyticsOptions = {\n actionType: UserAction.Click,\n entity: EntityType.Playlist,\n location: LocationContext.PlaylistWithVideos\n };\n\n const playlistAnalyticsData: HashObject = {\n ...props.analyticsData,\n id: props.playlist.id,\n name: props.playlist.name\n };\n\n return (\n <div className='ps-2 py-2'>\n <Row className='g-0 border border-light rounded-3'>\n <Col xs={4} lg={3} className='pe-3'>\n <PlaylistItem\n appLink={props.playlistAppLink}\n analyticsData={props.analyticsData}\n analyticsOptions={{\n ...playlistAnalyticsOption,\n descriptor: ClickDescriptor.Cover\n }}\n data={props.playlist}\n presentationAudiences={props.presentationAudiences}\n bgColourClassNames={BG_COLOUR_CLASS_NAMES}\n itemStyle='round-left'\n imageCdnUrl={props.imageCdnUrl}\n currentUser={props.currentUser}\n showCount={false}\n showOwner\n />\n </Col>\n <Col xs={8} lg={9}>\n <div className='d-flex justify-content-between'>\n <div className={`pt-3 mb-n2 ${styles.videoList}`}>\n {videos?.map(video => {\n const videoAnalyticsData: HashObject = {\n ...playlistAnalyticsData,\n videoId: video.id,\n videoName: video.name\n };\n\n return (\n <div key={video.id} className='mb-2'>\n <VideoItem\n video={video}\n getSubTextAppLink={props.getSubTextAppLink}\n canFavourite={() => false}\n setFavourite={null}\n getVideoAppLink={props.getVideoAppLink}\n analyticsData={videoAnalyticsData}\n analyticsOptions={{\n entity: EntityType.Video,\n location: LocationContext.PlaylistWithVideos\n }}\n size='sm'\n yearGroups={props.yearGroups}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n isPlugin={props.isPlugin}\n hideVideoGuidance\n />\n </div>\n );\n })}\n </div>\n <div className='text-end pt-3 pe-3'>\n <AppLink\n className='info-link fw-semibold'\n appLink={props.playlistAppLink}\n analyticsData={playlistAnalyticsData}\n analyticsOptions={{\n ...playlistAnalyticsOption,\n descriptor: ClickDescriptor.Link\n }}\n >\n <Text namespace={namespace} phrase='seeAllVideos' />\n </AppLink>\n </div>\n </div>\n </Col>\n </Row>\n </div>\n );\n}","import React from 'react';\n\nimport { Playlist } from 'libs/shared/interfaces';\n\nimport { PlaylistWithVideos } from '../../playlist-with-videos/PlaylistWithVideos';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nexport function LargePlaylistResult(props: MixedSearchResultItemProps<Playlist>): JSX.Element {\n return (\n <div className='mx-n2'>\n <PlaylistWithVideos\n playlist={props.item}\n yearGroups={props.yearGroups}\n playlistAppLink={props.appLinks.getPlaylistAppLink(props.item)}\n presentationAudiences={props.audiences}\n analyticsData={{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n imageCdnUrl={props.imageCdnUrl}\n currentUser={props.currentUser}\n preloadImage\n getSubTextAppLink={props.appLinks.getSubTextAppLink}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n isPlugin={props.isPlugin}\n />\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"videoList\":\"UT8bc\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SeriesTallPoster } from 'libs/shared/components/series-tall-poster/SeriesTallPoster';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoItem } from 'libs/shared/components/video-list/video-item/VideoItem';\nimport { VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { PresentationAudience, Series, Video, YearGroup } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\n\nimport styles from './series-with-videos.scss';\n\nconst namespace = 'search.seriesWithVideos';\n\nfunction useGetMaxVideos(): number {\n const breakpoints = useBreakpoints();\n\n if (breakpoints.xl || breakpoints.xxl)\n return 5;\n \n if (breakpoints.lg || breakpoints.md)\n return 4;\n\n return 3;\n}\n\ninterface SeriesWithVideoProps {\n series: Series;\n yearGroups: YearGroup[];\n seriesAppLink: Core.AppLink;\n subTextAppLink: (video: Video) => Core.AppLink;\n presentationAudiences: PresentationAudience[];\n preloadImage: boolean;\n analyticsData: HashObject;\n getVideoAppLink: (video: Video, opts: GetVideoAppLinkOptions) => Core.AppLink;\n companyLogoFallbackUrl?: string;\n subTextType?: VideoSubTextType;\n hasPermissions: HasPermissionsFunc;\n isPlugin: boolean;\n}\n\nexport function SeriesWithVideos(props: SeriesWithVideoProps): JSX.Element {\n const maxVideos = useGetMaxVideos();\n\n const videos = props.series.videos.data.slice(0, maxVideos);\n\n const seriesAnalyticsOption: AnalyticsOptions = {\n actionType: UserAction.Click,\n entity: EntityType.Series,\n location: LocationContext.SeriesWithVideos\n };\n\n const seriesAnalyticsData: HashObject = {\n ...props.analyticsData,\n id: props.series.id,\n name: props.series.name\n };\n\n return (\n <div className='ps-2 py-2'>\n <Row className='g-0 border border-light rounded-3'>\n <Col xs={4} lg={3} className='pe-3'>\n <AppLink\n appLink={props.seriesAppLink}\n className='position-relative'\n analyticsData={seriesAnalyticsData}\n analyticsOptions={{\n ...seriesAnalyticsOption,\n descriptor: ClickDescriptor.TallPoster\n }}\n >\n <SeriesTallPoster\n series={props.series}\n presentationAudiences={props.presentationAudiences}\n preloadImage={props.preloadImage}\n imageClass='rounded-start-lg'\n />\n </AppLink>\n </Col>\n <Col xs={8} lg={9}>\n <div className='d-flex justify-content-between'>\n <div className={`pt-3 mb-n2 ${styles.videoList}`}>\n {videos?.map(video => {\n const videoAnalyticsData: HashObject = {\n ...seriesAnalyticsData,\n videoId: video.id,\n videoName: video.name\n };\n\n // insert parent series into video object\n video = {\n ...video,\n series: props.series\n };\n\n return (\n <div key={video.id} className='mb-2'>\n <VideoItem\n video={video}\n getSubTextAppLink={props.subTextAppLink}\n canFavourite={() => false}\n setFavourite={null}\n getVideoAppLink={props.getVideoAppLink}\n analyticsData={videoAnalyticsData}\n analyticsOptions={{\n entity: EntityType.Video,\n location: LocationContext.SeriesWithVideos\n }}\n size='sm'\n yearGroups={props.yearGroups}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n isPlugin={props.isPlugin}\n hideVideoGuidance\n />\n </div>\n );\n })}\n </div>\n <div className='text-end pt-3 pe-3'>\n <AppLink\n className='info-link fw-semibold'\n appLink={props.seriesAppLink}\n analyticsData={seriesAnalyticsData}\n analyticsOptions={{\n ...seriesAnalyticsOption,\n descriptor: ClickDescriptor.Link\n }}\n >\n <Text namespace={namespace} phrase='seeAllVideos' />\n </AppLink>\n </div>\n </div>\n </Col>\n </Row>\n </div>\n );\n}","import React from 'react';\n\nimport { Series } from 'libs/shared/interfaces';\n\nimport { SeriesWithVideos } from '../../series-with-videos/SeriesWithVideos';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nexport function LargeSeriesResult(props: MixedSearchResultItemProps<Series>): JSX.Element {\n return (\n <div className='mx-n2'>\n <SeriesWithVideos\n yearGroups={props.yearGroups}\n presentationAudiences={props.audiences}\n series={props.item}\n seriesAppLink={props.appLinks.getSeriesAppLink(props.item)}\n subTextAppLink={props.appLinks.getSubTextAppLink}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n analyticsData={{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n preloadImage\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n isPlugin={props.isPlugin}\n />\n </div>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AnalyticsOptions, HashObject } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { SeasonEpisode } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { Video } from 'libs/shared/interfaces';\n\nconst namespace = 'search.collectionVideoList';\n\ninterface CollectionVideoListProps {\n videos: Video[];\n collectionId: string;\n appLink: Core.AppLink;\n analyticsOptions: AnalyticsOptions;\n analyticsData?: HashObject;\n getVideoAppLink: (video: Video) => Core.AppLink;\n}\n\nfunction useGetMaxVideos(): number {\n const breakpoints = useBreakpoints();\n\n if (breakpoints.xs)\n return 2;\n\n if (breakpoints.sm)\n return 1;\n\n return 3;\n}\n\nexport function CollectionVideoList(props: CollectionVideoListProps): JSX.Element {\n const maxVideos = useGetMaxVideos();\n\n const analyticsProps = {\n analyticsData: props.analyticsData,\n analyticsOptions: props.analyticsOptions\n };\n\n return (\n <>\n <ul className='list-unstyled my-1'>\n {props.videos.slice(0, maxVideos).map(v => {\n const hasSeasonEpisode = !!v.episodeNumber && !!v.season?.id;\n\n return (\n <li key={`${props.collectionId}:${v.id}`} className='d-flex align-items-center'>\n <AppLink\n {...analyticsProps}\n className='clamp-1'\n appLink={props.getVideoAppLink(v)}\n >\n {hasSeasonEpisode && <><SeasonEpisode video={v} />&nbsp;</>}\n {v.name}\n </AppLink>\n </li>\n );\n })}\n </ul>\n\n <AppLink\n {...analyticsProps}\n className='info-link'\n appLink={props.appLink}\n >\n <Text namespace={namespace} phrase='seeAll' />\n </AppLink>\n </>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"overlayContainer\":\"MnBcv\",\"overlay\":\"AZSmh\"};","import React from 'react';\nimport { Col } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor } from 'libs/analytics/interfaces';\n\nimport { CollectionVideoList } from 'libs/shared/apps/search/components/collection-video-list/CollectionVideoList';\nimport { ActionOptions, Actions as ActionsComponent } from 'libs/shared/components/actions/Actions';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { BadgeListContainer } from 'libs/shared/components/badges/BadgeListContainer';\nimport { BaseImage } from 'libs/shared/components/image/BaseImage';\nimport { ImageFallback, ImageFallbackType } from 'libs/shared/components/image/ImageFallback';\nimport { Mask, MaskType } from 'libs/shared/components/mask/Mask';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { ImageType } from 'libs/shared/enums/Images';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { Playlist, Series, Video } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\n\nimport styles from './collection-thumbnail.scss';\n\nconst namespace = 'search.collectionThumbnail';\n\n\nexport type GetCollectionActions = (\n collection: Collection,\n showActions: boolean,\n collectionType: CollectionType,\n baseAnalyticsOptions: AnalyticsOptions\n) => ActionOptions[]\n\ntype Collection = Series | Playlist;\ntype CollectionType = 'series' | 'playlist';\n\ninterface CollectionThumbnailProps {\n collection: Collection;\n collectionType: CollectionType;\n appLink: Core.AppLink;\n showActions: boolean;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n maskType?: MaskType;\n imageFallbackType?: ImageFallbackType;\n hideBadges?: boolean;\n isPlugin: boolean;\n getCollectionActions: GetCollectionActions;\n getVideoAppLink: (video: Video, opts?: GetVideoAppLinkOptions) => Core.AppLink;\n}\n\nexport function CollectionThumbnail(props: CollectionThumbnailProps): JSX.Element {\n const breakpoints = useBreakpoints();\n const size = VideoListHelper.getSize(breakpoints, 'md');\n const isSmall = size === 'sm';\n\n const hasVideos = !!props.collection.videos?.data?.length;\n\n const firstVideoWithThumbnail = hasVideos && props.collection.videos.data.find(v => !!v.thumbnail?.url);\n\n function getAnalyticsData(): HashObject {\n const data: HashObject = {\n ...props.analyticsData,\n id: props.collection.id,\n name: props.collection.name\n };\n\n if (firstVideoWithThumbnail) {\n data.videoId = firstVideoWithThumbnail.id;\n data.videoName = firstVideoWithThumbnail.name;\n }\n\n return data;\n }\n\n const analyticsData = getAnalyticsData();\n const isSeries = props.collectionType === 'series';\n\n return (\n <div className={`row g-0 ${isSmall ? '' : 'py-2'}`}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-2` : 'mb-1 px-2'}`}>\n <div className={`position-relative overflow-hidden ${isSmall ? 'rounded' : 'rounded-3'}`}>\n <BaseImage\n data={firstVideoWithThumbnail?.thumbnail}\n appLink={props.appLink}\n imageType={ImageType.Thumbnails}\n analyticsData={analyticsData}\n analyticsOptions={{\n ...props.analyticsOptions,\n descriptor: ClickDescriptor.Thumbnail\n }}\n >\n <Mask type={props.maskType} />\n <ImageFallback type={props.imageFallbackType} />\n \n <div className={`d-flex flex-column align-items-center justify-content-center text-white h-100 ${styles.overlay}`}>\n <Text namespace={namespace} phrase='seeAll' />\n </div>\n </BaseImage>\n </div>\n </Col>\n\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n {!props.isPlugin &&\n <ActionsComponent\n actions={props.getCollectionActions(\n props.collection,\n props.showActions,\n props.collectionType,\n props.analyticsOptions\n )}\n className='float-end mt-n1'\n actionsDropdownClassName='btn btn-link ms-1'\n />\n }\n\n <AppLink\n appLink={props.appLink}\n analyticsData={analyticsData}\n analyticsOptions={{\n ...props.analyticsOptions,\n descriptor: ClickDescriptor.Title\n }}\n >\n <h5 className='m-0 mb-1'><span className='clamp-1'>{props.collection.name}</span></h5>\n </AppLink>\n\n {isSeries && !props.hideBadges && (\n <BadgeListContainer>\n <Badge type={BadgeType.Rating} data={(props.collection as Series).rating} />\n <Badge type={BadgeType.ProductionYear} data={(props.collection as Series).metadata?.year} />\n </BadgeListContainer>\n )}\n \n {hasVideos && (\n <CollectionVideoList\n collectionId={props.collection.id}\n videos={props.collection.videos.data}\n appLink={props.appLink}\n analyticsData={analyticsData}\n analyticsOptions={{\n ...props.analyticsOptions,\n descriptor: ClickDescriptor.Link\n }}\n getVideoAppLink={props.getVideoAppLink}\n />\n )}\n </Col>\n </div>\n );\n}","import React from 'react';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { ImageFallbackType } from 'libs/shared/components/image/ImageFallback';\nimport { MaskType } from 'libs/shared/components/mask/Mask';\nimport { Playlist } from 'libs/shared/interfaces';\n\nimport { CollectionThumbnail } from '../../collection-thumbnail/CollectionThumbnail';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nimport styles from '../mixed-search-results.scss';\n\nexport function SmallPlaylistResult(props: MixedSearchResultItemProps<Playlist>): JSX.Element {\n return (\n <div className={`position-relative ${styles.videoList}`}>\n <CollectionThumbnail\n analyticsData={{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n analyticsOptions={{\n entity: EntityType.Playlist,\n actionType: UserAction.Click,\n location: LocationContext.PlaylistListItem\n }}\n appLink={props.appLinks.getPlaylistAppLink(props.item)}\n showActions={props.showActions}\n collection={props.item}\n collectionType='playlist'\n maskType={MaskType.Playlist}\n imageFallbackType={ImageFallbackType.PlaylistThumbnail}\n isPlugin={props.isPlugin}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getCollectionActions={props.appLinks.getCollectionActions}\n />\n </div>\n );\n}","import React from 'react';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { ImageFallbackType } from 'libs/shared/components/image/ImageFallback';\nimport { MaskType } from 'libs/shared/components/mask/Mask';\nimport { Series } from 'libs/shared/interfaces';\n\nimport { CollectionThumbnail } from '../../collection-thumbnail/CollectionThumbnail';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nimport styles from '../mixed-search-results.scss';\n\nexport function SmallSeriesResult(props: MixedSearchResultItemProps<Series>): JSX.Element {\n return (\n <div className={`position-relative ${styles.videoList}`}>\n <CollectionThumbnail\n analyticsData={{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n analyticsOptions={{\n entity: EntityType.Series,\n actionType: UserAction.Click,\n location: LocationContext.SeriesListItem\n }}\n appLink={props.appLinks.getSeriesAppLink(props.item)}\n collectionType='series'\n collection={props.item}\n showActions={props.showActions}\n maskType={MaskType.Series}\n imageFallbackType={ImageFallbackType.SeriesThumbnail}\n hideBadges\n isPlugin={props.isPlugin}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getCollectionActions={props.appLinks.getCollectionActions}\n />\n </div>\n );\n}","import React from 'react';\nimport { Col } from 'react-bootstrap';\n\nimport { SubjectWidgetItem } from 'libs/shared/components/widgets/items/subject-widget-item';\nimport { Classification } from 'libs/shared/interfaces';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nexport function SubjectResult(props: MixedSearchResultItemProps<Classification>): JSX.Element {\n return (\n <Col as='li' sm={6} md={props.useLargeStyle ? 6 : 4} lg={props.useLargeStyle ? 4 : 3}>\n <div className={`position-relative px-1 mb-2`}>\n <SubjectWidgetItem\n data={props.item}\n getChildAppLink={props.appLinks.getClassificationAppLink}\n getChildAppLinkOptions={\n () => props.appLinks.getClassificationAppLinkOptions?.(props.item)\n }\n availablePresentations={props.availablePresentations}\n analyticsData={{\n itemIndex: props.itemIndex,\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: 0\n }}\n isLarge={props.useLargeStyle}\n highlightOnHover={props.hasTopicDirectories}\n />\n </div>\n </Col>\n );\n}","import React from 'react';\n\nimport { ClipItem, ClipItemProps } from 'libs/shared/components/video-list/clip-item/ClipItem';\nimport { InteractiveItem, InteractiveItemProps } from 'libs/shared/components/video-list/interactive-item/InteractiveItem';\nimport { VideoItem, VideoItemProps } from 'libs/shared/components/video-list/video-item/VideoItem';\nimport { VideoTypes } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nimport styles from '../mixed-search-results.scss';\n\nexport function VideoResult(props: MixedSearchResultItemProps<VideoTypes>): JSX.Element {\n function getItemComponent(\n video: VideoTypes\n ): (props: ClipItemProps | InteractiveItemProps | VideoItemProps) => JSX.Element {\n if (VideoHelper.isClip(video))\n return ClipItem;\n \n if (VideoHelper.isInteractive(video))\n return InteractiveItem;\n \n return VideoItem;\n }\n\n const Component = getItemComponent(props.item);\n\n return (\n <div className={`position-relative ${styles.videoList}`}>\n <Component\n video={props.item}\n yearGroups={props.yearGroups}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getSubTextAppLink={props.appLinks.getSubTextAppLink}\n getPreviewQuestionsAppLink={props.appLinks.getPreviewQuestionsAppLink}\n presentationAudiences={props.audiences}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n analyticsData= {{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n imageCdnUrl={props.imageCdnUrl}\n isPlugin={props.isPlugin}\n getClassroomGuideAppLink={props.appLinks.getClassroomGuideAppLink}\n getResourceGuidanceAppLink={props.appLinks.getResourceGuidanceAppLink}\n getInteractiveGuidanceAppLink={props.appLinks.getInteractiveGuidanceAppLink}\n />\n </div>\n );\n}","import React from 'react';\nimport { Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { CanFavouriteFunc, Classification, Company, CurrentUser, FavouriteFunc, InteractiveMetadata, Playlist, Presentation, PresentationAudience, Series, Video, YearGroup } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { SearchResultObjectTypes, SearchResults, SearchResultsObject } from '../../interfaces';\nimport { GetCollectionActions } from '../collection-thumbnail/CollectionThumbnail';\n\nimport { CompanyResult } from './components/CompanyResult';\nimport { ExchangeVideoGroup } from './components/exchange-video-group/ExchangeVideoGroup';\nimport { FeaturedVideoResult } from './components/FeaturedVideoResult';\nimport { LargePlaylistResult } from './components/LargePlaylistResults';\nimport { LargeSeriesResult } from './components/LargeSeriesResult';\nimport { BaseMixedSearchResultItemProps } from './components/MixedSearchResultItemProps';\nimport { SmallPlaylistResult } from './components/SmallPlaylistResult';\nimport { SmallSeriesResult } from './components/SmallSeriesResults';\nimport { SubjectResult } from './components/SubjectResult';\nimport { VideoResult } from './components/VideoResult';\n\nconst namespace = 'shared.mixedSearchResults';\n\nconst TOPIC_DISPLAY_LIMIT = 8;\n\nexport interface MixedSearchResultAppLinks {\n getSubTextAppLink: (video: Video) => Core.AppLink;\n getVideoAppLink: (video: Video, opts: GetVideoAppLinkOptions) => Core.AppLink;\n getSeriesAppLink: (series: Series) => Core.AppLink;\n getCompanyAppLink: (company: Company) => Core.AppLink;\n getCompanyAppLinkOptions?: (company: Company) => Core.AppLinkOptions;\n getClassificationAppLink: (classification: Classification) => Core.AppLink;\n getClassificationAppLinkOptions?: (classification: Classification) => Core.AppLinkOptions;\n getPlaylistAppLink: (playlist: Playlist) => Core.AppLink;\n getPreviewQuestionsAppLink: (interactive: InteractiveMetadata) => Core.AppLink;\n getCollectionActions: GetCollectionActions;\n getInteractiveGuidanceAppLink: (id: string, type: MasterType) => Core.AppLink;\n getResourceGuidanceAppLink: (id: string, type: MasterType) => Core.AppLink;\n getClassroomGuideAppLink: (id: string, type: MasterType) => Core.AppLink;\n searchSettings?: Core.AppLink;\n}\n\ninterface MixedSearchResultsProps {\n queryParams: HashObject;\n hasTopicDirectories: boolean;\n results: SearchResultObjectTypes[];\n topics?: SearchResults;\n companies?: SearchResults;\n setFavourite: FavouriteFunc;\n canFavourite: CanFavouriteFunc;\n audiences: PresentationAudience[];\n currentUser: CurrentUser;\n imageCdnUrl: string;\n availablePresentations: Presentation[]\n showActions: boolean;\n yearGroups: YearGroup[];\n hasPermissions: HasPermissionsFunc;\n isPlugin: boolean;\n appLinks: MixedSearchResultAppLinks;\n companyLogoFallbackUrl?: string;\n subTextType?: VideoSubTextType;\n}\n\nexport const MixedSearchResults = React.memo(function(props: MixedSearchResultsProps): JSX.Element {\n const breakpoints = useBreakpoints();\n const useSmallComponent = breakpoints.xs || breakpoints.sm;\n\n if (!props.results?.length && !props.topics?.totalResults && !props.companies?.totalResults)\n return <></>;\n\n const companiesAndTopics = [\n ...props.companies?.results ?? [],\n ...props.topics?.results ?? []\n ];\n\n const childProps: BaseMixedSearchResultItemProps = {\n useLargeStyle: companiesAndTopics.length < 4,\n ...props\n };\n\n return (\n <div className='position-relative'>\n <p role='status' className='visually-hidden'><Text namespace={namespace} phrase='ariaSearch' /></p>\n\n {!!companiesAndTopics.length && (\n <Row as='ul' className='list-unstyled g-0 pb-3 mx-n1'>\n {companiesAndTopics.slice(0, TOPIC_DISPLAY_LIMIT).map((c, itemIndex) => {\n switch (c.type.toLowerCase()) {\n case 'company':\n return (\n <CompanyResult\n key={itemIndex}\n item={c as SearchResultsObject<Company>}\n itemIndex={itemIndex}\n {...childProps}\n />\n );\n case 'subject': {\n return (\n <SubjectResult\n key={itemIndex}\n item={c as SearchResultsObject<Classification>}\n itemIndex={itemIndex}\n {...childProps}\n />\n );\n }\n }\n })}\n </Row>\n )}\n\n {props.results?.map((result, index) => {\n const pagePositionIndex = companiesAndTopics.length ? index + 1 : index;\n\n if ('isExchangeVideoGroup' in result && result.isExchangeVideoGroup) {\n return (\n <ExchangeVideoGroup\n key={index}\n item={result}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n \n\n switch (result.type?.toLowerCase()) {\n case 'interactive':\n case 'clip':\n case 'video': {\n if (index === 0 && result._featured && VideoHelper.isVideo(result)) {\n return (\n <FeaturedVideoResult\n key={index}\n item={result as SearchResultsObject<Video>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n\n return (\n <VideoResult\n key={index}\n item={result as SearchResultsObject<Video>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n\n case 'playlist': {\n if (useSmallComponent) {\n return (\n <SmallPlaylistResult\n key={index}\n item={result as SearchResultsObject<Playlist>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n\n return (\n <LargePlaylistResult\n key={index}\n item={result as SearchResultsObject<Playlist>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n\n case 'series': {\n const series = result as Series;\n\n if (useSmallComponent || !series.tallPoster?.id) {\n return (\n <SmallSeriesResult\n key={index}\n item={result as SearchResultsObject<Series>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n\n return (\n <LargeSeriesResult\n key={index}\n item={result as SearchResultsObject<Series>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n }\n })}\n </div>\n );\n});","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'search.searchSubstitute';\n\ninterface SearchSubstituteProps {\n substitute: string;\n queryParams: HashObject;\n getAppLink: (query: string, queryParams: HashObject) => Core.AppLink\n}\n\nexport function SearchSubstitute(props: SearchSubstituteProps): JSX.Element {\n if (!props.substitute)\n return <></>;\n\n return (\n <div className='pb-3'>\n <p className='mb-1 h6'>\n <Text namespace={namespace} phrase='showingFor' />&nbsp;\n <AppLink\n className='info-link'\n appLink={props.getAppLink(props.substitute, props.queryParams)}\n appLinkOptions={{ replace: true }}\n >\n {props.substitute}\n </AppLink>\n </p>\n <p className='mb-0 h6 fw-normal'>\n <Text namespace={namespace} phrase='searchInsteadFor' />\n <AppLink\n className='info-link'\n appLink={props.getAppLink(props.queryParams.query, { ...props.queryParams, allowSubstitute: 'false' })}\n >\n {props.queryParams.query}\n </AppLink>\n <Text namespace={namespace} phrase='endOriginal' />\n </p>\n </div>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'search.searchSuggestions';\n\ninterface SearchSuggestionsProps {\n suggestions: string[];\n queryParams: HashObject;\n getAppLink: (query: string, queryParams: HashObject) => Core.AppLink\n}\n\nSearchSuggestions.defaultProps = {\n suggestions: [],\n queryParams: {}\n};\n\nexport function SearchSuggestions(props: SearchSuggestionsProps): JSX.Element {\n if (!props.suggestions?.length)\n return <></>;\n\n return (\n <div className='d-flex align-items-center mb-3'>\n <Text namespace={namespace} phrase='didYouMean' />\n &nbsp;\n\n {props.suggestions.map((suggestion, index) => (\n <React.Fragment key={`${suggestion}:${index}`}>\n {index !== 0 && <span className='mx-1'>&bull;</span>}\n\n <AppLink\n className='info-link'\n appLink={props.getAppLink(suggestion, props.queryParams)}\n appLinkOptions={{ replace: true }}\n >\n {suggestion}\n </AppLink>\n </React.Fragment>\n ))}\n </div>\n );\n}","import { HttpVerbs } from 'libs/common/backbone/enums/HttpVerbs';\nimport { Xhr } from 'libs/common/backbone/interfaces';\nimport { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { FilterConstants } from 'libs/shared/apps/search/constants/FilterConstants';\nimport { SearchIndices, SearchResultObjectTypes, SearchResults, SearchResultsObject } from 'libs/shared/apps/search/interfaces';\nimport { SharedSearchHelper } from 'libs/shared/apps/search/utils/SharedSearchHelper';\nimport { Playlist, Series } from 'libs/shared/interfaces';\n\nfunction formatSearchResponse(response: SearchResults<SearchResultObjectTypes>) {\n /**\n * Until playlists and series are regionalised, search will always return every series/playlist that exists\n * even if the current user doesn't have access to the content inside (which will happen for example when playlists/series)\n * contain all UK library content but is being searched for by an AU user.\n *\n * For some search queries, this may result in search showing a bunch of \"empty\" playlists/series, which sucks.\n * This will filter all empty collections out and decrement the `totalResults` to avoid this and make search a better\n * experience.\n *\n * Ideally this will be removed one day when this regionalisation is no longer an issue.\n */\n let totalResults = response.totalResults;\n\n const results = response?.results?.filter(result => {\n if (result._index !== 'series' && result._index !== 'playlist')\n return true;\n\n if (result._index === 'playlist') {\n const playlist = result as SearchResultsObject<Playlist>;\n\n if (playlist.clips?.data?.length ||\n playlist.interactives?.data?.length ||\n playlist.videos?.data?.length)\n return true;\n\n totalResults--;\n return false;\n }\n\n if ((result as SearchResultsObject<Series>).videos?.data?.length === 0) {\n totalResults--;\n return false;\n }\n\n return true;\n }) ?? [];\n\n response.results = results;\n response.totalResults = totalResults;\n\n // The first search result will always have the highest score value.\n // We store it so that we can access it for subsequent results pages\n const resultMaxScore = results[0]?._score;\n\n return {\n ...response,\n results: SharedSearchHelper.mapMaxScoreToSearchResults(results, resultMaxScore)\n };\n}\n\nexport const SharedSearchRequests = {\n searchV4(\n query: string,\n indicesArr: SearchIndices[],\n filters: HashObject = {},\n allowSubstitute: boolean = true,\n cursor?: string,\n limit?: number\n ): Flight.PublicRequest {\n let key = `search:v4:${query}:${allowSubstitute}:${indicesArr}:${cursor}`;\n\n key += Object.keys(filters).map(filterName => {\n const filter = filters[filterName];\n return Array.isArray(filter) ? filter.join(';') : filter;\n }).join(';');\n\n const {\n [`${FilterConstants.FILTER_PARAM_PREFIX}excludeLibraryExclusive`]: excludeLibraryExclusive,\n isLearner,\n ...genericFilters\n } = filters;\n\n const indices = indicesArr.map(index => {\n if (index !== 'video' || !excludeLibraryExclusive)\n return { index };\n\n return { index, filters: { excludeLibraryExclusive } };\n });\n\n const data = {\n searchType: 'content',\n indices,\n filters: Object.entries(genericFilters)\n .reduce((prev, [ key, value ]) =>\n ({ ...prev, [key.replace('filters.', '')]: value }), {}),\n query,\n allowSubstitute,\n cursor: cursor ?? undefined,\n isLearner: !!isLearner,\n limit\n };\n\n return {\n url: '{gateway}/v4/search',\n publicUrl: '/api/search/v4',\n type: HttpVerbs.POST,\n data,\n key,\n formatData: formatSearchResponse\n };\n },\n\n search(\n query: string,\n indices: SearchIndices[],\n filters: HashObject = {},\n allowSubstitute: boolean = true,\n cursor?: string,\n limit?: number,\n success?: (results: SearchResults) => void,\n error?: (xhr: Xhr) => void\n ): Flight.PublicRequest {\n let key = `search:${query}:${allowSubstitute}:${indices}:${cursor}`;\n\n key += Object.keys(filters).map(filterName => {\n const filter = filters[filterName];\n return Array.isArray(filter) ? filter.join(';') : filter;\n }).join(';');\n\n const params = Object.assign({}, {\n index: indices,\n cursor: cursor ?? undefined,\n query,\n allowSubstitute,\n limit,\n ...filters\n });\n\n return {\n url: UrlHelper.urlBuilder('{gateway}/v3/search', params),\n publicUrl: UrlHelper.urlBuilder('/api/search', params),\n key,\n formatData: formatSearchResponse,\n success,\n error\n };\n },\n\n tagsAndClassifications(\n query: string,\n indices: SearchIndices[],\n filters: HashObject = {},\n cursor?: string,\n success?: (results: string[]) => void,\n error?: () => void\n ): Flight.PublicRequest {\n const params = Object.assign({}, {\n index: indices,\n cursor,\n query,\n ...filters\n });\n\n return {\n url: UrlHelper.urlBuilder('{gateway}/v3/search/tags-and-classifications', params),\n publicUrl: UrlHelper.urlBuilder('/api/search/tags-and-classifications', params),\n key: `filter:options:${query}:${indices.join(':')}:${cursor}`,\n success,\n error,\n normalize: false\n };\n }\n};","import { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { SharedSearchRequests } from 'libs/shared/apps/search/flight-requests/SharedSearchRequests';\nimport { SearchResults, SearchResultsObject } from 'libs/shared/apps/search/interfaces';\nimport { FilterHelper } from 'libs/shared/apps/search/utils/FilterHelper';\nimport { ClassificationStatus } from 'libs/shared/enums/ClassificationStatus';\nimport { ClassificationType } from 'libs/shared/enums/ClassificationType';\nimport { CurationTag } from 'libs/shared/enums/CurationTag';\nimport { Classification, Presentation, Rating } from 'libs/shared/interfaces';\n\nimport { SearchHelper } from 'apps/search/utils';\n\nconst TEACHER_FILTERS = [ 'filters.classification', 'filters.presentation' ];\nconst STUDENT_FILTERS = [ 'filters.classification', 'filters.presentation', 'isLearner' ];\n\ntype TopicSearchResults = SearchResults<SearchResultsObject<Classification>>;\n\nexport function useSearchTopics(\n queryParams: HashObject,\n ratings: Rating[] = [],\n presentationId: string,\n availablePresentations: Presentation[],\n isStudent: boolean\n): Flight.Response<SearchResults> {\n const rawFilters = ratings?.length && FilterHelper.buildBackendFilterParams(\n queryParams,\n ratings,\n [presentationId],\n isStudent,\n []\n );\n\n const filters = ObjectHelper.pick(rawFilters, isStudent ? STUDENT_FILTERS : TEACHER_FILTERS);\n filters[`filters.classificationType`] = ClassificationType.Subject;\n filters[`filters.status`] = ClassificationStatus.Published;\n\n if (queryParams?.moviesAndTv)\n filters[`filters.curationTag`] = CurationTag.MOVIES_AND_TV;\n\n if (availablePresentations.length) {\n filters[`filters.presentation`] = availablePresentations.map(presentation => presentation.id);\n }\n\n const presentationMap = availablePresentations?.reduce((acc: HashObject, presentation) => {\n acc[presentation.id] = presentation;\n return acc;\n }, {}) ?? {};\n\n const indices = FilterHelper.getAppliedIndices(queryParams);\n\n const hasFilteredOutTopics = !indices.includes('classification');\n\n const request = SharedSearchRequests.search(\n SearchHelper.getQuery(queryParams),\n ['classification'],\n filters,\n queryParams.allowSubstitute !== 'false'\n );\n\n const shouldFetch = !hasFilteredOutTopics;\n\n const response = Flight.useBasicFetch<TopicSearchResults>(shouldFetch && request);\n\n if (!shouldFetch)\n return null;\n\n if (!response.data)\n return response;\n\n if (!availablePresentations || availablePresentations?.length < 2)\n return response;\n\n const results = [...response.data.results];\n\n /**\n * If the customer has more than 1 presentation, and they search for something that returns 2 topics\n * with the same score, then we want to order those topics based on the presentation's learning level.\n * This is achieved by checking the `value` on the presentation.\n */\n const sortedResults = results.sort((a, b) => {\n // If the scores are different, then keep the original ordering\n if (a._score !== b._score)\n return 0;\n\n const presentationA = presentationMap[a.presentationId];\n const presentationB = presentationMap[b.presentationId];\n\n if (!presentationA)\n return 1;\n\n if (!presentationB)\n return -1;\n\n // Order by presentation value\n return presentationA.value - presentationB.value;\n });\n\n return {\n ...response,\n data: {\n ...response.data,\n results: sortedResults\n }\n };\n}\n","import { Flight } from 'libs/common/flight';\n\nimport { HashObject } from 'libs/analytics/interfaces';\n\nimport { TopicResults } from 'libs/shared/apps/search/interfaces';\nimport { MasterObjectTypes } from 'libs/shared/enums/MasterObjectTypes';\nimport { LocalPermissionName, PermissionName } from 'libs/shared/enums/PermissionName';\nimport { PresentationLearningLevel } from 'libs/shared/enums/PresentationLearningLevel';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { DomainMasterCollectionType, LibraryRequests } from 'libs/shared/flight-requests/LibraryRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useProducts } from 'libs/shared/hooks/UseProducts';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Config, CurrentUser, DashboardTargetType, Library, Rating, User, YearGroup } from 'libs/shared/interfaces';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { RatingRequests } from 'shared/flight-requests/RatingRequests';\nimport { useCurriculums } from 'shared/hooks/useCurriculums';\nimport { usePresentation } from 'shared/hooks/usePresentation';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useFetchCuratedDashboard } from 'shared/utils/DashboardHelper';\n\nimport { useFetchSchoolLevels } from 'apps/search/hooks/useFetchSchoolLevels';\nimport { useSearchCompanies } from 'apps/search/hooks/useSearchCompanies';\nimport { useSearchTopics } from 'apps/search/hooks/useSearchTopics';\n\n/**\n * We need to fetch libraries in order to support the sources filter. \n * However we need to exclude the streamable library, and additionally we need to exclude\n * the exchange library if the user has decided they don't want to see exchange results.\n * \n * We then need to return both of these ids so that the FilterHelper.getBackendFilters()\n * can add them as excludeLibraryExclusive filters\n * \n * - Sha\n */\nfunction useGetLibraries() {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const products = useProducts();\n const settings = useSettings(null);\n\n const streamableLibrary = Flight.useBasicFetch<HashObject>(LibraryRequests.streamableLearning());\n const streamableLibraryId = streamableLibrary.data?.objectId;\n\n const showExchangeSearchResults = products.hasProduct(ProductId.Exchange) && settings.showExchangeSearchResults;\n\n const libraryTypes: DomainMasterCollectionType[] = [ 'sharedLibrary', 'customLibrary', 'workspace', 'hostedLibrary', 'exchange' ];\n const librariesRequest = Flight.useBasicFetch<Library[]>(\n currentUser.data?.isAuthenticated && LibraryRequests.domainLibraries(libraryTypes)\n );\n\n let libraries = librariesRequest.data ?? [];\n const exchangeLibraryIndex = libraries?.findIndex(l => l.type === MasterObjectTypes.Exchange);\n const exchangeLibraryId = libraries[exchangeLibraryIndex]?.id;\n\n if (!showExchangeSearchResults)\n libraries = [ ...libraries.slice(0, exchangeLibraryIndex), ...libraries.slice(exchangeLibraryIndex + 1) ];\n\n if (streamableLibraryId) {\n const streamableIndex = libraries?.findIndex(l => l.id.toString() === streamableLibraryId.toString());\n libraries = [ ...libraries.slice(0, streamableIndex), ...libraries.slice(streamableIndex + 1) ];\n }\n\n const hasLibrariesCompleted = (\n streamableLibrary.hasCompleted &&\n (!currentUser.data?.isAuthenticated || librariesRequest.hasCompleted)\n );\n\n return {\n hasLibrariesCompleted,\n libraries,\n exchangeLibraryId,\n streamableLibraryId,\n showExchangeSearchResults\n };\n}\n\nfunction useGetRatings() {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const ratings = Flight.useBasicFetch<Rating[]>(RatingRequests.ratings(currentUser.data?.countryCode));\n\n const {\n activePresentation, availablePresentations, getFallbackPresentation, hasPresentationsLoaded\n } = usePresentation();\n\n const currentPresentation = activePresentation || getFallbackPresentation();\n\n if (!hasPresentationsLoaded)\n return ratings;\n\n if (availablePresentations?.length > 1 || !currentPresentation)\n return ratings;\n\n const learningLevel = TopicsHelper.getMappedPresentationLevel(currentPresentation.learningLevel);\n if (learningLevel !== PresentationLearningLevel.Level_1)\n return ratings;\n\n return {\n ...ratings,\n data: ratings.data?.filter(rating => {\n // Primary schools shouldn't see ratings higher than PG\n return rating.code && rating.value < 64;\n })\n };\n}\n\n/**\n * This hook contains all the simple data fetching that normally sits in the view.\n * I've done this to help promote readability of of the SearchResultsView - Sha\n */\nexport function useFetchSearchData(queryParams: HashObject) {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const userDetails = Flight.useBasicFetch<User>(currentUser.data?.id && UserRequests.user(currentUser.data.id));\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n const products = useProducts();\n const settings = useSettings(null);\n\n const {\n hasLibrariesCompleted,\n libraries,\n exchangeLibraryId,\n streamableLibraryId,\n showExchangeSearchResults\n } = useGetLibraries();\n\n const {\n activePresentation, availablePresentations, getFallbackPresentation, hasPresentationsLoaded\n } = usePresentation();\n\n const currentPresentation = activePresentation || getFallbackPresentation();\n const currentPresentationId = currentPresentation?.id;\n\n const curriculums = useCurriculums();\n\n const audiences = usePresentationAudiences();\n\n const schoolLevels = useFetchSchoolLevels(currentPresentation);\n const schoolLevelIds = schoolLevels.data?.schoolLevels?.map(o => o.id);\n const availableTopics = Flight.useBasicFetch<TopicResults>(schoolLevels?.data &&\n ClassificationRequests.topicsFromAllAvailablePresentations(schoolLevelIds));\n\n const ratings = useGetRatings();\n\n const { hasPermissions, hasLocalPermissions } = usePermissions();\n\n const isLearner = hasPermissions(PermissionName.StudentExperience);\n const canViewCurriculums = hasPermissions(PermissionName.ViewCurriculums);\n const canUseSeriesActions = hasLocalPermissions(LocalPermissionName.UseSeriesActions);\n const hasCustomLibraries = hasPermissions(PermissionName.ViewLibraries);\n const hasMoviesAndTv = hasPermissions(PermissionName.ViewMoviesTv);\n\n const topics = useSearchTopics(\n queryParams,\n ratings.data,\n currentPresentationId,\n availablePresentations,\n isLearner\n );\n\n const companies = useSearchCompanies(\n queryParams,\n ratings.data,\n availablePresentations,\n hasMoviesAndTv\n );\n\n const {\n dashboard: moviesAndTvDashboard\n } = useFetchCuratedDashboard({\n targetType: DashboardTargetType.MoviesAndTv,\n queryParams\n });\n\n const hasDataLoaded = (\n audiences.hasCompleted &&\n hasPresentationsLoaded &&\n currentUser.hasCompleted &&\n (!currentUser.data?.isAuthenticated || userDetails.hasCompleted) &&\n ratings.hasCompleted &&\n config.hasCompleted &&\n availablePresentations &&\n (!currentUser.data?.isAuthenticated || !products.isLoadingProducts) &&\n !settings.isLoadingSettings &&\n hasLibrariesCompleted\n );\n\n return {\n queryParams,\n currentUser,\n userDetails,\n config,\n yearGroups,\n products,\n settings,\n curriculums,\n audiences,\n schoolLevels,\n currentPresentation,\n availablePresentations,\n availableTopics,\n ratings,\n topics,\n companies,\n moviesAndTvDashboard,\n currentPresentationId,\n isLearner,\n canViewCurriculums,\n canUseSeriesActions,\n libraries,\n hasDataLoaded,\n exchangeLibraryId,\n streamableLibraryId,\n showExchangeSearchResults,\n hasPermissions,\n hasCustomLibraries,\n hasMoviesAndTv\n };\n}\n","import { Flight } from 'libs/common/flight';\n\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { Presentation, SchoolLevels } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nimport { SearchRequests } from 'apps/search/flight-requests/SearchRequests';\n\nexport function useFetchSchoolLevels(presentation: Presentation) {\n const { hasPermissions } = usePermissions();\n const isLearner = hasPermissions(PermissionName.StudentExperience);\n\n const {\n availablePresentations,\n hasPresentationsLoaded\n } = usePresentation();\n\n function getPresentationIds() {\n if (isLearner)\n return presentation ? [presentation?.id] : null;\n\n return availablePresentations?.map(o => o.id);\n }\n\n const presentationIds = getPresentationIds();\n\n return Flight.useBasicFetch<SchoolLevels>(\n hasPresentationsLoaded &&\n presentationIds &&\n SearchRequests.schoolLevels(presentationIds)\n );\n}","import { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { SharedSearchRequests } from 'libs/shared/apps/search/flight-requests/SharedSearchRequests';\nimport { SearchResults, SearchResultsObject } from 'libs/shared/apps/search/interfaces';\nimport { FilterHelper } from 'libs/shared/apps/search/utils/FilterHelper';\nimport { Company, Presentation, Rating } from 'libs/shared/interfaces';\n\nimport { SearchHelper } from 'apps/search/utils';\n\ntype CompanySearchResults = SearchResults<SearchResultsObject<Company>>;\n\nexport function useSearchCompanies(\n queryParams: HashObject,\n ratings: Rating[] = [],\n availablePresentations: Presentation[],\n hasMoviesAndTv: boolean\n): Flight.Response<SearchResults> {\n const availablePresentationIds = availablePresentations.map(p => p.id);\n\n const rawFilters = ratings?.length && FilterHelper.buildBackendFilterParams(\n queryParams,\n ratings,\n availablePresentationIds,\n false,\n []\n );\n \n const filters = rawFilters || {};\n\n /**\n * For other uses of FilterHelper.buildBackendFilterParams, the presentaiton ids will only be added for students,\n * but as a temporary fix for searching companies, we always filter by the current presentation - Sha\n */\n if (availablePresentationIds?.length)\n filters[`filters.presentation`] = availablePresentationIds;\n\n const indices = FilterHelper.getAppliedIndices(queryParams);\n\n const hasFilteredOutCompanies = !indices.includes('company');\n\n const request = SharedSearchRequests.search(\n SearchHelper.getQuery(queryParams),\n ['company'],\n filters,\n queryParams.allowSubstitute !== 'false'\n );\n\n const shouldFetch = !hasFilteredOutCompanies && hasMoviesAndTv;\n\n const response = Flight.useBasicFetch<CompanySearchResults>(shouldFetch && request);\n\n if (!shouldFetch)\n return null;\n\n if (!response.data)\n return response;\n\n return {\n ...response,\n data: {\n ...response.data,\n results: [...response.data.results]\n }\n };\n}\n","import { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { HashObject } from 'libs/analytics/interfaces';\n\nimport { FilterConstants } from 'libs/shared/apps/search/constants/FilterConstants';\nimport { SharedSearchRequests } from 'libs/shared/apps/search/flight-requests/SharedSearchRequests';\nimport { SearchIndices, SearchResultObjectTypes, SearchResults } from 'libs/shared/apps/search/interfaces';\nimport { handleHttpError } from 'libs/shared/errors/handlers/HttpErrorHandlers';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useInfiniteList } from 'libs/shared/hooks/UseInfiniteList';\nimport { UseProductsResponse } from 'libs/shared/hooks/UseProducts';\nimport { SettingsHash } from 'libs/shared/hooks/useSettings';\nimport { Video } from 'libs/shared/interfaces';\n\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\n\nimport { ExchangeGroupingType, useGroupExchangeResults } from './useGroupExchangeResults';\n\nexport const namespace = 'search.utils';\n\ninterface UseGetSearchResultsOptions {\n queryParams: HashObject;\n appliedIndices: SearchIndices[];\n backendFilters: HashObject;\n products: UseProductsResponse;\n settings: SettingsHash;\n hasDataLoaded: boolean;\n exchangeLibraryId: string;\n showExchangeSearchResults: boolean;\n}\nexport function useGetSearchResults(options: UseGetSearchResultsOptions) {\n const { queryParams, appliedIndices, backendFilters } = options;\n\n const alerts = useAlerts();\n const fetch = Flight.useGetFetch();\n\n const searchResultsResponse = Flight.useGetResponse<SearchResults>(getSearchRequest()?.key);\n const hasExchangeLibraryFilter = hasLibraryFilter(options.exchangeLibraryId?.toString());\n const fetchMixedExchangeResults = (\n options.hasDataLoaded &&\n appliedIndices?.length &&\n options.showExchangeSearchResults &&\n !hasExchangeLibraryFilter\n );\n const mixedExchangeSearchResults = Flight.useBasicFetch<SearchResults>(\n fetchMixedExchangeResults && getMixedExchangeSearchRequest()\n );\n\n function hasLibraryFilter(libraryId: string): boolean {\n if (!libraryId) return false;\n\n return options.backendFilters?.[`${FilterConstants.FILTER_PARAM_PREFIX}library`]\n ?.some?.((l: string) => l.toString() === libraryId);\n }\n\n function getMixedExchangeSearchRequest() {\n return SharedSearchRequests.searchV4(\n queryParams.query,\n appliedIndices,\n backendFilters,\n queryParams.allowSubstitute !== 'false',\n null,\n 10\n );\n }\n\n function getSearchRequest(cursor?: string) {\n if (!options.hasDataLoaded || !appliedIndices?.length) return;\n\n let backendFilters = { ...options.backendFilters };\n\n if (options.showExchangeSearchResults && !hasExchangeLibraryFilter) {\n const excludeLibraryFilter = `${FilterConstants.FILTER_PARAM_PREFIX}excludeLibraryExclusive`;\n backendFilters = {\n ...backendFilters,\n [excludeLibraryFilter]: [ ...backendFilters[excludeLibraryFilter], options.exchangeLibraryId ]\n };\n }\n \n return SharedSearchRequests.searchV4(\n queryParams.query,\n appliedIndices,\n backendFilters,\n queryParams.allowSubstitute !== 'false',\n cursor\n );\n }\n\n function fetchNext(cursor?: string) {\n fetch(getSearchRequest(cursor));\n }\n\n function onError(pageNumber: number, httpStatus: HttpStatus): void {\n if (pageNumber === 1)\n return handleHttpError(httpStatus);\n\n alerts.error(LanguageService.getPhrase(namespace, 'error'));\n }\n\n const searchResults = useInfiniteList<SearchResultObjectTypes, SearchResults>(\n getSearchRequest,\n fetchNext,\n onError,\n data => data.results\n );\n\n function getExchangeGroupingType(): ExchangeGroupingType {\n if (!options.showExchangeSearchResults)\n return 'omit';\n\n return hasExchangeLibraryFilter ? 'untouched' : 'group';\n }\n\n const videos = searchResults.items?.filter(r => r._index === 'video' || r._index === 'clip');\n useVideoMixin(videos as Video[]);\n\n const items = useGroupExchangeResults({\n searchResults: searchResults.items,\n mixedExchangeSearchResults: mixedExchangeSearchResults.data?.results,\n searchResultsResponse: searchResultsResponse.data,\n groupingType: getExchangeGroupingType()\n });\n\n return {\n ...searchResults,\n hasFirstPageCompleted: searchResults.hasFirstPageCompleted || !options.hasDataLoaded || !appliedIndices?.length,\n items,\n fetchNext,\n substituteQuery: searchResultsResponse.data?.substituteQuery,\n suggestions: searchResultsResponse.data?.suggestions\n };\n}\n","import React from 'react';\n\nimport { ExchangeVideoGroup, SearchResultObjectTypes, SearchResults, SearchResultsObject } from 'libs/shared/apps/search/interfaces';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { Video } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nexport type ExchangeGroupingType =\n 'omit' | // Don't show exchange results at all\n 'group' | // Group exchange results into a component\n 'untouched'; // Leave exchange results untouched\n\ninterface UseGroupExchangeResults {\n searchResults: SearchResultObjectTypes[];\n mixedExchangeSearchResults: SearchResultObjectTypes[];\n searchResultsResponse: SearchResults;\n groupingType: ExchangeGroupingType;\n}\n\nexport function useGroupExchangeResults(options: UseGroupExchangeResults) {\n return React.useMemo(() => {\n if (!options.searchResults?.length || !options.mixedExchangeSearchResults?.length || options.groupingType === 'untouched')\n return options.searchResults;\n\n const mixedExchangeResults: SearchResultObjectTypes[] = [...options.searchResults];\n const exchangeResults: SearchResultsObject<Video>[] = [];\n let exchangeIndex: number;\n let exchangeShowCount: number;\n let consecutive = false;\n\n options.mixedExchangeSearchResults.forEach((item, index) => {\n if (exchangeResults.length === 3) return;\n\n const isExchangeVideo = VideoHelper.isVideo(item) &&\n item.libraries.data?.length === 1 &&\n item.libraries.data?.[0]?.typeId === MasterType.ExchangeCollection;\n\n if (isExchangeVideo) {\n if (exchangeIndex === undefined) {\n exchangeIndex = index;\n exchangeShowCount = 0;\n consecutive = true;\n }\n\n if (consecutive)\n exchangeShowCount++;\n\n exchangeResults.push(item);\n return;\n }\n\n consecutive = false;\n });\n\n const exchangeVideoGroup: SearchResultsObject<ExchangeVideoGroup> = {\n id: null,\n type: null,\n name: null,\n videos: exchangeResults,\n showCount: exchangeIndex === 0 ? 1 : exchangeShowCount,\n isExchangeVideoGroup: true,\n _index: null\n };\n \n if (options.groupingType === 'group' && exchangeResults.length)\n mixedExchangeResults.splice(exchangeIndex, 0, exchangeVideoGroup);\n\n return mixedExchangeResults;\n }, [\n options.searchResultsResponse,\n options.searchResults?.length,\n options.mixedExchangeSearchResults,\n options.groupingType\n ]);\n}","import React from 'react';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\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 = 'search.searchResultsEmptyState';\n\ninterface SearchResultsEmptyStateProps {\n query?: string;\n scotland?: boolean;\n}\n\nexport function SearchResultsEmptyState(props: SearchResultsEmptyStateProps): JSX.Element {\n const imageUrl = (props.scotland && props.query?.trim()?.toLowerCase() === 'nessie')\n ? ImageUrls.EmptyStates.Search.RESULTS_SCOTLAND\n : ImageUrls.EmptyStates.Search.RESULTS;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={imageUrl} />\n\n <EmptyState.Heading>\n {props.query\n ? <Text phrase='headingWithQuery' options={{ query: props.query }} />\n : <Text phrase='headingWithoutQuery' />\n }\n </EmptyState.Heading>\n\n <EmptyState.Info>\n <Text phrase='info' />\n <AppLink\n className='info-link'\n appLink={{ application: AppChannels.SUBJECT, action: Actions.Subjects.CLASSIFICATION_ALL }}\n >\n <Text phrase='topicsAppLink' />\n </AppLink>\n </EmptyState.Info>\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, HashObject, LocationContext } from 'libs/analytics/interfaces';\n\nimport { MixedSearchResults } from 'libs/shared/apps/search/components/mixed-search-results/MixedSearchResults';\nimport { SearchFilters } from 'libs/shared/apps/search/components/search-filters/SearchFilters';\nimport { SearchSubstitute } from 'libs/shared/apps/search/components/search-substitute/SearchSubstitute';\nimport { SearchSuggestions } from 'libs/shared/apps/search/components/search-suggestions/SearchSuggestions';\nimport { InfiniteScrollFooter } from 'libs/shared/components/infinite-scroll-footer/InfiniteScrollFooter';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\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';\n\nimport { useFetchSearchData } from 'apps/search/hooks/useFetchSearchData';\nimport { useGetSearchResults } from 'apps/search/hooks/useGetSearchResults';\nimport { useGetTagsAndClassifications } from 'apps/search/hooks/useGetTagsAndClassifications';\nimport { useSearchMask } from 'apps/search/hooks/useSearchMask';\nimport { SearchHelper } from 'apps/search/utils';\n\nimport { SearchResultsEmptyState } from './empty-state/SearchResultsEmptyState';\n\nexport const namespace = 'search.searchResults';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface SearchResultsView2Props {\n queryParams: HashObject\n}\n\nexport function SearchResultsView(props: SearchResultsView2Props): JSX.Element {\n const { queryParams = {} } = props;\n\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.VideoThumbnail);\n const { isPlugin } = usePluginHelper();\n const { hasTopicDirectories } = useSettings(null);\n\n const searchData = useFetchSearchData(queryParams);\n\n const searchFilters = SearchHelper.getBackendFilters(searchData);\n\n const hasIndices = !!searchFilters?.appliedIndices.length;\n const tagsAndClassifications = useGetTagsAndClassifications(hasIndices && searchFilters);\n const searchResults = useGetSearchResults({ ...searchFilters, ...searchData });\n\n const filters = SearchHelper.getFilters(\n searchData,\n searchFilters?.inaccessibleIndices,\n hasIndices && tagsAndClassifications\n );\n \n useSetPageMetadata(PageMetadataHelper.getDefaultMetadata({\n title: queryParams.query ?? '',\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n allowIndexing: false\n }));\n\n /**\n * Do we have the data we need for the entire view to render\n */\n const hasLoaded = (\n searchData.hasDataLoaded && filters\n );\n\n /**\n * Do we have the data we need to render our results\n */\n const hasSearchCompleted = (\n searchResults.hasFirstPageCompleted &&\n // Topic and Company requests won't exist if they aren't being fetched\n (!searchData.topics || searchData.topics.hasCompleted) &&\n (!searchData.companies || searchData.companies.hasCompleted) &&\n (!hasIndices || tagsAndClassifications.hasCompleted) &&\n !!filters\n );\n\n /**\n * Do we actually have results\n */\n const hasResults = (\n searchResults.items?.length ||\n searchData.topics?.data?.totalResults ||\n searchData.companies?.data?.totalResults\n );\n\n useSearchMask(hasSearchCompleted);\n\n if (!hasLoaded)\n return <></>;\n\n return (\n <div className='px-4'>\n <SearchSubstitute\n substitute={searchResults.substituteQuery}\n queryParams={queryParams}\n getAppLink={SearchHelper.getSearchAppLink}\n />\n\n {!searchResults.substituteQuery && (\n <SearchSuggestions\n suggestions={searchResults.suggestions}\n queryParams={queryParams}\n getAppLink={SearchHelper.getSearchAppLink}\n />\n )}\n\n {(!!searchData.audiences.data && !!searchData.ratings.data && !!searchData.availableTopics.data) && (\n <SearchFilters\n queryParams={queryParams}\n mainFilters={filters?.mainFilters}\n moreFilters={filters?.moreFilters}\n analyticsOptions={{\n entity: EntityType.SearchResults,\n location: LocationContext.SearchFilters\n }}\n appLink={{ application: AppChannels.SEARCH, action: Actions.Search.HOME }}\n isFetchingOptions={tagsAndClassifications.isFetching}\n />\n )}\n\n {hasSearchCompleted &&\n <section>\n {hasResults\n ? (\n <VideoActionsContext.Provider value={videoActions}>\n <MixedSearchResults\n queryParams={queryParams}\n results={searchResults.items}\n topics={searchData.topics?.data}\n companies={searchData.companies?.data}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n audiences={!queryParams.moviesAndTv && searchData.audiences.data}\n currentUser={searchData.currentUser.data}\n imageCdnUrl={searchData.config.data.imageCdnUrl}\n availablePresentations={searchData.availablePresentations}\n showActions={(!searchData.isLearner && searchData.canUseSeriesActions)}\n hasPermissions={searchData.hasPermissions}\n yearGroups={searchData.yearGroups.data}\n isPlugin={isPlugin}\n appLinks={SearchHelper.getAppLinks(\n searchData.currentPresentation,\n searchData.availablePresentations,\n queryParams.moviesAndTv\n )}\n hasTopicDirectories={hasTopicDirectories}\n subTextType='series'\n />\n </VideoActionsContext.Provider>\n ) : (\n <SearchResultsEmptyState\n query={queryParams.query}\n scotland={!!searchData.currentPresentation?.description?.toLowerCase().includes('scotland') ?? false}\n />\n )\n }\n {/* XOR */}\n {(searchResults.hasMore || searchResults.isFetching) && (\n <InfiniteScrollFooter\n isFetching={searchResults.isFetching}\n fetchNext={searchResults.fetchNext}\n nextCursor={searchResults.nextCursor}\n fetchOnScroll\n />\n )}\n </section>\n }\n </div>\n );\n}","import { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { SharedSearchRequests } from 'libs/shared/apps/search/flight-requests/SharedSearchRequests';\nimport { SearchIndices } from 'libs/shared/apps/search/interfaces';\n\nexport interface UseGetTagsAndClassificationsOptions {\n queryParams: HashObject;\n appliedIndices: SearchIndices[];\n backendFilters: HashObject;\n}\n\nexport function useGetTagsAndClassifications(options: UseGetTagsAndClassificationsOptions) {\n return Flight.useBasicFetch<string[]>(options && SharedSearchRequests.tagsAndClassifications(\n options.queryParams.query,\n options.appliedIndices,\n options.backendFilters\n ));\n}\n","import React from 'react';\n\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\n\nimport { ViewModelKeys } from 'shared/constants/LiteViewModels';\n\nexport function useSearchMask(hasCompleted: boolean): void {\n const [ showMask, setShowMask ] = useViewModel(ViewModelKeys.SHOW_SEARCH_MASK, true);\n\n React.useEffect(() => {\n showMask && hasCompleted && setShowMask(false);\n }, [hasCompleted]);\n}\n","import { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/flight';\n\nimport { Rating } from 'libs/shared/interfaces';\n\nexport const RatingRequests = {\n ratings(countryCode?: string): Flight.PublicRequest {\n return {\n url: '/api/domain/v2/me/ratings',\n publicUrl: UrlHelper.urlBuilder('/api/domain/v2/me/ratings', { countryCode }),\n key: 'ratings',\n // v2/me/ratings doesn't support `query={orderby:value}`. Adding this due to time constraints\n formatData: (ratings: Rating[]) => {\n return ratings.sort((a, b) => a.value - b.value);\n }\n };\n }\n};","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation, getFallbackPresentation } = usePresentation({ redirectOnError: true });\n\n const presentation = activePresentation || getFallbackPresentation();\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!presentation &&\n AudienceRequests.presentationAudiences(presentation.id)\n );\n\n return audiences;\n};","import React from 'react';\n\nimport { 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 { Clip, ClipCollection, CurrentUser, Video, VideoCollection } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ntype Types = Video[] | VideoCollection | Clip[] | ClipCollection;\n\nfunction getValidObjects(objects: Types): (Video | Clip)[] {\n if (!objects)\n return [];\n\n if (Array.isArray(objects))\n return objects.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n if ('data' in objects)\n return objects.data.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n return [];\n}\n\ninterface VideoMixinOptions {\n /**\n * If the videos that are having new data mixed into are sitting on an explicit Flight namespace,\n * providing that namespace here is required\n */\n flightNamespace?: string;\n}\n\nexport function useVideoMixin(objects: Types, options: VideoMixinOptions = {}): void {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const hydratedVideos = React.useRef<Set<string>>(new Set<string>());\n\n const videos = getValidObjects(objects);\n\n const videoIds = videos.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","WidgetButtonDirection","getPhrase","LanguageService","WidgetButton","isLeft","direction","Left","arrowSvg","hide","style","state","contents","paddingBottom","viewableItems","height","useGradientBackdrop","leftGradientClassName","rightGradientClassName","hideExtendedClickableArea","tabIndex","leftButtonClassName","rightButtonClassName","hoverText","SCROLL_TOLERANCE","useInfiniteList","getRequest","onError","getItems","getCursor","scrollContainer","options","handleScroll","useState","pagesFetched","setPagesFetched","fetchNextFn","response","cursor","request","key","fetchNextPage","currentVal","hasMore","getBoundingClientRect","scrollTop","scrollHeight","window","innerHeight","document","documentElement","useEffect","onScroll","FunctionHelper","addEventListener","removeEventListener","shouldInitialFetch","statusCode","httpStatusClass","toString","substr","HttpStatus","items","totalItems","hasFirstPageCompleted","CompanyWidgetItem","analyticsData","id","data","name","analyticsOptions","location","actionType","entity","descriptor","CoverPill","coverUrl","logo","url","CompanyResult","Col","sm","md","useLargeStyle","lg","item","getChildAppLink","appLinks","getCompanyAppLink","getChildAppLinkOptions","getCompanyAppLinkOptions","itemIndex","search","query","queryParams","score","_score","maxScore","_maxScore","featured","_featured","pagePositionIndex","isLarge","namespace","ExchangeVideoGroup","limit","showCount","currentAppLink","currentParams","params","currentSource","source","Array","isArray","searchAppLink","AppLink","appLink","Text","phrase","searchSettings","videos","slice","map","v","i","VideoItem","video","yearGroups","getVideoAppLink","getSubTextAppLink","presentationAudiences","audiences","setFavourite","canFavourite","companyLogoFallbackUrl","subTextType","hasPermissions","getClassroomGuideAppLink","getResourceGuidanceAppLink","getInteractiveGuidanceAppLink","isPlugin","FeaturedVideoResult","HeroVideo","opts","subTextAppLink","hideInteractiveBadge","showVideoGuidance","VideoHelper","imageCdnUrl","PlaylistWithVideos","breakpoints","maxVideos","useBreakpoints","xl","xxl","playlist","playlistAnalyticsOption","playlistAnalyticsData","Row","xs","playlistAppLink","bgColourClassNames","itemStyle","currentUser","showOwner","videoAnalyticsData","videoId","videoName","hideVideoGuidance","LargePlaylistResult","getPlaylistAppLink","preloadImage","SeriesWithVideos","series","seriesAnalyticsOption","seriesAnalyticsData","seriesAppLink","SeriesTallPoster","imageClass","LargeSeriesResult","getSeriesAppLink","CollectionVideoList","analyticsProps","hasSeasonEpisode","episodeNumber","season","collectionId","CollectionThumbnail","isSmall","VideoListHelper","hasVideos","collection","length","firstVideoWithThumbnail","find","thumbnail","isSeries","collectionType","BaseImage","imageType","Mask","type","maskType","ImageFallback","imageFallbackType","Actions","actions","getCollectionActions","showActions","actionsDropdownClassName","hideBadges","BadgeListContainer","Badge","rating","metadata","year","SmallPlaylistResult","SmallSeriesResult","SubjectResult","getClassificationAppLink","getClassificationAppLinkOptions","availablePresentations","highlightOnHover","hasTopicDirectories","VideoResult","Component","ClipItem","InteractiveItem","getPreviewQuestionsAppLink","MixedSearchResults","useSmallComponent","results","topics","totalResults","companies","companiesAndTopics","childProps","c","toLowerCase","result","index","isExchangeVideoGroup","tallPoster","SearchSubstitute","substitute","getAppLink","appLinkOptions","replace","allowSubstitute","SearchSuggestions","suggestions","suggestion","formatSearchResponse","filter","_index","clips","interactives","resultMaxScore","SharedSearchHelper","SharedSearchRequests","searchV4","indicesArr","filters","Object","keys","filterName","join","FilterConstants","excludeLibraryExclusive","isLearner","genericFilters","searchType","indices","entries","reduce","prev","value","undefined","publicUrl","HttpVerbs","formatData","success","error","assign","UrlHelper","tagsAndClassifications","normalize","TEACHER_FILTERS","STUDENT_FILTERS","useFetchSearchData","UserRequests","userDetails","config","ConfigRequests","isAuthenticated","CustomerRequests","customerId","products","settings","useSettings","streamableLibrary","LibraryRequests","streamableLibraryId","objectId","showExchangeSearchResults","hasProduct","ProductId","librariesRequest","libraries","exchangeLibraryIndex","findIndex","l","MasterObjectTypes","exchangeLibraryId","streamableIndex","hasLibrariesCompleted","hasCompleted","useGetLibraries","usePresentation","activePresentation","getFallbackPresentation","hasPresentationsLoaded","currentPresentation","currentPresentationId","curriculums","useCurriculums","usePresentationAudiences","schoolLevels","presentation","usePermissions","PermissionName","presentationIds","o","SearchRequests","useFetchSchoolLevels","schoolLevelIds","availableTopics","ClassificationRequests","ratings","RatingRequests","countryCode","TopicsHelper","learningLevel","PresentationLearningLevel","code","useGetRatings","hasLocalPermissions","canViewCurriculums","canUseSeriesActions","hasCustomLibraries","hasMoviesAndTv","presentationId","isStudent","rawFilters","FilterHelper","ObjectHelper","ClassificationType","ClassificationStatus","moviesAndTv","CurationTag","presentationMap","acc","hasFilteredOutTopics","includes","shouldFetch","sortedResults","sort","a","b","presentationA","presentationB","useSearchTopics","availablePresentationIds","p","hasFilteredOutCompanies","useSearchCompanies","moviesAndTvDashboard","targetType","dashboard","hasDataLoaded","isLoadingProducts","isLoadingSettings","useGetSearchResults","appliedIndices","backendFilters","alerts","fetch","searchResultsResponse","getSearchRequest","hasExchangeLibraryFilter","libraryId","some","hasLibraryFilter","fetchMixedExchangeResults","mixedExchangeSearchResults","excludeLibraryFilter","searchResults","pageNumber","httpStatus","r","useVideoMixin","groupingType","exchangeIndex","exchangeShowCount","mixedExchangeResults","exchangeResults","consecutive","forEach","typeId","MasterType","push","exchangeVideoGroup","splice","useGroupExchangeResults","substituteQuery","SearchResultsEmptyState","imageUrl","scotland","trim","ImageUrls","EmptyState","src","application","action","SearchResultsView","videoActions","useVideoActions","useLiteFavourites","u","usePluginHelper","searchData","searchFilters","hasIndices","inaccessibleIndices","useSetPageMetadata","PageMetadataHelper","title","phraseContext","phraseHandler","titlePhrase","descriptionPhrase","allowIndexing","showMask","setShowMask","hasLoaded","hasSearchCompleted","hasResults","SearchFilters","mainFilters","moreFilters","isFetchingOptions","VideoActionsContext","description","redirectOnError","objects","hydratedVideos","Set","getValidObjects","videoIds","setRequest","unhydratedVideos","current","has","add","newRequests","flightNamespace"],"sourceRoot":""}
1
+ {"version":3,"file":"scripts/3969-0873dcdef1-lite.chunk.js","mappings":"+LACA,SAA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M,YAAoBA,IAAM,WAAmBA,GAAG,IAEnF,GARE,EASX,CAeiB6H,CAAgBH,GAEzBI,EAAWlV,EAAOE,KAAI,SAAAC,GAAC,OAAIA,EAAExD,EAAE,IAE+B,G,EAApC,WAAiC,I,EAAG,E,unBAA5D5B,EAAO,KAAEoa,EAAU,KAE3B,aAAgB,WACd,IAAKD,aAAQ,EAARA,EAAU1Q,SAAW7B,EAAYyJ,aAAtC,CAGA,IAAMgJ,EAA6B,GAEnCF,EAASnD,SAAQ,SAAApV,GACVoY,EAAeM,QAAQC,IAAI3Y,KAC9ByY,EAAiBlD,KAAKvV,GACtBoY,EAAeM,QAAQE,IAAI5Y,GAE/B,IAEKyY,EAAiB5Q,QAGtB2Q,GAAW,SAAA5D,G,MACHiE,EAAc,GAAH,O,yWAAA,CACZjE,GAAC,CACJ,qBAA+B6D,EAAkB7a,EAAQkb,mBAM3D,OAHoB,QAAhB,EAAA9S,EAAY/F,YAAI,eAAEkO,kBACpB0K,EAAYtD,KAAK,uBAA0CkD,EAAkB,KAAM7a,EAAQkb,kBAEtFD,CACT,GAxBQ,CAyBV,GAAG,CAAEN,aAAQ,EAARA,EAAU1Q,OAAQ7B,EAAYyJ,eAEnC,qBAAwBrR,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/widgets/widget-button/widget-button.scss","file:///app/packages/libs/shared/src/components/widgets/widget-button/WidgetButton.tsx","file:///app/packages/libs/shared/src/hooks/UseInfiniteScroll.ts","file:///app/packages/libs/shared/src/hooks/UseInfiniteList.ts","file:///app/packages/libs/shared/src/components/widgets/items/subject-widget-item/CompanyWidgetItem.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/CompanyResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/mixed-search-results.scss","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/exchange-video-group/ExchangeVideoGroup.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/FeaturedVideoResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/playlist-with-videos/playlist-with-videos.scss","file:///app/packages/libs/shared/src/apps/search/components/playlist-with-videos/PlaylistWithVideos.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/LargePlaylistResults.tsx","file:///app/packages/libs/shared/src/apps/search/components/series-with-videos/series-with-videos.scss","file:///app/packages/libs/shared/src/apps/search/components/series-with-videos/SeriesWithVideos.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/LargeSeriesResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/collection-video-list/CollectionVideoList.tsx","file:///app/packages/libs/shared/src/apps/search/components/collection-thumbnail/collection-thumbnail.scss","file:///app/packages/libs/shared/src/apps/search/components/collection-thumbnail/CollectionThumbnail.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/SmallPlaylistResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/SmallSeriesResults.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/SubjectResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/components/VideoResult.tsx","file:///app/packages/libs/shared/src/apps/search/components/mixed-search-results/MixedSearchResults.tsx","file:///app/packages/libs/shared/src/apps/search/components/search-substitute/SearchSubstitute.tsx","file:///app/packages/libs/shared/src/apps/search/components/search-suggestions/SearchSuggestions.tsx","file:///app/packages/libs/shared/src/apps/search/flight-requests/SharedSearchRequests.ts","file:///app/packages/projects/lite/src/apps/search/hooks/useSearchTopics.ts","file:///app/packages/projects/lite/src/apps/search/hooks/useFetchSearchData.tsx","file:///app/packages/projects/lite/src/apps/search/hooks/useFetchSchoolLevels.ts","file:///app/packages/projects/lite/src/apps/search/hooks/useSearchCompanies.ts","file:///app/packages/projects/lite/src/apps/search/hooks/useGetSearchResults.tsx","file:///app/packages/projects/lite/src/apps/search/hooks/useGroupExchangeResults.ts","file:///app/packages/projects/lite/src/apps/search/views/search-results/empty-state/SearchResultsEmptyState.tsx","file:///app/packages/projects/lite/src/apps/search/views/search-results/SearchResultsView.tsx","file:///app/packages/projects/lite/src/apps/search/hooks/useGetTagsAndClassifications.tsx","file:///app/packages/projects/lite/src/apps/search/hooks/useSearchMask.tsx","file:///app/packages/projects/lite/src/shared/flight-requests/RatingRequests.ts","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 {\"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 { LanguageService } from 'libs/common/backbone/services/LanguageService';\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\nconst namespace = 'shared.widgetButton';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport enum WidgetButtonDirection {\n Left,\n Right\n}\n\ninterface WidgetButtonProps {\n onClick: (event: React.MouseEvent<HTMLButtonElement, 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 <button\n onClick={props.onClick}\n className={`${styles.extendedClickableArea} ${isLeft ? styles.left : styles.right}`}\n tabIndex={-1}\n />\n )}\n\n <button\n className={`${getPositionClass()} ${styles.button} ${props.className || ''}`}\n onClick={props.onClick}\n aria-label={isLeft ? getPhrase('previous') : getPhrase('next')}\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 </button>\n </div>\n );\n});","import { useEffect } from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\n\nconst SCROLL_TOLERANCE = 400; // value in px\n\ninterface UseInfiniteScrollOptions {\n fetchNextPage: () => void;\n hasMore: boolean;\n isFetching: boolean;\n scrollContainer?: HTMLElement;\n}\n\nexport function useInfiniteScroll(options: UseInfiniteScrollOptions): void {\n const handleScroll = (): void => {\n if (options.isFetching)\n return;\n\n if (!options.scrollContainer) {\n const currentScrollHeight = window.innerHeight + document.documentElement.scrollTop;\n \n const totalHeight = document.documentElement.scrollHeight - SCROLL_TOLERANCE;\n \n if (currentScrollHeight < totalHeight)\n return;\n } else {\n const { scrollContainer } = options;\n const currentScrollHeight = scrollContainer.getBoundingClientRect().height + scrollContainer.scrollTop;\n \n const totalHeight = scrollContainer.scrollHeight - SCROLL_TOLERANCE;\n \n if (currentScrollHeight < totalHeight)\n return;\n }\n\n options.fetchNextPage();\n };\n\n useEffect(() => {\n const onScroll = FunctionHelper.throttle(handleScroll, 200);\n\n const scrollContainer = options.scrollContainer || window;\n\n if (options.hasMore)\n scrollContainer.addEventListener('scroll', onScroll);\n\n return () => scrollContainer.removeEventListener('scroll', onScroll);\n }, [ options.hasMore, options.fetchNextPage, options.scrollContainer ]);\n}","import { useEffect, useState } from 'react';\n\nimport { HttpStatus, HttpStatusClass } from 'libs/common/backbone/enums/HttpStatus';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Flight } from 'libs/common/flight';\n\nimport { BaseObject, BasePaginatedCollection } from 'libs/shared/interfaces';\n\nimport { useInfiniteScroll } from './UseInfiniteScroll';\nimport { useSelectAllPages } from './UseSelectAllPages';\n\nexport interface UseInfiniteListResult<T extends BaseObject> {\n items: T[];\n hasMore: boolean;\n isFetching: boolean;\n nextCursor: string;\n totalItems?: number;\n hasFirstPageCompleted: boolean;\n}\n\n/**\n * Hook to extract an infinite list from the application state,\n * save it locally in state and only update when new data\n * is fetched.\n * \n * @param getRequest - callback function to get the request for each page.\n * Can be false if the request requires data that hasn't yet been fetched - e.g. user id.\n * \n * @param fetchNext - callback function to fetch a page.\n * Can be false if the request requires data that hasn't yet been fetched - e.g. user id.\n */\nexport function useInfiniteList<TObject = BaseObject, TResponse = BasePaginatedCollection<TObject>>(\n getRequest: ((cursor?: string) => Flight.Request) | false,\n fetchNext: ((cursor?: string) => void) | false,\n onError?: (pageNumber: number, statusCode: HttpStatus) => void,\n getItems?: (responseData: TResponse) => TObject[],\n getCursor?: (responseData: TResponse) => string,\n scrollContainer?: HTMLElement\n): UseInfiniteListResult<TObject> {\n const [ pagesFetched, setPagesFetched ] = useState(0);\n\n const fetchNextFn = fetchNext as (cursor?: string) => void;\n\n function getKey(cursor?: string): string {\n if (!getRequest)\n return null;\n\n const request = getRequest(cursor);\n\n if (!request)\n return null;\n\n return request.key;\n }\n\n const response = useSelectAllPages<TObject, TResponse>(\n getKey,\n getItems,\n getCursor\n );\n\n function fetchNextPage(): void {\n if (!fetchNext || !getRequest || !response)\n return;\n\n setPagesFetched(currentVal => currentVal + 1);\n return fetchNextFn(response.nextCursor);\n }\n\n useInfiniteScroll({\n fetchNextPage,\n hasMore: !!response?.nextCursor,\n isFetching: response?.isFetching,\n scrollContainer\n });\n\n useEffect(() => {\n if (!response)\n return;\n\n if (response.shouldInitialFetch && fetchNext) {\n fetchNextFn();\n setPagesFetched(currentVal => currentVal + 1);\n }\n }, [ response?.shouldInitialFetch, fetchNext ]);\n\n useEffect(() => {\n if (!response?.statusCode || !FunctionHelper.isFunction(onError))\n return;\n\n const httpStatusClass: HttpStatusClass = +(response.statusCode?.toString()?.substr(0, 1));\n\n if (httpStatusClass !== HttpStatusClass.ClientError && httpStatusClass !== HttpStatusClass.ServerError)\n return;\n\n onError(pagesFetched, response.statusCode);\n }, [response?.statusCode]);\n\n return {\n items: response?.items,\n hasMore: !!response?.nextCursor,\n nextCursor: response?.nextCursor,\n isFetching: response?.isFetching,\n totalItems: response?.totalItems,\n hasFirstPageCompleted: response?.hasFirstPageCompleted\n };\n}","import * as React from 'react';\n\nimport { ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { CoverPillWidgetContentWrapper, CoverPillWidgetItemProps } from 'libs/shared/components/widgets/items/subject-widget-item/CoverPill';\nimport { Company } from 'libs/shared/interfaces';\n\nexport function CompanyWidgetItem(props: CoverPillWidgetItemProps<Company>): JSX.Element {\n const analyticsData = {\n ...props.analyticsData,\n id: props.data?.id,\n name: props.data?.name\n };\n\n const analyticsOptions = {\n location: LocationContext.ClassificationListItem,\n ...props.analyticsOptions,\n actionType: UserAction.Click,\n entity: EntityType.Company,\n descriptor: ClickDescriptor.Cover\n };\n\n return (\n <CoverPillWidgetContentWrapper\n {...props}\n analyticsData={analyticsData}\n analyticsOptions={analyticsOptions}\n coverUrl={props.data.logo?.url}\n />\n );\n}","import React from 'react';\nimport { Col } from 'react-bootstrap';\n\nimport { CompanyWidgetItem } from 'libs/shared/components/widgets/items/subject-widget-item/CompanyWidgetItem';\nimport { Company } from 'libs/shared/interfaces';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nexport function CompanyResult(props: MixedSearchResultItemProps<Company>): JSX.Element {\n return (\n <Col as='li' sm={6} md={props.useLargeStyle ? 6 : 4} lg={props.useLargeStyle ? 4 : 3}>\n <div className={`position-relative px-1 mb-2`}>\n <CompanyWidgetItem\n data={props.item}\n getChildAppLink={props.appLinks.getCompanyAppLink}\n getChildAppLinkOptions={() => props.appLinks.getCompanyAppLinkOptions?.(props.item)}\n analyticsData={{\n itemIndex: props.itemIndex,\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: 0\n }}\n isLarge={props.useLargeStyle}\n />\n </div>\n </Col>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"videoList\":\"ZhLPS\"};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { ClickDescriptor, EntityType, HashObject, LocationContext, SearchSourceDescriptor, UserAction } from 'libs/analytics/interfaces';\n\nimport { SourceFilterOptions } from 'libs/shared/apps/search/interfaces';\nimport { ExchangeVideoGroup } from 'libs/shared/apps/search/interfaces/SearchResults';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoItem } from 'libs/shared/components/video-list/video-item/VideoItem';\n\nimport { MixedSearchResultItemProps } from './../MixedSearchResultItemProps';\n\nimport styles from '../../mixed-search-results.scss';\n\nconst namespace = 'search.exchangeVideoGroup';\n\nconst EXCHANGE_RESULT_DISPLAY_LIMIT = 3;\n\nexport function ExchangeVideoGroup(props: MixedSearchResultItemProps<ExchangeVideoGroup>): JSX.Element {\n const limit = props.item.showCount >= EXCHANGE_RESULT_DISPLAY_LIMIT\n ? EXCHANGE_RESULT_DISPLAY_LIMIT\n : props.item.showCount;\n\n function getContainerClassName(): string {\n if (props.pagePositionIndex === 0)\n return 'border-bottom pb-1 mb-3';\n\n return 'border-top border-bottom pt-3 mt-2 pb-1 mb-3';\n }\n\n const currentAppLink = Core.AppLinkHelper.getCurrentAppLink();\n const currentParams = (currentAppLink.params as HashObject) ?? {};\n let currentSource = currentParams?.source ?? [];\n\n if (currentSource && !Array.isArray(currentSource))\n currentSource = [currentSource];\n\n const searchAppLink = {\n ...currentAppLink,\n params: {\n ...currentParams,\n source: [ ...(currentSource), SourceFilterOptions.ExchangeArchive ]\n }\n };\n\n const analyticsData = {\n query: props.queryParams.query,\n itemIndex: props.itemIndex,\n pagePositionIndex: props.pagePositionIndex\n };\n const analyticsOptions = {\n entity: EntityType.SearchResults,\n location: LocationContext.ExchangeSearchGroupItem,\n actionType: UserAction.Click,\n descriptor: SearchSourceDescriptor.ExchangeArchive\n };\n\n return (\n <div className={getContainerClassName()}>\n <AppLink\n appLink={searchAppLink}\n analyticsData={analyticsData}\n analyticsOptions={analyticsOptions}\n >\n <h2 className='h4'>\n <Text namespace={namespace} phrase='heading' />\n </h2>\n </AppLink>\n <p>\n <Text namespace={namespace} phrase='message' />\n &nbsp;\n <AppLink\n appLink={props.appLinks.searchSettings}\n className='text-info'\n analyticsData={analyticsData}\n analyticsOptions={{\n ...analyticsOptions,\n descriptor: ClickDescriptor.Settings\n }}\n >\n <Text namespace={namespace} phrase='searchSettings' />\n </AppLink>\n .\n </p>\n\n <div className={`position-relative ${styles.videoList}`}>\n {props.item.videos.slice(0, limit).map((v, i) => {\n return (\n <VideoItem\n key={i}\n video={v}\n yearGroups={props.yearGroups}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getSubTextAppLink={props.appLinks.getSubTextAppLink}\n presentationAudiences={props.audiences}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n analyticsData= {{\n search: {\n query: props.queryParams.query,\n score: v._score,\n maxScore: v._maxScore,\n featured: v._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n getClassroomGuideAppLink={props.appLinks.getClassroomGuideAppLink}\n getResourceGuidanceAppLink={props.appLinks.getResourceGuidanceAppLink}\n getInteractiveGuidanceAppLink={props.appLinks.getInteractiveGuidanceAppLink}\n isPlugin={props.isPlugin}\n />\n );\n })}\n </div>\n <div className='text-center py-2'>\n <AppLink\n className='text-secondary'\n appLink={searchAppLink}\n analyticsData={analyticsData}\n analyticsOptions={analyticsOptions}\n >\n <Text namespace={namespace} phrase='seeMore' />\n </AppLink>\n </div>\n </div>\n );\n}","import React from 'react';\n\nimport { HeroVideo } from 'libs/shared/apps/subjects/components/hero-video/HeroVideo';\nimport { Video } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nexport function FeaturedVideoResult(props: MixedSearchResultItemProps<Video>): JSX.Element {\n return (\n <div className='pb-3'>\n <HeroVideo\n video={props.item}\n presentationAudiences={props.audiences}\n getVideoAppLink={(v, opts) => props.appLinks.getVideoAppLink(v, opts)}\n subTextAppLink={props.appLinks.getSubTextAppLink(props.item)}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n analyticsData={{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n hideInteractiveBadge\n yearGroups={props.yearGroups}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n showVideoGuidance={VideoHelper.showVideoGuidance(props.hasPermissions)}\n imageCdnUrl={props.imageCdnUrl}\n isPlugin={props.isPlugin}\n getInteractiveGuidanceAppLink={props.appLinks.getInteractiveGuidanceAppLink}\n getResourceGuidanceAppLink={props.appLinks.getResourceGuidanceAppLink}\n getClassroomGuideAppLink={props.appLinks.getClassroomGuideAppLink}\n />\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"videoList\":\"eEZEe\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { PlaylistItem } from 'libs/shared/apps/playlists/components/playlist-list';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoItem } from 'libs/shared/components/video-list/video-item/VideoItem';\nimport { VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { BG_COLOUR_CLASS_NAMES } from 'libs/shared/constants/ColourClassNames';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { CurrentUser, Playlist, PresentationAudience, Video, YearGroup } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\n\nimport styles from './playlist-with-videos.scss';\n\nconst namespace = 'search.playlistWithVideos';\n\nfunction useGetMaxVideos(): number {\n const breakpoints = useBreakpoints();\n\n if (breakpoints.xl || breakpoints.xxl)\n return 3;\n \n return 2;\n}\n\ninterface PlaylistWithVideoProps {\n playlist: Playlist;\n yearGroups: YearGroup[];\n playlistAppLink: Core.AppLink;\n presentationAudiences: PresentationAudience[];\n preloadImage: boolean;\n analyticsData: HashObject;\n imageCdnUrl: string;\n currentUser: CurrentUser;\n getSubTextAppLink: (video: Video) => Core.AppLink;\n getVideoAppLink: (video: Video, opts: GetVideoAppLinkOptions) => Core.AppLink;\n companyLogoFallbackUrl?: string;\n subTextType?: VideoSubTextType;\n hasPermissions: HasPermissionsFunc;\n isPlugin: boolean;\n}\n\nexport function PlaylistWithVideos(props: PlaylistWithVideoProps): JSX.Element {\n const maxVideos = useGetMaxVideos();\n\n const videos = props.playlist.videos.data.slice(0, maxVideos);\n\n const playlistAnalyticsOption: AnalyticsOptions = {\n actionType: UserAction.Click,\n entity: EntityType.Playlist,\n location: LocationContext.PlaylistWithVideos\n };\n\n const playlistAnalyticsData: HashObject = {\n ...props.analyticsData,\n id: props.playlist.id,\n name: props.playlist.name\n };\n\n return (\n <div className='ps-2 py-2'>\n <Row className='g-0 border border-light rounded-3'>\n <Col xs={4} lg={3} className='pe-3'>\n <PlaylistItem\n appLink={props.playlistAppLink}\n analyticsData={props.analyticsData}\n analyticsOptions={{\n ...playlistAnalyticsOption,\n descriptor: ClickDescriptor.Cover\n }}\n data={props.playlist}\n presentationAudiences={props.presentationAudiences}\n bgColourClassNames={BG_COLOUR_CLASS_NAMES}\n itemStyle='round-left'\n imageCdnUrl={props.imageCdnUrl}\n currentUser={props.currentUser}\n showCount={false}\n showOwner\n />\n </Col>\n <Col xs={8} lg={9}>\n <div className='d-flex justify-content-between'>\n <div className={`pt-3 mb-n2 ${styles.videoList}`}>\n {videos?.map(video => {\n const videoAnalyticsData: HashObject = {\n ...playlistAnalyticsData,\n videoId: video.id,\n videoName: video.name\n };\n\n return (\n <div key={video.id} className='mb-2'>\n <VideoItem\n video={video}\n getSubTextAppLink={props.getSubTextAppLink}\n canFavourite={() => false}\n setFavourite={null}\n getVideoAppLink={props.getVideoAppLink}\n analyticsData={videoAnalyticsData}\n analyticsOptions={{\n entity: EntityType.Video,\n location: LocationContext.PlaylistWithVideos\n }}\n size='sm'\n yearGroups={props.yearGroups}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n isPlugin={props.isPlugin}\n hideVideoGuidance\n />\n </div>\n );\n })}\n </div>\n <div className='text-end pt-3 pe-3'>\n <AppLink\n className='info-link fw-semibold'\n appLink={props.playlistAppLink}\n analyticsData={playlistAnalyticsData}\n analyticsOptions={{\n ...playlistAnalyticsOption,\n descriptor: ClickDescriptor.Link\n }}\n >\n <Text namespace={namespace} phrase='seeAllVideos' />\n </AppLink>\n </div>\n </div>\n </Col>\n </Row>\n </div>\n );\n}","import React from 'react';\n\nimport { Playlist } from 'libs/shared/interfaces';\n\nimport { PlaylistWithVideos } from '../../playlist-with-videos/PlaylistWithVideos';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nexport function LargePlaylistResult(props: MixedSearchResultItemProps<Playlist>): JSX.Element {\n return (\n <div className='mx-n2'>\n <PlaylistWithVideos\n playlist={props.item}\n yearGroups={props.yearGroups}\n playlistAppLink={props.appLinks.getPlaylistAppLink(props.item)}\n presentationAudiences={props.audiences}\n analyticsData={{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n imageCdnUrl={props.imageCdnUrl}\n currentUser={props.currentUser}\n preloadImage\n getSubTextAppLink={props.appLinks.getSubTextAppLink}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n isPlugin={props.isPlugin}\n />\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"videoList\":\"UT8bc\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SeriesTallPoster } from 'libs/shared/components/series-tall-poster/SeriesTallPoster';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoItem } from 'libs/shared/components/video-list/video-item/VideoItem';\nimport { VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { PresentationAudience, Series, Video, YearGroup } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\n\nimport styles from './series-with-videos.scss';\n\nconst namespace = 'search.seriesWithVideos';\n\nfunction useGetMaxVideos(): number {\n const breakpoints = useBreakpoints();\n\n if (breakpoints.xl || breakpoints.xxl)\n return 5;\n \n if (breakpoints.lg || breakpoints.md)\n return 4;\n\n return 3;\n}\n\ninterface SeriesWithVideoProps {\n series: Series;\n yearGroups: YearGroup[];\n seriesAppLink: Core.AppLink;\n subTextAppLink: (video: Video) => Core.AppLink;\n presentationAudiences: PresentationAudience[];\n preloadImage: boolean;\n analyticsData: HashObject;\n getVideoAppLink: (video: Video, opts: GetVideoAppLinkOptions) => Core.AppLink;\n companyLogoFallbackUrl?: string;\n subTextType?: VideoSubTextType;\n hasPermissions: HasPermissionsFunc;\n isPlugin: boolean;\n}\n\nexport function SeriesWithVideos(props: SeriesWithVideoProps): JSX.Element {\n const maxVideos = useGetMaxVideos();\n\n const videos = props.series.videos.data.slice(0, maxVideos);\n\n const seriesAnalyticsOption: AnalyticsOptions = {\n actionType: UserAction.Click,\n entity: EntityType.Series,\n location: LocationContext.SeriesWithVideos\n };\n\n const seriesAnalyticsData: HashObject = {\n ...props.analyticsData,\n id: props.series.id,\n name: props.series.name\n };\n\n return (\n <div className='ps-2 py-2'>\n <Row className='g-0 border border-light rounded-3'>\n <Col xs={4} lg={3} className='pe-3'>\n <AppLink\n appLink={props.seriesAppLink}\n className='position-relative'\n analyticsData={seriesAnalyticsData}\n analyticsOptions={{\n ...seriesAnalyticsOption,\n descriptor: ClickDescriptor.TallPoster\n }}\n >\n <SeriesTallPoster\n series={props.series}\n presentationAudiences={props.presentationAudiences}\n preloadImage={props.preloadImage}\n imageClass='rounded-start-lg'\n />\n </AppLink>\n </Col>\n <Col xs={8} lg={9}>\n <div className='d-flex justify-content-between'>\n <div className={`pt-3 mb-n2 ${styles.videoList}`}>\n {videos?.map(video => {\n const videoAnalyticsData: HashObject = {\n ...seriesAnalyticsData,\n videoId: video.id,\n videoName: video.name\n };\n\n // insert parent series into video object\n video = {\n ...video,\n series: props.series\n };\n\n return (\n <div key={video.id} className='mb-2'>\n <VideoItem\n video={video}\n getSubTextAppLink={props.subTextAppLink}\n canFavourite={() => false}\n setFavourite={null}\n getVideoAppLink={props.getVideoAppLink}\n analyticsData={videoAnalyticsData}\n analyticsOptions={{\n entity: EntityType.Video,\n location: LocationContext.SeriesWithVideos\n }}\n size='sm'\n yearGroups={props.yearGroups}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n isPlugin={props.isPlugin}\n hideVideoGuidance\n />\n </div>\n );\n })}\n </div>\n <div className='text-end pt-3 pe-3'>\n <AppLink\n className='info-link fw-semibold'\n appLink={props.seriesAppLink}\n analyticsData={seriesAnalyticsData}\n analyticsOptions={{\n ...seriesAnalyticsOption,\n descriptor: ClickDescriptor.Link\n }}\n >\n <Text namespace={namespace} phrase='seeAllVideos' />\n </AppLink>\n </div>\n </div>\n </Col>\n </Row>\n </div>\n );\n}","import React from 'react';\n\nimport { Series } from 'libs/shared/interfaces';\n\nimport { SeriesWithVideos } from '../../series-with-videos/SeriesWithVideos';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nexport function LargeSeriesResult(props: MixedSearchResultItemProps<Series>): JSX.Element {\n return (\n <div className='mx-n2'>\n <SeriesWithVideos\n yearGroups={props.yearGroups}\n presentationAudiences={props.audiences}\n series={props.item}\n seriesAppLink={props.appLinks.getSeriesAppLink(props.item)}\n subTextAppLink={props.appLinks.getSubTextAppLink}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n analyticsData={{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n preloadImage\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n isPlugin={props.isPlugin}\n />\n </div>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AnalyticsOptions, HashObject } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { SeasonEpisode } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { Video } from 'libs/shared/interfaces';\n\nconst namespace = 'search.collectionVideoList';\n\ninterface CollectionVideoListProps {\n videos: Video[];\n collectionId: string;\n appLink: Core.AppLink;\n analyticsOptions: AnalyticsOptions;\n analyticsData?: HashObject;\n getVideoAppLink: (video: Video) => Core.AppLink;\n}\n\nfunction useGetMaxVideos(): number {\n const breakpoints = useBreakpoints();\n\n if (breakpoints.xs)\n return 2;\n\n if (breakpoints.sm)\n return 1;\n\n return 3;\n}\n\nexport function CollectionVideoList(props: CollectionVideoListProps): JSX.Element {\n const maxVideos = useGetMaxVideos();\n\n const analyticsProps = {\n analyticsData: props.analyticsData,\n analyticsOptions: props.analyticsOptions\n };\n\n return (\n <>\n <ul className='list-unstyled my-1'>\n {props.videos.slice(0, maxVideos).map(v => {\n const hasSeasonEpisode = !!v.episodeNumber && !!v.season?.id;\n\n return (\n <li key={`${props.collectionId}:${v.id}`} className='d-flex align-items-center'>\n <AppLink\n {...analyticsProps}\n className='clamp-1'\n appLink={props.getVideoAppLink(v)}\n >\n {hasSeasonEpisode && <><SeasonEpisode video={v} />&nbsp;</>}\n {v.name}\n </AppLink>\n </li>\n );\n })}\n </ul>\n\n <AppLink\n {...analyticsProps}\n className='info-link'\n appLink={props.appLink}\n >\n <Text namespace={namespace} phrase='seeAll' />\n </AppLink>\n </>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"overlayContainer\":\"MnBcv\",\"overlay\":\"AZSmh\"};","import React from 'react';\nimport { Col } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor } from 'libs/analytics/interfaces';\n\nimport { CollectionVideoList } from 'libs/shared/apps/search/components/collection-video-list/CollectionVideoList';\nimport { ActionOptions, Actions as ActionsComponent } from 'libs/shared/components/actions/Actions';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { BadgeListContainer } from 'libs/shared/components/badges/BadgeListContainer';\nimport { BaseImage } from 'libs/shared/components/image/BaseImage';\nimport { ImageFallback, ImageFallbackType } from 'libs/shared/components/image/ImageFallback';\nimport { Mask, MaskType } from 'libs/shared/components/mask/Mask';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { ImageType } from 'libs/shared/enums/Images';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { Playlist, Series, Video } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\n\nimport styles from './collection-thumbnail.scss';\n\nconst namespace = 'search.collectionThumbnail';\n\n\nexport type GetCollectionActions = (\n collection: Collection,\n showActions: boolean,\n collectionType: CollectionType,\n baseAnalyticsOptions: AnalyticsOptions\n) => ActionOptions[]\n\ntype Collection = Series | Playlist;\ntype CollectionType = 'series' | 'playlist';\n\ninterface CollectionThumbnailProps {\n collection: Collection;\n collectionType: CollectionType;\n appLink: Core.AppLink;\n showActions: boolean;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n maskType?: MaskType;\n imageFallbackType?: ImageFallbackType;\n hideBadges?: boolean;\n isPlugin: boolean;\n getCollectionActions: GetCollectionActions;\n getVideoAppLink: (video: Video, opts?: GetVideoAppLinkOptions) => Core.AppLink;\n}\n\nexport function CollectionThumbnail(props: CollectionThumbnailProps): JSX.Element {\n const breakpoints = useBreakpoints();\n const size = VideoListHelper.getSize(breakpoints, 'md');\n const isSmall = size === 'sm';\n\n const hasVideos = !!props.collection.videos?.data?.length;\n\n const firstVideoWithThumbnail = hasVideos && props.collection.videos.data.find(v => !!v.thumbnail?.url);\n\n function getAnalyticsData(): HashObject {\n const data: HashObject = {\n ...props.analyticsData,\n id: props.collection.id,\n name: props.collection.name\n };\n\n if (firstVideoWithThumbnail) {\n data.videoId = firstVideoWithThumbnail.id;\n data.videoName = firstVideoWithThumbnail.name;\n }\n\n return data;\n }\n\n const analyticsData = getAnalyticsData();\n const isSeries = props.collectionType === 'series';\n\n return (\n <div className={`row g-0 ${isSmall ? '' : 'py-2'}`}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-2` : 'mb-1 px-2'}`}>\n <div className={`position-relative overflow-hidden ${isSmall ? 'rounded' : 'rounded-3'}`}>\n <BaseImage\n data={firstVideoWithThumbnail?.thumbnail}\n appLink={props.appLink}\n imageType={ImageType.Thumbnails}\n analyticsData={analyticsData}\n analyticsOptions={{\n ...props.analyticsOptions,\n descriptor: ClickDescriptor.Thumbnail\n }}\n >\n <Mask type={props.maskType} />\n <ImageFallback type={props.imageFallbackType} />\n \n <div className={`d-flex flex-column align-items-center justify-content-center text-white h-100 ${styles.overlay}`}>\n <Text namespace={namespace} phrase='seeAll' />\n </div>\n </BaseImage>\n </div>\n </Col>\n\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n {!props.isPlugin &&\n <ActionsComponent\n actions={props.getCollectionActions(\n props.collection,\n props.showActions,\n props.collectionType,\n props.analyticsOptions\n )}\n className='float-end mt-n1'\n actionsDropdownClassName='btn btn-link ms-1'\n />\n }\n\n <AppLink\n appLink={props.appLink}\n analyticsData={analyticsData}\n analyticsOptions={{\n ...props.analyticsOptions,\n descriptor: ClickDescriptor.Title\n }}\n >\n <h5 className='m-0 mb-1'><span className='clamp-1'>{props.collection.name}</span></h5>\n </AppLink>\n\n {isSeries && !props.hideBadges && (\n <BadgeListContainer>\n <Badge type={BadgeType.Rating} data={(props.collection as Series).rating} />\n <Badge type={BadgeType.ProductionYear} data={(props.collection as Series).metadata?.year} />\n </BadgeListContainer>\n )}\n \n {hasVideos && (\n <CollectionVideoList\n collectionId={props.collection.id}\n videos={props.collection.videos.data}\n appLink={props.appLink}\n analyticsData={analyticsData}\n analyticsOptions={{\n ...props.analyticsOptions,\n descriptor: ClickDescriptor.Link\n }}\n getVideoAppLink={props.getVideoAppLink}\n />\n )}\n </Col>\n </div>\n );\n}","import React from 'react';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { ImageFallbackType } from 'libs/shared/components/image/ImageFallback';\nimport { MaskType } from 'libs/shared/components/mask/Mask';\nimport { Playlist } from 'libs/shared/interfaces';\n\nimport { CollectionThumbnail } from '../../collection-thumbnail/CollectionThumbnail';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nimport styles from '../mixed-search-results.scss';\n\nexport function SmallPlaylistResult(props: MixedSearchResultItemProps<Playlist>): JSX.Element {\n return (\n <div className={`position-relative ${styles.videoList}`}>\n <CollectionThumbnail\n analyticsData={{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n analyticsOptions={{\n entity: EntityType.Playlist,\n actionType: UserAction.Click,\n location: LocationContext.PlaylistListItem\n }}\n appLink={props.appLinks.getPlaylistAppLink(props.item)}\n showActions={props.showActions}\n collection={props.item}\n collectionType='playlist'\n maskType={MaskType.Playlist}\n imageFallbackType={ImageFallbackType.PlaylistThumbnail}\n isPlugin={props.isPlugin}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getCollectionActions={props.appLinks.getCollectionActions}\n />\n </div>\n );\n}","import React from 'react';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { ImageFallbackType } from 'libs/shared/components/image/ImageFallback';\nimport { MaskType } from 'libs/shared/components/mask/Mask';\nimport { Series } from 'libs/shared/interfaces';\n\nimport { CollectionThumbnail } from '../../collection-thumbnail/CollectionThumbnail';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nimport styles from '../mixed-search-results.scss';\n\nexport function SmallSeriesResult(props: MixedSearchResultItemProps<Series>): JSX.Element {\n return (\n <div className={`position-relative ${styles.videoList}`}>\n <CollectionThumbnail\n analyticsData={{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n analyticsOptions={{\n entity: EntityType.Series,\n actionType: UserAction.Click,\n location: LocationContext.SeriesListItem\n }}\n appLink={props.appLinks.getSeriesAppLink(props.item)}\n collectionType='series'\n collection={props.item}\n showActions={props.showActions}\n maskType={MaskType.Series}\n imageFallbackType={ImageFallbackType.SeriesThumbnail}\n hideBadges\n isPlugin={props.isPlugin}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getCollectionActions={props.appLinks.getCollectionActions}\n />\n </div>\n );\n}","import React from 'react';\nimport { Col } from 'react-bootstrap';\n\nimport { SubjectWidgetItem } from 'libs/shared/components/widgets/items/subject-widget-item';\nimport { Classification } from 'libs/shared/interfaces';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nexport function SubjectResult(props: MixedSearchResultItemProps<Classification>): JSX.Element {\n return (\n <Col as='li' sm={6} md={props.useLargeStyle ? 6 : 4} lg={props.useLargeStyle ? 4 : 3}>\n <div className={`position-relative px-1 mb-2`}>\n <SubjectWidgetItem\n data={props.item}\n getChildAppLink={props.appLinks.getClassificationAppLink}\n getChildAppLinkOptions={\n () => props.appLinks.getClassificationAppLinkOptions?.(props.item)\n }\n availablePresentations={props.availablePresentations}\n analyticsData={{\n itemIndex: props.itemIndex,\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: 0\n }}\n isLarge={props.useLargeStyle}\n highlightOnHover={props.hasTopicDirectories}\n />\n </div>\n </Col>\n );\n}","import React from 'react';\n\nimport { ClipItem, ClipItemProps } from 'libs/shared/components/video-list/clip-item/ClipItem';\nimport { InteractiveItem, InteractiveItemProps } from 'libs/shared/components/video-list/interactive-item/InteractiveItem';\nimport { VideoItem, VideoItemProps } from 'libs/shared/components/video-list/video-item/VideoItem';\nimport { VideoTypes } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { MixedSearchResultItemProps } from './MixedSearchResultItemProps';\n\nimport styles from '../mixed-search-results.scss';\n\nexport function VideoResult(props: MixedSearchResultItemProps<VideoTypes>): JSX.Element {\n function getItemComponent(\n video: VideoTypes\n ): (props: ClipItemProps | InteractiveItemProps | VideoItemProps) => JSX.Element {\n if (VideoHelper.isClip(video))\n return ClipItem;\n \n if (VideoHelper.isInteractive(video))\n return InteractiveItem;\n \n return VideoItem;\n }\n\n const Component = getItemComponent(props.item);\n\n return (\n <div className={`position-relative ${styles.videoList}`}>\n <Component\n video={props.item}\n yearGroups={props.yearGroups}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getSubTextAppLink={props.appLinks.getSubTextAppLink}\n getPreviewQuestionsAppLink={props.appLinks.getPreviewQuestionsAppLink}\n presentationAudiences={props.audiences}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n analyticsData= {{\n search: {\n query: props.queryParams.query,\n score: props.item._score,\n maxScore: props.item._maxScore,\n featured: props.item._featured\n },\n pagePositionIndex: props.pagePositionIndex\n }}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n imageCdnUrl={props.imageCdnUrl}\n isPlugin={props.isPlugin}\n getClassroomGuideAppLink={props.appLinks.getClassroomGuideAppLink}\n getResourceGuidanceAppLink={props.appLinks.getResourceGuidanceAppLink}\n getInteractiveGuidanceAppLink={props.appLinks.getInteractiveGuidanceAppLink}\n />\n </div>\n );\n}","import React from 'react';\nimport { Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { CanFavouriteFunc, Classification, Company, CurrentUser, FavouriteFunc, InteractiveMetadata, Playlist, Presentation, PresentationAudience, Series, Video, YearGroup } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { SearchResultObjectTypes, SearchResults, SearchResultsObject } from '../../interfaces';\nimport { GetCollectionActions } from '../collection-thumbnail/CollectionThumbnail';\n\nimport { CompanyResult } from './components/CompanyResult';\nimport { ExchangeVideoGroup } from './components/exchange-video-group/ExchangeVideoGroup';\nimport { FeaturedVideoResult } from './components/FeaturedVideoResult';\nimport { LargePlaylistResult } from './components/LargePlaylistResults';\nimport { LargeSeriesResult } from './components/LargeSeriesResult';\nimport { BaseMixedSearchResultItemProps } from './components/MixedSearchResultItemProps';\nimport { SmallPlaylistResult } from './components/SmallPlaylistResult';\nimport { SmallSeriesResult } from './components/SmallSeriesResults';\nimport { SubjectResult } from './components/SubjectResult';\nimport { VideoResult } from './components/VideoResult';\n\nconst namespace = 'shared.mixedSearchResults';\n\nconst TOPIC_DISPLAY_LIMIT = 8;\n\nexport interface MixedSearchResultAppLinks {\n getSubTextAppLink: (video: Video) => Core.AppLink;\n getVideoAppLink: (video: Video, opts: GetVideoAppLinkOptions) => Core.AppLink;\n getSeriesAppLink: (series: Series) => Core.AppLink;\n getCompanyAppLink: (company: Company) => Core.AppLink;\n getCompanyAppLinkOptions?: (company: Company) => Core.AppLinkOptions;\n getClassificationAppLink: (classification: Classification) => Core.AppLink;\n getClassificationAppLinkOptions?: (classification: Classification) => Core.AppLinkOptions;\n getPlaylistAppLink: (playlist: Playlist) => Core.AppLink;\n getPreviewQuestionsAppLink: (interactive: InteractiveMetadata) => Core.AppLink;\n getCollectionActions: GetCollectionActions;\n getInteractiveGuidanceAppLink: (id: string, type: MasterType) => Core.AppLink;\n getResourceGuidanceAppLink: (id: string, type: MasterType) => Core.AppLink;\n getClassroomGuideAppLink: (id: string, type: MasterType) => Core.AppLink;\n searchSettings?: Core.AppLink;\n}\n\ninterface MixedSearchResultsProps {\n queryParams: HashObject;\n hasTopicDirectories: boolean;\n results: SearchResultObjectTypes[];\n topics?: SearchResults;\n companies?: SearchResults;\n setFavourite: FavouriteFunc;\n canFavourite: CanFavouriteFunc;\n audiences: PresentationAudience[];\n currentUser: CurrentUser;\n imageCdnUrl: string;\n availablePresentations: Presentation[]\n showActions: boolean;\n yearGroups: YearGroup[];\n hasPermissions: HasPermissionsFunc;\n isPlugin: boolean;\n appLinks: MixedSearchResultAppLinks;\n companyLogoFallbackUrl?: string;\n subTextType?: VideoSubTextType;\n}\n\nexport const MixedSearchResults = React.memo(function(props: MixedSearchResultsProps): JSX.Element {\n const breakpoints = useBreakpoints();\n const useSmallComponent = breakpoints.xs || breakpoints.sm;\n\n if (!props.results?.length && !props.topics?.totalResults && !props.companies?.totalResults)\n return <></>;\n\n const companiesAndTopics = [\n ...props.companies?.results ?? [],\n ...props.topics?.results ?? []\n ];\n\n const childProps: BaseMixedSearchResultItemProps = {\n useLargeStyle: companiesAndTopics.length < 4,\n ...props\n };\n\n return (\n <div className='position-relative'>\n <p role='status' className='visually-hidden'><Text namespace={namespace} phrase='ariaSearch' /></p>\n\n {!!companiesAndTopics.length && (\n <Row as='ul' className='list-unstyled g-0 pb-3 mx-n1'>\n {companiesAndTopics.slice(0, TOPIC_DISPLAY_LIMIT).map((c, itemIndex) => {\n switch (c.type.toLowerCase()) {\n case 'company':\n return (\n <CompanyResult\n key={itemIndex}\n item={c as SearchResultsObject<Company>}\n itemIndex={itemIndex}\n {...childProps}\n />\n );\n case 'subject': {\n return (\n <SubjectResult\n key={itemIndex}\n item={c as SearchResultsObject<Classification>}\n itemIndex={itemIndex}\n {...childProps}\n />\n );\n }\n }\n })}\n </Row>\n )}\n\n {props.results?.map((result, index) => {\n const pagePositionIndex = companiesAndTopics.length ? index + 1 : index;\n\n if ('isExchangeVideoGroup' in result && result.isExchangeVideoGroup) {\n return (\n <ExchangeVideoGroup\n key={index}\n item={result}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n \n\n switch (result.type?.toLowerCase()) {\n case 'interactive':\n case 'clip':\n case 'video': {\n if (index === 0 && result._featured && VideoHelper.isVideo(result)) {\n return (\n <FeaturedVideoResult\n key={index}\n item={result as SearchResultsObject<Video>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n\n return (\n <VideoResult\n key={index}\n item={result as SearchResultsObject<Video>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n\n case 'playlist': {\n if (useSmallComponent) {\n return (\n <SmallPlaylistResult\n key={index}\n item={result as SearchResultsObject<Playlist>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n\n return (\n <LargePlaylistResult\n key={index}\n item={result as SearchResultsObject<Playlist>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n\n case 'series': {\n const series = result as Series;\n\n if (useSmallComponent || !series.tallPoster?.id) {\n return (\n <SmallSeriesResult\n key={index}\n item={result as SearchResultsObject<Series>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n\n return (\n <LargeSeriesResult\n key={index}\n item={result as SearchResultsObject<Series>}\n pagePositionIndex={pagePositionIndex}\n {...childProps}\n />\n );\n }\n }\n })}\n </div>\n );\n});","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'search.searchSubstitute';\n\ninterface SearchSubstituteProps {\n substitute: string;\n queryParams: HashObject;\n getAppLink: (query: string, queryParams: HashObject) => Core.AppLink\n}\n\nexport function SearchSubstitute(props: SearchSubstituteProps): JSX.Element {\n if (!props.substitute)\n return <></>;\n\n return (\n <div className='pb-3'>\n <p className='mb-1 h6'>\n <Text namespace={namespace} phrase='showingFor' />&nbsp;\n <AppLink\n className='info-link'\n appLink={props.getAppLink(props.substitute, props.queryParams)}\n appLinkOptions={{ replace: true }}\n >\n {props.substitute}\n </AppLink>\n </p>\n <p className='mb-0 h6 fw-normal'>\n <Text namespace={namespace} phrase='searchInsteadFor' />\n <AppLink\n className='info-link'\n appLink={props.getAppLink(props.queryParams.query, { ...props.queryParams, allowSubstitute: 'false' })}\n >\n {props.queryParams.query}\n </AppLink>\n <Text namespace={namespace} phrase='endOriginal' />\n </p>\n </div>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'search.searchSuggestions';\n\ninterface SearchSuggestionsProps {\n suggestions: string[];\n queryParams: HashObject;\n getAppLink: (query: string, queryParams: HashObject) => Core.AppLink\n}\n\nSearchSuggestions.defaultProps = {\n suggestions: [],\n queryParams: {}\n};\n\nexport function SearchSuggestions(props: SearchSuggestionsProps): JSX.Element {\n if (!props.suggestions?.length)\n return <></>;\n\n return (\n <div className='d-flex align-items-center mb-3'>\n <Text namespace={namespace} phrase='didYouMean' />\n &nbsp;\n\n {props.suggestions.map((suggestion, index) => (\n <React.Fragment key={`${suggestion}:${index}`}>\n {index !== 0 && <span className='mx-1'>&bull;</span>}\n\n <AppLink\n className='info-link'\n appLink={props.getAppLink(suggestion, props.queryParams)}\n appLinkOptions={{ replace: true }}\n >\n {suggestion}\n </AppLink>\n </React.Fragment>\n ))}\n </div>\n );\n}","import { HttpVerbs } from 'libs/common/backbone/enums/HttpVerbs';\nimport { Xhr } from 'libs/common/backbone/interfaces';\nimport { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { FilterConstants } from 'libs/shared/apps/search/constants/FilterConstants';\nimport { SearchIndices, SearchResultObjectTypes, SearchResults, SearchResultsObject } from 'libs/shared/apps/search/interfaces';\nimport { SharedSearchHelper } from 'libs/shared/apps/search/utils/SharedSearchHelper';\nimport { Playlist, Series } from 'libs/shared/interfaces';\n\nfunction formatSearchResponse(response: SearchResults<SearchResultObjectTypes>) {\n /**\n * Until playlists and series are regionalised, search will always return every series/playlist that exists\n * even if the current user doesn't have access to the content inside (which will happen for example when playlists/series)\n * contain all UK library content but is being searched for by an AU user.\n *\n * For some search queries, this may result in search showing a bunch of \"empty\" playlists/series, which sucks.\n * This will filter all empty collections out and decrement the `totalResults` to avoid this and make search a better\n * experience.\n *\n * Ideally this will be removed one day when this regionalisation is no longer an issue.\n */\n let totalResults = response.totalResults;\n\n const results = response?.results?.filter(result => {\n if (result._index !== 'series' && result._index !== 'playlist')\n return true;\n\n if (result._index === 'playlist') {\n const playlist = result as SearchResultsObject<Playlist>;\n\n if (playlist.clips?.data?.length ||\n playlist.interactives?.data?.length ||\n playlist.videos?.data?.length)\n return true;\n\n totalResults--;\n return false;\n }\n\n if ((result as SearchResultsObject<Series>).videos?.data?.length === 0) {\n totalResults--;\n return false;\n }\n\n return true;\n }) ?? [];\n\n response.results = results;\n response.totalResults = totalResults;\n\n // The first search result will always have the highest score value.\n // We store it so that we can access it for subsequent results pages\n const resultMaxScore = results[0]?._score;\n\n return {\n ...response,\n results: SharedSearchHelper.mapMaxScoreToSearchResults(results, resultMaxScore)\n };\n}\n\nexport const SharedSearchRequests = {\n searchV4(\n query: string,\n indicesArr: SearchIndices[],\n filters: HashObject = {},\n allowSubstitute: boolean = true,\n cursor?: string,\n limit?: number\n ): Flight.PublicRequest {\n let key = `search:v4:${query}:${allowSubstitute}:${indicesArr}:${cursor}`;\n\n key += Object.keys(filters).map(filterName => {\n const filter = filters[filterName];\n return Array.isArray(filter) ? filter.join(';') : filter;\n }).join(';');\n\n const {\n [`${FilterConstants.FILTER_PARAM_PREFIX}excludeLibraryExclusive`]: excludeLibraryExclusive,\n isLearner,\n ...genericFilters\n } = filters;\n\n const indices = indicesArr.map(index => {\n if (index !== 'video' || !excludeLibraryExclusive)\n return { index };\n\n return { index, filters: { excludeLibraryExclusive } };\n });\n\n const data = {\n searchType: 'content',\n indices,\n filters: Object.entries(genericFilters)\n .reduce((prev, [ key, value ]) =>\n ({ ...prev, [key.replace('filters.', '')]: value }), {}),\n query,\n allowSubstitute,\n cursor: cursor ?? undefined,\n isLearner: !!isLearner,\n limit\n };\n\n return {\n url: '{gateway}/v4/search',\n publicUrl: '/api/search/v4',\n type: HttpVerbs.POST,\n data,\n key,\n formatData: formatSearchResponse\n };\n },\n\n search(\n query: string,\n indices: SearchIndices[],\n filters: HashObject = {},\n allowSubstitute: boolean = true,\n cursor?: string,\n limit?: number,\n success?: (results: SearchResults) => void,\n error?: (xhr: Xhr) => void\n ): Flight.PublicRequest {\n let key = `search:${query}:${allowSubstitute}:${indices}:${cursor}`;\n\n key += Object.keys(filters).map(filterName => {\n const filter = filters[filterName];\n return Array.isArray(filter) ? filter.join(';') : filter;\n }).join(';');\n\n const params = Object.assign({}, {\n index: indices,\n cursor: cursor ?? undefined,\n query,\n allowSubstitute,\n limit,\n ...filters\n });\n\n return {\n url: UrlHelper.urlBuilder('{gateway}/v3/search', params),\n publicUrl: UrlHelper.urlBuilder('/api/search', params),\n key,\n formatData: formatSearchResponse,\n success,\n error\n };\n },\n\n tagsAndClassifications(\n query: string,\n indices: SearchIndices[],\n filters: HashObject = {},\n cursor?: string,\n success?: (results: string[]) => void,\n error?: () => void\n ): Flight.PublicRequest {\n const params = Object.assign({}, {\n index: indices,\n cursor,\n query,\n ...filters\n });\n\n return {\n url: UrlHelper.urlBuilder('{gateway}/v3/search/tags-and-classifications', params),\n publicUrl: UrlHelper.urlBuilder('/api/search/tags-and-classifications', params),\n key: `filter:options:${query}:${indices.join(':')}:${cursor}`,\n success,\n error,\n normalize: false\n };\n }\n};","import { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { SharedSearchRequests } from 'libs/shared/apps/search/flight-requests/SharedSearchRequests';\nimport { SearchResults, SearchResultsObject } from 'libs/shared/apps/search/interfaces';\nimport { FilterHelper } from 'libs/shared/apps/search/utils/FilterHelper';\nimport { ClassificationStatus } from 'libs/shared/enums/ClassificationStatus';\nimport { ClassificationType } from 'libs/shared/enums/ClassificationType';\nimport { CurationTag } from 'libs/shared/enums/CurationTag';\nimport { Classification, Presentation, Rating } from 'libs/shared/interfaces';\n\nimport { SearchHelper } from 'apps/search/utils';\n\nconst TEACHER_FILTERS = [ 'filters.classification', 'filters.presentation' ];\nconst STUDENT_FILTERS = [ 'filters.classification', 'filters.presentation', 'isLearner' ];\n\ntype TopicSearchResults = SearchResults<SearchResultsObject<Classification>>;\n\nexport function useSearchTopics(\n queryParams: HashObject,\n ratings: Rating[] = [],\n presentationId: string,\n availablePresentations: Presentation[],\n isStudent: boolean\n): Flight.Response<SearchResults> {\n const rawFilters = ratings?.length && FilterHelper.buildBackendFilterParams(\n queryParams,\n ratings,\n [presentationId],\n isStudent,\n []\n );\n\n const filters = ObjectHelper.pick(rawFilters, isStudent ? STUDENT_FILTERS : TEACHER_FILTERS);\n filters[`filters.classificationType`] = ClassificationType.Subject;\n filters[`filters.status`] = ClassificationStatus.Published;\n\n if (queryParams?.moviesAndTv)\n filters[`filters.curationTag`] = CurationTag.MOVIES_AND_TV;\n\n if (availablePresentations.length) {\n filters[`filters.presentation`] = availablePresentations.map(presentation => presentation.id);\n }\n\n const presentationMap = availablePresentations?.reduce((acc: HashObject, presentation) => {\n acc[presentation.id] = presentation;\n return acc;\n }, {}) ?? {};\n\n const indices = FilterHelper.getAppliedIndices(queryParams);\n\n const hasFilteredOutTopics = !indices.includes('classification');\n\n const request = SharedSearchRequests.search(\n SearchHelper.getQuery(queryParams),\n ['classification'],\n filters,\n queryParams.allowSubstitute !== 'false'\n );\n\n const shouldFetch = !hasFilteredOutTopics;\n\n const response = Flight.useBasicFetch<TopicSearchResults>(shouldFetch && request);\n\n if (!shouldFetch)\n return null;\n\n if (!response.data)\n return response;\n\n if (!availablePresentations || availablePresentations?.length < 2)\n return response;\n\n const results = [...response.data.results];\n\n /**\n * If the customer has more than 1 presentation, and they search for something that returns 2 topics\n * with the same score, then we want to order those topics based on the presentation's learning level.\n * This is achieved by checking the `value` on the presentation.\n */\n const sortedResults = results.sort((a, b) => {\n // If the scores are different, then keep the original ordering\n if (a._score !== b._score)\n return 0;\n\n const presentationA = presentationMap[a.presentationId];\n const presentationB = presentationMap[b.presentationId];\n\n if (!presentationA)\n return 1;\n\n if (!presentationB)\n return -1;\n\n // Order by presentation value\n return presentationA.value - presentationB.value;\n });\n\n return {\n ...response,\n data: {\n ...response.data,\n results: sortedResults\n }\n };\n}\n","import { Flight } from 'libs/common/flight';\n\nimport { HashObject } from 'libs/analytics/interfaces';\n\nimport { TopicResults } from 'libs/shared/apps/search/interfaces';\nimport { MasterObjectTypes } from 'libs/shared/enums/MasterObjectTypes';\nimport { LocalPermissionName, PermissionName } from 'libs/shared/enums/PermissionName';\nimport { PresentationLearningLevel } from 'libs/shared/enums/PresentationLearningLevel';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { DomainMasterCollectionType, LibraryRequests } from 'libs/shared/flight-requests/LibraryRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useProducts } from 'libs/shared/hooks/UseProducts';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Config, CurrentUser, DashboardTargetType, Library, Rating, User, YearGroup } from 'libs/shared/interfaces';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { RatingRequests } from 'shared/flight-requests/RatingRequests';\nimport { useCurriculums } from 'shared/hooks/useCurriculums';\nimport { usePresentation } from 'shared/hooks/usePresentation';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useFetchCuratedDashboard } from 'shared/utils/DashboardHelper';\n\nimport { useFetchSchoolLevels } from 'apps/search/hooks/useFetchSchoolLevels';\nimport { useSearchCompanies } from 'apps/search/hooks/useSearchCompanies';\nimport { useSearchTopics } from 'apps/search/hooks/useSearchTopics';\n\n/**\n * We need to fetch libraries in order to support the sources filter. \n * However we need to exclude the streamable library, and additionally we need to exclude\n * the exchange library if the user has decided they don't want to see exchange results.\n * \n * We then need to return both of these ids so that the FilterHelper.getBackendFilters()\n * can add them as excludeLibraryExclusive filters\n * \n * - Sha\n */\nfunction useGetLibraries() {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const products = useProducts();\n const settings = useSettings(null);\n\n const streamableLibrary = Flight.useBasicFetch<HashObject>(LibraryRequests.streamableLearning());\n const streamableLibraryId = streamableLibrary.data?.objectId;\n\n const showExchangeSearchResults = products.hasProduct(ProductId.Exchange) && settings.showExchangeSearchResults;\n\n const libraryTypes: DomainMasterCollectionType[] = [ 'sharedLibrary', 'customLibrary', 'workspace', 'hostedLibrary', 'exchange' ];\n const librariesRequest = Flight.useBasicFetch<Library[]>(\n currentUser.data?.isAuthenticated && LibraryRequests.domainLibraries(libraryTypes)\n );\n\n let libraries = librariesRequest.data ?? [];\n const exchangeLibraryIndex = libraries?.findIndex(l => l.type === MasterObjectTypes.Exchange);\n const exchangeLibraryId = libraries[exchangeLibraryIndex]?.id;\n\n if (!showExchangeSearchResults)\n libraries = [ ...libraries.slice(0, exchangeLibraryIndex), ...libraries.slice(exchangeLibraryIndex + 1) ];\n\n if (streamableLibraryId) {\n const streamableIndex = libraries?.findIndex(l => l.id.toString() === streamableLibraryId.toString());\n libraries = [ ...libraries.slice(0, streamableIndex), ...libraries.slice(streamableIndex + 1) ];\n }\n\n const hasLibrariesCompleted = (\n streamableLibrary.hasCompleted &&\n (!currentUser.data?.isAuthenticated || librariesRequest.hasCompleted)\n );\n\n return {\n hasLibrariesCompleted,\n libraries,\n exchangeLibraryId,\n streamableLibraryId,\n showExchangeSearchResults\n };\n}\n\nfunction useGetRatings() {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const ratings = Flight.useBasicFetch<Rating[]>(RatingRequests.ratings(currentUser.data?.countryCode));\n\n const {\n activePresentation, availablePresentations, getFallbackPresentation, hasPresentationsLoaded\n } = usePresentation();\n\n const currentPresentation = activePresentation || getFallbackPresentation();\n\n if (!hasPresentationsLoaded)\n return ratings;\n\n if (availablePresentations?.length > 1 || !currentPresentation)\n return ratings;\n\n const learningLevel = TopicsHelper.getMappedPresentationLevel(currentPresentation.learningLevel);\n if (learningLevel !== PresentationLearningLevel.Level_1)\n return ratings;\n\n return {\n ...ratings,\n data: ratings.data?.filter(rating => {\n // Primary schools shouldn't see ratings higher than PG\n return rating.code && rating.value < 64;\n })\n };\n}\n\n/**\n * This hook contains all the simple data fetching that normally sits in the view.\n * I've done this to help promote readability of of the SearchResultsView - Sha\n */\nexport function useFetchSearchData(queryParams: HashObject) {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const userDetails = Flight.useBasicFetch<User>(currentUser.data?.id && UserRequests.user(currentUser.data.id));\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n const products = useProducts();\n const settings = useSettings(null);\n\n const {\n hasLibrariesCompleted,\n libraries,\n exchangeLibraryId,\n streamableLibraryId,\n showExchangeSearchResults\n } = useGetLibraries();\n\n const {\n activePresentation, availablePresentations, getFallbackPresentation, hasPresentationsLoaded\n } = usePresentation();\n\n const currentPresentation = activePresentation || getFallbackPresentation();\n const currentPresentationId = currentPresentation?.id;\n\n const curriculums = useCurriculums();\n\n const audiences = usePresentationAudiences();\n\n const schoolLevels = useFetchSchoolLevels(currentPresentation);\n const schoolLevelIds = schoolLevels.data?.schoolLevels?.map(o => o.id);\n const availableTopics = Flight.useBasicFetch<TopicResults>(schoolLevels?.data &&\n ClassificationRequests.topicsFromAllAvailablePresentations(schoolLevelIds));\n\n const ratings = useGetRatings();\n\n const { hasPermissions, hasLocalPermissions } = usePermissions();\n\n const isLearner = hasPermissions(PermissionName.StudentExperience);\n const canViewCurriculums = hasPermissions(PermissionName.ViewCurriculums);\n const canUseSeriesActions = hasLocalPermissions(LocalPermissionName.UseSeriesActions);\n const hasCustomLibraries = hasPermissions(PermissionName.ViewLibraries);\n const hasMoviesAndTv = hasPermissions(PermissionName.ViewMoviesTv);\n\n const topics = useSearchTopics(\n queryParams,\n ratings.data,\n currentPresentationId,\n availablePresentations,\n isLearner\n );\n\n const companies = useSearchCompanies(\n queryParams,\n ratings.data,\n availablePresentations,\n hasMoviesAndTv\n );\n\n const {\n dashboard: moviesAndTvDashboard\n } = useFetchCuratedDashboard({\n targetType: DashboardTargetType.MoviesAndTv,\n queryParams\n });\n\n const hasDataLoaded = (\n audiences.hasCompleted &&\n hasPresentationsLoaded &&\n currentUser.hasCompleted &&\n (!currentUser.data?.isAuthenticated || userDetails.hasCompleted) &&\n ratings.hasCompleted &&\n config.hasCompleted &&\n availablePresentations &&\n (!currentUser.data?.isAuthenticated || !products.isLoadingProducts) &&\n !settings.isLoadingSettings &&\n hasLibrariesCompleted\n );\n\n return {\n queryParams,\n currentUser,\n userDetails,\n config,\n yearGroups,\n products,\n settings,\n curriculums,\n audiences,\n schoolLevels,\n currentPresentation,\n availablePresentations,\n availableTopics,\n ratings,\n topics,\n companies,\n moviesAndTvDashboard,\n currentPresentationId,\n isLearner,\n canViewCurriculums,\n canUseSeriesActions,\n libraries,\n hasDataLoaded,\n exchangeLibraryId,\n streamableLibraryId,\n showExchangeSearchResults,\n hasPermissions,\n hasCustomLibraries,\n hasMoviesAndTv\n };\n}\n","import { Flight } from 'libs/common/flight';\n\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { Presentation, SchoolLevels } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nimport { SearchRequests } from 'apps/search/flight-requests/SearchRequests';\n\nexport function useFetchSchoolLevels(presentation: Presentation) {\n const { hasPermissions } = usePermissions();\n const isLearner = hasPermissions(PermissionName.StudentExperience);\n\n const {\n availablePresentations,\n hasPresentationsLoaded\n } = usePresentation();\n\n function getPresentationIds() {\n if (isLearner)\n return presentation ? [presentation?.id] : null;\n\n return availablePresentations?.map(o => o.id);\n }\n\n const presentationIds = getPresentationIds();\n\n return Flight.useBasicFetch<SchoolLevels>(\n hasPresentationsLoaded &&\n presentationIds &&\n SearchRequests.schoolLevels(presentationIds)\n );\n}","import { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { SharedSearchRequests } from 'libs/shared/apps/search/flight-requests/SharedSearchRequests';\nimport { SearchResults, SearchResultsObject } from 'libs/shared/apps/search/interfaces';\nimport { FilterHelper } from 'libs/shared/apps/search/utils/FilterHelper';\nimport { Company, Presentation, Rating } from 'libs/shared/interfaces';\n\nimport { SearchHelper } from 'apps/search/utils';\n\ntype CompanySearchResults = SearchResults<SearchResultsObject<Company>>;\n\nexport function useSearchCompanies(\n queryParams: HashObject,\n ratings: Rating[] = [],\n availablePresentations: Presentation[],\n hasMoviesAndTv: boolean\n): Flight.Response<SearchResults> {\n const availablePresentationIds = availablePresentations.map(p => p.id);\n\n const rawFilters = ratings?.length && FilterHelper.buildBackendFilterParams(\n queryParams,\n ratings,\n availablePresentationIds,\n false,\n []\n );\n \n const filters = rawFilters || {};\n\n /**\n * For other uses of FilterHelper.buildBackendFilterParams, the presentaiton ids will only be added for students,\n * but as a temporary fix for searching companies, we always filter by the current presentation - Sha\n */\n if (availablePresentationIds?.length)\n filters[`filters.presentation`] = availablePresentationIds;\n\n const indices = FilterHelper.getAppliedIndices(queryParams);\n\n const hasFilteredOutCompanies = !indices.includes('company');\n\n const request = SharedSearchRequests.search(\n SearchHelper.getQuery(queryParams),\n ['company'],\n filters,\n queryParams.allowSubstitute !== 'false'\n );\n\n const shouldFetch = !hasFilteredOutCompanies && hasMoviesAndTv;\n\n const response = Flight.useBasicFetch<CompanySearchResults>(shouldFetch && request);\n\n if (!shouldFetch)\n return null;\n\n if (!response.data)\n return response;\n\n return {\n ...response,\n data: {\n ...response.data,\n results: [...response.data.results]\n }\n };\n}\n","import { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { HashObject } from 'libs/analytics/interfaces';\n\nimport { FilterConstants } from 'libs/shared/apps/search/constants/FilterConstants';\nimport { SharedSearchRequests } from 'libs/shared/apps/search/flight-requests/SharedSearchRequests';\nimport { SearchIndices, SearchResultObjectTypes, SearchResults } from 'libs/shared/apps/search/interfaces';\nimport { handleHttpError } from 'libs/shared/errors/handlers/HttpErrorHandlers';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useInfiniteList } from 'libs/shared/hooks/UseInfiniteList';\nimport { UseProductsResponse } from 'libs/shared/hooks/UseProducts';\nimport { SettingsHash } from 'libs/shared/hooks/useSettings';\nimport { Video } from 'libs/shared/interfaces';\n\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\n\nimport { ExchangeGroupingType, useGroupExchangeResults } from './useGroupExchangeResults';\n\nexport const namespace = 'search.utils';\n\ninterface UseGetSearchResultsOptions {\n queryParams: HashObject;\n appliedIndices: SearchIndices[];\n backendFilters: HashObject;\n products: UseProductsResponse;\n settings: SettingsHash;\n hasDataLoaded: boolean;\n exchangeLibraryId: string;\n showExchangeSearchResults: boolean;\n}\nexport function useGetSearchResults(options: UseGetSearchResultsOptions) {\n const { queryParams, appliedIndices, backendFilters } = options;\n\n const alerts = useAlerts();\n const fetch = Flight.useGetFetch();\n\n const searchResultsResponse = Flight.useGetResponse<SearchResults>(getSearchRequest()?.key);\n const hasExchangeLibraryFilter = hasLibraryFilter(options.exchangeLibraryId?.toString());\n const fetchMixedExchangeResults = (\n options.hasDataLoaded &&\n appliedIndices?.length &&\n options.showExchangeSearchResults &&\n !hasExchangeLibraryFilter\n );\n const mixedExchangeSearchResults = Flight.useBasicFetch<SearchResults>(\n fetchMixedExchangeResults && getMixedExchangeSearchRequest()\n );\n\n function hasLibraryFilter(libraryId: string): boolean {\n if (!libraryId) return false;\n\n return options.backendFilters?.[`${FilterConstants.FILTER_PARAM_PREFIX}library`]\n ?.some?.((l: string) => l.toString() === libraryId);\n }\n\n function getMixedExchangeSearchRequest() {\n return SharedSearchRequests.searchV4(\n queryParams.query,\n appliedIndices,\n backendFilters,\n queryParams.allowSubstitute !== 'false',\n null,\n 10\n );\n }\n\n function getSearchRequest(cursor?: string) {\n if (!options.hasDataLoaded || !appliedIndices?.length) return;\n\n let backendFilters = { ...options.backendFilters };\n\n if (options.showExchangeSearchResults && !hasExchangeLibraryFilter) {\n const excludeLibraryFilter = `${FilterConstants.FILTER_PARAM_PREFIX}excludeLibraryExclusive`;\n backendFilters = {\n ...backendFilters,\n [excludeLibraryFilter]: [ ...backendFilters[excludeLibraryFilter], options.exchangeLibraryId ]\n };\n }\n \n return SharedSearchRequests.searchV4(\n queryParams.query,\n appliedIndices,\n backendFilters,\n queryParams.allowSubstitute !== 'false',\n cursor\n );\n }\n\n function fetchNext(cursor?: string) {\n fetch(getSearchRequest(cursor));\n }\n\n function onError(pageNumber: number, httpStatus: HttpStatus): void {\n if (pageNumber === 1)\n return handleHttpError(httpStatus);\n\n alerts.error(LanguageService.getPhrase(namespace, 'error'));\n }\n\n const searchResults = useInfiniteList<SearchResultObjectTypes, SearchResults>(\n getSearchRequest,\n fetchNext,\n onError,\n data => data.results\n );\n\n function getExchangeGroupingType(): ExchangeGroupingType {\n if (!options.showExchangeSearchResults)\n return 'omit';\n\n return hasExchangeLibraryFilter ? 'untouched' : 'group';\n }\n\n const videos = searchResults.items?.filter(r => r._index === 'video' || r._index === 'clip');\n useVideoMixin(videos as Video[]);\n\n const items = useGroupExchangeResults({\n searchResults: searchResults.items,\n mixedExchangeSearchResults: mixedExchangeSearchResults.data?.results,\n searchResultsResponse: searchResultsResponse.data,\n groupingType: getExchangeGroupingType()\n });\n\n return {\n ...searchResults,\n hasFirstPageCompleted: searchResults.hasFirstPageCompleted || !options.hasDataLoaded || !appliedIndices?.length,\n items,\n fetchNext,\n substituteQuery: searchResultsResponse.data?.substituteQuery,\n suggestions: searchResultsResponse.data?.suggestions\n };\n}\n","import React from 'react';\n\nimport { ExchangeVideoGroup, SearchResultObjectTypes, SearchResults, SearchResultsObject } from 'libs/shared/apps/search/interfaces';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { Video } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nexport type ExchangeGroupingType =\n 'omit' | // Don't show exchange results at all\n 'group' | // Group exchange results into a component\n 'untouched'; // Leave exchange results untouched\n\ninterface UseGroupExchangeResults {\n searchResults: SearchResultObjectTypes[];\n mixedExchangeSearchResults: SearchResultObjectTypes[];\n searchResultsResponse: SearchResults;\n groupingType: ExchangeGroupingType;\n}\n\nexport function useGroupExchangeResults(options: UseGroupExchangeResults) {\n return React.useMemo(() => {\n if (!options.searchResults?.length || !options.mixedExchangeSearchResults?.length || options.groupingType === 'untouched')\n return options.searchResults;\n\n const mixedExchangeResults: SearchResultObjectTypes[] = [...options.searchResults];\n const exchangeResults: SearchResultsObject<Video>[] = [];\n let exchangeIndex: number;\n let exchangeShowCount: number;\n let consecutive = false;\n\n options.mixedExchangeSearchResults.forEach((item, index) => {\n if (exchangeResults.length === 3) return;\n\n const isExchangeVideo = VideoHelper.isVideo(item) &&\n item.libraries.data?.length === 1 &&\n item.libraries.data?.[0]?.typeId === MasterType.ExchangeCollection;\n\n if (isExchangeVideo) {\n if (exchangeIndex === undefined) {\n exchangeIndex = index;\n exchangeShowCount = 0;\n consecutive = true;\n }\n\n if (consecutive)\n exchangeShowCount++;\n\n exchangeResults.push(item);\n return;\n }\n\n consecutive = false;\n });\n\n const exchangeVideoGroup: SearchResultsObject<ExchangeVideoGroup> = {\n id: null,\n type: null,\n name: null,\n videos: exchangeResults,\n showCount: exchangeIndex === 0 ? 1 : exchangeShowCount,\n isExchangeVideoGroup: true,\n _index: null\n };\n \n if (options.groupingType === 'group' && exchangeResults.length)\n mixedExchangeResults.splice(exchangeIndex, 0, exchangeVideoGroup);\n\n return mixedExchangeResults;\n }, [\n options.searchResultsResponse,\n options.searchResults?.length,\n options.mixedExchangeSearchResults,\n options.groupingType\n ]);\n}","import React from 'react';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\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 = 'search.searchResultsEmptyState';\n\ninterface SearchResultsEmptyStateProps {\n query?: string;\n scotland?: boolean;\n}\n\nexport function SearchResultsEmptyState(props: SearchResultsEmptyStateProps): JSX.Element {\n const imageUrl = (props.scotland && props.query?.trim()?.toLowerCase() === 'nessie')\n ? ImageUrls.EmptyStates.Search.RESULTS_SCOTLAND\n : ImageUrls.EmptyStates.Search.RESULTS;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={imageUrl} />\n\n <EmptyState.Heading>\n {props.query\n ? <Text phrase='headingWithQuery' options={{ query: props.query }} />\n : <Text phrase='headingWithoutQuery' />\n }\n </EmptyState.Heading>\n\n <EmptyState.Info>\n <Text phrase='info' />\n <AppLink\n className='info-link'\n appLink={{ application: AppChannels.SUBJECT, action: Actions.Subjects.PRESENTATION_TOPICS }}\n >\n <Text phrase='topicsAppLink' />\n </AppLink>\n </EmptyState.Info>\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, HashObject, LocationContext } from 'libs/analytics/interfaces';\n\nimport { MixedSearchResults } from 'libs/shared/apps/search/components/mixed-search-results/MixedSearchResults';\nimport { SearchFilters } from 'libs/shared/apps/search/components/search-filters/SearchFilters';\nimport { SearchSubstitute } from 'libs/shared/apps/search/components/search-substitute/SearchSubstitute';\nimport { SearchSuggestions } from 'libs/shared/apps/search/components/search-suggestions/SearchSuggestions';\nimport { InfiniteScrollFooter } from 'libs/shared/components/infinite-scroll-footer/InfiniteScrollFooter';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\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';\n\nimport { useFetchSearchData } from 'apps/search/hooks/useFetchSearchData';\nimport { useGetSearchResults } from 'apps/search/hooks/useGetSearchResults';\nimport { useGetTagsAndClassifications } from 'apps/search/hooks/useGetTagsAndClassifications';\nimport { useSearchMask } from 'apps/search/hooks/useSearchMask';\nimport { SearchHelper } from 'apps/search/utils';\n\nimport { SearchResultsEmptyState } from './empty-state/SearchResultsEmptyState';\n\nexport const namespace = 'search.searchResults';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface SearchResultsView2Props {\n queryParams: HashObject\n}\n\nexport function SearchResultsView(props: SearchResultsView2Props): JSX.Element {\n const { queryParams = {} } = props;\n\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.VideoThumbnail);\n const { isPlugin } = usePluginHelper();\n const { hasTopicDirectories } = useSettings(null);\n\n const searchData = useFetchSearchData(queryParams);\n\n const searchFilters = SearchHelper.getBackendFilters(searchData);\n\n const hasIndices = !!searchFilters?.appliedIndices.length;\n const tagsAndClassifications = useGetTagsAndClassifications(hasIndices && searchFilters);\n const searchResults = useGetSearchResults({ ...searchFilters, ...searchData });\n\n const filters = SearchHelper.getFilters(\n searchData,\n searchFilters?.inaccessibleIndices,\n hasIndices && tagsAndClassifications\n );\n \n useSetPageMetadata(PageMetadataHelper.getDefaultMetadata({\n title: queryParams.query ?? '',\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n allowIndexing: false\n }));\n\n /**\n * Do we have the data we need for the entire view to render\n */\n const hasLoaded = (\n searchData.hasDataLoaded && filters\n );\n\n /**\n * Do we have the data we need to render our results\n */\n const hasSearchCompleted = (\n searchResults.hasFirstPageCompleted &&\n // Topic and Company requests won't exist if they aren't being fetched\n (!searchData.topics || searchData.topics.hasCompleted) &&\n (!searchData.companies || searchData.companies.hasCompleted) &&\n (!hasIndices || tagsAndClassifications.hasCompleted) &&\n !!filters\n );\n\n /**\n * Do we actually have results\n */\n const hasResults = (\n searchResults.items?.length ||\n searchData.topics?.data?.totalResults ||\n searchData.companies?.data?.totalResults\n );\n\n useSearchMask(hasSearchCompleted);\n\n if (!hasLoaded)\n return <></>;\n\n return (\n <div className='px-4'>\n <SearchSubstitute\n substitute={searchResults.substituteQuery}\n queryParams={queryParams}\n getAppLink={SearchHelper.getSearchAppLink}\n />\n\n {!searchResults.substituteQuery && (\n <SearchSuggestions\n suggestions={searchResults.suggestions}\n queryParams={queryParams}\n getAppLink={SearchHelper.getSearchAppLink}\n />\n )}\n\n {(!!searchData.audiences.data && !!searchData.ratings.data && !!searchData.availableTopics.data) && (\n <SearchFilters\n queryParams={queryParams}\n mainFilters={filters?.mainFilters}\n moreFilters={filters?.moreFilters}\n analyticsOptions={{\n entity: EntityType.SearchResults,\n location: LocationContext.SearchFilters\n }}\n appLink={{ application: AppChannels.SEARCH, action: Actions.Search.HOME }}\n isFetchingOptions={tagsAndClassifications.isFetching}\n />\n )}\n\n {hasSearchCompleted &&\n <section>\n {hasResults\n ? (\n <VideoActionsContext.Provider value={videoActions}>\n <MixedSearchResults\n queryParams={queryParams}\n results={searchResults.items}\n topics={searchData.topics?.data}\n companies={searchData.companies?.data}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n audiences={!queryParams.moviesAndTv && searchData.audiences.data}\n currentUser={searchData.currentUser.data}\n imageCdnUrl={searchData.config.data.imageCdnUrl}\n availablePresentations={searchData.availablePresentations}\n showActions={(!searchData.isLearner && searchData.canUseSeriesActions)}\n hasPermissions={searchData.hasPermissions}\n yearGroups={searchData.yearGroups.data}\n isPlugin={isPlugin}\n appLinks={SearchHelper.getAppLinks(\n searchData.currentPresentation,\n searchData.availablePresentations,\n queryParams.moviesAndTv\n )}\n hasTopicDirectories={hasTopicDirectories}\n subTextType='series'\n />\n </VideoActionsContext.Provider>\n ) : (\n <SearchResultsEmptyState\n query={queryParams.query}\n scotland={!!searchData.currentPresentation?.description?.toLowerCase().includes('scotland') ?? false}\n />\n )\n }\n {/* XOR */}\n {(searchResults.hasMore || searchResults.isFetching) && (\n <InfiniteScrollFooter\n isFetching={searchResults.isFetching}\n fetchNext={searchResults.fetchNext}\n nextCursor={searchResults.nextCursor}\n fetchOnScroll\n />\n )}\n </section>\n }\n </div>\n );\n}","import { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { SharedSearchRequests } from 'libs/shared/apps/search/flight-requests/SharedSearchRequests';\nimport { SearchIndices } from 'libs/shared/apps/search/interfaces';\n\nexport interface UseGetTagsAndClassificationsOptions {\n queryParams: HashObject;\n appliedIndices: SearchIndices[];\n backendFilters: HashObject;\n}\n\nexport function useGetTagsAndClassifications(options: UseGetTagsAndClassificationsOptions) {\n return Flight.useBasicFetch<string[]>(options && SharedSearchRequests.tagsAndClassifications(\n options.queryParams.query,\n options.appliedIndices,\n options.backendFilters\n ));\n}\n","import React from 'react';\n\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\n\nimport { ViewModelKeys } from 'shared/constants/LiteViewModels';\n\nexport function useSearchMask(hasCompleted: boolean): void {\n const [ showMask, setShowMask ] = useViewModel(ViewModelKeys.SHOW_SEARCH_MASK, true);\n\n React.useEffect(() => {\n showMask && hasCompleted && setShowMask(false);\n }, [hasCompleted]);\n}\n","import { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/flight';\n\nimport { Rating } from 'libs/shared/interfaces';\n\nexport const RatingRequests = {\n ratings(countryCode?: string): Flight.PublicRequest {\n return {\n url: '/api/domain/v2/me/ratings',\n publicUrl: UrlHelper.urlBuilder('/api/domain/v2/me/ratings', { countryCode }),\n key: 'ratings',\n // v2/me/ratings doesn't support `query={orderby:value}`. Adding this due to time constraints\n formatData: (ratings: Rating[]) => {\n return ratings.sort((a, b) => a.value - b.value);\n }\n };\n }\n};","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation, getFallbackPresentation } = usePresentation({ redirectOnError: true });\n\n const presentation = activePresentation || getFallbackPresentation();\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!presentation &&\n AudienceRequests.presentationAudiences(presentation.id)\n );\n\n return audiences;\n};","import React from 'react';\n\nimport { 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 { Clip, ClipCollection, CurrentUser, Video, VideoCollection } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ntype Types = Video[] | VideoCollection | Clip[] | ClipCollection;\n\nfunction getValidObjects(objects: Types): (Video | Clip)[] {\n if (!objects)\n return [];\n\n if (Array.isArray(objects))\n return objects.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n if ('data' in objects)\n return objects.data.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n return [];\n}\n\ninterface VideoMixinOptions {\n /**\n * If the videos that are having new data mixed into are sitting on an explicit Flight namespace,\n * providing that namespace here is required\n */\n flightNamespace?: string;\n}\n\nexport function useVideoMixin(objects: Types, options: VideoMixinOptions = {}): void {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const hydratedVideos = React.useRef<Set<string>>(new Set<string>());\n\n const videos = getValidObjects(objects);\n\n const videoIds = videos.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","WidgetButtonDirection","getPhrase","LanguageService","WidgetButton","isLeft","direction","Left","arrowSvg","hide","style","state","contents","paddingBottom","viewableItems","height","useGradientBackdrop","leftGradientClassName","rightGradientClassName","hideExtendedClickableArea","tabIndex","leftButtonClassName","rightButtonClassName","hoverText","SCROLL_TOLERANCE","useInfiniteList","getRequest","onError","getItems","getCursor","scrollContainer","options","handleScroll","useState","pagesFetched","setPagesFetched","fetchNextFn","response","cursor","request","key","fetchNextPage","currentVal","hasMore","getBoundingClientRect","scrollTop","scrollHeight","window","innerHeight","document","documentElement","useEffect","onScroll","FunctionHelper","addEventListener","removeEventListener","shouldInitialFetch","statusCode","httpStatusClass","toString","substr","HttpStatus","items","totalItems","hasFirstPageCompleted","CompanyWidgetItem","analyticsData","id","data","name","analyticsOptions","location","actionType","entity","descriptor","CoverPill","coverUrl","logo","url","CompanyResult","Col","sm","md","useLargeStyle","lg","item","getChildAppLink","appLinks","getCompanyAppLink","getChildAppLinkOptions","getCompanyAppLinkOptions","itemIndex","search","query","queryParams","score","_score","maxScore","_maxScore","featured","_featured","pagePositionIndex","isLarge","namespace","ExchangeVideoGroup","limit","showCount","currentAppLink","currentParams","params","currentSource","source","Array","isArray","searchAppLink","AppLink","appLink","Text","phrase","searchSettings","videos","slice","map","v","i","VideoItem","video","yearGroups","getVideoAppLink","getSubTextAppLink","presentationAudiences","audiences","setFavourite","canFavourite","companyLogoFallbackUrl","subTextType","hasPermissions","getClassroomGuideAppLink","getResourceGuidanceAppLink","getInteractiveGuidanceAppLink","isPlugin","FeaturedVideoResult","HeroVideo","opts","subTextAppLink","hideInteractiveBadge","showVideoGuidance","VideoHelper","imageCdnUrl","PlaylistWithVideos","breakpoints","maxVideos","useBreakpoints","xl","xxl","playlist","playlistAnalyticsOption","playlistAnalyticsData","Row","xs","playlistAppLink","bgColourClassNames","itemStyle","currentUser","showOwner","videoAnalyticsData","videoId","videoName","hideVideoGuidance","LargePlaylistResult","getPlaylistAppLink","preloadImage","SeriesWithVideos","series","seriesAnalyticsOption","seriesAnalyticsData","seriesAppLink","SeriesTallPoster","imageClass","LargeSeriesResult","getSeriesAppLink","CollectionVideoList","analyticsProps","hasSeasonEpisode","episodeNumber","season","collectionId","CollectionThumbnail","isSmall","VideoListHelper","hasVideos","collection","length","firstVideoWithThumbnail","find","thumbnail","isSeries","collectionType","BaseImage","imageType","Mask","type","maskType","ImageFallback","imageFallbackType","Actions","actions","getCollectionActions","showActions","actionsDropdownClassName","hideBadges","BadgeListContainer","Badge","rating","metadata","year","SmallPlaylistResult","SmallSeriesResult","SubjectResult","getClassificationAppLink","getClassificationAppLinkOptions","availablePresentations","highlightOnHover","hasTopicDirectories","VideoResult","Component","ClipItem","InteractiveItem","getPreviewQuestionsAppLink","MixedSearchResults","useSmallComponent","results","topics","totalResults","companies","companiesAndTopics","childProps","c","toLowerCase","result","index","isExchangeVideoGroup","tallPoster","SearchSubstitute","substitute","getAppLink","appLinkOptions","replace","allowSubstitute","SearchSuggestions","suggestions","suggestion","formatSearchResponse","filter","_index","clips","interactives","resultMaxScore","SharedSearchHelper","SharedSearchRequests","searchV4","indicesArr","filters","Object","keys","filterName","join","FilterConstants","excludeLibraryExclusive","isLearner","genericFilters","searchType","indices","entries","reduce","prev","value","undefined","publicUrl","HttpVerbs","formatData","success","error","assign","UrlHelper","tagsAndClassifications","normalize","TEACHER_FILTERS","STUDENT_FILTERS","useFetchSearchData","UserRequests","userDetails","config","ConfigRequests","isAuthenticated","CustomerRequests","customerId","products","settings","useSettings","streamableLibrary","LibraryRequests","streamableLibraryId","objectId","showExchangeSearchResults","hasProduct","ProductId","librariesRequest","libraries","exchangeLibraryIndex","findIndex","l","MasterObjectTypes","exchangeLibraryId","streamableIndex","hasLibrariesCompleted","hasCompleted","useGetLibraries","usePresentation","activePresentation","getFallbackPresentation","hasPresentationsLoaded","currentPresentation","currentPresentationId","curriculums","useCurriculums","usePresentationAudiences","schoolLevels","presentation","usePermissions","PermissionName","presentationIds","o","SearchRequests","useFetchSchoolLevels","schoolLevelIds","availableTopics","ClassificationRequests","ratings","RatingRequests","countryCode","TopicsHelper","learningLevel","PresentationLearningLevel","code","useGetRatings","hasLocalPermissions","canViewCurriculums","canUseSeriesActions","hasCustomLibraries","hasMoviesAndTv","presentationId","isStudent","rawFilters","FilterHelper","ObjectHelper","ClassificationType","ClassificationStatus","moviesAndTv","CurationTag","presentationMap","acc","hasFilteredOutTopics","includes","shouldFetch","sortedResults","sort","a","b","presentationA","presentationB","useSearchTopics","availablePresentationIds","p","hasFilteredOutCompanies","useSearchCompanies","moviesAndTvDashboard","targetType","dashboard","hasDataLoaded","isLoadingProducts","isLoadingSettings","useGetSearchResults","appliedIndices","backendFilters","alerts","fetch","searchResultsResponse","getSearchRequest","hasExchangeLibraryFilter","libraryId","some","hasLibraryFilter","fetchMixedExchangeResults","mixedExchangeSearchResults","excludeLibraryFilter","searchResults","pageNumber","httpStatus","r","useVideoMixin","groupingType","exchangeIndex","exchangeShowCount","mixedExchangeResults","exchangeResults","consecutive","forEach","typeId","MasterType","push","exchangeVideoGroup","splice","useGroupExchangeResults","substituteQuery","SearchResultsEmptyState","imageUrl","scotland","trim","ImageUrls","EmptyState","src","application","action","SearchResultsView","videoActions","useVideoActions","useLiteFavourites","u","usePluginHelper","searchData","searchFilters","hasIndices","inaccessibleIndices","useSetPageMetadata","PageMetadataHelper","title","phraseContext","phraseHandler","titlePhrase","descriptionPhrase","allowIndexing","showMask","setShowMask","hasLoaded","hasSearchCompleted","hasResults","SearchFilters","mainFilters","moreFilters","isFetchingOptions","VideoActionsContext","description","redirectOnError","objects","hydratedVideos","Set","getValidObjects","videoIds","setRequest","unhydratedVideos","current","has","add","newRequests","flightNamespace"],"sourceRoot":""}