@clickview/lite 0.59.0-rc.7 → 0.59.0-rc.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/scripts/1041-e67122b7dc-lite.chunk.js +2 -0
  3. package/dist/scripts/1041-e67122b7dc-lite.chunk.js.map +1 -0
  4. package/dist/scripts/{1080-aebdd2fd94-lite.chunk.js → 1080-db39a50a32-lite.chunk.js} +2 -2
  5. package/dist/scripts/1080-db39a50a32-lite.chunk.js.map +1 -0
  6. package/dist/scripts/{1169-b84be13a05-lite.chunk.js → 1169-394baed329-lite.chunk.js} +2 -2
  7. package/dist/scripts/1169-394baed329-lite.chunk.js.map +1 -0
  8. package/dist/scripts/{143-e8df681adb-lite.chunk.js → 143-851fefbbc8-lite.chunk.js} +2 -2
  9. package/dist/scripts/143-851fefbbc8-lite.chunk.js.map +1 -0
  10. package/dist/scripts/{170-edaa4055be-lite.chunk.js → 170-6dda8ec96e-lite.chunk.js} +3 -3
  11. package/dist/scripts/170-6dda8ec96e-lite.chunk.js.map +1 -0
  12. package/dist/scripts/2015-0cb7aead83-lite.chunk.js +2 -0
  13. package/dist/scripts/2015-0cb7aead83-lite.chunk.js.map +1 -0
  14. package/dist/scripts/204-67566b75e7-lite.chunk.js +2 -0
  15. package/dist/scripts/204-67566b75e7-lite.chunk.js.map +1 -0
  16. package/dist/scripts/2215-c47eb22183-lite.chunk.js +2 -0
  17. package/dist/scripts/2215-c47eb22183-lite.chunk.js.map +1 -0
  18. package/dist/scripts/{2340-16e28533f3-lite.chunk.js → 2340-6179f12db3-lite.chunk.js} +2 -2
  19. package/dist/scripts/2340-6179f12db3-lite.chunk.js.map +1 -0
  20. package/dist/scripts/2571-70477f279b-lite.chunk.js +2 -0
  21. package/dist/scripts/2571-70477f279b-lite.chunk.js.map +1 -0
  22. package/dist/scripts/{2581-bf3d282cb9-lite.chunk.js → 2581-f21f1ac71e-lite.chunk.js} +3 -3
  23. package/dist/scripts/2581-f21f1ac71e-lite.chunk.js.map +1 -0
  24. package/dist/scripts/3731-eeabea3393-lite.chunk.js +3 -0
  25. package/dist/scripts/3731-eeabea3393-lite.chunk.js.map +1 -0
  26. package/dist/scripts/{4013-3070636adb-lite.chunk.js → 4013-9e41670948-lite.chunk.js} +3 -3
  27. package/dist/scripts/4013-9e41670948-lite.chunk.js.map +1 -0
  28. package/dist/scripts/{4205-cf817cce7b-lite.chunk.js → 4205-2d3c5f264f-lite.chunk.js} +2 -2
  29. package/dist/scripts/4205-2d3c5f264f-lite.chunk.js.map +1 -0
  30. package/dist/scripts/{490-9b7a10c66a-lite.chunk.js → 490-f8e5bbb09c-lite.chunk.js} +2 -2
  31. package/dist/scripts/490-f8e5bbb09c-lite.chunk.js.map +1 -0
  32. package/dist/scripts/4944-c5ba3ff091-lite.chunk.js +2 -0
  33. package/dist/scripts/4944-c5ba3ff091-lite.chunk.js.map +1 -0
  34. package/dist/scripts/{5220-85356e2ed6-lite.chunk.js → 5220-0cca67a7e7-lite.chunk.js} +3 -3
  35. package/dist/scripts/5220-0cca67a7e7-lite.chunk.js.map +1 -0
  36. package/dist/scripts/{5224-6e7208837b-lite.chunk.js → 5224-ebdead7925-lite.chunk.js} +2 -2
  37. package/dist/scripts/5224-ebdead7925-lite.chunk.js.map +1 -0
  38. package/dist/scripts/{5836-27add12a78-lite.chunk.js → 5836-921d683eb5-lite.chunk.js} +2 -2
  39. package/dist/scripts/5836-921d683eb5-lite.chunk.js.map +1 -0
  40. package/dist/scripts/{5936-e61ae32ed3-lite.chunk.js → 5936-d1117ce842-lite.chunk.js} +2 -2
  41. package/dist/scripts/5936-d1117ce842-lite.chunk.js.map +1 -0
  42. package/dist/scripts/{6118-857c2f6b97-lite.chunk.js → 6118-3dbd569840-lite.chunk.js} +2 -2
  43. package/dist/scripts/6118-3dbd569840-lite.chunk.js.map +1 -0
  44. package/dist/scripts/{6263-dcc4cb4933-lite.chunk.js → 6263-d084bdb444-lite.chunk.js} +2 -2
  45. package/dist/scripts/6263-d084bdb444-lite.chunk.js.map +1 -0
  46. package/dist/scripts/{6368-d33570d16d-lite.chunk.js → 6368-c296821dd9-lite.chunk.js} +2 -2
  47. package/dist/scripts/6368-c296821dd9-lite.chunk.js.map +1 -0
  48. package/dist/scripts/{6741-5bf7ea5363-lite.chunk.js → 6741-9799a705b8-lite.chunk.js} +3 -3
  49. package/dist/scripts/6741-9799a705b8-lite.chunk.js.map +1 -0
  50. package/dist/scripts/{6934-11a3f3e147-lite.chunk.js → 6934-5647e18a41-lite.chunk.js} +2 -2
  51. package/dist/scripts/6934-5647e18a41-lite.chunk.js.map +1 -0
  52. package/dist/scripts/7234-fecb9339e5-lite.chunk.js +2 -0
  53. package/dist/scripts/7234-fecb9339e5-lite.chunk.js.map +1 -0
  54. package/dist/scripts/{7709-fb358991a1-lite.chunk.js → 7709-18e41d81b8-lite.chunk.js} +2 -2
  55. package/dist/scripts/7709-18e41d81b8-lite.chunk.js.map +1 -0
  56. package/dist/scripts/{9139-63b528ce93-lite.chunk.js → 9139-251b1d5a38-lite.chunk.js} +2 -2
  57. package/dist/scripts/9139-251b1d5a38-lite.chunk.js.map +1 -0
  58. package/dist/scripts/{9173-c164578a27-lite.chunk.js → 9173-1cb2d7c045-lite.chunk.js} +2 -2
  59. package/dist/scripts/9173-1cb2d7c045-lite.chunk.js.map +1 -0
  60. package/dist/scripts/9284-ca348ab523-lite.chunk.js +2 -0
  61. package/dist/scripts/9284-ca348ab523-lite.chunk.js.map +1 -0
  62. package/dist/scripts/{9395-7aa400f517-lite.chunk.js → 9395-10f1a8adfe-lite.chunk.js} +3 -3
  63. package/dist/scripts/{9395-7aa400f517-lite.chunk.js.map → 9395-10f1a8adfe-lite.chunk.js.map} +1 -1
  64. package/dist/scripts/{953-4e10bd618b-lite.chunk.js → 953-279b3b79cd-lite.chunk.js} +3 -3
  65. package/dist/scripts/{953-4e10bd618b-lite.chunk.js.map → 953-279b3b79cd-lite.chunk.js.map} +1 -1
  66. package/dist/scripts/bundle-55d31077c4.min.js +3 -0
  67. package/dist/scripts/bundle-55d31077c4.min.js.map +1 -0
  68. package/package.json +1 -1
  69. package/dist/scripts/1080-aebdd2fd94-lite.chunk.js.map +0 -1
  70. package/dist/scripts/1169-b84be13a05-lite.chunk.js.map +0 -1
  71. package/dist/scripts/143-e8df681adb-lite.chunk.js.map +0 -1
  72. package/dist/scripts/170-edaa4055be-lite.chunk.js.map +0 -1
  73. package/dist/scripts/204-abf7907929-lite.chunk.js +0 -2
  74. package/dist/scripts/204-abf7907929-lite.chunk.js.map +0 -1
  75. package/dist/scripts/2215-69d4d628e5-lite.chunk.js +0 -2
  76. package/dist/scripts/2215-69d4d628e5-lite.chunk.js.map +0 -1
  77. package/dist/scripts/2340-16e28533f3-lite.chunk.js.map +0 -1
  78. package/dist/scripts/2581-bf3d282cb9-lite.chunk.js.map +0 -1
  79. package/dist/scripts/3525-36cfbbfcf2-lite.chunk.js +0 -2
  80. package/dist/scripts/3525-36cfbbfcf2-lite.chunk.js.map +0 -1
  81. package/dist/scripts/4013-3070636adb-lite.chunk.js.map +0 -1
  82. package/dist/scripts/4205-cf817cce7b-lite.chunk.js.map +0 -1
  83. package/dist/scripts/490-9b7a10c66a-lite.chunk.js.map +0 -1
  84. package/dist/scripts/4944-44f59087ce-lite.chunk.js +0 -2
  85. package/dist/scripts/4944-44f59087ce-lite.chunk.js.map +0 -1
  86. package/dist/scripts/5220-85356e2ed6-lite.chunk.js.map +0 -1
  87. package/dist/scripts/5224-6e7208837b-lite.chunk.js.map +0 -1
  88. package/dist/scripts/5836-27add12a78-lite.chunk.js.map +0 -1
  89. package/dist/scripts/5886-13395190b8-lite.chunk.js +0 -3
  90. package/dist/scripts/5886-13395190b8-lite.chunk.js.map +0 -1
  91. package/dist/scripts/5936-e61ae32ed3-lite.chunk.js.map +0 -1
  92. package/dist/scripts/6118-857c2f6b97-lite.chunk.js.map +0 -1
  93. package/dist/scripts/6263-dcc4cb4933-lite.chunk.js.map +0 -1
  94. package/dist/scripts/6368-d33570d16d-lite.chunk.js.map +0 -1
  95. package/dist/scripts/6741-5bf7ea5363-lite.chunk.js.map +0 -1
  96. package/dist/scripts/6934-11a3f3e147-lite.chunk.js.map +0 -1
  97. package/dist/scripts/7234-ef069e6013-lite.chunk.js +0 -2
  98. package/dist/scripts/7234-ef069e6013-lite.chunk.js.map +0 -1
  99. package/dist/scripts/7709-fb358991a1-lite.chunk.js.map +0 -1
  100. package/dist/scripts/8813-887868f687-lite.chunk.js +0 -2
  101. package/dist/scripts/8813-887868f687-lite.chunk.js.map +0 -1
  102. package/dist/scripts/9139-63b528ce93-lite.chunk.js.map +0 -1
  103. package/dist/scripts/9173-c164578a27-lite.chunk.js.map +0 -1
  104. package/dist/scripts/9284-7f6bbe012f-lite.chunk.js +0 -2
  105. package/dist/scripts/9284-7f6bbe012f-lite.chunk.js.map +0 -1
  106. package/dist/scripts/bundle-403f576ace.min.js +0 -3
  107. package/dist/scripts/bundle-403f576ace.min.js.map +0 -1
  108. /package/dist/css/{3525-lite-52288b11e5.chunk.css → 1041-lite-52288b11e5.chunk.css} +0 -0
  109. /package/dist/css/{8813-lite-52288b11e5.chunk.css → 2015-lite-52288b11e5.chunk.css} +0 -0
  110. /package/dist/css/{5886-lite-3633cd9770.chunk.css → 3731-lite-3633cd9770.chunk.css} +0 -0
  111. /package/dist/scripts/{170-edaa4055be-lite.chunk.js.LICENSE.txt → 170-6dda8ec96e-lite.chunk.js.LICENSE.txt} +0 -0
  112. /package/dist/scripts/{2581-bf3d282cb9-lite.chunk.js.LICENSE.txt → 2581-f21f1ac71e-lite.chunk.js.LICENSE.txt} +0 -0
  113. /package/dist/scripts/{4013-3070636adb-lite.chunk.js.LICENSE.txt → 3731-eeabea3393-lite.chunk.js.LICENSE.txt} +0 -0
  114. /package/dist/scripts/{5220-85356e2ed6-lite.chunk.js.LICENSE.txt → 4013-9e41670948-lite.chunk.js.LICENSE.txt} +0 -0
  115. /package/dist/scripts/{5886-13395190b8-lite.chunk.js.LICENSE.txt → 5220-0cca67a7e7-lite.chunk.js.LICENSE.txt} +0 -0
  116. /package/dist/scripts/{6741-5bf7ea5363-lite.chunk.js.LICENSE.txt → 6741-9799a705b8-lite.chunk.js.LICENSE.txt} +0 -0
  117. /package/dist/scripts/{9395-7aa400f517-lite.chunk.js.LICENSE.txt → 9395-10f1a8adfe-lite.chunk.js.LICENSE.txt} +0 -0
  118. /package/dist/scripts/{953-4e10bd618b-lite.chunk.js.LICENSE.txt → 953-279b3b79cd-lite.chunk.js.LICENSE.txt} +0 -0
  119. /package/dist/scripts/{bundle-403f576ace.min.js.LICENSE.txt → bundle-55d31077c4.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts/4013-9e41670948-lite.chunk.js","mappings":";iLAOaA,EAAmB,CAC9BC,eAAc,SACZC,EACAC,EACAC,GAEA,MAAO,CACLC,IAAK,eAAqB,+CAAgD,CAAEH,KAAAA,EAAMC,GAAAA,EAAIC,eAAAA,IACtFE,UAAW,eAAqB,uCAAwC,CAAEJ,KAAAA,EAAMC,GAAAA,EAAIC,eAAAA,IACpFG,IAAK,gBAAF,OAAkBH,EAAc,wBAAgBF,EAAI,cAAMC,GAEjE,EAEAK,sBAAqB,SACnBC,EACAL,GAEA,IAAMM,EAAS,CACbN,eAAAA,EACAO,MAAO,EACPT,KAAM,WAAkB,IAAIU,KAAQ,cACpCC,WAAY,qBAGd,MAAO,CACLR,IAAK,eAAqB,+CAAD,OAAgDI,EAAgB,gBAAgBC,GACzGJ,UAAW,eAAqB,uCAAD,OAAwCG,EAAgB,gBAAgBC,GACvGH,IAAK,gBAAF,OAAkBH,EAAc,kCAA0BK,GAC7DK,WAAY,SAACC,GAAuB,OAAK,UAAkBA,EAAO,EAEtE,0ECpCF,SAAgB,SAAW,QAAQ,oBAAsB,SCQzD,IACMC,EAAYC,EAAA,mBADA,uBAyBZ,SAAUC,EAAaC,GAC3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nB1Q,SAAU,eACVge,iBAAkB5P,EAAarP,KAAKuP,YACpCrT,eAAgBmT,EAAarP,KAAKsB,GAClC4e,cAAehW,GAAUlK,KAAKnC,KAC9BsiB,YAAajW,GAAUlK,KAAKsB,GAC5B8N,mBAAoBjG,EAAenJ,KAAKnC,KACxCtB,iBAAkB4M,EAAenJ,KAAKsB,GACtC8e,eAAgB,wBACf,OAaA,OAjCGC,EAAU,EAAH,KAsBbhV,EAAA,gBAA8B,CAC5BiV,aAAcR,EAAS/f,KACvB4R,QAASmO,EAASnO,QAClBzV,eAAgBmT,EAAarP,KAAKsB,GAClC/E,iBAAkB4M,EAAenJ,KAAKsB,GACtC6e,YAAajW,GAAUlK,KAAKsB,IAC3B,CACDP,WAAY,YACZE,SAAU,0BACVD,OAAQ,cACRwL,cAAe,gBACd,kBAEI6T,GAAO,0CACf,EA2GOjO,kBAAmBnV,EAAMyc,YAAYhO,MACrCiK,WAAYA,GAAW3V,KACvBiW,UAAWgG,GAAA,UACX/H,YAAajX,EAAMyc,YAAYmE,IAC/BlL,cAAeA,GACf8B,aAAcA,EAAazU,KAC3B+V,MAAOkG,GAAA,UACP5L,2BAA4BA,GAC5BC,wBAAyBA,GACzB1Q,IAAKsJ,EAAA,oBAA+BC,EAAenJ,KAAM/C,EAAMie,YAE/DxE,SAAUA,EACV1C,SAAUA,MApDT,gBAACoE,GAA8B,KAyD1C,oCE9XA,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/sign-up/utils/SignUpHelper.ts","file:///app/packages/projects/lite/src/apps/subjects/errors/TopicNotFoundError.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}>&bull;</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: '&nbsp' }}\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 { 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: {\n classification: (classification: Classification | null) => Core.AppLink;\n classificationDirectory: (classification: Classification) => Core.AppLink;\n classificationVideos: (classification: Classification) => Core.AppLink;\n };\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 { Core } from 'libs/common/backbone/index';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\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: {\n audience: () => Core.AppLink;\n classification: (classification: Classification | null) => Core.AppLink;\n classificationDirectory: (classification: Classification) => Core.AppLink;\n classificationVideos: (classification: Classification) => Core.AppLink;\n };\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 { Core } from 'libs/common/backbone/index';\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 { AllClassificationWidgetTemplates } 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 { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { CalendarEvent, CalendarEventContentType, CanFavouriteFunc, Classification, CuratedDashboard, CuratedWidget, CuratedWidgetQueryParams, DashboardStatus, DashboardTargetType, FavouriteFunc, InteractiveMetadata, 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\nexport interface 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?: AllClassificationWidgetTemplates['appLinks'] & {\n signUp: () => Core.AppLink;\n widgetWizard: () => Core.AppLink;\n previewQuestions: (interactive: InteractiveMetadata) => Core.AppLink\n classificationVideos: (classification: Classification) => Core.AppLink;\n audience: () => Core.AppLink;\n };\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?: AllClassificationWidgetTemplates['settings'];\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 widgetCollection={DashboardTargetType.Classification}\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 onToggleFollowClassification={props.onToggleFollow}\n isPlugin={props.isPlugin}\n settings={props.settings}\n isEditing={props.isReadonly}\n // TODO: Do we actually need this shit if it wasn't even being passed in?\n limitTotalItems={false}\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 { 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';\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';\nimport { 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 { ClassificationDashboardProps } from 'libs/shared/apps/subjects/components/classification-dashboard/ClassificationDashboard';\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { RelatedVideosContext } from 'libs/shared/enums/RelatedVideosContext';\nimport { Classification, Company, 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 { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\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' ];\nconst CLASSIFICATION_LATEST_RELEASES = 'classification-latest-releases';\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): ClassificationDashboardProps['appLinks'] {\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 classificationLatestReleases: (classification: Classification) => {\n if (classification.id === CLASSIFICATION_LATEST_RELEASES)\n return {\n application: AppChannels.CONTENT_UPDATES,\n action: Actions.ContentUpdates.CONTENT_UPDATES\n };\n\n return {\n application: AppChannels.CONTENT_UPDATES,\n action: Actions.ContentUpdates.CLASSIFICATION_UPDATE,\n args: [ classification.id, TextHelper.slugify(classification.name) ]\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 ? classification.id : undefined,\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 discover: () => ({\n application: AppChannels.DASHBOARD,\n action: Actions.Dashboard.HOME\n }),\n\n latestReleases: () => ({\n application: AppChannels.CONTENT_UPDATES,\n action: Actions.ContentUpdates.CONTENT_UPDATES\n }),\n\n widgetVideoList: () => null,\n\n classroomGuide: VideoAppLinkHelper.getClassroomGuideAppLink,\n interactiveGuidance: VideoAppLinkHelper.getInteractiveGuidanceAppLink,\n resourceGuidance: VideoAppLinkHelper.getResourceGuidanceAppLink,\n\n company: (company: Company) => ({\n application: AppChannels.MOVIES_AND_TV,\n action: Actions.MoviesAndTv.COMPANY_DASHBOARD,\n args: [ company.id, TextHelper.slugify(company.name) ]\n }),\n\n signUp: SignUpHelper.getSignUpAppLink,\n\n previewQuestions: interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive),\n\n calendar: () => ({\n application: AppChannels.CALENDAR,\n action: Actions.Calendar.CALENDAR\n }),\n\n calendarMonth: (month: string, year?: string) => {\n const appLink: Core.AppLink = {\n application: AppChannels.CALENDAR,\n action: Actions.Calendar.CALENDAR_MONTH,\n args: [month.toLowerCase()]\n };\n\n if (year)\n appLink.params = { year };\n\n return appLink;\n },\n\n /**\n * Applinks below only used by streamable and curator\n */\n livestream: () => null,\n widgetWizard: () => null\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 { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { SeoHelper } from 'shared/utils/SeoHelper';\n\nimport { SignUpHelper } from 'apps/sign-up/utils/SignUpHelper';\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({\n stripPresentationSlug: true,\n customAppLink: ClassificationAppLinkHelper.getAppLink(classification.data)\n }),\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={{\n ...appLinks,\n signUp: SignUpHelper.getSignUpAppLink,\n widgetWizard: () => null,\n previewQuestions: interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)\n }}\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","widgetCollection","headingElementRef","getContentRequest","setIsEmpty","setFavourite","canFavourite","yearGroups","isScrollToTargetWidget","scrollToWidgetId","onSubmitFeedback","isBot","hasTableOfContents","lazyLoad","dashboardTarget","widgetIndex","hasPermissions","companyLogoFallbackUrl","subTextType","contentType","resourceThumbnailFallbackImageUrl","onToggleFollowClassification","isPlugin","isEditing","limitTotalItems","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","SignUpHelper","getSignUpAppLink","application","action","redirectUrl","TopicNotFoundError","ErrorPageError","OMITTED_PARAMS","CLASSIFICATION_LATEST_RELEASES","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","customAppLink","ClassificationAppLinkHelper","allowIndexing","hrefLang","useDeepLinks","app","isMobile","useLiteFavourites","u","videoActions","useVideoActions","ClassificationStatus","activeAudienceIds","followedClassification","isTogglingCurrentTopic","toString","request","then","args","TextHelper","classificationLatestReleases","_classification","appLinkClassification","VideoAppLinkHelper","context","RelatedVideosContext","mtv","series","SeriesAppLinkHelper","playlist","resource","videoId","canViewResources","discover","latestReleases","widgetVideoList","company","interactive","InteractiveHelper","calendar","calendarMonth","month","year","livestream","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([[4205],{49935:(e,t,r)=>{r.d(t,{Oo:()=>b,b2:()=>v});var n=r(32735),a=r(23481),i=r(36848),l=r(86764),o=r(3747),c=r(5859),u=r(35223),s=r(83914);function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var f=a.T.encloseNamespace("shared.breadcrumbComponent"),p=n.forwardRef((function(e,t){var r=e.breadcrumb,a=r.name,l=r.appLink,o=r.active,c=e.withBackIcon,m=a,d=null;return m.length>48&&(m=a.slice(0,48)+"...",d=a),n.createElement("li",{className:"breadcrumb-item".concat(o?" active":""),title:d},o?n.createElement("strong",null,m):n.createElement(i.F,{appLink:l,ref:t},c&&n.createElement(s.x,{svgName:u.vn.ChevronLeft,size:s.S.Small}),n.createElement("span",{className:c?"ms-2":""},m)))})),b=function(e){var t=e.breadcrumbs,r=(0,o.a)(l.r.XS),a=(null==t?void 0:t.length)||0,i=m(n.useState(!1),2),c=i[0],u=i[1],s=m(n.useState(!1),2),d=s[0],b=s[1],v=n.useRef();if(n.useEffect((function(){var e,r=null!==(e=null==t?void 0:t.reduce((function(e,t){return e+t.name.length}),0))&&void 0!==e?e:0;a>4&&r>64&&u(!0)}),[null==t?void 0:t.length]),n.useLayoutEffect((function(){var e;d&&(null===(e=v.current)||void 0===e||e.focus())}),[v.current,d]),!a||r&&a<2)return n.createElement(n.Fragment,null);if(r)return n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},n.createElement(p,{breadcrumb:t[a-2],withBackIcon:!0})));var h=n.createElement(p,{breadcrumb:t[0]}),g=a>2?n.createElement(p,{breadcrumb:t[1]}):n.createElement(n.Fragment,null),y=a>3?n.createElement(p,{breadcrumb:t[a-2]}):n.createElement(n.Fragment,null),E=a>1?n.createElement(p,{breadcrumb:t[a-1]}):n.createElement(n.Fragment,null),A=t.slice(2,a-2);return n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},h,g,c?n.createElement("li",{className:"breadcrumb-item"},n.createElement("button",{className:"btn-link",onClick:function(){u(!1),b(!0)},"aria-label":f("expand")},"...")):A.map((function(e,t){return n.createElement(p,{key:t,breadcrumb:e,ref:0===t?v:null})})),y,E))},v=n.memo((function(e){var t=e.numItems,r=void 0===t?3:t;return(0,o.a)(l.r.XS)?n.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},c.u.getPartialLoadingItems({numItems:r}).map((function(e,t){var r=e.width;return n.createElement("li",{key:t,className:"breadcrumb-item"},n.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:r},dangerouslySetInnerHTML:{__html:"&nbsp"}}))}))))}))},74696:(e,t,r)=>{r.d(t,{S:()=>u});var n=r(32735),a=r(68050),i=r(69111),l=r(9977),o=r(79967);const c={partialOptions:"Gufgq",partialName:"SicQQ",partialDescription:"dPGMq",partialThumbnail:"vZrnb",partialDragHandle:"iq73R"};function u(e){return n.createElement("div",{className:"mx-2"},Array(e.numVideos).fill(null).map((function(t,r){return n.createElement("div",{className:"d-flex",key:r},e.allowBulkActions&&n.createElement("div",{className:"form-check pe-3 pe-sm-2 mx-0 mx-md-2"}),n.createElement(s,Object.assign({},e)))})))}function s(e){var t=(0,o.k)(),r="sm"===l.O.getSize(t,"md"),u=e.withReordering&&!t.xs;return n.createElement(a.Z,{className:"".concat(r?"":"py-2"," flex-grow-1")},n.createElement(i.Z,Object.assign({},l.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(r?"pb-2 pe-1":"mb-1 pe-3 pe-md-2")}),n.createElement(a.Z,null,!!u&&n.createElement("div",{className:"d-flex align-items-center justify-content-center col-2"},n.createElement("div",{className:"partial-loading-background ".concat(c.partialDragHandle)})),n.createElement(i.Z,{xs:l.O.getThumbnailColSize(u)},n.createElement("div",{className:"partial-loading-background ".concat(r?"rounded":"rounded-3"," ").concat(c.partialThumbnail)})))),n.createElement(i.Z,Object.assign({},l.O.getDetailsColumns(),{className:r?"pb-2":"px-2"}),n.createElement("div",{className:"partial-loading-background mb-1 ".concat(c.partialName)}),n.createElement("div",{className:"partial-loading-background ".concat(c.partialDescription)})))}u.defaultProps={numVideos:15}},63719:(e,t,r)=>{r.d(t,{h:()=>o});var n=r(32735),a=r(77316);function i(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e){var t,r,o=(t=n.useMemo((function(){return a.p.getBuilder()}),[]),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}(t,r)||i(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=o[0],u=(0,o[1])(c);return u&&e?[].concat(function(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(u),[Object.assign(Object.assign({},e),{active:!0})]):u}},5859:(e,t,r)=>{function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,{u:()=>i});var a={numItems:5,minWidth:50,maxWidth:100},i={getPartialLoadingItems:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=Object.assign(Object.assign({},a),t);return(e=Array(r.numItems),function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(){return{width:"".concat(Math.max(Math.floor(Math.random()*r.maxWidth),r.minWidth),"px")}}))}}},53049:(e,t,r)=>{r.r(t),r.d(t,{CuratedDashboardWidgetView:()=>L});var n=r(32735),a=r(23481),i=r(20354),l=r(65858),o=r(49935),c=r(13231),u=r(51365),s=r(183),m=r(1666),d=r(80889),f=r(31949),p=r(63719),b=r(22902),v=r(79612),h=r(76753),g=r(51855),y=r(10671),E=r(27638),A=r(44110),k=r(97816),S=r(10741),w=r(33192),N=r(22490),I=r(82431),x=r(74696);const j={partialHeading:"yLlYt"};function O(){return n.createElement("div",{className:"px-3"},n.createElement("div",{className:"partial-loading-background mb-2 ".concat(j.partialHeading)}),n.createElement(x.S,null))}var C=a.T.encloseNamespace("dashboard.dashboardWidget");function L(e){var t,r,a,x=e.widgetId,j=(0,E.u)(l.LZ.VideoThumbnail),L=j.setFavourite,M=j.canFavourite,P=(0,g.G)().isPlugin,T=(0,y._)({location:y.i.VideoItem}),F=i.a.useBasicFetch(x&&d._.dashboardWidgetContent(x)),G=i.a.useBasicFetch(f.N.currentUser()),W=i.a.useBasicFetch(G.data.isAuthenticated&&m.h.yearGroups(G.data.customerId)),B=null===(t=F.data)||void 0===t?void 0:t.content;(0,k.V)(B),(0,v.M)(h.CG.getDefaultMetadata({title:null===(r=F.data)||void 0===r?void 0:r.name,phraseContext:{phraseHandler:C,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:w.f.getCanonicalLink({stripPresentationSlug:!0}),allowIndexing:w.f.allowIndexing()}));var R=(0,A.i)(),V=(0,b.T)().hasPermissions,$=(0,p.h)({name:null===(a=F.data)||void 0===a?void 0:a.name});return F.data&&(null==B?void 0:B.length)?n.createElement(u.M.Provider,{value:T},n.createElement("div",{className:"px-3"},n.createElement("h1",{className:"h2 mb-2"},F.data.name),n.createElement(o.Oo,{breadcrumbs:$}),n.createElement(c.E4,{videos:B,yearGroups:W.data,getVideoAppLink:function(t,r){return N.W.getAppLink(t,Object.assign(Object.assign({},r),{context:s.Q.Widget,contextId:e.widgetId}))},hasPermissions:V,getSubTextAppLink:function(e){return I.j.getSeriesAppLink(e.series)},setFavourite:L,canFavourite:M,presentationAudiences:R.data,getPreviewQuestionsAppLink:function(e){return S.j.getPreviewQuestionsAppLink(e)},isPlugin:P,getClassroomGuideAppLink:N.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:N.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:N.W.getResourceGuidanceAppLink}))):n.createElement(O,null)}},44110:(e,t,r)=>{r.d(t,{i:()=>l});var n=r(20354),a=r(89454),i=r(86698),l=function(){var e=(0,i.y)({redirectOnError:!0}),t=e.activePresentation,r=e.getFallbackPresentation,l=t||r();return n.a.useBasicFetch(!!l&&a.O.presentationAudiences(l.id))}},97816:(e,t,r)=>{r.d(t,{V:()=>f});var n=r(32735),a=r(20354),i=r(75896),l=r(21750),o=r(31949),c=r(1575),u=r(31908);function s(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var d=50;function f(e){var t,r,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=a.a.useBasicFetch(o.N.currentUser()),b=n.useRef(new Set),v=function(e){return e?Array.isArray(e)?e.filter((function(e){return!!e&&(u.M.isVideo(e)||u.M.isClip(e))})):"data"in e?e.data.filter((function(e){return!!e&&(u.M.isVideo(e)||u.M.isClip(e))})):[]:[]}(e),h=v.map((function(e){return e.id})),g=(t=n.useState([]),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}(t,r)||s(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=g[0],E=g[1];n.useEffect((function(){if((null==h?void 0:h.length)&&p.hasCompleted){var e=[];h.forEach((function(t){b.current.has(t)||(e.push(t),b.current.add(t))})),e.length&&E((function(t){var r=function(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t);return i.m.chunk(e,d).forEach((function(e){var t;r.push(c.R.videoMixinAssocs(e,f.flightNamespace)),(null===(t=p.data)||void 0===t?void 0:t.isAuthenticated)&&r.push(l.x.hasCurriculumLinks(e,null,f.flightNamespace))})),r}))}}),[null==h?void 0:h.length,p.hasCompleted]),a.a.useBasicFetchAll(y)}},68050:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(95685),a=r.n(n),i=r(32735),l=r(46304),o=r(74512);const c=i.forwardRef((({bsPrefix:e,className:t,as:r="div",...n},i)=>{const c=(0,l.vE)(e,"row"),u=(0,l.pi)(),s=(0,l.zG)(),m=`${c}-cols`,d=[];return u.forEach((e=>{const t=n[e];let r;delete n[e],null!=t&&"object"==typeof t?({cols:r}=t):r=t;const a=e!==s?`-${e}`:"";null!=r&&d.push(`${m}${a}-${r}`)})),(0,o.jsx)(r,{ref:i,...n,className:a()(t,c,...d)})}));c.displayName="Row";const u=c}}]);
2
- //# sourceMappingURL=4205-cf817cce7b-lite.chunk.js.map
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4205],{49935:(e,t,r)=>{r.d(t,{Oo:()=>b,b2:()=>v});var n=r(32735),a=r(23481),i=r(36848),l=r(86764),o=r(3747),c=r(5859),u=r(35223),s=r(83914);function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var f=a.T.encloseNamespace("shared.breadcrumbComponent"),p=n.forwardRef((function(e,t){var r=e.breadcrumb,a=r.name,l=r.appLink,o=r.active,c=e.withBackIcon,m=a,d=null;return m.length>48&&(m=a.slice(0,48)+"...",d=a),n.createElement("li",{className:"breadcrumb-item".concat(o?" active":""),title:d},o?n.createElement("strong",null,m):n.createElement(i.F,{appLink:l,ref:t},c&&n.createElement(s.x,{svgName:u.vn.ChevronLeft,size:s.S.Small}),n.createElement("span",{className:c?"ms-2":""},m)))})),b=function(e){var t=e.breadcrumbs,r=(0,o.a)(l.r.XS),a=(null==t?void 0:t.length)||0,i=m(n.useState(!1),2),c=i[0],u=i[1],s=m(n.useState(!1),2),d=s[0],b=s[1],v=n.useRef();if(n.useEffect((function(){var e,r=null!==(e=null==t?void 0:t.reduce((function(e,t){return e+t.name.length}),0))&&void 0!==e?e:0;a>4&&r>64&&u(!0)}),[null==t?void 0:t.length]),n.useLayoutEffect((function(){var e;d&&(null===(e=v.current)||void 0===e||e.focus())}),[v.current,d]),!a||r&&a<2)return n.createElement(n.Fragment,null);if(r)return n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},n.createElement(p,{breadcrumb:t[a-2],withBackIcon:!0})));var h=n.createElement(p,{breadcrumb:t[0]}),g=a>2?n.createElement(p,{breadcrumb:t[1]}):n.createElement(n.Fragment,null),y=a>3?n.createElement(p,{breadcrumb:t[a-2]}):n.createElement(n.Fragment,null),E=a>1?n.createElement(p,{breadcrumb:t[a-1]}):n.createElement(n.Fragment,null),A=t.slice(2,a-2);return n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},h,g,c?n.createElement("li",{className:"breadcrumb-item"},n.createElement("button",{className:"btn-link",onClick:function(){u(!1),b(!0)},"aria-label":f("expand")},"...")):A.map((function(e,t){return n.createElement(p,{key:t,breadcrumb:e,ref:0===t?v:null})})),y,E))},v=n.memo((function(e){var t=e.numItems,r=void 0===t?3:t;return(0,o.a)(l.r.XS)?n.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},c.u.getPartialLoadingItems({numItems:r}).map((function(e,t){var r=e.width;return n.createElement("li",{key:t,className:"breadcrumb-item"},n.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:r},dangerouslySetInnerHTML:{__html:"&nbsp"}}))}))))}))},74696:(e,t,r)=>{r.d(t,{S:()=>u});var n=r(32735),a=r(68050),i=r(69111),l=r(9977),o=r(79967);const c={partialOptions:"Gufgq",partialName:"SicQQ",partialDescription:"dPGMq",partialThumbnail:"vZrnb",partialDragHandle:"iq73R"};function u(e){return n.createElement("div",{className:"mx-2"},Array(e.numVideos).fill(null).map((function(t,r){return n.createElement("div",{className:"d-flex",key:r},e.allowBulkActions&&n.createElement("div",{className:"form-check pe-3 pe-sm-2 mx-0 mx-md-2"}),n.createElement(s,Object.assign({},e)))})))}function s(e){var t=(0,o.k)(),r="sm"===l.O.getSize(t,"md"),u=e.withReordering&&!t.xs;return n.createElement(a.Z,{className:"".concat(r?"":"py-2"," flex-grow-1")},n.createElement(i.Z,Object.assign({},l.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(r?"pb-2 pe-1":"mb-1 pe-3 pe-md-2")}),n.createElement(a.Z,null,!!u&&n.createElement("div",{className:"d-flex align-items-center justify-content-center col-2"},n.createElement("div",{className:"partial-loading-background ".concat(c.partialDragHandle)})),n.createElement(i.Z,{xs:l.O.getThumbnailColSize(u)},n.createElement("div",{className:"partial-loading-background ".concat(r?"rounded":"rounded-3"," ").concat(c.partialThumbnail)})))),n.createElement(i.Z,Object.assign({},l.O.getDetailsColumns(),{className:r?"pb-2":"px-2"}),n.createElement("div",{className:"partial-loading-background mb-1 ".concat(c.partialName)}),n.createElement("div",{className:"partial-loading-background ".concat(c.partialDescription)})))}u.defaultProps={numVideos:15}},63719:(e,t,r)=>{r.d(t,{h:()=>o});var n=r(32735),a=r(77316);function i(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e){var t,r,o=(t=n.useMemo((function(){return a.p.getBuilder()}),[]),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}(t,r)||i(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=o[0],u=(0,o[1])(c);return u&&e?[].concat(function(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(u),[Object.assign(Object.assign({},e),{active:!0})]):u}},5859:(e,t,r)=>{function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,{u:()=>i});var a={numItems:5,minWidth:50,maxWidth:100},i={getPartialLoadingItems:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=Object.assign(Object.assign({},a),t);return(e=Array(r.numItems),function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(){return{width:"".concat(Math.max(Math.floor(Math.random()*r.maxWidth),r.minWidth),"px")}}))}}},53049:(e,t,r)=>{r.r(t),r.d(t,{CuratedDashboardWidgetView:()=>L});var n=r(32735),a=r(23481),i=r(20354),l=r(65858),o=r(49935),c=r(13231),u=r(51365),s=r(183),m=r(1666),d=r(80889),f=r(31949),p=r(63719),b=r(22902),v=r(79612),h=r(76753),g=r(51855),y=r(10671),E=r(27638),A=r(44110),k=r(97816),S=r(10741),w=r(33192),N=r(22490),I=r(82431),x=r(74696);const j={partialHeading:"yLlYt"};function O(){return n.createElement("div",{className:"px-3"},n.createElement("div",{className:"partial-loading-background mb-2 ".concat(j.partialHeading)}),n.createElement(x.S,null))}var C=a.T.encloseNamespace("dashboard.dashboardWidget");function L(e){var t,r,a,x=e.widgetId,j=(0,E.u)(l.LZ.VideoThumbnail),L=j.setFavourite,M=j.canFavourite,P=(0,g.G)().isPlugin,T=(0,y._)({location:y.i.VideoItem}),F=i.a.useBasicFetch(x&&d._.dashboardWidgetContent(x)),G=i.a.useBasicFetch(f.N.currentUser()),W=i.a.useBasicFetch(G.data.isAuthenticated&&m.h.yearGroups(G.data.customerId)),B=null===(t=F.data)||void 0===t?void 0:t.content;(0,k.V)(B),(0,v.M)(h.CG.getDefaultMetadata({title:null===(r=F.data)||void 0===r?void 0:r.name,phraseContext:{phraseHandler:C,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:w.f.getCanonicalLink({stripPresentationSlug:!0}),allowIndexing:w.f.allowIndexing()}));var R=(0,A.i)(),V=(0,b.T)().hasPermissions,$=(0,p.h)({name:null===(a=F.data)||void 0===a?void 0:a.name});return F.data&&(null==B?void 0:B.length)?n.createElement(u.M.Provider,{value:T},n.createElement("div",{className:"px-3"},n.createElement("h1",{className:"h2 mb-2"},F.data.name),n.createElement(o.Oo,{breadcrumbs:$}),n.createElement(c.E4,{videos:B,yearGroups:W.data,getVideoAppLink:function(t,r){var n;return N.W.getAppLink(t,Object.assign(Object.assign({},r),{context:s.Q.Widget,contextId:e.widgetId,includeContext:null===(n=G.data)||void 0===n?void 0:n.isAuthenticated}))},hasPermissions:V,getSubTextAppLink:function(e){return I.j.getSeriesAppLink(e.series)},setFavourite:L,canFavourite:M,presentationAudiences:R.data,getPreviewQuestionsAppLink:function(e){return S.j.getPreviewQuestionsAppLink(e)},isPlugin:P,getClassroomGuideAppLink:N.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:N.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:N.W.getResourceGuidanceAppLink}))):n.createElement(O,null)}},44110:(e,t,r)=>{r.d(t,{i:()=>l});var n=r(20354),a=r(89454),i=r(86698),l=function(){var e=(0,i.y)({redirectOnError:!0}),t=e.activePresentation,r=e.getFallbackPresentation,l=t||r();return n.a.useBasicFetch(!!l&&a.O.presentationAudiences(l.id))}},97816:(e,t,r)=>{r.d(t,{V:()=>f});var n=r(32735),a=r(20354),i=r(75896),l=r(21750),o=r(31949),c=r(1575),u=r(31908);function s(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var d=50;function f(e){var t,r,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=a.a.useBasicFetch(o.N.currentUser()),b=n.useRef(new Set),v=function(e){return e?Array.isArray(e)?e.filter((function(e){return!!e&&(u.M.isVideo(e)||u.M.isClip(e))})):"data"in e?e.data.filter((function(e){return!!e&&(u.M.isVideo(e)||u.M.isClip(e))})):[]:[]}(e),h=v.map((function(e){return e.id})),g=(t=n.useState([]),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}(t,r)||s(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=g[0],E=g[1];n.useEffect((function(){if((null==h?void 0:h.length)&&p.hasCompleted){var e=[];h.forEach((function(t){b.current.has(t)||(e.push(t),b.current.add(t))})),e.length&&E((function(t){var r=function(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t);return i.m.chunk(e,d).forEach((function(e){var t;r.push(c.R.videoMixinAssocs(e,f.flightNamespace)),(null===(t=p.data)||void 0===t?void 0:t.isAuthenticated)&&r.push(l.x.hasCurriculumLinks(e,null,f.flightNamespace))})),r}))}}),[null==h?void 0:h.length,p.hasCompleted]),a.a.useBasicFetchAll(y)}},68050:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(95685),a=r.n(n),i=r(32735),l=r(46304),o=r(74512);const c=i.forwardRef((({bsPrefix:e,className:t,as:r="div",...n},i)=>{const c=(0,l.vE)(e,"row"),u=(0,l.pi)(),s=(0,l.zG)(),m=`${c}-cols`,d=[];return u.forEach((e=>{const t=n[e];let r;delete n[e],null!=t&&"object"==typeof t?({cols:r}=t):r=t;const a=e!==s?`-${e}`:"";null!=r&&d.push(`${m}${a}-${r}`)})),(0,o.jsx)(r,{ref:i,...n,className:a()(t,c,...d)})}));c.displayName="Row";const u=c}}]);
2
+ //# sourceMappingURL=4205-2d3c5f264f-lite.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts/4205-2d3c5f264f-lite.chunk.js","mappings":"wuCAaA,IACMA,EAAY,qBADA,8BAiBLC,EAAiB,cAAiB,SAC7CC,EACAC,GAEA,M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AsBG,IACvD,IAEJ7G,EAAIkH,YAAc,MAClB,S","sources":["file:///app/packages/libs/shared/src/components/breadcrumbs/Breadcrumbs.tsx","file:///app/packages/libs/shared/src/components/video-list/partial-loading/partial-video-list.scss","file:///app/packages/libs/shared/src/components/video-list/partial-loading/PartialVideoList.tsx","file:///app/packages/libs/shared/src/hooks/useBreadcrumbs.ts","file:///app/packages/libs/shared/src/utils/PartialLoadingHelper.ts","file:///app/packages/projects/lite/src/apps/dashboard/views/dashboard-widget/partial-loading/partial-dashboard-widget.scss","file:///app/packages/projects/lite/src/apps/dashboard/views/dashboard-widget/partial-loading/PartialDashboardWidget.tsx","file:///app/packages/projects/lite/src/apps/dashboard/views/dashboard-widget/CuratedDashboardWidgetView.tsx","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts","file:///app/packages/projects/lite/src/shared/hooks/useVideoMixin.ts","file:///app/node_modules/react-bootstrap/esm/Row.js"],"sourcesContent":["import * as React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { PartialLoadingHelper } from 'libs/shared/utils/PartialLoadingHelper';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport { SvgContainer, SvgContainerSize } from '../svg-container/SvgContainer';\n\nconst namespace = 'shared.breadcrumbComponent';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst COLLAPSE_CHARACTER_COUNT = 64;\nconst MAX_SEGMENT_LENGTH = 48;\n\nexport interface Breadcrumb {\n name: string;\n appLink?: Core.AppLink;\n active?: boolean;\n}\n\ninterface BreadcrumbItemProps {\n breadcrumb: Breadcrumb;\n withBackIcon?: boolean;\n}\n\nexport const BreadcrumbItem = React.forwardRef((\n props: BreadcrumbItemProps,\n ref: React.ForwardedRef<HTMLElement>\n) => {\n const { breadcrumb: { name, appLink, active }, withBackIcon } = props;\n\n let trimmedName = name;\n let title: string = null;\n\n if (trimmedName.length > MAX_SEGMENT_LENGTH) {\n trimmedName = name.slice(0, MAX_SEGMENT_LENGTH) + '...';\n\n // Only setting the title when we trim, because otherwise it's really not needed - Sha\n title = name;\n }\n\n return (\n <li\n className={`breadcrumb-item${active ? ' active' : ''}`}\n title={title}\n >\n {active\n ? <strong>{trimmedName}</strong>\n : <AppLink appLink={appLink} ref={ref}>\n {withBackIcon && <SvgContainer svgName={cvSvgLibrary.ChevronLeft} size={SvgContainerSize.Small} />}\n <span className={withBackIcon ? 'ms-2' : ''}>{trimmedName}</span>\n </AppLink>\n }\n </li>\n );\n});\n\ninterface BreadcrumbsProps {\n breadcrumbs: Breadcrumb[];\n}\n\nexport const Breadcrumbs = ({ breadcrumbs }: BreadcrumbsProps) => {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n\n const length = breadcrumbs?.length || 0;\n \n const [ collapse, setCollapse ] = React.useState(false);\n const [ shouldFocus, setShouldFocus ] = React.useState(false);\n const expandRef = React.useRef<HTMLElement>();\n\n React.useEffect(() => {\n const characterLength = breadcrumbs?.reduce((prev, next) => prev + next.name.length, 0) ?? 0;\n\n if (length > 4 && characterLength > COLLAPSE_CHARACTER_COUNT)\n setCollapse(true);\n }, [breadcrumbs?.length]);\n\n /**\n * Focus our first expanded item the first time it appears.\n */\n React.useLayoutEffect(() => {\n if (shouldFocus)\n expandRef.current?.focus();\n }, [ expandRef.current, shouldFocus ]);\n\n function onClickExpand() {\n setCollapse(false);\n setShouldFocus(true);\n }\n\n if (!length || (isMobile && length < 2))\n return <></>;\n\n if (isMobile)\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n <BreadcrumbItem breadcrumb={breadcrumbs[length - 2]} withBackIcon />\n </ol>\n </nav>\n );\n\n const first = <BreadcrumbItem breadcrumb={breadcrumbs[0]} />;\n const second = length > 2 ? <BreadcrumbItem breadcrumb={breadcrumbs[1]} /> : <></>;\n const secondLast = length > 3 ? <BreadcrumbItem breadcrumb={breadcrumbs[length - 2]} /> : <></>;\n const last = length > 1 ? <BreadcrumbItem breadcrumb={breadcrumbs[length - 1]} /> : <></>;\n const rest = breadcrumbs.slice(2, length - 2);\n\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n {first}\n {second}\n {collapse ?\n <li className='breadcrumb-item'>\n <button\n className='btn-link'\n onClick={onClickExpand}\n aria-label={getPhrase('expand')}\n >\n ...\n </button>\n </li> :\n rest.map((breadcrumb, idx) => (\n <BreadcrumbItem\n key={idx}\n breadcrumb={breadcrumb}\n ref={idx === 0 ? expandRef : null}\n />\n ))\n }\n {secondLast}\n {last}\n </ol>\n </nav>\n );\n};\n\nexport const PartialBreadcrumbs = React.memo(function({ numItems = 3 }: { numItems?: number; }) {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n\n if (isMobile) {\n return (\n <div className='partial-loading-background' style={{ height: '1.3125rem', width: '6rem' }} />\n );\n }\n\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n {PartialLoadingHelper.getPartialLoadingItems({ numItems }).map(({ width }, idx) => (\n <li key={idx} className='breadcrumb-item'>\n <span className='d-inline-block partial-loading-background' style={{ width }} dangerouslySetInnerHTML={{ __html: '&nbsp' }} />\n </li>\n ))}\n </ol>\n </nav>\n );\n});","// extracted by mini-css-extract-plugin\nexport default {\"partialOptions\":\"Gufgq\",\"partialName\":\"SicQQ\",\"partialDescription\":\"dPGMq\",\"partialThumbnail\":\"vZrnb\",\"partialDragHandle\":\"iq73R\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nimport styles from './partial-video-list.scss';\n\ninterface PartialVideoListProps {\n withReordering?: boolean;\n numVideos?: number;\n allowBulkActions?: boolean;\n}\n\nPartialVideoList.defaultProps = {\n numVideos: 15\n};\n\nexport function PartialVideoList(props: PartialVideoListProps): JSX.Element {\n return (\n <div className='mx-2'>\n {Array(props.numVideos).fill(null).map((_, i) => (\n <div className='d-flex' key={i}>\n {props.allowBulkActions && <div className='form-check pe-3 pe-sm-2 mx-0 mx-md-2' />}\n <PartialVideoItem {...props} />\n </div>\n ))}\n </div>\n );\n}\n\nexport function PartialVideoItem(props: PartialVideoListProps): JSX.Element {\n const breakpoints = useBreakpoints();\n\n const size = VideoListHelper.getSize(breakpoints, 'md');\n const isSmall = size === 'sm';\n\n const withDragHandle = props.withReordering && !breakpoints.xs;\n\n return (\n <Row className={`${isSmall ? '' : 'py-2'} flex-grow-1`}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-1` : 'mb-1 pe-3 pe-md-2'}`}>\n <Row>\n {!!withDragHandle && (\n <div className='d-flex align-items-center justify-content-center col-2'>\n <div className={`partial-loading-background ${styles.partialDragHandle}`} />\n </div>\n )}\n <Col xs={VideoListHelper.getThumbnailColSize(withDragHandle)}>\n <div className={`partial-loading-background ${isSmall ? 'rounded' : 'rounded-3'} ${styles.partialThumbnail}`} />\n </Col>\n </Row>\n </Col>\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n <div className={`partial-loading-background mb-1 ${styles.partialName}`} />\n <div className={`partial-loading-background ${styles.partialDescription}`} />\n </Col>\n </Row>\n );\n}\n\n","import React from 'react';\n\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { BreadcrumbService } from 'libs/shared/services/BreadcrumbService';\n\nexport function useBreadcrumbs(current: Breadcrumb): Breadcrumb[] {\n const [ match, useBuilder ] = React.useMemo(() => BreadcrumbService.getBuilder(), []);\n\n const breadcrumbs = useBuilder(match);\n\n if (!breadcrumbs || !current)\n return breadcrumbs;\n\n return [ ...breadcrumbs, { ...current, active: true }];\n}\n\n","const DEFAULT_PARTIAL_LOADING_OPTIONS: PartialLoadingOptions = {\n numItems: 5,\n minWidth: 50, // px\n maxWidth: 100 // px\n};\n\nexport interface PartialLoadingOptions {\n numItems?: number;\n minWidth?: number;\n maxWidth?: number;\n}\n\ninterface PartialLoadingItem {\n width: string;\n}\n\nexport const PartialLoadingHelper = {\n getPartialLoadingItems(options: PartialLoadingOptions = {}): PartialLoadingItem[] {\n const opts = {\n ...DEFAULT_PARTIAL_LOADING_OPTIONS,\n ...options\n };\n\n const getRandomFilterWidth = () => Math.max(Math.floor(Math.random() * opts.maxWidth), opts.minWidth);\n\n return [...Array(opts.numItems)].map(() => ({ width: `${getRandomFilterWidth()}px` }));\n }\n};","// extracted by mini-css-extract-plugin\nexport default {\"partialHeading\":\"yLlYt\"};","import React from 'react';\n\nimport { PartialVideoList } from 'libs/shared/components/video-list/partial-loading/PartialVideoList';\n\nimport styles from './partial-dashboard-widget.scss';\n\nexport function PartialDashboardWidget(): JSX.Element {\n return (\n <div className='px-3'>\n <div className={`partial-loading-background mb-2 ${styles.partialHeading}`} />\n <PartialVideoList />\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 { LocationContext } from 'libs/analytics/interfaces';\n\nimport { Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { RelatedVideosContext } from 'libs/shared/enums/RelatedVideosContext';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { DashboardRequests } from 'libs/shared/flight-requests/DashboardRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useBreadcrumbs } from 'libs/shared/hooks/useBreadcrumbs';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { CuratedWidget, CuratedWidgetData, CurrentUser, Video, YearGroup } from 'libs/shared/interfaces';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { usePluginHelper } from 'shared/hooks/use-plugin-helper/usePluginHelper';\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { SeoHelper } from 'shared/utils/SeoHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\n\nimport { PartialDashboardWidget } from './partial-loading/PartialDashboardWidget';\n\nconst namespace = 'dashboard.dashboardWidget';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CuratedDashboardWidgetViewQueryParams {\n widgetId?: string;\n}\n\nexport function CuratedDashboardWidgetView(props: CuratedDashboardWidgetViewQueryParams): JSX.Element {\n const { widgetId } = props;\n\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.VideoThumbnail);\n\n const { isPlugin } = usePluginHelper();\n \n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n\n const widget = Flight.useBasicFetch<CuratedWidget<CuratedWidgetData, Video[]>>(\n widgetId && DashboardRequests.dashboardWidgetContent(widgetId)\n );\n\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 videos = widget.data?.content;\n useVideoMixin(videos);\n\n useSetPageMetadata(PageMetadataHelper.getDefaultMetadata({\n title: widget.data?.name,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink({ stripPresentationSlug: true }),\n allowIndexing: SeoHelper.allowIndexing()\n }));\n\n const audiences = usePresentationAudiences();\n const { hasPermissions } = usePermissions();\n\n const breadcrumbs = useBreadcrumbs({ name: widget.data?.name });\n\n if (!widget.data || !videos?.length)\n return <PartialDashboardWidget />;\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <div className='px-3'>\n <h1 className='h2 mb-2'>{widget.data.name}</h1>\n <Breadcrumbs breadcrumbs={breadcrumbs} />\n <VideoList\n videos={videos}\n yearGroups={yearGroups.data}\n getVideoAppLink={(video, opts) => VideoAppLinkHelper.getAppLink(video, {\n ...opts,\n context: RelatedVideosContext.Widget,\n contextId: props.widgetId,\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 isPlugin={isPlugin}\n getClassroomGuideAppLink={VideoAppLinkHelper.getClassroomGuideAppLink}\n getInteractiveGuidanceAppLink={VideoAppLinkHelper.getInteractiveGuidanceAppLink}\n getResourceGuidanceAppLink={VideoAppLinkHelper.getResourceGuidanceAppLink}\n />\n </div>\n </VideoActionsContext.Provider>\n );\n}","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation, getFallbackPresentation } = usePresentation({ redirectOnError: true });\n\n const presentation = activePresentation || getFallbackPresentation();\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!presentation &&\n AudienceRequests.presentationAudiences(presentation.id)\n );\n\n return audiences;\n};","import React from 'react';\n\nimport { Flight } from 'libs/common/flight';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { Clip, ClipCollection, CurrentUser, Video, VideoCollection } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nconst CHUNK_SIZE = 50;\n\ntype Types = Video[] | VideoCollection | Clip[] | ClipCollection;\n\nfunction getValidObjects(objects: Types): (Video | Clip)[] {\n if (!objects)\n return [];\n\n if (Array.isArray(objects))\n return objects.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n if ('data' in objects)\n return objects.data.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n return [];\n}\n\ninterface VideoMixinOptions {\n /**\n * If the videos that are having new data mixed into are sitting on an explicit Flight namespace,\n * providing that namespace here is required\n */\n flightNamespace?: string;\n}\n\nexport function useVideoMixin(objects: Types, options: VideoMixinOptions = {}): void {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const hydratedVideos = React.useRef<Set<string>>(new Set<string>());\n\n const videos = getValidObjects(objects);\n\n const videoIds = videos.map(v => v.id);\n\n const [ request, setRequest ] = React.useState<Flight.Request[]>([]);\n\n React.useEffect(() => {\n if (!videoIds?.length || !currentUser.hasCompleted)\n return;\n\n const unhydratedVideos: string[] = [];\n\n videoIds.forEach(id => {\n if (!hydratedVideos.current.has(id)) {\n unhydratedVideos.push(id);\n hydratedVideos.current.add(id);\n }\n });\n \n if (!unhydratedVideos.length)\n return;\n\n setRequest(r => {\n const newRequests = [...r] ;\n\n ArrayHelper.chunk<string>(unhydratedVideos, CHUNK_SIZE).forEach(chunk => {\n newRequests.push(VideoRequests.videoMixinAssocs(chunk, options.flightNamespace));\n\n if (currentUser.data?.isAuthenticated)\n newRequests.push(ClassificationRequests.hasCurriculumLinks(chunk, null, options.flightNamespace));\n });\n\n return newRequests;\n });\n }, [ videoIds?.length, currentUser.hasCompleted ]);\n\n Flight.useBasicFetchAll(request);\n}","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Row = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');\n const breakpoints = useBootstrapBreakpoints();\n const minBreakpoint = useBootstrapMinBreakpoint();\n const sizePrefix = `${decoratedBsPrefix}-cols`;\n const classes = [];\n breakpoints.forEach(brkPoint => {\n const propValue = props[brkPoint];\n delete props[brkPoint];\n let cols;\n if (propValue != null && typeof propValue === 'object') {\n ({\n cols\n } = propValue);\n } else {\n cols = propValue;\n }\n const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';\n if (cols != null) classes.push(`${sizePrefix}${infix}-${cols}`);\n });\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n ...props,\n className: classNames(className, decoratedBsPrefix, ...classes)\n });\n});\nRow.displayName = 'Row';\nexport default Row;"],"names":["getPhrase","BreadcrumbItem","props","ref","breadcrumb","name","appLink","active","withBackIcon","trimmedName","title","length","slice","className","svgName","size","S","Breadcrumbs","breadcrumbs","isMobile","collapse","setCollapse","shouldFocus","setShouldFocus","expandRef","characterLength","reduce","prev","next","current","focus","first","second","secondLast","last","rest","onClick","map","idx","key","PartialBreadcrumbs","numItems","style","height","width","dangerouslySetInnerHTML","__html","PartialVideoList","Array","numVideos","fill","_","i","allowBulkActions","PartialVideoItem","breakpoints","useBreakpoints","isSmall","VideoListHelper","withDragHandle","withReordering","xs","Row","Col","defaultProps","useBreadcrumbs","match","useBuilder","DEFAULT_PARTIAL_LOADING_OPTIONS","minWidth","maxWidth","PartialLoadingHelper","getPartialLoadingItems","options","opts","Math","max","floor","random","PartialDashboardWidget","LanguageService","CuratedDashboardWidgetView","widgetId","useLiteFavourites","u","setFavourite","canFavourite","isPlugin","usePluginHelper","videoActions","useVideoActions","location","widget","DashboardRequests","currentUser","UserRequests","yearGroups","data","isAuthenticated","CustomerRequests","customerId","videos","content","useVideoMixin","useSetPageMetadata","PageMetadataHelper","phraseContext","phraseHandler","titlePhrase","descriptionPhrase","canonicalLink","SeoHelper","stripPresentationSlug","allowIndexing","audiences","usePresentationAudiences","hasPermissions","usePermissions","VideoActionsContext","value","VideoList","getVideoAppLink","video","VideoAppLinkHelper","context","RelatedVideosContext","contextId","includeContext","getSubTextAppLink","SeriesAppLinkHelper","series","presentationAudiences","getPreviewQuestionsAppLink","interactive","InteractiveHelper","getClassroomGuideAppLink","getInteractiveGuidanceAppLink","getResourceGuidanceAppLink","redirectOnError","activePresentation","getFallbackPresentation","presentation","id","CHUNK_SIZE","objects","hydratedVideos","Set","isArray","filter","o","getValidObjects","videoIds","v","request","setRequest","hasCompleted","unhydratedVideos","forEach","has","push","add","r","newRequests","chunk","flightNamespace","bsPrefix","as","Component","decoratedBsPrefix","minBreakpoint","sizePrefix","classes","brkPoint","propValue","cols","infix","displayName"],"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:()=>M});var a=t(32735),n=t(81886),s=t(23481),c=t(20354),r=t(28400),l=t(65858),u=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),b=t(22902),A=t(79612),w=t(37802),P=t(14070),E=t(97291),F=t(51855),V=t(10671),G=t(27638),O=t(44110),j=t(35014),y=t(10741),T=t(22490),N=t(98620),_=t(82431),x=t(16747),W="shared.videoMedia",B=s.T.encloseNamespace(W);function M(e){var i,t,M,Q,S,R=e.clipId,U=c.a.useGetFetch(),Y=(0,L.Z)(),Z=(0,G.u)(l.LZ.VideoThumbnail),H=Z.setFavourite,K=Z.canFavourite,$=(0,F.G)().isPlugin,q=(0,w.r)(null).hasPlayPageV2,z=(0,V._)({location:V.i.VideoItem}),D=(0,j.I)(),J=(0,O.i)(),X=(0,b.T)().hasPermissions,ee=c.a.useBasicFetch(h.L.config()),ie=c.a.useBasicFetch(I.N.currentUser()),te=c.a.useBasicFetch(ie.data.isAuthenticated&&k.h.yearGroups(ie.data.customerId)),ae=c.a.useBasicFetch(D.canViewClips&&m.e.clip(R));function ne(e){return f.b.videoInteractives(R,null,e)}function se(e){return U(ne(e))}(0,A.M)({title:ae.data?B("clipInteractiveViewPageTitle",{video:null===(i=ae.data)||void 0===i?void 0:i.name}):""});var ce=(0,C.K)(!!D.canViewInteractives&&ne,se,(function(e,i){if(1===e)return(0,g.r)(i);Y.error(s.T.getPhrase(W,"errorInteractives"))})),re=ce.items,le=ce.hasMore,ue=ce.isFetching,oe=B("interactivesHeading"),de=[{name:null===(t=ae.data)||void 0===t?void 0:t.name,appLink:Object.assign(Object.assign({},N.Y.playClip),{args:[R,r.m.slugify(null===(M=ae.data)||void 0===M?void 0:M.name)]})},{name:oe,appLink:{application:E.O.CLIPS,action:P.e.Clips.CLIP_INTERACTIVES,args:[R,r.m.slugify(null===(Q=ae.data)||void 0===Q?void 0:Q.name)]},active:!0}];return a.useEffect((function(){D.canViewInteractives||function(){var e;n.Q.C$.trigger(Object.assign(Object.assign({},N.Y.playClip),{args:[R,r.m.slugify(null===(e=ae.data)||void 0===e?void 0:e.name)]}),{replace:!0})}()}),[D.canViewInteractives]),ae.data&&(null==re?void 0:re.length)&&ee.hasCompleted?a.createElement(p.M.Provider,{value:z},a.createElement("div",{className:"px-3"},a.createElement("h1",{className:"h2 mb-2"},oe),a.createElement("div",{className:"mb-2"},a.createElement(u.Oo,{breadcrumbs:de})),a.createElement(d.E4,{videos:re,yearGroups:te.data,getVideoAppLink:function(i,t){return T.W.getAppLink(i,Object.assign(Object.assign({},t),{context:v.Q.Widget,contextId:e.clipId}))},hasPermissions:X,getSubTextAppLink:function(e){return _.j.getSeriesAppLink(e.series)},setFavourite:H,canFavourite:K,presentationAudiences:J.data,getPreviewQuestionsAppLink:function(e){return y.j.getPreviewQuestionsAppLink(e)},imageCdnUrl:null===(S=ee.data)||void 0===S?void 0:S.imageCdnUrl,isPlugin:$,getClassroomGuideAppLink:T.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:T.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:T.W.getResourceGuidanceAppLink,showOwner:q}),(le||ue)&&a.createElement(o._,{isFetching:ue,fetchNext:se}))):a.createElement(x.l,null)}}}]);
2
- //# sourceMappingURL=490-9b7a10c66a-lite.chunk.js.map
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[490],{28891:(e,i,t)=>{t.r(i),t.d(i,{ClipInteractivesView:()=>M});var a=t(32735),n=t(81886),s=t(23481),c=t(20354),r=t(28400),l=t(65858),u=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(79612),w=t(37802),P=t(14070),E=t(97291),F=t(51855),V=t(10671),G=t(27638),O=t(44110),j=t(35014),y=t(10741),T=t(22490),N=t(98620),_=t(82431),x=t(16747),W="shared.videoMedia",B=s.T.encloseNamespace(W);function M(e){var i,t,M,Q,S,R=e.clipId,U=c.a.useGetFetch(),Y=(0,L.Z)(),Z=(0,G.u)(l.LZ.VideoThumbnail),H=Z.setFavourite,K=Z.canFavourite,$=(0,F.G)().isPlugin,q=(0,w.r)(null).hasPlayPageV2,z=(0,V._)({location:V.i.VideoItem}),D=(0,j.I)(),J=(0,O.i)(),X=(0,A.T)().hasPermissions,ee=c.a.useBasicFetch(h.L.config()),ie=c.a.useBasicFetch(I.N.currentUser()),te=c.a.useBasicFetch(ie.data.isAuthenticated&&k.h.yearGroups(ie.data.customerId)),ae=c.a.useBasicFetch(D.canViewClips&&m.e.clip(R));function ne(e){return f.b.videoInteractives(R,null,e)}function se(e){return U(ne(e))}(0,b.M)({title:ae.data?B("clipInteractiveViewPageTitle",{video:null===(i=ae.data)||void 0===i?void 0:i.name}):""});var ce=(0,C.K)(!!D.canViewInteractives&&ne,se,(function(e,i){if(1===e)return(0,g.r)(i);Y.error(s.T.getPhrase(W,"errorInteractives"))})),re=ce.items,le=ce.hasMore,ue=ce.isFetching,oe=B("interactivesHeading"),de=[{name:null===(t=ae.data)||void 0===t?void 0:t.name,appLink:Object.assign(Object.assign({},N.Y.playClip),{args:[R,r.m.slugify(null===(M=ae.data)||void 0===M?void 0:M.name)]})},{name:oe,appLink:{application:E.O.CLIPS,action:P.e.Clips.CLIP_INTERACTIVES,args:[R,r.m.slugify(null===(Q=ae.data)||void 0===Q?void 0:Q.name)]},active:!0}];return a.useEffect((function(){D.canViewInteractives||function(){var e;n.Q.C$.trigger(Object.assign(Object.assign({},N.Y.playClip),{args:[R,r.m.slugify(null===(e=ae.data)||void 0===e?void 0:e.name)]}),{replace:!0})}()}),[D.canViewInteractives]),ae.data&&(null==re?void 0:re.length)&&ee.hasCompleted?a.createElement(p.M.Provider,{value:z},a.createElement("div",{className:"px-3"},a.createElement("h1",{className:"h2 mb-2"},oe),a.createElement("div",{className:"mb-2"},a.createElement(u.Oo,{breadcrumbs:de})),a.createElement(d.E4,{videos:re,yearGroups:te.data,getVideoAppLink:function(i,t){var a;return T.W.getAppLink(i,Object.assign(Object.assign({},t),{context:v.Q.Widget,contextId:e.clipId,includeContext:null===(a=ie.data)||void 0===a?void 0:a.isAuthenticated}))},hasPermissions:X,getSubTextAppLink:function(e){return _.j.getSeriesAppLink(e.series)},setFavourite:H,canFavourite:K,presentationAudiences:J.data,getPreviewQuestionsAppLink:function(e){return y.j.getPreviewQuestionsAppLink(e)},imageCdnUrl:null===(S=ee.data)||void 0===S?void 0:S.imageCdnUrl,isPlugin:$,getClassroomGuideAppLink:T.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:T.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:T.W.getResourceGuidanceAppLink,showOwner:q}),(le||ue)&&a.createElement(o._,{isFetching:ue,fetchNext:se}))):a.createElement(x.l,null)}}}]);
2
+ //# sourceMappingURL=490-f8e5bbb09c-lite.chunk.js.map