@clickview/lite 0.58.1 → 0.58.2-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/scripts/1041-29107d9409-lite.chunk.js +2 -0
- package/dist/scripts/1041-29107d9409-lite.chunk.js.map +1 -0
- package/dist/scripts/{1080-563b65eb58-lite.chunk.js → 1080-48ce32d627-lite.chunk.js} +2 -2
- package/dist/scripts/1080-48ce32d627-lite.chunk.js.map +1 -0
- package/dist/scripts/{1169-f2120c91cc-lite.chunk.js → 1169-1443c8a778-lite.chunk.js} +2 -2
- package/dist/scripts/1169-1443c8a778-lite.chunk.js.map +1 -0
- package/dist/scripts/143-efbc6a41c5-lite.chunk.js +2 -0
- package/dist/scripts/143-efbc6a41c5-lite.chunk.js.map +1 -0
- package/dist/scripts/{170-94b806dc73-lite.chunk.js → 170-233a87b708-lite.chunk.js} +3 -3
- package/dist/scripts/170-233a87b708-lite.chunk.js.map +1 -0
- package/dist/scripts/2015-d1bc58c0eb-lite.chunk.js +2 -0
- package/dist/scripts/2015-d1bc58c0eb-lite.chunk.js.map +1 -0
- package/dist/scripts/204-4f5b47b73f-lite.chunk.js +2 -0
- package/dist/scripts/204-4f5b47b73f-lite.chunk.js.map +1 -0
- package/dist/scripts/{2153-7663eb7803-lite.chunk.js → 2153-02090c64f8-lite.chunk.js} +2 -2
- package/dist/scripts/2153-02090c64f8-lite.chunk.js.map +1 -0
- package/dist/scripts/2215-39ee2a2b3f-lite.chunk.js +2 -0
- package/dist/scripts/2215-39ee2a2b3f-lite.chunk.js.map +1 -0
- package/dist/scripts/{2340-d1548f6362-lite.chunk.js → 2340-62c86fabb2-lite.chunk.js} +2 -2
- package/dist/scripts/2340-62c86fabb2-lite.chunk.js.map +1 -0
- package/dist/scripts/2571-c280e72eff-lite.chunk.js +2 -0
- package/dist/scripts/2571-c280e72eff-lite.chunk.js.map +1 -0
- package/dist/scripts/{4013-3d2edd41fb-lite.chunk.js → 4013-2aff1769f5-lite.chunk.js} +3 -3
- package/dist/scripts/4013-2aff1769f5-lite.chunk.js.map +1 -0
- package/dist/scripts/{490-002054a946-lite.chunk.js → 490-62ca33b520-lite.chunk.js} +2 -2
- package/dist/scripts/490-62ca33b520-lite.chunk.js.map +1 -0
- package/dist/scripts/4944-a780ed2439-lite.chunk.js +2 -0
- package/dist/scripts/4944-a780ed2439-lite.chunk.js.map +1 -0
- package/dist/scripts/{5220-40dd0842b5-lite.chunk.js → 5220-e0074ed079-lite.chunk.js} +3 -3
- package/dist/scripts/5220-e0074ed079-lite.chunk.js.map +1 -0
- package/dist/scripts/{5224-09e451b12f-lite.chunk.js → 5224-53cabe5c40-lite.chunk.js} +2 -2
- package/dist/scripts/5224-53cabe5c40-lite.chunk.js.map +1 -0
- package/dist/scripts/{5836-f212660b94-lite.chunk.js → 5836-03975cbcf8-lite.chunk.js} +2 -2
- package/dist/scripts/5836-03975cbcf8-lite.chunk.js.map +1 -0
- package/dist/scripts/{5936-f1e642e93f-lite.chunk.js → 5936-71d764494c-lite.chunk.js} +2 -2
- package/dist/scripts/5936-71d764494c-lite.chunk.js.map +1 -0
- package/dist/scripts/{6118-d069072bb6-lite.chunk.js → 6118-e4ebf5a2c1-lite.chunk.js} +2 -2
- package/dist/scripts/6118-e4ebf5a2c1-lite.chunk.js.map +1 -0
- package/dist/scripts/{6263-c665ac8df6-lite.chunk.js → 6263-fca75a8668-lite.chunk.js} +2 -2
- package/dist/scripts/6263-fca75a8668-lite.chunk.js.map +1 -0
- package/dist/scripts/{6599-c87f4f5ec1-lite.chunk.js → 6599-d8f1b255c5-lite.chunk.js} +3 -3
- package/dist/scripts/6599-d8f1b255c5-lite.chunk.js.map +1 -0
- package/dist/scripts/{6741-1ee9b683c7-lite.chunk.js → 6741-638b658087-lite.chunk.js} +3 -3
- package/dist/scripts/6741-638b658087-lite.chunk.js.map +1 -0
- package/dist/scripts/6934-5688ca7ce7-lite.chunk.js +2 -0
- package/dist/scripts/6934-5688ca7ce7-lite.chunk.js.map +1 -0
- package/dist/scripts/{7234-d1a173cb25-lite.chunk.js → 7234-8664150dd4-lite.chunk.js} +2 -2
- package/dist/scripts/7234-8664150dd4-lite.chunk.js.map +1 -0
- package/dist/scripts/{7556-69f8cb3b20-lite.chunk.js → 7556-276466341c-lite.chunk.js} +3 -3
- package/dist/scripts/7556-276466341c-lite.chunk.js.map +1 -0
- package/dist/scripts/{7709-57c48d288e-lite.chunk.js → 7709-adf3f9328f-lite.chunk.js} +2 -2
- package/dist/scripts/7709-adf3f9328f-lite.chunk.js.map +1 -0
- package/dist/scripts/{839-f8478d27f8-lite.chunk.js → 839-aaf4cad363-lite.chunk.js} +1 -1
- package/dist/scripts/{839-f8478d27f8-lite.chunk.js.map → 839-aaf4cad363-lite.chunk.js.map} +1 -1
- package/dist/scripts/{9139-456a0f14a5-lite.chunk.js → 9139-e8c1a686af-lite.chunk.js} +2 -2
- package/dist/scripts/9139-e8c1a686af-lite.chunk.js.map +1 -0
- package/dist/scripts/{9173-e03b30b436-lite.chunk.js → 9173-90aa484be4-lite.chunk.js} +2 -2
- package/dist/scripts/9173-90aa484be4-lite.chunk.js.map +1 -0
- package/dist/scripts/9284-c0cee27d0e-lite.chunk.js +2 -0
- package/dist/scripts/9284-c0cee27d0e-lite.chunk.js.map +1 -0
- package/dist/scripts/{9395-70cd9ae3a1-lite.chunk.js → 9395-355efbc0e7-lite.chunk.js} +3 -3
- package/dist/scripts/{9395-70cd9ae3a1-lite.chunk.js.map → 9395-355efbc0e7-lite.chunk.js.map} +1 -1
- package/dist/scripts/{953-45aa51744b-lite.chunk.js → 953-b3b777612b-lite.chunk.js} +3 -3
- package/dist/scripts/{953-45aa51744b-lite.chunk.js.map → 953-b3b777612b-lite.chunk.js.map} +1 -1
- package/dist/scripts/bundle-22b3c87b82.min.js +3 -0
- package/dist/scripts/bundle-22b3c87b82.min.js.map +1 -0
- package/package.json +1 -1
- package/dist/scripts/1080-563b65eb58-lite.chunk.js.map +0 -1
- package/dist/scripts/1169-f2120c91cc-lite.chunk.js.map +0 -1
- package/dist/scripts/143-4ea7a69434-lite.chunk.js +0 -2
- package/dist/scripts/143-4ea7a69434-lite.chunk.js.map +0 -1
- package/dist/scripts/170-94b806dc73-lite.chunk.js.map +0 -1
- package/dist/scripts/204-2b19b80cc1-lite.chunk.js +0 -2
- package/dist/scripts/204-2b19b80cc1-lite.chunk.js.map +0 -1
- package/dist/scripts/2153-7663eb7803-lite.chunk.js.map +0 -1
- package/dist/scripts/2215-5e8af1456d-lite.chunk.js +0 -2
- package/dist/scripts/2215-5e8af1456d-lite.chunk.js.map +0 -1
- package/dist/scripts/2340-d1548f6362-lite.chunk.js.map +0 -1
- package/dist/scripts/3525-45e28232cf-lite.chunk.js +0 -2
- package/dist/scripts/3525-45e28232cf-lite.chunk.js.map +0 -1
- package/dist/scripts/4013-3d2edd41fb-lite.chunk.js.map +0 -1
- package/dist/scripts/490-002054a946-lite.chunk.js.map +0 -1
- package/dist/scripts/4944-b565b5c501-lite.chunk.js +0 -2
- package/dist/scripts/4944-b565b5c501-lite.chunk.js.map +0 -1
- package/dist/scripts/5220-40dd0842b5-lite.chunk.js.map +0 -1
- package/dist/scripts/5224-09e451b12f-lite.chunk.js.map +0 -1
- package/dist/scripts/5836-f212660b94-lite.chunk.js.map +0 -1
- package/dist/scripts/5936-f1e642e93f-lite.chunk.js.map +0 -1
- package/dist/scripts/6118-d069072bb6-lite.chunk.js.map +0 -1
- package/dist/scripts/6263-c665ac8df6-lite.chunk.js.map +0 -1
- package/dist/scripts/6599-c87f4f5ec1-lite.chunk.js.map +0 -1
- package/dist/scripts/6741-1ee9b683c7-lite.chunk.js.map +0 -1
- package/dist/scripts/6934-1f439ec9a2-lite.chunk.js +0 -2
- package/dist/scripts/6934-1f439ec9a2-lite.chunk.js.map +0 -1
- package/dist/scripts/7234-d1a173cb25-lite.chunk.js.map +0 -1
- package/dist/scripts/7556-69f8cb3b20-lite.chunk.js.map +0 -1
- package/dist/scripts/7709-57c48d288e-lite.chunk.js.map +0 -1
- package/dist/scripts/8813-1e58ad1895-lite.chunk.js +0 -2
- package/dist/scripts/8813-1e58ad1895-lite.chunk.js.map +0 -1
- package/dist/scripts/9139-456a0f14a5-lite.chunk.js.map +0 -1
- package/dist/scripts/9173-e03b30b436-lite.chunk.js.map +0 -1
- package/dist/scripts/9284-80c3abfe62-lite.chunk.js +0 -2
- package/dist/scripts/9284-80c3abfe62-lite.chunk.js.map +0 -1
- package/dist/scripts/bundle-7da429ea24.min.js +0 -3
- package/dist/scripts/bundle-7da429ea24.min.js.map +0 -1
- /package/dist/css/{3525-lite-6ab6e749cb.chunk.css → 1041-lite-6ab6e749cb.chunk.css} +0 -0
- /package/dist/css/{8813-lite-6ab6e749cb.chunk.css → 2015-lite-6ab6e749cb.chunk.css} +0 -0
- /package/dist/scripts/{170-94b806dc73-lite.chunk.js.LICENSE.txt → 170-233a87b708-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4013-3d2edd41fb-lite.chunk.js.LICENSE.txt → 4013-2aff1769f5-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5220-40dd0842b5-lite.chunk.js.LICENSE.txt → 5220-e0074ed079-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6599-c87f4f5ec1-lite.chunk.js.LICENSE.txt → 6599-d8f1b255c5-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6741-1ee9b683c7-lite.chunk.js.LICENSE.txt → 6741-638b658087-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7556-69f8cb3b20-lite.chunk.js.LICENSE.txt → 7556-276466341c-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9395-70cd9ae3a1-lite.chunk.js.LICENSE.txt → 9395-355efbc0e7-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{953-45aa51744b-lite.chunk.js.LICENSE.txt → 953-b3b777612b-lite.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,KAAKnC,KACxCtB,iBAAkB4M,EAAenJ,KAAKsB,GACtC+d,eAAgB,wBACf,OAaA,OAjCGC,EAAU,EAAH,KAsBbjU,EAAA,gBAA8B,CAC5BkU,aAAcR,EAAShf,KACvB4R,QAASoN,EAASpN,QAClBzV,eAAgBmT,EAAarP,KAAKsB,GAClC/E,iBAAkB4M,EAAenJ,KAAKsB,GACtC8d,YAAalV,GAAUlK,KAAKsB,IAC3B,CACDP,WAAY,YACZE,SAAU,0BACVD,OAAQ,cACRwL,cAAe,gBACd,kBAEI8S,GAAO,0CACf,EAsGOlN,kBAAmBnV,EAAMuc,YAAY9N,MACrCgK,WAAYA,GAAW1V,KACvBgW,UAAW+F,GAAA,UACX7H,YAAajX,EAAMuc,YAAYiE,IAC/B9K,cAAeA,GACf8B,aAAcA,EAAazU,KAC3B8V,MAAOiG,GAAA,UACP1L,2BAA4BA,GAC5BC,wBAAyBA,GACzB1Q,IAAKsJ,EAAA,oBAA+BC,EAAenJ,KAAM/C,EAAM+d,YAE/DtE,SAAUA,EACV1C,SAAUA,MA/CT,gBAACmE,GAA8B,KAoD1C,oCEpXA,SAAgB,gBAAkB,QAAQ,IAAM,QAAQ,SAAW,QAAQ,YAAc,QAAQ,QAAU","sources":["file:///app/packages/libs/shared/src/apps/calendar/flight-request/CalendarRequests.ts","file:///app/packages/libs/shared/src/apps/subjects/components/audience-item/audience-item.scss","file:///app/packages/libs/shared/src/apps/subjects/components/audience-item/AudienceItem.tsx","file:///app/packages/libs/shared/src/apps/upload/utils/FileExtensionsHelper.ts","file:///app/packages/libs/shared/src/components/pill-tab-selector/PillTabSelector.tsx","file:///app/packages/libs/shared/src/components/table-of-contents-list/table-of-contents-list.scss","file:///app/packages/libs/shared/src/components/table-of-contents-list/TableOfContentsList.tsx","file:///app/packages/libs/shared/src/enums/FeedbackType.ts","file:///app/packages/libs/shared/src/errors/handlers/HttpErrorHandlers.ts","file:///app/packages/libs/shared/src/flight-requests/FeedbackRequests.ts","file:///app/packages/libs/shared/src/hooks/UseHandleObjectError.ts","file:///app/packages/libs/shared/src/hooks/usePrevious.ts","file:///app/packages/libs/shared/src/hooks/useTableOfContentsActiveHeading.tsx","file:///app/packages/libs/shared/src/hooks/useTableOfContentsScroll.tsx","file:///app/packages/libs/shared/src/utils/FeedbackFormHelper.ts","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/classification-header-details/ClassificationHeaderDetails.tsx","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/empty-state/CuratedClassificationEmptyState.tsx","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/table-of-contents/table-of-contents.scss","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/table-of-contents/TableOfContents.tsx","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/teacher-only/TeacherOnlyEmptyState.tsx","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/classification-coming-soon/ClassificationComingSoon.tsx","file:///app/packages/libs/shared/src/apps/subjects/components/audience-filter/AudienceFilter.tsx","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/audiences/ClassificationDashboardAudiences.tsx","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/classification-tabs/classification-tabs.scss","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/classification-tabs/ClassificationTabs.tsx","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/classification-dashboard-nav/ClassificationDashboardNav.tsx","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/ClassificationDashboard.tsx","file:///app/packages/libs/shared/src/apps/subjects/hooks/useGetTopicsWidgets.ts","file:///app/packages/libs/shared/src/apps/subjects/components/classification-dashboard/partial-loading/PartialClassificationDashboard.tsx","file:///app/packages/libs/shared/src/flight-requests/FollowRequests.ts","file:///app/packages/projects/lite/src/apps/subjects/errors/TopicNotFoundError.ts","file:///app/packages/projects/lite/src/apps/sign-up/utils/SignUpHelper.ts","file:///app/packages/projects/lite/src/apps/subjects/views/classification/ClassificationViewUtils.ts","file:///app/packages/projects/lite/src/apps/subjects/views/classification/curated-classification-view.scss","file:///app/packages/projects/lite/src/apps/subjects/views/classification/CuratedClassificationView.tsx","file:///app/packages/projects/lite/src/apps/subjects/hooks/useFetchClassificationDashboard.ts","file:///app/packages/libs/shared/src/components/pill-tab-selector/pill-tab-selector.scss"],"sourcesContent":["import { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/flight';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { CalendarEvent, CalendarEventContentType } from 'libs/shared/interfaces';\n\nexport const CalendarRequests = {\n calendarEvents(\n from: string,\n to: string,\n presentationId: string\n ): Flight.PublicRequest {\n return {\n url: UrlHelper.urlBuilder('{gateway}/v1/discover/special-events/content', { from, to, presentationId }),\n publicUrl: UrlHelper.urlBuilder(`/api/discover/special-events/content`, { from, to, presentationId }),\n key: `presentation:${presentationId}:events:from:${from}:to${to}`\n };\n },\n\n nextTopicSpecialEvent(\n classificationId: string,\n presentationId: string\n ): Flight.PublicRequest {\n const params = {\n presentationId,\n limit: 1,\n from: DateHelper.format(new Date(), 'YYYY-MM-DD'),\n objectType: CalendarEventContentType.Classification\n };\n\n return {\n url: UrlHelper.urlBuilder(`{gateway}/v1/discover/special-events/object/${classificationId}/next-events`, params),\n publicUrl: UrlHelper.urlBuilder(`/api/discover/special-events/object/${classificationId}/next-events`, params),\n key: `presentation:${presentationId}:events:classification:${classificationId}`,\n formatData: (events: CalendarEvent[]) => ArrayHelper.first(events)\n };\n }\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"disabled\":\"pERi4\",\"disabledHighlighted\":\"AxyWm\"};","import * as React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\n\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport styles from './audience-item.scss';\n\nconst namespace = 'shared.audienceItem';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nfunction lowerCaseToTitleCase(str: string): string {\n return str.split(' ').map((s: string) => s.charAt(0).toUpperCase() + s.substring(1)).join(' ');\n}\n\nfunction getColourClass(highlight: boolean, isDisabled: boolean): string {\n if (highlight) return isDisabled ? `${styles.disabledHighlighted} text-light` : 'bg-gray-900 text-light';\n if (isDisabled) return `${styles.disabled} text-secondary`;\n return 'bg-light';\n}\n\ninterface AudienceItemProps {\n audience: PresentationAudience;\n highlight: boolean;\n setAudience?: (audience: PresentationAudience, highlight: boolean) => void;\n isDisabled?: boolean;\n extraClasses?: string;\n}\n\nAudienceItem.defaultProps = {\n extraClasses: ''\n};\n\nexport function AudienceItem(props: AudienceItemProps): React.ReactElement {\n const { audience, highlight, setAudience, isDisabled, extraClasses } = props;\n\n const colourClass = getColourClass(highlight, isDisabled);\n const cursorClass = isDisabled ? 'cursor-default' : 'cursor-pointer';\n const className = `rounded-pill d-inline-block me-1 user-select-none ${cursorClass} ${colourClass} ${extraClasses}`;\n\n const onClick = () => {\n if (isDisabled || !FunctionHelper.isFunction(setAudience))\n return;\n\n setAudience(audience, !highlight);\n };\n\n return (\n <button\n className={className}\n onClick={onClick}\n role='checkbox'\n aria-checked={highlight}\n aria-label={`${getPhrase('ariaFilter')} ${audience.name}`}\n disabled={isDisabled}\n >\n {lowerCaseToTitleCase(audience.name)}\n </button>\n );\n}","import * as _ from 'underscore';\n\n/**\n * This are kept as separate variables for when we eventually need a single group of them.\n * For example when we add image upload support.\n */\n\nconst pdfExtensions = ['pdf'];\nconst docExtensions = [ 'doc', 'docx', 'dotx', 'dot', 'rtf', 'docm', 'odt' ];\nconst textExtensions = [ 'csv', 'txt' ];\nconst excelExtensions = [ 'xls', 'xlt', 'xlsx' ];\nconst imageExtensions = [ 'jpg', 'tif', 'png', 'bmp', 'gif', 'jpeg' ];\nconst videoMimeType = 'video/*';\nconst archiveExtensions = [ 'zip', 'rar' ];\nconst powerPointExtensions = [ 'ppt', 'pot', 'pps', 'pptx' ];\n\nconst subtitleExtensions = ['srt'];\n\nconst FileExtensions = {\n IMAGES: `.${imageExtensions.join(',.')}`,\n VIDEO: videoMimeType,\n MIXED_MEDIA: `.${imageExtensions.join(',.')},${videoMimeType}`,\n RESOURCES: `.${[\n ...docExtensions,\n ...excelExtensions,\n ...powerPointExtensions,\n ...pdfExtensions,\n ...textExtensions,\n ...imageExtensions,\n ...archiveExtensions\n ].join(',.')}`,\n SUBTITLES: `.${subtitleExtensions.join(',.')}`\n};\n\nconst FileExtensionHelper = {\n getResourceType(extension: string): string {\n const ext = extension.toLowerCase();\n\n if (_.contains(docExtensions, ext)) return 'document';\n if (_.contains(excelExtensions, ext)) return 'excel';\n if (_.contains(powerPointExtensions, ext)) return 'powerpoint';\n if (_.contains(pdfExtensions, ext)) return 'pdf';\n\n if (_.contains(textExtensions, ext)) return 'text';\n if (_.contains(imageExtensions, ext)) return 'image';\n if (_.contains(archiveExtensions, ext)) return 'archive';\n if (_.contains(subtitleExtensions, ext)) return 'subtitle';\n\n return '';\n }\n};\n\nexport { FileExtensions, FileExtensionHelper };","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { AnalyticsOptions } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\n\nimport { SvgContainer } from '../svg-container/SvgContainer';\n\nimport styles from './pill-tab-selector.scss';\n\ninterface TabContentsProps {\n tab: PillTab;\n}\n\nfunction TabContents(props: TabContentsProps): JSX.Element {\n return (\n <>\n {!!props.tab.svgName && (\n <div className={props.tab.name ? 'pe-1' : ''}>\n <SvgContainer svgName={props.tab.svgName} />\n </div>\n )}\n\n {props.tab.name}\n\n {typeof (props.tab.count) === 'number' && (\n <div className='ps-2'>\n <Badge type={BadgeType.Count} data={props.tab.count} />\n </div>\n )}\n </>\n );\n}\n\nexport interface PillTab {\n name: string;\n active: boolean;\n svgName?: string;\n\n className?: string;\n\n appLink?: Core.AppLink;\n onSelect?: () => void;\n\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n\n count?: number;\n}\n\ninterface PillTabSelectorProps {\n tabs: PillTab[];\n containerRef?: (el: HTMLElement) => void;\n listClassName?: string;\n className?: string;\n borderRadius?: 'sm' | 'lg'\n}\n\nPillTabSelector.defaultProps = {\n borderRadius: 'lg'\n};\n\nexport function PillTabSelector(props: PillTabSelectorProps): JSX.Element {\n function onSelectTab(tab: PillTab): void {\n if (tab.active || !tab.onSelect)\n return;\n\n tab.onSelect();\n\n if (tab.analyticsData && tab.analyticsOptions)\n AnalyticsHelper.logUserAction(tab.analyticsData, tab.analyticsOptions);\n }\n\n return (\n <nav className={props.className ?? ''} ref={props.containerRef}>\n <ul className={`\n list-unstyled d-inline-block m-0 ${styles.pillTabSelector}\n ${props.borderRadius ? styles.radiusSmall : ''}\n ${props.listClassName}\n `}>\n {props.tabs.map((tab, index) => {\n return (\n <li\n className={`\n p-0 ${styles.tab} ${tab.active ? 'btn btn-dark' : 'btn btn-outline-dark'}\n ${tab.name ? styles.minWidth : ''} ${tab.className}\n `}\n key={index}\n >\n {tab.appLink ? (\n <AppLink\n appLink={tab.appLink}\n analyticsData={tab.analyticsData}\n analyticsOptions={tab.analyticsOptions}\n className={`\n cursor-pointer d-flex align-items-center justify-content-center\n text-decoration-none text-reset px-2 text-nowrap ${styles.tabLink}\n `}\n >\n <TabContents tab={tab} />\n </AppLink>\n ) : (\n <DivButton\n className={`\n cursor-pointer d-flex align-items-center justify-content-center\n text-decoration-none text-reset px-2 text-nowrap ${styles.tabLink}\n `}\n onClick={() => onSelectTab(tab)}\n >\n <TabContents tab={tab} />\n </DivButton>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n );\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"itemsWrapper\":\"m6mGm\",\"anchorWrapper\":\"QptZj\",\"default\":\"_AZa8\",\"selectedItem\":\"Nuiel\",\"disabled\":\"WIzWJ\",\"floatIcon\":\"ARudn\",\"arrowIcon\":\"tEF5Q\",\"listIcon\":\"Ql2wi\"};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { ScrollHelper } from 'libs/common/backbone/utils/ScrollHelper';\n\nimport { EntityType, HashObject, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\n\nimport styles from './table-of-contents-list.scss';\n\nexport interface TableOfContentsItem<T=string> {\n name: string;\n id: T;\n tocIndentation?: number;\n}\n\ninterface TableOfContentsProps<T> {\n items: TableOfContentsItem<T>[];\n activeId: string;\n appLink?: Core.AppLink;\n analyticsData?: HashObject;\n setControlledId: (arg: string) => void;\n // set to true if the TOC is controlled by a local state rather than query params\n localState?: boolean;\n getAppLink?: (args: TableOfContentsItem<T>) => Core.AppLink;\n onItemClick?: (args: TableOfContentsItem<T>) => void;\n}\n\nexport function TableOfContentsList<T extends string>(props: TableOfContentsProps<T>): JSX.Element {\n const analyticsOptions = {\n actionType: UserAction.Click,\n entity: EntityType.Widget,\n location: LocationContext.TableOfContents\n };\n\n function onItemSelect(item: TableOfContentsItem<T>) {\n ScrollHelper.preventScrollTop();\n props.setControlledId(item.id);\n \n props.onItemClick?.(item);\n \n setTimeout(() => document.getElementById(item.id)?.focus());\n }\n\n return (\n <div className={`${styles.itemsWrapper}`}>\n {props.items.map((item, idx) => {\n if (props.localState) {\n return (\n <DivButton\n key={item.id}\n className={`${styles.anchorWrapper} ${props.activeId === item.id ? styles.selectedItem : ''}`}\n onClick={() => {\n onItemSelect(item);\n }}\n >\n <div className={`${!props.activeId && idx === 0 ? styles.default : ''} `}>\n {item.name}\n </div>\n </DivButton>\n );\n }\n\n return (\n <AppLink\n key={item.id}\n appLink={props.getAppLink(item)}\n appLinkOptions={{ replace: true }}\n className={`${styles.anchorWrapper} ${props.activeId === item.id ? styles.selectedItem : ''}`}\n onClick={() => {\n onItemSelect(item);\n }}\n analyticsData={{\n ...props.analyticsData,\n id: item.id,\n name: item.name\n }}\n analyticsOptions={analyticsOptions}\n >\n <div className={`${!props.activeId && idx === 0 ? styles.default : ''} ${item.tocIndentation ? 'ms-3' : ''}`}>\n {item.name}\n </div>\n </AppLink>\n );\n })}\n </div>\n );\n}","export enum FeedbackType {\n Other,\n SuggestImprovement,\n ReportBug,\n RequestVideo,\n RaiseIssue,\n GivePraise,\n Footer,\n RequestLivestream\n}","import { BaseError } from 'libs/common/backbone/core/BaseError';\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Xhr } from 'libs/common/backbone/interfaces';\nimport { Core } from 'libs/common/core';\n\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { PrivateResourceError } from 'libs/shared/errors/general/private-resource/PrivateResourceError';\nimport { RegionLockedResourceError } from 'libs/shared/errors/general/region-locked-resource/RegionLockedResourceError';\nimport { UnspecifiedError } from 'libs/shared/errors/general/unspecified-error/UnspecifiedError';\nimport { VideoTypes } from 'libs/shared/interfaces';\n\nexport interface HttpErrorMap {\n notFound?: new () => BaseError;\n forbidden?: {\n rating?: new (description: string) => BaseError;\n yearLevel?: new (description: string) => BaseError;\n region?: new () => BaseError;\n privacy?: new (video?: VideoTypes) => BaseError;\n };\n badRequest?: new () => BaseError;\n}\n\nexport type IgnoreHttpErrorMap = {\n [key in keyof HttpErrorMap]: boolean;\n};\n\nconst defaultErrors: HttpErrorMap = {\n notFound: NotFoundError,\n forbidden: {\n rating: PrivateResourceError,\n yearLevel: PrivateResourceError,\n region: RegionLockedResourceError,\n privacy: PrivateResourceError\n },\n badRequest: UnspecifiedError\n};\n\nexport function handleHttpError(\n info: HttpStatus | Xhr,\n customErrorMap: HttpErrorMap = {},\n /**\n * Prevent certain errors in the errorMap from being thrown\n * so that you may implement your own handler\n */\n ignoreMap: IgnoreHttpErrorMap = {}\n): void {\n if (!info)\n return;\n\n let statusCode: HttpStatus;\n\n if (typeof(info) === 'number') {\n statusCode = info;\n } else {\n statusCode = info.status;\n }\n\n const errorMap = {\n ...defaultErrors,\n ...customErrorMap\n };\n\n if (!statusCode)\n return;\n\n if (!Core.ErrorHelper.isStatusCodeError(statusCode))\n return;\n\n if (statusCode === HttpStatus.NotFound) {\n if (!ignoreMap.notFound)\n Core.ErrorHelper.throw(new errorMap.notFound());\n return;\n }\n\n if (statusCode === HttpStatus.Forbidden) {\n /**\n * TODO: Work out how to go about handling all forbidden errors, such as region locking, year levels,\n * ratings, and privacy.\n */\n if (!ignoreMap.forbidden)\n Core.ErrorHelper.throw(new errorMap.forbidden.privacy());\n return;\n }\n\n if (!ignoreMap.badRequest)\n Core.ErrorHelper.throw(new errorMap.badRequest());\n}\n\nexport function handleXhrError(xhr: Xhr, customErrorMap?: HttpErrorMap): void {\n handleHttpError(xhr.status, customErrorMap);\n}","import { HttpVerbs } from 'libs/common/backbone/enums/HttpVerbs';\nimport { Flight } from 'libs/common/react/index';\n\nimport { FeedbackFormRequest } from 'libs/shared/interfaces/requests/FeedbackFormRequest';\n\nexport const FeedbackRequests = {\n submitFeedback(requestData: FeedbackFormRequest, formValues: Record<string, string>): Flight.Request {\n return {\n url: '{gateway}/v1/feedback',\n key: 'submit:feedback',\n type: HttpVerbs.POST,\n data: {\n ...requestData,\n ...formValues\n }\n };\n }\n};","import { useEffect } from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { handleHttpError, HttpErrorMap, IgnoreHttpErrorMap } from 'libs/shared/errors/handlers/HttpErrorHandlers';\n\nfunction generateCacheKey(flightObjs: Array<Flight.Response<any>>): string {\n return flightObjs.map(obj => obj.statusCode).join(':');\n}\n\n// TODO: Change this to just `useHandleHttpError` and only accept a status code.\nexport function useHandleObjectError(\n _flightObjs: Flight.Response<any> | Array<Flight.Response<any>>,\n customErrors?: HttpErrorMap,\n ignoreErrors?: IgnoreHttpErrorMap\n): void {\n const flightObjs = Array.isArray(_flightObjs) ? _flightObjs : [_flightObjs];\n\n useEffect(() => {\n flightObjs.forEach(obj => {\n handleHttpError(obj.statusCode, customErrors, ignoreErrors);\n });\n }, [ generateCacheKey(flightObjs), customErrors, ignoreErrors ]);\n}","import React from 'react';\n\n// https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state\nexport function usePrevious<T>(value: T): T {\n const ref = React.useRef<T>();\n React.useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}","import React from 'react';\n\ntype TableOfContentsActiveOption = {\n setActiveId: (id: string) => void;\n headingElements: Element[];\n controlledId?: string;\n setControlledId?: (arg: string) => void;\n}\n\nlet timer: number;\n\nexport const useTableOfContentsActiveHeading = (\n { setActiveId, headingElements, controlledId, setControlledId }: TableOfContentsActiveOption\n) => {\n const scrollPositionRef = React.useRef(0);\n\n React.useEffect(() => {\n const callback = (headings: IntersectionObserverEntry[]) => {\n headings.forEach(heading => {\n if (controlledId) {\n setActiveId(controlledId);\n // can use scrollEnd event when the new event type is supported\n timer = window.setTimeout(() => {\n setControlledId('');\n }, 800);\n return;\n }\n if (heading.isIntersecting) {\n setActiveId(heading.target.id);\n scrollPositionRef.current = window.scrollY;\n } else {\n const scrollDistance = scrollPositionRef.current - window.scrollY;\n const isScrollingUp = scrollDistance > 0;\n const curIndex = headingElements.findIndex(h => h.id === heading.target.id);\n const prevHeading = headingElements[curIndex - 1];\n if (isScrollingUp && prevHeading?.id) {\n setActiveId(prevHeading?.id);\n }\n }\n });\n };\n\n const observer = new IntersectionObserver(callback, {\n // rootMargin top: same as the cv-nav-height\n rootMargin: '-67px 0px -80% 0px'\n });\n\n headingElements.forEach(element => observer.observe(element));\n\n return () => {\n timer && window.clearTimeout(timer);\n observer.disconnect();\n };\n }, [ setActiveId, headingElements.length, controlledId ]);\n};\n\n","import React from 'react';\n\nimport { usePrevious } from './usePrevious';\n\nconst HEADER_OFFSET = 80; // Size of header + some extra spacing\n\nexport const useTableOfContentsScroll = (elements: Element[], activeId: string) => {\n const [ hasDoneInitialScroll, setHasDoneInitialScroll ] = React.useState(false);\n\n const previousId = usePrevious(activeId);\n const currentId = activeId;\n\n React.useLayoutEffect(() => {\n if (!hasDoneInitialScroll || previousId !== currentId) {\n const target = elements.find(heading => heading && (heading?.id === currentId));\n\n if (target) {\n const rec = target.getBoundingClientRect();\n\n window.scrollBy({\n top: rec.top - HEADER_OFFSET,\n behavior: 'smooth'\n });\n \n if (!hasDoneInitialScroll)\n setHasDoneInitialScroll(true);\n }\n }\n }, [ elements, previousId, currentId, hasDoneInitialScroll ]);\n};","import Dropzone from 'dropzone';\n\nimport { UploadItem } from 'libs/shared/apps/upload/services/UploadService';\nimport { FileExtensions } from 'libs/shared/apps/upload/utils/FileExtensionsHelper';\nimport { InstanceRegion } from 'libs/shared/enums/InstanceRegion';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { UserRole } from 'libs/shared/enums/UserRole';\nimport { CurrentUser, Customer } from 'libs/shared/interfaces';\nimport { FeedbackUserDetails } from 'libs/shared/interfaces/requests/FeedbackFormRequest';\n\nexport const FeedbackFormHelper = {\n getUserInfo: (\n currentUser: CurrentUser,\n customer: Customer\n ): FeedbackUserDetails => {\n return {\n id: currentUser.id,\n username: currentUser.username,\n email: currentUser.email,\n userType: currentUser.role === UserRole.Admin ? 'Admin' : 'Staff',\n customerId: currentUser.customerId,\n cvcId: customer.crmId,\n customerName: customer.name,\n instanceRegion: currentUser.instanceRegion,\n contentRegion: currentUser.contentRegion,\n firstName: currentUser.givenName,\n lastName: currentUser.familyName\n };\n },\n\n mapInstanceRegionToTag: (instanceRegion: InstanceRegion): string => {\n switch (instanceRegion) {\n case InstanceRegion.AU:\n return 'au';\n case InstanceRegion.NZ:\n return 'nz';\n case InstanceRegion.UK:\n return 'uk';\n case InstanceRegion.US:\n return 'us';\n }\n },\n\n getTags: (currentUser: CurrentUser, product: ProductId, hasStudentExperience: boolean, extraTags: string[]) => {\n const tags = [\n product,\n ...extraTags\n ];\n\n tags.push(hasStudentExperience ? 'student' : 'staff');\n \n if (currentUser.role === UserRole.Admin)\n tags.push('administrator');\n \n const regionTag = FeedbackFormHelper.mapInstanceRegionToTag(currentUser.instanceRegion);\n \n if (regionTag)\n tags.push(regionTag);\n\n return tags;\n },\n\n categorizeFiles(files: UploadItem[]) {\n return files.reduce((result, file) => {\n const fileInfo = file.get('fileInfo');\n if (Dropzone.isValidFile(file.get('file'), FileExtensions.VIDEO)) {\n result.videoUrls.push(fileInfo?.url);\n } else {\n result.imageUrls.push(fileInfo?.url);\n }\n return result;\n }, {\n imageUrls: [],\n videoUrls: []\n });\n }\n};","import React from 'react';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { Classification } from 'libs/shared/interfaces';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nconst namespace = 'subject.classificationHeaderDetails';\n\nconst Separator = ({ className }: { className: string }) =>\n <span className={className}>•</span>;\n\ninterface ClassificationHeaderDetailsProps {\n classification: Classification;\n}\n\nexport function ClassificationHeaderDetails(props: ClassificationHeaderDetailsProps): React.ReactElement {\n const {\n dashboardVideoCount,\n childDashboardVideoCount,\n dashboardResourceCount,\n childDashboardResourceCount,\n childClassificationCount\n } = TopicsHelper.getCounts(props.classification);\n\n const videoCount = dashboardVideoCount + childDashboardVideoCount;\n const resourceCount = dashboardResourceCount + childDashboardResourceCount;\n \n return (\n <p className='mb-n1 font-size-normal fw-normal mt-1'>\n {!!childClassificationCount && (\n <Text\n namespace={namespace}\n phrase='topics'\n options={{ count: childClassificationCount.toLocaleString(), smartCount: childClassificationCount }}\n />\n )}\n\n {!!videoCount && (\n <>\n {childClassificationCount > 0 && <Separator className='mx-2' />}\n <Text\n namespace={namespace}\n phrase='videos'\n options={{ count: videoCount.toLocaleString(), smartCount: videoCount }}\n />\n </>\n )}\n {!!resourceCount && (\n <>\n <Separator className='mx-2' />\n <Text\n namespace={namespace}\n phrase='resources'\n options={{ count: resourceCount.toLocaleString(), smartCount: resourceCount }}\n />\n </>\n )}\n </p>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { Tooltip } from 'libs/shared/components/tooltip/Tooltip';\nimport { CuratedDashboard, DashboardStatus } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nconst namespace = 'subjects.curatedClassificationEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CuratedClassificationEmptyStateProps {\n dashboard: CuratedDashboard;\n imageUrl: string;\n isReadonly: boolean;\n addWidgetApplink?: () => Core.AppLink;\n}\n\nexport function CuratedClassificationEmptyState(props: CuratedClassificationEmptyStateProps): JSX.Element {\n const isArchived = props.dashboard?.status === DashboardStatus.Archived;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('headingForNP')} />\n {!props.isReadonly ? (\n <EmptyState.Heading>\n <Text phrase='headingForNP' />\n </EmptyState.Heading>\n ) : (\n <>\n <EmptyState.Heading>\n <Text namespace={namespace} phrase='headingForCurator' />\n </EmptyState.Heading>\n <EmptyState.Info>\n <Text namespace={namespace} phrase='info' />\n </EmptyState.Info>\n <Tooltip title={isArchived ? LanguageService.getPhrase(namespace, 'archivedCtaTooltip') : ''} spanHack>\n <EmptyState.Cta\n text={LanguageService.getPhrase(namespace, 'add')}\n appLink={props.addWidgetApplink?.()}\n className='btn btn-dark'\n icon={cvSvgLibrary.Plus}\n disabled={isArchived}\n />\n </Tooltip>\n </>\n )}\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"k1iOO\",\"mobile\":\"QwoBj\"};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, HashObject, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { IconButton } from 'libs/shared/components/icon-button/IconButton';\nimport { TableOfContentsList } from 'libs/shared/components/table-of-contents-list/TableOfContentsList';\nimport { CuratedWidget } from 'libs/shared/interfaces';\nimport { ContextService } from 'libs/shared/services/ContextService';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './table-of-contents.scss';\n\ninterface TableOfContentsContainerProps {\n widgets: CuratedWidget[];\n title: string;\n activeId: string;\n appLink?: Core.AppLink;\n clickable?: boolean;\n analyticsData?: HashObject;\n setControlledId: (arg: string) => void;\n isSmallScreen?: boolean;\n}\ninterface TableOfContentsProps extends TableOfContentsContainerProps {\n getAppLink: (widget: CuratedWidget) => Core.AppLink\n}\n\nfunction TableOfContentsMobile(props: TableOfContentsProps) {\n const [ isExpanded, setIsExpanded ] = React.useState(false);\n\n function logUserAction() {\n const analyticsOptions = {\n actionType: !isExpanded ? UserAction.Open : UserAction.Hide,\n entity: EntityType.TableOfContents,\n location: LocationContext.Dashboard\n };\n\n AnalyticsHelper.logUserAction(props.analyticsData, analyticsOptions);\n }\n\n function onClickIcon() {\n setIsExpanded(!isExpanded);\n logUserAction();\n }\n\n return (\n <div className={`${styles.mobile} d-inline-flex gap-1`}>\n \n {isExpanded && (\n <div className='bg-white px-3 pt-3 pb-2 border border-dark rounded-1 ps-3'>\n <h2 className='h5'>{props.title}</h2>\n <TableOfContentsList\n items={props.widgets.map(widget => (\n { name: widget.name, id: widget.id, tocIndentation: widget.metadata.tocIndentation }\n ))}\n activeId={props.activeId}\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n setControlledId={props.setControlledId}\n getAppLink={props.getAppLink}\n onItemClick={() => setIsExpanded(false)}\n />\n </div>\n )}\n <div className={styles.container}>\n <IconButton\n className='btn btn-outline-dark'\n svgName={cvSvgLibrary.TableOfContents}\n onClick={onClickIcon}\n />\n </div>\n </div>\n );\n}\n\nfunction TableOfContents(props: TableOfContentsProps): JSX.Element {\n return (\n <aside className='col-3 order-1'>\n <div className={`${styles.container} ps-3`}>\n <h2 className='h5'>{props.title}</h2>\n \n <TableOfContentsList\n items={props.widgets.map(widget => (\n { name: widget.name, id: widget.id, tocIndentation: widget.metadata.tocIndentation }\n ))}\n activeId={props.activeId}\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n setControlledId={props.setControlledId}\n getAppLink={props.getAppLink}\n />\n </div>\n </aside>\n );\n}\n\nexport function TableOfContentsContainer(props: TableOfContentsContainerProps): JSX.Element {\n function getAppLink(widget: CuratedWidget): Core.AppLink {\n const currentAppLink = ContextService.getCurrentRoute().appLink;\n \n const params: HashObject = currentAppLink.params\n ? { ...(currentAppLink.params as HashObject) }\n : {};\n\n params.tocId = widget.id;\n\n return {\n ...currentAppLink,\n params\n };\n }\n\n return (\n <>\n {!props.isSmallScreen\n ? <TableOfContents {...props} getAppLink={getAppLink} />\n : <TableOfContentsMobile {...props} getAppLink={getAppLink} />\n }\n </>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'subjects.teacherOnlyEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface TeacherOnlyEmptyStateProps {\n imageUrl: string;\n ctaAppLink?: () => Core.AppLink;\n}\n\nexport function TeacherOnlyEmptyState(props: TeacherOnlyEmptyStateProps): JSX.Element {\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('heading')} />\n <EmptyState.Heading>\n <Text phrase='heading' />\n </EmptyState.Heading>\n <EmptyState.Info>\n <Text phrase='info' />\n </EmptyState.Info>\n\n <EmptyState.Cta\n text={getPhrase('cta')}\n appLink={props.ctaAppLink?.()}\n className='btn btn-dark'\n />\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, SignUpDescriptors, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ActionButton } from 'libs/shared/components/actions/ActionButton';\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';\nimport { Classification } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nconst namespace = 'subjects.classificationComingSoon';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface ComingSoonProps {\n data: Classification;\n onToggleFollow?: () => void;\n canFollowSubjects: boolean;\n imageUrl: string;\n showFollowButtonSpinner: boolean;\n showSignUp: boolean;\n signUpAppLink: Core.AppLink;\n}\n\nexport function ClassificationComingSoon(props: ComingSoonProps): JSX.Element {\n const isFollowing = !!props.data.followers?.data?.length;\n function onClick(): void {\n props.onToggleFollow?.();\n }\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState className='pt-0'>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('comingSoon')} />\n\n <EmptyState.Heading>\n <Text phrase='comingSoon' />\n </EmptyState.Heading>\n\n <EmptyState.Info>\n <Text phrase={props.showSignUp ? 'infoAnon' : 'info'} />\n </EmptyState.Info>\n\n {props.canFollowSubjects && (\n <ActionButton\n svgName={isFollowing ? cvSvgLibrary.BellFilled : cvSvgLibrary.Bell}\n onClick={onClick}\n showSpinner={props.showFollowButtonSpinner}\n className={`btn follow-btn me-2 ${isFollowing ? 'btn-outline-dark' : 'btn-dark'}`}\n >\n <Text phrase={isFollowing ? 'following' : 'follow'} />\n </ActionButton>\n )}\n\n {props.showSignUp && !props.canFollowSubjects && (\n <AppLink\n appLink={props.signUpAppLink}\n className='btn btn-dark d-none d-lg-inline-block'\n analyticsOptions={{\n actionType: UserAction.Click,\n location: LocationContext.ClassificationComingSoon,\n entity: EntityType.AppLink,\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n }}\n analyticsData={{}}\n tag='button'\n >\n {getPhrase('signUp')}\n </AppLink>\n )}\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import * as React from 'react';\n\nimport { StorageType } from 'libs/common/backbone/utils/LocalStorageHelper';\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { AudienceItem } from 'libs/shared/apps/subjects/components/audience-item/AudienceItem';\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { Tooltip } from 'libs/shared/components/tooltip/Tooltip';\nimport { SharedViewModelKeys } from 'libs/shared/constants/SharedViewModelKeys';\nimport { PresentationAudience } from 'libs/shared/interfaces';\nimport { PartialLoadingHelper } from 'libs/shared/utils/PartialLoadingHelper';\n\nconst namespace = 'subjects.audienceFilter';\n\ninterface AudienceFilterProps {\n audiences: PresentationAudience[];\n activeAudiences?: PresentationAudience[];\n disabled?: boolean;\n appLink: Core.AppLink;\n disablePersist?: boolean;\n tooltip?: string;\n}\n\nexport function AudienceFilter(props: AudienceFilterProps): React.ReactElement {\n const { audiences, activeAudiences, appLink } = props;\n\n const isDisabled = props.disabled || !appLink;\n\n const [ , setActiveAudiences ] = useViewModel<PresentationAudience[]>(\n SharedViewModelKeys.AUDIENCE_FILTER,\n undefined,\n { storage: StorageType.SessionStorage }\n );\n\n React.useEffect(() => {\n if (!props.disablePersist)\n setActiveAudiences(activeAudiences);\n }, [activeAudiences]);\n\n function onToggleAudience(audience: PresentationAudience, isSelected: boolean): void {\n if (isDisabled)\n return;\n\n const activeAudienceNames = isSelected\n ? [ ...(activeAudiences?.map(a => a.name) ?? []), audience.name ]\n : activeAudiences.map(a => a.name).filter(name => name !== audience.name);\n\n const getParams = () => {\n const otherParams = ObjectHelper.omit(appLink.params, ['a']);\n\n if (!activeAudienceNames.length)\n return otherParams;\n\n return Object.assign({}, otherParams, { a: activeAudienceNames });\n };\n\n Core.AppLinkHelper.trigger({\n ...appLink,\n params: getParams()\n }, { replace: true });\n }\n\n function onClickClearAudiences(): void {\n if (isDisabled)\n return;\n\n const params = ObjectHelper.omit(appLink.params, ['a']);\n\n Core.AppLinkHelper.trigger({\n ...appLink,\n params\n }, { replace: true });\n }\n\n if (!audiences || !audiences.length)\n return <></>;\n\n return (\n <Tooltip title={props.tooltip} spanHack>\n <div className='d-flex flex-wrap row-gap-2'>\n {audiences.map((a: PresentationAudience) => (\n <AudienceItem\n key={a.masterId}\n audience={a}\n highlight={!isDisabled && !!activeAudiences?.find(aa => aa.masterId === a.masterId)}\n setAudience={onToggleAudience}\n isDisabled={isDisabled}\n />\n ))}\n {(!isDisabled && !!activeAudiences && !!Object.keys(activeAudiences).length) && (\n <DivButton className='info-link d-inline-block ms-1' onClick={onClickClearAudiences}>\n <Text namespace={namespace} phrase='clear' />\n </DivButton>\n )}\n </div>\n </Tooltip>\n );\n}\n\nconst PARTIAL_AUDIENCES = PartialLoadingHelper.getPartialLoadingItems({ numItems: 6 });\n\nexport const PartialAudienceFilter = () => (\n <div className={'d-flex flex-wrap row-gap-2'}>\n {PARTIAL_AUDIENCES.map(({ width }, idx) => (\n <span\n key={idx}\n className='rounded-pill partial-loading-background me-1'\n dangerouslySetInnerHTML={{ __html: ' ' }}\n style={{ width }}\n />\n ))}\n </div>\n);","import React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AudienceFilter } from 'libs/shared/apps/subjects/components/audience-filter/AudienceFilter';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\ninterface ClassificationDashboardAudiencesProps {\n audiences: PresentationAudience[];\n activeAudiences: PresentationAudience[];\n appLink: Core.AppLink;\n disabled: boolean;\n disablePersist: boolean;\n tooltip: string;\n}\n\nexport function ClassificationDashboardAudiences(props: ClassificationDashboardAudiencesProps): JSX.Element {\n return (\n <AudienceFilter\n audiences={props.audiences}\n activeAudiences={props.activeAudiences}\n disabled={props.disabled}\n appLink={props.appLink}\n disablePersist={props.disablePersist}\n tooltip={props.tooltip}\n />\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"curatedTopicTab\":\"CmVlO\",\"tabTransition\":\"rX31t\"};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { PillTab, PillTabSelector } from 'libs/shared/components/pill-tab-selector/PillTabSelector';\nimport { WidgetAppLinks } from 'libs/shared/components/widgets/curated-widgets/WidgetProps';\nimport { useProductTipsContext } from 'libs/shared/context/product-tips-context/ProductTipsContext';\nimport { Breakpoints, useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { Classification, Presentation } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { useDirectoryTabProductTipSwitcher } from '../../../hooks/useDirectoryTabProductTipSwitcher';\n\nimport styles from './classification-tabs.scss';\n\nconst namespace = 'shared.classificationDashboard';\n\nexport type ClassificationTab = 'new-releases' | 'all-topics' | 'curated-topic' | 'video-list';\n\nfunction getTabs(\n props: ClassificationTabsProps,\n breakpoints: Breakpoints,\n activeTab: ClassificationTab,\n isHighlighting: boolean\n): PillTab[] {\n const showText = breakpoints.lg || breakpoints.xl || breakpoints.xxl || breakpoints.xs;\n\n function getTopicTabClassName(): string {\n let className = isHighlighting ? styles.tabTransition : '';\n\n if (breakpoints.xs)\n return className + ' w-100';\n\n if (showText)\n return className = ` ${styles.curatedTopicTab}`;\n\n return className;\n }\n\n if (TopicsHelper.isTopLevelTopic(props.classification)) {\n return [{\n name: showText ? LanguageService.getPhrase(namespace, 'newReleases') : '',\n appLink: props.appLinks?.classification?.(props.classification),\n active: activeTab === 'new-releases',\n svgName: cvSvgLibrary.Sparkle,\n analyticsData: {\n id: 'new-releases',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'newReleases'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classification?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: `${breakpoints.xs ? 'w-100' : ''} ${isHighlighting ? styles.tabTransition : ''}`\n \n }, {\n name: showText ? LanguageService.getPhrase(namespace, 'allTopics') : '',\n appLink: props.appLinks?.classificationDirectory?.(props.classification),\n active: activeTab === 'all-topics',\n svgName: cvSvgLibrary.Grid,\n analyticsData: {\n id: 'all-topics',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'allTopics'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classificationDirectory?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: `${breakpoints.xs ? 'w-100' : ''} ${isHighlighting ? styles.tabTransition : ''}`\n }];\n }\n\n return [{\n name: showText ? LanguageService.getPhrase(namespace, 'topic') : '',\n appLink: props.appLinks?.classification?.(props.classification),\n active: activeTab === 'curated-topic',\n svgName: cvSvgLibrary.Rectangles,\n analyticsData: {\n id: 'curated-topic',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'topic'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classification?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: getTopicTabClassName()\n }, {\n name: showText ? LanguageService.getPhrase(namespace, 'videoList') : '',\n appLink: props.appLinks?.classificationVideos?.(props.classification),\n active: activeTab === 'video-list',\n svgName: cvSvgLibrary.WidgetSeries,\n analyticsData: {\n id: 'video-list',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'videoList'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classificationVideos?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: `${breakpoints.xs ? 'w-100' : ''} ${isHighlighting ? styles.tabTransition : ''}`\n }];\n}\n\ninterface ClassificationTabsProps {\n classification: Classification;\n presentation: Presentation;\n appLinks: WidgetAppLinks;\n activeTab: ClassificationTab;\n}\n\nexport function ClassificationTabs(props: ClassificationTabsProps): JSX.Element {\n const breakpoints = useBreakpoints();\n const { tab, isHighlighting } = useDirectoryTabProductTipSwitcher(props.activeTab);\n\n const { setProductTipRef } = useProductTipsContext('topics-directory-tab');\n\n return (\n <PillTabSelector\n borderRadius='sm'\n containerRef={el => setProductTipRef(el)}\n className={breakpoints.xs ? 'w-100' : ''}\n listClassName='d-flex flex-nowrap'\n tabs={getTabs(props, breakpoints, tab, isHighlighting)}\n />\n );\n}","import React from 'react';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { WidgetAppLinks } from 'libs/shared/components/widgets/curated-widgets/WidgetProps';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { Classification, CuratedDashboard, Presentation, PresentationAudience } from 'libs/shared/interfaces';\nimport { AudienceHelper } from 'libs/shared/utils/audience-helper/AudienceHelper';\nimport { CuratedDashboardHelper } from 'libs/shared/utils/DashboardHelper';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { ClassificationDashboardAudiences } from '../audiences/ClassificationDashboardAudiences';\nimport { ClassificationTab, ClassificationTabs } from '../classification-tabs/ClassificationTabs';\n\nfunction shouldHideAudiences(\n audiences: PresentationAudience[],\n activeAudiences: PresentationAudience[],\n isEmpty: boolean,\n isComingSoon: boolean\n): boolean {\n if (isComingSoon)\n return true;\n\n if (isEmpty && !activeAudiences?.length)\n return true;\n\n if (!AudienceHelper.shouldShowAudiences(audiences))\n return true;\n\n return false;\n}\n\ninterface ClassificationDashboardNavProps {\n dashboard: CuratedDashboard;\n classification: Classification;\n presentation: Presentation;\n appLinks: WidgetAppLinks;\n activeTab: ClassificationTab;\n audiences: PresentationAudience[];\n activeAudiences: PresentationAudience[];\n getBreadcrumbs: () => Breadcrumb[];\n\n hasTopicDirectoryDashboard: boolean;\n hasTopicVideosDashboard: boolean;\n isComingSoon: boolean;\n isEmpty: boolean;\n isViewingCurrentPresentation: boolean;\n disableAudiences: boolean;\n audienceTooltip: string;\n}\n\nexport function ClassificationDashboardNav(props: ClassificationDashboardNavProps): JSX.Element {\n const breakpoints = useBreakpoints();\n\n const hideAudiences = shouldHideAudiences(\n props.audiences,\n props.activeAudiences,\n props.isEmpty,\n props.isComingSoon\n );\n\n function canShowTabs(): boolean {\n if (!props.classification || !props.dashboard)\n return false;\n\n if (CuratedDashboardHelper.isSystemGeneratedDashboard(props.dashboard.widgets))\n return false;\n\n /**\n * For our top-level topics, we can show the topic tab if the topic has a directory dashboard.\n */\n if (TopicsHelper.isTopLevelTopic(props.classification))\n return props.hasTopicDirectoryDashboard;\n\n /**\n * For our lower level topics, we can show the video tab if the topic has one\n */\n if (props.hasTopicVideosDashboard)\n return true;\n\n return false;\n }\n\n function getContainerClass(): string {\n let className = 'd-flex flex-column py-3 mb-3';\n\n if (!props.isComingSoon)\n className += ' border-bottom';\n\n if ((canShowTabs() || hideAudiences) && !breakpoints.xs)\n return className;\n\n return className + ' row-gap-3';\n }\n\n function getTopRowClass(): string {\n if (hideAudiences) {\n if (breakpoints.xs)\n return 'd-flex flex-column justify-content-between row-gap-3';\n\n return 'd-flex align-items-center justify-content-between';\n }\n\n let className = '';\n\n className += 'd-flex align-items-center justify-content-between mb-1';\n\n if (breakpoints.xs)\n className += ' row-gap-3 mb-0';\n\n return className;\n }\n\n function getBottomRowClass(): string {\n let className = 'd-flex align-items-end justify-content-between';\n\n if (breakpoints.xs)\n className += ' row-gap-3 flex-wrap';\n\n return className;\n }\n\n return (\n <div className={getContainerClass()}>\n <div className={getTopRowClass()}>\n <Breadcrumbs breadcrumbs={props.getBreadcrumbs?.()} />\n\n {canShowTabs() && hideAudiences && (\n <ClassificationTabs\n classification={props.classification}\n activeTab={props.activeTab}\n appLinks={props.appLinks}\n presentation={props.presentation}\n />\n )}\n </div>\n\n <div className={getBottomRowClass()}>\n {!hideAudiences && (\n <ClassificationDashboardAudiences\n audiences={props.audiences}\n activeAudiences={props.activeAudiences}\n appLink={props.appLinks.audience?.()}\n disabled={props.disableAudiences}\n tooltip={props.audienceTooltip}\n disablePersist={!props.isViewingCurrentPresentation}\n />\n )}\n\n {canShowTabs() && !hideAudiences && (\n <ClassificationTabs\n classification={props.classification}\n activeTab={props.activeTab}\n appLinks={props.appLinks}\n presentation={props.presentation}\n />\n )}\n </div>\n </div>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { AnalyticsOptions, HashObject, LocationContext } from 'libs/analytics/interfaces';\n\nimport { ClassificationHeaderDetails } from 'libs/shared/apps/subjects/components/classification-dashboard/classification-header-details/ClassificationHeaderDetails';\nimport { CuratedClassificationEmptyState } from 'libs/shared/apps/subjects/components/classification-dashboard/empty-state/CuratedClassificationEmptyState';\nimport { TableOfContentsContainer } from 'libs/shared/apps/subjects/components/classification-dashboard/table-of-contents/TableOfContents';\nimport { TeacherOnlyEmptyState } from 'libs/shared/apps/subjects/components/classification-dashboard/teacher-only/TeacherOnlyEmptyState';\nimport { useGetTopicsWidgets } from 'libs/shared/apps/subjects/hooks/useGetTopicsWidgets';\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { BannerHeader } from 'libs/shared/components/banner-header/BannerHeader';\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { DashboardFeedbackData } from 'libs/shared/components/feedback-form/FeedbackForm';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { WidgetHeader } from 'libs/shared/components/widgets/curated-widgets/components/header/WidgetHeader';\nimport { WidgetContainerView } from 'libs/shared/components/widgets/curated-widgets/WidgetContainerView';\nimport { WidgetAppLinks } from 'libs/shared/components/widgets/curated-widgets/WidgetProps';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { LocalPermissionName } from 'libs/shared/enums/PermissionName';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { HasLocalPermissionsFunc, HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { SettingsHash } from 'libs/shared/hooks/useSettings';\nimport { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { CalendarEvent, CalendarEventContentType, CanFavouriteFunc, Classification, CuratedDashboard, CuratedWidget, CuratedWidgetQueryParams, DashboardStatus, DashboardTargetType, FavouriteFunc, Presentation, PresentationAudience, YearGroup } from 'libs/shared/interfaces';\nimport { CuratedDashboardHelper } from 'libs/shared/utils/DashboardHelper';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { ClassificationComingSoon } from './classification-coming-soon/ClassificationComingSoon';\nimport { ClassificationDashboardNav } from './classification-dashboard-nav/ClassificationDashboardNav';\nimport { ClassificationTab } from './classification-tabs/ClassificationTabs';\n\nconst namespace = 'shared.classificationDashboard';\n\nfunction isHeadingWidget(widget: CuratedWidget) {\n return widget.widgetId === WidgetTypeId.Blurb && widget.templateId === WidgetTemplate.Heading;\n}\n\nfunction isTopicWidget(widget: CuratedWidget) {\n return widget.widgetId === WidgetTypeId.CuratedClassifications || widget.widgetId === WidgetTypeId.Classifications;\n}\n\ninterface ClassificationDashboardProps {\n dashboard: CuratedDashboard;\n classification: Classification;\n presentation: Presentation;\n hasPermissions: HasPermissionsFunc;\n hasLocalPermissions: HasLocalPermissionsFunc;\n resourceThumbnailFallbackImageUrl: string;\n hasTopicDirectoryDashboard: boolean;\n hasTopicVideosDashboard: boolean;\n tab: ClassificationTab;\n specialEvent?: CalendarEvent;\n\n audiences: PresentationAudience[];\n activeAudiences?: PresentationAudience[];\n\n getWidgetContentRequest: (\n id: string,\n params: CuratedWidgetQueryParams,\n widgetTemplate: WidgetTemplate\n ) => Flight.Request;\n\n getBannerActions?: () => ActionOptions[];\n getBreadcrumbs?: () => Breadcrumb[];\n onToggleFollow?: (classification: Classification, locationContext: LocationContext) => void;\n setFavourite?: FavouriteFunc;\n canFavourite?: CanFavouriteFunc;\n canFollowSubjects: boolean;\n onSubmitFeedback?: (feedback: DashboardFeedbackData) => Promise<void>;\n\n appLinks?: WidgetAppLinks;\n\n imageCdnUrl: string\n emptyImageUrl: string;\n comingSoonImageUrl?: string;\n\n analyticsOptions?: AnalyticsOptions;\n analyticsData?: HashObject;\n\n scrollToWidgetId?: string;\n tableOfContentsId?: string;\n\n // Means the dashboard contains no linked or working filters\n isReadonly?: boolean;\n\n // Means the dashboard is being previewed by ClickView staff either in product or in curator\n isPreviewing?: boolean;\n\n // Means the parent topic for the dashboard has a status of \"Coming Soon\"\n isComingSoon?: boolean;\n\n showFollowButtonSpinner?: boolean;\n \n isViewCurrentPresentation?: boolean;\n\n yearGroups?: YearGroup[];\n\n // By default widgets will always be lazyloaded. We override this behaviour only in extenuating \n // circumstances, such as dynamic rendering for SEO.\n lazyLoad?: boolean;\n\n moviesAndTv?: boolean;\n\n isTeacherOnly?: boolean;\n\n // Fallback url to display for the company logo. Only used by Streamable Learning atm\n companyLogoFallbackUrl?: string;\n\n subTextType?: VideoSubTextType;\n \n contentType?: CalendarEventContentType;\n\n isBot?: boolean;\n\n isPlugin: boolean;\n\n settings?: SettingsHash;\n}\n\nClassificationDashboard.defaultProps = {\n appLinks: {}\n};\n\nexport function ClassificationDashboard(props: ClassificationDashboardProps): JSX.Element {\n const { widgets, videoList, videoListWidgetId } = useGetTopicsWidgets(props.dashboard, props.activeAudiences);\n\n const isSmallScreen = useMediaQuery(MediaQueryStrings.LGDown);\n const headingRef = React.useRef<Set<Element>>(new Set());\n\n const initialEmptyWidgets = React.useMemo(() => {\n return widgets.reduce((acc: HashObject<boolean>, widget) => {\n acc[widget.id] = false;\n return acc;\n }, {});\n }, [widgets?.length]);\n\n const [ emptyWidgets, setEmptyWidgets ] = React.useState(initialEmptyWidgets);\n\n const [ controlledId, setControlledId ] = React.useState(props.tableOfContentsId);\n\n const [ tableOfContentActiveId, setTableOfContentActiveId ] = React.useState<string>('');\n\n const headingElements = Array.from(headingRef.current);\n useTableOfContentsScroll(headingElements, controlledId);\n useTableOfContentsActiveHeading({\n setActiveId: setTableOfContentActiveId,\n headingElements,\n controlledId,\n setControlledId\n });\n\n function shouldShowEmptyState(): boolean {\n if (props.isComingSoon)\n return false;\n\n if (props.isTeacherOnly)\n return false;\n\n if (!props.dashboard)\n return true;\n\n if (props.dashboard.status === DashboardStatus.Archived && !props.isReadonly)\n return true;\n\n if (props.dashboard.status === DashboardStatus.Draft && !props.isPreviewing)\n return true;\n\n if (!widgets?.length)\n return true;\n\n if (videoList && videoList.length)\n return false;\n\n return Object.values(emptyWidgets).every(state => !!state);\n }\n\n function getWidgetContentRequest(id: string, widgetTypeId: WidgetTypeId, template: WidgetTemplate): Flight.Request {\n const params = CuratedDashboardHelper.getWidgetParams(\n widgetTypeId,\n template,\n CuratedDashboardHelper.getDashboardTargetType(props.dashboard),\n props.activeAudiences?.map(a => a.masterId)\n );\n\n return props.getWidgetContentRequest(id, params, template);\n }\n\n const showEmptyState = shouldShowEmptyState();\n\n React.useEffect(() => {\n /**\n * When we add the first widget of the dashboard, the showEmptyState is `true`, the WidgetContainer is not going to be rendered to lazyload the `content`\n * so we set the emptyWidget to initial make sure the widget container is rendered to lazyload `widget.content`\n * and let the WidgetContainer to re-set the empty state based on the actual `widget.content` from backend\n */\n if (showEmptyState) {\n setEmptyWidgets(initialEmptyWidgets);\n }\n }, [widgets?.length]);\n\n const onSetIsEmpty = React.useCallback((widgetId: string, isEmpty: boolean) => {\n if (emptyWidgets[widgetId] === isEmpty)\n return;\n\n const newEmptyState = {\n ...emptyWidgets,\n [widgetId]: isEmpty\n };\n\n // The logic beneath this if-block doesn't apply to classification directories. This is because\n // classification directories don't support audience filtering, so widgets should never be empty,\n // meaning headings should never be hidden.\n if (CuratedDashboardHelper.isType(props.dashboard, DashboardTargetType.ClassificationDirectory)) {\n setEmptyWidgets(newEmptyState);\n return;\n }\n\n let index = 0;\n\n /**\n * Every time a widget is identified as empty, we check each heading blurb widget\n * to see if it should be hidden. This will be the case when all widgets beneath a heading\n * (up until the next heading) are empty.\n */\n while (index < widgets.length) {\n const currentWidget = widgets[index];\n\n if (!isHeadingWidget(currentWidget)) {\n index++;\n continue;\n }\n\n let isHeadingEmpty = true;\n let subWidgetIndex = index + 1;\n\n while (isHeadingEmpty && subWidgetIndex < widgets.length) {\n const headingSubWidget = widgets[subWidgetIndex];\n\n if (isHeadingWidget(headingSubWidget))\n break;\n\n if (!newEmptyState[headingSubWidget.id] && !isTopicWidget(headingSubWidget))\n isHeadingEmpty = false;\n\n subWidgetIndex++;\n }\n\n index = subWidgetIndex;\n\n newEmptyState[currentWidget.id] = isHeadingEmpty;\n }\n\n setEmptyWidgets(newEmptyState);\n }, [ emptyWidgets, widgets ]);\n\n function hideWidget(widget: CuratedWidget): boolean {\n return isHeadingWidget(widget) && emptyWidgets[widget.id];\n }\n\n function useLargeDashboardSpacing(): boolean {\n const target = CuratedDashboardHelper.getDashboardTargetType(props.dashboard);\n\n if (props.moviesAndTv || target === DashboardTargetType.ClassificationVideos)\n return false;\n\n return true;\n }\n\n function getWidgetHeading(widget: CuratedWidget, index: number): string {\n if (widget.widgetId === WidgetTypeId.ClassificationDashboardExternalMedia) {\n const previousWidget = widgets[index - 1];\n\n if (emptyWidgets[previousWidget.id])\n return widget.name.replace('Other videos', 'Videos');\n\n return widget.name;\n }\n\n return widget.name;\n }\n\n const widgetsInTableOfContents = widgets.filter(w => {\n return !hideWidget(w) && !!w.metadata?.showInTableOfContents;\n });\n\n const isTopicOnlyDashboard = widgets.every(isTopicWidget);\n\n const shouldShowTableOfContents = widgetsInTableOfContents.length >= 2;\n const shouldShowSideTableOfContents = shouldShowTableOfContents && !isSmallScreen;\n\n const shouldShowTopicCounts = (\n props.settings?.hasTopicDirectories &&\n TopicsHelper.isTopLevelTopic(props.classification)\n );\n\n /**\n * We don't put the .topic-dashboard class when we're in a movies and tv classification\n * because we don't want the extra padding between widgets.\n */\n return (\n <div className={`bg-white px-4 ${useLargeDashboardSpacing() ? 'dashboard-spacing-lg' : ''}`}>\n <BannerHeader\n heading={props.classification.name}\n banner={props.classification.banner}\n imageCdnUrl={props.imageCdnUrl}\n actions={props.getBannerActions?.()}\n actionsDropdownClassName='btn btn-outline-dark'\n specialEvent={props.specialEvent}\n calendarTheme={{\n background: 'bg-light-blue',\n border: 'border-light-blue'\n }}\n showComingSoon={props.isComingSoon}\n detailsComponent={shouldShowTopicCounts\n ? () => <ClassificationHeaderDetails classification={props.classification} />\n : null\n }\n />\n\n <ClassificationDashboardNav\n dashboard={props.dashboard}\n classification={props.classification}\n presentation={props.presentation}\n appLinks={props.appLinks}\n activeTab={props.tab}\n audiences={props.audiences}\n activeAudiences={props.activeAudiences}\n getBreadcrumbs={props.getBreadcrumbs}\n hasTopicDirectoryDashboard={props.hasTopicDirectoryDashboard}\n hasTopicVideosDashboard={props.hasTopicVideosDashboard}\n isComingSoon={props.isComingSoon}\n isEmpty={showEmptyState}\n isViewingCurrentPresentation={props.isViewCurrentPresentation}\n disableAudiences={isTopicOnlyDashboard || props.isReadonly}\n audienceTooltip={isTopicOnlyDashboard ? LanguageService.getPhrase(namespace, 'audienceTooltip') : ''}\n />\n\n {props.isComingSoon && (\n <ClassificationComingSoon\n imageUrl={props.comingSoonImageUrl}\n data={props.classification}\n canFollowSubjects={props.canFollowSubjects}\n showFollowButtonSpinner={props.showFollowButtonSpinner}\n onToggleFollow={() => props.onToggleFollow(props.classification, LocationContext.ClassificationComingSoon)}\n showSignUp={!props.hasLocalPermissions(LocalPermissionName.FollowComingSoonTopics)}\n signUpAppLink={props.appLinks.signUp?.()}\n />\n )}\n\n {!props.isComingSoon && (\n <div className={`${shouldShowSideTableOfContents ? 'row no-wrap' : ''}`}>\n {shouldShowTableOfContents && (\n <TableOfContentsContainer\n widgets={widgetsInTableOfContents}\n title={props.classification.name}\n activeId={tableOfContentActiveId}\n clickable={!props.isReadonly}\n analyticsData={props.analyticsData}\n setControlledId={setControlledId}\n isSmallScreen={isSmallScreen}\n />\n )}\n\n <div className={shouldShowSideTableOfContents ? 'col-9 order-0' : ''}>\n {widgets.map((widget, idx) => {\n if (hideWidget(widget))\n return <React.Fragment key={widget.id}></React.Fragment>;\n\n return (\n <WidgetContainerView\n headingElementRef={headingRef}\n key={widget.id}\n id={widget.id}\n name={getWidgetHeading(widget, idx)}\n description={widget.description}\n classification={props.classification}\n templateId={widget.templateId}\n widgetTypeId={widget.widgetId}\n audiences={props.audiences}\n getContentRequest={getWidgetContentRequest}\n setIsEmpty={onSetIsEmpty}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n appLinks={props.appLinks}\n yearGroups={props.yearGroups}\n presentation={props.presentation}\n analyticsData={props.analyticsData}\n isScrollToTargetWidget={props.scrollToWidgetId === widget.id}\n imageCdnUrl={props.imageCdnUrl}\n onSubmitFeedback={props.onSubmitFeedback}\n metadata={widget.metadata}\n isBot={props.isBot}\n hasTableOfContents={shouldShowSideTableOfContents}\n lazyLoad={props.lazyLoad}\n dashboardTarget={CuratedDashboardHelper.getDashboardTargetType(props.dashboard)}\n widgetIndex={idx}\n hasPermissions={props.hasPermissions}\n hasLocalPermissions={props.hasLocalPermissions}\n isPreviewing={props.isReadonly}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n contentType={props.contentType}\n resourceThumbnailFallbackImageUrl={props.resourceThumbnailFallbackImageUrl}\n preferences={widget.preferences}\n onToggleFollowClassification={props.onToggleFollow}\n isPlugin={props.isPlugin}\n settings={props.settings}\n isEditing={props.isReadonly}\n />\n );\n })}\n </div>\n\n {!!videoList?.length && (\n <>\n <WidgetHeader name={LanguageService.getPhrase(namespace, 'videos')} description='' />\n <VideoList\n videos={videoList}\n yearGroups={props.yearGroups}\n getVideoAppLink={(video, opts) => props.appLinks.videoType(\n video,\n { ...opts, contextId: videoListWidgetId, includeContext: opts.includeContext }\n )}\n getSubTextAppLink={props.appLinks.subText}\n hasPermissions={props.hasPermissions}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n presentationAudiences={props.audiences}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n getPreviewQuestionsAppLink={props.appLinks.previewQuestions}\n isPlugin={props.isPlugin}\n getClassroomGuideAppLink={props.appLinks.classroomGuide}\n getInteractiveGuidanceAppLink={props.appLinks.interactiveGuidance}\n getResourceGuidanceAppLink={props.appLinks.resourceGuidance}\n />\n </>\n )}\n </div>\n )}\n\n {showEmptyState && (\n <CuratedClassificationEmptyState\n dashboard={props.dashboard}\n isReadonly={props.isReadonly}\n imageUrl={props.emptyImageUrl}\n addWidgetApplink={props.appLinks.widgetWizard}\n />\n )}\n\n {props.isTeacherOnly && (\n <TeacherOnlyEmptyState\n imageUrl={props.emptyImageUrl}\n ctaAppLink={() => props.appLinks.allTopics(props.classification.presentationId)}\n />\n )}\n </div>\n );\n}","import React from 'react';\n\nimport { Flight } from 'libs/common/react/index';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { DashboardRequests } from 'libs/shared/flight-requests/DashboardRequests';\nimport { CuratedDashboard, CuratedMediaWidget, CuratedWidget, PresentationAudience, Video } from 'libs/shared/interfaces';\nimport { CuratedDashboardHelper } from 'libs/shared/utils/DashboardHelper';\n\nexport interface Response {\n widgets: CuratedWidget[];\n\n videoList?: Video[];\n videoListWidgetId?: string;\n}\n\n/**\n * This hook helps us with custom logic for to display system generated dashboards in a slightly\n * different way.\n */\nexport function useGetTopicsWidgets(dashboard: CuratedDashboard, activeAudiences: PresentationAudience[]): Response {\n const {\n isSystemGeneratedDashboard,\n systemGeneratedVideoWidget\n } = React.useMemo(() => {\n if (!dashboard) {\n return {\n isSystemGeneratedDashboard: false,\n systemGeneratedVideoWidget: null\n };\n }\n\n const isSystemGeneratedDashboard = CuratedDashboardHelper.isSystemGeneratedDashboard(dashboard.widgets);\n\n return {\n isSystemGeneratedDashboard,\n systemGeneratedVideoWidget: dashboard.widgets.find(widget => {\n return (\n widget.widgetId === WidgetTypeId.ClassificationPinnedVideos &&\n widget.templateId !== WidgetTemplate.ThumbnailVerticalList\n );\n })\n };\n }, [dashboard?.id]);\n\n const systemGeneratedVideoContent = Flight.useBasicFetch<CuratedMediaWidget<Video[]>>(\n !!systemGeneratedVideoWidget &&\n DashboardRequests.dashboardWidgetContent(\n systemGeneratedVideoWidget?.id,\n CuratedDashboardHelper.getWidgetParams(\n systemGeneratedVideoWidget.widgetId,\n systemGeneratedVideoWidget.templateId,\n CuratedDashboardHelper.getDashboardTargetType(dashboard),\n activeAudiences?.map(a => a.masterId)\n ),\n systemGeneratedVideoWidget?.templateId\n )\n );\n\n // Non system generated dashboards are returned as per usual\n if (!isSystemGeneratedDashboard)\n return { widgets: ArrayHelper.sortBy(dashboard?.widgets, 'index') };\n\n // System generated dashboard have the video widget removed and returned as a separate video list\n return {\n widgets: dashboard?.widgets?.filter(widget => {\n if (widget.widgetId !== WidgetTypeId.ClassificationPinnedVideos)\n return true;\n\n if (widget.templateId === WidgetTemplate.ThumbnailVerticalList)\n return true;\n\n return false;\n }) ?? [],\n videoList: systemGeneratedVideoContent.data?.content ?? [],\n videoListWidgetId: systemGeneratedVideoWidget?.id\n };\n}","import React from 'react';\n\nimport { PartialAudienceFilter } from 'libs/shared/apps/subjects/components/audience-filter/AudienceFilter';\nimport { PartialBannerHeader } from 'libs/shared/components/banner-header/BannerHeader';\nimport { PartialBreadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\n\nexport function PartialClassificationDashboard(): JSX.Element {\n return (\n <div className='bg-white px-4'>\n <PartialBannerHeader />\n\n <div className='d-flex flex-column row-gap-3 py-3 mb-3 border-bottom'>\n <PartialBreadcrumbs />\n <PartialAudienceFilter />\n </div>\n </div>\n );\n}","import { HttpVerbs } from 'libs/common/backbone/enums/HttpVerbs';\nimport { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/flight';\n\nconst endpoints = {\n follow: () => `/api/domain/v1/subjects/classifications/following`,\n unfollow: (ids: string[]) => UrlHelper.urlBuilder('/api/domain/v1/subjects/classifications/following', { id: ids })\n};\n\nexport const FollowRequests = {\n /**\n * @param data - array of object ids the user is going to follow\n */\n follow(\n ids: string[],\n userId: string,\n success?: (data: string[]) => void,\n error?: () => void\n ): Flight.Request {\n return {\n url: endpoints.follow(),\n key: `follow:${ids.join(',')}`,\n type: HttpVerbs.POST,\n data: ids,\n formatData: () => {\n return ids.map(id => ({\n id,\n followers: {\n data: [userId]\n }\n }));\n },\n success,\n error,\n invalidationKeys: [ ...ids.map(id => `classification:${id}`), 'my:subject:preferences', 'classifications' ]\n };\n },\n\n unfollow(ids: string[], userId: string, success?: () => void, error?: () => void): Flight.Request {\n return {\n url: endpoints.unfollow(ids),\n key: `unfollow:${ids.join(',')}`,\n type: HttpVerbs.DELETE,\n formatData: () => {\n return ids.map(id => ({\n id,\n followers: {\n data: []\n }\n }));\n },\n success,\n error,\n invalidationKeys: [ ...ids.map(id => `classification:${id}`), 'my:subject:preferences', 'classifications' ]\n };\n }\n};\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { ErrorCta, ErrorPageError } from 'libs/shared/errors/primitives/ErrorPageError';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\n\nconst namespace = 'subjects.topicNotFoundError';\n\nexport class TopicNotFoundError extends ErrorPageError {\n constructor() {\n super('Topic doesn\\'t exist');\n }\n\n // @ts-ignore\n public get name(): string {\n return 'TopicNotFoundError';\n }\n\n // @ts-ignore\n public get heading(): string {\n return LanguageService.getPhrase(namespace, 'heading');\n }\n\n // @ts-ignore\n public get description(): string {\n return LanguageService.getPhrase(namespace, 'description');\n }\n\n // @ts-ignore\n public get cta(): ErrorCta {\n return {\n text: LanguageService.getPhrase(namespace, 'cta'),\n appLink: {\n application: AppChannels.SUBJECT,\n action: Actions.Subjects.PRESENTATION_TOPICS\n }\n };\n }\n}","import { Core } from 'libs/common/backbone/index';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\n\nexport const SignUpHelper = {\n getSignUpAppLink: (): Core.AppLink => {\n const appLink: Core.AppLink = {\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n };\n\n const redirectUrl = Core.AppLinkHelper.getHref(Core.AppLinkHelper.getCurrentAppLink());\n\n if (redirectUrl !== '/')\n appLink.params = { redirectUrl };\n\n return appLink;\n }\n};","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { WidgetAppLinks } from 'libs/shared/components/widgets/curated-widgets/WidgetProps';\nimport { RelatedVideosContext } from 'libs/shared/enums/RelatedVideosContext';\nimport { Classification, CurrentUser, DashboardTargetType, Playlist, PlaylistCollection, Resource, Series, SeriesCollection, Video, VideoCollection } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { ClassificationAppLinkHelper } from 'shared/utils/ClassificationAppLinkHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\nimport { SignUpHelper } from 'apps/sign-up/utils/SignUpHelper';\n\nexport interface ClassificationViewQueryParams {\n a?: string[];\n dashboardId?: string;\n preview?: 'true';\n tocId?: string;\n mtv?: boolean;\n}\n\nconst OMITTED_PARAMS = [ 'preview', 'dashboardId', 'skipPrompt' ];\n\n/**\n * Checks if the classification would have any content with\n * no filters applied\n */\nexport function hasNoContentUnfiltered(classification: Classification): boolean {\n if (!classification)\n return false;\n\n return (\n classification.series?.count === 0 &&\n classification.pinnedVideos?.count === 0 &&\n classification.playlists?.count === 0\n );\n}\n\ninterface HeroVideoWithVideoList {\n heroVideo: Video;\n videoList: Video[];\n}\n\nexport function extractHeroVideo(\n series: SeriesCollection,\n playlists: PlaylistCollection,\n videos: VideoCollection,\n classification: Classification\n): HeroVideoWithVideoList {\n if (!series || !playlists || !videos || !classification)\n return {\n heroVideo: null,\n videoList: videos && videos.data\n };\n\n // If the subject has no series/playlists, and has only 1 video, that video is displayed as the hero.\n if (!series.data.length && !playlists.data.length && videos.data.length === 1) {\n return {\n heroVideo: ArrayHelper.first(videos.data),\n videoList: []\n };\n }\n\n const pinnedVideoIndex = videos.data.findIndex(video => video.id === classification.pinnedVideoMasterId);\n\n if (pinnedVideoIndex === -1)\n return {\n heroVideo: null,\n videoList: videos.data\n };\n\n return {\n heroVideo: videos.data[pinnedVideoIndex],\n videoList: videos.data.filter(vid => vid.id !== classification.pinnedVideoMasterId)\n };\n}\nconst getPhrase = LanguageService.encloseNamespace('subjects.classification');\n\nexport function getBannerActions(\n classification: Classification,\n canFollowSubjects: boolean,\n onFollow: () => void,\n showFollowButtonSpinner: boolean,\n isSmallScreen: boolean\n): ActionOptions[] {\n if (!canFollowSubjects)\n return [];\n\n const isFollowing = !!classification.followers?.data?.length;\n\n return [{\n label: getPhrase(isFollowing ? 'following' : 'follow'),\n onClick: onFollow,\n svgName: isFollowing ? cvSvgLibrary.BellFilled : cvSvgLibrary.Bell,\n className: `btn follow-btn ${isFollowing ? 'btn-outline-dark' : 'btn-dark'}`,\n button: true,\n tooltip: (isFollowing || isSmallScreen) ? undefined : getPhrase('followBtnTooltip'),\n showSpinner: showFollowButtonSpinner\n }];\n}\n\nexport function getClassificationAppLinks(\n classification: Classification,\n targetType: DashboardTargetType,\n params: ClassificationViewQueryParams,\n hasTopicDirectoryDashboard: boolean,\n currentUser: CurrentUser\n): WidgetAppLinks {\n return {\n audience: () => {\n switch (targetType) {\n case DashboardTargetType.ClassificationDirectory: {\n return null;\n }\n case DashboardTargetType.ClassificationVideos: {\n return {\n application: AppChannels.SUBJECT,\n action: Actions.Subjects.CLASSIFICATION_VIDEOS,\n args: [ classification.id, TextHelper.slugify(classification.name) ],\n params\n };\n }\n default: {\n return ClassificationAppLinkHelper.getAppLink(classification, params);\n }\n }\n },\n \n classification: (_classification: Classification | null) => {\n const appLinkClassification = _classification || classification;\n\n return ClassificationAppLinkHelper.getAppLink(\n appLinkClassification,\n ObjectHelper.omit(params, OMITTED_PARAMS)\n );\n },\n\n classificationDirectory: (_classification: Classification) => {\n if (!hasTopicDirectoryDashboard)\n return null;\n \n const appLinkClassification = _classification || classification;\n\n return {\n application: AppChannels.SUBJECT,\n action: Actions.Subjects.CLASSIFICATION_TOPICS,\n args: [ appLinkClassification.id, TextHelper.slugify(appLinkClassification.name) ],\n params: ObjectHelper.omit(params, OMITTED_PARAMS)\n };\n },\n\n classificationVideos: (_classification: Classification) => {\n const appLinkClassification = _classification || classification;\n\n return {\n application: AppChannels.SUBJECT,\n action: Actions.Subjects.CLASSIFICATION_VIDEOS,\n args: [ appLinkClassification.id, TextHelper.slugify(appLinkClassification.name) ],\n params: ObjectHelper.omit(params, OMITTED_PARAMS)\n };\n },\n\n videoType: (video: Video, opts: GetVideoAppLinkOptions) => (\n VideoAppLinkHelper.getAppLink(video, {\n ...opts,\n context: RelatedVideosContext.Widget,\n moviesAndTv: params.mtv,\n includeContext: currentUser?.isAuthenticated\n })\n ),\n\n allTopics: (presentationId: string) => ({\n application: AppChannels.SUBJECT,\n action: Actions.Subjects.PRESENTATION_TOPICS,\n params: { presentationId }\n }),\n\n series: (series: Series) => {\n return SeriesAppLinkHelper.getSeriesAppLink(series, {\n classificationId: classification.id,\n mtv: params.mtv ? true : undefined\n });\n },\n\n subText: (video: Video) => SeriesAppLinkHelper.getSeriesAppLink(video.series, {\n classificationId: classification.id,\n mtv: params.mtv ? true : undefined\n }),\n\n playlist: (playlist: Playlist) => ({\n application: AppChannels.PLAYLISTS,\n action: Actions.Playlists.PLAYLIST,\n args: [ playlist.id, TextHelper.slugify(playlist.name) ],\n params: {\n classificationId: classification.id,\n mtv: params.mtv ? true : undefined\n }\n }),\n\n resource: (resource: Resource, videoId: string, canViewResources: boolean) => {\n if (!canViewResources) {\n return {\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n };\n }\n\n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PREVIEW_PDF,\n args: [resource.id],\n params: {\n videoId\n }\n };\n },\n\n signUp: SignUpHelper.getSignUpAppLink,\n\n classroomGuide: VideoAppLinkHelper.getClassroomGuideAppLink,\n interactiveGuidance: VideoAppLinkHelper.getInteractiveGuidanceAppLink,\n resourceGuidance: VideoAppLinkHelper.getResourceGuidanceAppLink\n };\n}","// extracted by mini-css-extract-plugin\nexport default {\"followButton\":\"HlRXj\"};","import React from 'react';\n\nimport { LocationUtils } from 'libs/common/backbone/core';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, ToggleDescriptor, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { CalendarRequests } from 'libs/shared/apps/calendar/flight-request/CalendarRequests';\nimport { ClassificationDashboard } from 'libs/shared/apps/subjects/components/classification-dashboard/ClassificationDashboard';\nimport { PartialClassificationDashboard } from 'libs/shared/apps/subjects/components/classification-dashboard/partial-loading/PartialClassificationDashboard';\nimport { PreviewBanner } from 'libs/shared/apps/subjects/components/preview-banner/PreviewBanner';\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { DashboardFeedbackData } from 'libs/shared/components/feedback-form/FeedbackForm';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { ClassificationStatus } from 'libs/shared/enums/ClassificationStatus';\nimport { FeedbackType } from 'libs/shared/enums/FeedbackType';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\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 { DashboardRequests } from 'libs/shared/flight-requests/DashboardRequests';\nimport { FeedbackRequests } from 'libs/shared/flight-requests/FeedbackRequests';\nimport { FollowRequests } from 'libs/shared/flight-requests/FollowRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useBreadcrumbs } from 'libs/shared/hooks/useBreadcrumbs';\nimport { useCurationStudio } from 'libs/shared/hooks/useCurationStudio';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { CalendarEvent, Classification, Config, CurrentUser, Customer, DashboardTargetType, Presentation, PresentationAudience, RegionAlternative, YearGroup } from 'libs/shared/interfaces';\nimport { AudienceHelper } from 'libs/shared/utils/audience-helper/AudienceHelper';\nimport { CuratedDashboardHelper } from 'libs/shared/utils/DashboardHelper';\nimport { FeedbackFormHelper } from 'libs/shared/utils/FeedbackFormHelper';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { usePluginHelper } from 'shared/hooks/use-plugin-helper/usePluginHelper';\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { useDeepLinks } from 'shared/hooks/useDeepLinks';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { usePresentation } from 'shared/hooks/usePresentation';\nimport { ClassificationAppLinkHelper } from 'shared/utils/ClassificationAppLinkHelper';\nimport { SeoHelper } from 'shared/utils/SeoHelper';\n\nimport { TopicNotFoundError } from 'apps/subjects/errors/TopicNotFoundError';\nimport { useFetchClassificationDashboard } from 'apps/subjects/hooks/useFetchClassificationDashboard';\n\nimport { ClassificationViewQueryParams, getClassificationAppLinks } from './ClassificationViewUtils';\n\nimport styles from './curated-classification-view.scss';\n\ninterface CuratedClassificationViewProps {\n id: string;\n queryParams?: ClassificationViewQueryParams;\n targetType: DashboardTargetType;\n}\n\nCuratedClassificationView.defaultProps = {\n queryParams: {}\n};\n\nconst namespace = 'subjects.classification';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport function CuratedClassificationView(props: CuratedClassificationViewProps): React.ReactElement {\n const [ showFollowButtonSpinner, setShowFollowButtonSpinner ] = React.useState<boolean>(false);\n\n const alerts = useAlerts();\n const fetchAsync = Flight.useGetFetchAsync();\n const { hasPermissions, hasLocalPermissions } = usePermissions();\n const { isPlugin } = usePluginHelper();\n const settings = useSettings(null);\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const { openInCurationStudioLabel, isUserCurator, getOpenInCurationStudioLink } = useCurationStudio();\n\n const customer = Flight.useBasicFetch<Customer>(\n hasPermissions(PermissionName.CanSubmitFeedback) &&\n currentUser.data &&\n CustomerRequests.customer(currentUser.data.customerId)\n );\n\n const classification = Flight.useBasicFetch<Classification>(\n ClassificationRequests.classification(props.id, currentUser.data?.id)\n );\n\n const presentation = Flight.useBasicFetch<Presentation>(\n classification.data &&\n ClassificationRequests.presentationById(classification.data.presentationId)\n );\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n classification.data &&\n AudienceRequests.audiencesByPresentationId(classification.data.presentationId)\n );\n\n const specialEvent = Flight.useBasicFetch<CalendarEvent>(\n classification.data &&\n CalendarRequests.nextTopicSpecialEvent(props.id, classification.data.presentationId)\n );\n\n const {\n activePresentation,\n availablePresentations,\n canAccessPresentation\n } = usePresentation();\n\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n\n const path = Flight.useBasicFetch<Classification[]>(ClassificationRequests.path(props.id));\n\n const {\n dashboard,\n hasTopicDirectoryDashboard,\n hasTopicVideosDashboard,\n isPreviewing,\n isTeacherOnly\n } = useFetchClassificationDashboard(props.id, props.queryParams, props.targetType);\n\n const regionAlternatives = Flight.useBasicFetch<RegionAlternative[]>(\n ClassificationRequests.regionAlternatives(props.id)\n );\n\n useSetPageMetadata(PageMetadataHelper.getClassificationMetadata({\n content: classification.data,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink({ stripPresentationSlug: true }),\n allowIndexing: SeoHelper.allowIndexing(),\n hrefLang: SeoHelper.getContentHrefLang(regionAlternatives.data, () => (\n ClassificationAppLinkHelper.getAppLink(classification.data)\n ))\n }));\n\n useHandleObjectError(classification, {\n notFound: TopicNotFoundError\n });\n useDeepLinks({ id: props.id, app: 'topics' });\n\n const isViewCurrentPresentation = activePresentation?.id === presentation.data?.id;\n \n const isSmallScreen = useMediaQuery(MediaQueryStrings.MDDown);\n const isMobile = useMediaQuery(MediaQueryStrings.SMDown);\n\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.ExpandableVideoThumbnail);\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n\n const canFollowSubjects = hasPermissions(PermissionName.FollowSubjects);\n const isComingSoon = (\n classification.data?.status === ClassificationStatus.ComingSoon &&\n !isPreviewing\n );\n\n /**\n * We use the current active audiences to re-fetch content for that specific audience set.\n */\n const activeAudiences = AudienceHelper.getActiveAudiencesFromParams(audiences.data, props.queryParams);\n const activeAudienceIds = activeAudiences?.map(a => a.masterId) ?? [];\n\n const targetType = CuratedDashboardHelper.getDashboardTargetType(dashboard.data);\n\n /**\n * Following\n */\n function onToggleFollow(followedClassification: Classification, location: LocationContext) {\n if (!canFollowSubjects || !classification)\n return;\n\n const isTogglingCurrentTopic = followedClassification.id.toString() === classification.data?.id?.toString();\n\n if (isTogglingCurrentTopic)\n setShowFollowButtonSpinner(true);\n\n const isFollowing = TopicsHelper.isFollowing(followedClassification);\n\n const request = isFollowing\n ? FollowRequests.unfollow\n : FollowRequests.follow;\n\n fetchAsync(request([followedClassification.id], currentUser.data?.id))\n .then(() => {\n AnalyticsHelper.logUserAction(analyticsData, {\n location,\n actionType: UserAction.Follow,\n workflowPhase: WorkflowPhase.Complete,\n descriptor: isFollowing ? ToggleDescriptor.Off : ToggleDescriptor.On,\n entity: EntityType.Classification\n });\n\n if (!isTogglingCurrentTopic) {\n alerts.success(getPhrase(isFollowing ? 'unfollowed' : 'followed', { name: followedClassification.name }));\n }\n })\n .finally(() => {\n if (isTogglingCurrentTopic)\n setShowFollowButtonSpinner(false);\n });\n }\n\n async function onSubmitFeedback(feedback: DashboardFeedbackData): Promise<void> {\n const promise = await fetchAsync<void>(FeedbackRequests.submitFeedback({\n type: FeedbackType.Footer,\n user: FeedbackFormHelper.getUserInfo(currentUser.data, customer.data),\n tags: FeedbackFormHelper.getTags(\n currentUser.data,\n ProductId.Primary,\n hasPermissions(PermissionName.StudentExperience),\n [ 'topics', 'in product feedback' ]\n )\n }, {\n reaction: feedback.type,\n feedback: feedback.content,\n location: 'Topic Footer',\n presentationName: presentation.data.description,\n presentationId: presentation.data.id,\n dashboardName: dashboard.data.name,\n dashboardId: dashboard.data.id,\n classificationName: classification.data.name,\n classificationId: classification.data.id,\n currentPageUrl: LocationUtils.GetCurrentUrl()\n }));\n\n AnalyticsHelper.logUserAction({\n feedbackType: feedback.type,\n content: feedback.content,\n presentationId: presentation.data.id,\n classificationId: classification.data.id,\n dashboardId: dashboard.data.id\n }, {\n actionType: UserAction.Submit,\n location: LocationContext.ClassificationFooter,\n entity: EntityType.Feedback,\n workflowPhase: WorkflowPhase.Complete\n });\n\n return promise;\n }\n\n function getBannerActions(): ActionOptions[] {\n const isFollowing = !!classification.data?.followers?.data?.length;\n\n if (!canFollowSubjects)\n return [];\n\n const actions: ActionOptions[] = [{\n label: isMobile ? '' : getPhrase(isFollowing ? 'following' : 'follow'),\n onClick: () => onToggleFollow(classification.data, LocationContext.Banner),\n svgName: isFollowing ? cvSvgLibrary.BellFilled : cvSvgLibrary.Bell,\n className: `btn follow-btn me-2 ${isFollowing ? 'btn-outline-dark' : 'btn-dark'} ${styles.followButton}`,\n button: true,\n tooltip: (isFollowing || isSmallScreen) ? undefined : getPhrase('followBtnTooltip'),\n showSpinner: showFollowButtonSpinner\n }];\n\n if (isUserCurator)\n actions.push({\n label: openInCurationStudioLabel,\n href: getOpenInCurationStudioLink(MasterType.Subject, classification.data?.id, presentation.data?.id),\n openInNewTab: true\n });\n \n return actions;\n }\n\n const appLinks = getClassificationAppLinks(\n classification.data,\n targetType,\n props.queryParams,\n hasTopicDirectoryDashboard,\n currentUser.data\n );\n\n const breadcrumbs = useBreadcrumbs({ name: classification.data?.name });\n function getBreadcrumbs(): () => Breadcrumb[] {\n if (!canAccessPresentation(presentation.data?.id))\n return;\n\n return () => breadcrumbs;\n }\n \n /**\n * Additional topics data to be mixed in with lower-level component analytics collection\n */\n const analyticsData = {\n presentationId: presentation.data?.id,\n presentationName: presentation.data?.name,\n currentClassificationId: classification.data?.id,\n currentClassificationName: classification.data?.name,\n followingCurrentClassification: !!classification.data?.followers?.data?.length,\n activeAudienceNames: activeAudiences?.length ? activeAudiences.map(a => a.name) : null,\n activeAudienceIds: activeAudienceIds.length ? activeAudienceIds : null\n };\n\n const dataLoaded = !!config.data\n && dashboard.hasCompleted\n && !!classification.data\n && !!presentation.data\n && !!path.data\n && !!availablePresentations\n && !!audiences.data\n && specialEvent.hasCompleted;\n\n if (!dataLoaded)\n return <PartialClassificationDashboard />;\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <div className='position-relative'>\n {!!(isPreviewing && dashboard.data) && <PreviewBanner status={dashboard.data.status} type='topic' />}\n <ClassificationDashboard\n dashboard={dashboard.data}\n classification={classification.data}\n getWidgetContentRequest={DashboardRequests.dashboardWidgetContent}\n getBreadcrumbs={getBreadcrumbs()}\n hasPermissions={hasPermissions}\n hasLocalPermissions={hasLocalPermissions}\n presentation={presentation.data}\n onToggleFollow={onToggleFollow}\n getBannerActions={getBannerActions}\n audiences={props.queryParams.mtv ? null : audiences.data}\n activeAudiences={activeAudiences}\n analyticsData={analyticsData}\n imageCdnUrl={config.data.imageCdnUrl}\n resourceThumbnailFallbackImageUrl={ImageUrls.Fallbacks.RESOURCE_THUMBNAIL}\n emptyImageUrl={isTeacherOnly ? ImageUrls.EmptyStates.Topics.TEACHER_ONLY : ImageUrls.EmptyStates.Topics.TOPIC}\n isComingSoon={isComingSoon}\n showFollowButtonSpinner={showFollowButtonSpinner}\n comingSoonImageUrl={ImageUrls.EmptyStates.Topics.COMING_SOON}\n appLinks={appLinks}\n isPreviewing={isPreviewing}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n isViewCurrentPresentation={isViewCurrentPresentation}\n canFollowSubjects={canFollowSubjects}\n onSubmitFeedback={\n hasPermissions(PermissionName.CanSubmitFeedback) &&\n onSubmitFeedback\n }\n tableOfContentsId={props.queryParams.tocId}\n yearGroups={yearGroups.data}\n lazyLoad={!SeoHelper.isBot()}\n moviesAndTv={props.queryParams.mtv}\n isTeacherOnly={isTeacherOnly}\n specialEvent={specialEvent.data}\n isBot={SeoHelper.isBot()}\n hasTopicDirectoryDashboard={hasTopicDirectoryDashboard}\n hasTopicVideosDashboard={hasTopicVideosDashboard}\n tab={TopicsHelper.getActiveTopicTab(classification.data, props.targetType)}\n // just... one... more.. prop....\n isPlugin={isPlugin}\n settings={settings}\n />\n </div>\n </VideoActionsContext.Provider>\n );\n}\n","import { useSettings } from 'libs/shared/hooks/useSettings';\nimport { DashboardTargetType } from 'libs/shared/interfaces';\n\nimport { useFetchCuratedDashboard } from 'shared/utils/DashboardHelper';\n\nimport { ClassificationViewQueryParams } from '../views/classification/ClassificationViewUtils';\n\nexport function useFetchClassificationDashboard(\n id: string,\n queryParams: ClassificationViewQueryParams,\n targetType: DashboardTargetType\n) {\n const { hasTopicDirectories, hasTopicVideoListFeature } = useSettings(null);\n\n const {\n dashboard: curatedTopicDashboard,\n isPreviewing,\n isTeacherOnly\n } = useFetchCuratedDashboard({\n classificationId: id,\n queryParams: queryParams,\n targetType: DashboardTargetType.Classification\n });\n\n const { dashboard: directoryDashboard } = useFetchCuratedDashboard({\n classificationId: id,\n queryParams: queryParams,\n targetType: DashboardTargetType.ClassificationDirectory\n });\n\n const { dashboard: videosDashboard } = useFetchCuratedDashboard({\n classificationId: id,\n queryParams: queryParams,\n targetType: DashboardTargetType.ClassificationVideos\n });\n\n function getDashboard() {\n switch (targetType) {\n case DashboardTargetType.Classification:\n return curatedTopicDashboard;\n case DashboardTargetType.ClassificationDirectory:\n return directoryDashboard;\n case DashboardTargetType.ClassificationVideos:\n return videosDashboard;\n }\n }\n\n return {\n dashboard: getDashboard(),\n hasTopicDirectoryDashboard: hasTopicDirectories && !!directoryDashboard.data,\n hasTopicVideosDashboard: hasTopicVideoListFeature && !!videosDashboard.data,\n isTeacherOnly,\n isPreviewing\n };\n}","// extracted by mini-css-extract-plugin\nexport default {\"pillTabSelector\":\"Hdi6o\",\"tab\":\"RvNxr\",\"minWidth\":\"GHSz9\",\"radiusSmall\":\"VhJJa\",\"tabLink\":\"WFyvo\"};"],"names":["CalendarRequests","calendarEvents","from","to","presentationId","url","publicUrl","key","nextTopicSpecialEvent","classificationId","params","limit","Date","objectType","formatData","events","getPhrase","LanguageService","AudienceItem","props","audience","highlight","setAudience","isDisabled","extraClasses","colourClass","getColourClass","className","onClick","FunctionHelper","role","name","disabled","split","map","s","charAt","toUpperCase","substring","join","defaultProps","pdfExtensions","docExtensions","textExtensions","excelExtensions","imageExtensions","videoMimeType","archiveExtensions","powerPointExtensions","subtitleExtensions","FileExtensions","IMAGES","VIDEO","MIXED_MEDIA","RESOURCES","SUBTITLES","FileExtensionHelper","getResourceType","extension","ext","toLowerCase","TabContents","tab","svgName","count","type","data","PillTabSelector","ref","containerRef","borderRadius","listClassName","tabs","index","active","appLink","analyticsData","analyticsOptions","onSelect","onSelectTab","TableOfContentsList","actionType","entity","location","onItemSelect","item","ScrollHelper","setControlledId","id","onItemClick","setTimeout","document","getElementById","focus","items","idx","localState","DivButton","activeId","AppLink","getAppLink","appLinkOptions","replace","tocIndentation","FeedbackType","defaultErrors","notFound","forbidden","rating","yearLevel","region","privacy","badRequest","handleHttpError","info","customErrorMap","ignoreMap","statusCode","status","errorMap","FeedbackRequests","submitFeedback","requestData","formValues","generateCacheKey","flightObjs","obj","useHandleObjectError","_flightObjs","customErrors","ignoreErrors","Array","isArray","useEffect","forEach","usePrevious","value","current","timer","useTableOfContentsActiveHeading","setActiveId","headingElements","controlledId","scrollPositionRef","observer","IntersectionObserver","headings","heading","window","isIntersecting","target","scrollY","isScrollingUp","curIndex","findIndex","h","prevHeading","rootMargin","element","observe","clearTimeout","disconnect","length","useTableOfContentsScroll","elements","hasDoneInitialScroll","setHasDoneInitialScroll","previousId","currentId","find","rec","getBoundingClientRect","scrollBy","top","behavior","FeedbackFormHelper","getUserInfo","currentUser","customer","username","email","userType","customerId","cvcId","crmId","customerName","instanceRegion","contentRegion","firstName","givenName","lastName","familyName","mapInstanceRegionToTag","getTags","product","hasStudentExperience","extraTags","tags","push","regionTag","categorizeFiles","files","reduce","result","file","fileInfo","get","videoUrls","imageUrls","namespace","Separator","ClassificationHeaderDetails","TopicsHelper","classification","dashboardVideoCount","childDashboardVideoCount","dashboardResourceCount","childDashboardResourceCount","childClassificationCount","videoCount","resourceCount","Text","phrase","options","toLocaleString","smartCount","CuratedClassificationEmptyState","isArchived","dashboard","EmptyState","src","imageUrl","altText","isReadonly","Tooltip","title","spanHack","text","addWidgetApplink","icon","TableOfContentsMobile","isExpanded","setIsExpanded","widgets","widget","metadata","IconButton","AnalyticsHelper","TableOfContents","TableOfContentsContainer","currentAppLink","ContextService","tocId","isSmallScreen","TeacherOnlyEmptyState","ctaAppLink","ClassificationComingSoon","isFollowing","followers","showSignUp","canFollowSubjects","ActionButton","onToggleFollow","showSpinner","showFollowButtonSpinner","signUpAppLink","workflowPhase","descriptor","SignUp","tag","AudienceFilter","audiences","activeAudiences","setActiveAudiences","SharedViewModelKeys","undefined","storage","onToggleAudience","isSelected","otherParams","activeAudienceNames","a","filter","ObjectHelper","Object","assign","disablePersist","tooltip","masterId","aa","keys","PARTIAL_AUDIENCES","PartialLoadingHelper","numItems","PartialAudienceFilter","width","dangerouslySetInnerHTML","__html","style","ClassificationDashboardAudiences","getTabs","breakpoints","activeTab","isHighlighting","showText","lg","xl","xxl","xs","appLinks","classificationName","presentation","presentationDescription","description","classificationDirectory","classificationVideos","ClassificationTabs","useBreakpoints","useDirectoryTabProductTipSwitcher","setProductTipRef","el","ClassificationDashboardNav","isEmpty","hideAudiences","isComingSoon","AudienceHelper","canShowTabs","hasTopicDirectoryDashboard","hasTopicVideosDashboard","getTopRowClass","Breadcrumbs","breadcrumbs","getBreadcrumbs","getBottomRowClass","disableAudiences","audienceTooltip","isViewingCurrentPresentation","isHeadingWidget","widgetId","WidgetTypeId","templateId","WidgetTemplate","isTopicWidget","ClassificationDashboard","isSystemGeneratedDashboard","systemGeneratedVideoWidget","systemGeneratedVideoContent","DashboardRequests","videoList","content","videoListWidgetId","useGetTopicsWidgets","headingRef","Set","initialEmptyWidgets","acc","emptyWidgets","setEmptyWidgets","tableOfContentsId","tableOfContentActiveId","setTableOfContentActiveId","getWidgetContentRequest","widgetTypeId","template","showEmptyState","isTeacherOnly","isPreviewing","values","every","state","onSetIsEmpty","newEmptyState","currentWidget","isHeadingEmpty","subWidgetIndex","headingSubWidget","hideWidget","getWidgetHeading","previousWidget","widgetsInTableOfContents","w","showInTableOfContents","isTopicOnlyDashboard","shouldShowTableOfContents","shouldShowSideTableOfContents","shouldShowTopicCounts","settings","hasTopicDirectories","moviesAndTv","BannerHeader","banner","imageCdnUrl","actions","getBannerActions","actionsDropdownClassName","specialEvent","calendarTheme","background","border","showComingSoon","detailsComponent","isViewCurrentPresentation","comingSoonImageUrl","hasLocalPermissions","signUp","clickable","WidgetContainerView","headingElementRef","getContentRequest","setIsEmpty","setFavourite","canFavourite","yearGroups","isScrollToTargetWidget","scrollToWidgetId","onSubmitFeedback","isBot","hasTableOfContents","lazyLoad","dashboardTarget","widgetIndex","hasPermissions","companyLogoFallbackUrl","subTextType","contentType","resourceThumbnailFallbackImageUrl","preferences","onToggleFollowClassification","isPlugin","isEditing","WidgetHeader","VideoList","videos","getVideoAppLink","video","opts","videoType","contextId","includeContext","getSubTextAppLink","subText","presentationAudiences","getPreviewQuestionsAppLink","previewQuestions","getClassroomGuideAppLink","classroomGuide","getInteractiveGuidanceAppLink","interactiveGuidance","getResourceGuidanceAppLink","resourceGuidance","emptyImageUrl","widgetWizard","allTopics","PartialClassificationDashboard","endpoints","ids","UrlHelper","FollowRequests","follow","userId","success","error","HttpVerbs","invalidationKeys","unfollow","TopicNotFoundError","application","action","ErrorPageError","SignUpHelper","getSignUpAppLink","redirectUrl","OMITTED_PARAMS","CuratedClassificationView","queryParams","setShowFollowButtonSpinner","alerts","fetchAsync","usePermissions","usePluginHelper","useSettings","config","ConfigRequests","UserRequests","useCurationStudio","openInCurationStudioLabel","isUserCurator","getOpenInCurationStudioLink","PermissionName","CustomerRequests","ClassificationRequests","AudienceRequests","usePresentation","activePresentation","availablePresentations","canAccessPresentation","isAuthenticated","path","targetType","hasTopicVideoListFeature","curatedTopicDashboard","directoryDashboard","videosDashboard","getDashboard","useFetchClassificationDashboard","regionAlternatives","useSetPageMetadata","PageMetadataHelper","phraseContext","phraseHandler","titlePhrase","descriptionPhrase","canonicalLink","SeoHelper","stripPresentationSlug","allowIndexing","hrefLang","ClassificationAppLinkHelper","useDeepLinks","app","isMobile","useLiteFavourites","u","videoActions","useVideoActions","ClassificationStatus","activeAudienceIds","followedClassification","isTogglingCurrentTopic","toString","request","then","args","TextHelper","_classification","appLinkClassification","VideoAppLinkHelper","context","RelatedVideosContext","mtv","series","SeriesAppLinkHelper","playlist","resource","videoId","canViewResources","getClassificationAppLinks","useBreadcrumbs","presentationName","currentClassificationId","currentClassificationName","followingCurrentClassification","hasCompleted","VideoActionsContext","PreviewBanner","label","button","href","MasterType","openInNewTab","ImageUrls","feedback","user","ProductId","reaction","dashboardName","dashboardId","currentPageUrl","promise","feedbackType"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[490],{28891:(e,i,t)=>{t.r(i),t.d(i,{ClipInteractivesView:()=>W});var a=t(32735),n=t(81886),s=t(23481),c=t(20354),r=t(28400),u=t(65858),l=t(49935),o=t(71020),d=t(13231),p=t(51365),v=t(183),g=t(94644),m=t(43012),h=t(39151),k=t(1666),f=t(20768),I=t(31949),L=t(69883),C=t(60115),
|
|
2
|
-
//# sourceMappingURL=490-
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[490],{28891:(e,i,t)=>{t.r(i),t.d(i,{ClipInteractivesView:()=>W});var a=t(32735),n=t(81886),s=t(23481),c=t(20354),r=t(28400),u=t(65858),l=t(49935),o=t(71020),d=t(13231),p=t(51365),v=t(183),g=t(94644),m=t(43012),h=t(39151),k=t(1666),f=t(20768),I=t(31949),L=t(69883),C=t(60115),A=t(22902),b=t(14070),E=t(97291),w=t(51855),F=t(10671),G=t(27638),P=t(44110),V=t(35014),j=t(10741),O=t(22490),y=t(98620),N=t(82431),T=t(16747),_="shared.videoMedia",x=s.T.encloseNamespace(_);function W(e){var i,t,W,B,Q=e.clipId,S=c.a.useGetFetch(),M=(0,L.Z)(),R=(0,G.u)(u.LZ.VideoThumbnail),U=R.setFavourite,Y=R.canFavourite,Z=(0,w.G)().isPlugin,H=(0,F._)({location:F.i.VideoItem}),K=(0,V.I)(),$=(0,P.i)(),q=(0,A.T)().hasPermissions,z=c.a.useBasicFetch(h.L.config()),D=c.a.useBasicFetch(I.N.currentUser()),J=c.a.useBasicFetch(D.data.isAuthenticated&&k.h.yearGroups(D.data.customerId)),X=c.a.useBasicFetch(K.canViewClips&&m.e.clip(Q));function ee(e){return f.b.videoInteractives(Q,null,e)}function ie(e){return S(ee(e))}var te=(0,C.K)(!!K.canViewInteractives&&ee,ie,(function(e,i){if(1===e)return(0,g.r)(i);M.error(s.T.getPhrase(_,"errorInteractives"))})),ae=te.items,ne=te.hasMore,se=te.isFetching,ce=x("interactivesHeading"),re=[{name:null===(i=X.data)||void 0===i?void 0:i.name,appLink:Object.assign(Object.assign({},y.Y.playClip),{args:[Q,r.m.slugify(null===(t=X.data)||void 0===t?void 0:t.name)]})},{name:ce,appLink:{application:E.O.CLIPS,action:b.e.Clips.CLIP_INTERACTIVES,args:[Q,r.m.slugify(null===(W=X.data)||void 0===W?void 0:W.name)]},active:!0}];return a.useEffect((function(){K.canViewInteractives||function(){var e;n.Q.C$.trigger(Object.assign(Object.assign({},y.Y.playClip),{args:[Q,r.m.slugify(null===(e=X.data)||void 0===e?void 0:e.name)]}),{replace:!0})}()}),[K.canViewInteractives]),X.data&&(null==ae?void 0:ae.length)&&z.hasCompleted?a.createElement(p.M.Provider,{value:H},a.createElement("div",{className:"px-3"},a.createElement("h1",{className:"h2 mb-2"},ce),a.createElement("div",{className:"mb-2"},a.createElement(l.Oo,{breadcrumbs:re})),a.createElement(d.E4,{videos:ae,yearGroups:J.data,getVideoAppLink:function(i,t){var a;return O.W.getAppLink(i,Object.assign(Object.assign({},t),{context:v.Q.Widget,contextId:e.clipId,includeContext:null===(a=D.data)||void 0===a?void 0:a.isAuthenticated}))},hasPermissions:q,getSubTextAppLink:function(e){return N.j.getSeriesAppLink(e.series)},setFavourite:U,canFavourite:Y,presentationAudiences:$.data,getPreviewQuestionsAppLink:function(e){return j.j.getPreviewQuestionsAppLink(e)},imageCdnUrl:null===(B=z.data)||void 0===B?void 0:B.imageCdnUrl,isPlugin:Z,getClassroomGuideAppLink:O.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:O.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:O.W.getResourceGuidanceAppLink}),(ne||se)&&a.createElement(o._,{isFetching:se,fetchNext:ie}))):a.createElement(T.l,null)}}}]);
|
|
2
|
+
//# sourceMappingURL=490-62ca33b520-lite.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts/490-62ca33b520-lite.chunk.js","mappings":"8fAyCMA,EAAY,oBACZC,EAAY,qBAAiCD,GAM7C,SAAUE,EAAqBC,G,YAC3BC,EAAWD,EAAXC,OACFC,EAAQ,kBACRC,GAAS,SAEf,GAAuC,IAAAC,GAAkB,qBAAjDC,EAAY,EAAZA,aAAcC,EAAY,EAAZA,aACdC,GAAa,SAAbA,SAEFC,GAAe,OAAgB,CAAEC,SAAU,gBAC3CC,GAAgB,SAChBC,GAAY,SACVC,GAAmB,SAAnBA,eAEFC,EAAS,kBAA6B,cACtCC,EAAc,kBAAkC,mBAChDC,EAAa,kBACjBD,EAAYE,KAAKC,iBAAmB,eAA4BH,EAAYE,KAAKE,aAG7EC,EAAO,kBAA2BT,EAAcU,cAAgB,SAAkBnB,IAExF,SAASoB,GAAuBC,GAC9B,OAAO,sBAAsCrB,EAAQ,KAAMqB,EAC7D,CAEA,SAASC,GAAUD,GACjB,OAAOpB,EAAMmB,GAAuBC,GACtC,CASA,QAAqD,SACnDZ,EAAcc,qBAAsBH,GACpCE,IATF,SAAiBE,EAAoBC,GACnC,GAAmB,IAAfD,EACF,OAAO,OAAgBC,GAEzBvB,EAAOwB,MAAM,cAA0B9B,EAAW,qBACpD,IAEe+B,GAAY,GAAnBC,MAAqBC,GAAO,GAAPA,QAASC,GAAU,GAAVA,WAMhCC,GAAQlC,EAAU,uBAElBmC,GAA4B,CAAC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AE5B/B,IAAWC,KACX,gBAAC,IAAoB,CAACA,WAAYA,GAAYR,UAAWA,OAjCxD,gBAAC,IAAqB,KAsCjC,C","sources":["file:///app/packages/projects/lite/src/shared/views/video-media/ClipInteractivesView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { InfiniteScrollFooter } from 'libs/shared/components/infinite-scroll-footer/InfiniteScrollFooter';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { RelatedVideosContext } from 'libs/shared/enums/RelatedVideosContext';\nimport { handleHttpError } from 'libs/shared/errors/handlers/HttpErrorHandlers';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useInfiniteList } from 'libs/shared/hooks/UseInfiniteList';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { Clip, Config, CurrentUser, InteractiveMetadata, YearGroup } from 'libs/shared/interfaces';\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';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoFeatureAccess } from 'shared/hooks/useVideoFeatureAccess';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { VideoMediaAppLinks } from 'shared/views/video-media/VideoMediaAppLinks';\n\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\n\nimport { PartialVideoMediaView } from './partial-loading/PartialVideoMediaView';\n\nconst namespace = 'shared.videoMedia';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface ClipInteractivesViewProps {\n clipId: string;\n}\n\nexport function ClipInteractivesView(props: ClipInteractivesViewProps): JSX.Element {\n const { clipId } = props;\n const fetch = Flight.useGetFetch();\n const alerts = useAlerts();\n\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.VideoThumbnail);\n const { isPlugin } = usePluginHelper();\n \n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n const featureAccess = useVideoFeatureAccess();\n const audiences = usePresentationAudiences();\n const { hasPermissions } = usePermissions();\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n\n const clip = Flight.useBasicFetch<Clip>(featureAccess.canViewClips && ClipRequests.clip(clipId));\n\n function getInteractivesRequest(cursor?: string) {\n return InteractiveRequests.videoInteractives(clipId, null, cursor);\n }\n\n function fetchNext(cursor?: string) {\n return fetch(getInteractivesRequest(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, 'errorInteractives'));\n }\n\n const { items: interactives, hasMore, isFetching } = useInfiniteList<InteractiveMetadata>(\n featureAccess.canViewInteractives ? getInteractivesRequest : false,\n fetchNext,\n onError\n );\n\n const title = getPhrase('interactivesHeading');\n\n const breadcrumbs: Breadcrumb[] = [{\n name: clip.data?.name,\n appLink: {\n ...VideoMediaAppLinks.playClip,\n args: [ clipId, TextHelper.slugify(clip.data?.name) ]\n }\n }, {\n name: title,\n appLink: {\n application: AppChannels.CLIPS,\n action: Actions.Clips.CLIP_INTERACTIVES,\n args: [ clipId, TextHelper.slugify(clip.data?.name) ]\n },\n active: true\n }];\n\n function redirectToPlaypage(): void {\n Core.AppLinkHelper.trigger({\n ...VideoMediaAppLinks.playClip,\n args: [ clipId, TextHelper.slugify(clip.data?.name) ]\n }, { replace: true });\n }\n\n React.useEffect(() => {\n if (!featureAccess.canViewInteractives) {\n redirectToPlaypage();\n }\n }, [featureAccess.canViewInteractives]);\n\n if (!clip.data || !interactives?.length || !config.hasCompleted)\n return <PartialVideoMediaView />;\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <div className='px-3'>\n <h1 className='h2 mb-2'>{title}</h1>\n \n <div className='mb-2'>\n <Breadcrumbs breadcrumbs={breadcrumbs}/>\n </div>\n\n <VideoList\n videos={interactives}\n yearGroups={yearGroups.data}\n getVideoAppLink={(video, opts) => VideoAppLinkHelper.getAppLink(video, {\n ...opts,\n context: RelatedVideosContext.Widget,\n contextId: props.clipId,\n includeContext: currentUser.data?.isAuthenticated\n })}\n hasPermissions={hasPermissions}\n getSubTextAppLink={video => SeriesAppLinkHelper.getSeriesAppLink(video.series)}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n presentationAudiences={audiences.data}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n imageCdnUrl={config.data?.imageCdnUrl}\n isPlugin={isPlugin}\n getClassroomGuideAppLink={VideoAppLinkHelper.getClassroomGuideAppLink}\n getInteractiveGuidanceAppLink={VideoAppLinkHelper.getInteractiveGuidanceAppLink}\n getResourceGuidanceAppLink={VideoAppLinkHelper.getResourceGuidanceAppLink}\n />\n {(hasMore || isFetching) && (\n <InfiniteScrollFooter isFetching={isFetching} fetchNext={fetchNext} />\n )}\n </div>\n </VideoActionsContext.Provider>\n );\n}"],"names":["namespace","getPhrase","ClipInteractivesView","props","clipId","fetch","alerts","u","setFavourite","canFavourite","isPlugin","videoActions","location","featureAccess","audiences","hasPermissions","config","currentUser","yearGroups","data","isAuthenticated","customerId","clip","canViewClips","getInteractivesRequest","cursor","fetchNext","canViewInteractives","pageNumber","httpStatus","error","interactives","items","hasMore","isFetching","title","breadcrumbs","name","appLink","args","application","action","active","replace","redirectToPlaypage","length","hasCompleted","value","className","videos","getVideoAppLink","video","opts","context","contextId","includeContext","getSubTextAppLink","series","presentationAudiences","getPreviewQuestionsAppLink","interactive","imageCdnUrl","getClassroomGuideAppLink","getInteractiveGuidanceAppLink","getResourceGuidanceAppLink"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4944],{33915:(e,i,t)=>{t.r(i),t.d(i,{VideoInteractivesView:()=>W});var a=t(32735),n=t(81886),s=t(23481),c=t(20354),r=t(28400),o=t(65858),u=t(49935),d=t(71020),l=t(13231),v=t(51365),p=t(183),g=t(94644),m=t(39151),h=t(1666),k=t(20768),f=t(31949),I=t(1575),A=t(69883),L=t(60115),b=t(22902),E=t(14070),V=t(97291),F=t(51855),w=t(10671),C=t(27638),G=t(44110),O=t(35014),j=t(10741),P=t(22490),y=t(16747),N=t(98620),T=t(82431),_="shared.videoMedia",x=s.T.encloseNamespace(_);function W(e){var i,t,W,B,Q=e.videoId,R=c.a.useGetFetch(),S=(0,A.Z)(),M=(0,C.u)(o.LZ.VideoThumbnail),U=M.setFavourite,D=M.canFavourite,Y=(0,F.G)().isPlugin,Z=(0,w._)({location:w.i.VideoItem}),H=(0,O.I)(),K=(0,G.i)(),$=(0,b.T)().hasPermissions,q=c.a.useBasicFetch(m.L.config()),z=c.a.useBasicFetch(f.N.currentUser()),J=c.a.useBasicFetch(z.data.isAuthenticated&&h.h.yearGroups(z.data.customerId)),X=c.a.useBasicFetch(I.R.video(Q));function ee(e){return k.b.videoInteractives(Q,null,e)}function ie(e){return R(ee(e))}var te=(0,L.K)(!!H.canViewInteractives&&ee,ie,(function(e,i){if(1===e)return(0,g.r)(i);S.error(s.T.getPhrase(_,"errorInteractives"))})),ae=te.items,ne=te.hasMore,se=te.isFetching,ce=x("interactivesHeading"),re=[{name:null===(i=X.data)||void 0===i?void 0:i.name,appLink:Object.assign(Object.assign({},N.Y.playVideo),{args:[Q,r.m.slugify(null===(t=X.data)||void 0===t?void 0:t.name)]})},{name:ce,appLink:{application:V.O.VIDEOS,action:E.e.Videos.VIDEO_INTERACTIVES,args:[Q,r.m.slugify(null===(W=X.data)||void 0===W?void 0:W.name)]},active:!0}];return a.useEffect((function(){H.canViewInteractives||function(){var e;n.Q.C$.trigger(Object.assign(Object.assign({},N.Y.playVideo),{args:[Q,r.m.slugify(null===(e=X.data)||void 0===e?void 0:e.name)]}),{replace:!0})}()}),[H.canViewInteractives]),X.data&&(null==ae?void 0:ae.length)&&q.hasCompleted?a.createElement(v.M.Provider,{value:Z},a.createElement("div",{className:"px-3"},a.createElement("h1",{className:"h2 mb-2"},ce),a.createElement("div",{className:"mb-2"},a.createElement(u.Oo,{breadcrumbs:re})),a.createElement(l.E4,{videos:ae,yearGroups:J.data,getVideoAppLink:function(i,t){var a;return P.W.getAppLink(i,Object.assign(Object.assign({},t),{context:p.Q.Widget,contextId:e.videoId,includeContext:null===(a=z.data)||void 0===a?void 0:a.isAuthenticated}))},hasPermissions:$,getSubTextAppLink:function(e){return T.j.getSeriesAppLink(e.series)},setFavourite:U,canFavourite:D,presentationAudiences:K.data,getPreviewQuestionsAppLink:function(e){return j.j.getPreviewQuestionsAppLink(e)},imageCdnUrl:null===(B=q.data)||void 0===B?void 0:B.imageCdnUrl,isPlugin:Y,getClassroomGuideAppLink:P.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:P.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:P.W.getResourceGuidanceAppLink}),(ne||se)&&a.createElement(d._,{isFetching:se,fetchNext:ie}))):a.createElement(y.l,null)}}}]);
|
|
2
|
+
//# sourceMappingURL=4944-a780ed2439-lite.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts/4944-a780ed2439-lite.chunk.js","mappings":"+fAwCMA,EAAY,oBACZC,EAAY,qBAAiCD,GAM7C,SAAUE,EAAsBC,G,YAC5BC,EAAYD,EAAZC,QACFC,EAAQ,kBACRC,GAAS,SAEf,GAAuC,IAAAC,GAAkB,qBAAjDC,EAAY,EAAZA,aAAcC,EAAY,EAAZA,aACdC,GAAa,SAAbA,SAEFC,GAAe,OAAgB,CAAEC,SAAU,gBAC3CC,GAAgB,SAChBC,GAAY,SACVC,GAAmB,SAAnBA,eAEFC,EAAS,kBAA6B,cACtCC,EAAc,kBAAkC,mBAChDC,EAAa,kBACjBD,EAAYE,KAAKC,iBAAmB,eAA4BH,EAAYE,KAAKE,aAE7EC,EAAQ,kBAA4B,UAAoBlB,IAE9D,SAASmB,GAAuBC,GAC9B,OAAO,sBAAsCpB,EAAS,KAAMoB,EAC9D,CAEA,SAASC,GAAUD,GACjB,OAAOnB,EAAMkB,GAAuBC,GACtC,CASA,QAAqD,SACnDX,EAAca,qBAAsBH,GACpCE,IATF,SAAiBE,EAAoBC,GACnC,GAAmB,IAAfD,EACF,OAAO,OAAgBC,GAEzBtB,EAAOuB,MAAM,cAA0B7B,EAAW,qBACpD,IAEe8B,GAAY,GAAnBC,MAAqBC,GAAO,GAAPA,QAASC,GAAU,GAAVA,WAMhCC,GAAQjC,EAAU,uBAElBkC,GAA4B,CAAC,CACjCC,KAAgB,QAAV,EAAAd,EAAMH,YAAI,eAAEiB,KAClBC,QAAS,OAAF,wBACF,eAA4B,CAC/BC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jC,C","sources":["file:///app/packages/projects/lite/src/shared/views/video-media/VideoInteractivesView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { InfiniteScrollFooter } from 'libs/shared/components/infinite-scroll-footer/InfiniteScrollFooter';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { RelatedVideosContext } from 'libs/shared/enums/RelatedVideosContext';\nimport { handleHttpError } from 'libs/shared/errors/handlers/HttpErrorHandlers';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useInfiniteList } from 'libs/shared/hooks/UseInfiniteList';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { Config, CurrentUser, InteractiveMetadata, Video, YearGroup } from 'libs/shared/interfaces';\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';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoFeatureAccess } from 'shared/hooks/useVideoFeatureAccess';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { PartialVideoMediaView } from 'shared/views/video-media/partial-loading/PartialVideoMediaView';\nimport { VideoMediaAppLinks } from 'shared/views/video-media/VideoMediaAppLinks';\n\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\n\nconst namespace = 'shared.videoMedia';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface VideoInteractivesViewProps {\n videoId: string;\n}\n\nexport function VideoInteractivesView(props: VideoInteractivesViewProps): JSX.Element {\n const { videoId } = props;\n const fetch = Flight.useGetFetch();\n const alerts = useAlerts();\n\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.VideoThumbnail);\n const { isPlugin } = usePluginHelper();\n\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n const featureAccess = useVideoFeatureAccess();\n const audiences = usePresentationAudiences();\n const { hasPermissions } = usePermissions();\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n const video = Flight.useBasicFetch<Video>(VideoRequests.video(videoId));\n\n function getInteractivesRequest(cursor?: string) {\n return InteractiveRequests.videoInteractives(videoId, null, cursor);\n }\n\n function fetchNext(cursor?: string) {\n return fetch(getInteractivesRequest(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, 'errorInteractives'));\n }\n\n const { items: interactives, hasMore, isFetching } = useInfiniteList<InteractiveMetadata>(\n featureAccess.canViewInteractives ? getInteractivesRequest : false,\n fetchNext,\n onError\n );\n\n const title = getPhrase('interactivesHeading');\n\n const breadcrumbs: Breadcrumb[] = [{\n name: video.data?.name,\n appLink: {\n ...VideoMediaAppLinks.playVideo,\n args: [ videoId, TextHelper.slugify(video.data?.name) ]\n }\n }, {\n name: title,\n appLink: {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.VIDEO_INTERACTIVES,\n args: [ videoId, TextHelper.slugify(video.data?.name) ]\n },\n active: true\n }];\n\n function redirectToPlaypage(): void {\n Core.AppLinkHelper.trigger({\n ...VideoMediaAppLinks.playVideo,\n args: [ videoId, TextHelper.slugify(video.data?.name) ]\n }, { replace: true });\n }\n\n React.useEffect(() => {\n if (!featureAccess.canViewInteractives) {\n redirectToPlaypage();\n }\n }, [featureAccess.canViewInteractives]);\n\n if (!video.data || !interactives?.length || !config.hasCompleted)\n return <PartialVideoMediaView />;\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <div className='px-3'>\n <h1 className='h2 mb-2'>{title}</h1>\n \n <div className='mb-2'>\n <Breadcrumbs breadcrumbs={breadcrumbs}/>\n </div>\n\n <VideoList\n videos={interactives}\n yearGroups={yearGroups.data}\n getVideoAppLink={(video, opts) => VideoAppLinkHelper.getAppLink(video, {\n ...opts,\n context: RelatedVideosContext.Widget,\n contextId: props.videoId,\n includeContext: currentUser.data?.isAuthenticated\n })}\n hasPermissions={hasPermissions}\n getSubTextAppLink={video => SeriesAppLinkHelper.getSeriesAppLink(video.series)}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n presentationAudiences={audiences.data}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n imageCdnUrl={config.data?.imageCdnUrl}\n isPlugin={isPlugin}\n getClassroomGuideAppLink={VideoAppLinkHelper.getClassroomGuideAppLink}\n getInteractiveGuidanceAppLink={VideoAppLinkHelper.getInteractiveGuidanceAppLink}\n getResourceGuidanceAppLink={VideoAppLinkHelper.getResourceGuidanceAppLink}\n />\n {(hasMore || isFetching) && (\n <InfiniteScrollFooter isFetching={isFetching} fetchNext={fetchNext} />\n )}\n </div>\n </VideoActionsContext.Provider>\n );\n}"],"names":["namespace","getPhrase","VideoInteractivesView","props","videoId","fetch","alerts","u","setFavourite","canFavourite","isPlugin","videoActions","location","featureAccess","audiences","hasPermissions","config","currentUser","yearGroups","data","isAuthenticated","customerId","video","getInteractivesRequest","cursor","fetchNext","canViewInteractives","pageNumber","httpStatus","error","interactives","items","hasMore","isFetching","title","breadcrumbs","name","appLink","args","application","action","active","replace","redirectToPlaypage","length","hasCompleted","value","className","videos","getVideoAppLink","opts","context","contextId","includeContext","getSubTextAppLink","series","presentationAudiences","getPreviewQuestionsAppLink","interactive","imageCdnUrl","getClassroomGuideAppLink","getInteractiveGuidanceAppLink","getResourceGuidanceAppLink"],"sourceRoot":""}
|